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

git-svn-id: https://develop.svn.wordpress.org/trunk@24048 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-04-22 19:33:39 +00:00
parent cabad11bb4
commit 3ebbe1ae51
6 changed files with 28 additions and 27 deletions
+7 -8
View File
@@ -159,14 +159,8 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
foreach ( (array) $submenu['themes.php'] as $item) {
$class = '';
if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] )
if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 'customize.php' == $item[2] )
continue;
if ( 'customize.php' == $item[2] ) {
if ( current_user_can( 'edit_theme_options' ) )
$class = ' class="load-customize hide-if-no-customize"';
else
continue;
}
// 0 = name, 1 = capability, 2 = file
if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
$class = ' class="current"';
@@ -193,7 +187,12 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
if ( $options || current_user_can( 'edit_theme_options' ) ) :
?>
<div class="theme-options">
<?php if ( $options ) : ?>
<?php if ( current_user_can( 'edit_theme_options' ) ) : ?>
<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>
<?php
endif; // edit_theme_options
if ( $options ) :
?>
<span><?php _e( 'Options:' )?></span>
<ul>
<?php foreach ( $options as $option ) : ?>