buddypress()

The main function responsible for returning the one true BuddyBoss Instance to functions everywhere.

Description

Use this function like you would a global variable, except without needing to declare the global.

Example: <?php $bp = buddypress(); ?>

Return

(BuddyPress|null) The one true BuddyPress Instance.

Source

File: bp-loader.php

	function buddypress() {
		return BuddyPress::instance();
	}

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.