2

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!

4

3 Answers 3

3

Sorich87 is right. The WP Codex describes a contributor as: Somebody who can write and manage their posts but not publish them. (See 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. For more information see the documentation on Roles and Capabilities Plugin.

0
1

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.

1

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:

https://wordpress.org/support/article/roles-and-capabilities/

http://www.wphardcore.com/2010/ultimate-guide-to-roles-and-capabilities/

and a more modern article from a suggested edit:
https://kinsta.com/blog/wordpress-user-roles/

2
  • 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
    Commented Oct 3, 2010 at 23:34
  • See my profile page for how to contact me: wordpress.stackexchange.com/users/473/sorich87
    – sorich87
    Commented Oct 4, 2010 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.