mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Fire _deprecated_argument() for get_adjacent_post()'s crazy excluded_categories 'and' thing. fixes #17673.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3209c103dc
commit
be2717a50f
@ -1119,10 +1119,12 @@ function get_adjacent_post( $in_same_cat = false, $excluded_categories = '', $pr
|
||||
if ( ! empty( $excluded_categories ) ) {
|
||||
if ( ! is_array( $excluded_categories ) ) {
|
||||
// back-compat, $excluded_categories used to be IDs separated by " and "
|
||||
if ( strpos( $excluded_categories, ' and ' ) !== false )
|
||||
if ( strpos( $excluded_categories, ' and ' ) !== false ) {
|
||||
_deprecated_argument( __FUNCTION__, '3.3', sprintf( __( 'Use commas instead of %s to separate excluded categories.' ), "'and'" ) );
|
||||
$excluded_categories = explode( ' and ', $excluded_categories );
|
||||
else
|
||||
} else {
|
||||
$excluded_categories = explode( ',', $excluded_categories );
|
||||
}
|
||||
}
|
||||
|
||||
$excluded_categories = array_map( 'intval', $excluded_categories );
|
||||
|
Loading…
x
Reference in New Issue
Block a user