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



wp_set_post_cats › WordPress Function

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