Viewing 10 replies - 1 through 10 (of 10 total)
  • did you ever get an answer to this?

    Thread Starter espo74

    (@espo74)

    you know, I did but I don’t remember what the setting was or what I adjusted to make it happen.

    Would you mind sharing your solution – I too am interested in giving an editor access to the setting menu.

    Hi I had the same problem, and fixed it by granting the specific user manage_options capabilities (its not ideal) but works… doing it this way they also have the ability to change permalinks and other things,

    // to add capability to user
    // change $user_id with the editor id you want to grant capabilities too
    $user = new WP_User( $user_id );
    $user->add_cap( 'manage_options');

    Dearest Joost

    Do you mind changing the code which creates the menus in /admin/class-admin.php? If you think of a reason why this is a bad or creates a potential problem, I totally understand. But if you made the change, us site admins would be able to grant access to the SEO menus to our custom user roles by simply creating a filter.

    Thanks in advance for the consideration.

    Current code:

    add_menu_page( __( 'WordPress SEO Configuration', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), 'manage_options', 'wpseo_dashboard', array( $this, 'config_page' ), WPSEO_URL . 'images/yoast-icon.png' );
    add_submenu_page( 'wpseo_dashboard', __( 'Titles & Metas', 'wordpress-seo' ), __( 'Titles & Metas', 'wordpress-seo' ), 'manage_options', 'wpseo_titles', array( $this, 'titles_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Social', 'wordpress-seo' ), __( 'Social', 'wordpress-seo' ), 'manage_options', 'wpseo_social', array( $this, 'social_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'XML Sitemaps', 'wordpress-seo' ), __( 'XML Sitemaps', 'wordpress-seo' ), 'manage_options', 'wpseo_xml', array( $this, 'xml_sitemaps_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Permalinks', 'wordpress-seo' ), __( 'Permalinks', 'wordpress-seo' ), 'manage_options', 'wpseo_permalinks', array( $this, 'permalinks_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Internal Links', 'wordpress-seo' ), __( 'Internal Links', 'wordpress-seo' ), 'manage_options', 'wpseo_internal-links', array( $this, 'internallinks_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'RSS', 'wordpress-seo' ), __( 'RSS', 'wordpress-seo' ), 'manage_options', 'wpseo_rss', array( $this, 'rss_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Import & Export', 'wordpress-seo' ), __( 'Import & Export', 'wordpress-seo' ), 'manage_options', 'wpseo_import', array( $this, 'import_page' ) );

    New code:

    add_menu_page( __( 'WordPress SEO Configuration', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_dashboard', array( $this, 'config_page' ), WPSEO_URL . 'images/yoast-icon.png' );
    add_submenu_page( 'wpseo_dashboard', __( 'Titles & Metas', 'wordpress-seo' ), __( 'Titles & Metas', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_titles', array( $this, 'titles_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Social', 'wordpress-seo' ), __( 'Social', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_social', array( $this, 'social_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'XML Sitemaps', 'wordpress-seo' ), __( 'XML Sitemaps', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_xml', array( $this, 'xml_sitemaps_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Permalinks', 'wordpress-seo' ), __( 'Permalinks', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_permalinks', array( $this, 'permalinks_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Internal Links', 'wordpress-seo' ), __( 'Internal Links', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_internal-links', array( $this, 'internallinks_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'RSS', 'wordpress-seo' ), __( 'RSS', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_rss', array( $this, 'rss_page' ) );
    add_submenu_page( 'wpseo_dashboard', __( 'Import & Export', 'wordpress-seo' ), __( 'Import & Export', 'wordpress-seo' ), apply_filters('wpseo_manage_capability','manage_options'), 'wpseo_import', array( $this, 'import_page' ) );

    Update:
    One of my colleagues pointed out that there are probably other places where the user capability ‘manage_options’ is a condition. Even still, if all locations are handled by the apply_filters tag then it will work just fine.

    In class-admin.php if you change the instances of ‘manage_options’ to ‘edit_others_pages’ in the function ‘register_settings_page’ it will give access for an editor to the plugin.

    The point of my request is so roles can be customized without editing the core of the plugin. As a developer with many clients, I can’t edit the cores of plugins because I can’t keep up with maintaining those edits. I use filters and hooks in my own plugins or themes.

    It sure would be for the plugin author to address my comment here. http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-editor-access-to-wp-seo-yoast-dashboard?replies=8#post-3626003

    It would give a powerful capability to us developers to give access to the SEO admin menus to whatever role we want. I sure wish the plugin allowed this.

    Mad Max

    (@mad_max)

    I totally agree with Ryan.
    Joost, please consider those suggestions and give us some feedback about it.

    Thanks in advance.

    I have recently tried WordPress SEO (Yoast) and found that open graph meta for the homepage is showing a hyphen ( – ) after the og:title. Can anyone tell me how to remove it.

    <meta property=’og:title’ content=’Free Audio and Web Video Conferencing Services ‘/>

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Editor Access to WP SEO (yoast) Dashboard’ is closed to new replies.