-
Notifications
You must be signed in to change notification settings - Fork 0
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
[BBT-123]: Add functionality to allow editors to manage multiple style variations #51
Merged
Merged
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4de0d58
feat(bbt-123): add basic switcher UI
Joe-Rouse 1fbb8a7
feat(bbt-123): only set id if active variation is found
Joe-Rouse cdf5416
feat(bbt-123): add functionality for activating a style variation
Joe-Rouse e82ca9e
feat(bbt-123): check post exists before activating
Joe-Rouse d6e4c15
feat(bbt-123): add valid permission callback to endpoint
Joe-Rouse 4e484fd
Merge branch 'feature/bbt-122-global-styles-endpoint' into feature/bb…
Joe-Rouse ee09c09
refactor(bbt-123): only call wp_update_post on posts that require it
Joe-Rouse 4e28c79
refactor(bbt-123): split endpoint callback up into separate functions
Joe-Rouse 9e229b3
docs(bbt-123): re-phrase comment on loop that updates post statuses
Joe-Rouse 527c579
style(bbt-123): improve arguments formatting
Joe-Rouse 5bfd3fd
refactor(bbt-123): change internally used methods visibility to private
Joe-Rouse 5a8cc84
refactor(bbt-123): add arg validation for globalStylesId
Joe-Rouse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
Just flagging this as potentially slow, it will perform
wp_update_post
on all posts regardless of whether they are alreadydraft
and there could be many.We expect (but can't assume) that there's only going to be 1 published post at a time we need to revert.
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.
Makes sense - I've added an extra check at the beginning of the loop so any posts that aren't already published and aren't going to be published can be ignored.