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:
nacin 2011-07-28 17:30:18 +00:00
parent 3209c103dc
commit be2717a50f
1 changed files with 4 additions and 2 deletions

View File

@ -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 );