WP_Style_Engine::store_css_rule() – Stores a CSS rule using the provided CSS selector and CSS declarations.

You appear to be a bot. Output may be restricted

Description

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

Usage

$void. = WP_Style_Engine::store_css_rule( $store_name, $css_selector, $css_declarations );

Parameters

$store_name
( string ) required – A valid store key.
$css_selector
( string ) required – 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[] ) required – An associative array of CSS definitions, e.g., array( "$property" => "$value", "$property" => "$value" ).

Returns

void.

Source

File name: wordpress/wp-includes/style-engine/class-wp-style-engine.php


Lines:

1 to 7 of 7
  public static function store_css_rule( $store_name, $css_selector, $css_declarations ) {
    if ( empty( $store_name ) || empty( $css_selector ) || empty( $css_declarations ) ) {
      return;
    }
    static::get_store( $store_name )->add_rule( $css_selector )->add_declarations( $css_declarations );
  }
 

 View on GitHub View on Trac