xprofile_delete_activity( array|string $args = '' )
Deletes activity for a user within the profile component so that it will be removed from the users activity feed and sitewide stream (if installed).
Description
Parameters
- $args
-
(array|string) (Optional) Containing all variables used after bp_parse_args() call.
Default value: ''
Return
(bool)
Source
File: bp-xprofile/bp-xprofile-activity.php
function xprofile_delete_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( 'component' => buddypress()->profile->id ), 'xprofile_delete_activity' ); // Delete the activity item. bp_activity_delete_by_item_id( $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.