wp_set_post_cats

The timeline below displays how wordpress function wp_set_post_cats has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Sets the categories that the post ID belongs to.
 *
 * @since 1.0.1
 * @deprecated 2.1.0
 * @deprecated Use wp_set_post_categories()
 * @see wp_set_post_categories()
 *
 * @param int $blogid Not used
 * @param int $post_id
 * @param array $post_categories
 * @return bool|mixed
 */
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);
}

WordPress Version: 5.5

/**
 * Sets the categories that the post ID belongs to.
 *
 * @since 1.0.1
 * @deprecated 2.1.0
 * @deprecated Use wp_set_post_categories()
 * @see wp_set_post_categories()
 *
 * @param int $blogid Not used
 * @param int $post_ID
 * @param array $post_categories
 * @return bool|mixed
 */
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);
}

WordPress Version: 4.6

/**
 * Sets the categories that the post id belongs to.
 *
 * @since 1.0.1
 * @deprecated 2.1.0
 * @deprecated Use wp_set_post_categories()
 * @see wp_set_post_categories()
 *
 * @param int $blogid Not used
 * @param int $post_ID
 * @param array $post_categories
 * @return bool|mixed
 */
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);
}

WordPress Version: 4.1

/**
 * Sets the categories that the post id belongs to.
 *
 * @since 1.0.1
 * @deprecated 2.1.0
 * @deprecated Use wp_set_post_categories()
 * @see wp_set_post_categories()
 *
 * @param int $blogid Not used
 * @param int $post_ID
 * @param array $post_categories
 * @return bool|mixed
 */
function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array())
{
    _deprecated_function(__FUNCTION__, '2.1', 'wp_set_post_categories()');
    return wp_set_post_categories($post_ID, $post_categories);
}

WordPress Version: 3.9

/**
 * Sets the categories that the post id belongs to.
 *
 * @since 1.0.1
 * @deprecated 2.1.0
 * @deprecated Use wp_set_post_categories()
 * @see wp_set_post_categories()
 *
 * @param int $blogid Not used
 * @param int $post_ID
 * @param array $post_categories
 * @return unknown
 */
function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array())
{
    _deprecated_function(__FUNCTION__, '2.1', 'wp_set_post_categories()');
    return wp_set_post_categories($post_ID, $post_categories);
}

WordPress Version: 3.7

/**
 * Sets the categories that the post id belongs to.
 *
 * @since 1.0.1
 * @deprecated 2.1
 * @deprecated Use wp_set_post_categories()
 * @see wp_set_post_categories()
 *
 * @param int $blogid Not used
 * @param int $post_ID
 * @param array $post_categories
 * @return unknown
 */
function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array())
{
    _deprecated_function(__FUNCTION__, '2.1', 'wp_set_post_categories()');
    return wp_set_post_categories($post_ID, $post_categories);
}