WP_Customize_Custom_CSS_Setting::__construct()
WP_Customize_Custom_CSS_Setting constructor.
Метод класса: WP_Customize_Custom_CSS_Setting{}
Хуков нет.
Возвращает
null
. Ничего (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.
По умолчанию: array()
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Customize_Custom_CSS_Setting::__construct() WP Customize Custom CSS Setting:: construct WP 6.5.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]; }