Support » Plugin: Quotes Collection » Hiding the Quotes Collection admin sidebar icon for non-adminstrators

  • Rob Visser


    First of all, thank you for having created this plugin! 🙂

    When I was testing it for my users that do not have Administrator roles, I noticed they are seeing the Quotes Collection icon in the left sidebar in WordPress’ admin area. Though they do not seem able to actually use any screens, it would be nice to have the Quotes Collection icon hidden in the sidebar.

    I therefore am offering this small tweak. The change can be applied to the constructor in the Quotes_Collection_Admin class, as follows:

    $current_user = wp_get_current_user();
                    if ($current_user->exists() && in_array('administrator', $current_user->roles)) {
                            add_action( 'admin_menu', array($this, 'admin_menus') );

    I tested this and it seems to work well. Perhaps this can find its way into an upcoming release, at least until role-based rights have been implemented?

Viewing 1 replies (of 1 total)
  • Plugin Author Srini G


    Thanks for the feedback and thanks for the tweak. I’ll address these access issues in the upcoming release.

Viewing 1 replies (of 1 total)
  • The topic ‘Hiding the Quotes Collection admin sidebar icon for non-adminstrators’ is closed to new replies.