bp_activity_get_actions_for_context( string $context = '' )
Gets a flat list of activity actions compatible with a given context.
Description Description
Parameters Parameters
- $context
 - 
					
(Optional) Name of the context. Defaults to the current context.
Default value: ''
 
Return Return
(array)
Source Source
File: bp-activity/bp-activity-functions.php
function bp_activity_get_actions_for_context( $context = '' ) {
	if ( ! $context ) {
		$context = bp_activity_get_current_context();
	}
	$actions = array();
	foreach ( bp_activity_get_actions() as $component_actions ) {
		foreach ( $component_actions as $component_action ) {
			if ( in_array( $context, (array) $component_action['context'], true ) ) {
				$actions[] = $component_action;
			}
		}
	}
	return $actions;
}
			Changelog Changelog
| Version | Description | 
|---|---|
| 2.8.0 | Introduced. |