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() ): bool|mixed

Sets the categories that the post ID belongs to.


Description

Top ↑

See also


Top ↑

Parameters

$blogid int Optional
Not used

Default: '1'

$post_id int Required
$post_categories array Optional

Default: array()


Top ↑

Return

bool|mixed


Top ↑

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


Top ↑

Changelog

Changelog
Version Description
2.1.0 This function has been deprecated. Use wp_set_post_categories() instead.
1.0.1 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.