Make WordPress Core


Ignore:
Timestamp:
03/29/2013 08:39:54 PM (13 years ago)
Author:
markjaquith
Message:

Add "Customize" as first item under Appearance menu.

fixes #21413. props ryanhellyer, obenland, DrewAPicture

File:
1 edited

Legend:

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

    r21972 r23871  
    162162                        if ( 'themes.php' == $item[2] || 'theme-editor.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                        }
    164170                        // 0 = name, 1 = capability, 2 = file
    165171                        if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
     
    188194        ?>
    189195        <div class="theme-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                 ?>
     196                <?php if ( $options ) : ?>
    196197                <span><?php _e( 'Options:' )?></span>
    197198                <ul>
Note: See TracChangeset for help on using the changeset viewer.