[wp-trac] [WordPress Trac] #60060: HTML API: Add support for H1-H6 elements in the HTML Processor

WordPress Trac noreply at wordpress.org
Wed Dec 13 17:51:58 UTC 2023


#60060: HTML API: Add support for H1-H6 elements in the HTML Processor
--------------------------------------+------------------------------
 Reporter:  dmsnell                   |       Owner:  Bernhard Reiter
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  HTML API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by Bernhard Reiter):

 * owner:  (none) => Bernhard Reiter
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"57186" 57186]:
 {{{
 #!CommitTicketReference repository="" revision="57186"
 HTML API: Add support for H1-H6 elements in the HTML Processor.

 Previously these have been unsupported, but in this patch, support is
 added 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.

 Props dmsnell, jonsurrell.
 Fixes #60060.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60060#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list