WooCommerce Code Reference

Settings_Controller
in package

Class managing the settings for the email editor.

Table of Contents

ALLOWED_BLOCK_TYPES  = array('core/button', 'core/buttons', 'core/paragraph', 'core/heading', 'core/column', 'core/columns', 'core/image', 'core/list', 'core/list-item', 'core/group', 'core/spacer')
DEFAULT_SETTINGS  = array('enableCustomUnits' => array('px', '%'))
$iframe_assets  : array<string|int, mixed>
Assets for iframe editor (component styles, scripts, etc.)
$theme_controller  : Theme_Controller
Theme controller.
__construct()  : mixed
Class constructor.
get_email_styles()  : array{spacing: array{blockGap: string, padding: array{bottom: string, left: string, right: string, top: string}}, color: array{background: string}, typography: array{fontFamily: string}}
Get the email styles.
get_layout()  : array{contentSize: string, wideSize: string}
Returns the layout settings for the email editor.
get_layout_width_without_padding()  : string
Returns the width of the layout without padding.
get_settings()  : array<string|int, mixed>
Get the settings for the email editor.
get_theme()  : WP_Theme_JSON
Returns the theme.
parse_number_from_string_with_pixels()  : float
Returns float number parsed from string with pixels.
parse_styles_to_array()  : array<string|int, mixed>
Parse styles string to array.
translate_slug_to_color()  : string
Translate slug to color.
translate_slug_to_font_size()  : string
Translate slug to font size.
init_iframe_assets()  : void
Method to initialize iframe assets.

Constants

Properties

Methods

get_email_styles()

Get the email styles.

public get_email_styles() : array{spacing: array{blockGap: string, padding: array{bottom: string, left: string, right: string, top: string}}, color: array{background: string}, typography: array{fontFamily: string}}
Return values
array{spacing: array{blockGap: string, padding: array{bottom: string, left: string, right: string, top: string}}, color: array{background: string}, typography: array{fontFamily: string}}