Make WordPress Core

Ticket #17944: 17944-cleaned-vars.diff

File 17944-cleaned-vars.diff, 3.0 KB (added by CoenJacobs, 15 years ago)

If unused vars could be removed, the code get's cleaner. Var title has a double anyway.

  • wp-admin/includes/class-wp-themes-list-table.php

     
    184184<p class="description"><?php echo $description; ?></p>
    185185<span class='action-links'><?php echo $actions ?></span>
    186186        <?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) {
    187         /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
    188         <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>
     187        /* translators: 1:  template dir, 2: stylesheet_dir, 3: theme title, 4: parent_theme */ ?>
     188        <p><?php printf( __( 'The template files are located in <code>%1$s</code>. The stylesheet files are located in <code>%2$s</code>. <strong>%3$s</strong> uses templates from <strong>%4$s</strong>. Changes made to the templates will affect both themes.' ), str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?></p>
    189189<?php } else { ?>
    190         <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%2$s</code>.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?></p>
     190        <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%1$s</code>.' ), str_replace( WP_CONTENT_DIR, '', $template_dir ) ); ?></p>
    191191<?php } ?>
    192192<?php if ( $tags ) : ?>
    193193<p><?php _e( 'Tags:' ); ?> <?php echo join( ', ', $tags ); ?></p>
  • wp-admin/themes.php

     
    118118                }
    119119        }
    120120        echo implode ( ' | ', $options );
     121       
     122        if ( current_user_can( 'edit_themes' ) && ! empty( $ct->parent_theme ) ) {
     123        /* translators: 1:  template dir, 2: stylesheet_dir, 3: theme title, 4: parent_theme */ ?>
     124                <p><?php printf( __( 'The template files are located in <code>%1$s</code>. The stylesheet files are located in <code>%2$s</code>. <strong>%3$s</strong> uses templates from <strong>%4$s</strong>. Changes made to the templates will affect both themes.' ), str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ), $ct->title, $ct->parent_theme ); ?></p>
     125        <?php } else { ?>
     126                <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%1$s</code>.' ), str_replace( WP_CONTENT_DIR, '', $ct->template_dir ) ); ?></p>
     127        <?php }
    121128
    122129        if ( $ct->tags ) : ?>
    123130        <p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>