WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/29/2010 07:33:56 AM (11 years ago)
Author:
nacin
Message:

When posts/terms are deleted/trashed, update associated menu items. Deleted post = deleted menu item, trashed post = menu item becomes a draft. props filosofo, see #13174

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r14262 r14295  
    21682168            $parent_post = get_post($post_parent);
    21692169            // Check for circular dependency
    2170             if ( $parent_post->post_parent == $post_ID )
     2170            if ( isset( $parent_post->post_parent ) && $parent_post->post_parent == $post_ID )
    21712171                $post_parent = 0;
    21722172        }
Note: See TracChangeset for help on using the changeset viewer.