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
Хуков нет.
Использование
$Highlighting_Postprocessor = new Highlighting_Postprocessor(); // use class methods
Методы
- public postprocess( string $html )
Код Highlighting_Postprocessor{} Highlighting Postprocessor{} WC 11.0.1
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
);
}
}