On this page
get_all_category_ids(): int[]
This function has been deprecated. Use get_terms() instead.
Retrieves all category IDs.
Description
See also
Return
int[] List of all of the category IDs.
Source
File: wp-includes/deprecated.php. View all references
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;
}
Related
Uses
| Uses | Description |
|---|---|
| get_terms() wp-includes/taxonomy.php | Retrieves the terms in a given taxonomy or list of taxonomies. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Used By
| Used By | Description |
|---|---|
| get_category_children() wp-includes/deprecated.php | Retrieve category children list separated before and after the term IDs. |
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Use get_terms() |
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_all_category_ids