From 10532b93450ea108328a027869e044dfec5160e0 Mon Sep 17 00:00:00 2001 From: scribu Date: Tue, 19 Oct 2010 17:08:32 +0000 Subject: [PATCH] Don't stomp on posts_per_page in get_posts(). Props bobbyblade. Fixes #15150 git-svn-id: http://svn.automattic.com/wordpress/trunk@15852 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 06190c57ae..9ba61f647f 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1205,7 +1205,7 @@ function get_posts($args = null) { $r = wp_parse_args( $args, $defaults ); if ( empty( $r['post_status'] ) ) $r['post_status'] = ( 'attachment' == $r['post_type'] ) ? 'inherit' : 'publish'; - if ( ! empty($r['numberposts']) ) + if ( ! empty($r['numberposts']) && empty($r['posts_per_page']) ) $r['posts_per_page'] = $r['numberposts']; if ( ! empty($r['category']) ) $r['cat'] = $r['category'];