From bd4d154c1fea98ffdd22603d9c042f98c0a133de Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 6 Nov 2005 04:02:12 +0000 Subject: [PATCH] Protection against multiple trackbacks in one bunch from markjaquith. fixes #1817 git-svn-id: http://svn.automattic.com/wordpress/trunk@2996 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 6da26fbdac..e90ddedcc7 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -622,8 +622,10 @@ function do_trackbacks($post_id) { if ($to_ping) : foreach ($to_ping as $tb_ping) : $tb_ping = trim($tb_ping); - if ( !in_array($tb_ping, $pinged) ) - trackback($tb_ping, $post_title, $excerpt, $post_id); + if ( !in_array($tb_ping, $pinged) ) { + trackback($tb_ping, $post_title, $excerpt, $post_id); + $pinged[] = $tb_ping; + } endforeach; endif; }