- $table = array();
- $rows = ceil( count( $theme_names ) / 3 );
- for ( $row = 1; $row <= $rows; $row++ )
- for ( $col = 1; $col <= 3; $col++ )
- $table[$row][$col] = array_shift( $theme_names );
-
- foreach ( $table as $row => $cols ) {
-?>
-<tr>
-<?php
-foreach ( $cols as $col => $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 ( !empty( $theme_name ) ) :
+ foreach ( $theme_names as $theme_name ) {
+ $class = array( 'available-theme' );
+ ?>
+ <div class="<?php echo join( ' ', $class ); ?>">
+ <?php if ( !empty( $theme_name ) ) :