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.
Built from https://develop.svn.wordpress.org/trunk@36005


git-svn-id: http://core.svn.wordpress.org/trunk@35970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-12-18 18:12:25 +00:00
parent 5d46c03508
commit b2f4f73633
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.5-alpha-36003';
$wp_version = '4.5-alpha-36005';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.