Changeset 6436
- Timestamp:
- 10/22/2012 05:24:36 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-actions.php
r6324 r6436 49 49 * Attach various loader actions to the bp_loaded action. 50 50 * The load order helps to execute code at the correct time. 51 * v---Load order51 * v---Load order 52 52 */ 53 add_action( 'bp_loaded', 'bp_setup_components', 2 ); 54 add_action( 'bp_loaded', 'bp_include', 4 ); 55 add_action( 'bp_loaded', 'bp_setup_widgets', 6 ); 56 add_action( 'bp_loaded', 'bp_core_load_admin_bar', 10 ); 57 add_action( 'bp_loaded', 'bp_register_theme_packages', 16 ); 53 add_action( 'bp_loaded', 'bp_setup_components', 2 ); 54 add_action( 'bp_loaded', 'bp_include', 4 ); 55 add_action( 'bp_loaded', 'bp_setup_widgets', 6 ); 56 add_action( 'bp_loaded', 'bp_core_load_admin_bar', 10 ); 57 add_action( 'bp_loaded', 'bp_register_theme_packages', 12 ); 58 add_action( 'bp_loaded', 'bp_register_theme_directory', 14 ); 58 59 59 60 /** -
trunk/bp-core/bp-core-dependency.php
r6342 r6436 127 127 128 128 /** 129 * The main action used registering theme directory 130 * 131 * @since BuddyPress (1.5) 132 * @uses do_action() 133 */ 134 function bp_register_theme_directory() { 135 do_action( 'bp_register_theme_directory' ); 136 } 137 138 /** 129 139 * The main action used registering theme packages 130 140 * -
trunk/bp-core/bp-core-update.php
r6301 r6436 181 181 delete_site_transient( 'theme_roots' ); 182 182 183 // Switch to WordPress's default theme if current parent or child theme 184 // depend on bp-default. This is to prevent white screens of doom. 185 if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) ) { 186 switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); 187 update_option( 'template_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 188 update_option( 'stylesheet_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 189 } 190 183 191 // Use as of (1.6) 184 192 do_action( 'bp_deactivation' ); -
trunk/bp-loader.php
r6416 r6436 332 332 333 333 // BuddyPress root directory 334 $this->file = __FILE__; 335 $this->basename = plugin_basename( $this->file ); 336 $this->plugin_dir = BP_PLUGIN_DIR; 337 $this->plugin_url = BP_PLUGIN_URL; 338 339 // Themes 340 $this->themes_dir = $this->plugin_dir . 'bp-themes'; 341 $this->themes_url = $this->plugin_url . 'bp-themes'; 334 $this->file = __FILE__; 335 $this->basename = plugin_basename( $this->file ); 336 $this->plugin_dir = BP_PLUGIN_DIR; 337 $this->plugin_url = BP_PLUGIN_URL; 342 338 343 339 // Languages 344 $this->lang_dir = $this->plugin_dir . 'bp-languages'; 340 $this->lang_dir = $this->plugin_dir . 'bp-languages'; 341 342 // Templates (theme compatability) 343 $this->themes_dir = $this->plugin_dir . 'bp-templates'; 344 $this->themes_url = $this->plugin_url . 'bp-templates'; 345 346 // Themes (for bp-default) 347 $this->old_themes_dir = $this->plugin_dir . 'bp-themes'; 348 $this->old_themes_url = $this->plugin_url . 'bp-themes'; 345 349 346 350 /** Theme Compat ******************************************************/ … … 351 355 /** Users *************************************************************/ 352 356 353 $this->current_user 354 $this->displayed_user 357 $this->current_user = new stdClass(); 358 $this->displayed_user = new stdClass(); 355 359 } 356 360 … … 498 502 add_action( 'bp_' . $class_action, array( $this, $class_action ), 5 ); 499 503 500 // Setup the BuddyPress theme directory 501 // @todo Move bp-default to wordpress.org/extend/themes and remove this 502 register_theme_directory( $this->themes_dir ); 504 // All BuddyPress actions are setup (includes bbp-core-hooks.php) 505 do_action_ref_array( 'bp_after_setup_actions', array( &$this ) ); 503 506 } 504 507 505 508 /** Public Methods ********************************************************/ 509 510 /** 511 * Setup the BuddyPress theme directory 512 * 513 * @since BuddyPress (1.5) 514 * @todo Move bp-default to wordpress.org/extend/themes and remove this 515 */ 516 public function register_theme_directory() { 517 register_theme_directory( $this->old_themes_dir ); 518 } 506 519 507 520 /**
Note: See TracChangeset
for help on using the changeset viewer.