Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r10454 r10150  
    4646        return false; // If moderation is set to manual
    4747
    48     if ( get_option('comment_max_links') && preg_match_all("/<[Aa][^>]*[Hh][Rr][Ee][Ff]=['\"]([^\"'>]+)[^>]*>/", apply_filters('comment_text',$comment), $out) >= get_option('comment_max_links') )
     48    if ( get_option('comment_max_links') && preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", apply_filters('comment_text', $comment), $out) >= get_option('comment_max_links') )
    4949        return false; // Check # of external links
    5050
     
    593593
    594594    // Count comments older than this one
    595     $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_approved = '1' AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
     595    $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
    596596
    597597    // No older comments? Then it's page #1.
     
    15811581 */
    15821582function _close_comments_for_old_posts( $posts ) {
    1583     if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') )
     1583    if ( empty($posts) || !is_single() || !get_option('close_comments_for_old_posts') )
    15841584        return $posts;
    15851585
Note: See TracChangeset for help on using the changeset viewer.