From 1857fc16272a5adf44ff71ef7010441b635423d0 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 14 Feb 2008 21:50:43 +0000 Subject: [PATCH] generic_ping() improvements from fitztrev. fixes #5855 git-svn-id: http://svn.automattic.com/wordpress/trunk@6853 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 67b488a6d..a90f7cb4f 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1061,11 +1061,11 @@ function do_trackbacks($post_id) { */ function generic_ping($post_id = 0) { $services = get_option('ping_sites'); - $services = preg_replace("|(\s)+|", '$1', $services); // Kill dupe lines - $services = trim($services); - if ( '' != $services ) { - $services = explode("\n", $services); - foreach ( (array) $services as $service ) + + $services = explode("\n", $services); + foreach ( (array) $services as $service ) { + $service = trim($service); + if ( '' != $service ) weblog_ping($service); }