get_taxonomy()

最后更新于:2021-11-27 00:52:03

get_taxonomy( string$taxonomy)

Retrieves the taxonomy object of $taxonomy.

参数

$taxonomy

(string) (Required) Name of taxonomy object to return.

响应

(GC_Taxonomy|false) The Taxonomy Object or false if $taxonomy doesn’t exist.

源文件

文件: gc-includes/taxonomy.php

function get_taxonomy( $taxonomy ) {
	global $gc_taxonomies;

	if ( ! taxonomy_exists( $taxonomy ) ) {
		return false;
	}

	return $gc_taxonomies[ $taxonomy ];
}
stdClass Object ( 
	[hierarchical] => 
	[update_count_callback] => 
	[rewrite] => 
		Array ( [slug] => features [with_front] => 1 ) 
	[query_var] => features 
	[public] => 1 
	[show_ui] => 1 
	[show_tagcloud] => 1 
	[_builtin] => 
	[labels] => 
		stdClass Object ( 
			[name] => Features 
			[singular_name] => Feature 
			[search_items] => Search Features 
			[popular_items] => Popular Features 
			[all_items] => All Features 
			[parent_item] => Parent Feature 
			[parent_item_colon] => Parent Feature: 
			[edit_item] => Edit Feature 
			[update_item] => Update Feature 
			[add_new_item] => Add New Feature 
			[new_item_name] => New Feature Name 
			[separate_items_with_commas] => Separate Features with commas 
			[add_or_remove_items] => Add or remove Features 
			[choose_from_most_used] => Choose from the most used Features 
		) 
	[show_in_nav_menus] => 1 
	[label] => Features 
	[singular_label] => Feature 
	[cap] => 
		stdClass Object ( 
			[manage_terms] => manage_categories 
			[edit_terms] => manage_categories 
			[delete_terms] => manage_categories 
			[assign_terms] => edit_posts 
		) 
	[name] => features 
	[object_type] => 
		Array ( [0] => rentals [1] => rentals ) 
	)