WordPress.org

Make WordPress Core

Ticket #5224: comment.php.diff

File comment.php.diff, 683 bytes (added by chmac, 7 years ago)
  • comment.php

    old new  
    724724                                $post_links[] = $link_test; 
    725725                        elseif ( ($test['path'] != '/') && ($test['path'] != '') ) 
    726726                                $post_links[] = $link_test; 
    727727                endif; 
    728728        endforeach; 
     729         
     730        // Now we get rid of any pings to ourself 
     731        foreach ($post_links as $key => $current_link) { 
     732                if (!strstr(strtolower($current_link),get_option('home'))) { 
     733                        unset($post_links[$key]); 
     734                } 
     735        } 
    729736 
    730737        do_action_ref_array('pre_ping', array(&$post_links, &$pung)); 
    731738 
    732739        foreach ( (array) $post_links as $pagelinkedto ) { 
    733740                $pingback_server_url = discover_pingback_server_uri($pagelinkedto, 2048);