From 01c45f4bade1363363e59fb31fc33356cf67c799 Mon Sep 17 00:00:00 2001 From: westi Date: Tue, 9 Nov 2010 10:14:38 +0000 Subject: [PATCH] Mark the calling of wp_get_recent_posts() with just a count as deprecated - only use in core was from XMLRPC. git-svn-id: http://svn.automattic.com/wordpress/trunk@16255 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 061276f29f..26382356eb 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2254,9 +2254,11 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array( */ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) { - if ( is_numeric( $args ) ) + if ( is_numeric( $args ) ) { + _deprecated_argument( __FUNCTION__, '3.1', __('Passing an integer number of posts is deprecated pass an array instead.' ) ); $args = array( 'numberposts' => absint( $args ) ); - + } + // Set default arguments $defaults = array( 'numberposts' => 10, 'offset' => 0,