WP_Theme_JSON_Data::update_with
Updates the theme.json with the the given data.
Method of the class: WP_Theme_JSON_Data{}
No Hooks.
Returns
WP_Theme_JSON_Data
. The own instance with access to the modified data.
Usage
$WP_Theme_JSON_Data = new WP_Theme_JSON_Data(); $WP_Theme_JSON_Data->update_with( $new_data );
- $new_data(array) (required)
- Array following the theme.json specification.
Changelog
Since 6.1.0 | Introduced. |
WP_Theme_JSON_Data::update_with() WP Theme JSON Data::update with code WP 6.8.1
public function update_with( $new_data ) { $this->theme_json->merge( new WP_Theme_JSON( $new_data, $this->origin ) ); return $this; }