Make WordPress Core

Ticket #47896: 47896.2.diff

File 47896.2.diff, 1.7 KB (added by itowhid06, 6 years ago)
  • src/wp-includes/category-template.php

    diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php
    index e3729dfaa9..d1d5e3f420 100644
    a b function wp_dropdown_categories( $args = '' ) { 
    494494 *                                               the list. Default false (title will always be shown).
    495495 *     @type bool         $hierarchical          Whether to include terms that have non-empty descendants.
    496496 *                                               See get_terms(). Default true.
     497 *     @type array|string $include               Array or comma/space-separated string of term ids to include.
     498 *                                               See get_terms(). Default empty string.
    497499 *     @type string       $order                 Which direction to order categories. Accepts 'ASC' or 'DESC'.
    498500 *                                               Default 'ASC'.
    499501 *     @type string       $orderby               The column to use for ordering categories. Default 'name'.
    function wp_list_categories( $args = '' ) { 
    519521                'current_category'    => 0,
    520522                'depth'               => 0,
    521523                'echo'                => 1,
     524                'include'             => '',
    522525                'exclude'             => '',
    523526                'exclude_tree'        => '',
    524527                'feed'                => '',
    function wp_list_categories( $args = '' ) { 
    565568                $parsed_args['class'] = ( 'category' == $parsed_args['taxonomy'] ) ? 'categories' : $parsed_args['taxonomy'];
    566569        }
    567570
     571        if ( ! empty( $args['include'] ) ) {
     572                $parsed_args['include'] = $args['include'];
     573        }
     574
    568575        if ( ! taxonomy_exists( $parsed_args['taxonomy'] ) ) {
    569576                return false;
    570577        }