Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 of 6 tasks
MadtownLems opened this issue Nov 13, 2024 · 4 comments
Open
4 of 6 tasks
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Pattern Directory The Pattern Directory, a place to find patterns [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@MadtownLems
Copy link

MadtownLems commented Nov 13, 2024

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.

  • Yes

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

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@MadtownLems MadtownLems added the [Type] Bug An existing feature does not function as intended label Nov 13, 2024
@annezazu annezazu moved this to 🐛 Punted to 6.7.1 in WordPress 6.7 Editor Tasks Nov 13, 2024
@ndiego
Copy link
Member

ndiego commented Nov 14, 2024

Good catch. I can confirm in 6.7 and Gutenberg:

Image|

@MadtownLems
Copy link
Author

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

@Mamaduka Mamaduka added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Pattern Directory The Pattern Directory, a place to find patterns labels Nov 15, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 22, 2024
@gziolo gziolo removed their assignment Nov 26, 2024
@gziolo
Copy link
Member

gziolo commented Nov 26, 2024

I opened #67240 together with @PawelDabrowa during Contributor Day at WordCamp Wrocław. We mostly identified the place in the code and how the label could potentially be removed. However, the part that adds the proper logic still needs to be developed. I won't have time to work on it, so someone else must take it over.

@cbravobernal
Copy link
Contributor

Punting this one to 6.8 as it seems it won't be ready for a 6.7.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Pattern Directory The Pattern Directory, a place to find patterns [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants