Changeset 31231 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 01/17/2015 08:08:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r31221 r31231 2553 2553 /** 2554 2554 * Retrieves the terms associated with the given object(s), in the supplied taxonomies. 2555 * 2556 * The following information has to do the $args parameter and for what can be 2557 * contained in the string or array of that parameter, if it exists. 2558 * 2559 * The first argument is called, 'orderby' and has the default value of 'name'. 2560 * The other value that is supported is 'count'. 2561 * 2562 * The second argument is called, 'order' and has the default value of 'ASC'. 2563 * The only other value that will be acceptable is 'DESC'. 2564 * 2565 * The final argument supported is called, 'fields' and has the default value of 2566 * 'all'. There are multiple other options that can be used instead. Supported 2567 * values are as follows: 'all', 'ids', 'names', and finally 2568 * 'all_with_object_id'. 2569 * 2570 * The fields argument also decides what will be returned. If 'all' or 2571 * 'all_with_object_id' is chosen or the default kept intact, then all matching 2572 * terms objects will be returned. If either 'ids' or 'names' is used, then an 2573 * array of all matching term ids or term names will be returned respectively. 2574 * 2555 2575 2556 * @since 2.3.0 2576 2557 * 2577 2558 * @global wpdb $wpdb WordPress database abstraction object. 2578 2559 * 2579 * @param int|array $object_ids The ID(s) of the object(s) to retrieve.2560 * @param int|array $object_ids The ID(s) of the object(s) to retrieve. 2580 2561 * @param string|array $taxonomies The taxonomies to retrieve terms from. 2581 * @param array|string $args Change what is returned 2582 * @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. 2562 * @param array|string $args { 2563 * Array of arguments. 2564 * @type string $orderby Field by which results should be sorted. Accepts 'name' or 'count'. Default 'name'. 2565 * @type string $order Sort order. Accepts 'ASC' or 'DESC'. Default 'ASC'. 2566 * @type string $fields Fields to return for matched terms. Accepts 'all', 'ids', 'names', and 2567 * 'all_with_object_id'. Note that 'all' or 'all_with_object_id' will result in an array of 2568 * term objects being returned, 'ids' will return an array of integers, and 'names' an array 2569 * of strings. 2570 * } 2571 * @return array|WP_Error The requested term data or empty array if no terms found. 2572 * WP_Error if any of the $taxonomies don't exist. 2583 2573 */ 2584 2574 function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
Note: See TracChangeset
for help on using the changeset viewer.