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

	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.