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/category.php

    r37985 r39188  
    8383 *
    8484 * @param int|object $category Category ID or Category row object
    85  * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
     85 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a
     86 *                       WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
    8687 * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
    8788 * @return object|array|WP_Error|null Category data in type defined by $output parameter.
     
    114115 *
    115116 * @param string $category_path URL containing category slugs.
    116  * @param bool $full_match Optional. Whether full path should be matched.
    117  * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
    118  * @return object|array|WP_Error|void Type is based on $output value.
     117 * @param bool   $full_match    Optional. Whether full path should be matched.
     118 * @param string $output        Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
     119 *                              a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
     120 * @return WP_Term|array|WP_Error|null Type is based on $output value.
    119121 */
    120122function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) {
     
    297299 * @since 2.3.0
    298300 *
    299  * @param int|object $tag
    300  * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
    301  * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
    302  * @return object|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it does not exist.
     301 * @param int|WP_Term|object $tag    A tag ID or object.
     302 * @param string             $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
     303 *                                   a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
     304 * @param string             $filter Optional. Default is raw or no WordPress defined filter will applied.
     305 * @return WP_Term|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it does not exist.
    303306 */
    304307function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
Note: See TracChangeset for help on using the changeset viewer.