bp_activity_at_name_send_emails (BP_Activity_Activity美元的活动)
为活动项目中提到的用户发送电子邮件和BP通知。
描述
参数
- 美元的活动
-
(BP_Activity_Activity)(必需)的BP_Activity_Activity对象。
源
文件:bp-activity / bp-activity-filters.php
function bp_activity_at_name_send_emails($activity){//提到禁用?如果(!Bp_activity_do_mentions ()) {return;} //如果我们的临时变量不存在,现在停止。If (empty(buddypress()->activity->mentioned_users))返回;//从bp_activity_at_name_filter_updates()获取临时变量。用户名=美元buddypress() - >活动- > mentioned_users;//删除临时变量。设置(buddypress() - >活动> mentioned_users);//发送@提到和设置BP通知。 foreach( (array) $usernames as $user_id => $username ) { /** * Filters BuddyPress' ability to send email notifications for @mentions. * * @since BuddyPress 1.6.0 * @since BuddyPress 2.5.0 Introduced `$user_id` and `$activity` parameters. * * @param bool $value Whether or not BuddyPress should send a notification to the mentioned users. * @param array $usernames Array of users potentially notified. * @param int $user_id ID of the current user being notified. * @param BP_Activity_Activity $activity Activity object. */ if ( apply_filters( 'bp_activity_at_name_do_notifications', true, $usernames, $user_id, $activity ) ) { bp_activity_at_message_notification( $activity->id, $user_id ); } // Updates mention count for the user. bp_activity_update_mention_count_for_user( $user_id, $activity->id ); } }
更新日志
版本 | 描述 |
---|---|
BuddyPress 1.7.0 | 介绍了。 |