Make WordPress Core


Ignore:
Timestamp:
02/20/2010 11:58:00 PM (16 years ago)
Author:
ryan
Message:

Make js noConflict compat. see #11817

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/custom-navigation.php

    r13262 r13266  
    1414    $menu_items = array();
    1515    if ( !empty( $menu_objects ) && !empty( $key ) ) {
    16         $args = array( 'orderby' => 'menu_order', 'post_type' => 'menu_item', 'post_status' => 'menu-category,menu-page,menu-custom' );
     16        $args = array( 'orderby' => 'menu_order', 'post_type' => 'menu_item', 'post_status' => 'publish' );
    1717        if ( count( $menu_objects ) > 1 )
    1818            $args['include'] = implode( ',', $menu_objects );
    1919        else
    2020            $args['include'] = $menu_objects[0];
    21         $posts = new WP_Query( $args );
    22         if ( ! empty( $posts->posts ) ) {
    23             foreach( $posts->posts as $post ) {
     21        $posts = get_posts( $args );
     22        if ( ! empty( $posts ) ) {
     23            foreach ( $posts as $post ) {
    2424                $menu_items[ $post->$key ] = $post;
    2525            }
     
    3030    return $menu_items;
    3131}
     32
    3233function wp_custom_navigation_setup($override = false) {
    3334   
Note: See TracChangeset for help on using the changeset viewer.