mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Don't store nonexistent (deleted) menus in the auto-add option. see #13447.
git-svn-id: https://develop.svn.wordpress.org/trunk@14934 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -765,7 +765,9 @@ function _wp_auto_add_pages_to_menu( $new_status, $old_status, $post ) {
|
||||
);
|
||||
|
||||
foreach ( $auto_add as $menu_id ) {
|
||||
$items = (array) wp_get_nav_menu_items( $menu_id );
|
||||
$items = wp_get_nav_menu_items( $menu_id );
|
||||
if ( ! is_array( $items ) )
|
||||
continue;
|
||||
foreach ( $items as $item ) {
|
||||
if ( $post->ID == $item->object_id )
|
||||
continue 2;
|
||||
|
||||
Reference in New Issue
Block a user