On this page
WP_Customize_Custom_CSS_Setting::__construct( WP_Customize_Manager $manager, string $id, array $args = array() )
WP_Customize_Custom_CSS_Setting constructor.
Parameters
$managerWP_Customize_Manager Required-
Customizer bootstrap instance.
$idstring Required-
A specific ID of the setting.
Can be a theme mod or option name. $argsarray Optional-
Setting arguments.
Default:
array()
Source
File: wp-includes/customize/class-wp-customize-custom-css-setting.php. View all references
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];
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Customize_Setting::__construct() wp-includes/class-wp-customize-setting.php | Constructor. |
Used By
| Used By | Description |
|---|---|
| WP_Customize_Manager::register_controls() wp-includes/class-wp-customize-manager.php | Registers some default controls. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_custom_css_setting/__construct