wpseek.com
A WordPress-centric search engine for devs and theme authors



is_term_publicly_viewable › WordPress Function

Since6.1.0
Deprecatedn/a
is_term_publicly_viewable ( $term )
Parameters:
  • (int|WP_Term) $term Term ID or term object.
    Required: Yes
Returns:
  • (bool) Whether the term is publicly viewable.
Defined at:
Codex:

Determines whether a term is publicly viewable.

A term is considered publicly viewable if its taxonomy is viewable.


Source

function is_term_publicly_viewable( $term ) {
	$term = get_term( $term );

	if ( ! $term ) {
		return false;
	}

	return is_taxonomy_viewable( $term->taxonomy );
}