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
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 | 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.