Changeset 27456
- Timestamp:
- 03/07/2014 06:58:33 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r27455 r27456 2249 2249 } 2250 2250 $post_type = $q['post_type']; 2251 if ( ! isset( $q['posts_per_page'] ) || $q['posts_per_page'] == 0 ) { 2252 if ( $this->is_feed ) { 2253 $q['posts_per_page'] = get_option( 'posts_per_rss' ); 2254 } else { 2255 $q['posts_per_page'] = get_option( 'posts_per_page' ); 2256 } 2251 if ( empty( $q['posts_per_page'] ) ) { 2252 $q['posts_per_page'] = get_option( 'posts_per_page' ); 2257 2253 } 2258 2254 if ( isset($q['showposts']) && $q['showposts'] ) { … … 2270 2266 } 2271 2267 if ( $this->is_feed ) { 2268 // This overrides posts_per_page. 2269 if ( ! empty( $q['posts_per_rss'] ) ) { 2270 $q['posts_per_page'] = $q['posts_per_rss']; 2271 } else { 2272 $q['posts_per_page'] = get_option( 'posts_per_rss' ); 2273 } 2272 2274 $q['nopaging'] = false; 2273 2275 } -
trunk/tests/phpunit/tests/query.php
r27455 r27456 103 103 104 104 function filter_posts_per_page( &$query ) { 105 $query->set( 'posts_per_ page', 30 );105 $query->set( 'posts_per_rss', 30 ); 106 106 } 107 107 }
Note: See TracChangeset
for help on using the changeset viewer.