@@ 229-239 (lines=11) @@ | ||
226 | return $terms; |
|
227 | } |
|
228 | ||
229 | foreach ( $terms as $term ) { |
|
230 | $items[] = array( |
|
231 | 'id' => "term-{$term->term_id}", |
|
232 | 'title' => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ), |
|
233 | 'type' => 'taxonomy', |
|
234 | 'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name, |
|
235 | 'object' => $term->taxonomy, |
|
236 | 'object_id' => intval( $term->term_id ), |
|
237 | 'url' => get_term_link( intval( $term->term_id ), $term->taxonomy ), |
|
238 | ); |
|
239 | } |
|
240 | } |
|
241 | ||
242 | /** |
|
@@ 368-378 (lines=11) @@ | ||
365 | ||
366 | // Check if any taxonomies were found. |
|
367 | if ( ! empty( $terms ) ) { |
|
368 | foreach ( $terms as $term ) { |
|
369 | $items[] = array( |
|
370 | 'id' => 'term-' . $term->term_id, |
|
371 | 'title' => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ), |
|
372 | 'type' => 'taxonomy', |
|
373 | 'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name, |
|
374 | 'object' => $term->taxonomy, |
|
375 | 'object_id' => intval( $term->term_id ), |
|
376 | 'url' => get_term_link( intval( $term->term_id ), $term->taxonomy ), |
|
377 | ); |
|
378 | } |
|
379 | } |
|
380 | ||
381 | /** |