• I’m using a plugin called Redirection and would like to give one of my roles access to it via Tools > Redirection menu but when I view the capabilities within User Role Editor, I don’t see any listed that would seem to relate to the Redirection plugin.

    1. How do I identify plugin capabilities?
    2. If I need to create a custom capability, it seems like I can add a label but how does that tie into the actual capability? Does there need to be additional coding?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    “Redirection” plugin uses ‘administrator’ role to protect its menu item under “Tools” menu by default. In respect to plugin developer – he makes it with custom filter:

    
    apply_filters( 'redirection_role', 'administrator' )
    

    So you can easy replace it with your own custom user capability. Create one, like ‘redirection_admin’ and add filter to your active theme functions.php file:

    
    add_filter('redirection_role', 'replace_redirection_cap');
    function replace_redirection_cap($cap) {
      $cap = 'redirection_admin';
    
      return $cap;
    }
    

    P.S. I just wrote this code and did not test it for the sudden typos…

Viewing 1 replies (of 1 total)

The topic ‘Don’t see a plugin’s (Redirection) capabilities’ is closed to new replies.