Changeset 642688
- Timestamp:
- 12/21/2012 01:30:42 AM (13 years ago)
- Location:
- multi-site-site-list-shortcode/trunk/lib/bit51
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
multi-site-site-list-shortcode/trunk/lib/bit51/bit51.css
r500527 r642688 57 57 list-style-image: url(images/bit51-small.png); 58 58 } 59 60 table.bit51sorttable { 61 border: 1px solid #ddd; 62 padding: 0; 63 } 64 65 table.bit51sorttable tr, 66 table.bit51sorttable td { 67 margin: 0; 68 padding: 0; 69 } 70 71 table.bit51sorttable tr.odd { 72 background-color: #fff; 73 } 74 75 table.bit51sorttable tr.even { 76 background-color: #eee; 77 } 78 79 table.bit51sorttable td { 80 border: 1px solid #ddd; 81 } 82 83 table.bit51sorttable tr.thead { 84 background: #F1F1F1; 85 background-image: -webkit-gradient(linear,left bottom,left top,from(#ECECEC),to(#F9F9F9)); 86 background-image: -webkit-linear-gradient(bottom,#ECECEC,#F9F9F9); 87 background-image: -moz-linear-gradient(bottom,#ECECEC,#F9F9F9); 88 background-image: -o-linear-gradient(bottom,#ECECEC,#F9F9F9); 89 background-image: linear-gradient(to top,#ECECEC,#F9F9F9); 90 } 91 92 table.bit51sorttable tr td { 93 padding: 10px 5px 3px 10px; 94 } 95 -
multi-site-site-list-shortcode/trunk/lib/bit51/bit51.php
r549371 r642688 44 44 wp_enqueue_style( 'global' ); 45 45 wp_enqueue_style( 'wp-admin' ); 46 wp_enqueue_style( 'bit51-css', plugin_dir_url( __FILE__ ). 'bit51.css' );46 wp_enqueue_style( 'bit51-css', plugin_dir_url( $this->pluginbase, __FILE__ ). 'lib/bit51/bit51.css' ); 47 47 48 48 } … … 241 241 <?php 242 242 } 243 244 function admin_tabs( $tabs, $current = NULL, $page = true ) { 245 if ( $current == NULL ) { 246 $current = $this->hook; 247 } 248 $tabs = $tabs; 249 echo '<div id="icon-themes" class="icon32"><br></div>'; 250 echo '<h2 class="nav-tab-wrapper">'; 251 foreach( $tabs as $location => $tabname ){ 252 if ( is_array( $tabname ) ) { 253 $class = ( $location == $current ) ? ' nav-tab-active' : ''; 254 echo '<a class="nav-tab' . $class. '" href="?page=' . $tabname[1] . '&tab='. $location . '">' . $tabname[0] . '</a>'; 255 } else { 256 $class = ( $location == $current ) ? ' nav-tab-active' : ''; 257 echo '<a class="nav-tab' . $class. '" href="?page=' . $location . '">' . $tabname . '</a>'; 258 } 259 } 260 echo '</h2>'; 261 } 243 262 244 263 /** … … 250 269 * @param object $boxes array of primary content boxes in postbox form 251 270 * @param string $icon[optional] icon file to display 252 * 253 **/ 254 function admin_page( $title, $boxes, $icon = '' ) { 271 * @param object $tabs[optional] array of tabs to display 272 * @param boolean $page[optional] true if stand-alone page, false otherwise 273 * 274 **/ 275 function admin_page( $title, $boxes, $icon = '', $tabs = NULL, $page = true ) { 276 277 if ( ( $page != true && !isset( $_GET['tab'] ) ) || ( $page == true && isset( $_GET['tab'] ) ) ) { 278 return; 279 } 280 255 281 ?> 256 282 <div class="wrap"> 257 283 <?php if ( $icon == '' ) { ?> 258 <a href="http://bit51.com/"><div id="bit51-icon" style="background: url(<?php echo plugin_dir_url( __FILE__ ); ?>images/bit51.png) no-repeat;" class="icon32"><br /></div></a>284 <a href="http://bit51.com/"><div id="bit51-icon" style="background: url(<?php echo plugin_dir_url( $this->pluginbase, __FILE__ ); ?>lib/bit51/images/bit51.png) no-repeat;" class="icon32"><br /></div></a> 259 285 <?php } else { ?> 260 286 <a href="http://bit51.com/"><div id="bit51-icon" style="background: url(<?php echo $icon; ?>) no-repeat;" class="icon32"><br /></div></a> 261 287 <?php } ?> 262 288 <h2><?php _e( $title, $this->hook ) ?></h2> 289 <?php 290 if ( $tabs != NULL ) { 291 if ( isset ( $_GET['tab'] ) ) { 292 $this->admin_tabs( $tabs, filter_var( $_GET['tab'], FILTER_SANITIZE_STRING ), false ); 293 } elseif( isset( $_GET['page'] ) ) { 294 $this->admin_tabs( $tabs, filter_var( $_GET['page'], FILTER_SANITIZE_STRING ) ); 295 } else { 296 $this->admin_tabs( $tabs ); 297 } 298 } 299 ?> 263 300 <div class="postbox-container" style="width:65%;"> 264 301 <div class="metabox-holder"> … … 382 419 $content .= '<li class="twitter"><a href="http://twitter.com/Bit51" target="_blank">' . __( 'Follow Bit51 on Twitter', $this->hook ) . '</a></li>'; 383 420 384 $content .= '<li class="google"><a href="https://plus.google.com/104513012839087985497" target="_blank">' . __( ' FindBit51 on Google+', $this->hook ) . '</a></li>';421 $content .= '<li class="google"><a href="https://plus.google.com/104513012839087985497" target="_blank">' . __( 'Circle Bit51 on Google+', $this->hook ) . '</a></li>'; 385 422 386 423 $content .= '<li class="subscribe"><a href="http://bit51.com/subscribe" target="_blank">' . __( 'Subscribe with RSS or Email', $this->hook ) . '</a></li>'; … … 417 454 418 455 //display the notifcation if they haven't turned it off and they've been using the plugin at least 30 days 419 if ( ! isset( $options['no-nag'] ) && $options['activatestamp'] < ( time() - 2952000 ) ) {456 if ( ! isset( $options['no-nag'] ) && $options['activatestamp'] < ( current_time( 'timestamp' ) - 2952000 ) ) { 420 457 421 458 if ( ! function_exists( 'bit51_plugin_donate_notice' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.