mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backport: opt out for Navigation fallback creation #4813
Closed
Closed
Conversation
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
getdave
commented
Jul 7, 2023
getdave
commented
Jul 7, 2023
$fallback = static::get_most_recently_published_navigation(); | ||
|
||
if ( $fallback ) { | ||
if ( $fallback || ! $should_create_fallback ) { |
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.
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
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 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
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.