[wp-cvs]
wordpress/wp-includes template-functions-comment.php, 1.33, 1.34
Michel Valdrighi
michelvaldrighi at users.sourceforge.net
Fri Oct 22 15:51:10 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12905/wp-includes
Modified Files:
template-functions-comment.php
Log Message:
removed preg_match check from comment_type() since by now we should never ever need it
Index: template-functions-comment.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-comment.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** template-functions-comment.php 11 Oct 2004 22:07:09 -0000 1.33
--- template-functions-comment.php 22 Oct 2004 15:51:08 -0000 1.34
***************
*** 172,183 ****
function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {
global $comment;
! if (preg_match('|<trackback />|', $comment->comment_content)
! || ('trackback' == $comment->comment_type)) {
! echo $trackbacktxt;
! } elseif (preg_match('|<pingback />|', $comment->comment_content)
! || ('pingback' == $comment->comment_type)) {
! echo $pingbacktxt;
! } else {
! echo $commenttxt;
}
}
--- 172,184 ----
function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {
global $comment;
! switch($comment->comment_type) {
! case 'trackback':
! echo $trackbacktxt;
! break;
! case 'pingback':
! echo $pingbacktxt;
! break;
! default:
! echo $commenttxt;
}
}
More information about the cvs
mailing list