WP_Theme_JSON::remove_keys_not_in_schema( array $tree, array $schema ): array

In this article

Given a tree, removes the keys that are not present in the schema.

Description

It is recursive and modifies the input in-place.

Parameters

$treearrayrequired
Input to process.
$schemaarrayrequired
Schema to adhere to.

Return

array The modified $tree.

Source

	}
	return implode( ',', $new_selectors );
}

/**
 * Returns the metadata for each block.
 *
 * Example:
 *
 *     {
 *       'core/paragraph': {
 *         'selector': 'p',
 *         'elements': {
 *           'link' => 'link selector',
 *           'etc'  => 'element selector'
 *         }
 *       },
 *       'core/heading': {
 *         'selector': 'h1',
 *         'elements': {}
 *       },

Changelog

VersionDescription
5.8.0Introduced.

User Contributed Notes

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