-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 to WP 6.3 - Navigation fallbacks from 4648 #4713
Backport to WP 6.3 - Navigation fallbacks from 4648 #4713
Conversation
This may not be the correct location. Can be moved subject to discussion.
|
||
$navigation_post = new WP_Query( $parsed_args ); | ||
|
||
if ( count( $navigation_post->posts ) > 0 ) { |
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.
if ( count( $navigation_post->posts ) > 0 ) { | |
if ( $navigation_post->found_posts > 0 ) { |
Instead of count use found_posts
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.
Thanks @mukeshpanchal27
Makes sense to me.
Looks like this has been committed. I'll do a follow up after Beta 1.
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.
Core class: #4733
Updating Gutenberg: WordPress/gutenberg#51999
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.
Might have to follow up another day actually
$navigation_post->found_posts
returns 0
and I haven't got time to dig around. Sorry!
Adds files relating to Navigation fallbacks for the block editor.
This PR brings #4648 over in its entirety but with updated fixtures.
Props @getdave
Trac ticket: https://core.trac.wordpress.org/ticket/58557
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.