Changeset 1380129
- Timestamp:
- 03/28/2016 07:42:50 AM (10 years ago)
- Location:
- buddypress-who-clicked-at-my-profile/trunk
- Files:
-
- 2 edited
-
buddypress-who-clicked-at-my-profile.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
buddypress-who-clicked-at-my-profile/trunk/buddypress-who-clicked-at-my-profile.php
r1377937 r1380129 37 37 $current_user = wp_get_current_user(); 38 38 $displayed_user_id = $bp->displayed_user->id; 39 $ viewing_user_id = $current_user->ID;40 if (($displayed_user_id != $viewing_user_id) && ($viewing_user_id > 0) ) {39 $excludeUsers = apply_filters('buddypress_wcamp_excludeUsers', array()); 40 if (($displayed_user_id != $viewing_user_id) && ($viewing_user_id > 0) && (!in_array($current_user->ID, $excludeUsers))) { 41 41 42 42 // get user meta data (clickedme_tracking is a serialized array containing the last visits) … … 60 60 } 61 61 // remove double clicks 62 if ( $viewing_user_id != $trackingListItem['user_id']) {62 if (($viewing_user_id != $trackingListItem['user_id']) && (!in_array($trackingListItem['user_id'], $excludeUsers))) { 63 63 $newTrackingList[] = $trackingListItem; 64 64 } else if ($useBuddypressNotifications) { -
buddypress-who-clicked-at-my-profile/trunk/readme.txt
r1377922 r1380129 57 57 This sets the value of users that get tracked to 25 for example. 58 58 59 60 = Exclude some users from being tracked? = 61 62 Some users should not be tracked? No problem! 63 64 Add the following code to your functions.php 65 66 `add_filter('buddypress_wcamp_excludeUsers','my_buddypress_wcamp_excludeUsers'); 67 function my_buddypress_wcamp_excludeUsers() { 68 return array(1,5,8,23); // exclude (as example) Users with ID 1, 5, 8 and 23 69 }` 70 71 This sets the value of users that get tracked to 25 for example. 72 59 73 = You do not want to use the buddypress notification system for "who clicked at my profile" notifications? = 60 74 … … 75 89 76 90 == Changelog == 91 92 = 3.4 = 93 * Added filter for excluding specified users from being tracked, see FAQ for usage 77 94 78 95 = 3.3 =
Note: See TracChangeset
for help on using the changeset viewer.