Make WordPress Core


Ignore:
Timestamp:
06/11/2010 08:19:35 PM (15 years ago)
Author:
ryan
Message:

Trim trailing whitespace.

File:
1 edited

Legend:

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

    r15219 r15235  
    748748function _wp_menu_changing_status_observer( $new_status, $old_status, $post ) {
    749749    // 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 &&
    754754        empty( $post->post_parent )
    755755    ) {
    756756        $auto_add = get_option( 'nav_menu_options' );
    757         if ( 
     757        if (
    758758            isset( $auto_add['auto_add'] ) &&
    759             is_array( $auto_add['auto_add'] ) 
     759            is_array( $auto_add['auto_add'] )
    760760        ) {
    761761            $args = array(
     
    777777            }
    778778        }
    779     } 
    780    
     779    }
     780
    781781    // 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 (
    783783        ! empty( $post->ID ) &&
    784         ( 
     784        (
    785785            ( 'publish' == $old_status && 'draft' == $new_status ) ||
    786             ( 'draft' == $old_status && 'publish' == $new_status ) 
     786            ( 'draft' == $old_status && 'publish' == $new_status )
    787787        )
    788788    ) {
Note: See TracChangeset for help on using the changeset viewer.