is_term_publicly_viewable( int|WP_Term $term ): bool

Determines whether a term is publicly viewable.


Description

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


Top ↑

Parameters

$term int|WP_Term Required
Term ID or term object.

Top ↑

Return

bool Whether the term is publicly viewable.


Top ↑

Source

File: wp-includes/taxonomy.php. View all references

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

	if ( ! $term ) {
		return false;
	}

	return is_taxonomy_viewable( $term->taxonomy );
}


Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.