Skip to:

Re: Limit Blog Creation to Admins

Burt Adsit


All these add_action() things that tell wp to hookup our fns to wp’s events get executed during the plugin load sequence. The code we stick into bp-custom.php gets loaded and parsed before bp does anything. If we just unhook stuff in there and create our own hooks it won’t work. wp will run our unhooks, find that there is no fn to unhook do nothing. There’s nothing to unhook yet because bp hasn’t fully loaded and declared it’s intentions to listen and hook certain events.

We have to set things up to wait paitently for bp to declare its intentions and then change the state of the bp universe behind it’s back. One of those events that wp triggers during the startup sequence is ‘plugins_loaded’. How handy.

Skip to toolbar