Variables_Postprocessor
in package
implements
Postprocessor
In some case the blocks HTML contains CSS variables.
For example when spacing is set from a preset the inline styles contain var(--wp--preset--spacing--10), var(--wp--preset--spacing--20) etc. This postprocessor uses variables from theme.json and replaces the CSS variables with their values in final email HTML.
Interfaces, Classes and Traits
- Postprocessor
- Interface for postprocessors.
Table of Contents
- $theme_controller : Theme_Controller
- Instance of Theme_Controller.
- __construct() : mixed
- Constructor.
- postprocess() : string
- Postprocess the HTML.
Properties
$theme_controller
Instance of Theme_Controller.
private
Theme_Controller
$theme_controller
Methods
__construct()
Constructor.
public
__construct(Theme_Controller $theme_controller) : mixed
Parameters
- $theme_controller : Theme_Controller
-
Theme controller.
Return values
mixed —postprocess()
Postprocess the HTML.
public
postprocess(string $html) : string
Parameters
- $html : string
-
HTML to postprocess.