Skip to:
Content
Pages
Categories
Search
Top
Bottom
Codex HomeDeveloper Resources → The $bp Global

The $bp Global

The $bp global contains all of the variables and configuration settings that BuddyPress needs to use throughout an installation. As a developer you may find a good first step is to use the function below to render out the contents. You’ll then be able to look over everything and get a glimpse into how things work behind the scenes.

Add this to the top of ‘bp-core.php’ and you’ll be able to take a good look at it:

function bp_dump() {
	global $bp;

	foreach ( (array)$bp as $key => $value ) {
		echo '<pre>';
		echo '<strong>' . $key . ': </strong><br />';
		print_r( $value );
		echo '</pre>';
	}
	die;
}
add_action( 'wp', 'bp_dump' );

Here’s an description of each setting:

Skip to toolbar