Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 12:11:29 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Attach component creation to 'bp_setup_component' action. Clean up bp-core-hooks.php and include new 'bp_setup_component' hook. Fixes issue with $bp reference in global scope in each component. See #3738.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r5282 r5300  
    231231    }
    232232}
    233 // Create the xprofile component
    234 if ( !isset( $bp->profile->id ) )
    235     $bp->profile = new BP_XProfile_Component();
     233
     234function bp_setup_xprofile() {
     235    global $bp;
     236
     237    if ( !isset( $bp->profile->id ) )
     238        $bp->profile = new BP_XProfile_Component();
     239}
     240add_action( 'bp_setup_components', 'bp_setup_xprofile', 6 );
    236241
    237242?>
Note: See TracChangeset for help on using the changeset viewer.