Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer\Postprocessors
Highlighting_Postprocessor{}└─ Postprocessor
This postprocessor replaces <mark> tags with <span> tags because mark tags are not supported across all email clients
No Hooks.
Usage
$Highlighting_Postprocessor = new Highlighting_Postprocessor(); // use class methods
Methods
- public postprocess( string $html )
Highlighting_Postprocessor{} Highlighting Postprocessor{} code WC 10.6.2
class Highlighting_Postprocessor implements Postprocessor {
/**
* Postprocess the HTML.
*
* @param string $html HTML to postprocess.
* @return string
*/
public function postprocess( string $html ): string {
return str_replace(
array( '<mark', '</mark>' ),
array( '<span', '</span>' ),
$html
);
}
}