is_term_publicly_viewable()WP 6.1.0

Determines whether a term is publicly viewable.

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

Хуков нет.

Возвращает

true|false. Whether the term is publicly viewable.

Использование

is_term_publicly_viewable( $term );
$term(int|WP_Term) (обязательный)
Term ID or term object.

Список изменений

С версии 6.1.0 Введена.

Код is_term_publicly_viewable() WP 6.1.1

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

	if ( ! $term ) {
		return false;
	}

	return is_taxonomy_viewable( $term->taxonomy );
}