Viewing 8 replies - 1 through 8 (of 8 total)
  • @andsmith

    Ideally you need to create your own site specific plugin for this as a themes functions.php can get overwritten when a theme is updated.

    To accomplish what you want you should apply the change only to the ‘manage’ menu and you need to select an appropriate role to return to allow editors and above to access the page from here:

    https://codex.www.ads-software.com/Roles_and_Capabilities

    ‘moderate_comments’ should do the trick.

    Thread Starter Andsmith

    (@andsmith)

    Hi Mattyrob,

    Thanks for reply. Please write me where to add ‘moderate_comments’. I’m not a coder. And where can I find help to create site specific plugin?

    Thanks,
    Ansmith

    @andsmith

    If you’ve never written a plugin before then this plugin is a great help:
    https://www.ads-software.com/plugins/pluginception/

    In the code example you linked to the ‘moderate_comments’ would be what you’d ‘return’, so the line would be:
    return 'moderate_comments''

    Thread Starter Andsmith

    (@andsmith)

    Hi Mattyrob,

    I created the plugin, placed the code and added return ‘moderate_comments’; but unfortunately nothing happened. I think menu and user(editor) should added but I don’t know how.

    Thanks,
    Andsmith

    @andsmith

    Have you activated the plugin you created?

    If you have paste your code here or at a service like pastebin it is more than few lines and I’ll try to help.

    Thread Starter Andsmith

    (@andsmith)

    Hi Mattyrob,

    Yes, it is active and I pasted this code.

    function s2_admin_changes( $capability, $menu ) {
    if ( $menu == ‘send’ ) {
    return ‘moderate_comments’;
    }

    return $capability;
    }

    add_filter(‘s2_capability’, ‘s2_admin_changes’, 10, 2);

    Thanks,
    Andsmith

    @andsmith

    Very nearly there. You are changing access to the Send Email page. On the line that starts with an ‘if’ change the ‘send’ to ‘manage’.

    Thread Starter Andsmith

    (@andsmith)

    Hi Mattyrob,

    Great, it works fine. Thank you so much ??

    Andsmith

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding rights to editors to see the list of users’ is closed to new replies.