From d367634aeaba90872f0beccbc0960556e96adfbf Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 28 Jul 2011 17:30:18 +0000 Subject: [PATCH] Fire _deprecated_argument() for get_adjacent_post()'s crazy excluded_categories 'and' thing. fixes #17673. git-svn-id: https://develop.svn.wordpress.org/trunk@18478 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/link-template.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 7d00ca9ad4..aead305847 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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 );