WP_Style_Engine_CSS_Rule::__construct()publicWP 6.1.0

Constructor.

Method of the class: WP_Style_Engine_CSS_Rule{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Style_Engine_CSS_Rule = new WP_Style_Engine_CSS_Rule();
$WP_Style_Engine_CSS_Rule->__construct( $selector, $declarations );
$selector(string)
The CSS selector.
Default: 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.
Default: empty array

Changelog

Since 6.1.0 Introduced.

WP_Style_Engine_CSS_Rule::__construct() code WP 6.5.4

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