BP_REST_Settings_Endpoint::get_bbpress_settings()

Get bbPress settings.

Description

Return

(array)

Source

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

	public function get_bbpress_settings() {
		$results = array(
			// Forum User Settings.
			'bbp_allow_global_access'    => bbp_allow_global_access(),
			'bbp_default_role'           => bbp_get_default_role(),
			'bbp_allow_content_throttle' => bbp_allow_content_throttle(),
			'bbp_throttle_time'          => get_option( '_bbp_throttle_time', '10' ),
			'bbp_allow_content_edit'     => bbp_allow_content_edit(),
			'bbp_edit_lock'              => bbp_get_edit_lock(),
			'bbp_allow_anonymous'        => bbp_allow_anonymous(),

			// Forum Features.
			'bbp_allow_revisions'        => bbp_allow_revisions(),
			'bbp_enable_favorites'       => bbp_is_favorites_active(),
			'bbp_enable_subscriptions'   => bbp_is_subscriptions_active(),
			'bbp_enable_engagements'     => bbp_is_engagements_active(),
			'bbp_allow_topic_tags'       => bbp_allow_topic_tags(),
			'bbp_allow_forum_mods'       => bbp_allow_forum_mods(),
			'bbp_allow_super_mods'       => bbp_allow_super_mods(),
			'bbp_allow_search'           => bbp_allow_search(),
			'bbp_use_wp_editor'          => bbp_use_wp_editor(),
			'bbp_allow_threaded_replies' => bbp_allow_threaded_replies(),
			'bbp_thread_replies_depth'   => bbp_thread_replies_depth(),

			// Forum Theme Packages.
			'bbp_theme_package_id'       => bbp_get_theme_package_id(),

			// Topics and Replies Per Page.
			'bbp_topics_per_page'        => get_option( '_bbp_topics_per_page', '15' ),
			'bbp_replies_per_page'       => get_option( '_bbp_replies_per_page', '15' ),

			// Topics and Replies Per RSS Page.
			'bbp_topics_per_rss_page'    => get_option( '_bbp_topics_per_rss_page', '25' ),
			'bbp_replies_per_rss_page'   => get_option( '_bbp_replies_per_rss_page', '25' ),

			// Forum Root Slug.
			'bbp_include_root'           => bbp_include_root_slug(),
			'bbp_show_on_root'           => bbp_show_on_root(),

			// Forum Integration for BuddyPress.
			'bbp_enable_group_forums'    => bbp_is_group_forums_active(),
			'bbp_group_forums_root_id'   => bbp_get_group_forums_root_id(),
		);

		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.