#60060 closed enhancement (fixed)
HTML API: Add support for H1-H6 elements in the HTML Processor
Reported by: | dmsnell | Owned by: | Bernhard Reiter |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | HTML API | Keywords: | has-patch has-unit-tests needs-dev-note |
Focuses: | Cc: |
Description
Previously these have been unsupported, but in this patch we're adding support for the tags so that the HTML Processor can process documents containing them.
There was a design discussion about introducing a constant to communicate "any of the H1 - H6 elements" but this posed a number of challenges that don't need to be answered in this patch. For the time being, because the HTML specification treats H1 - H6 specially as a single kind of element, the HTML Processor uses an internal hard-coded string to indicate this. By using a hard-coded string it's possible to avoid introducing a class constant which cannot be made private due to PHP's class design. In the future, this will probably appear as a special constant in a new constant-containing class.
cc: @ockham @jonsurrell @westonruter
Change History (13)
This ticket was mentioned in PR #5535 on WordPress/wordpress-develop by @dmsnell.
10 months ago
#1
#2
@
10 months ago
- Owner set to Bernhard Reiter
- Resolution set to fixed
- Status changed from new to closed
In 57186:
@Bernhard Reiter commented on PR #5535:
10 months ago
#3
Committed to Core in https://core.trac.wordpress.org/changeset/57186/.
#4
@
10 months ago
- Milestone changed from Awaiting Review to 6.5
- Resolution fixed deleted
- Status changed from closed to reopened
- Version trunk deleted
This commit introduces a few @TODO:
tags in inline documentation.
Following [57077] (and the referenced https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#phpdoc-tags ), these should be replaced by @todo
.
(Currently, the two files /wp-includes/html-api/class-wp-html-active-formatting-elements.php
and /wp-includes/html-api/class-wp-html-processor.php
are the only PHP files in core that have @TODO
or @TODO:
tags.)
This ticket was mentioned in PR #5770 on WordPress/wordpress-develop by @dmsnell.
10 months ago
#5
Trac ticket: Core-60060
cc: @tobiasbg
#6
@
10 months ago
@TobiasBg I created https://github.com/WordPress/wordpress-develop/pull/5770 to make your requested changes. I'm not sure what happened because I don't think we've been merging over any failed tests in the CI pipeline.
@mukesh27 commented on PR #5770:
10 months ago
#7
LGTM. Is there any sniff there that check this?
@mukesh27 commented on PR #5770:
10 months ago
#8
LGTM. Is there any sniff there that check this?
@mukesh27 commented on PR #5770:
10 months ago
#9
LGTM. Is there any sniff there that check this?
@TobiasBg commented on PR #5770:
10 months ago
#10
Thanks for the PR. It's not just lowercasing though. The colons should be removed as well.
@Bernhard Reiter commented on PR #5770:
10 months ago
#12
Committed to Core in https://core.trac.wordpress.org/changeset/57209/.
Trac Ticket: Core-60060
Adds support for handling H1 - H6 elements in the HTML Processor.