]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-theme-install-list-table.php
WordPress 3.3.2-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-theme-install-list-table.php
index 7e44267c8223927dfcdccc937e2a14d1ff5720b0..66f7797caaed9c758b069f09aa6de0675e717a48 100644 (file)
@@ -22,7 +22,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
 
                $paged = $this->get_pagenum();
 
-               $per_page = 30;
+               $per_page = 36;
 
                // These are the tabs which are shown on the page,
                $tabs = array();
@@ -130,7 +130,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
 
                // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
 ?>
-               <div class="tablenav top">
+               <div class="tablenav top themes">
                        <div class="alignleft actions">
                                <?php do_action( 'install_themes_table_header' ); ?>
                        </div>
@@ -139,13 +139,11 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
                        <br class="clear" />
                </div>
 
-               <table id="availablethemes" cellspacing="0" cellpadding="0">
-                       <tbody id="the-list" class="list:themes">
-                               <?php $this->display_rows_or_placeholder(); ?>
-                       </tbody>
-               </table>
+               <div id="availablethemes">
+                       <?php $this->display_rows_or_placeholder(); ?>
+               </div>
 
-               <div class="tablenav bottom">
+               <div class="tablenav bottom themes">
                        <?php $this->pagination( 'bottom' ); ?>
                        <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
                        <br class="clear" />
@@ -155,30 +153,16 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
 
        function display_rows() {
                $themes = $this->items;
+               $theme_names = array_keys( $themes );
 
-               $rows = ceil( count( $themes ) / 3 );
-               $table = array();
-               $theme_keys = array_keys( $themes );
-               for ( $row = 1; $row <= $rows; $row++ )
-                       for ( $col = 1; $col <= 3; $col++ )
-                               $table[$row][$col] = array_shift( $theme_keys );
-
-               foreach ( $table as $row => $cols ) {
-                       echo "\t<tr>\n";
-                       foreach ( $cols as $col => $theme_index ) {
+               foreach ( $theme_names as $theme_name ) {
                                $class = array( 'available-theme' );
-                               if ( $row == 1 ) $class[] = 'top';
-                               if ( $col == 1 ) $class[] = 'left';
-                               if ( $row == $rows ) $class[] = 'bottom';
-                               if ( $col == 3 ) $class[] = 'right';
                                ?>
-                               <td class="<?php echo join( ' ', $class ); ?>"><?php
-                                       if ( isset( $themes[$theme_index] ) )
-                                               display_theme( $themes[$theme_index] );
-                               ?></td>
-                       <?php } // end foreach $cols
-                       echo "\t</tr>\n";
-               } // end foreach $table
+                               <div class="<?php echo join( ' ', $class ); ?>"><?php
+                                       if ( isset( $themes[$theme_name] ) )
+                                               display_theme( $themes[$theme_name] );
+                               ?></div>
+               <?php } // end foreach $theme_names
        }
 }