get_post_taxonomies

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

WordPress Version: 6.1

/**
 * Retrieves all taxonomy names for the given post.
 *
 * @since 2.5.0
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @return string[] An array of all taxonomy names for the given post.
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}

WordPress Version: 5.4

/**
 * Retrieve all taxonomy names for the given post.
 *
 * @since 2.5.0
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @return string[] An array of all taxonomy names for the given post.
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}

WordPress Version: 4.8

/**
 * Retrieve all taxonomies of a post with just the names.
 *
 * @since 2.5.0
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @return array An array of all taxonomy names for the given post.
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}

WordPress Version: 4.1

/**
 * Retrieve all taxonomies of a post with just the names.
 *
 * @since 2.5.0
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @return array
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}

WordPress Version: 4.0

/**
 * Retrieve all taxonomies of a post with just the names.
 *
 * @since 2.5.0
 *
 * @uses get_object_taxonomies()
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @return array
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}

WordPress Version: 3.9

/**
 * Retrieve all taxonomies of a post with just the names.
 *
 * @since 2.5.0
 * @uses get_object_taxonomies()
 *
 * @param int|WP_Post $post Optional. Post ID or post object.
 * @return array
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}

WordPress Version: 3.7

/**
 * Retrieve all taxonomies of a post with just the names.
 *
 * @since 2.5.0
 * @uses get_object_taxonomies()
 *
 * @param int $post Optional. Post ID
 * @return array
 */
function get_post_taxonomies($post = 0)
{
    $post = get_post($post);
    return get_object_taxonomies($post);
}