BP_REST_Activity_Details_Endpoint::get_activities_post_in()
Get Activity Post in details.
Description
Return
(array)
Source
File: bp-activity/classes/class-bp-rest-activity-details-endpoint.php
public function get_activities_post_in() {
$post_in = array();
$post_in[0] = __( 'My Profile', 'buddyboss' );
if ( bp_is_active( 'groups' ) ) {
$args = array(
'user_id' => get_current_user_id(),
'type' => 'alphabetical',
);
$groups = groups_get_groups( $args );
if ( ! empty( $groups ) && ! empty( $groups['groups'] ) ) {
foreach ( $groups['groups'] as $group ) {
$post_in[ $group->id ] = $group->name;
}
}
}
return $post_in;
}
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.