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.

I want to make a user class that can edit pages, and save them as a draft without being able to publish it. An admin would have to go in and publish the draft once they approve it.

The idea is similar to TDO Mini Forms except this will be done within the Wordpress admin panel, not be a form, and they must be a registered user in a specific class to do this.

Thanks!

share|improve this question
    
I completed my answer based on the additional details you provided. –  sorich87 Oct 3 '10 at 6:40
    
@Steven: I don't know how good WordPress is with future revisions of already published pages. Can you save them without publishing them, even ignoring the permissions issue? –  Jan Fabry Nov 2 '10 at 16:50
    
This related question asks whether it is possible to save drafts of published posts. If that is answered, we can probably solve this too. –  Jan Fabry Nov 12 '10 at 18:41
1  

3 Answers 3

Sorich87 is right. The WP Codex describes a contributor as: Somebody who can write and manage their posts but not publish them. (See codex.wordpress.org/Roles_and_Capabilities). If you want people to automatically have this capability when they register, you can set the default role to Contributor in the settings panel.

If you need additional permissions not handled by the built in Wordpress permissions -- say, for example, you want a user that can edit other people's posts as well, but once they're edited they go back to being drafts, or whatever -- then there are several good Role Manager plugins (listed in the above article under Other Resources), or if you prefer to "role" your own (pardon the atrocious pun), this article is a good place to start: http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/#add-capability

share|improve this answer
    
Yes, I want the user to be able to edit a page that's already made but not be able to publish it. Just save it as draft. I have Roles plugin so I can add capabilities.. but not sure what it would be called to allow them to edit and save an already made page, but not publish it. Thanks for the help! –  Steven Oct 2 '10 at 2:09
    
If you are using Role Manager (im-web-gefunden.de/wordpress-plugins/role-manager), you would simply un-check "Publish Posts" and "Publish Pages". Also uncheck the various "Delete [Posts/Pages]" (or Delete Others Posts/Pages). Leave checked things like Read, Edit [Pages/Posts], Edit Others Posts, etc –  Amanda Oct 4 '10 at 11:28

Revisionary

This plugin will do what you want. It creates a role Revisor that is kind of in between Contributor and Editor. The UI could be improved and the internal code had to work around a lot of WordPress' missing features, but yeah, this solves your problem.

share|improve this answer

This is what you may want to do (add the following code to your theme functions.php file or a custom plugin):

function add_custom_role() {
    global $wp_roles;

    $custom_capabilities = array(
        'read', 'edit_posts', 'upload_files',
        'read_private_pages', 'edit_private_pages', 'read_private_posts',
        'edit_private_posts', 'edit_published_pages', 'edit_others_pages',
        'edit_pages', 'edit_published_posts', 'edit_others_post',
        'unfiltered_html', 'manage_options'
    );

    $wp_roles->add_role( 'custom_role', 'Custom Role', $custom_capabilities );
}

add_action( 'init', 'add_custom_role' );

References: http://codex.wordpress.org/Roles_and_Capabilities http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/

share|improve this answer
    
It gave me a PHP error upon adding that to my functions.php page. Would you mind if I contacted you directly? There's got to be a simple fix for this all. How can I reach you? WLM/AIM/Facebook? Email? –  Steven Oct 3 '10 at 23:34
    
See my profile page for how to contact me: wordpress.stackexchange.com/users/473/sorich87 –  sorich87 Oct 4 '10 at 1:47

Your Answer

 
discard

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