Index: trunk/src/wp-admin/includes/nav-menu.php =================================================================== --- trunk/src/wp-admin/includes/nav-menu.php (revision 47747) +++ trunk/src/wp-admin/includes/nav-menu.php (revision 47808) @@ -32,15 +32,15 @@ } - if ( 'markup' == $response_format ) { + if ( 'markup' === $response_format ) { $args['walker'] = new Walker_Nav_Menu_Checklist; } - if ( 'get-post-item' == $type ) { + if ( 'get-post-item' === $type ) { if ( post_type_exists( $object_type ) ) { if ( isset( $request['ID'] ) ) { $object_id = (int) $request['ID']; - if ( 'markup' == $response_format ) { + if ( 'markup' === $response_format ) { echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( get_post( $object_id ) ) ), 0, (object) $args ); - } elseif ( 'json' == $response_format ) { + } elseif ( 'json' === $response_format ) { echo wp_json_encode( array( @@ -56,7 +56,7 @@ if ( isset( $request['ID'] ) ) { $object_id = (int) $request['ID']; - if ( 'markup' == $response_format ) { + if ( 'markup' === $response_format ) { echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( get_term( $object_id, $object_type ) ) ), 0, (object) $args ); - } elseif ( 'json' == $response_format ) { + } elseif ( 'json' === $response_format ) { $post_obj = get_term( $object_id, $object_type ); echo wp_json_encode( @@ -72,5 +72,5 @@ } } elseif ( preg_match( '/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches ) ) { - if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) { + if ( 'posttype' === $matches[1] && get_post_type_object( $matches[2] ) ) { $post_type_obj = _wp_nav_menu_meta_box_object( get_post_type_object( $matches[2] ) ); $args = array_merge( @@ -94,8 +94,8 @@ while ( $search_results_query->have_posts() ) { $post = $search_results_query->next_post(); - if ( 'markup' == $response_format ) { + if ( 'markup' === $response_format ) { $var_by_ref = $post->ID; echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( get_post( $var_by_ref ) ) ), 0, (object) $args ); - } elseif ( 'json' == $response_format ) { + } elseif ( 'json' === $response_format ) { echo wp_json_encode( array( @@ -108,5 +108,5 @@ } } - } elseif ( 'taxonomy' == $matches[1] ) { + } elseif ( 'taxonomy' === $matches[1] ) { $terms = get_terms( array( @@ -121,7 +121,7 @@ } foreach ( (array) $terms as $term ) { - if ( 'markup' == $response_format ) { + if ( 'markup' === $response_format ) { echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args ); - } elseif ( 'json' == $response_format ) { + } elseif ( 'json' === $response_format ) { echo wp_json_encode( array( @@ -232,5 +232,5 @@ $id = $post_type->name; // Give pages a higher priority. - $priority = ( 'page' == $post_type->name ? 'core' : 'default' ); + $priority = ( 'page' === $post_type->name ? 'core' : 'default' ); add_meta_box( "add-post-type-{$id}", $post_type->labels->name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', $priority, $post_type ); } @@ -369,9 +369,9 @@ */ $important_pages = array(); - if ( 'page' == $post_type_name ) { + if ( 'page' === $post_type_name ) { $suppress_page_ids = array(); // Insert Front Page or custom Home link. - $front_page = 'page' == get_option( 'show_on_front' ) ? (int) get_option( 'page_on_front' ) : 0; + $front_page = 'page' === get_option( 'show_on_front' ) ? (int) get_option( 'page_on_front' ) : 0; $front_page_obj = null; @@ -401,5 +401,5 @@ // Insert Posts Page. - $posts_page = 'page' == get_option( 'show_on_front' ) ? (int) get_option( 'page_for_posts' ) : 0; + $posts_page = 'page' === get_option( 'show_on_front' ) ? (int) get_option( 'page_for_posts' ) : 0; if ( ! empty( $posts_page ) ) { @@ -509,15 +509,15 @@