wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_all_category_ids › WordPress Function

Since2.0.0
已弃用4.0.0
get_all_category_ids ( 没有参数 )
链接:
查看:
返回:
  • (int[]) List of all of the category IDs.
定义在:
文档:

Retrieves all category IDs.



源码

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