Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 12:11:29 AM (13 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-friends/bp-friends-loader.php

    r5282 r5300  
    207207    }
    208208}
    209 // Create the friends component
    210 $bp->friends = new BP_Friends_Component();
     209
     210function bp_setup_friends() {
     211    global $bp;
     212    $bp->friends = new BP_Friends_Component();
     213}
     214add_action( 'bp_setup_components', 'bp_setup_friends', 6 );
    211215
    212216?>
Note: See TracChangeset for help on using the changeset viewer.