bp_activity_display_all_types_on_just_me( array $args )

Returns $args to force display of all member activity types on members activity feed.

Description

Parameters

$args

(array) (Required)

Return

(array) $args

Source

File: bp-activity/bp-activity-filters.php

function bp_activity_display_all_types_on_just_me($args) {
	if ( ! isset( $args['scope'] ) ) {
		return $args;
	}

	if ( ! $args['scope'] ) {
		return $args;
	}

	// fallback
	if ( 'just-me' !== $args['scope'] ) {
		return $args;
	}

	$scope = ['just-me'];
	if ( bp_activity_do_mentions() )   $scope[] = 'mentions';
	if ( bp_is_active( 'friends' ) && bp_is_my_profile() )          $scope[] = 'friends';
	if ( bp_is_active( 'groups' ) && bp_is_my_profile() )           $scope[] = 'groups';
	if ( bp_is_activity_follow_active() && bp_is_my_profile() )     $scope[] = 'following';

	$args['scope'] = implode(',', $scope);

	return $args;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.