On this page
WP_Theme_JSON_Data::update_with( array $new_data ): WP_Theme_JSON_Data
Updates the theme.json with the the given data.
Parameters
$new_dataarray Required-
Array following the theme.json specification.
Return
WP_Theme_JSON_Data The own instance with access to the modified data.
Source
File: wp-includes/class-wp-theme-json-data.php. View all references
public function update_with( $new_data ) {
$this->theme_json->merge( new WP_Theme_JSON( $new_data, $this->origin ) );
return $this;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Theme_JSON::__construct() wp-includes/class-wp-theme-json.php | Constructor. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme_json_data/update_with