Account for WP_Error from get_terms() in the nav menu tax metabox. fixes #12949, props ptahdunbar.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b4d8b0cbb7
commit
7b1211b536
|
@ -247,7 +247,7 @@ function wp_nav_menu_item_taxonomy_metabox( $object, $taxonomy ) {
|
|||
// @todo transient caching of these results with proper invalidation on updating of a tax of this type
|
||||
$terms = get_terms( $taxonomy['args']->name, $args );
|
||||
|
||||
if ( !$terms )
|
||||
if ( !$terms || is_wp_error($terms) )
|
||||
$error = '<li id="error">'. sprintf( __( 'No %s exists' ), $taxonomy['args']->label ) .'</li>';
|
||||
|
||||
$term_names = '';
|
||||
|
|
Loading…
Reference in New Issue