WordPress.org

Forums

BigContact Contact Page
Allowing other user roles? (2 posts)

  1. websitejunction
    Member
    Posted 1 year ago #

    I can only get this plugin to display and work in the admin menu for the user role "administrator". I've used the Advanced Access Manager plugin with the added Advanced Plugin Manager and I can display the Big Contact menu item for the new user role I created "admin" but when I click on it I get "You do not have sufficient permissions to access this page."

    I noticed Big Contact has it's own set of functions and found this:

    function init_BigContact_menu() {
            global $bigContact_page, $bigContact_settings;
            add_menu_page('Big Contact', 'Big Contact', 'install_plugins', "big-contact", array(&$this, 'init_bigContact'), plugins_url('view/images/be_contact.png', __FILE__));
            $bigContact_page = add_submenu_page("big-contact", 'Big Contact', 'Form Options ', 'administrator', "big-contact", array(&$this, 'init_BigContact'));
            $bigContact_settings = add_submenu_page("big-contact", 'Big Contact', 'Settings', 'administrator', "big-contact-settings", array(&$this, 'init_BigContact_Settings'));
            add_action('admin_print_styles-' . $bigContact_page, array(&$this, 'print_BigContact_admin_styles'));
            add_action('admin_print_scripts-' . $bigContact_page, array(&$this, 'print_BigContact_admin_scripts'));
            add_action('load-' . $bigContact_page, array(&$this, 'init_BigContact_Help_Tab'));
            add_action('load-' . $bigContact_settings, array(&$this, 'init_BigContact_Help_Tab'));
        }

    I've tried to replace "administrator" with "admin" (this is my new user role name) but then the result is reversed as I can only view it in the admin role and not the administrator role.

    Please help me understand how to add the extra user role.

    Thank you in advance for any help on this.

    http://wordpress.org/extend/plugins/bigcontact/

  2. arianKhosravi
    Member
    Plugin Author

    Posted 1 year ago #

    You would want to look at add_menu_page function in the codex. If you look at the capability parameter. You'll see that roles have been deprecated. The available list of capabilities can be found on Roles and Capabilities. Since Roles are deprecated I updated the plugin in v1.5.3 to edit_theme_options.

    If anyone has a better suggestion than edit_theme_options let us know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BigContact Contact Page
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.