Access Control Settings

If you run a site with different users each with specific user roles, then you may find yourself wanting to give these roles access to settings in All in One SEO.

Luckily, All in One SEO has an Access Control feature where you can control which roles have access to the plugin’s features.

To start with, click on General Settings in the All in One SEO menu and then click on the Access Control tab.

General Settings menu in All in One SEO

On the Access Control screen you’ll see default settings for the following roles:

  • Editor: By default Editors have access to SEO settings for General Settings, Search Appearance and Social Networks, as well as all settings for individual pages and posts
  • Author: By default Authors have access to SEO settings for individual pages and posts that they already have permission to edit
  • SEO Manager: By default SEO Managers have access to SEO settings for General Settings, Redirections, and individual pages and posts
  • SEO Editor: By default SEO Editors have access to SEO settings for individual pages and posts.

You can change the default permissions for these roles by clicking on the Use Default Settings toggle for whichever role you want to change.

Access Control settings in All in One SEO

You’ll see checkboxes to control access to the main plugin settings under the General SEO Settings heading.

General SEO Settings in Access Control

You’ll also see checkboxes to control access to the plugin settings that appear on the Add New or Edit screens for Posts, Pages and other content under the Post SEO Settings heading.

Post SEO Settings in Access Control

To remove access to a setting for users with this role, uncheck the relevant box.

To give access to a setting for users with this role, check the relevant box.

For example, to give users with the Editor role access to manage Social Networks settings, check the box for Social Networks Settings.

By default, only administrators can manage your WordPress SEO options through the All in One SEO Pack menu system. This is accomplished through a special capability automatically assigned to administrators called aiosp_manage_seo.

You can assign this capability to non-administrator roles or individuals, either via the WordPress API or with a role editor plugin.

For example, to add the capability to editors:

function add_new_seo_cap() {
    $role = get_role( 'editor' );
    $role->add_cap( 'aiosp_manage_seo' ); 
}
add_action( 'admin_init', 'add_new_seo_cap');

To add the capability to a specific user:

$user = new WP_User( $user_id );
$user->add_cap( 'aiosp_manage_seo' );

There is also an SEO filter hook available which allows you to swap out the aiosp_manage_seo capability with any other capability of your choosing.