WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/30/2019 11:34:11 AM (7 weeks ago)
Author:
johnbillion
Message:

Docs: Correct and improve inline docs relating to caching, terms, meta, and some misc tweaks.

See #47110

File:
1 edited

Legend:

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

    r45893 r45915  
    215215 * @global array $wp_taxonomies The registered taxonomies.
    216216 *
    217  * @param array|string|WP_Post $object Name of the type of taxonomy object, or an object (row from posts)
    218  * @param string               $output Optional. The type of output to return in the array. Accepts either
    219  *                                     taxonomy 'names' or 'objects'. Default 'names'.
    220  * @return array The names of all taxonomy of $object_type.
     217 * @param string|string[]|WP_Post $object Name of the type of taxonomy object, or an object (row from posts)
     218 * @param string                  $output Optional. The type of output to return in the array. Accepts either
     219 *                                       'names' or 'objects'. Default 'names'.
     220 * @return string[]|WP_Taxonomy[] The names or objects of all taxonomies of `$object_type`.
    221221 */
    222222function get_object_taxonomies( $object, $output = 'names' ) {
     
    19601960 * @since 4.7.0 Refactored to use WP_Term_Query, and to support any WP_Term_Query arguments.
    19611961 *
    1962  * @param int|array    $object_ids The ID(s) of the object(s) to retrieve.
    1963  * @param string|array $taxonomies The taxonomies to retrieve terms from.
    1964  * @param array|string $args       See WP_Term_Query::__construct() for supported arguments.
     1962 * @param int|int[]       $object_ids The ID(s) of the object(s) to retrieve.
     1963 * @param string|string[] $taxonomies The taxonomy names to retrieve terms from.
     1964 * @param array|string    $args       See WP_Term_Query::__construct() for supported arguments.
    19651965 * @return array|WP_Error The requested term data or empty array if no terms found.
    1966  *                        WP_Error if any of the $taxonomies don't exist.
     1966 *                        WP_Error if any of the taxonomies don't exist.
    19671967 */
    19681968function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
     
    19931993     * @since 4.9.0
    19941994     *
    1995      * @param array        $args       An array of arguments for retrieving terms for the given object(s).
    1996      *                                 See {@see wp_get_object_terms()} for details.
    1997      * @param int|array    $object_ids Object ID or array of IDs.
    1998      * @param string|array $taxonomies The taxonomies to retrieve terms from.
     1995     * @param array    $args       An array of arguments for retrieving terms for the given object(s).
     1996     *                             See {@see wp_get_object_terms()} for details.
     1997     * @param int[]    $object_ids Array of object IDs.
     1998     * @param string[] $taxonomies Array of taxonomy names to retrieve terms from.
    19991999     */
    20002000    $args = apply_filters( 'wp_get_object_terms_args', $args, $object_ids, $taxonomies );
     
    20402040     * @since 4.2.0
    20412041     *
    2042      * @param array $terms      An array of terms for the given object or objects.
    2043      * @param array $object_ids Array of object IDs for which `$terms` were retrieved.
    2044      * @param array $taxonomies Array of taxonomies from which `$terms` were retrieved.
    2045      * @param array $args       An array of arguments for retrieving terms for the given
    2046      *                          object(s). See wp_get_object_terms() for details.
     2042     * @param array    $terms      Array of terms for the given object or objects.
     2043     * @param int[]    $object_ids Array of object IDs for which terms were retrieved.
     2044     * @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
     2045     * @param array    $args       Array of arguments for retrieving terms for the given
     2046     *                             object(s). See wp_get_object_terms() for details.
    20472047     */
    20482048    $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );
     
    20592059     * @since 2.8.0
    20602060     *
    2061      * @param array     $terms      An array of terms for the given object or objects.
    2062      * @param int|array $object_ids Object ID or array of IDs.
    2063      * @param string    $taxonomies SQL-formatted (comma-separated and quoted) list of taxonomy names.
    2064      * @param array     $args       An array of arguments for retrieving terms for the given object(s).
    2065      *                              See wp_get_object_terms() for details.
     2061     * @param array    $terms      Array of terms for the given object or objects.
     2062     * @param int[]    $object_ids Array of object IDs for which terms were retrieved.
     2063     * @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
     2064     * @param array    $args       Array of arguments for retrieving terms for the given
     2065     *                             object(s). See wp_get_object_terms() for details.
    20662066     */
    20672067    return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
     
    24222422 * @param string           $taxonomy  The context in which to relate the term to the object.
    24232423 * @param bool             $append    Optional. If false will delete difference of terms. Default false.
    2424  * @return array|WP_Error Term taxonomy IDs of the affected terms.
     2424 * @return array|WP_Error Term taxonomy IDs of the affected terms or WP_Error on failure.
    24252425 */
    24262426function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
     
    33663366 * @since 2.3.0
    33673367 *
    3368  * @param string|array $object_ids  Comma-separated list or array of term object IDs.
    3369  * @param array|string $object_type The taxonomy object type.
     3368 * @param string|int[]    $object_ids  Comma-separated list or array of term object IDs.
     3369 * @param string|string[] $object_type The taxonomy object type or array of the same.
    33703370 * @return void|false False if all of the terms in `$object_ids` are already cached.
    33713371 */
Note: See TracChangeset for help on using the changeset viewer.