Make WordPress Core

Changeset 31968


Ignore:
Timestamp:
04/01/2015 07:49:41 PM (10 years ago)
Author:
ocean90
Message:

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.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-control.php

    r31954 r31968  
    12361236
    12371237/**
    1238  * Customize New Theme Control class.
    1239  *
    1240  * @since 4.2.0
    1241  *
    1242  * @see WP_Customize_Control
    1243  */
    1244 class WP_Customize_New_Theme_Control extends WP_Customize_Control {
    1245 
    1246     /**
    1247      * Render the control content.
    1248      *
    1249      * @since 4.2.0
    1250      */
    1251     public function render_content() {
    1252         ?>
    1253         <div class="theme add-new-theme">
    1254             <a href="<?php echo admin_url( 'theme-install.php' ); ?>" target="_top">
    1255                 <div class="theme-screenshot">
    1256                     <span></span>
    1257                 </div>
    1258                 <h3 class="theme-name"><?php _e( 'Add New Theme' ); ?></h3>
    1259             </a>
    1260         </div>
    1261         <?php
    1262     }
    1263 }
    1264 
    1265 /**
    12661238 * Widget Area Customize Control class.
    12671239 *
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r31950 r31968  
    11671167            $this->add_control( new WP_Customize_Theme_Control( $this, $theme_id, array(
    11681168                'theme' => $theme,
    1169                 'section' => 'themes',
    1170                 'settings' => 'active_theme',
    1171             ) ) );
    1172         }
    1173 
    1174         if ( ! is_multisite() && current_user_can( 'install_themes' ) ) {
    1175             $this->add_control( new WP_Customize_New_Theme_Control( $this, 'add_theme', array(
    11761169                'section' => 'themes',
    11771170                'settings' => 'active_theme',
  • trunk/src/wp-includes/class-wp-customize-section.php

    r31918 r31968  
    349349                <h2><?php esc_html_e( 'Themes' ); ?>
    350350                    <span class="title-count theme-count"><?php echo count( $this->controls ) - 1; ?></span>
    351                 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
    352                     <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>
    353                 <?php endif; ?>
    354351                </h2>
    355352                <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
Note: See TracChangeset for help on using the changeset viewer.