bp_activity_admin_get_activity_actions()
Get flattened array of all registered activity actions.
Description
Format is [activity_type] => Pretty name for activity type.
Return
(array) $actions
Source
File: bp-activity/bp-activity-admin.php
function bp_activity_admin_get_activity_actions() {
$actions = array();
// Walk through the registered actions, and build an array of actions/values.
foreach ( bp_activity_get_actions() as $action ) {
$action = array_values( (array) $action );
for ( $i = 0, $i_count = count( $action ); $i < $i_count; $i++ ) {
$actions[ $action[$i]['key'] ] = $action[$i]['value'];
}
}
// This was a mis-named activity type from before BP 1.6.
unset( $actions['friends_register_activity_action'] );
// Sort array by the human-readable value.
natsort( $actions );
return $actions;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.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.