Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCEmailTemplateChangeSummary::clean_inner_text
Strip tags and collapse whitespace. Used as the basis for copy-change comparison — semantic content only, no markup-shape noise.
Метод класса: WCEmailTemplateChangeSummary{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WCEmailTemplateChangeSummary::clean_inner_text( $html ): string;
- $html(строка) (обязательный)
- Raw
innerHTMLstring from a parsed block.
Код WCEmailTemplateChangeSummary::clean_inner_text() WCEmailTemplateChangeSummary::clean inner text WC 11.2.2
private static function clean_inner_text( string $html ): string {
$stripped = wp_strip_all_tags( $html );
$collapsed = preg_replace( '/\s+/', ' ', (string) $stripped );
return trim( (string) $collapsed );
}