WordPress.org

Make WordPress Core

Ticket #5224: 5224.2.patch

File 5224.2.patch, 973 bytes (added by Viper007Bond, 7 years ago)

Avoid function name collisions with the plugin

  • comment.php

     
    752752} 
    753753 
    754754 
     755// Don't self-ping by Michael D. Adams 
     756function remove_self_pings( &$links ) { 
     757        $home = get_option( 'home' ); 
     758        foreach ( $links as $l => $link ) 
     759                if ( 0 === strpos( $link, $home ) ) 
     760                        unset($links[$l]); 
     761} 
     762 
     763 
    755764function privacy_ping_filter($sites) { 
    756765        if ( '0' != get_option('blog_public') ) 
    757766                return $sites; 
  • default-filters.php

     
    133133add_filter('comment_flood_filter', 'wp_throttle_comment_flood', 10, 3); 
    134134add_filter('pre_comment_content', 'wp_rel_nofollow', 15); 
    135135add_filter('comment_email', 'antispambot'); 
     136add_filter('pre_ping', 'remove_self_pings'); 
    136137 
    137138// Actions 
    138139add_action('wp_head', 'rsd_link');