Customizer Theme Switcher: Remove "Add New" references.

The current iteration takes you out of the customizer context, which isn't great UX and doesn't really fit into the flows targeted by this particular UI.

fixes #31837.

git-svn-id: https://develop.svn.wordpress.org/trunk@31968 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-04-01 19:49:41 +00:00
parent a143f7f03b
commit 365ed7a6cb
3 changed files with 0 additions and 38 deletions

View File

@ -1234,34 +1234,6 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
}
}
/**
* Customize New Theme Control class.
*
* @since 4.2.0
*
* @see WP_Customize_Control
*/
class WP_Customize_New_Theme_Control extends WP_Customize_Control {
/**
* Render the control content.
*
* @since 4.2.0
*/
public function render_content() {
?>
<div class="theme add-new-theme">
<a href="<?php echo admin_url( 'theme-install.php' ); ?>" target="_top">
<div class="theme-screenshot">
<span></span>
</div>
<h3 class="theme-name"><?php _e( 'Add New Theme' ); ?></h3>
</a>
</div>
<?php
}
}
/**
* Widget Area Customize Control class.
*

View File

@ -1171,13 +1171,6 @@ final class WP_Customize_Manager {
) ) );
}
if ( ! is_multisite() && current_user_can( 'install_themes' ) ) {
$this->add_control( new WP_Customize_New_Theme_Control( $this, 'add_theme', array(
'section' => 'themes',
'settings' => 'active_theme',
) ) );
}
/* Site Title & Tagline */
$this->add_section( 'title_tagline', array(

View File

@ -348,9 +348,6 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
<div class="customize-themes-panel control-panel-content themes-php">
<h2><?php esc_html_e( 'Themes' ); ?>
<span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span>
<?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
<a href="<?php echo admin_url( 'theme-install.php' ); ?>" target="_top" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a>
<?php endif; ?>
</h2>
<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
<div id="customize-container"></div>