Make WordPress Core


Ignore:
Timestamp:
06/09/2020 11:12:57 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document that get_tags() returns a WP_Error object if any of the specified taxonomies do not exist.

Props coffee2code.
Fixes #50344.

File:
1 edited

Legend:

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

    r47870 r47930  
    11341134 * @param array|string $args       Optional. Array or string of arguments. See WP_Term_Query::__construct()
    11351135 *                                 for information on accepted arguments. Default empty.
    1136  * @param array|string $deprecated Argument array, when using the legacy function parameter format. If present, this
    1137  *                                 parameter will be interpreted as `$args`, and the first function parameter will
    1138  *                                 be parsed as a taxonomy or array of taxonomies.
    1139  * @return WP_Term[]|int|WP_Error List of WP_Term instances and their children. Will return WP_Error, if any of taxonomies
    1140  *                                do not exist.
     1136 * @param array|string $deprecated Argument array, when using the legacy function parameter format. If present,
     1137 *                                 this parameter will be interpreted as `$args`, and the first function parameter
     1138 *                                 will be parsed as a taxonomy or array of taxonomies.
     1139 * @return WP_Term[]|int|WP_Error Array of WP_Term instances, a count thereof,
     1140 *                                or WP_Error if any of the taxonomies do not exist.
    11411141 */
    11421142function get_terms( $args = array(), $deprecated = '' ) {
Note: See TracChangeset for help on using the changeset viewer.