Changeset 7972
- Timestamp:
- 05/21/2008 05:36:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/themes.php
r7961 r7972 30 30 $themes = get_themes(); 31 31 $ct = current_theme_info(); 32 33 ksort( $themes ); 34 $theme_total = count( $themes ); 35 $per_page = 15; 36 37 if ( isset( $_GET['pagenum'] ) ) 38 $page = absint( $_GET['pagenum'] ); 39 40 if ( empty($page) ) 41 $page = 1; 42 43 $start = $offset = ( $page - 1 ) * $per_page; 44 45 $page_links = paginate_links( array( 46 'base' => add_query_arg( 'pagenum', '%#%' ) . '#themenav', 47 'format' => '', 48 'total' => ceil($theme_total / $per_page), 49 'current' => $page 50 )); 51 52 $themes = array_slice( $themes, $start, $per_page ); 53 32 54 ?> 33 55 … … 51 73 52 74 <h2><?php _e('Available Themes'); ?></h2> 53 <?php if ( 1 < count($themes) ) { ?> 75 <br class="clear" /> 76 77 <?php if ( $page_links ) : ?> 78 <div class="tablenav"> 79 <?php echo "<div class='tablenav-pages'>$page_links</div>"; ?> 80 <br class="clear" /> 81 </div> 82 <br class="clear" /> 83 <?php endif; ?> 84 85 <?php if ( 1 < $theme_total ) { ?> 54 86 <table id="availablethemes" cellspacing="0" cellpadding="0"> 55 87 <?php … … 113 145 <?php } ?> 114 146 147 <br class="clear" /> 148 149 <?php if ( $page_links ) : ?> 150 <div class="tablenav"> 151 <?php echo "<div class='tablenav-pages'>$page_links</div>"; ?> 152 <br class="clear" /> 153 </div> 154 <?php endif; ?> 155 156 <br class="clear" /> 157 115 158 <?php 116 159 // List broken themes, if any.
Note: See TracChangeset
for help on using the changeset viewer.