[ 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.

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

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

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

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

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

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.

return: string
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.



Generated : Sun Dec 22 08:20:01 2024 Cross-referenced by PHPXref