bp_activity_get_types
Fetch details of all registered activity types.
Description
(array) bp_activity_get_types();
Returns (array)
array( type => description ), ...
Usage
if ( !function_exists( 'bp_activity_get_types' ) ) { require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; } // NOTICE! Understand what this does before running. $result = bp_activity_get_types();
Defined (1)
The function is defined in the following location(s).
- /bp-activity/bp-activity-functions.php
- function bp_activity_get_types() {
- $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'] );
- /**
- * Filters the available activity types.
- *
- * @since 1.7.0
- *
- * @param array $actions Array of registered activity types.
- */
- return apply_filters( 'bp_activity_get_types', $actions );
- }