W3cubDocs

/WordPress

WP_Theme_JSON::maybe_opt_in_into_settings( array $theme_json ): array

Enables some opt-in settings if theme declared support.

Parameters

$theme_jsonarrayrequired
A theme.json structure to modify.

Return

array The modified theme.json structure.

Source

*
* @param array $schema The base schema.
* @return array The schema at the root and per origin.
*
* Example:
* schema_in_root_and_per_origin(
*   array(
*    'fontFamily' => null,
*    'slug' => null,
*   )
* )
*
* Returns:
* array(
*  'fontFamily' => null,
*  'slug' => null,
*  'default' => array(
*    'fontFamily' => null,
*    'slug' => null,
*  ),

Changelog

Version Description
5.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme_json/maybe_opt_in_into_settings