Make WordPress Core

Ticket #17944: 17944-3.4-rewrite.diff

File 17944-3.4-rewrite.diff, 3.2 KB (added by CoenJacobs, 14 years ago)

Updated patch to match new WordPress 3.4 themes screen

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

     
    181181                        <div class="themedetaildiv hide-if-js">
    182182                                <p><strong><?php _e('Version: '); ?></strong><?php echo $version; ?></p>
    183183                                <p><?php echo $theme->display('Description'); ?></p>
    184                                 <?php if ( current_user_can( 'edit_themes' ) && $theme->parent() ) :
    185                                         /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
    186                                         <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.' ),
    187                                                 $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?></p>
    188                                 <?php else :
    189                                                 /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir */ ?>
    190                                         <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%2$s</code>.' ),
    191                                                 $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p>
    192                                 <?php endif; ?>
     184                                <?php $this->show_files_location( $theme ); ?>
    193185                        </div>
    194186
    195187                        </div>
     
    228220        }
    229221
    230222        /**
     223        * Show location of template and theme files
     224        *
     225        * @param object/array $ct The theme to show it's file locations
     226        */
     227        function show_files_location( $theme ) {
     228                if ( current_user_can( 'edit_themes' ) && $theme->parent() ) {
     229                        /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
     230                        <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.' ),
     231                                $theme->display('Name'), str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $theme->display('Name'), $theme->parent()->display('Name') ); ?></p>
     232                <?php
     233                } else {
     234                                /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir */ ?>
     235                        <p><?php printf( __( 'All of this theme&#8217;s files are located in <code>%2$s</code>.' ),
     236                                $theme->display('Name'), str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p>
     237                <?php
     238                }
     239        }
     240
     241        /**
    231242         * Send required variables to JavaScript land
    232243         *
    233244         * @since 3.4
  • wp-admin/themes.php

     
    176176                }
    177177        }
    178178
     179        $wp_list_table->show_files_location( $ct );
     180
    179181        if ( $options || current_user_can( 'edit_theme_options' ) ) :
    180182        ?>
    181183        <div class="theme-options">