1 taxonomy.module taxonomy_term_is_page(TaxonomyTerm $term)

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

Parameters

TaxonomyTerm $term: A taxonomy term entity.

File

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

Code

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