[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Style Engine: WP_Style_Engine_CSS_Declarations class
File Size: | 187 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Style_Engine_CSS_Declarations:: (9 methods):
__construct()
add_declaration()
remove_declaration()
add_declarations()
remove_declarations()
get_declarations()
filter_declaration()
get_declarations_string()
sanitize_property()
Class: WP_Style_Engine_CSS_Declarations - X-Ref
Core class used for style engine CSS declarations.__construct( $declarations = array() X-Ref |
Constructor for this object. If a `$declarations` array is passed, it will be used to populate the initial `$declarations` prop of the object by calling add_declarations(). param: string[] $declarations Optional. An associative array of CSS definitions, |
add_declaration( $property, $value ) X-Ref |
Adds a single declaration. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. param: string $property The CSS property. param: string $value The CSS value. |
remove_declaration( $property ) X-Ref |
Removes a single declaration. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. param: string $property The CSS property. |
add_declarations( $declarations ) X-Ref |
Adds multiple declarations. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. param: string[] $declarations An array of declarations. |
remove_declarations( $properties = array() X-Ref |
Removes multiple declarations. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. param: string[] $properties Optional. An array of properties. Default empty array. |
get_declarations() X-Ref |
Gets the declarations array. return: string[] The declarations array. |
filter_declaration( $property, $value, $spacer = '' ) X-Ref |
Filters a CSS property + value pair. return: string The filtered declaration or an empty string. param: string $property The CSS property. param: string $value The value to be filtered. param: string $spacer Optional. The spacer between the colon and the value. |
get_declarations_string( $should_prettify = false, $indent_count = 0 ) X-Ref |
Filters and compiles the CSS declarations. return: string The CSS declarations. 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. |
sanitize_property( $property ) X-Ref |
Sanitizes property names. return: string The sanitized property name. param: string $property The CSS property. |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |