bp_activity_get_actions()
Get all components’ activity actions, sorted by their position attribute.
Description
Return
(object) Actions ordered by their position.
Source
File: bp-activity/bp-activity-functions.php
function bp_activity_get_actions() { $bp = buddypress(); // Set the activity track global if not set yet. if ( empty( $bp->activity->track ) ) { $bp->activity->track = bp_activity_get_post_types_tracking_args(); } // Create the actions for the post types, if they haven't already been created. if ( ! empty( $bp->activity->track ) ) { foreach ( $bp->activity->track as $post_type ) { if ( isset( $bp->activity->actions->{$post_type->component_id}->{$post_type->action_id} ) ) { continue; } bp_activity_set_action( $post_type->component_id, $post_type->action_id, $post_type->admin_filter, $post_type->format_callback, $post_type->front_filter, $post_type->contexts, $post_type->position ); } } return $bp->activity->actions; }
Changelog
Version | Description |
---|---|
BuddyPress 2.2.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.