Return the input schema at the root and per origin.
$schemaarrayrequiredThe base schema.
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, ), )
protected static function schema_in_root_and_per_origin( $schema ) {
$schema_in_root_and_per_origin = $schema;
foreach ( static::VALID_ORIGINS as $origin ) {
$schema_in_root_and_per_origin[ $origin ] = $schema;
}
return $schema_in_root_and_per_origin;
}
View all references View on Trac View on GitHub
| Version | Description |
|---|
| 6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.