mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
5d46c03508
commit
b2f4f73633
@ -550,11 +550,11 @@ function wp_list_categories( $args = '' ) {
|
|||||||
$exclude_tree = array();
|
$exclude_tree = array();
|
||||||
|
|
||||||
if ( $r['exclude_tree'] ) {
|
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'] ) {
|
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;
|
$r['exclude_tree'] = $exclude_tree;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user