Skip to content

Editor: Restore Classic block in the inserter - #12416

Closed
tyxla wants to merge 1 commit into
WordPress:trunkfrom
tyxla:revert/classic-block-inserter-hiding
Closed

Editor: Restore Classic block in the inserter#12416
tyxla wants to merge 1 commit into
WordPress:trunkfrom
tyxla:revert/classic-block-inserter-hiding

Conversation

@tyxla

@tyxla tyxla commented Jul 6, 2026

Copy link
Copy Markdown
Member

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:

  • The wp_declare_classic_block_necessary() function and its enqueue_block_editor_assets action hook in script-loader.php / default-filters.php.
  • The wp_classic_block_supports_inserter filter (which never shipped in a WordPress release).
  • The associated PHPUnit tests in 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_inserter filter 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

  1. Open the block editor and open the inserter — the Classic block should be available.
  2. Confirm the window.__needsClassicBlock inline script is no longer printed on enqueue_block_editor_assets.
  3. Run the dependencies/scripts test suite — the removed wp_declare_classic_block_necessary tests should no longer exist and the suite should pass.

See #65166.

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props tyxla, youknowriad, mukesh27.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@tyxla tyxla self-assigned this Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@tyxla tyxla added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jul 7, 2026
@github-actions github-actions Bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jul 7, 2026
@tyxla

tyxla commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 62652
GitHub commit: 76f9763

@tyxla tyxla closed this Jul 7, 2026
@tyxla
tyxla deleted the revert/classic-block-inserter-hiding branch July 7, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants