Skip to content

Feat: Add blocks.syncType filter for sync toggle#71460

Closed
badasswp wants to merge 1 commit into
WordPress:trunkfrom
badasswp:feat/add-filter-for-sync-type
Closed

Feat: Add blocks.syncType filter for sync toggle#71460
badasswp wants to merge 1 commit into
WordPress:trunkfrom
badasswp:feat/add-filter-for-sync-type

Conversation

@badasswp

@badasswp badasswp commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

What?

Closes #71459

This PR adds a custom filter blocks.syncType to the wp_block pattern post type.

Why?

At the moment, when a new pattern is created, the synced toggle is forced into ON mode. This feels counter-intuitive for users who would prefer that this is OFF by default so that they can decide to toggle it ON if they wish so. Plus, there's no way of customising this whatsoever because the toggle value is hard-coded by default to undefined.

Screenshot 2025-09-02 at 12 57 26

How?

This PR introduces a filter blocks.syncType to the wp_block pattern post type so that users can be able to correctly set the toggle's default state when a new pattern is created.

@github-actions

github-actions Bot commented Sep 2, 2025

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: badasswp <badasswp@git.wordpress.org>

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

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @badasswp! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions Bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 2, 2025
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Sep 4, 2025
@badasswp badasswp closed this by deleting the head repository May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Add blocks.syncType filter for sync toggle

2 participants