• Resolved paulovsky

    (@paulovsky)


    I want my SEO manager to access this plugin’s site-wide settings without giving him administrator role, and I would prefer not to install Capability Manager just for this one user.

    Can you help me with which code to tweak?

    this is my current custom user role:

    // user role for SEO manager
    $result = add_role( 'seo-manager', __(
    'SEO Manager' ),
    array( 
    'read' => true, // true allows this capability
    'edit_posts' => true, // Allows user to edit their own posts
    'edit_pages' => true, // Allows user to edit pages
    'edit_others_posts' => true, // Allows user to edit others posts not just their own
    'create_posts' => true, // Allows user to create new posts
    'manage_categories' => true, // Allows user to manage post categories
    'publish_posts' => true, // Allows the user to publish, otherwise posts stays in draft mode
    'edit_themes' => false, // false denies this capability. User can’t edit your theme
    'install_plugins' => false, // User cant add new plugins
    'update_plugin' => false, // User can’t update any plugins
    'update_core' => false, // user cant perform core updates
    'upload_files' => true,
    'delete_posts' => true 
     ) );
    • This topic was modified 7 years ago by paulovsky.
    • This topic was modified 7 years ago by paulovsky.
Viewing 1 replies (of 1 total)
  • Thread Starter paulovsky

    (@paulovsky)

    found it!!

    add_filter( 'the_seo_framework_settings_capability', 'my_autodescription_settings_role' );
    function my_autodescription_settings_role() {
        // Default is 'manage_options'
        $role = 'publish_pages';
     
        return $role;
    }

    added in a functionality plugin, works perfectly.

    • This reply was modified 7 years ago by paulovsky.
Viewing 1 replies (of 1 total)
  • The topic ‘user roles for seo manager’ is closed to new replies.