WP_Style_Engine_CSS_Rule::__construct()publicWP 6.1.0

Constructor.

Метод класса: WP_Style_Engine_CSS_Rule{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Style_Engine_CSS_Rule = new WP_Style_Engine_CSS_Rule();
$WP_Style_Engine_CSS_Rule->__construct( $selector, $declarations, $rules_group );
$selector(строка)
The CSS selector.
По умолчанию: empty string
$declarations(string[]|WP_Style_Engine_CSS_Declarations)
An associative array of CSS definitions, e.g. array( "$property" => "$value", "$property" => "$value" ), or a WP_Style_Engine_CSS_Declarations object.
По умолчанию: empty array
$rules_group(строка)
A parent CSS selector in the case of nested CSS, or a CSS nested @rule, such as @media (min-width: 80rem) or @layer module.
По умолчанию: ''

Список изменений

С версии 6.1.0 Введена.
С версии 6.6.0 Added the $rules_group parameter.

Код WP_Style_Engine_CSS_Rule::__construct() WP 6.7.1

public function __construct( $selector = '', $declarations = array(), $rules_group = '' ) {
	$this->set_selector( $selector );
	$this->add_declarations( $declarations );
	$this->set_rules_group( $rules_group );
}