wordpress / latest / functions / get_post_taxonomies.html

get_post_taxonomies( int|WP_Post $post ): string[]

Retrieves all taxonomy names for the given post.

Parameters

$post int|WP_Post Optional
Post ID or WP_Post object. Default is global $post.

Return

string[] An array of all taxonomy names for the given post.

Source

File: wp-includes/taxonomy.php. View all references

function get_post_taxonomies( $post = 0 ) {
	$post = get_post( $post );

	return get_object_taxonomies( $post );
}

Uses

Uses Description

Changelog

Version Description
2.5.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_post_taxonomies