get_all_category_ids()

最后更新于:2021-11-26 04:13:06

get_all_category_ids()

Retrieves all category IDs.

响应

(int[]) List of all of the category IDs.

源文件

文件: gc-includes/deprecated.php

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