Editor: Restore Classic block in the inserter - #12416
Conversation
Revert the Classic block inserter-hiding work introduced in [62546]. This removes the `wp_declare_classic_block_necessary()` function, its `enqueue_block_editor_assets` action hook, and the associated `wp_classic_block_supports_inserter` filter, along with their tests. The Classic block is once again available in the inserter by default. This mirrors the revert in Gutenberg PR #79894. See #65166. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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. |
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. |
What?
Reverts the Classic block inserter-hiding work introduced in [62546] (#65166).
The Classic (
core/freeform) block is once again available in the inserter by default. This removes:wp_declare_classic_block_necessary()function and itsenqueue_block_editor_assetsaction hook inscript-loader.php/default-filters.php.wp_classic_block_supports_inserterfilter (which never shipped in a WordPress release).tests/phpunit/tests/dependencies/scripts.php.Why?
The Classic block deprecation / inserter-gating effort is being reverted. The corresponding Gutenberg change is reverted in WordPress/gutenberg#79894. This PR keeps Core in sync by removing the backported PHP side.
Since the
wp_classic_block_supports_inserterfilter never made it into a WordPress release, it can be removed cleanly.See WordPress/gutenberg#78067 (comment) for more info.
How?
This is a straight revert of [62546] — all 100 added lines across three files are removed. No other code referenced the function or filter.
Testing Instructions
window.__needsClassicBlockinline script is no longer printed onenqueue_block_editor_assets.wp_declare_classic_block_necessarytests should no longer exist and the suite should pass.See #65166.
🤖 Generated with Claude Code