WordPress.org

Make WordPress Core

Changeset 45895


Ignore:
Timestamp:
08/26/2019 04:59:53 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Reference WP_Term_Query::__construct() in wp_list_categories() DocBlock for additional accepted arguments.

Clarify that wp_dropdown_categories() always returns a string, regardless of the echo parameter.

See #47896, #47110.

File:
1 edited

Legend:

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

    r45894 r45895  
    289289 * @since 4.6.0 Introduced the `required` argument.
    290290 *
    291  * @param string|array $args {
     291 * @param array|string $args {
    292292 *     Optional. Array or string of arguments to generate a categories drop-down element. See WP_Term_Query::__construct()
    293293 *     for information on additional accepted arguments.
     
    322322 *                                           Default false.
    323323 * }
    324  * @return string HTML content only if 'echo' argument is 0.
     324 * @return string HTML dropdown list of categories.
    325325 */
    326326function wp_dropdown_categories( $args = '' ) {
     
    447447        $output .= "</select>\n";
    448448    }
     449
    449450    /**
    450451     * Filters the taxonomy drop-down output.
     
    460461        echo $output;
    461462    }
     463
    462464    return $output;
    463465}
     
    467469 *
    468470 * @since 2.1.0
    469  * @since 4.4.0 Introduced the `hide_title_if_empty` and `separator` arguments. The `current_category` argument was modified to
    470  *             optionally accept an array of values.
    471  *
    472  * @param string|array $args {
    473  *     Array of optional arguments. See get_categories(), get_terms(), and WP_Tax_Query::construct()
    474  *     for full lists of arguments that can be passed in `$args`.
     471 * @since 4.4.0 Introduced the `hide_title_if_empty` and `separator` arguments.
     472 * @since 4.4.0 The `current_category` argument was modified to optionally accept an array of values.
     473 *
     474 * @param array|string $args {
     475 *     Array of optional arguments. See get_categories(), get_terms(), and WP_Term_Query::__construct()
     476 *     for information on additional accepted arguments.
    475477 *
    476478 *     @type int|array    $current_category      ID of category, or array of IDs of categories, that should get the
     
    504506 *                                               Default 1.
    505507 * }
    506  * @return false|string HTML content only if 'echo' argument is 0.
     508 * @return false|string HTML list of categories only if 'echo' argument is 0.
    507509 */
    508510function wp_list_categories( $args = '' ) {
Note: See TracChangeset for help on using the changeset viewer.