Changeset 5300
- Timestamp:
- 11/08/2011 12:11:29 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-loader.php
r5282 r5300 331 331 } 332 332 333 // Create the activity component 334 $bp->activity = new BP_Activity_Component(); 333 function bp_setup_activity() { 334 global $bp; 335 336 $bp->activity = new BP_Activity_Component(); 337 } 338 add_action( 'bp_setup_components', 'bp_setup_activity', 6 ); 339 335 340 ?> -
trunk/bp-blogs/bp-blogs-loader.php
r5282 r5300 192 192 } 193 193 } 194 // Create the blogs component 195 $bp->blogs = new BP_Blogs_Component(); 194 195 function bp_setup_blogs() { 196 global $bp; 197 $bp->blogs = new BP_Blogs_Component(); 198 } 199 add_action( 'bp_setup_components', 'bp_setup_blogs', 6 ); 196 200 197 201 ?> -
trunk/bp-core/bp-core-hooks.php
r5289 r5300 3 3 if ( !defined( 'ABSPATH' ) ) exit; 4 4 5 /** Loaded ********************************************************************/ 5 /** 6 * BuddyPress Filters & Actions 7 * 8 * @package BuddyPress 9 * @subpackage Hooks 10 * 11 * This file contains the actions and filters that are used through-out BuddyPress. 12 * They are consolidated here to make searching for them easier, and to help 13 * developers understand at a glance the order in which things occur. 14 * 15 */ 6 16 7 add_action( 'plugins_loaded', 'bp_loaded', 10 ); 17 // Exit if accessed directly 18 if ( !defined( 'ABSPATH' ) ) exit; 8 19 9 add_action( 'bp_loaded', 'bp_include', 2 ); 20 /** ACTIONS *******************************************************************/ 10 21 11 add_action( 'wp', 'bp_actions', 3 ); 22 /** 23 * Attach BuddyPress to WordPress 24 * 25 * BuddyPress uses its own internal actions to help aid in additional plugin 26 * development, and to limit the amount of potential future code changes when 27 * updates to WordPress occur. 28 */ 29 add_action( 'plugins_loaded', 'bp_loaded', 10 ); 30 add_action( 'init', 'bp_init', 10 ); 31 add_action( 'wp', 'bp_ready', 10 ); 32 //add_action( 'generate_rewrite_rules', 'bp_generate_rewrite_rules', 10 ); 33 //add_action( 'wp_enqueue_scripts', 'bp_enqueue_scripts', 10 ); 34 //add_filter( 'template_include', 'bp_template_include', 10 ); 12 35 13 add_action( 'wp', 'bp_screens', 4 ); 36 /** 37 * bp_loaded - Attached to 'plugins_loaded' above 38 * 39 * Attach various loader actions to the bp_loaded action. 40 * The load order helps to execute code at the correct time. 41 * v---Load order 42 */ 43 add_action( 'bp_loaded', 'bp_setup_components', 2 ); 44 add_action( 'bp_loaded', 'bp_include', 4 ); 45 add_action( 'bp_loaded', 'bp_setup_widgets', 6 ); 46 add_action( 'bp_loaded', 'bp_core_load_admin_bar', 10 ); 14 47 15 /** Init **********************************************************************/ 48 /** 49 * bp_init - Attached to 'init' above 50 * 51 * Attach various initialization actions to the bp_init action. 52 * The load order helps to execute code at the correct time. 53 * v---Load order 54 */ 55 add_action( 'bp_init', 'bp_core_set_uri_globals', 2 ); 56 add_action( 'bp_init', 'bp_setup_globals', 4 ); 57 add_action( 'bp_init', 'bp_setup_nav', 6 ); 58 add_action( 'bp_init', 'bp_setup_title', 8 ); 16 59 17 // Attach bp_init to WordPress init 18 add_action( 'init', 'bp_init' ); 60 /** 61 * bp_ready - Attached to 'wp' above 62 * 63 * Attach various initialization actions to the bp_init action. 64 * The load order helps to execute code at the correct time. 65 * v---Load order 66 */ 67 add_action( 'bp_ready', 'bp_actions', 2 ); 68 add_action( 'bp_ready', 'bp_screens', 4 ); 19 69 20 // Parse the URI and set globals 21 add_action( 'bp_init', 'bp_core_set_uri_globals', 2 ); 22 23 // Setup component globals 24 add_action( 'bp_init', 'bp_setup_globals', 4 ); 25 26 // Setup the navigation menu 27 add_action( 'bp_init', 'bp_setup_nav', 7 ); 70 /** Admin Bar *****************************************************************/ 28 71 29 72 // Setup the navigation menu 30 73 add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 11 ); 31 32 // Setup the title33 add_action( 'bp_init', 'bp_setup_title', 9 );34 35 // Setup widgets36 add_action( 'bp_loaded', 'bp_setup_widgets' );37 38 // Setup admin bar39 add_action( 'bp_loaded', 'bp_core_load_admin_bar' );40 74 41 75 /** The hooks *****************************************************************/ … … 46 80 function bp_include() { 47 81 do_action( 'bp_include' ); 82 } 83 84 /** 85 * Include files on this action 86 */ 87 function bp_setup_components() { 88 do_action( 'bp_setup_components' ); 48 89 } 49 90 … … 99 140 100 141 /** 142 * Attached to wp 143 */ 144 function bp_ready() { 145 do_action( 'bp_ready' ); 146 } 147 148 /** 101 149 * Attach potential template actions 102 150 */ -
trunk/bp-core/bp-core-loader.php
r5272 r5300 230 230 } 231 231 232 // Initialize the BuddyPress Core 233 $bp->core = new BP_Core(); 232 function bp_setup_core() { 233 global $bp; 234 $bp->core = new BP_Core(); 235 } 236 add_action( 'bp_setup_components', 'bp_setup_core', 2 ); 234 237 235 238 ?> -
trunk/bp-forums/bp-forums-loader.php
r5282 r5300 248 248 } 249 249 } 250 // Create the forums component 251 $bp->forums = new BP_Forums_Component(); 250 251 function bp_setup_forums() { 252 global $bp; 253 254 $bp->forums = new BP_Forums_Component(); 255 } 256 add_action( 'bp_setup_components', 'bp_setup_forums', 6 ); 252 257 253 258 ?> -
trunk/bp-friends/bp-friends-loader.php
r5282 r5300 207 207 } 208 208 } 209 // Create the friends component 210 $bp->friends = new BP_Friends_Component(); 209 210 function bp_setup_friends() { 211 global $bp; 212 $bp->friends = new BP_Friends_Component(); 213 } 214 add_action( 'bp_setup_components', 'bp_setup_friends', 6 ); 211 215 212 216 ?> -
trunk/bp-groups/bp-groups-loader.php
r5282 r5300 472 472 } 473 473 } 474 // Create the groups component 475 $bp->groups = new BP_Groups_Component(); 474 475 476 function bp_setup_groups() { 477 global $bp; 478 479 $bp->groups = new BP_Groups_Component(); 480 } 481 add_action( 'bp_setup_components', 'bp_setup_groups', 6 ); 476 482 477 483 ?> -
trunk/bp-members/bp-members-loader.php
r5098 r5300 186 186 parent::setup_title(); 187 187 } 188 } 188 189 190 function bp_setup_members() { 191 global $bp; 192 $bp->members = new BP_Members_Component(); 189 193 } 190 // Create the users component 191 $bp->members = new BP_Members_Component(); 194 add_action( 'bp_setup_components', 'bp_setup_members', 1 ); 192 195 193 196 ?> -
trunk/bp-messages/bp-messages-loader.php
r5282 r5300 252 252 } 253 253 } 254 // Create the messages component 255 $bp->messages = new BP_Messages_Component(); 254 255 function bp_setup_messages() { 256 global $bp; 257 $bp->messages = new BP_Messages_Component(); 258 } 259 add_action( 'bp_setup_components', 'bp_setup_messages', 6 ); 256 260 257 261 ?> -
trunk/bp-settings/bp-settings-loader.php
r5282 r5300 182 182 } 183 183 } 184 // Create the settingss component 185 $bp->settings = new BP_Settings_Component(); 184 185 function bp_setup_settings() { 186 global $bp; 187 $bp->settings = new BP_Settings_Component(); 188 } 189 add_action( 'bp_setup_components', 'bp_setup_settings', 6 ); 186 190 187 191 ?> -
trunk/bp-xprofile/bp-xprofile-loader.php
r5282 r5300 231 231 } 232 232 } 233 // Create the xprofile component 234 if ( !isset( $bp->profile->id ) ) 235 $bp->profile = new BP_XProfile_Component(); 233 234 function bp_setup_xprofile() { 235 global $bp; 236 237 if ( !isset( $bp->profile->id ) ) 238 $bp->profile = new BP_XProfile_Component(); 239 } 240 add_action( 'bp_setup_components', 'bp_setup_xprofile', 6 ); 236 241 237 242 ?>
Note: See TracChangeset
for help on using the changeset viewer.