Docs: Improve the return description for `wp_get_post_categories()` to include more information about possible return values.

Props jeherve for the initial patch.
Fixes #37002.


git-svn-id: https://develop.svn.wordpress.org/trunk@37686 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2016-06-11 17:07:35 +00:00
parent 979660717e
commit 3348efa466
1 changed files with 4 additions and 2 deletions

View File

@ -2853,8 +2853,10 @@ function wp_untrash_post_comments( $post = null ) {
*
* @param int $post_id Optional. The Post ID. Does not default to the ID of the
* global $post. Default 0.
* @param array $args Optional. Category arguments. Default empty.
* @return array List of categories.
* @param array $args Optional. Category arguments. See wp_get_object_terms(). Default empty.
* @return array List of categories. If the `$fields` argument passed via `$args` is 'all' or
* 'all_with_object_id', an array of WP_Term objects will be returned. If `$fields`
* is 'ids', an array of category ids. If `$fields` is 'names', an array of category names.
*/
function wp_get_post_categories( $post_id = 0, $args = array() ) {
$post_id = (int) $post_id;