On this page
wp_set_post_cats( int $blogid = '1', int $post_ID, array $post_categories = array() ): bool|mixed
This function has been deprecated. Use wp_set_post_categories() instead.
Sets the categories that the post ID belongs to.
Description
See also
Parameters
$blogidint Optional-
Not used
Default:
'1' $post_IDint Required$post_categoriesarray Optional-
Default:
array()
Return
bool|mixed
Source
File: wp-includes/deprecated.php. View all references
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);
}
Related
Uses
| Uses | Description |
|---|---|
| wp_set_post_categories() wp-includes/post.php | Sets categories for a post. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | This function has been deprecated. Use wp_set_post_categories() instead. |
| 1.0.1 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_set_post_cats