bp_get_activity_action( array $args = array() )
Return the activity action.
Description
Parameters
- $args
-
(Optional)
- 'no_timestamp'
(bool) Whether to exclude the timestamp.
Default value: array()
- 'no_timestamp'
Return
(string) The activity action.
Source
File: bp-activity/bp-activity-template.php
function bp_get_activity_action( $args = array() ) { global $activities_template; $r = wp_parse_args( $args, array( 'no_timestamp' => false, ) ); /** * Filters the activity action before the action is inserted as meta. * * @since BuddyPress 1.2.10 * * @param array $value Array containing the current action, the current activity, and the $args array passed into the function. */ $action = apply_filters_ref_array( 'bp_get_activity_action_pre_meta', array( $activities_template->activity->action, &$activities_template->activity, $r ) ); // Prepend the activity action meta (link, time since, etc...). if ( ! empty( $action ) && empty( $r['no_timestamp'] ) ) { $action = bp_insert_activity_meta( $action ); } /** * Filters the activity action after the action has been inserted as meta. * * @since BuddyPress 1.2.0 * * @param array $value Array containing the current action, the current activity, and the $args array passed into the function. */ return apply_filters_ref_array( 'bp_get_activity_action', array( $action, &$activities_template->activity, $r ) ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.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.