Make WordPress Core


Ignore:
Timestamp:
04/22/2013 07:33:39 PM (12 years ago)
Author:
nacin
Message:

Revert [23871] - Customize should be added to the menu, but not hacked in as first. see #21413.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r23871 r24048  
    160160        foreach ( (array) $submenu['themes.php'] as $item) {
    161161            $class = '';
    162             if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] )
     162            if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 'customize.php' == $item[2] )
    163163                continue;
    164             if ( 'customize.php' == $item[2] ) {
    165                 if ( current_user_can( 'edit_theme_options' ) )
    166                     $class = ' class="load-customize hide-if-no-customize"';
    167                 else
    168                     continue;
    169             }
    170164            // 0 = name, 1 = capability, 2 = file
    171165            if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
     
    194188    ?>
    195189    <div class="theme-options">
    196         <?php if ( $options ) : ?>
     190        <?php if ( current_user_can( 'edit_theme_options' ) ) : ?>
     191        <a id="customize-current-theme-link" href="<?php echo wp_customize_url(); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( $customize_title ); ?>"><?php _e( 'Customize' ); ?></a>
     192        <?php
     193        endif; // edit_theme_options
     194        if ( $options ) :
     195        ?>
    197196        <span><?php _e( 'Options:' )?></span>
    198197        <ul>
Note: See TracChangeset for help on using the changeset viewer.