[wp-hackers] possible permanent post and edit page modifications

Shelley Powers shelleyp at burningbird.net
Fri Jul 23 22:44:26 UTC 2004



Owen Winkler wrote:

>>You could write a plugin that does some of this, but not all. 
>>    
>>
>
>I wrote the plugin that does per-post moderation.  You can set the
>option for each post on the advanced-edit page, and the
>Options->Discussion page has default options that are stored in the
>database.
>
>You can set it so that moderation for a post gets turned on
>automatically when a post gets X days old (configure in Options).
>
>Messages should be sent as defined by my plugin, not by the global
>settings in WP.
>
>No database changes are required, no WP core code modification are
>required.  Drop it in and go.
>
>If you want a message on the comments page about whether a post is
>moderated or not, you can use is_moderated(), which returns true if the, 
>post comments are moderated.  Like so:
>
><?php if(is_moderated()) {?><p>Comments are approved by the admin before
>they appear here.</p><?php }?>
>
>Interest?  Download file is here:
>www.asymptomatic.net/wp-hacks/monoderate.zip
>
>Owen
>

Owen, is this a competition or something? Did you feel you had been 
challenged or something because I said I didn't think the whole thing 
could be handled with a plugin? Did you decide to rub my nose in it? 
Well, congratulations -- you did it very well.

A couple of things though. First of all, you are updating the database. 
You're using the meta key. For those of us already using metakeys, this 
could cause complications. You need to be careful on saying no database 
change when it comes to adding metakey entries. They're not the same as 
other table entries.

And DOM doesn't work the same for all browsers.

Howver, minor issues. I haven't tried this, but I'm sure it works.

Congratulations -- you won.

Shelley






More information about the hackers mailing list