• Resolved gianlu74

    (@gianlu74)


    Hi Jose, I also congratulate you on the plugin!

    A question, in a site created with Woocommerce I noticed that users with the Store Manager role see in the backend, in the left column, immediately above the Users link, the name of the Plugin which, if linked, refers to the plugin site page (https: //shop.freesoul-deactivate-plugins.com/).

    Is it possible to hide/delete this entry? Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jose

    (@giuse)

    Hi @gianlu74,

    I tried to reproduce the same issue but I never see the link that you mentioned.

    Normally, Freesoul Deactivate Plugins shows the links to its pages only to the users who can activate/deactivate plugins from the plugins page, or to the users who have the role FDP Viewer and FDP Manager even thought these two roles haven’t the capability to activate/deactivate plugins.

    Do you have any plugin that manipulates the normal behaviour of roles and capabilities?

    I can give you some suggestions to hide the link that you mentioned but I can’t ensure it will work because you should already not see that link.

    Add this code to the functions.php of your theme, or to a functional plugin:

    add_filter( 'eos_dp_settings_capability', function( $capability ) {
    	return 'manage_options';
    } );

    The code above will replace the capability active_plugins with manage_options, and only those who can manage options (normally, only the administrators) can see Freesoul Deactivate Plugins. As said, it may not work if the cause of your issue also interferes with this possible solution.

    If you want to hide that link only to a couple of users, you can also try to go to their user profile and uncheck “Admin menu” in the FDP Preferences.

    I hope it helps.

    Have a great day!

    Jose

    • This reply was modified 1 year, 4 months ago by Jose.
    Thread Starter gianlu74

    (@gianlu74)

    Thanks for the reply.

    I added the provided snippet to the functions.php, but nothing.

    Here foolowing links to screenshots of:

    – “Shop Manager” backend where you see the link to FDP: https://ibb.co/SR7ztdW

    -“Administrator” backend with FDP Settings > Role Manager: https://ibb.co/2hgyG1k

    – plugin list: https://ibb.co/26yqnLc

    Thanks again

    Plugin Author Jose

    (@giuse)

    Thanks to you for the information.
    If nothing helps, I suggest you hide the FDP menu item with this code:

    add_action( 'admin_head', function() {
    	if( ! current_user_can( 'manage_options' ) ) {
    	?>
    	<style id="hide-fdp-menu-item">#toplevel_page_eos_dp_menu{display:none !important}</style>
    	<?php
    	}
    } );

    The code above will hide the FDP menu item if the user hasn’t the rights to manage options.

    Thread Starter gianlu74

    (@gianlu74)

    Ok, it works, thank you very much Josè.

    Plugin Author Jose

    (@giuse)

    Perfect, I’m happy it works.

    Have a great day!
    Jose

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Gestione dei ruoli’ is closed to new replies.