Fix compatibility with gutenberg plugin

This commit is contained in:
Mike Jolley
2024-05-16 15:31:01 +01:00
committed by Rostislav Wolný
parent ea988f0850
commit e6f9564ef0
2 changed files with 6 additions and 3 deletions

View File

@@ -59,6 +59,10 @@ class ThemeController {
return $emailEditorThemeSettings;
}
public function getStylesheetFromContext($context, $options = []): string {
return function_exists('gutenberg_style_engine_get_stylesheet_from_context') ? gutenberg_style_engine_get_stylesheet_from_context($context, $options) : wp_style_engine_get_stylesheet_from_context($context, $options);
}
public function getStylesheetForRendering($post = null): string {
$emailThemeSettings = $this->getSettings();