get_all_category_ids

Retrieves all category IDs.

Description

(object) get_all_category_ids(); 

Returns (object)

List of all of the category IDs.


Usage

  1. if ( !function_exists( 'get_all_category_ids' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_all_category_ids(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function get_all_category_ids() { 
  2. _deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' ); 
  3.  
  4. if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) { 
  5. $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') ); 
  6. wp_cache_add( 'all_category_ids', $cat_ids, 'category' ); 
  7.  
  8. return $cat_ids;