• wpuser10

    (@adelatusanova)


    Hi,

    is it possible to restrict access to this plugin?
    I do not want to allow authors of the articles to see plugin’s options.
    It should be visible to everyone.

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @adelatusanova The plugin’s options should be visible only to users with “administrator” role. If the articles’ authors also have “administrator” privileges, they will be able to see the plugin’s menu and access any of its settings.

    There’s a hook in Asset CleanUp that allows you to change “administrator” to whatever you like.It’s “wpacu_access_role” that is located in Menu.php:

    /**
    * Here self::$_capability can be overridden
    *
    * @return mixed|void
    */
    public static function getAccessCapability()
    {
        return apply_filters('wpacu_access_role', self::$_capability);
    }

    However, it could only help you if you create a new role (you can do it in functions.php or via a plugin) such as “developer” and assign it only to you. It’s not the most effective way at this time, but does its job.

    There will be a feature in Asset CleanUp fairly soon that will allow you to hide plugin’s options for specific users. What you can also do, is have the CSS & JS manager load on click (so it doesn’t bloat the edit page area).

    Once the new feature, will be implemented, I can update you here so you can try it out.

Viewing 1 replies (of 1 total)
  • The topic ‘Visibility based on roles’ is closed to new replies.