WP_Customize_Custom_CSS_Setting::__construct
WP_Customize_Custom_CSS_Setting constructor.
Method of the class: WP_Customize_Custom_CSS_Setting{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_Customize_Custom_CSS_Setting = new WP_Customize_Custom_CSS_Setting(); $WP_Customize_Custom_CSS_Setting->__construct( $manager, $id, $args );
- $manager(WP_Customize_Manager) (required)
- Customizer bootstrap instance.
- $id(string) (required)
- A specific ID of the setting. Can be a theme mod or option name.
- $args(array)
- Setting arguments.
Default:array()
Changelog
| Since 4.7.0 | Introduced. |
WP_Customize_Custom_CSS_Setting::__construct() WP Customize Custom CSS Setting:: construct code WP 7.0
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];
}