bp_activity_get_actions

Get all components' activity actions, sorted by their position attribute.

Description

(object) bp_activity_get_actions(); 

Returns (object)

Actions ordered by their position.


Usage

  1. if ( !function_exists( 'bp_activity_get_actions' ) ) { 
  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_actions(); 
  7.  

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_get_actions() { 
  2. $bp =buddypress); 
  3.  
  4.  
  5. // Create the actions for the post types, if they haven't already been created. 
  6. if ( ! empty( $post_types ) ) { 
  7. foreach ( $post_types as $post_type ) { 
  8. if ( isset( $bp->activity->actions->{$post_type->component_id}->{$post_type->action_id} ) ) { 
  9. continue; 
  10.  
  11. $post_type->component_id,  
  12. $post_type->action_id,  
  13. $post_type->admin_filter,  
  14. $post_type->format_callback,  
  15. $post_type->front_filter,  
  16. $post_type->contexts,  
  17. $post_type->position 
  18. ); 
  19.  
  20. return $bp->activity->actions;