WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/09/2016 10:59:02 PM (5 years ago)
Author:
johnbillion
Message:

Docs: Improve the documentation for parameters which accept OBJECT, ARRAY_A, and ARRAY_N as parameters.

See #37770

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r38832 r39188  
    710710 *                                 will return `$term`.
    711711 * @param string     $taxonomy Optional. Taxonomy name that $term is part of.
    712  * @param string     $output   Constant OBJECT, ARRAY_A, or ARRAY_N
     712 * @param string     $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
     713 *                             a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
    713714 * @param string     $filter   Optional, default is raw or no WordPress defined filter will applied.
    714715 * @return array|WP_Term|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',
     
    817818 * @param string|int $value    Search for this term value
    818819 * @param string     $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'.
    819  * @param string     $output   Constant OBJECT, ARRAY_A, or ARRAY_N
     820 * @param string     $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
     821 *                             a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
    820822 * @param string     $filter   Optional, default is raw or no WordPress defined filter will applied.
    821  * @return WP_Term|bool WP_Term instance on success. Will return false if `$taxonomy` does not exist
    822  *                      or `$term` was not found.
     823 * @return WP_Term|array|false WP_Term instance (or array) on success. Will return false if `$taxonomy` does not exist
     824 *                             or `$term` was not found.
    823825 */
    824826function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
Note: See TracChangeset for help on using the changeset viewer.