Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/wp-includes/nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
$menu_item->_invalid = true;
}

if ( 'trash' === get_post_status( $menu_item->object_id ) ) {
if ( 'publish' !== get_post_status( $menu_item->object_id ) ) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to account for custom post statuses that are public.

It should probably check is_post_status_viewable( get_post_status( $menu_item->object_id ) )

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @peterwilsoncc 👋
Any update on this ?

$menu_item->_invalid = true;
}

Expand Down
Loading