WP_Theme_JSON_Data::update_with( array $new_data ): WP_Theme_JSON_Data

Updates the theme.json with the the given data.


Parameters

$new_data array Required
Array following the theme.json specification.

Top ↑

Return

WP_Theme_JSON_Data The own instance with access to the modified data.


Top ↑

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;
}


Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.