BP_REST_Activity_Endpoint::bp_rest_activitiy_edit_data( int $activity_id )
Collect the activity information.
Description
Parameters
- $activity_id
-
(Required) Activity ID.
Return
(array)
Source
File: bp-activity/classes/class-bp-rest-activity-endpoint.php
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 | public function bp_rest_activitiy_edit_data( $activity_id = 0 ) { if ( empty ( $activity_id ) ) { return array (); } if ( ! function_exists( 'bp_activity_get_edit_data' ) ) { return array (); } $edit_activity_data = bp_activity_get_edit_data( $activity_id ); if ( ! empty ( $edit_activity_data ) ) { // Removed unwanted data. $unset_keys = array ( 'id' , 'content' , 'item_id' , 'object' , 'privacy' , 'media' , 'gif' , 'document' ); foreach ( $unset_keys as $key ) { if ( array_key_exists ( $key , $edit_activity_data ) ) { unset( $edit_activity_data [ $key ] ); } } } return ( array ) $edit_activity_data ; } |
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.