Patterns: Check that core hasn't already moved sync status meta before moving and unsetting#52494
Patterns: Check that core hasn't already moved sync status meta before moving and unsetting#52494
Conversation
ramonjd
left a comment
There was a problem hiding this comment.
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 ! |
andrewserong
left a comment
There was a problem hiding this comment.
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_statusmeta before trying to move itWhy?
Without this in place if running plugin on 6.3+
wp_pattern_sync_statusalways 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