Try grid layout for theme browser. see #8652
git-svn-id: https://develop.svn.wordpress.org/trunk@10653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
73d1177638
commit
a9b910aa1a
|
@ -299,10 +299,32 @@ function display_themes($themes, $page = 1, $totalpages = 1) {
|
|||
?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<div class="theme-listing">
|
||||
<table id="availablethemes" cellspacing="0" cellpadding="0">
|
||||
<?php
|
||||
$in_column = 0;
|
||||
foreach ( $themes as $theme ) {
|
||||
$rows = ceil(count($themes) / 3);
|
||||
$i = 0;
|
||||
for ( $row = 1; $row <= $rows; $row++ ) {
|
||||
for ( $col = 1; $col <= 3; $col++ ) {
|
||||
$table[$row][$col] = $i;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $table as $row => $cols ) {
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
foreach ( $cols as $col => $theme_index ) {
|
||||
$class = array('available-theme');
|
||||
if ( $row == 1 ) $class[] = 'top';
|
||||
if ( $col == 1 ) $class[] = 'left';
|
||||
if ( $row == $rows ) $class[] = 'bottom';
|
||||
if ( $col == 3 ) $class[] = 'right';
|
||||
$theme = $themes[$theme_index];
|
||||
?>
|
||||
<td class="<?php echo join(' ', $class); ?>">
|
||||
<?php
|
||||
//var_dump($theme);
|
||||
|
||||
$name = wp_kses($theme->name, $themes_allowedtags);
|
||||
|
@ -319,16 +341,12 @@ function display_themes($themes, $page = 1, $totalpages = 1) {
|
|||
$action_links = apply_filters('theme_install_action_links', $action_links, $theme);
|
||||
$actions = implode ( ' ', $action_links );
|
||||
echo "
|
||||
<div class='theme-item available-theme'>
|
||||
<a class='thickbox thickbox-preview screenshot' href='$preview_link' title='" . attribute_escape(sprintf(__('Preview "%s"'), $name)) . "'>
|
||||
<img src='{$theme->screenshot_url}' width='150' />
|
||||
</a>
|
||||
<h3>{$name}</h3>
|
||||
<span class='action-links'>$actions</span>
|
||||
<div class='theme-item-info'>
|
||||
{$desc}
|
||||
</div>
|
||||
</div>";
|
||||
<p>{$desc}</p>";
|
||||
/*
|
||||
object(stdClass)[59]
|
||||
public 'name' => string 'Magazine Basic' (length=14)
|
||||
|
@ -343,10 +361,12 @@ function display_themes($themes, $page = 1, $totalpages = 1) {
|
|||
public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.' (length=214)
|
||||
public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)
|
||||
*/
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<?php } // end foreach $cols ?>
|
||||
</tr>
|
||||
<?php } // end foreach $table ?>
|
||||
</table>
|
||||
|
||||
<div class="tablenav">
|
||||
<?php if ( $page_links )
|
||||
|
|
Loading…
Reference in New Issue