Make WordPress Core

Changeset 1252


Ignore:
Timestamp:
05/09/2004 10:36:47 PM (20 years ago)
Author:
saxmatt
Message:

Comment count patch from Kitty. http://poker.mookitty.co.uk/

File:
1 edited

Legend:

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

    r1244 r1252  
    13351335function check_comment($author, $email, $url, $comment, $user_ip) {
    13361336    if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual
     1337
     1338    if ( (count(explode('http:', $comment)) - 1) >= get_settings('comment_max_links') )
     1339        return false; // Check # of external links
     1340
    13371341    if ('' == trim( get_settings('moderation_keys') ) ) return true; // If moderation keys are empty
    13381342    $words = explode("\n", get_settings('moderation_keys') );
     
    13471351    }
    13481352
    1349     preg_match_all('|([\n ])([a-z]+?)://([^, <>{}\n\r]+)|i', $comment, $all_links);
    1350     $number = count($all_links[0]);
    1351     if ($number >= get_settings('comment_max_links')) return false;
    1352 
    13531353    return true;
    13541354}
Note: See TracChangeset for help on using the changeset viewer.