inc/customizer/colors.php
public function register_color_setting( WP_Customize_Manager $wp_customize, $name, array $args ) {

		if ( empty( $name ) || empty( $args['default'] ) ) {

			return;

		}

		$name = sanitize_key( $name );

		$wp_customize->add_setting(
			$name,
			array(
				'default'              => sanitize_hex_color_no_hash( $args['default'] ),
				'sanitize_callback'    => ( 'header_textcolor' === $name ) ? array( $wp_customize, '_sanitize_header_textcolor' ) : 'sanitize_hex_color_no_hash',
				'sanitize_js_callback' => 'maybe_hash_hex_color',
				'transport'            => 'postMessage',
			)
		);

		$wp_customize->add_control(
			new WP_Customize_Color_Control(
				$wp_customize,
				$name,
				array(
					'label'           => ! empty( $args['label'] ) ? $args['label'] : $name,
					'description'     => ! empty( $args['description'] ) ? $args['description'] : null,
					'section'         => ! empty( $args['section'] ) ? $args['section'] : 'colors-content',
					'priority'        => ! empty( $args['priority'] ) ? absint( $args['priority'] ) : null,
					'active_callback' => ! empty( $args['active_callback'] ) ? $args['active_callback'] : null,
				)
			)
		);

	}
public function register_color_setting( WP_Customize_Manager $wp_customize, $name, array $args ) {

		if ( empty( $name ) || empty( $args['default'] ) ) {

			return;

		}

		$name = sanitize_key( $name );

		$wp_customize->add_setting(
			$name,
			array(
				'default'              => sanitize_hex_color_no_hash( $args['default'] ),
				'sanitize_callback'    => ( 'header_textcolor' === $name ) ? array( $wp_customize, '_sanitize_header_textcolor' ) : 'sanitize_hex_color_no_hash',
				'sanitize_js_callback' => 'maybe_hash_hex_color',
				'transport'            => 'postMessage',
			)
		);

		$wp_customize->add_control(
			new WP_Customize_Color_Control(
				$wp_customize,
				$name,
				array(
					'label'           => ! empty( $args['label'] ) ? $args['label'] : $name,
					'description'     => ! empty( $args['description'] ) ? $args['description'] : null,
					'section'         => ! empty( $args['section'] ) ? $args['section'] : 'colors-content',
					'priority'        => ! empty( $args['priority'] ) ? absint( $args['priority'] ) : null,
					'active_callback' => ! empty( $args['active_callback'] ) ? $args['active_callback'] : null,
				)
			)
		);

	}
public function register_color_setting ( WP_Customize_Manager $ wp_customize , $ name , array $ args ) { if ( empty ( $ name ) || empty ( $ args [ 'default' ] ) ) { return ; } $ name = sanitize_key ( $ name ) ; $ wp_customize -> add_setting ( $ name , array ( 'default' => sanitize_hex_color_no_hash ( $ args [ 'default' ] ) , 'sanitize_callback' => ( 'header_textcolor' === $ name ) ? array ( $ wp_customize , '_sanitize_header_textcolor' ) : 'sanitize_hex_color_no_hash' , 'sanitize_js_callback' => 'maybe_hash_hex_color' , 'transport' => 'postMessage' , ) ) ; $ wp_customize -> add_control ( new WP_Customize_Color_Control ( $ wp_customize , $ name , array ( 'label' => ! empty ( $ args [ 'label' ] ) ? $ args [ 'label' ] : $ name , 'description' => ! empty ( $ args [ 'description' ] ) ? $ args [ 'description' ] : null , 'section' => ! empty ( $ args [ 'section' ] ) ? $ args [ 'section' ] : 'colors-content' , 'priority' => ! empty ( $ args [ 'priority' ] ) ? absint ( $ args [ 'priority' ] ) : null , 'active_callback' => ! empty ( $ args [ 'active_callback' ] ) ? $ args [ 'active_callback' ] : null , ) ) ) ; }
Register a custom color setting.

@since 1.0.0
@see   $this->colors()

@param WP_Customize_Manager $wp_customize
@param string               $name
@param array                $args
Register a custom color setting .