Title: wp-includes/category.php | Developer.WordPress.org

---

# File: wp-includes/category.php

 * function[cat_is_ancestor_of()](https://developer.wordpress.org/reference/functions/cat_is_ancestor_of/)
 * Checks if a category is an ancestor of another category.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/cat_is_ancestor_of/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/cat_is_ancestor_of/#uses)
   | Source: [wp-includes/category.php:248](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L248-L250)
 * function[sanitize_category()](https://developer.wordpress.org/reference/functions/sanitize_category/)
 * Sanitizes category data based on context.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/sanitize_category/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/sanitize_category/#uses)
   | Source: [wp-includes/category.php:261](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L261-L263)
 * function[sanitize_category_field()](https://developer.wordpress.org/reference/functions/sanitize_category_field/)
 * Sanitizes data in single category key field.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/sanitize_category_field/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/sanitize_category_field/#uses)
   | Source: [wp-includes/category.php:276](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L276-L278)
 * function[get_tags()](https://developer.wordpress.org/reference/functions/get_tags/)
 * Retrieves all post tags.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/get_tags/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/get_tags/#uses)
   | Source: [wp-includes/category.php:295](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L295-L317)
 * hook[get_tags](https://developer.wordpress.org/reference/hooks/get_tags/)
 * Filters the array of term objects returned for the ‘post_tag’ taxonomy.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/get_tags/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/get_tags/#uses)
   | Source: [wp-includes/category.php:313](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L313-L313)
 * function[get_tag()](https://developer.wordpress.org/reference/functions/get_tag/)
 * Retrieves a post tag by tag ID or tag object.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/get_tag/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_tag/#uses)
   | Source: [wp-includes/category.php:341](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L341-L343)
 * function[clean_category_cache()](https://developer.wordpress.org/reference/functions/clean_category_cache/)
 * Removes the category cache data based on ID.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/clean_category_cache/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/clean_category_cache/#uses)
   | Source: [wp-includes/category.php:354](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L354-L356)
 * function[_make_cat_compat()](https://developer.wordpress.org/reference/functions/_make_cat_compat/)
 * Updates category structure to old pre-2.3 from new taxonomy structure.
 * Used by [8 functions](https://developer.wordpress.org/reference/functions/_make_cat_compat/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/_make_cat_compat/#uses)
   | Source: [wp-includes/category.php:378](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L378-L394)
 * function[get_cat_name()](https://developer.wordpress.org/reference/functions/get_cat_name/)
 * Retrieves the name of a category from its ID.
 * Used by [5 functions](https://developer.wordpress.org/reference/functions/get_cat_name/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/get_cat_name/#uses)
   | Source: [wp-includes/category.php:225](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L225-L234)
 * function[get_categories()](https://developer.wordpress.org/reference/functions/get_categories/)
 * Retrieves a list of category objects.
 * Used by [7 functions](https://developer.wordpress.org/reference/functions/get_categories/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/functions/get_categories/#uses)
   | Source: [wp-includes/category.php:26](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L26-L67)
 * hook[get_categories_taxonomy](https://developer.wordpress.org/reference/hooks/get_categories_taxonomy/)
 * Filters the taxonomy used to retrieve terms when calling get_categories().
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/get_categories_taxonomy/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/get_categories_taxonomy/#uses)
   | Source: [wp-includes/category.php:38](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L38-L38)
 * function[get_category()](https://developer.wordpress.org/reference/functions/get_category/)
 * Retrieves category data given a category ID or category object.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/get_category/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/get_category/#uses)
   | Source: [wp-includes/category.php:92](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L92-L102)
 * function[get_category_by_path()](https://developer.wordpress.org/reference/functions/get_category_by_path/)
 * Retrieves a category based on URL containing the category slug.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/get_category_by_path/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/get_category_by_path/#uses)
   | Source: [wp-includes/category.php:125](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L125-L179)
 * function[get_category_by_slug()](https://developer.wordpress.org/reference/functions/get_category_by_slug/)
 * Retrieves a category object by category slug.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/get_category_by_slug/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/get_category_by_slug/#uses)
   | Source: [wp-includes/category.php:189](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L189-L197)
 * function[get_cat_ID()](https://developer.wordpress.org/reference/functions/get_cat_id/)
 * Retrieves the ID of a category from its name.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/get_cat_id/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_cat_id/#uses)
   | Source: [wp-includes/category.php:207](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/category.php#L207-L215)