[ 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. param: string $property The CSS property. param: string $value The CSS value. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. |
remove_declaration( $property ) X-Ref |
Removes a single declaration. param: string $property The CSS property. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. |
add_declarations( $declarations ) X-Ref |
Adds multiple declarations. param: string[] $declarations An array of declarations. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. |
remove_declarations( $properties = array() X-Ref |
Removes multiple declarations. param: string[] $properties Optional. An array of properties. Default empty array. return: WP_Style_Engine_CSS_Declarations Returns the object to allow chaining methods. |
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. 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. return: string The filtered declaration or an empty string. |
get_declarations_string( $should_prettify = false, $indent_count = 0 ) X-Ref |
Filters and compiles 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. return: string The CSS declarations. |
sanitize_property( $property ) X-Ref |
Sanitizes property names. param: string $property The CSS property. return: string The sanitized property name. |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |