inc/customizer/colors.php
public function color_scheme( WP_Customize_Manager $wp_customize ) {

		if ( count( $this->color_schemes ) < 2 ) {

			return;

		}

		$wp_customize->add_setting(
			'color_scheme',
			array(
				'default'           => 'default',
				'sanitize_callback' => array( $this, 'sanitize_color_scheme' ),
				'transport'         => 'postMessage',
			)
		);

		$choices = array_combine(
			array_keys( $this->color_schemes ),
			wp_list_pluck( $this->color_schemes, 'label' )
		);

		$wp_customize->add_control(
			'color_scheme',
			array(
				'label'    => esc_html__( 'Base Color Scheme', 'rock' ),
				'section'  => 'colors-scheme',
				'type'     => 'select',
				'choices'  => $choices,
				'priority' => 1,
			)
		);

	}
public function color_scheme( WP_Customize_Manager $wp_customize ) {

		if ( count( $this->color_schemes ) < 2 ) {

			return;

		}

		$wp_customize->add_setting(
			'color_scheme',
			array(
				'default'           => 'default',
				'sanitize_callback' => array( $this, 'sanitize_color_scheme' ),
				'transport'         => 'postMessage',
			)
		);

		$choices = array_combine(
			array_keys( $this->color_schemes ),
			wp_list_pluck( $this->color_schemes, 'label' )
		);

		$wp_customize->add_control(
			'color_scheme',
			array(
				'label'    => esc_html__( 'Base Color Scheme', 'rock' ),
				'section'  => 'colors-scheme',
				'type'     => 'select',
				'choices'  => $choices,
				'priority' => 1,
			)
		);

	}
public function color_scheme ( WP_Customize_Manager $ wp_customize ) { if ( count ( $ this -> color_schemes ) < 2 ) { return ; } $ wp_customize -> add_setting ( 'color_scheme' , array ( 'default' => 'default' , 'sanitize_callback' => array ( $ this , 'sanitize_color_scheme' ) , 'transport' => 'postMessage' , ) ) ; $ choices = array_combine ( array_keys ( $ this -> color_schemes ) , wp_list_pluck ( $ this -> color_schemes , 'label' ) ) ; $ wp_customize -> add_control ( 'color_scheme' , array ( 'label' => esc_html__ ( 'Base Color Scheme' , 'rock' ) , 'section' => 'colors-scheme' , 'type' => 'select' , 'choices' => $ choices , 'priority' => 1 , ) ) ; }
Register a color scheme setting.

@action customize_register
@since  1.0.0

@param WP_Customize_Manager $wp_customize
Register a color scheme setting .