[wp-trac] [WordPress Trac] #63823: HTML API: Make WP_HTML_Processor::serialize_token() public.
WordPress Trac
noreply at wordpress.org
Tue Aug 12 20:28:55 UTC 2025
#63823: HTML API: Make WP_HTML_Processor::serialize_token() public.
-------------------------+--------------------
Reporter: dmsnell | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.9
Component: HTML API | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+--------------------
Follow-up to #62036
The `serialize_token()` method was added in WordPress 6.7.0 as a
protected member on the `WP_HTML_Processor` class. It wasn’t clear at
the time of merging if it would be necessary to expose it as a public
method. However, since that time a number of experiments have led to the
conclusion that it would be very valuable to do so.
This patch opens up the method for invocation from the outside,
trivializing the generation of normative HTML subspans from a parent
document.
See the Serialization Builder based on this, and which motivates this
change.
https://gist.github.com/dmsnell/ff758c13e8d41bf9f0b75f3fd42ad1e5
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63823>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list