WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

Disabling Pattern Directory doesn't remove all references (since 6.7) #66978

Open MadtownLems opened 3 days ago

MadtownLems commented 3 days ago

Description

We are using the following code snippet to disable the Pattern Directory

function example_theme_support() {
    remove_theme_support( 'core-block-patterns' );
}
add_action( 'after_setup_theme', 'example_theme_support' );

from here: https://developer.wordpress.org/block-editor/how-to-guides/curating-the-editor-experience/disable-editor-functionality/#disable-the-pattern-directory

Since 6.7, there are still visible references to the Pattern Directory.

Image

Step-by-step reproduction instructions

  1. Put the provided code snippet into functions.php, a plugin, or similar
  2. Use the Block Inserter, click on Patterns, choose a category of Patterns, and see multiple references to the Pattern Directory

Image

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.7, No Gutenberg Plugin, Twenty Twenty Four theme (among others)

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Please confirm which theme type you used for testing.

ndiego commented 2 days ago

Good catch. I can confirm in 6.7 and Gutenberg:

Image|

MadtownLems commented 2 days ago

I should clarify, though, that this is not actually new in 6.7 - I just missed it until now. I see the same in 6.6.2