Make WordPress Core


Ignore:
Timestamp:
06/23/2026 08:26:54 AM (8 weeks ago)
Author:
tyxla
Message:

Editor: Hide Classic Block from inserter.

Hide the Classic block in the block editor inserter by default, since classic content is largely a legacy editing path and should not be surfaced as a primary insertion option.

Introduce a new wp_classic_block_supports_inserter filter that allows re-enabling the Classic block in the inserter, either globally or on a per-post basis.

Existing classic content (the core/freeform block) continues to render and remain editable; only its visibility in the inserter is affected.

This ports Gutenberg PR #77911 to Core.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11712

Props desrosj, mamaduka, mukesh27, tyxla, westonruter, wildworks, yuliyan.
Fixes #65166.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r62482 r62546  
    645645add_action( 'enqueue_block_editor_assets', 'wp_enqueue_global_styles_css_custom_properties' );
    646646add_action( 'enqueue_block_editor_assets', '_wp_enqueue_auto_register_blocks' );
     647add_action( 'enqueue_block_editor_assets', 'wp_declare_classic_block_necessary' );
    647648add_action( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
    648649add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
Note: See TracChangeset for help on using the changeset viewer.