Uh oh!
There was an error while loading. Please reload this page.
Docs: Update WP_HTML_Processor::class_list example to runnable snippet - #13034
Docs: Update WP_HTML_Processor::class_list example to runnable snippet#13034sirreal wants to merge 4 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Converts the `WP_HTML_Processor::class_list()` and `WP_HTML_Tag_Processor::class_list()` examples to runnable WordPress Playground snippets. Corrects the encoded closing angle bracket so the expected output matches the parsed class name. Developed in #13034. Props jonsurrell. See #64896. git-svn-id: https://develop.svn.wordpress.org/trunk@63293 602fd350-edb4-49c9-b593-d223f7449a82
Converts the `WP_HTML_Processor::class_list()` and `WP_HTML_Tag_Processor::class_list()` examples to runnable WordPress Playground snippets. Corrects the encoded closing angle bracket so the expected output matches the parsed class name. Developed in WordPress/wordpress-develop#13034. Props jonsurrell. See #64896. Built from https://develop.svn.wordpress.org/trunk@63293 git-svn-id: http://core.svn.wordpress.org/trunk@62486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
sirreal
commented
Aug 13, 2026
Merged in r63293. |
| * <?php | ||
| * require '/wordpress/wp-load.php'; |
There was a problem hiding this comment.
The makes the
::class_listmethods onWP_HTML_Tag_ProcessorandWP_HTML_Processorexample snippets into runnable PHP snippets thanks to the WordPress PHP Playground.This is achieved by using PHP interactive code fences:
A following
expected-outputcode fence preloads the expected output so the demo can be viewed without needing to download and run WordPress Playground.See WordPress/phpdoc-parser#258 and WordPress/wporg-developer#567.
This was discussed on the July 21 2026 dev chat and mentioned in a few relevant Slack channels (
#coreand#docs) and reception was positive.Trac ticket: https://core.trac.wordpress.org/ticket/64896
Demo
Before
Static snapshot - including a small typo for the discerning reader!
After
Interactive!
demo-running.mov
Use of AI Tools
None
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.