[buddypress-dev] $bp global

Andy Peatling andypeatling at automattic.com
Fri Aug 1 04:30:27 GMT 2008


I've just checked in updates to every component in trunk.

Up until now BuddyPress component settings have been stored in a  
number of global variables, all set in a number of different places  
(bad). I've now moved all settings under a "$bp" global variable.  
BuddyPress component settings are now added to $bp in a specific  
function for each component (better).

Global settings for each component are set in:

bp_core_setup_globals(), bp_xprofile_setup_globals(),  
bp_messages_setup_globals() etc etc.

You can check out what is stored, and the structure by using:

<?php print_r ( $bp ) ?> or <?php var_dump( $bp ) ?>

rather than having to hunt for a specific global.

If anyone is writing additional custom components (I know there are a  
few people) this is a major change, so you'll unfortunately need to  
make some updates. Sorry about that, it's better now than never!

Cheers
Andy

---------
Andy Peatling | Social Engineer | Automattic
http://apeatling.wordpress.com


More information about the buddypress-dev mailing list