packages/kirki-framework/module-css/src/Generator.php
public static function css( $field ) {

		// Set class vars.
		self::$settings   = $field['settings'];
		self::$callback   = isset( $field['sanitize_callback'] ) ? $field['sanitize_callback'] : '';
		self::$field_type = $field['type'];
		self::$field_type = ( isset( $field['choices'] ) && isset( $field['choices']['parent_type'] ) ) ? $field['choices']['parent_type'] : self::$field_type;
		self::$output     = $field['output'];

		if ( ! is_array( self::$output ) ) {
			self::$output = [
				[
					'element'           => self::$output,
					'sanitize_callback' => null,
				],
			];
		}

		// Get the value of this field.
		self::$value = Values::get_sanitized_field_value( $field );

		// Find the class that will handle the outpout for this field.
		$classname            = '\Kirki\Modules\CSS\Output';
		$default_classnames   = [
			'kirki-background' => '\Kirki\Modules\CSS\Field\Background',
			'kirki-dimensions' => '\Kirki\Modules\CSS\Field\Dimensions',
			'kirki-image'      => '\Kirki\Modules\CSS\Field\Image',
			'kirki-typography' => '\Kirki\Modules\CSS\Field\Typography',
			'kirki-multicolor' => '\Kirki\Modules\CSS\Field\Multicolor',
		];
		$field_output_classes = apply_filters( 'kirki_output_control_classnames', $default_classnames );
		$field_output_classes = apply_filters( "kirki_{$field['kirki_config']}_output_control_classnames", $field_output_classes );
		if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
			$classname = $field_output_classes[ self::$field_type ];
		}
		$obj = new $classname( $field['kirki_config'], self::$output, self::$value, $field );
		return $obj->get_styles();
	}
public static function css( $field ) {

		// Set class vars.
		self::$settings   = $field['settings'];
		self::$callback   = isset( $field['sanitize_callback'] ) ? $field['sanitize_callback'] : '';
		self::$field_type = $field['type'];
		self::$field_type = ( isset( $field['choices'] ) && isset( $field['choices']['parent_type'] ) ) ? $field['choices']['parent_type'] : self::$field_type;
		self::$output     = $field['output'];

		if ( ! is_array( self::$output ) ) {
			self::$output = [
				[
					'element'           => self::$output,
					'sanitize_callback' => null,
				],
			];
		}

		// Get the value of this field.
		self::$value = Values::get_sanitized_field_value( $field );

		// Find the class that will handle the outpout for this field.
		$classname            = '\Kirki\Modules\CSS\Output';
		$default_classnames   = [
			'kirki-background' => '\Kirki\Modules\CSS\Field\Background',
			'kirki-dimensions' => '\Kirki\Modules\CSS\Field\Dimensions',
			'kirki-image'      => '\Kirki\Modules\CSS\Field\Image',
			'kirki-typography' => '\Kirki\Modules\CSS\Field\Typography',
			'kirki-multicolor' => '\Kirki\Modules\CSS\Field\Multicolor',
		];
		$field_output_classes = apply_filters( 'kirki_output_control_classnames', $default_classnames );
		$field_output_classes = apply_filters( "kirki_{$field['kirki_config']}_output_control_classnames", $field_output_classes );
		if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
			$classname = $field_output_classes[ self::$field_type ];
		}
		$obj = new $classname( $field['kirki_config'], self::$output, self::$value, $field );
		return $obj->get_styles();
	}
public static function css ( $ field ) { // Set class vars. self :: $ settings = $ field [ 'settings' ] ; self :: $ callback = isset ( $ field [ 'sanitize_callback' ] ) ? $ field [ 'sanitize_callback' ] : '' ; self :: $ field_type = $ field [ 'type' ] ; self :: $ field_type = ( isset ( $ field [ 'choices' ] ) && isset ( $ field [ 'choices' ] [ 'parent_type' ] ) ) ? $ field [ 'choices' ] [ 'parent_type' ] : self :: $ field_type ; self :: $ output = $ field [ 'output' ] ; if ( ! is_array ( self :: $ output ) ) { self :: $ output = [ [ 'element' => self :: $ output , 'sanitize_callback' => null , ] , ] ; } // Get the value of this field. self :: $ value = Values :: get_sanitized_field_value ( $ field ) ; // Find the class that will handle the outpout for this field. $ classname = '\Kirki\Modules\CSS\Output' ; $ default_classnames = [ 'kirki-background' => '\Kirki\Modules\CSS\Field\Background' , 'kirki-dimensions' => '\Kirki\Modules\CSS\Field\Dimensions' , 'kirki-image' => '\Kirki\Modules\CSS\Field\Image' , 'kirki-typography' => '\Kirki\Modules\CSS\Field\Typography' , 'kirki-multicolor' => '\Kirki\Modules\CSS\Field\Multicolor' , ] ; $ field_output_classes = apply_filters ( 'kirki_output_control_classnames' , $ default_classnames ) ; $ field_output_classes = apply_filters ( "kirki_{$field['kirki_config']}_output_control_classnames" , $ field_output_classes ) ; if ( array_key_exists ( self :: $ field_type , $ field_output_classes ) ) { $ classname = $ field_output_classes [ self :: $ field_type ] ; } $ obj = new $ classname ( $ field [ 'kirki_config' ] , self :: $ output , self :: $ value , $ field ) ; return $ obj -> get_styles ( ) ; }
Get the CSS for a field.

@static
@access public
@param array $field The field.
@return array
Get the CSS for a field .