Support » Plugin: Subscribe2 » [Plugin: Subscribe2] Limit to Plain Text – Excerpt?

Viewing 15 replies - 1 through 15 (of 20 total)
  • @thinkwired,

    Plain Text – Excerpt is the only email option available to Public Subscribers in the free version. One way to limit the different emails available is to not allow people to Register on your blog as it’s only Regsitered Users who have the option to change the email type.

    The problem is, I only want to send emails to registered users.

    I guess I can default the choice to plain text and then remove the options from the profile page. I just didn’t want to have to hack the plugin every time you update it.

    Awesome plugin, keep up the good work.


    If you only want Registered Subscribers then hacking is the only way around this. Subscribe2 is designed to encourage people to sign up to your blog by offering more email subscription options. You are wanting the opposite of this so changing the code is the only way.

    Its not that I want the opposite, its that I run a members only website.

    I think it would be awesome if the plugin allowed you to specify what role level was able to receive email notifications. Do you think the ability to set a minimum role, excluded role, or explicit role is something that makes sense for your plugin in general? I’m open to the most flexible/usable solution for everyone and would be happy to donate or upgrade to a pro version.

    Here is my specific situation… maybe it lends itself to a more generally usable enhancement… I have people who pay to be members and I want these members to receive emails but, when they cancel their membership they are demoted to the “subscribers” role. Since we do not allow public registrations/subscriptions, our members with a custom role are the only people who can receive email alerts but, when they cancel and become subscribers, they continue to get email alerts even though they are no longer members because the “subscriber” role allows them continued access to your plugin.

    If we could specify a role to receive updates or exclude roles from receiving updates, that would be awesome.

    I know my situation is limited to those with members only websites but, this would likely be useful for people who want to allow varying options for varying role levels. For example, giving contributors/authors the added perk of receiving updates for multi author websites.

    Sorry, I know that’s a lot to read but, I’d love to help create an elegant solution.

    Has anyone EVER requested anything like this? I have been reading old posts in the forums for about an hour now.


    You could limit access to the “Your Subscriptions” page to registered users with a role above that of Subscriber by applying a filter in Subscribe2 (that means writing some code). You’d then have to remember to unsubscribe members when they are demoted.

    I cannot recall anyone else ever having asked for this sort of feature.

    I’m looking for the same solution (I’m not gonna use html, full content, and all those others). Disabling those would be perfect.

    @thinkwired: Did you find a solution or another plugin?


    That manual unsubscribing is what I am trying to avoid. At some point it is going to be too much to handle manually. We are growing.


    I simply removed those options from the user interface. Setting the default to excerpt and then removing the option for users to change it is fairly simply to do.

    I have not found another plugin but I am open to suggestions if anyone has one.


    Your suggestion interested me enough to take a look, sadly it’s not an easy fix directly in the code to provide a fix and functionality for the future but…

    There is a filer in Subscribe2 that applies to the collection of Registered Users email addresses called ”s2_registered_subscribers”.

    It would be possible to apply a filter that would cycle through these email addresses dropping those with a ‘Subscriber’ level role in WordPress. I’ll try to post some code if I get time.

    That would be greatly appreciated. Thank you for your time either way.


    I think the following code will work but I’ve only run very brief tests. It basically filters the users collected by Subscribe2 that appear to be subscribed to notifications for the email and then removes any Registered Users with a ‘Subscriber’ role from that list.

    You’ll need to paste this code into your own mini-plugin file and activate it. It will then be retained on upgrade to the core Subscribe2 code.

    function s2_remove_subscriber_role($subscribers) {
    	$user_query = new WP_User_Query( array( 'role' => 'subscriber', 'fields' => array('user_email') ) );
    	$subscriber_role = $user_query->get_results();
    	$exclude = array();
    	foreach ($subscriber_role as $user) {
    		$exclude[] = $user->user_email;
    	return array_diff($subscribers, $exclude);
    add_filter('s2_registered_subscribers', 's2_remove_subscriber_role');

    Thats great, thank you.

    I’m wondering now if the more elegant and useful solution is to simply not send emails to users who are “subscribers.” Because a user may possibly change roles, it would be nice to preserve their settings. Also, I think it might be easier to setup a conditional on the send function which checks a users role and ignores “subscribers.”


    What you’ve described is exactly what the code above will do. Perhaps I mis-understood you initially but have happened upon the solution by chance.

    Sorry about that, it wasn’t obvious to me when I first read the code.

    I created a plugin and will be testing today.

    Quick question, what causes this new stand alone plugin to run? Does the order in which it runs matter?


    Just like WordPress makes some hooks available so plugins can add to or alter the behaviour of the core code, Subscribe2 employs the same structure to allow some code and functions to be altered. It’s all handled by that add_filter() function.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Plugin: Subscribe2] Limit to Plain Text – Excerpt?’ is closed to new replies.