Warning: This function has been deprecated. Use wp_set_post_categories() instead.
wp_set_post_cats( int $blogid = '1', int $post_ID, array $post_categories = array() )
Sets the categories that the post id belongs to.
Description Description
See also See also
Parameters Parameters
- $blogid
-
(int) (Optional) Not used
Default value: '1'
- $post_ID
-
(int) (Required)
- $post_categories
-
(array) (Optional)
Default value: array()
Return Return
(bool|mixed)
Source Source
File: wp-includes/deprecated.php
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); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.1.0 | This function has been deprecated. Use wp_set_post_categories() instead. |
1.0.1 | Introduced. |