WordPress.org

Make WordPress Core

Ticket #14680: 14680.patch

File 14680.patch, 800 bytes (added by hakre, 9 years ago)
  • wp-includes/comment.php

     
    4545        if ( 1 == get_option('comment_moderation') )
    4646                return false; // If moderation is set to manual
    4747
     48        $comment = apply_filters( 'comment_text', $comment );
     49
    4850        // Check # of external links
    4951        if ( $max_links = get_option( 'comment_max_links' ) ) {
    50                 $num_links = preg_match_all( '/<a [^>]*href/i', apply_filters( 'comment_text', $comment ), $out );
     52                $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
    5153                $num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
    5254                if ( $num_links >= $max_links )
    5355                        return false;