Make WordPress Core


Ignore:
Timestamp:
07/23/2020 09:53:43 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Miscellaneous DocBlock corrections.

See #49572.

File:
1 edited

Legend:

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

    r48590 r48591  
    840840 * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
    841841 *
    842  * @param int|WP_Term|object $term     If integer, term data will be fetched from the database, or from the cache if
    843  *                                     available. If stdClass object (as in the results of a database query), will apply
    844  *                                     filters and return a `WP_Term` object corresponding to the `$term` data. If
    845  *                                     `WP_Term`, will return `$term`.
    846  * @param string             $taxonomy Optional. Taxonomy name that $term is part of.
     842 * @param int|WP_Term|object $term     If integer, term data will be fetched from the database,
     843 *                                     or from the cache if available.
     844 *                                     If stdClass object (as in the results of a database query),
     845 *                                     will apply filters and return a `WP_Term` object with the `$term` data.
     846 *                                     If `WP_Term`, will return `$term`.
     847 * @param string             $taxonomy Optional. Taxonomy name that `$term` is part of.
    847848 * @param string             $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
    848  *                                     correspond toa WP_Term object, an associative array, or a numeric array
     849 *                                     correspond to a WP_Term object, an associative array, or a numeric array,
    849850 *                                     respectively. Default OBJECT.
    850851 * @param string             $filter   Optional. How to sanitize term fields. Default 'raw'.
    851  * @return WP_Term|array|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',
    852  *                                     a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is
    853  *                                     returned. Returns null for miscellaneous failure.
     852 * @return WP_Term|array|WP_Error|null WP_Term instance (or array) on success, depending on the `$output` value.
     853 *                                     WP_Error if `$taxonomy` does not exist. Null for miscellaneous failure.
    854854 */
    855855function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
     
    957957 * @param string|int $value    Search for this term value.
    958958 * @param string     $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'.
    959  * @param string     $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
    960  *                             a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
     959 * @param string     $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
     960 *                             correspond to a WP_Term object, an associative array, or a numeric array,
     961 *                             respectively. Default OBJECT.
    961962 * @param string     $filter   Optional. How to sanitize term fields. Default 'raw'.
    962  * @return WP_Term|array|false WP_Term instance (or array) on success. Will return false if `$taxonomy` does not exist
    963  *                             or `$term` was not found.
     963 * @return WP_Term|array|false WP_Term instance (or array) on success, depending on the `$output` value.
     964 *                             False if `$taxonomy` does not exist or `$term` was not found.
    964965 */
    965966function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
Note: See TracChangeset for help on using the changeset viewer.