Changeset 1011
- Timestamp:
- 03/25/2004 10:11:58 AM (22 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
wp-admin/options-discussion.php (modified) (4 diffs)
-
wp-admin/upgrade-functions.php (modified) (1 diff)
-
wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-discussion.php
r993 r1011 69 69 <form name="form1" method="post" action="options.php"> 70 70 <input type="hidden" name="action" value="update" /> 71 <input type="hidden" name="page_options" value="'default_pingback_flag','default_ping_status','default_comment_status','comments_notify','moderation_notify','comment_moderation','require_name_email',' moderation_keys'" />72 < p>Usual settings for an article: <em>(These settings may be overidden for individual articles.)</em></p>71 <input type="hidden" name="page_options" value="'default_pingback_flag','default_ping_status','default_comment_status','comments_notify','moderation_notify','comment_moderation','require_name_email','comment_max_links','moderation_keys'" /> 72 <h3>Usual settings for an article: <em>(These settings may be overidden for individual articles.)</em></h3> 73 73 <ul> 74 74 <li> … … 88 88 </li> 89 89 </ul> 90 < p>Email me whenever:</p>90 <h3>Email me whenever:</h3> 91 91 <ul> 92 92 <li> … … 101 101 </li> 102 102 </ul> 103 < p>Before a comment appears:</p>103 <h3>Before a comment appears:</h3> 104 104 <ul> 105 105 <li> … … 114 114 </li> 115 115 </ul> 116 <p>When a comment contains any of these words in its content, name, URI, email, or IP, hold it in the moderation queue: (Seperate multiple words with new lines.) <a href="http://wiki.wordpress.org/index.php/SpamWords">Common spam words</a>.</p> 116 <h3>Comment Moderation:</h3> 117 <p>Hold a comment in the queue if it contains more than 118 <input name="comment_max_links" type="text" id="comment_max_links" size="3" value="<?php echo get_settings('comment_max_links'); ?>" /> 119 links. (A common characteristic of comment spam is a large number of hyperlinks.)</p> 120 <p>When a comment contains any of these words in its content, name, URI, email, or IP, hold it in the moderation queue: (Seperate multiple words with new lines.) <a href="http://wiki.wordpress.org/index.php/SpamWords">Common spam words</a>.</p> 117 121 <p> 118 122 <textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%;"><?php echo get_settings('moderation_keys'); ?></textarea> -
trunk/wp-admin/upgrade-functions.php
r1008 r1011 795 795 } 796 796 797 // Option for max # of links per comment 798 if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'comment_max_links'")) { 799 $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_admin_level) VALUES ('comment_max_links', 3, '5', 8)"); 800 } 801 797 802 } 798 803 -
trunk/wp-includes/functions.php
r1009 r1011 1578 1578 if ( preg_match($pattern, $user_ip) ) return false; 1579 1579 } 1580 1581 preg_match_all('|([\n ])([a-z]+?)://([^, <>{}\n\r]+)|i', $comment, $all_links); 1582 $number = count($all_links[0]); 1583 if ($number >= get_settings('comment_max_links')) return false; 1584 1580 1585 return true; 1581 1586 }
Note: See TracChangeset
for help on using the changeset viewer.