mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML API: Return subclass from
::create_fragment
When the `WP_HTML_Processor` was introduced with its `::create_fragment()` static creator method, that method has been returning a `new self(...)`. Unfortunately, this means that subclasses cannot use that method since it will return the `WP_HTML_Processor` instead of the subclass. With this patch, the static creator method returns `new static(...)` to preserve the intended behavior. A new test asserts this behavior for future changes. Developed in #6729 Discussed in https://core.trac.wordpress.org/ticket/61374 Props dmsnell, jonsurrell. Follow-up to [56274]. Fixes #61374. git-svn-id: https://develop.svn.wordpress.org/trunk@58363 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters