X-post: Runnable code examples are now live in the Code Reference

X-post from +make.wordpress.org/core: <a href="https://make.wordpress.org/core/2026/09/04/runnable-code-examples-are-now-live-in-the-code-reference/" title="WordPress 7.1 shipped the first two runnable code examples in the Code Reference. They are powered by WordPress Playground, and more are coming in 7.2. On the WP_HTML_Processor::class_list() Code Reference page, select Run button in the code snippet and the code example will run right there, in your browser. Runnable snippets can be defined in the DocBlock of each method directly in the WordPress codebase. They use a slightly different syntax from the regular code examples: <?php /** * Generator for a foreach loop to step through each class name for the matched tag. * * ```php interactive * $p = new WP_HTML_Tag_Processor( "

This post was originally published on Make Documentation by Adam Zieliński.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.