Warning: This function has been deprecated. Use get_terms() instead.
get_all_category_ids() WordPress Function
The get_all_category_ids() function in WordPress returns an array of all the categories that have been created on the site. This can be useful for various purposes, such as loops or custom functions.
get_all_category_ids() #
Retrieves all category IDs.
Description
See also
Return
(int[]) List of all of the category IDs.
Source
File: wp-includes/deprecated.php
function get_all_category_ids() { _deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' ); $cat_ids = get_terms( array( 'taxonomy' => 'category', 'fields' => 'ids', 'get' => 'all', ) ); return $cat_ids; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Use get_terms() |
2.0.0 | Introduced. |