Automattic\WooCommerce\EmailEditor\Integrations\Core
Initializer::adjust_theme_json
Adjusts the editor's theme to add blocks specific settings for core blocks.
Метод класса: Initializer{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Initializer = new Initializer(); $Initializer->adjust_theme_json( $editor_theme_json ): \WP_Theme_JSON;
- $editor_theme_json(WP_Theme_JSON) (обязательный)
- Editor theme JSON.
Код Initializer::adjust_theme_json() Initializer::adjust theme json WC 10.0.2
public function adjust_theme_json( \WP_Theme_JSON $editor_theme_json ): \WP_Theme_JSON { $theme_json = (string) file_get_contents( __DIR__ . '/theme.json' ); $theme_json = json_decode( $theme_json, true ); /** * Loaded theme json. * * @var array $theme_json */ $editor_theme_json->merge( new \WP_Theme_JSON( $theme_json, 'default' ) ); return $editor_theme_json; }