Don't return WP_Error from term_description(). Props filosofo. fixes #12707
git-svn-id: https://develop.svn.wordpress.org/trunk@13813 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cab7d51114
commit
450110f9f2
|
@ -868,7 +868,8 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) {
|
|||
$taxonomy = $term->taxonomy;
|
||||
$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