Ticket #31837: 31837.patch
File 31837.patch, 2.4 KB (added by , 6 years ago) |
---|
-
src/wp-includes/class-wp-customize-control.php
1235 1235 } 1236 1236 1237 1237 /** 1238 * Customize New Theme Control class.1239 *1240 * @since 4.2.01241 *1242 * @see WP_Customize_Control1243 */1244 class WP_Customize_New_Theme_Control extends WP_Customize_Control {1245 1246 /**1247 * Render the control content.1248 *1249 * @since 4.2.01250 */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 <?php1262 }1263 }1264 1265 /**1266 1238 * Widget Area Customize Control class. 1267 1239 * 1268 1240 * @since 3.9.0 -
src/wp-includes/class-wp-customize-manager.php
1171 1171 ) ) ); 1172 1172 } 1173 1173 1174 if ( ! is_multisite() && current_user_can( 'install_themes' ) ) {1175 $this->add_control( new WP_Customize_New_Theme_Control( $this, 'add_theme', array(1176 'section' => 'themes',1177 'settings' => 'active_theme',1178 ) ) );1179 }1180 1181 1174 /* Site Title & Tagline */ 1182 1175 1183 1176 $this->add_section( 'title_tagline', array( -
src/wp-includes/class-wp-customize-section.php
348 348 <div class="customize-themes-panel control-panel-content themes-php"> 349 349 <h2><?php esc_html_e( 'Themes' ); ?> 350 350 <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; ?>354 351 </h2> 355 352 <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div> 356 353 <div id="customize-container"></div>