A WordPress-centric search engine for devs and theme authors



get_all_category_ids ›

Since2.0.0
Deprecated4.0.0
get_all_category_ids ( No parameters )
Links:
See:
  • get_terms()
Returns:
  • (int[]) List of all of the category IDs.
Defined at:
Codex:

Retrieves all category IDs.



Source

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;
}