-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Patterns: Check that core hasn't already moved sync status meta before moving and unsetting #52494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the compat issue against Core trunk (6.3 beta 3) in that I can create a new unsynced pattern in the editor. See #52352 (comment)
The only issue I'm facing is that I can't add any unsynced pattern created during this process in a post or page. This is also my experience when testing on WordPress 6.2.2 as well however.
Withdraw that. @glendaviesnz has schooled me that unsynced patterns don't currently appear in quick inserter in post editor - they need to be inserted from the patterns tab on inserter. Thanks @glendaviesnz ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, too, thanks for fixing this up!
cc @fullofcaffeine / @ockham if this can be squeezed into 16.2 as it fixes compat with upcoming WP 6.3 |
Required to test #52352 |
…e moving and unsetting (#52494) * Check that core hasn't already moved sync status meta before moving and unsetting * remove whitespace
Sure! Done in 62d4264 🙂 |
What?
Adds a check to the 6.3 compat REST controller to make sure that core 6.3+ hasn't already moved and unset the
wp_pattern_sync_status
meta before trying to move itWhy?
Without this in place if running plugin on 6.3+
wp_pattern_sync_status
always ends up empty so unsynced blocks appear as synced.How?
Check for existence of post
$data['wp_pattern_sync_status']
and if so assume in 6.3+ and return early.Testing Instructions