WordPress.org

Ready to get started?Download WordPress

Forums

Nivo Slider for WordPress
How to Hide plugin access to users (3 posts)

  1. Sridhar Venkat
    Member
    Posted 2 years ago #

    How can i block users from accessing this plugin in the admin bar? I need only admin users to have access and to be able to make changes, but the NivoSlider plugin lets every user to make changes.

    http://wordpress.org/extend/plugins/nivo-slider-for-wordpress/

  2. daledude
    Member
    Posted 2 years ago #

    Yes, and not even a Role Editor seems to work to remove it that I've tried. Subscribers should NOT be able to edit the Nivo Slider.

  3. intheshallow
    Member
    Posted 2 years ago #

    I know this is old but I didn't see a solution and figured it out for myself. Here is my solution:

    You need to go into the nivoslider4wp.php file and do a find of "Nivo Slider for WordPress". You'll find this line:

    add_menu_page('Nivo Slider for WordPress', __('Nivo Slider For WordPress'), 'read', __FILE__, 'nivoslider4wp_panel', get_option('siteurl') . '/wp-content/plugins/nivo-slider-for-wordpress/img/menu.png');

    Now replace this line with this:

    if (current_user_can(10)) {
    add_menu_page('Nivo Slider for WordPress', __('Nivo Slider For WordPress'), 'read', __FILE__, 'nivoslider4wp_panel', get_option('siteurl') . '/wp-content/plugins/nivo-slider-for-wordpress/img/menu.png');
    }

    This will hide the tab from anyone except the Admin. Now this isn't a permanent thing, they can still access Nivo Slider if they know the direct link to it but I doubt that part is a big deal.

    You can place the "if (current_user_can(10)) { }" line around the entire nivoslider4wp-option.php, nivoslider4wp-panel.php, nivoslider4wp-show.php and that will permanently disable it I believe. I am working on a client's design so I don't have time to really test it all out.

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic