Reference › WP_Theme_JSON WP_Theme_JSON::schema_in_root_and_per_origin ( array $schema ): array
Since 6.5.0
Source wp-includes/class-wp-theme-json.php:679Parameters Return Source History Return the input schema at the root and per origin.
Parameters
$schemaarray 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, ), 'blocks' => array( 'fontFamily' => null, 'slug' => null, ), 'theme' => array( 'fontFamily' => null, 'slug' => null, ), 'custom' => array( 'fontFamily' => null, 'slug' => null, ), ) Source View on Trac ↗ View on GitHub ↗
679 protected static function schema_in_root_and_per_origin ( $schema ) { 680 $schema_in_root_and_per_origin = $schema ; 681 foreach ( static :: VALID_ORIGINS as $origin ) { 682 $schema_in_root_and_per_origin [ $origin ] = $schema ; 683 } 684 return $schema_in_root_and_per_origin ; 685 } History Introduced in 6.5.0 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/class-wp-theme-json.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.