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

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

Changelog

VersionDescription
4.0.0Use get_terms()
2.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.