WP_Theme_JSON_Resolver::get_merged_data( array $settings = array() )

There are different sources of data for a site: core and theme.

Description Description

While the getters get_core_data, get_theme_data return the raw data from the respective origins, this method merges them all together.

If the same piece of data is declared in different origins (core and theme), the last origin overrides the previous. For example, if core disables custom colors but a theme enables them, the theme config wins.

Top ↑

Parameters Parameters


(array) (Optional) Existing block editor settings.

Default value: array()

Top ↑

Return Return


Top ↑

Source Source

File: wp-includes/class-wp-theme-json-resolver.php

	public static function get_merged_data( $settings = array() ) {
		$theme_support_data = WP_Theme_JSON::get_from_editor_settings( $settings );

		$result = new WP_Theme_JSON();
		$result->merge( self::get_core_data() );
		$result->merge( self::get_theme_data( $theme_support_data ) );

		return $result;

Top ↑

Changelog Changelog

Version Description
5.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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