From be2717a50f959657571db655dcb0e3e3bbcaa82d Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@18478 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 7d00ca9ad..aead30584 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 );