bp_get_activity_action

Return the activity action.

Description

(string) bp_get_activity_action( (array) $args = array() ); 

Returns (string)

The activity action.

Parameters (1)

0. $args — Optional. (array) => array()
The args.

Options

    ;        


    Usage

    1. if ( !function_exists( 'bp_get_activity_action' ) ) { 
    2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-template.php'; 
    3.  
    4. // The args. 
    5. $args = array(); 
    6.  
    7. // NOTICE! Understand what this does before running. 
    8. $result = bp_get_activity_action($args); 
    9.  

    Defined (1)

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

    /bp-activity/bp-activity-template.php  
    1. function bp_get_activity_action( $args = array() ) { 
    2. global $activities_template; 
    3.  
    4. $r = wp_parse_args( $args, array( 
    5. 'no_timestamp' => false,  
    6. ) ); 
    7.  
    8. /** 
    9. * Filters the activity action before the action is inserted as meta. 
    10. * @since 1.2.10 
    11. * @param array $value Array containing the current action, the current activity, and the $args array passed into the function. 
    12. */ 
    13. $activities_template->activity->action,  
    14. &$activities_template->activity,  
    15. $r 
    16. ) ); 
    17.  
    18. // Prepend the activity action meta (link, time since, etc...). 
    19. if ( ! empty( $action ) && empty( $r['no_timestamp'] ) ) { 
    20. $action = bp_insert_activity_meta( $action ); 
    21.  
    22. /** 
    23. * Filters the activity action after the action has been inserted as meta. 
    24. * @since 1.2.0 
    25. * @param array $value Array containing the current action, the current activity, and the $args array passed into the function. 
    26. */ 
    27. $action,  
    28. &$activities_template->activity,  
    29. $r 
    30. ) );