WP_Style_Engine_CSS_Rule::__construct( string $selector = '', string[]|WP_Style_Engine_CSS_Declarations $declarations = array() )

Constructor.


Parameters

$selector string Optional
The CSS selector.

Default: ''

$declarations string[]|WP_Style_Engine_CSS_Declarations Optional
An associative array of CSS definitions, e.g. array( "$property" => "$value", "$property" => "$value" ), or a WP_Style_Engine_CSS_Declarations object.

Default: array()


Top ↑

Source

File: wp-includes/style-engine/class-wp-style-engine-css-rule.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.