[wp-hackers] Addition to check_comment(): return false if thepost
is older than 21 days
Owen Winkler
ringmaster at midnightcircus.com
Sat Oct 2 12:21:31 UTC 2004
> Here is a basic example of a plugin that uses this:
>
> <?php
> function superheros($comment_score){
> global $author;
This is what I was talking about regarding a structure to pass comment data.
The comment data isn't easily or intuitively accessed like this from the
plugin. If you're going to do it this way, try passing a whole struct to
the plugin.
I'm still not convinced of this method working because it assumes that
you're only going to want to rate a message based on how spammy it is.
There may be other reasons to chuck a message to moderation besides whether
it contains a word, like whether the post has reached a certain age. Even
if you modded the score up +1000, downchain plugins could rewrite this and
negate any effect of what should have been an indisputable action.
Owen
More information about the hackers
mailing list