A WordPress-centric search engine for devs and theme authors



wp_set_post_cats ›

Since1.0.1
Deprecated2.1.0
wp_set_post_cats ( $blogid = '1', $post_ID = 0, $post_categories = array() )
Parameters: (3)
  • (int) $blogid Not used
    Required: No
    Default: '1'
  • (int) $post_ID
    Required: No
    Default:
  • (array) $post_categories
    Required: No
    Default: array()
See:
Returns:
  • (bool|mixed)
Defined at:
Codex:

Sets the categories that the post id belongs to.



Source

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