- Timestamp:
- 09/15/2011 04:26:26 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-theme-install-list-table.php
r17322 r18673 23 23 $paged = $this->get_pagenum(); 24 24 25 $per_page = 3 0;25 $per_page = 36; 26 26 27 27 // These are the tabs which are shown on the page, … … 131 131 // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); 132 132 ?> 133 <div class="tablenav top ">133 <div class="tablenav top themes"> 134 134 <div class="alignleft actions"> 135 135 <?php do_action( 'install_themes_table_header' ); ?> … … 140 140 </div> 141 141 142 <table id="availablethemes" cellspacing="0" cellpadding="0"> 143 <tbody id="the-list" class="list:themes"> 144 <?php $this->display_rows_or_placeholder(); ?> 145 </tbody> 146 </table> 142 <div id="availablethemes"> 143 <?php $this->display_rows_or_placeholder(); ?> 144 </div> 147 145 148 <div class="tablenav bottom ">146 <div class="tablenav bottom themes"> 149 147 <?php $this->pagination( 'bottom' ); ?> 150 148 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" /> … … 156 154 function display_rows() { 157 155 $themes = $this->items; 156 $theme_names = array_keys( $themes ); 158 157 159 $rows = ceil( count( $themes ) / 3 ); 160 $table = array(); 161 $theme_keys = array_keys( $themes ); 162 for ( $row = 1; $row <= $rows; $row++ ) 163 for ( $col = 1; $col <= 3; $col++ ) 164 $table[$row][$col] = array_shift( $theme_keys ); 165 166 foreach ( $table as $row => $cols ) { 167 echo "\t<tr>\n"; 168 foreach ( $cols as $col => $theme_index ) { 158 foreach ( $theme_names as $theme_name ) { 169 159 $class = array( 'available-theme' ); 170 if ( $row == 1 ) $class[] = 'top';171 if ( $col == 1 ) $class[] = 'left';172 if ( $row == $rows ) $class[] = 'bottom';173 if ( $col == 3 ) $class[] = 'right';174 160 ?> 175 <td class="<?php echo join( ' ', $class ); ?>"><?php 176 if ( isset( $themes[$theme_index] ) ) 177 display_theme( $themes[$theme_index] ); 178 ?></td> 179 <?php } // end foreach $cols 180 echo "\t</tr>\n"; 181 } // end foreach $table 161 <div class="<?php echo join( ' ', $class ); ?>"><?php 162 if ( isset( $themes[$theme_name] ) ) 163 display_theme( $themes[$theme_name] ); 164 ?></div> 165 <?php } // end foreach $theme_names 182 166 } 183 167 }
Note: See TracChangeset
for help on using the changeset viewer.