Make WordPress Core


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

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.

File:
1 edited

Legend:

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

    r31968 r31975  
    11491149
    11501150        $this->add_section( new WP_Customize_Themes_Section( $this, 'themes', array(
    1151             'title' => sprintf( __( 'Theme: %s' ), $this->theme()->display('Name') ),
     1151            'title'      => $this->theme()->display( 'Name' ),
    11521152            'capability' => 'switch_themes',
    1153             'priority' => 0,
     1153            'priority'   => 0,
    11541154        ) ) );
    11551155
     
    11641164        $themes = wp_prepare_themes_for_js();
    11651165        foreach ( $themes as $theme ) {
     1166            if ( $theme['active'] ) {
     1167                continue;
     1168            }
     1169
    11661170            $theme_id = 'theme_' . $theme['id'];
    11671171            $this->add_control( new WP_Customize_Theme_Control( $this, $theme_id, array(
    1168                 'theme' => $theme,
    1169                 'section' => 'themes',
     1172                'theme'    => $theme,
     1173                'section'  => 'themes',
    11701174                'settings' => 'active_theme',
    11711175            ) ) );
Note: See TracChangeset for help on using the changeset viewer.