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.

Merges [36005] to the 4.4 branch.

Props gblsm, hnle.
Fixes #35156.

Built from https://develop.svn.wordpress.org/branches/4.4@36006


git-svn-id: http://core.svn.wordpress.org/branches/4.4@35971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-12-18 18:14:21 +00:00
parent 72a264e9c0
commit 25543e5450
2 changed files with 3 additions and 3 deletions

View File

@ -550,11 +550,11 @@ function wp_list_categories( $args = '' ) {
$exclude_tree = array();
if ( $r['exclude_tree'] ) {
$exclude_tree = array_merge( $exclude_tree, (array) $r['exclude_tree'] );
$exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude_tree'] ) );
}
if ( $r['exclude'] ) {
$exclude_tree = array_merge( $exclude_tree, (array) $r['exclude'] );
$exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude'] ) );
}
$r['exclude_tree'] = $exclude_tree;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4.1-alpha-36004';
$wp_version = '4.4.1-alpha-36006';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.