generic_ping() improvements from fitztrev. fixes #5855

git-svn-id: https://develop.svn.wordpress.org/trunk@6853 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-14 21:50:43 +00:00
parent c5ad4bdb6e
commit 1101f9750a
1 changed files with 5 additions and 5 deletions

View File

@ -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);
}