HTML_Tag_Processor
extends WP_HTML_Tag_Processor
in package
Class based on WP_HTML_Tag_Processor which is extended to replace tokens with their values in the email content.
This class was inspired by a concept from the WordPress core, which could help us to avoid refactoring in the future.
Table of Contents
- $deferred_updates : array<string|int, WP_HTML_Text_Replacement>
- List of deferred updates which will be replaced after calling flush_updates().
- flush_updates() : void
- Flushes the deferred updates to the lexical updates.
- replace_token() : void
- Replaces the token with the new content.
Properties
$deferred_updates
List of deferred updates which will be replaced after calling flush_updates().
private
array<string|int, WP_HTML_Text_Replacement>
$deferred_updates
= array()
Methods
flush_updates()
Flushes the deferred updates to the lexical updates.
public
flush_updates() : void
Return values
void —replace_token()
Replaces the token with the new content.
public
replace_token(string $new_content) : void
Parameters
- $new_content : string
-
The new content to replace the token.