Standardize the docblock for `wp_get_object_terms()`.

The enumeration of the `$args` parameter has been moved from the long
description to an array hash associated with the proper `@param` attribute.
Built from https://develop.svn.wordpress.org/trunk@31231


git-svn-id: http://core.svn.wordpress.org/trunk@31212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-01-17 20:09:47 +00:00
parent a917a904bd
commit 03512a2a02
2 changed files with 14 additions and 24 deletions

View File

@ -2552,34 +2552,24 @@ function wp_delete_category( $cat_ID ) {
/** /**
* Retrieves the terms associated with the given object(s), in the supplied taxonomies. * Retrieves the terms associated with the given object(s), in the supplied taxonomies.
*
* The following information has to do the $args parameter and for what can be
* contained in the string or array of that parameter, if it exists.
*
* The first argument is called, 'orderby' and has the default value of 'name'.
* The other value that is supported is 'count'.
*
* The second argument is called, 'order' and has the default value of 'ASC'.
* The only other value that will be acceptable is 'DESC'.
*
* The final argument supported is called, 'fields' and has the default value of
* 'all'. There are multiple other options that can be used instead. Supported
* values are as follows: 'all', 'ids', 'names', and finally
* 'all_with_object_id'.
*
* The fields argument also decides what will be returned. If 'all' or
* 'all_with_object_id' is chosen or the default kept intact, then all matching
* terms objects will be returned. If either 'ids' or 'names' is used, then an
* array of all matching term ids or term names will be returned respectively.
*
* @since 2.3.0 * @since 2.3.0
* *
* @global wpdb $wpdb WordPress database abstraction object. * @global wpdb $wpdb WordPress database abstraction object.
* *
* @param int|array $object_ids The ID(s) of the object(s) to retrieve. * @param int|array $object_ids The ID(s) of the object(s) to retrieve.
* @param string|array $taxonomies The taxonomies to retrieve terms from. * @param string|array $taxonomies The taxonomies to retrieve terms from.
* @param array|string $args Change what is returned * @param array|string $args {
* @return array|WP_Error The requested term data or empty array if no terms found. WP_Error if any of the $taxonomies don't exist. * Array of arguments.
* @type string $orderby Field by which results should be sorted. Accepts 'name' or 'count'. Default 'name'.
* @type string $order Sort order. Accepts 'ASC' or 'DESC'. Default 'ASC'.
* @type string $fields Fields to return for matched terms. Accepts 'all', 'ids', 'names', and
* 'all_with_object_id'. Note that 'all' or 'all_with_object_id' will result in an array of
* term objects being returned, 'ids' will return an array of integers, and 'names' an array
* of strings.
* }
* @return array|WP_Error The requested term data or empty array if no terms found.
* WP_Error if any of the $taxonomies don't exist.
*/ */
function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
global $wpdb; global $wpdb;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31230'; $wp_version = '4.2-alpha-31231';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.