WP_Theme_JSON::do_opt_in_into_settings
Enables some settings.
Метод класса: WP_Theme_JSON{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WP_Theme_JSON::do_opt_in_into_settings( $context );
- $context(массив) (обязательный) (передается по ссылке — &)
- The context to which the settings belong.
Список изменений
| С версии 5.9.0 | Введена. |
Код WP_Theme_JSON::do_opt_in_into_settings() WP Theme JSON::do opt in into settings WP 7.0
protected static function do_opt_in_into_settings( &$context ) {
foreach ( static::APPEARANCE_TOOLS_OPT_INS as $path ) {
/*
* Use "unset prop" as a marker instead of "null" because
* "null" can be a valid value for some props (e.g. blockGap).
*/
if ( 'unset prop' === _wp_array_get( $context, $path, 'unset prop' ) ) {
_wp_array_set( $context, $path, true );
}
}
unset( $context['appearanceTools'] );
}