bp_nouveau_remove_edit_activity_entry_buttons( $buttons,  $activity_id )

We removing the Edit Button on Document/Media Activity popup until we fully support on popup.

Description

Parameters

$buttons

(Required)

$activity_id

(Required)

Return

(mixed)

Source

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

function bp_nouveau_remove_edit_activity_entry_buttons( $buttons, $activity_id ) {

	$exclude_action_arr = array( 'media_get_activity', 'document_get_activity' );

	if ( bp_is_activity_edit_enabled() && isset( $_REQUEST ) && isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $exclude_action_arr, 1 ) ) {
		$activity = new BP_Activity_Activity( $activity_id );
		if ( in_array( $activity->privacy, array( 'document', 'media' ), 1 ) ) {
			unset( $buttons['activity_edit'] );
		}

	}

	return $buttons;

}

Changelog

Changelog
Version Description
BuddyBoss 1.5.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.