WordPress.org

Make WordPress Core

Changeset 15852


Ignore:
Timestamp:
10/19/10 17:08:32 (4 years ago)
Author:
scribu
Message:

Don't stomp on posts_per_page in get_posts(). Props bobbyblade. Fixes #15150

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r15844 r15852  
    12061206    if ( empty( $r['post_status'] ) ) 
    12071207        $r['post_status'] = ( 'attachment' == $r['post_type'] ) ? 'inherit' : 'publish'; 
    1208     if ( ! empty($r['numberposts']) ) 
     1208    if ( ! empty($r['numberposts']) && empty($r['posts_per_page']) ) 
    12091209        $r['posts_per_page'] = $r['numberposts']; 
    12101210    if ( ! empty($r['category']) ) 
Note: See TracChangeset for help on using the changeset viewer.