Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Using Wordpress 3.1 is it possible to completely disable the drafts functionality or at least remove the "Save Draft" button from the post screen?

share|improve this question
    
i dont think there is a way to disable drafts you may be able to hook into a function to remove the save draft button and links but to completely disable it i dont think this is possible. –  xLRDxREVENGEx May 25 '11 at 6:40
    
Also if your worried about your users adding drafts note that only contributors and above can do this not subscribers. –  xLRDxREVENGEx May 25 '11 at 6:40
    
No, out subscribers definelty have draft option... maybe this is because i'm using custom post types? –  EddyR May 25 '11 at 6:54
    
codex.wordpress.org/Function_Reference/… go here and add the capabilities you want that are required for a user to be able to post, etc –  xLRDxREVENGEx May 25 '11 at 7:00

2 Answers 2

up vote 1 down vote accepted

If by draft, you mean "autosave", you can consider using this plugin:

http://wordpress.org/extend/plugins/wp-feature-disable/

If you want to disable revisions, instead...try this:

define('WP_POST_REVISIONS', 'false');

You can put that in your /wp-config.php file and it should immediately take effect. Any previously saved revisions in your database will need to be purged. You can do it by running the following MySQL query in phpMyAdmin:

DELETE FROM wp_posts WHERE post_type = "revision";
share|improve this answer
    
Hmmm, revisions is a good idea too (but only if I can do it for specific roles). But I definitely mean drafts too - I don't want users thinking they can save lots of drafts (We only have a small server atm!) –  EddyR May 25 '11 at 6:24
    
well considering that a post barely takes up any room. You should not worry about size. –  xLRDxREVENGEx May 25 '11 at 6:37
    
i'm thinking more about media uploads. even our editors tend to upload the same media several times :( –  EddyR May 25 '11 at 6:52

I also needed this, what I did is hiding it with a custom css :

#minor-publishing {display:none;}

and here is how to link your css to the admin space : How do I load a CSS style into WordPress admin area only?

EDIT: I forgot to say, I combined this solution with :

wp_deregister_script('autosave');

to disable the autosave function (this is what the plugin mentioned above does)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.