WP_Customize_Custom_CSS_Setting::__construct( WP_Customize_Manager $manager, string $id, array $args = array() )

In this article

WP_Customize_Custom_CSS_Setting constructor.

Parameters

$managerWP_Customize_Managerrequired
Customizer bootstrap instance.
$idstringrequired
A specific ID of the setting.
Can be a theme mod or option name.
$argsarrayoptional
Setting arguments.

Default:array()

Source

public function __construct( $manager, $id, $args = array() ) {
	parent::__construct( $manager, $id, $args );
	if ( 'custom_css' !== $this->id_data['base'] ) {
		throw new Exception( 'Expected custom_css id_base.' );
	}
	if ( 1 !== count( $this->id_data['keys'] ) || empty( $this->id_data['keys'][0] ) ) {
		throw new Exception( 'Expected single stylesheet key.' );
	}
	$this->stylesheet = $this->id_data['keys'][0];
}

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.