mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Customizer Theme Switcher: Navigation streamlining.
* Detach Themes section from other controls * Move to buttons to navigate back and forth * Change titles based on current theme status, active/previewing * Hide the active/previewing theme from the list of available themes props folletto for the design concepts. props designsimply, celloexpressions for initial patches. props Team Gandalf. see #31289. git-svn-id: https://develop.svn.wordpress.org/trunk@31975 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1148,9 +1148,9 @@ final class WP_Customize_Manager {
|
||||
/* Themes */
|
||||
|
||||
$this->add_section( new WP_Customize_Themes_Section( $this, 'themes', array(
|
||||
'title' => sprintf( __( 'Theme: %s' ), $this->theme()->display('Name') ),
|
||||
'title' => $this->theme()->display( 'Name' ),
|
||||
'capability' => 'switch_themes',
|
||||
'priority' => 0,
|
||||
'priority' => 0,
|
||||
) ) );
|
||||
|
||||
// Themes Setting (unused - the theme is considerably more fundamental to the Customizer experience).
|
||||
@@ -1163,10 +1163,14 @@ final class WP_Customize_Manager {
|
||||
// Theme Controls.
|
||||
$themes = wp_prepare_themes_for_js();
|
||||
foreach ( $themes as $theme ) {
|
||||
if ( $theme['active'] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$theme_id = 'theme_' . $theme['id'];
|
||||
$this->add_control( new WP_Customize_Theme_Control( $this, $theme_id, array(
|
||||
'theme' => $theme,
|
||||
'section' => 'themes',
|
||||
'theme' => $theme,
|
||||
'section' => 'themes',
|
||||
'settings' => 'active_theme',
|
||||
) ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user