[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/style-engine/ -> class-wp-style-engine-css-rule.php (summary)

Style Engine: WP_Style_Engine_CSS_Rule class

File Size: 189 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Style_Engine_CSS_Rule:: (8 methods):
  __construct()
  set_selector()
  add_declarations()
  set_rules_group()
  get_rules_group()
  get_declarations()
  get_selector()
  get_css()


Class: WP_Style_Engine_CSS_Rule  - X-Ref

Core class used for style engine CSS rules.

Holds, sanitizes, processes, and prints CSS declarations for the style engine.

__construct( $selector = '', $declarations = array()   X-Ref
Constructor.

param: string                                    $selector     Optional. The CSS selector. Default empty string.
param: string[]|WP_Style_Engine_CSS_Declarations $declarations Optional. An associative array of CSS definitions,
param: string                                    $rules_group  A parent CSS selector in the case of nested CSS, or a CSS nested @rule,

set_selector( $selector )   X-Ref
Sets the selector.

param: string $selector The CSS selector.
return: WP_Style_Engine_CSS_Rule Returns the object to allow chaining of methods.

add_declarations( $declarations )   X-Ref
Sets the declarations.

param: string[]|WP_Style_Engine_CSS_Declarations $declarations An array of declarations (property => value pairs),
return: WP_Style_Engine_CSS_Rule Returns the object to allow chaining of methods.

set_rules_group( $rules_group )   X-Ref
Sets the rules group.

param: string $rules_group A parent CSS selector in the case of nested CSS, or a CSS nested @rule,
return: WP_Style_Engine_CSS_Rule Returns the object to allow chaining of methods.

get_rules_group()   X-Ref
Gets the rules group.

return: string

get_declarations()   X-Ref
Gets the declarations object.

return: WP_Style_Engine_CSS_Declarations The declarations object.

get_selector()   X-Ref
Gets the full selector.

return: string

get_css( $should_prettify = false, $indent_count = 0 )   X-Ref
Gets the CSS.

param: bool $should_prettify Optional. Whether to add spacing, new lines and indents.
param: int  $indent_count    Optional. The number of tab indents to apply to the rule.
return: string



Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref