Ticket #14680: 14680.patch
File 14680.patch, 800 bytes (added by , 10 years ago) |
---|
-
wp-includes/comment.php
45 45 if ( 1 == get_option('comment_moderation') ) 46 46 return false; // If moderation is set to manual 47 47 48 $comment = apply_filters( 'comment_text', $comment ); 49 48 50 // Check # of external links 49 51 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 ); 51 53 $num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link 52 54 if ( $num_links >= $max_links ) 53 55 return false;