Changeset 9310
- Timestamp:
- 01/07/2015 11:38:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-loader.php
r9308 r9310 22 22 23 23 // Exit if accessed directly 24 if ( !defined( 'ABSPATH' ) )exit;24 defined( 'ABSPATH' ) || exit; 25 25 26 26 /** Constants *****************************************************************/ … … 223 223 // Place your custom code (actions/filters) in a file called 224 224 // '/plugins/bp-custom.php' and it will be loaded before anything else. 225 if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) ) 225 if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) ) { 226 226 require( WP_PLUGIN_DIR . '/bp-custom.php' ); 227 } 227 228 228 229 // Path and URL … … 283 284 // 284 285 // @todo Make this better 285 if ( ! defined( 'BP_SEARCH_SLUG' ) )286 if ( ! defined( 'BP_SEARCH_SLUG' ) ) { 286 287 define( 'BP_SEARCH_SLUG', 'search' ); 288 } 287 289 } 288 290 … … 396 398 397 399 // Define the BuddyPress version 398 if ( !defined( 'BP_VERSION' ) ) define( 'BP_VERSION', $this->version ); 400 if ( ! defined( 'BP_VERSION' ) ) { 401 define( 'BP_VERSION', $this->version ); 402 } 399 403 400 404 // Define the database version 401 if ( !defined( 'BP_DB_VERSION' ) ) define( 'BP_DB_VERSION', $this->db_version ); 405 if ( ! defined( 'BP_DB_VERSION' ) ) { 406 define( 'BP_DB_VERSION', $this->db_version ); 407 } 402 408 } 403 409 … … 475 481 476 482 // If BuddyPress is being deactivated, do not add any actions 477 if ( bp_is_deactivation( $this->basename ) ) 483 if ( bp_is_deactivation( $this->basename ) ) { 478 484 return; 485 } 479 486 480 487 // Array of BuddyPress core actions … … 494 501 495 502 // Add the actions 496 foreach( $actions as $class_action ) 503 foreach( $actions as $class_action ) { 497 504 add_action( 'bp_' . $class_action, array( $this, $class_action ), 5 ); 505 } 498 506 499 507 // All BuddyPress actions are setup (includes bbp-core-hooks.php) … … 587 595 588 596 // Bail if something already has this under control 589 if ( ! empty( $this->theme_compat->theme ) ) 597 if ( ! empty( $this->theme_compat->theme ) ) { 590 598 return; 599 } 591 600 592 601 // Setup the theme package to use for compatibility
Note: See TracChangeset
for help on using the changeset viewer.