Changeset 15235 for trunk/wp-includes/nav-menu.php
- Timestamp:
- 06/11/2010 08:19:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu.php
r15219 r15235 748 748 function _wp_menu_changing_status_observer( $new_status, $old_status, $post ) { 749 749 // append new top-level page objects to a menu for which that option is selected 750 if ( 751 'publish' == $new_status && 752 'publish' != $old_status && 753 'page' == $post->post_type && 750 if ( 751 'publish' == $new_status && 752 'publish' != $old_status && 753 'page' == $post->post_type && 754 754 empty( $post->post_parent ) 755 755 ) { 756 756 $auto_add = get_option( 'nav_menu_options' ); 757 if ( 757 if ( 758 758 isset( $auto_add['auto_add'] ) && 759 is_array( $auto_add['auto_add'] ) 759 is_array( $auto_add['auto_add'] ) 760 760 ) { 761 761 $args = array( … … 777 777 } 778 778 } 779 } 780 779 } 780 781 781 // give menu items draft status if their associated post objects change from "publish" to "draft", or vice versa (draft item being re-published) 782 if ( 782 if ( 783 783 ! empty( $post->ID ) && 784 ( 784 ( 785 785 ( 'publish' == $old_status && 'draft' == $new_status ) || 786 ( 'draft' == $old_status && 'publish' == $new_status ) 786 ( 'draft' == $old_status && 'publish' == $new_status ) 787 787 ) 788 788 ) {
Note: See TracChangeset
for help on using the changeset viewer.