$paged = $this->get_pagenum();
- $per_page = 30;
+ $per_page = 36;
// These are the tabs which are shown on the page,
$tabs = array();
// 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>
<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" />
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
}
}