[wp-trac] [WordPress Trac] #11684: Comment Moderation Should Count $url
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 14 13:33:35 UTC 2010
#11684: Comment Moderation Should Count $url
-----------------------------+----------------------------------------------
Reporter: miqrogroove | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 3.0
Component: Comments | Version:
Severity: major | Keywords: has-patch
-----------------------------+----------------------------------------------
Comment(by nacin):
I'm saying we could so something like this.
{{{
// Check # of hyperlinks
if ( get_option( 'comment_max_links' ) ) {
$num_links = preg_match_all( '/<a [^>]*href/i',
apply_filters( 'comment_text', $comment ), $out );
if ( apply_filters( 'comment_max_links_include_url', false
) && url ) // Count URL
$num_links++;
if ( $num_links >= get_option( 'comment_max_links' ) )
return false;
}
}}}
The alternative is to omit the filter entirely (or s/false/true/), and
have it count the $url by default.
I agree we should count $url in theory, but since we haven't had it so
long and the default is only 2, it would make a big difference to add it.
Maybe a string change in options-discussion.php. Another option is a
"Include comment author URL" checkbox but that would just complicate an
already complicated form.
That all said, link moderation was partially broken since 2.7 (#11830).
Might as well come up with a new strategy now.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11684#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list