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



is_taxonomy_viewable › WordPress Function

Since5.1.0
Deprecatedn/a
is_taxonomy_viewable ( $taxonomy )
Parameters:
  • (string|WP_Taxonomy) $taxonomy Taxonomy name or object.
    Required: Yes
Returns:
  • (bool) Whether the taxonomy should be considered viewable.
Defined at:
Codex:

Determines whether a taxonomy is considered "viewable".



Source

function is_taxonomy_viewable( $taxonomy ) {
	if ( is_scalar( $taxonomy ) ) {
		$taxonomy = get_taxonomy( $taxonomy );
		if ( ! $taxonomy ) {
			return false;
		}
	}

	return $taxonomy->publicly_queryable;
}