[wp-trac] [WordPress Trac] #62584: Support more contexts in ::create_fragment method
WordPress Trac
noreply at wordpress.org
Wed Nov 27 11:57:19 UTC 2024
#62584: Support more contexts in ::create_fragment method
-----------------------------+------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: feature request | Status: assigned
Priority: normal | Milestone: 6.8
Component: HTML API | Version: 6.5
Severity: normal | Keywords:
Focuses: |
-----------------------------+------------------------
`WP_HTML_Processor::create_fragment` only supports the `<body>` context.
It can and should support more contexts, for example:
{{{#!php
<?php
WP_HTML_Processor::create_fragment( '<td>', '<table>' );
}}}
[59444] added the foundation to allow more contexts to be used via the new
`create_fragment_at_current_node` method. This new method can be used
along with a full processor to find the context node in the provided
context and create a fragment at that location.
This is a follow-up to #62357.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62584>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list