function taxonomy_term_is_page

Returns whether the current page is the page of the passed-in term.

Parameters

Drupal\taxonomy\Plugin\Core\Entity\Term $term: A taxonomy term entity.

1 call to taxonomy_term_is_page()
template_preprocess_taxonomy_term in drupal/core/modules/taxonomy/taxonomy.module
Prepares variables for taxonomy term templates.

File

drupal/core/modules/taxonomy/taxonomy.module, line 503
Enables the organization of content into categories.

Code

function taxonomy_term_is_page(Term $term) {
  $page_term = menu_get_object('taxonomy_term', 2);
  return !empty($page_term) ? $page_term
    ->id() == $term
    ->id() : FALSE;
}