From 597eeb9bb856459f753455a187a32d31399b3a94 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 12 Jul 2017 22:21:41 +0000 Subject: [PATCH] Docs: Use a hash notation for the `$args` parameter to describe the `fields` argument in the DocBlock for `wp_get_post_terms()`. Also, the `$taxonomy` parameter can accept either a string or array of taxonomies. Props ohryan for the initial tip. See #41017. Built from https://develop.svn.wordpress.org/trunk@41034 git-svn-id: http://core.svn.wordpress.org/trunk@40884 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 24 ++++++++++++------------ wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 3e00f19876..56c2ea5c75 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2838,21 +2838,21 @@ function wp_get_post_tags( $post_id = 0, $args = array() ) { } /** - * Retrieve the terms for a post. - * - * There is only one default for this function, called 'fields' and by default - * is set to 'all'. There are other defaults that can be overridden in - * wp_get_object_terms(). + * Retrieves the terms for a post. * * @since 2.8.0 * - * @param int $post_id Optional. The Post ID. Does not default to the ID of the - * global $post. Default 0. - * @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'. - * @param array $args Optional. Term query parameters. Default empty array. - * See WP_Term_Query::__construct() for supported arguments. - * @return array|WP_Error Array of WP_Term objects on success or empty array if no terms were found. - * WP_Error object if `$taxonomy` doesn't exist. + * @param int $post_id Optional. The Post ID. Does not default to the ID of the + * global $post. Default 0. + * @param string|array $taxonomy Optional. The taxonomy slug or array of slugs for which + * to retrieve terms. Default 'post_tag'. + * @param array $args { + * Optional. Term query parameters. See WP_Term_Query::__construct() for supported arguments. + * + * @type string $fields Term fields to retrieve. Default 'all'. + * } + * @return array|WP_Error Array of WP_Term objects on success or empty array if no terms were found. + * WP_Error object if `$taxonomy` doesn't exist. */ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array() ) { $post_id = (int) $post_id; diff --git a/wp-includes/version.php b/wp-includes/version.php index 4e26a7c62d..1524968e92 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41033'; +$wp_version = '4.9-alpha-41034'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.