bp_activity_get_types

Fetch details of all registered activity types.

Description

(array) bp_activity_get_types(); 

Returns (array)

array( type => description ), ...


Usage

  1. if ( !function_exists( 'bp_activity_get_types' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_activity_get_types(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_get_types() { 
  2. $actions = array(); 
  3.  
  4. // Walk through the registered actions, and build an array of actions/values. 
  5. foreach ( bp_activity_get_actions() as $action ) { 
  6. $action = array_values( (array) $action ); 
  7.  
  8. for ( $i = 0, $i_count = count( $action ); $i < $i_count; $i++ ) { 
  9. $actions[ $action[$i]['key'] ] = $action[$i]['value']; 
  10.  
  11. // This was a mis-named activity type from before BP 1.6. 
  12. unset( $actions['friends_register_activity_action'] ); 
  13.  
  14. /** 
  15. * Filters the available activity types. 
  16. * @since 1.7.0 
  17. * @param array $actions Array of registered activity types. 
  18. */ 
  19. return apply_filters( 'bp_activity_get_types', $actions );