[wp-cvs] wordpress/wp-includes template-functions-general.php, 1.55, 1.56

Michel Valdrighi michelvaldrighi at users.sourceforge.net
Mon Oct 18 23:52:38 UTC 2004


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

Modified Files:
	template-functions-general.php 
Log Message:
better fix for single_month_title, preserves backward-compatibility with 

Index: template-functions-general.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-general.php,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** template-functions-general.php	18 Oct 2004 23:45:26 -0000	1.55
--- template-functions-general.php	18 Oct 2004 23:52:36 -0000	1.56
***************
*** 217,229 ****
  
  function single_month_title($prefix = '', $display = true ) {
! 	global $monthnum, $month, $year;
! 	if(!empty($monthnum)) {
  		$my_year = $year;
  		$my_month = $month[$monthnum];
! 		if ($display) {
! 			echo $prefix . $my_month . $prefix . " " . $my_year;
! 		} else {
! 			return $monthnum;
! 		}
  	}
  }
--- 217,233 ----
  
  function single_month_title($prefix = '', $display = true ) {
! 	global $m, $monthnum, $month, $year;
! 	if(!empty($monthnum) && !empty($year)) {
  		$my_year = $year;
  		$my_month = $month[$monthnum];
! 	} elseif(!empty($m)) {
! 		$my_year = substr($m, 0, 4);
! 		$my_month = $month[substr($m, 4, 2)];
! 	}
! 
! 	if (!empty($my_month) && $display) {
! 		echo $prefix . $my_month . $prefix . $my_year;
! 	} else {
! 		return $monthnum;
  	}
  }




More information about the cvs mailing list