WP_Style_Engine::store_css_rule()public staticWP 6.1.0

Stores a CSS rule using the provided CSS selector and CSS declarations.

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

Хуков нет.


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


$result = WP_Style_Engine::store_css_rule( $store_name, $css_selector, $css_declarations );
$store_name(строка) (обязательный)
A valid store key.
$css_selector(строка) (обязательный)
When a selector is passed, the function will return a full CSS rule $selector { ...rules } otherwise a concatenated string of properties and values.
$css_declarations(string[]) (обязательный)
An associative array of CSS definitions, e.g. array( "$property" => "$value", "$property" => "$value" ).

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

С версии 6.1.0 Введена.

Код WP_Style_Engine::store_css_rule() WP 6.4.1

public static function store_css_rule( $store_name, $css_selector, $css_declarations ) {
	if ( empty( $store_name ) || empty( $css_selector ) || empty( $css_declarations ) ) {
	static::get_store( $store_name )->add_rule( $css_selector )->add_declarations( $css_declarations );