Email_Css_Inliner
in package
implements
Css_Inliner
Class for inlining CSS in HTML emails.
Interfaces, Classes and Traits
Table of Contents
- $inliner : object|null
- The CSS inliner instance.
- from_html() : self
- Creates a new instance from HTML content.
- inline_css() : self
- Inlines the provided CSS.
- render() : string
- Renders the HTML with inlined CSS.
- get_inliner_class() : string
- Get the inliner class.
Properties
$inliner
The CSS inliner instance.
private
object|null
$inliner
Runtime type: Pelago\Emogrifier\CssInliner | Automattic\WooCommerce\Vendor\Pelago\Emogrifier\CssInliner Both classes extend AbstractHtmlProcessor and implement:
- static fromHtml(string $html): static
- inlineCss(string $css = ''): self
- render(): string
Methods
from_html()
Creates a new instance from HTML content.
public
from_html(string $unprocessed_html) : self
Parameters
- $unprocessed_html : string
-
The HTML content to process.
Return values
self —inline_css()
Inlines the provided CSS.
public
inline_css([string $css = '' ]) : self
Parameters
- $css : string = ''
-
The CSS to inline.
Tags
Return values
self —render()
Renders the HTML with inlined CSS.
public
render() : string
Tags
Return values
string — The processed HTML.get_inliner_class()
Get the inliner class.
private
get_inliner_class() : string
Returns the fully qualified class name for the available CSS inliner. Runtime return type: 'Pelago\Emogrifier\CssInliner' | 'Automattic\WooCommerce\Vendor\Pelago\Emogrifier\CssInliner'
