mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
Hide theme details by default. Props helenyhou, DH-Shredder. fixes #19853
git-svn-id: http://svn.automattic.com/wordpress/trunk@19840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
60c5026d4b
commit
f3a546d0fd
@ -162,8 +162,11 @@ class WP_Themes_List_Table extends WP_List_Table {
|
||||
<h3><?php
|
||||
/* translators: 1: theme title, 2: theme version, 3: theme author */
|
||||
printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3>
|
||||
<p class="description"><?php echo $description; ?></p>
|
||||
|
||||
<span class='action-links'><?php echo $actions ?></span>
|
||||
<span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
|
||||
<div class="themedetaildiv hide-if-js">
|
||||
<p><?php echo $description; ?></p>
|
||||
<?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) {
|
||||
/* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
|
||||
<p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?></p>
|
||||
@ -173,8 +176,9 @@ class WP_Themes_List_Table extends WP_List_Table {
|
||||
<?php if ( $tags ) : ?>
|
||||
<p><?php _e( 'Tags:' ); ?> <?php echo join( ', ', $tags ); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php theme_update_available( $themes[$theme_name] ); ?>
|
||||
<?php endif; // end if not empty theme_name ?>
|
||||
</div>
|
||||
<?php theme_update_available( $themes[$theme_name] ); ?>
|
||||
</div>
|
||||
<?php } // end foreach $theme_names
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ function display_theme($theme, $actions = null, $show_details = true) {
|
||||
return;
|
||||
|
||||
$name = wp_kses($theme->name, $themes_allowedtags);
|
||||
$author = wp_kses($theme->author, $themes_allowedtags);
|
||||
$desc = wp_kses($theme->description, $themes_allowedtags);
|
||||
//if ( strlen($desc) > 30 )
|
||||
// $desc = substr($desc, 0, 15) . '<span class="dots">...</span><span>' . substr($desc, -15) . '</span>';
|
||||
@ -153,14 +154,15 @@ function display_theme($theme, $actions = null, $show_details = true) {
|
||||
title='<?php echo esc_attr(sprintf(__('Preview “%s”'), $name)); ?>'>
|
||||
<img src='<?php echo esc_url($theme->screenshot_url); ?>' width='150' />
|
||||
</a>
|
||||
<h3><?php echo $name ?></h3>
|
||||
<h3><?php
|
||||
/* translators: 1: theme name, 2: author name */
|
||||
printf( __( '%1$s <span>by %2$s</span>' ), $name, $author ); ?></h3>
|
||||
<span class='action-links'><?php echo $actions ?></span>
|
||||
<p><?php echo $desc ?></p>
|
||||
<?php if ( $show_details ) { ?>
|
||||
<a href="#theme_detail" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
|
||||
<span class="separator hide-if-no-js">| </span><a href="#theme_detail" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
|
||||
<div class="themedetaildiv hide-if-js">
|
||||
<p><?php echo $desc ?></p>
|
||||
<p><strong><?php _e('Version:') ?></strong> <?php echo wp_kses($theme->version, $themes_allowedtags) ?></p>
|
||||
<p><strong><?php _e('Author:') ?></strong> <?php echo wp_kses($theme->author, $themes_allowedtags) ?></p>
|
||||
<?php if ( ! empty($theme->last_updated) ) : ?>
|
||||
<p><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $theme->last_updated ?>"><?php printf( __('%s ago'), human_time_diff(strtotime($theme->last_updated)) ) ?></span></p>
|
||||
<?php endif; if ( ! empty($theme->requires) ) : ?>
|
||||
|
@ -55,7 +55,7 @@ jQuery(document).ready(function($) {
|
||||
} );
|
||||
|
||||
// Theme details
|
||||
$('.theme-detail').click(function () {
|
||||
$('#availablethemes').on('click', 'a.theme-detail', function (event) {
|
||||
$(this).siblings('.themedetaildiv').toggle();
|
||||
return false;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user