diff --git a/wp-content/themes/twentyfifteen/inc/customizer.php b/wp-content/themes/twentyfifteen/inc/customizer.php index a4a5e91c4f..08b2d73c94 100644 --- a/wp-content/themes/twentyfifteen/inc/customizer.php +++ b/wp-content/themes/twentyfifteen/inc/customizer.php @@ -27,12 +27,13 @@ function twentyfifteen_customize_register( $wp_customize ) { 'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme', ) ); - $wp_customize->add_control( new Twentyfifteen_Customize_Color_Scheme_Control( $wp_customize, 'color_scheme', array( + $wp_customize->add_control( 'color_scheme', array( 'label' => esc_html__( 'Color Scheme', 'twentyfifteen' ), 'section' => 'colors', + 'type' => 'select', 'choices' => twentyfifteen_get_color_scheme_choices(), 'priority' => 1, - ) ) ); + ) ); // Add custom sidebar text color setting and control. $wp_customize->add_setting( 'sidebar_textcolor', array( @@ -58,46 +59,6 @@ function twentyfifteen_customize_register( $wp_customize ) { } add_action( 'customize_register', 'twentyfifteen_customize_register', 11 ); -/** - * Custom control for Color Schemes - * - * @since Twenty Fifteen 1.0 - */ -function twentyfifteen_customize_color_scheme_control() { - class Twentyfifteen_Customize_Color_Scheme_Control extends WP_Customize_Control { - public $type = 'colorScheme'; - - function enqueue() { - wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls' ), '', true ); - wp_localize_script( 'color-scheme-control', 'colorScheme', twentyfifteen_get_color_schemes() ); - } - - public function render_content() { - if ( empty( $this->choices ) ) - return; - - ?> - -