[wp-hackers] How to disable Post Revisions for short periods?

Mark Cunningham mark.cunningham at gmail.com
Thu Sep 4 09:27:16 GMT 2008


My plugin[1] creates a post and then modifies it which results in
multiple revisions. After that the user can do what they like with it.
I'd like my plugin to create only the post without revisions as it can
confuse the user and unnecessarily bloats their database. However when
I try to disable revisions before I create the post, I find that
WP_POST_REVISIONS is defined as a constant and so I can't disable it.
Whats the best way to do this? Should I get a hook in when before
WP_POST_REVISIONS is auto-defined and disable it then or should I just
delete the revisions that are made just after I create the post?

Thanks
Mark

[1] http://wordpress.org/extend/plugins/tdo-mini-forms/
--
http://thedeadone.net


More information about the wp-hackers mailing list