BP_REST_Groups_Endpoint::bp_rest_user_can_post( BP_Groups_Group $item )

Check the user can post activity into group or not based on settings.

Description

Parameters

$item

(Required) Group object.

Return

(bool)

Source

File: bp-groups/classes/class-bp-rest-groups-endpoint.php

1687
1688
1689
1690
1691
1692
1693
protected function bp_rest_user_can_post( $item ) {
    if ( ! bp_is_active( 'activity' ) ) {
        return false;
    }
 
    return is_user_logged_in() && bp_group_is_member( $item ) && bp_group_is_member_allowed_posting( $item );
}

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.