mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
2nd pass at Taxonomy Term canonicalisation. Fix get_term_link() to expect null|false||WP_Error failure from get_term() family. See #12245, #8948
git-svn-id: https://develop.svn.wordpress.org/trunk@13170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2290,6 +2290,10 @@ function get_term_link( $term, $taxonomy ) {
|
||||
$term = &get_term_by('slug', $term, $taxonomy);
|
||||
}
|
||||
}
|
||||
|
||||
if ( !is_object($term) )
|
||||
$term = new WP_Error('invalid_term', __('Empty Term'));
|
||||
|
||||
if ( is_wp_error( $term ) )
|
||||
return $term;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user