正在查看 2 个帖子:1-2 (共 2 个帖子)
-
作者帖子
-
buddypress 默认也是需要用户勾选电子邮件通知后才会发送邮件,如果要调整成默认就发送的可以在子主题functions.php 中尝试以下代码:
add_action( 'bp_core_activated_user', 'wb_set_email_notifications_preference'); function wp_set_email_notifications_preference( $user_id ) { //I am putting all the notifications to no by default //you can set the value to 'yes' if you want that notification to be enabled. $settings_keys = array( 'notification_activity_new_mention' => 'no', 'notification_activity_new_reply' => 'no', 'notification_friends_friendship_request' => 'no', 'notification_friends_friendship_accepted' => 'no', 'notification_groups_invite' => 'no', 'notification_groups_group_updated' => 'no', 'notification_groups_admin_promotion' => 'no', 'notification_groups_membership_request' => 'no', 'notification_messages_new_message' => 'no', ); foreach( $settings_keys as $setting => $preference ) { bp_update_user_meta( $user_id, $setting, $preference ); } }
还有个插件也能实现相同功能,这个需要自己下载,插件作者提供有旧版本的免费下载应该都是可以用的。
下载方式直接点 download 按钮
-
作者帖子
正在查看 2 个帖子:1-2 (共 2 个帖子)
- 哎呀,回复话题必需登录。