xprofile_record_activity( array|string $args = '' )
Records activity for the logged in user within the profile component so that it will show in the users activity feed (if installed).
Description
Parameters
- $args
-
(Optional) String containing all variables used after bp_parse_args() call.
Default value: ''
Return
(WP_Error|bool|int)
Source
File: bp-xprofile/bp-xprofile-activity.php
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | function xprofile_record_activity( $args = '' ) { // Bail if activity component is not active. if ( ! bp_is_active( 'activity' ) ) { return false; } // Parse the arguments. $r = bp_parse_args( $args , array ( 'user_id' => bp_loggedin_user_id(), 'action' => '' , 'content' => '' , 'primary_link' => '' , 'component' => buddypress()->profile->id, 'type' => false, 'item_id' => false, 'secondary_item_id' => false, 'recorded_time' => bp_core_current_time(), 'hide_sitewide' => false ) ); return bp_activity_add( $r ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.0.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.