@@ 3236-3241 (lines=6) @@ | ||
3233 | ||
3234 | foreach ( (array) $terms as $term ) { |
|
3235 | $use_id = false; |
|
3236 | if ( !is_object($term) ) { |
|
3237 | $term = get_term($term, $taxonomy); |
|
3238 | if ( is_wp_error( $term ) ) |
|
3239 | return $term; |
|
3240 | $use_id = true; |
|
3241 | } |
|
3242 | ||
3243 | // Don't recurse if we've already identified the term as a child - this indicates a loop. |
|
3244 | if ( isset( $ancestors[ $term->term_id ] ) ) { |
|
@@ 3852-3858 (lines=7) @@ | ||
3849 | function get_term_link( $term, $taxonomy = '' ) { |
|
3850 | global $wp_rewrite; |
|
3851 | ||
3852 | if ( !is_object($term) ) { |
|
3853 | if ( is_int( $term ) ) { |
|
3854 | $term = get_term( $term, $taxonomy ); |
|
3855 | } else { |
|
3856 | $term = get_term_by( 'slug', $term, $taxonomy ); |
|
3857 | } |
|
3858 | } |
|
3859 | ||
3860 | if ( !is_object($term) ) |
|
3861 | $term = new WP_Error('invalid_term', __('Empty Term')); |