Repository navigation
Block Editor: Rename reusable blocks private APIs to user patterns - #85175
Open
dhruvikpatel18 wants to merge 1 commit into
Open
dhruvikpatel18 wants to merge 1 commit into
dhruvikpatel18 wants to merge 1 commit into
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the |
dhruvikpatel18
marked this pull request as ready for review
October 20, 2026 09:55
dhruvikpatel18
requested review from
ellatrix,
fabiankaegy and
juanmaguitar
as code owners
October 20, 2026 09:55
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
See #57530
Renames the "reusable blocks" private APIs in
@wordpress/block-editor(and the matching code in@wordpress/editor) to "user patterns". Public APIs are unchanged.Why?
Reusable blocks were renamed to patterns in the UI earlier, but much of the code still uses the old name, which makes it harder to follow. #57530 tracks this debt and notes that private APIs can be renamed freely. This PR does that for the private APIs that feed user patterns into the block editor, as a first, low-risk step.
The new name is "user patterns" rather than "synced patterns" because these APIs return every
wp_blockpost, unsynced patterns included. It also matches names the code already uses: theUserPatterntype,mapUserPattern(),INSERTER_PATTERN_TYPES.useranduserPatternCategoriesSelectKey.Testing Instructions
gutenberg-extensible-site-editorexperiment enabled.One thing to note:
@wordpress/editorreads the settings key from@wordpress/block-editor's private APIs. If someone installs mismatched npm versions of the two packages, user patterns would not show in the inserter. The plugin and Core always ship the two packages together, and private APIs are not meant to work across mismatched versions.Screenshots or screencast
N/A, no visual changes.