return TRUE;
}
- if (!defined( ABSPATH ) || !defined( WPINC ) ) {
+ if (!defined(ABSPATH) || !defined(WPINC)) {
require_once 'CRM/Utils/System.php';
CRM_Utils_System::loadBootStrap();
}
if (!$cmsRootPath) {
CRM_Core_Error::fatal("Could not find the install directory for WordPress");
}
- $path = CRM_Core_BAO_Setting::getItem( 'CiviCRM Preferences', 'wpLoadPhp' );
- if ( ! empty( $path ) ) {
+ $path = CRM_Core_BAO_Setting::getItem('CiviCRM Preferences', 'wpLoadPhp');
+ if (!empty($path)) {
require_once $path;
- } elseif ( file_exists( $cmsRootPath . DIRECTORY_SEPARATOR . 'wp-load.php' ) ) {
+ }
+ elseif (file_exists($cmsRootPath . DIRECTORY_SEPARATOR . 'wp-load.php')) {
require_once $cmsRootPath . DIRECTORY_SEPARATOR . 'wp-load.php';
- } else {
- CRM_Core_Error::fatal( "Could not find the bootstrap file for WordPress" );
+ }
+ else {
+ CRM_Core_Error::fatal("Could not find the bootstrap file for WordPress");
}
$wpUserTimezone = get_option('timezone_string');
if ($wpUserTimezone) {