Protection against multiple trackbacks in one bunch from markjaquith. fixes #1817

git-svn-id: https://develop.svn.wordpress.org/trunk@2996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-11-06 04:02:12 +00:00
parent c244bfd360
commit 0c2daa617d
1 changed files with 4 additions and 2 deletions

View File

@ -622,8 +622,10 @@ function do_trackbacks($post_id) {
if ($to_ping) : foreach ($to_ping as $tb_ping) : if ($to_ping) : foreach ($to_ping as $tb_ping) :
$tb_ping = trim($tb_ping); $tb_ping = trim($tb_ping);
if ( !in_array($tb_ping, $pinged) ) if ( !in_array($tb_ping, $pinged) ) {
trackback($tb_ping, $post_title, $excerpt, $post_id); trackback($tb_ping, $post_title, $excerpt, $post_id);
$pinged[] = $tb_ping;
}
endforeach; endif; endforeach; endif;
} }