No need to re-map the return values of `wp_parse_id_list()` to int.
See #22074, #11823. Built from https://develop.svn.wordpress.org/trunk@25169 git-svn-id: http://core.svn.wordpress.org/trunk@25145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0624fe960b
commit
7c1ea6c95c
|
@ -3680,14 +3680,14 @@ function get_pages($args = '') {
|
||||||
$hierarchical = false;
|
$hierarchical = false;
|
||||||
$incpages = wp_parse_id_list( $include );
|
$incpages = wp_parse_id_list( $include );
|
||||||
if ( ! empty( $incpages ) )
|
if ( ! empty( $incpages ) )
|
||||||
$inclusions = ' AND ID IN (' . implode( ',', array_map( 'intval', $incpages ) ) . ')';
|
$inclusions = ' AND ID IN (' . implode( ',', $incpages ) . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$exclusions = '';
|
$exclusions = '';
|
||||||
if ( ! empty( $exclude ) ) {
|
if ( ! empty( $exclude ) ) {
|
||||||
$expages = wp_parse_id_list( $exclude );
|
$expages = wp_parse_id_list( $exclude );
|
||||||
if ( ! empty( $expages ) )
|
if ( ! empty( $expages ) )
|
||||||
$exclusions = ' AND ID NOT IN (' . implode( ',', array_map( 'intval', $expages ) ) . ')';
|
$exclusions = ' AND ID NOT IN (' . implode( ',', $expages ) . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$author_query = '';
|
$author_query = '';
|
||||||
|
|
|
@ -1304,7 +1304,7 @@ function get_terms($taxonomies, $args = '') {
|
||||||
if ( ! empty( $include ) ) {
|
if ( ! empty( $include ) ) {
|
||||||
$exclude = '';
|
$exclude = '';
|
||||||
$exclude_tree = '';
|
$exclude_tree = '';
|
||||||
$inclusions = implode( ',', array_map( 'intval', wp_parse_id_list( $include ) ) );
|
$inclusions = implode( ',', wp_parse_id_list( $include ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $inclusions ) )
|
if ( ! empty( $inclusions ) )
|
||||||
|
@ -1325,7 +1325,7 @@ function get_terms($taxonomies, $args = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $exclude ) ) {
|
if ( ! empty( $exclude ) ) {
|
||||||
$exterms = array_map( 'intval', wp_parse_id_list( $exclude ) );
|
$exterms = wp_parse_id_list( $exclude );
|
||||||
if ( empty( $exclusions ) )
|
if ( empty( $exclusions ) )
|
||||||
$exclusions = implode( ',', $exterms );
|
$exclusions = implode( ',', $exterms );
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue