Changeset 13531 for trunk/src/bp-activity/bp-activity-functions.php
- Timestamp:
- 07/28/2023 04:15:02 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-activity/bp-activity-functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-functions.php
r13436 r13531 3305 3305 } 3306 3306 3307 if ( ! bp_current_user_can( 'bp_view', array( 'bp_component' => 'activity' ) ) ) { 3308 $retval = false; 3309 } 3310 3307 3311 // If activity is from a group, do extra cap checks. 3308 if ( bp_is_active( 'groups' ) && buddypress()->groups->id === $activity->component ) {3312 if ( bp_is_active( 'groups' ) && buddypress()->groups->id === $activity->component && bp_current_user_can( 'bp_view', array( 'bp_component' => 'groups' ) ) ) { 3309 3313 // Check to see if the user has access to the activity's parent group. 3310 3314 $group = groups_get_group( $activity->item_id ); … … 4483 4487 * 4484 4488 * @since 8.0.0 4489 * @since 12.0.0 Added bp_current_user_can( 'bp_view' ) check. 4485 4490 * 4486 4491 * @param string $feed_id The feed identifier. Possible values are: … … 4488 4493 */ 4489 4494 function bp_activity_is_feed_enable( $feed_id = '' ) { 4495 $retval = bp_current_user_can( 'bp_view', array( 'bp_component' => 'activity' ) ); 4496 4490 4497 /** 4491 4498 * Filters if BuddyPress should consider feeds enabled. If disabled, it will return early. … … 4494 4501 * @since 8.0.0 Adds the `$feed_id` parameter. 4495 4502 * 4496 * @param bool $ value Defaults to true aka feeds are enabled.4503 * @param bool $retval Whether this feed is enabled or not. 4497 4504 * @param string $feed_id The feed identifier. 4498 4505 */ 4499 return (bool) apply_filters( 'bp_activity_enable_feeds', true, $feed_id );4500 } 4506 return (bool) apply_filters( 'bp_activity_enable_feeds', $retval, $feed_id ); 4507 }
Note: See TracChangeset
for help on using the changeset viewer.