#63823 closed enhancement (fixed)
HTML API: Make WP_HTML_Processor::serialize_token() public.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | 6.9 |
| Component: | HTML API | Keywords: | has-patch |
| Focuses: | Cc: |
Description
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
Change History (3)
This ticket was mentioned in PR #9456 on WordPress/wordpress-develop by @dmsnell.
4 months ago
#1
- Keywords has-patch added
#2
@
4 months ago
- Resolution set to fixed
- Status changed from new to closed
In 60633:
HTML API: Make WP_HTML_Processor::serialize_token() public.
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.
Developed in https://github.com/WordPress/wordpress-develop/pull/9456
Discussed in https://core.trac.wordpress.org/ticket/63823
Follow-up to [59076].
Props dmsnell, jonsurrell.
Fixes #63823.
Trac ticket: Core-63823
Follows #7331
The
serialize_token()method was added in WordPress 6.7.0 as a protected member on theWP_HTML_Processorclass. 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.
Follow-up to [59076].