Sets the categories that the post ID belongs to.
$blogidintoptional
Default:'1'
$post_idintrequired
$post_categoriesarrayoptional
Default:array()
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);
}
| Version | Description |
|---|---|
| 2.1.0 | This function has been deprecated. Use wp_set_post_categories() instead. |
| 1.0.1 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_set_post_cats