BP_REST_Settings_Endpoint::get_buddypress_settings()

Get BuddyPress settings.

Description

Return

(array)

Source

File: bp-core/classes/class-bp-rest-settings-endpoint.php

	public function get_buddypress_settings() {
		$results = array(
			// General settings.
			'bp-disable-account-deletion' => bp_disable_account_deletion(),
			'bp_theme_package_id'         => bp_get_theme_package_id(),
		);

		// Xprofile settings.
		if ( bp_is_active( 'xprofile' ) ) {
			$results['bp-disable-avatar-uploads']      = bp_disable_avatar_uploads();
			$results['bp-disable-cover-image-uploads'] = bp_disable_cover_image_uploads();
			$results['bp-disable-profile-sync']        = bp_disable_profile_sync();
		}

		// Activity settings.
		if ( bp_is_active( 'activity' ) ) {
			$results['bp-disable-blogforum-comments'] = bp_disable_blogforum_comments();
			$results['bp_enable_heartbeat_refresh']   = bp_is_activity_heartbeat_active();
		}

		// Groups settings.
		if ( bp_is_active( 'groups' ) ) {
			// Group Settings.
			$results['bp_restrict_group_creation']           = bp_restrict_group_creation();
			$results['bp-disable-group-avatar-uploads']      = bp_disable_group_avatar_uploads();
			$results['bp-disable-group-cover-image-uploads'] = bp_disable_group_cover_image_uploads();
		}

		// Additional.
		$results['enable_friendship_connections'] = bp_is_active( 'friends' );
		$results['enable_messages']               = bp_is_active( 'messages' );

		return $results;
	}

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.