get_all_category_ids

Definition:
function get_all_category_ids() {}

Retrieves all category IDs.

Return values

returns:of all of the category IDs.

Source code

function get_all_category_ids() {

	if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {

		$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );

		wp_cache_add( 'all_category_ids', $cat_ids, 'category' );

	}



	return $cat_ids;

}

1136

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: