wp_set_post_cats

函数
wp_set_post_cats ( $blogid = '1', $post_ID = 0, $post_categories = array() )
参数
  • (int) $blogid Not used
    Required:
    Default: '1'
  • (int) $post_ID
    Required:
  • (array) $post_categories
    Required:
    Default: array()
返回值
  • (bool|mixed)
相关
  • wp_set_post_categories()
定义位置
相关方法
wp_get_post_catswp_set_post_tagswp_set_post_termswp_set_post_categorieswp_set_post_lock
引入
1.0.1
弃用
2.1.0

wp_set_post_cats是一个WordPress函数,用于设置给定文章的类别

设置文章ID所属的类别。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 20:33:00

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: