On this page
taxonomy_exists( string $taxonomy ): bool
Determines whether the taxonomy name exists.
Description
Formerly is_taxonomy() , introduced in 2.3.0.
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Parameters
$taxonomystring Required-
Name of taxonomy object.
Return
bool Whether the taxonomy exists.
Source
File: wp-includes/taxonomy.php. View all references
function taxonomy_exists( $taxonomy ) {
global $wp_taxonomies;
return is_string( $taxonomy ) && isset( $wp_taxonomies[ $taxonomy ] );
}
Related
Used By
| Used By | Description |
|---|---|
| unregister_taxonomy() wp-includes/taxonomy.php | Unregisters a taxonomy. |
| WP_Term::get_instance() wp-includes/class-wp-term.php | Retrieve WP_Term instance. |
| WP_Customize_Nav_Menu_Item_Setting::populate_value() wp-includes/customize/class-wp-customize-nav-menu-item-setting.php | Ensure that the value is fully populated with the necessary properties. |
| WP_Screen::get() wp-admin/includes/class-wp-screen.php | Fetches a screen object. |
| WP_Terms_List_Table::__construct() wp-admin/includes/class-wp-terms-list-table.php | Constructor. |
| _wp_ajax_menu_quick_search() wp-admin/includes/nav-menu.php | Prints the appropriate response to a menu quick search. |
| wp_list_categories() wp-includes/category-template.php | Displays or retrieves the HTML list of categories. |
| is_taxonomy() wp-includes/deprecated.php | Checks that the taxonomy name exists. |
| WP_Widget_Tag_Cloud::_get_current_taxonomy() wp-includes/widgets/class-wp-widget-tag-cloud.php | Retrieves the taxonomy for the current Tag cloud widget instance. |
| WP_Tax_Query::clean_query() wp-includes/class-wp-tax-query.php | Validates a single query. |
| wp_update_term() wp-includes/taxonomy.php | Updates term based on arguments provided. |
| wp_get_object_terms() wp-includes/taxonomy.php | Retrieves the terms associated with the given object(s), in the supplied taxonomies. |
| wp_set_object_terms() wp-includes/taxonomy.php | Creates term and taxonomy relationships. |
| wp_remove_object_terms() wp-includes/taxonomy.php | Removes term(s) associated with a given object. |
| wp_insert_term() wp-includes/taxonomy.php | Adds a new term to the database. |
| wp_count_terms() wp-includes/taxonomy.php | Counts how many terms are in taxonomy. |
| get_term_children() wp-includes/taxonomy.php | Merges all term children into a single array of their IDs. |
| get_term_by() wp-includes/taxonomy.php | Gets all term data from database by term field and data. |
| get_terms() wp-includes/taxonomy.php | Retrieves the terms in a given taxonomy or list of taxonomies. |
| get_taxonomy() wp-includes/taxonomy.php | Retrieves the taxonomy object of $taxonomy. |
| get_objects_in_term() wp-includes/taxonomy.php | Retrieves object IDs of valid taxonomy and term. |
| is_taxonomy_hierarchical() wp-includes/taxonomy.php | Determines whether the taxonomy object is hierarchical. |
| get_term() wp-includes/taxonomy.php | Gets all term data from database by term ID. |
| get_adjacent_post() wp-includes/link-template.php | Retrieves the adjacent post. |
| get_boundary_post() wp-includes/link-template.php | Retrieves the boundary post. |
| wp_get_nav_menu_items() wp-includes/nav-menu.php | Retrieves all menu items of a navigation menu. |
| wp_xmlrpc_server::wp_newTerm() wp-includes/class-wp-xmlrpc-server.php | Create a new term. |
| wp_xmlrpc_server::wp_editTerm() wp-includes/class-wp-xmlrpc-server.php | Edit a term. |
| wp_xmlrpc_server::wp_deleteTerm() wp-includes/class-wp-xmlrpc-server.php | Delete a term. |
| wp_xmlrpc_server::wp_getTerm() wp-includes/class-wp-xmlrpc-server.php | Retrieve a term. |
| wp_xmlrpc_server::wp_getTerms() wp-includes/class-wp-xmlrpc-server.php | Retrieve all terms for a taxonomy. |
| wp_xmlrpc_server::wp_getTaxonomy() wp-includes/class-wp-xmlrpc-server.php | Retrieve a taxonomy. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/taxonomy_exists