WP_Customize_Custom_CSS_Setting::__construct() public WP 4.7.0
WP_Customize_Custom_CSS_Setting constructor.
{} Это метод класса: WP_Customize_Custom_CSS_Setting{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WP_Customize_Custom_CSS_Setting = new WP_Customize_Custom_CSS_Setting(); $WP_Customize_Custom_CSS_Setting->__construct( $manager, $id, $args );
- $manager(WP_Customize_Manager) (обязательный)
- Customizer bootstrap instance.
- $id(строка) (обязательный)
- A specific ID of the setting. Can be a theme mod or option name.
- $args(массив)
- Setting arguments.
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Customize_Custom_CSS_Setting::__construct() WP Customize Custom CSS Setting:: construct WP 5.6.2
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];
}