bp_activity_has_activity_filter (has_activities美元,美元的活动)
过滤朋友的隐私活动
描述
参数
- has_activities美元
-
(必需)
- 美元的活动
-
(必需)
返回
(混合)
源
文件:bp-activity / bp-activity-filters.php
函数bp_activity_has_activity_filter($has_activities, $activities) {if (!bb_is_active ('friends') || !Is_user_logged_in () || is_super_admin()) {return $has_activities;} if (!if ('friends' == $activity->privacy) {$remove_from_stream = false;$is_friend = friends_check_friend (bp_loggedin_user_id(), $activity->user_id);如果(!$is_friend) {$remove_from_stream = true;} if ($ activity ->activity_count) {$ activity ->activity_count = $ activity ->activity_count - 1; / /将activity的值设置为0If (isset($activities->total_activity_count)) {$activities->total_activity_count = $activities->total_activity_count - 1; / /激活> } unset( $activities->activities[ $key ] ); } } } } $activities->activities = array_values( $activities->activities ); return $has_activities; }
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.0.0 | 介绍了。 |