packages/kirki-framework/control-color/src/Field/Color.php
public function filter_control_args( $args, $wp_customize ) {
		if ( $args['settings'] !== $args['settings'] ) {
			return $args;
		}

		$args = parent::filter_control_args( $args, $wp_customize );

		// Set the control-type.
		$args['type'] = 'kirki-color';

		// Make sure choices is an array.
		if ( ! isset( $args['choices'] ) || ! \is_array( $args['choices'] ) ) {
			$args['choices'] = [];
		}

		// Set alpha argument.
		$args['choices']['alpha'] = isset( $args['choices']['alpha'] ) ? (bool) $args['choices']['alpha'] : false;

		// Set mode.
		if ( ! isset( $args['choices']['mode'] ) ) {
			$args['choices']['mode'] = isset( $args['mode'] ) ? $args['mode'] : 'full';
		}

		return $args;
	}
public function filter_control_args( $args, $wp_customize ) {
		if ( $args['settings'] !== $args['settings'] ) {
			return $args;
		}

		$args = parent::filter_control_args( $args, $wp_customize );

		// Set the control-type.
		$args['type'] = 'kirki-color';

		// Make sure choices is an array.
		if ( ! isset( $args['choices'] ) || ! \is_array( $args['choices'] ) ) {
			$args['choices'] = [];
		}

		// Set alpha argument.
		$args['choices']['alpha'] = isset( $args['choices']['alpha'] ) ? (bool) $args['choices']['alpha'] : false;

		// Set mode.
		if ( ! isset( $args['choices']['mode'] ) ) {
			$args['choices']['mode'] = isset( $args['mode'] ) ? $args['mode'] : 'full';
		}

		return $args;
	}
public function filter_control_args ( $ args , $ wp_customize ) { if ( $ args [ 'settings' ] !== $ args [ 'settings' ] ) { return $ args ; } $ args = parent :: filter_control_args ( $ args , $ wp_customize ) ; // Set the control-type. $ args [ 'type' ] = 'kirki-color' ; // Make sure choices is an array. if ( ! isset ( $ args [ 'choices' ] ) || ! \ is_array ( $ args [ 'choices' ] ) ) { $ args [ 'choices' ] = [ ] ; } // Set alpha argument. $ args [ 'choices' ] [ 'alpha' ] = isset ( $ args [ 'choices' ] [ 'alpha' ] ) ? ( bool ) $ args [ 'choices' ] [ 'alpha' ] : false ; // Set mode. if ( ! isset ( $ args [ 'choices' ] [ 'mode' ] ) ) { $ args [ 'choices' ] [ 'mode' ] = isset ( $ args [ 'mode' ] ) ? $ args [ 'mode' ] : 'full' ; } return $ args ; }
Filter arguments before creating the control.

@access public
@since 0.1
@param array                $args         The field arguments.
@param WP_Customize_Manager $wp_customize The customizer instance.
@return array
Filter arguments before creating the control .