Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer
Rendering_Context::get_theme_styles
Get the email theme styles.
Метод класса: Rendering_Context{}
Хуков нет.
Возвращает
Массив{ . spacing: array{
blockGap: string,
padding: array{bottom: string, left: string, right: string, top: string}
}, color: array{
background: string, text: string
}, typography: array{
fontFamily: string
} }
Использование
$Rendering_Context = new Rendering_Context(); $Rendering_Context->get_theme_styles(): array;
Код Rendering_Context::get_theme_styles() Rendering Context::get theme styles WC 10.4.3
public function get_theme_styles(): array {
$theme = $this->get_theme_json();
return $theme->get_data()['styles'] ?? array();
}