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. Built from https://develop.svn.wordpress.org/trunk@31968 git-svn-id: http://core.svn.wordpress.org/trunk@31947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
481352bd2e
commit
57fce2e593
|
@ -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.
|
* Widget Area Customize Control class.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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 */
|
/* Site Title & Tagline */
|
||||||
|
|
||||||
$this->add_section( 'title_tagline', array(
|
$this->add_section( 'title_tagline', array(
|
||||||
|
|
|
@ -348,9 +348,6 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||||
<div class="customize-themes-panel control-panel-content themes-php">
|
<div class="customize-themes-panel control-panel-content themes-php">
|
||||||
<h2><?php esc_html_e( 'Themes' ); ?>
|
<h2><?php esc_html_e( 'Themes' ); ?>
|
||||||
<span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span>
|
<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>
|
</h2>
|
||||||
<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
|
<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
|
||||||
<div id="customize-container"></div>
|
<div id="customize-container"></div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-beta3-31967';
|
$wp_version = '4.2-beta3-31968';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue