bp_core_set_bbpress_buddypress_active( $value = array(),  $option )

Filter for setting the spoofing of BuddyPress.

Description

Parameters

$value

(Optional)

Default value: array()

$option

(Required)

Return

(mixed)

Source

File: bp-loader.php

function bp_core_set_bbpress_buddypress_active( $value, $option ) {

	// Do not add the "bbpress/bbpress.php" & "buddypress/bp-loader.php" on "/wp-admin/plugins.php" page otherwise it will show the plugin file not exists error.
	if ( is_network_admin() || strpos( $_SERVER['REQUEST_URI'], '/wp-admin/plugins.php' ) !== false || strpos( $_SERVER['REQUEST_URI'], '/wp-admin/admin-ajax.php' ) !== false ) {
		return $value;
	} else {
		// Check if Forum Component is enabled if so then add
		if ( bp_is_active( 'forums' ) ) {
			array_push( $value, 'bbpress/bbpress.php' );
		}
		array_push( $value, 'buddypress/bp-loader.php' );
	}

	return $value;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

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.