Changeset 13155
- Timestamp:
- 11/20/2021 10:03:44 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-activity.php
r13154 r13155 193 193 $user_id = apply_filters( 'bp_members_new_avatar_user_id', $user_id ); 194 194 195 // Get the BuddyPress main plugin instance. 196 $bp = buddypress(); 197 195 198 // Check to make sure that a user has just one `new_avatar` activity per throttle time. 196 199 $last_new_avatar_activity = bp_activity_get( 197 200 array( 198 'user_id' => $user_id,199 'component' => buddypress()->members->id,200 'type' => 'new_avatar',201 201 'per_page' => 1, 202 'filter' => array( 203 'object' => $bp->members->id, 204 'user_id' => $user_id, 205 'action' => 'new_avatar', 206 ) 202 207 ) 203 208 ); … … 230 235 array( 231 236 'user_id' => $user_id, 232 'component' => buddypress()->members->id,237 'component' => $bp->members->id, 233 238 'type' => 'new_avatar', 234 239 ) -
trunk/tests/phpunit/testcases/members/activity.php
r13154 r13155 101 101 $u = self::factory()->user->create(); 102 102 $a = self::factory()->activity->create( array( 103 'component' => 'members',103 'component' => buddypress()->members->id, 104 104 'type' => 'new_avatar', 105 105 'user_id' => $u, … … 109 109 110 110 $new_avatar_activities = bp_activity_get( array( 111 'user_id' => $u, 112 'component' => buddypress()->members->id, 113 'type' => 'new_avatar', 111 'filter' => array( 112 'object' => buddypress()->members->id, 113 'user_id' => $u, 114 'action' => 'new_avatar', 115 ), 114 116 'count_total' => 'count_query', 115 117 ) ); … … 129 131 130 132 $a = self::factory()->activity->create( array( 131 'component' => 'members',133 'component' => buddypress()->members->id, 132 134 'type' => 'new_avatar', 133 135 'user_id' => $u, … … 138 140 139 141 $new_avatar_activities = bp_activity_get( array( 140 'user_id' => $u, 141 'component' => buddypress()->members->id, 142 'type' => 'new_avatar', 142 'filter' => array( 143 'object' => buddypress()->members->id, 144 'user_id' => $u, 145 'action' => 'new_avatar', 146 ), 143 147 'count_total' => 'count_query', 144 148 ) );
Note: See TracChangeset
for help on using the changeset viewer.