removed preg_match check from comment_type() since by now we should never ever need it
git-svn-id: https://develop.svn.wordpress.org/trunk@1826 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
18c485e15a
commit
b06c7e026d
@ -171,14 +171,15 @@ function comment_author_link() {
|
||||
|
||||
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;
|
||||
switch($comment->comment_type) {
|
||||
case 'trackback':
|
||||
echo $trackbacktxt;
|
||||
break;
|
||||
case 'pingback':
|
||||
echo $pingbacktxt;
|
||||
break;
|
||||
default:
|
||||
echo $commenttxt;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user