Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    Right now, the only way to do this is to edit the plugin files.

    In /includes/class-admin.php, go to line 72 and replace all 5 instances of manage_options with something like moderate_comments.

    Source: Roles and Capabilities

    If you’re not in a hurry, I can also add a filter to the plugin which makes it possible to change the necessary capability without having to update the plugin. That’s a way safer way to go as you can safely update the plugin without having to re-do your changes. I’ll try to push out an update of the plugin this Friday, at last.

    Hope that helps!

    Thread Starter BeachedDesigns

    (@beacheddesigns)

    Hi Danny.
    Thanks for the reply.
    That allowed an editor to access the plugin menu in the admin area.
    But unfortunately as soon as the editor tries to make any changes, comes to the “cheatin’ uh’ ” page….

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    Ah, sorry. I forgot about the required capability to access WordPress options. You will have to add the following function to your theme its functions.php file to get it to work.

    function myprefix_options_capability( $capability ) {
    	return 'moderate_comments';
    }
    add_filter( 'option_page_capability_mc4wp-lite', 'myprefix_options_capability' );
    add_filter( 'option_page_capability_mc4wp-lite-checkbox-settings', 'myprefix_options_capability' );
    add_filter( 'option_page_capability_mc4wp-lite-form-settings', 'myprefix_options_capability' );

    Let me know if that worked for you! ??

    Thread Starter BeachedDesigns

    (@beacheddesigns)

    Thanks Danny.
    That worked much better.
    I have changed the code as required, and look forward to the updated plugin with this functionality included.

    Cheers
    Shaun.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allowing Editor access to plugin menu’ is closed to new replies.