get_post_taxonomies( int|WP_Post $post )
Retrieve all taxonomies of a post with just the names.
Description
Parameters
Return
(array) An array of all taxonomy names for the given post.
Source
File: wp-includes/taxonomy.php
function get_post_taxonomies( $post = 0 ) { $post = get_post( $post ); return get_object_taxonomies( $post ); }
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
Displays all taxonomies of a post.
Output:
#return section should say that the function returns an array of all taxonomy names for the given post or post object instead of just an array.
This highlights the main point of difference between get_post_taxonomies and get_object_taxonomies which can return an array of all taxonomy names or an array of all taxonomy objects.
https://codex.wordpress.org/Function_Reference/get_post_taxonomies
http://wpsocket.com/wpref/function/get_object_taxonomies/
Feedback
I’ve pushed a fix for this in trunk and fixed the description manually for now. See r40298 for the commit where you’re credited. — By Drew Jaynes —