Changeset 13266 for trunk/wp-includes/custom-navigation.php
- Timestamp:
- 02/20/2010 11:58:00 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/custom-navigation.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/custom-navigation.php
r13262 r13266 14 14 $menu_items = array(); 15 15 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' ); 17 17 if ( count( $menu_objects ) > 1 ) 18 18 $args['include'] = implode( ',', $menu_objects ); 19 19 else 20 20 $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 ) { 24 24 $menu_items[ $post->$key ] = $post; 25 25 } … … 30 30 return $menu_items; 31 31 } 32 32 33 function wp_custom_navigation_setup($override = false) { 33 34
Note: See TracChangeset
for help on using the changeset viewer.