[wp-hackers] possible permanent post and edit page modifications
Shelley Powers
shelleyp at burningbird.net
Fri Jul 23 14:23:50 UTC 2004
> Well, when I made the change was pre-plugin. Could this be done with a
> plug-in? Not really, at least, not for setting the moderated status.
> And I also provide a display when a specific post is moderated, and
> that woudln't work with a plug-in.
>
> The thing is that the code to update the database is embedded directly
> in the wp-post-comment.php page. I don't see how a plugin could work
> around this. I don't see where a plugin is accessed before this update
> is made. I haven't looked as closely in the 1.3 code. Perhaps this is
> now more doable.
The plugin action is called after the update to the database:
do_action('comment_post', $comment_ID);
This is after the check for moderation, and after the call to notify the
author of a moderated comment and after the insert is made. I could do
an update to the database and then add my own call to notify the admin
of a moderated email, but I wouldn't have the information I need to add
my own moderated comment message to the page, just before the comment form.
More than that, if I were to get hit by a comment spammer, this is going
to be a problem.
Now, I could modify check_comment to test for a moderated
comment_status, but I'm trying to avoid hacking the WP functions.
Overall it would be just easier to have per-post moderation included as
part of the source.
Shelley
More information about the hackers
mailing list