[wp-hackers] doing validations at save/update time. advise is needed.

Mike Little wordpress at zed1.com
Fri Jun 1 13:03:47 UTC 2012

On Fri, Jun 1, 2012 at 3:27 AM, Haluk Karamete <halukkaramete at gmail.com>wrote:

> What's a good plug-in that taps into the update post or save post
> action that allows admins to enforce rules such as if a user selects a
> category with the ID 5 then he also has to select at least one
> category from the the XYZ custom taxonomy etc - or that update/save
> won't go thru.
I don't have a specific plugin to recommend*, but be aware that you cannot
stop the update/save going through.

What you can do is force the post back into draft status (if they tried to
publish), and display a message explaining the business logic issues with
the post in the feedback message (using the
standard 'post_updated_messages' filter).

* I reviewed a plugin last year that someone is writing which allows you to
specify as set of business logic/validation rules for posts (and pages and
cpts), and which included an extension interface so you can write your own
rules. However it has not yet been released (and in fact, I recommended the
extension interface be re-written).

Mike Little

More information about the wp-hackers mailing list