mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
0cad031a5a
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 https://github.com/WordPress/wordpress-develop/pull/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