Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/12/2013 10:30:52 PM (13 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-xprofile/bp-xprofile-loader.php

    r7277 r7347  
    7575         *
    7676         * @since BuddyPress (1.5)
    77          * @global BuddyPress $bp The one true BuddyPress instance
    7877         */
    7978        public function setup_globals( $args = array() ) {
    80                 global $bp;
     79                $bp = buddypress();
    8180
    8281                // Define a slug, if necessary
    … …  
    208207        /**
    209208         * Set up the Toolbar
    210          *
    211          * @global BuddyPress $bp The one true BuddyPress instance
    212209         */
    213210        public function setup_admin_bar( $wp_admin_nav = array() ) {
    214                 global $bp;
     211                $bp = buddypress();
    215212
    216213                // Prevent debug notices
    … …  
    262259        /**
    263260         * Sets up the title for pages and <title>
    264          *
    265          * @global BuddyPress $bp The one true BuddyPress instance
    266261         */
    267262        function setup_title() {
    268                 global $bp;
     263                $bp = buddypress();
    269264
    270265                if ( bp_is_profile_component() ) {
    … …  
    286281
    287282function bp_setup_xprofile() {
    288         global $bp;
     283        $bp = buddypress();
    289284
    290285        if ( !isset( $bp->profile->id ) )
Note: See TracChangeset for help on using the changeset viewer.