Ticket #17853: posts_per_rss_patch.diff
File posts_per_rss_patch.diff, 1.0 KB (added by , 13 years ago) |
---|
-
query.php
1984 1984 $q['post_type'] = ''; 1985 1985 } 1986 1986 $post_type = $q['post_type']; 1987 if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 ) 1988 $q['posts_per_page'] = get_option('posts_per_page'); 1987 if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 ) { 1988 if ( $this->is_feed ) { 1989 $q['posts_per_page'] = get_option('posts_per_rss'); 1990 } 1991 else { 1992 $q['posts_per_page'] = get_option('posts_per_page'); 1993 } 1994 } 1989 1995 if ( isset($q['showposts']) && $q['showposts'] ) { 1990 1996 $q['showposts'] = (int) $q['showposts']; 1991 1997 $q['posts_per_page'] = $q['showposts']; … … 1999 2005 $q['nopaging'] = false; 2000 2006 } 2001 2007 } 2002 if ( $this->is_feed ) {2003 $q['posts_per_page'] = get_option('posts_per_rss');2004 $q['nopaging'] = false;2005 }2006 2008 $q['posts_per_page'] = (int) $q['posts_per_page']; 2007 2009 if ( $q['posts_per_page'] < -1 ) 2008 2010 $q['posts_per_page'] = abs($q['posts_per_page']);