WordPress开发者和主题制作者的搜索引擎



is_taxonomy_viewable ›

Since5.1.0
已弃用n/a
is_taxonomy_viewable ( $taxonomy )
参数:
  • (string|WP_Taxonomy) $taxonomy Taxonomy name or object.
    Required: Yes
返回:
  • (bool) Whether the taxonomy should be considered viewable.
定义在:
文档:

Determines whether a taxonomy is considered "viewable".



源码

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

	return $taxonomy->publicly_queryable;
}