[ 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: 139 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Style_Engine_CSS_Rule:: (6 methods):
  __construct()
  set_selector()
  add_declarations()
  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,

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.

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 : Fri Apr 19 08:20:01 2024 Cross-referenced by PHPXref