Ticket #19853: 19853.diff

File 19853.diff, 3.4 KB (added by helenyhou, 4 months ago)

Patch for themes.php and theme-install.php

  • wp-admin/includes/theme-install.php

     
    132132                return; 
    133133 
    134134        $name = wp_kses($theme->name, $themes_allowedtags); 
     135        $author = wp_kses($theme->author, $themes_allowedtags); 
    135136        $desc = wp_kses($theme->description, $themes_allowedtags); 
    136137        //if ( strlen($desc) > 30 ) 
    137138        //      $desc = substr($desc, 0, 15) . '<span class="dots">...</span><span>' . substr($desc, -15) . '</span>'; 
     
    153154        title='<?php echo esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)); ?>'> 
    154155<img src='<?php echo esc_url($theme->screenshot_url); ?>' width='150' /> 
    155156</a> 
    156 <h3><?php echo $name ?></h3> 
     157<h3><?php echo $name ?> <span><?php _e('by') ?></strong> <?php echo $author ?></span></h3> 
    157158<span class='action-links'><?php echo $actions ?></span> 
    158 <p><?php echo $desc ?></p> 
    159159<?php if ( $show_details ) { ?> 
    160 <a href="#theme_detail" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a> 
     160<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> 
    161161<div class="themedetaildiv hide-if-js"> 
     162<p><?php echo $desc ?></p> 
    162163<p><strong><?php _e('Version:') ?></strong> <?php echo wp_kses($theme->version, $themes_allowedtags) ?></p> 
    163 <p><strong><?php _e('Author:') ?></strong> <?php echo wp_kses($theme->author, $themes_allowedtags) ?></p> 
    164164<?php if ( ! empty($theme->last_updated) ) : ?> 
    165165<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> 
    166166<?php endif; if ( ! empty($theme->requires) ) : ?> 
  • wp-admin/includes/class-wp-themes-list-table.php

     
    165165<h3><?php 
    166166        /* translators: 1: theme title, 2: theme version, 3: theme author */ 
    167167        printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3> 
    168 <p class="description"><?php echo $description; ?></p> 
     168 
    169169<span class='action-links'><?php echo $actions ?></span> 
     170<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> 
     171<div class="themedetaildiv hide-if-js"> 
     172<p><?php echo $description; ?></p> 
    170173        <?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) { 
    171174        /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> 
    172175        <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> 
     
    176179<?php if ( $tags ) : ?> 
    177180<p><?php _e( 'Tags:' ); ?> <?php echo join( ', ', $tags ); ?></p> 
    178181<?php endif; ?> 
    179                 <?php theme_update_available( $themes[$theme_name] ); ?> 
    180182<?php endif; // end if not empty theme_name ?> 
     183</div> 
     184        <?php theme_update_available( $themes[$theme_name] ); ?> 
    181185        </div> 
    182186<?php } // end foreach $theme_names 
    183187        }