Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/27/2011 06:42:12 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Move $bp_pages global into $bp->pages global. Check empty() on table_prefix, root_domain, and site_options to allow manual overrides.

File:
1 edited

Legend:

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

    r3944 r3947  
    3535
    3636        function _setup_globals() {
    37                 global $bp, $bp_pages;
     37                global $bp;
     38
     39                /** Database **********************************************************/
    3840
    3941                // Get the base database prefix
    40                 $bp->table_prefix = bp_core_get_table_prefix();
     42                if ( empty( $bp->table_prefix ) )
     43                        $bp->table_prefix = bp_core_get_table_prefix();
    4144
    4245                // The domain for the root of the site where the main blog resides
    43                 $bp->root_domain  = bp_core_get_root_domain();
     46                if ( empty( $bp->root_domain ) )
     47                        $bp->root_domain = bp_core_get_root_domain();
     48
     49                // Fetches all of the core BuddyPress settings in one fell swoop
     50                if ( empty( $bp->site_options ) )
     51                        $bp->site_options = bp_core_get_site_options();
    4452
    4553                // The names of the core WordPress pages used to display BuddyPress content
    46                 $bp->pages        = $bp_pages;
     54                if ( empty( $bp->pages ) )
     55                        $bp->pages = bp_core_get_page_names();
    4756
    48                 /** Component and Action **************************************************/
     57                /** Component and Action **********************************************/
    4958
    5059                // Used for overriding the 2nd level navigation menu so it can be used to
    … …  
    6372                }
    6473
    65                 // Fetches all of the core BuddyPress settings in one fell swoop
    66                 $bp->site_options = bp_core_get_site_options();
    67 
    6874                // Sets up the array container for the component navigation rendered
    6975                // by bp_get_nav()
    … …  
    7884                $bp->active_components = array();
    7985
    80                 /** Basic current user data ***********************************************/
     86                /** Basic current user data *******************************************/
    8187
    8288                // Logged in user is the 'current_user'
    … …  
    8692                $bp->loggedin_user->id   = $current_user->ID;
    8793
    88                 /** Avatars ***************************************************************/
     94                /** Avatars ***********************************************************/
    8995
    9096                // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar
Note: See TracChangeset for help on using the changeset viewer.