Changeset 3728 for trunk/bp-loader.php
- Timestamp:
- 01/18/2011 12:53:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-loader.php
r3713 r3728 38 38 do_action( 'bp_core_loaded' ); 39 39 40 / * Activity Streams */40 // Activity Streams 41 41 if ( !isset( $bp_deactivated['bp-activity.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-activity.php') ) 42 42 include( BP_PLUGIN_DIR . '/bp-activity.php' ); 43 43 44 / * Blog Tracking */44 // Blog Tracking 45 45 if ( !isset( $bp_deactivated['bp-blogs.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-blogs.php') ) 46 46 include( BP_PLUGIN_DIR . '/bp-blogs.php' ); 47 47 48 / * bbPress Forum Integration */48 // bbPress Forum Integration 49 49 if ( !isset( $bp_deactivated['bp-forums.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-forums.php') ) 50 50 include( BP_PLUGIN_DIR . '/bp-forums.php' ); 51 51 52 / * Friend Connections */52 // Friend Connections 53 53 if ( !isset( $bp_deactivated['bp-friends.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-friends.php') ) 54 54 include( BP_PLUGIN_DIR . '/bp-friends.php' ); 55 55 56 / * Groups Support */56 // Groups Support 57 57 if ( !isset( $bp_deactivated['bp-groups.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-groups.php') ) 58 58 include( BP_PLUGIN_DIR . '/bp-groups.php' ); 59 59 60 / * Private Messaging */60 // Private Messaging 61 61 if ( !isset( $bp_deactivated['bp-messages.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-messages.php') ) 62 62 include( BP_PLUGIN_DIR . '/bp-messages.php' ); 63 63 64 / * Extended Profiles */64 // Extended Profiles 65 65 if ( !isset( $bp_deactivated['bp-xprofile.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') ) 66 66 include( BP_PLUGIN_DIR . '/bp-xprofile.php' ); … … 70 70 71 71 /** 72 * bp_loaded() 73 * 74 * Allow dependent plugins and core actions to attach themselves in a safe way. 75 * 76 * See bp-core.php for the following core actions: 77 * - bp_init|bp_setup_globals|bp_setup_root_components|bp_setup_nav|bp_register_widgets 78 */ 72 * Allow dependent plugins and core actions to attach themselves in a safe way. 73 * 74 * See bp-core.php for the following core actions: 75 * - bp_init|bp_setup_globals|bp_setup_root_components|bp_setup_nav|bp_register_widgets 76 */ 79 77 function bp_loaded() { 80 78 do_action( 'bp_loaded' ); … … 82 80 83 81 /** 84 * bp_core_get_site_options()85 *86 82 * BuddyPress uses site options to store configuration settings. Many of these settings are needed 87 83 * at run time. Instead of fetching them all and adding many initial queries to each page load, let's fetch … … 126 122 $site_meta = $wpdb->get_results( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ({$meta_keys})" ); 127 123 128 $root_blog_meta_keys = "'" . implode( "','", (array)$root_blog_options ) ."'"; 129 124 $root_blog_meta_keys = "'" . implode( "','", (array)$root_blog_options ) ."'"; 130 125 $root_blog_meta_table = $wpdb->get_blog_prefix( BP_ROOT_BLOG ) . 'options'; 131 $root_blog_meta = $wpdb->get_results( $wpdb->prepare( "SELECT option_name AS name, option_value AS value FROM {$root_blog_meta_table} WHERE option_name IN ({$root_blog_meta_keys})" ) );126 $root_blog_meta = $wpdb->get_results( $wpdb->prepare( "SELECT option_name AS name, option_value AS value FROM {$root_blog_meta_table} WHERE option_name IN ({$root_blog_meta_keys})" ) ); 132 127 133 128 $site_options = array(); … … 141 136 } 142 137 143 / * Activation Function */138 // Activation Function 144 139 function bp_loader_activate() { 145 / * Force refresh theme roots. */140 // Force refresh theme roots. 146 141 delete_site_transient( 'theme_roots' ); 147 142 148 /* Switch the user to the new bp-default if they are using the old bp-default on activation. */ 143 // Switch the user to the new bp-default if they are using the old 144 // bp-default on activation. 149 145 if ( 'bp-sn-parent' == get_blog_option( BP_ROOT_BLOG, 'template' ) && 'bp-default' == get_blog_option( BP_ROOT_BLOG, 'stylesheet' ) ) 150 146 switch_theme( 'bp-default', 'bp-default' ); … … 154 150 register_activation_hook( 'buddypress/bp-loader.php', 'bp_loader_activate' ); 155 151 156 / * Deactivation Function */152 // Deactivation Function 157 153 function bp_loader_deactivate() { 158 154 do_action( 'bp_loader_deactivate' );
Note: See TracChangeset
for help on using the changeset viewer.