Ok, so I am starting to develop a community based on WordPress – Buddypress – Youzer and the follow plugin which is sadly not getting any updates.
What I need is a toggle to turn off follower notifications so my users can decide if they want to receive an email upon someone following them.
I already got a switch on my Youzer configuration but I would need the follow plugin parts.
I got this switch placed on my class_yz_basic_infos.php
$Yz_Settings->get_field( array( 'title' => __( 'Follower Notifications', 'youzer' ), 'desc' => __( "Email me when a member starts to follow me", 'youzer' ), 'id' => 'yz_bp_follow_notification_settings_content', 'type' => 'checkbox', 'std' => 'on', ), true, 'youzer_notifications' );
and added
yz_bp_follow_notification_settings_content
but it looks likebp_follow_notification_settings_content
is not the right switch or at least not user based.Can anybody help me with that? My users are complaining they got annoyed by all the mails they get.
Thank you very much.
–Mike from Nushara
Hi Mike,
Welcome to BuddyDev,The BuddyPress follower plugin already has the notification option for users to select if they want to receive mail on follow or not.
Please check it.
https://i.imgur.com/PFPxX8X.png
I am assuming that you are using 1.3 branch from github
https://github.com/r-a-y/buddypress-followers
Regards
BrajeshHey Brajesh,
thank you for the fast reply.
I am not able to find this option on my end. Can you tell me where it is or give me the hook, so I can try to add this to my Youzer template.
I am using the latest from WordPress repository.
This is what my README says:
=== BuddyPress Follow === Contributors: apeatling, r-a-y Tags: buddypress, following, followers, connections Requires at least: WP 3.2 / BP 1.5 Tested up to: WP 4.4.x / BP 2.5.x Stable tag: 1.2.2 == Changelog == = 1.3.0 = * Add object caching support. * Add ability to follow sites in WordPress multisite (only available in BuddyPress 2.0+) * Add support for BP's Suggestions API (only available in BuddyPress 2.1+) * Allow plugin to work in symlinked environments * Fix marking notifications as read for bp-default themes * Add Spanish translation (props saik003) * Developer: Add 'following' scope to activity loop (only available in BuddyPress 2.2+) * Developer: Add new <code>'follow_type'</code> and <code>'date_recorded'</code> database columns * Developer: Add ability to sort following and followers query by DB column * Developer: Add ability to query following and followers by WP's date query * Developer: Add ability to disable follow users module = 1.2.2 = * Fix deprecated notice in widget for those using WordPress 4.3+. * Fix member filtering when custom follow slugs are in use.
Hi Mike,
The option is available under User profile->Settings->Email tab.I am not sure if Youzer keeps this tab or removes. If it is not there, you will need to contact them for it.
I do not use Youzer, so not sure with their hooks. All you need to do is create a user meta
notification_starts_following
and set it to
no
for the user and they will not receive the email(The BuddyPress follow plugin checks this meta for the leader before notifying them).
PS:- Your plugin version is correct.
Regards
BrajeshYou are welcome. I hope it works for you.
Regards
BrajeshPerfect, this was really the hook that I was looking for. Thank you very much.
What I did is, I’ve added this:
$Yz_Settings->get_field( array( 'title' => __( 'Follower Notifications', 'youzer' ), 'desc' => __( "Email me when a member starts to follow me", 'youzer' ), 'id' => 'yz_notification_starts_following', 'type' => 'checkbox', 'std' => 'on', ), true, 'youzer_notifications' );
To Youzers “class-user-basic-infos.php” right after the friend request setting. You can find this file here:
youzer -> includes -> public -> core -> widgets -> yz-widgets
Hope this helps anyone else looking for how to add this option.
— Mike from Nushara
- This reply was modified 4 years, 7 months ago by Nushara.
You are welcome.
It’s good to know that you resolved it.
Thank you for sharing the code.
Regards
Brajesh
The topic ‘ [Resolved] Follow Plugin Notification Switch’ is closed to new replies.