Skip to:
Content

BuddyPress.org

Changeset 2842 for trunk/bp-loader.php


Ignore:
Timestamp:
03/12/2010 01:03:42 PM (17 years ago)
Author:
apeatling
Message:

Merging 1.2 branch with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-loader.php

    r2784 r2842  
    55Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
    66Author: The BuddyPress Community
    7 Version: 1.2.1
     7Version: 1.2.2
    88Author URI: http://buddypress.org/developers/
    99Site Wide Only: true
    1010*/
    1111
    12 define( 'BP_VERSION', '1.2.1' );
     12define( 'BP_VERSION', '1.2.2' );
    1313
    1414/***
    15  * This file will load in each BuddyPress component based on which
    16  * of the components have been activated on the "BuddyPress" admin menu.
     15 * Check if this is the first time BuddyPress has been loaded, or the first time
     16 * since an upgrade. If so, load the install/upgrade routine only.
    1717 */
     18if ( get_site_option( 'bp-db-version' ) < 1210 ) {
     19        require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-upgrade.php' );
    1820
    19 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core.php' );
    20 $bp_deactivated = apply_filters( 'bp_deactivated_components', get_site_option( 'bp-deactivated-components' ) );
     21/***
     22 * If the install or upgrade routine is completed and everything is up to date
     23 * continue loading BuddyPress as normal.
     24 */
     25} else {
     26        /***
     27         * This file will load in each BuddyPress component based on which
     28         * of the components have been activated on the "BuddyPress" admin menu.
     29         */
     30        require_once( WP_PLUGIN_DIR . '/buddypress/bp-core.php' );
     31        $bp_deactivated = apply_filters( 'bp_deactivated_components', get_site_option( 'bp-deactivated-components' ) );
    2132
    22 do_action( 'bp_core_loaded' );
     33        do_action( 'bp_core_loaded' );
    2334
    24 /* Activity Streams */
    25 if ( !isset( $bp_deactivated['bp-activity.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-activity.php') )
    26         include( BP_PLUGIN_DIR . '/bp-activity.php' );
     35        /* Activity Streams */
     36        if ( !isset( $bp_deactivated['bp-activity.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-activity.php') )
     37                include( BP_PLUGIN_DIR . '/bp-activity.php' );
    2738
    28 /* Blog Tracking */
    29 if ( !isset( $bp_deactivated['bp-blogs.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-blogs.php') )
    30         include( BP_PLUGIN_DIR . '/bp-blogs.php' );
     39        /* Blog Tracking */
     40        if ( !isset( $bp_deactivated['bp-blogs.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-blogs.php') )
     41                include( BP_PLUGIN_DIR . '/bp-blogs.php' );
    3142
    32 /* bbPress Forum Integration */
    33 if ( !isset( $bp_deactivated['bp-forums.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-forums.php') )
    34         include( BP_PLUGIN_DIR . '/bp-forums.php' );
     43        /* bbPress Forum Integration */
     44        if ( !isset( $bp_deactivated['bp-forums.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-forums.php') )
     45                include( BP_PLUGIN_DIR . '/bp-forums.php' );
    3546
    36 /* Friend Connections */
    37 if ( !isset( $bp_deactivated['bp-friends.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-friends.php') )
    38         include( BP_PLUGIN_DIR . '/bp-friends.php' );
     47        /* Friend Connections */
     48        if ( !isset( $bp_deactivated['bp-friends.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-friends.php') )
     49                include( BP_PLUGIN_DIR . '/bp-friends.php' );
    3950
    40 /* Groups Support */
    41 if ( !isset( $bp_deactivated['bp-groups.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-groups.php') )
    42         include( BP_PLUGIN_DIR . '/bp-groups.php' );
     51        /* Groups Support */
     52        if ( !isset( $bp_deactivated['bp-groups.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-groups.php') )
     53                include( BP_PLUGIN_DIR . '/bp-groups.php' );
    4354
    44 /* Private Messaging */
    45 if ( !isset( $bp_deactivated['bp-messages.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-messages.php') )
    46         include( BP_PLUGIN_DIR . '/bp-messages.php' );
     55        /* Private Messaging */
     56        if ( !isset( $bp_deactivated['bp-messages.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-messages.php') )
     57                include( BP_PLUGIN_DIR . '/bp-messages.php' );
    4758
    48 /* Extended Profiles */
    49 if ( !isset( $bp_deactivated['bp-xprofile.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') )
    50         include( BP_PLUGIN_DIR . '/bp-xprofile.php' );
     59        /* Extended Profiles */
     60        if ( !isset( $bp_deactivated['bp-xprofile.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') )
     61                include( BP_PLUGIN_DIR . '/bp-xprofile.php' );
    5162
    52 /* Allow dependent plugins to hook into BuddyPress in a safe way */
    53 function bp_loaded() {
    54         do_action( 'bp_init' );
     63        /* Allow dependent plugins to hook into BuddyPress in a safe way */
     64        function bp_loaded() {
     65                do_action( 'bp_init' );
     66        }
     67        add_action( 'plugins_loaded', 'bp_loaded' );
    5568}
    56 add_action( 'plugins_loaded', 'bp_loaded' );
    5769
    5870/* Activation Function */
Note: See TracChangeset for help on using the changeset viewer.