GC_Customize_Custom_CSS_Setting::__construct()
最后更新于:2021-11-27 00:13:48
GC_Customize_Custom_CSS_Setting::__construct( GC_Customize_Manager$manager, string$id, array$args=array())GC_Customize_Custom_CSS_Setting constructor.
参数
- $manager
-
(GC_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) (Optional) Setting arguments.
Default value: array()
源文件
文件: gc-includes/customize/class-gc-customize-custom-css-setting.php
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];
}