@@ 3445-3450 (lines=6) @@ | ||
3442 | ||
3443 | foreach ( (array) $terms as $term ) { |
|
3444 | $use_id = false; |
|
3445 | if ( !is_object($term) ) { |
|
3446 | $term = get_term($term, $taxonomy); |
|
3447 | if ( is_wp_error( $term ) ) |
|
3448 | return $term; |
|
3449 | $use_id = true; |
|
3450 | } |
|
3451 | ||
3452 | // Don't recurse if we've already identified the term as a child - this indicates a loop. |
|
3453 | if ( isset( $ancestors[ $term->term_id ] ) ) { |
|
@@ 4061-4067 (lines=7) @@ | ||
4058 | function get_term_link( $term, $taxonomy = '' ) { |
|
4059 | global $wp_rewrite; |
|
4060 | ||
4061 | if ( !is_object($term) ) { |
|
4062 | if ( is_int( $term ) ) { |
|
4063 | $term = get_term( $term, $taxonomy ); |
|
4064 | } else { |
|
4065 | $term = get_term_by( 'slug', $term, $taxonomy ); |
|
4066 | } |
|
4067 | } |
|
4068 | ||
4069 | if ( !is_object($term) ) |
|
4070 | $term = new WP_Error('invalid_term', __('Empty Term')); |