Don't return WP_Error from term_description(). Props filosofo. fixes #12707
git-svn-id: http://svn.automattic.com/wordpress/trunk@13813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1ecbc841a
commit
f607113b29
|
@ -868,7 +868,8 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) {
|
||||||
$taxonomy = $term->taxonomy;
|
$taxonomy = $term->taxonomy;
|
||||||
$term = $term->term_id;
|
$term = $term->term_id;
|
||||||
}
|
}
|
||||||
return get_term_field( 'description', $term, $taxonomy );
|
$description = get_term_field( 'description', $term, $taxonomy );
|
||||||
|
return is_wp_error( $description ) ? '' : $description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue