wp-includes/style-engine/class-wp-style-engine-css-declarations.php:54Adds a single declaration.
$propertystring$valuestringWP_Style_Engine_CSS_Declarations public function add_declaration( $property, $value ) { // Sanitizes the property. $property = $this->sanitize_property( $property ); // Bails early if the property is empty. if ( empty( $property ) ) { return $this; } // Bail early if value is not a string. Prevents fatal errors from malformed block markup. if ( ! is_string( $value ) ) { return $this; } // Trims the value. If empty, bail early. $value = trim( $value ); if ( '' === $value ) { return $this; } // Adds the declaration property/value pair. $this->declarations[ $property ] = $value; return $this; }Introduced in 6.1.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$options added.verified against sourcesrc/wp-includes/style-engine/class-wp-style-engine-css-declarations.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.