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