Google Analytics by Yoast
Roles and Capabilities: manage_options (1 post)

  1. davidcasey
    Posted 1 year ago #

    re: /wp-admin/options-general.php?page=google-analytics-for-wordpress

    I am creating a new role, somewhere between Administrator and Editor. My method seems to be working for every capability I'd like to remove, except through this plugin. Seems you are able to hide the menu item if the user is Editor and below.

    The option menu item in the admin sidebar is showing up, I can navigate to the page, and yet on submission the page states "You cannot edit the Google Analytics for WordPress options."

    $admin_role  = get_role( 'administrator' );
    $caps = $admin_role->capabilities;
    unset( $caps['manage_options'] ); // Why does Google Analytics still show up?
    add_role( 'webmaster', 'Webmaster', $caps );

    I would guess you were hiding the menu item, when you try to create it in yst_plugin_tools.php but this is not the case.

    add_action( 'admin_menu', array( &$this, 'register_settings_page' ) );
    function register_settings_page() {
    	add_options_page( $this->longname, $this->shortname, $this->accesslvl, $this->hook, array( &$this, 'config_page' ) );

    Where am I going wrong here?

    thanks, david


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.