Make WordPress Core


Ignore:
Timestamp:
06/02/2010 03:08:03 PM (16 years ago)
Author:
nacin
Message:

Ensure we're only auto-adding root pages to menus. fixes #13447.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu.php

    r15104 r15111  
    749749    if ( 'publish' != $new_status || 'publish' == $old_status || 'page' != $post->post_type )
    750750        return;
     751    if ( ! empty( $post->post_parent ) )
     752        return;
    751753    $auto_add = get_option( 'nav_menu_options' );
    752754    if ( empty( $auto_add ) || ! is_array( $auto_add ) || ! isset( $auto_add['auto_add'] ) )
Note: See TracChangeset for help on using the changeset viewer.