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



wp_set_post_cats ›

Since1.0.1
已弃用2.1.0
wp_set_post_cats ( $blogid = '1', $post_ID = 0, $post_categories = array() )
参数: (3)
  • (int) $blogid Not used
    Required: No
    默认: '1'
  • (int) $post_ID
    Required: No
    默认:
  • (array) $post_categories
    Required: No
    默认: array()
查看:
返回:
  • (bool|mixed)
定义在:
文档:

Sets the categories that the post id belongs to.



源码

function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_set_post_categories()' );
	return wp_set_post_categories($post_ID, $post_categories);
}