Forums

[resolved] Disable Mail Subscribers (7 posts)

  1. seg
    Member
    Posted 3 years ago #

    Hi, I am using v2.7 and in the Admin under Posts I noticed the "Mail Subscribers" feature. Is there an easy way to disable this or restrict it to all Roles except the Administrator?

  2. Samuel B
    moderator
    Posted 3 years ago #

    must be one of your plugins adds that - does it have a configuration section?
    Likely only an admin sees that link

  3. seg
    Member
    Posted 3 years ago #

    Currently my Admin does not display "Mail Subscribers" for Subscriber or Contributer, but Author and above shows "Mail Subscribers". Is this the default set-up?

    I would like to restrict Author and below from using this feature or remove it all together. I could try to use the Role Manager plug-in to manipulate the role levels or create a custom role to replace Author, but before trying that I was just curious if there is an easier way.

  4. seg
    Member
    Posted 3 years ago #

    I experimented with this more using the Role Manager. The ability to Mail Subscribers seems to be attached to the Publish Posts capability. If you can't publish a post then you can't mail a subscriber. If anyone else has any ideas please let me know. Thanks!

  5. seg
    Member
    Posted 3 years ago #

    Just an update - this is a feature of the Subscribe2 plug-in, not part of the main WordPress install. Unfortunately the plug-in doesn't provide any settings to turn this off. I am going to try and manually adjust the plugin - at least I don't have to change any WP core files!

  6. seg
    Member
    Posted 3 years ago #

    One last note for anyone who wants to know how to fix this. I used the Role Manager plug-in and created a new Capability called Mail Subscribers. In the Subscribe2 plug-in file (subscribe2.php) on line 245 I changed the parameter "publish_posts" to "mail_subscribers". The final version looks like this:

    add_submenu_page('post-new.php', __('Mail Subscribers', 'subscribe2'), __('Mail Subscribers', 'subscribe2'), "mail_subscribers", __FILE__, array(&$this, 'write_menu'));

    Now I can pick which roles have the ability to Mail Subscribers. Hope this helps someone out there!

  7. mrsixcount
    Member
    Posted 2 years ago #

    as an update the line has moved to 124 in the "Hook the menu" section. Where do you edit the mail_subscribers option in the users profile?

  8. mrsixcount
    Member
    Posted 2 years ago #

    Ok found this. If you put this on in the hook section it will setup the administrator and editor to have access. Otherwise you can put it in a spot and deactivate and activate the plugin to have it run once.
    Note: Author role is 'author'

    // Set 'mail_subscribers' Capabilities To Administrators and Editors
    $role = get_role('administrator');
    if(!$role->has_cap('mail_subscribers')) {
    $role->add_cap('mail_subscribers');
    }
    $role = get_role('editor');
    if(!$role->has_cap('mail_subscribers')) {
    $role->add_cap('mail_subscribers');
    }

    Thanks again for the help. I hope this helps others as well.

Topic Closed

This topic has been closed to new replies.

About this Topic