WordPress.org

Make WordPress Core

Changeset 14599


Ignore:
Timestamp:
05/13/10 16:34:14 (4 years ago)
Author:
ryan
Message:

Check for WP_Error. Props ptahdunbar. fixes #12949

File:
1 edited

Legend:

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

    r14590 r14599  
    515515                $object = get_taxonomy( $menu_item->object ); 
    516516                $menu_item->type_label = $object->singular_label; 
    517                 $menu_item->url = get_term_link( (int) $menu_item->object_id, $menu_item->object ); 
     517                $term_url = get_term_link( (int) $menu_item->object_id, $menu_item->object ); 
     518                $menu_item->url = !is_wp_error( $term_url ) ? $term_url : ''; 
    518519 
    519520                $original_title = get_term_field( 'name', $menu_item->object_id, $menu_item->object, 'raw' ); 
Note: See TracChangeset for help on using the changeset viewer.