Redirection plugin – how to let the editor access the ‘redirection’ menu?

I’m using the Redirection plugin. It enables a ‘Redirection’ submenu under “Tools” menu in Admin panel. As an Administrator I can access the plugin. But I want to avail it for my ‘editor’ accounts too.

I’ve searched a lot, but found solution like this that are offering solution like editing the plugin itself. I actually don’t want to edit plugin files directly, as on next update all the changes will wipe out.

So, how can I let the ‘editor’ get access to the ‘Redirection’ submenu under ‘Tools’ menu?

2 s
2

Update 2020

The original answer was of 2015, and the author has no affiliation with the plugin, so not aware of any changes to the plugin at all. You are requested to follow any updated helpful answer that might help you on this issue.

Original

Good news is, from version 2.3.7 of Redirection plugin, they introduced a filter called redirection_role for the privilege. Here’s is the core code (v.2.3.7):

add_management_page( __( "Redirection", 'redirection' ), __( "Redirection", 'redirection' ), apply_filters( 'redirection_role', 'administrator' ), basename( __FILE__ ), array( &$this, "admin_screen" ) );

###Solution
Just put the following code into your theme’s functions.php to enable ‘editor’ to get access to the ‘Redirection’ submenu:

/**
 * Redirection Plugin Editor access
 */
add_filter( 'redirection_role', 'redirection_to_editor' );
function redirection_to_editor() {
    return 'edit_pages';
}

See Editor user role and capabilities in WordPress – WordPress Codex

Leave a Comment