Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use empty()
  • Loading branch information
noisysocks committed Nov 12, 2021
commit 14ffacc2353e3b7734eed0f4bc8a7e012d60a04e
2 changes: 1 addition & 1 deletion src/wp-includes/navigation-areas.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function _wp_migrate_menu_to_navigation_post( $new_name, WP_Theme $new_theme, WP
)
);

if ( count( $matching_posts ) ) {
if ( ! empty( $matching_posts ) ) {
$navigation_post_id = $matching_posts[0]->ID;
} else {
$menu_items_by_parent_id = _wp_sort_menu_items_by_parent_id( $menu_items );
Expand Down