Ticket #25380: 25380.2.diff
File 25380.2.diff, 1.0 KB (added by , 11 years ago) |
---|
-
wp-includes/query.php
2248 2248 $q['post_type'] = ''; 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'] ) { 2259 2255 $q['showposts'] = (int) $q['showposts']; … … 2269 2265 } 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 } 2274 2276 $q['posts_per_page'] = (int) $q['posts_per_page'];