removed preg_match check from comment_type() since by now we should never ever need it
git-svn-id: http://svn.automattic.com/wordpress/trunk@1826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6d4a7e7228
commit
fdfcddbaf7
|
@ -171,13 +171,14 @@ function comment_author_link() {
|
||||||
|
|
||||||
function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {
|
function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {
|
||||||
global $comment;
|
global $comment;
|
||||||
if (preg_match('|<trackback />|', $comment->comment_content)
|
switch($comment->comment_type) {
|
||||||
|| ('trackback' == $comment->comment_type)) {
|
case 'trackback':
|
||||||
echo $trackbacktxt;
|
echo $trackbacktxt;
|
||||||
} elseif (preg_match('|<pingback />|', $comment->comment_content)
|
break;
|
||||||
|| ('pingback' == $comment->comment_type)) {
|
case 'pingback':
|
||||||
echo $pingbacktxt;
|
echo $pingbacktxt;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
echo $commenttxt;
|
echo $commenttxt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue