MailPoet\EmailEditor\Integrations\Core
Initializer::adjust_theme_json()
Adjusts the editor's theme to add blocks specific settings for core blocks.
Method of the class: Initializer{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Initializer = new Initializer(); $Initializer->adjust_theme_json( $editor_theme_json ): \WP_Theme_JSON;
- $editor_theme_json(\WP_Theme_JSON) (required)
- Editor theme JSON.
Initializer::adjust_theme_json() Initializer::adjust theme json code WC 9.8.1
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; }