Backport: opt out for Navigation fallback creation#4813
Closed
getdave wants to merge 6 commits intoWordPress:trunkfrom
Closed
Backport: opt out for Navigation fallback creation#4813getdave wants to merge 6 commits intoWordPress:trunkfrom
getdave wants to merge 6 commits intoWordPress:trunkfrom
Conversation
getdave
commented
Jul 7, 2023
getdave
commented
Jul 7, 2023
| $fallback = static::get_most_recently_published_navigation(); | ||
|
|
||
| if ( $fallback ) { | ||
| if ( $fallback || ! $should_create_fallback ) { |
Contributor
Author
There was a problem hiding this comment.
Note: we're not opting out of fetching a fallback, it's opting out of creating one either from:
- converting a classic menu
- creating a new block based menu
getdave
commented
Jul 7, 2023
getdave
commented
Jul 7, 2023
getdave
commented
Jul 7, 2023
spacedmonkey
reviewed
Jul 7, 2023
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
ramonjd
approved these changes
Jul 10, 2023
Member
ramonjd
left a comment
There was a problem hiding this comment.
LGTM to me.
A couple of nitpicks.
Co-authored-by: Ramon <ramonjd@users.noreply.github.com>
Co-authored-by: Ramon <ramonjd@users.noreply.github.com>
spacedmonkey
approved these changes
Jul 10, 2023
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Updates original backport from https://core.trac.wordpress.org/ticket/58557 to also allow developers to opt out of the auto-creation of the fallback.
Why? Because if we automatically create something (even if it requires interaction with the WP site or editor) we should allow folks to opt out of that.
Trac ticket: https://core.trac.wordpress.org/ticket/58750
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.