WordPress.org

Make WordPress Core

Changeset 31855


Ignore:
Timestamp:
03/20/2015 08:10:22 PM (6 years ago)
Author:
DrewAPicture
Message:

Supplement hook documentation for the get_terms_fields filter to more clearly explain the expected consequences of using it to modify the fields to select in a terms query.

Props boonebgorges.
Fixes #31174.

File:
1 edited

Legend:

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

    r31813 r31855  
    15611561 *
    15621562 * The 'get_terms_orderby' filter passes the ORDER BY clause for the query
    1563  * along with the $args array.
    1564  *
    1565  * The 'get_terms_fields' filter passes the fields for the SELECT query
    15661563 * along with the $args array.
    15671564 *
     
    19341931     * Filter the fields to select in the terms query.
    19351932     *
     1933     * Field lists modified using this filter will only modify the term fields returned
     1934     * by the function when the `$fields` parameter set to 'count' or 'all'. In all other
     1935     * cases, the term fields in the results array will be determined by the `$fields`
     1936     * parameter alone.
     1937     *
     1938     * Use of this filter can result in unpredictable behavior, and is not recommended.
     1939     *
    19361940     * @since 2.8.0
    19371941     *
Note: See TracChangeset for help on using the changeset viewer.