[wp-cvs] wordpress/wp-includes classes.php,1.22,1.23

Ryan Boren rboren at users.sourceforge.net
Wed Oct 27 23:58:42 UTC 2004


Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30806/wp-includes

Modified Files:
	classes.php 
Log Message:
Add $post_per_archive_page to override the number of posts to show for an archive page.  Turn off paging if $post_per_* are set to -1.

Index: classes.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/classes.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** classes.php	8 Oct 2004 08:06:21 -0000	1.22
--- classes.php	27 Oct 2004 23:58:40 -0000	1.23
***************
*** 213,217 ****
  			$q['posts_per_page'] = $q['showposts'];
  		}
! 
  		$add_hours = intval(get_settings('gmt_offset'));
  		$add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
--- 213,226 ----
  			$q['posts_per_page'] = $q['showposts'];
  		}
! 		if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && (is_archive() || is_search()) )
! 			$q['posts_per_page'] = $q['posts_per_archive_page'];
! 		if ( !isset($q['nopaging']) ) {
! 			if ($q['posts_per_page'] == -1) {
! 				$q['nopaging'] = true;
! 			} else {
! 				$q['nopaging'] = false;
! 			}
! 		}
! 	
  		$add_hours = intval(get_settings('gmt_offset'));
  		$add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));




More information about the cvs mailing list