Make WordPress Core

Changeset 58365


Ignore:
Timestamp:
06/08/2024 12:10:42 PM (5 weeks ago)
Author:
dmsnell
Message:

HTML API: Call $this->is_tag_closer() in HTML Processor.

The HTML Processor had been calling the parent class is_tag_closer()
method, but since visiting virtual nodes was introduced, it's important
that all of the methods are called on the subclass.

This patch fixes one issue identified where the parent method was called
instead, and it fixes another case where the change from calling the
parent method to the $this method was done improperly.

Developed in https://github.com/WordPress/wordpress-develop/pull/6726
Discussed in https://core.trac.wordpress.org/ticket/61348

Props jonsurrell.
See #61348.
Follow-up to [58304].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-processor.php

    r58364 r58365  
    430430                }
    431431
    432                 if ( ! $this::is_tag_closer() || $visit_closers ) {
     432                if ( ! $this->is_tag_closer() || $visit_closers ) {
    433433                    return true;
    434434                }
     
    465465                }
    466466
    467                 if ( ! parent::is_tag_closer() || $visit_closers ) {
     467                if ( ! $this->is_tag_closer() || $visit_closers ) {
    468468                    return true;
    469469                }
Note: See TracChangeset for help on using the changeset viewer.