Make WordPress Core


Ignore:
Timestamp:
12/18/2015 06:11:44 PM (10 years ago)
Author:
boonebgorges
Message:

Ensure that wp_list_categories() supports comma-separated lists for 'exclude' and 'exclude_tree'.

[34696] introduced a regression whereby comma-separated values for 'exclude'
and 'exclude_tree' would be handled improperly when merging the two parameters,
resulting in category IDs being incorrectly dropped from the combined array.

Props gblsm, hnle.
Fixes #35156.

File:
1 edited

Legend:

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

    r35984 r36005  
    551551
    552552        if ( $r['exclude_tree'] ) {
    553             $exclude_tree = array_merge( $exclude_tree, (array) $r['exclude_tree'] );
     553            $exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude_tree'] ) );
    554554        }
    555555
    556556        if ( $r['exclude'] ) {
    557             $exclude_tree = array_merge( $exclude_tree, (array) $r['exclude'] );
     557            $exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude'] ) );
    558558        }
    559559
Note: See TracChangeset for help on using the changeset viewer.