Skip to:
Content

BuddyPress.org

Changeset 2472


Ignore:
Timestamp:
01/28/2010 09:58:01 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Defer bp_init until plugins_loaded. Dependent plugins should load their code by adding an action onto bp_init.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-loader.php

    r2444 r2472  
    5050    include( BP_PLUGIN_DIR . '/bp-xprofile.php' );
    5151
    52 do_action( 'bp_init' );
     52/* Allow dependent plugins to hook into BuddyPress in a safe way */
     53function bp_loaded() {
     54    do_action( 'bp_init' );
     55}
     56add_action( 'plugins_loaded', 'bp_loaded' );
    5357
    5458/* Activation Function */
Note: See TracChangeset for help on using the changeset viewer.