abstract class Style implements StyleInterface (View source)

Properties

protected string $name

The name of this style.

protected string $variable

The name of the associated CSS variable.

Methods

static string
getTypeFromClass(Style|object $class, string $suffix = 'Style')

Get the type handle of a given Style instance.

$this
setName(string $name)

Set the name of this style.

getName()

Get the name of this style.

string
getDisplayName(string $format = 'html')

Get the display name for this style (localized and escaped accordingly to $format).

$this
setVariable(string $variable)

Set the name of the associated CSS variable.

getVariable()

Get the name of the associated CSS variable.

getVariableToInspect()

Gets the name of the CSS variable we should use to inspect the data collection AND write into the request data collection. The reason for this is because the new customizer just has a unified approach to this –whereas the old customizer made you define the name of the variable in the xml file as page-background and reference it with page-background-color in the variable collections.

jsonSerialize()

No description

static Value[]
getValuesFromVariables(mixed $rules)

No description

Details

static protected string getTypeFromClass(Style|object $class, string $suffix = 'Style')

Get the type handle of a given Style instance.

Parameters

Style|object $class
string $suffix

Return Value

string

$this setName(string $name)

Set the name of this style.

Parameters

string $name

Return Value

$this

getName()

Get the name of this style.

string getDisplayName(string $format = 'html')

Get the display name for this style (localized and escaped accordingly to $format).

Parameters

string $format

= 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display name won't be escaped.

Return Value

string

$this setVariable(string $variable)

Set the name of the associated CSS variable.

Parameters

string $variable

Return Value

$this

getVariable()

Get the name of the associated CSS variable.

getVariableToInspect()

Gets the name of the CSS variable we should use to inspect the data collection AND write into the request data collection. The reason for this is because the new customizer just has a unified approach to this –whereas the old customizer made you define the name of the variable in the xml file as page-background and reference it with page-background-color in the variable collections.

jsonSerialize()

No description

static Value[] getValuesFromVariables(mixed $rules)

No description

Parameters

mixed $rules

Return Value

Value[]