WP_Theme_JSON::schema_in_root_and_per_origin
Return the input schema at the root and per origin.
Метод класса: WP_Theme_JSON{}
Хуков нет.
Возвращает
Массив. 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,
), )
Использование
$result = WP_Theme_JSON::schema_in_root_and_per_origin( $schema );
- $schema(массив) (обязательный)
- The base schema.
Список изменений
| С версии 6.5.0 | Введена. |
Код WP_Theme_JSON::schema_in_root_and_per_origin() WP Theme JSON::schema in root and per origin WP 7.0
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;
}