Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/12/2013 10:30:52 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Audit loader classes, and remove $bp global touches in lieu of using the buddypress() function. Also some whitespace clean-up.

File:
1 edited

Legend:

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

    r7277 r7347  
    3939     *
    4040     * @since BuddyPress (1.5)
    41      *
    42      * @global BuddyPress $bp
    4341     */
    4442    private function bootstrap() {
    45         global $bp;
     43        $bp = buddypress();
    4644
    4745        /**
     
    128126     *
    129127     * @since BuddyPress (1.5)
    130      *
    131      * @global BuddyPress $bp
    132128     */
    133129    public function setup_globals( $args = array() ) {
    134         global $bp;
     130        $bp = buddypress();
    135131
    136132        /** Database **********************************************************/
     
    192188     *
    193189     * @since BuddyPress (1.5)
    194      *
    195      * @global BuddyPress $bp
    196190     */
    197191    public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
    198         global $bp;
     192        $bp = buddypress();
    199193
    200194         // If xprofile component is disabled, revert to WordPress profile
    201195        if ( !bp_is_active( 'xprofile' ) ) {
    202 
    203             // Define local variable
    204             $sub_nav = array();
    205196
    206197            // Fallback values if xprofile is disabled
     
    244235 */
    245236function bp_setup_core() {
    246     global $bp;
    247     $bp->core = new BP_Core();
     237    buddypress()->core = new BP_Core();
    248238}
    249239add_action( 'bp_setup_components', 'bp_setup_core', 2 );
Note: See TracChangeset for help on using the changeset viewer.