Skip to content

feat: disable contentOnly update for unsynced patterns - #82

Merged
YvetteNikolov merged 1 commit into
mainfrom
feat/disable-content-only
Jul 7, 2026
Merged

feat: disable contentOnly update for unsynced patterns#82
YvetteNikolov merged 1 commit into
mainfrom
feat/disable-content-only

Conversation

@YvetteNikolov

Copy link
Copy Markdown
Contributor

Voor de frontenders

Copilot AI review requested due to automatic review settings July 7, 2026 09:12
@YvetteNikolov
YvetteNikolov requested a review from a team as a code owner July 7, 2026 09:12
@YvetteNikolov
YvetteNikolov requested review from a team, FreakyWizard, JasperS20, WybeBosch, Yannicvanveen and laravdiemen and removed request for a team July 7, 2026 09:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Gutenberg integration to opt out of WordPress 7.0’s default “content-only locking” behavior for unsynced patterns by injecting a corresponding editor setting via the block_editor_settings_all filter.

Changes:

  • Add a new block_editor_settings_all filter handler to set disableContentOnlyForUnsyncedPatterns in block editor settings.
  • Document why the behavior is being disabled (pending per-pattern control support in core).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Gutenberg.php
Comment on lines +193 to +195
* We want this behavior, but it currently also locks creation patterns for non-page post types.
* Until core supports enabling/disabling this per pattern, we disable it globally.
*

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

booo 👎

@WybeBosch WybeBosch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wooho yeet de lock. WE SHALL NOT BE CHAINED!!!!!

@YvetteNikolov
YvetteNikolov merged commit a654303 into main Jul 7, 2026
3 checks passed
@YvetteNikolov
YvetteNikolov deleted the feat/disable-content-only branch July 7, 2026 09:34
Comment thread src/Gutenberg.php
#[Filter('block_editor_settings_all')]
public function disableContentOnlyForUnsyncedPatterns(array $settings): array
{
$settings['disableContentOnlyForUnsyncedPatterns'] = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geldt dit dan alleen voor nieuwe blokken of ook bestaande met bestaande instellingen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants