#62518 closed enhancement (fixed)
HTML Processor state "context_node" is redundant
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 6.6 |
Component: | HTML API | Keywords: | has-patch |
Focuses: | Cc: |
Description
The HTML Processor State context_node
is redundant. The property has been superseded by WP_HTML_Processor->context_node
since [58304].
The property does not need to be created and can be removed. WP_HTML_Processor_State
is an internal class marked with @access private
.
the WP_HTML_Processor->state
property (where WP_HTML_Processor_State
is used) is private, so any subclasses should not be affected.
Change History (4)
This ticket was mentioned in PR #7861 on WordPress/wordpress-develop by @jonsurrell.
6 months ago
#1
- Keywords has-patch added
#2
@
6 months ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 59463:
6 months ago
#3
Committed with https://core.trac.wordpress.org/changeset/59463.
@Bernhard Reiter commented on PR #7861:
6 months ago
#4
Ah, thanks for that! I was actually briefly confused by this when reviewing #7348 but forgot to flag it 😊
Note: See
TracTickets for help on using
tickets.
The processor state
context_node
property is unused and redundant. Remove it.The processor uses a
context_node
property on itself.The
$state
property is private, so it should not be accessible to subclasses.The class itself is marked with
access private
so should also be unused.See https://github.com/WordPress/wordpress-develop/pull/7348#discussion_r1851827222.
Trac ticket: https://core.trac.wordpress.org/ticket/62518