From b299b1cc10d0bbb16d7a6f594c82e4f3184ab559 Mon Sep 17 00:00:00 2001 From: Kevin Cristiano Date: Sat, 2 May 2015 10:53:16 -0400 Subject: [PATCH] formatting fixes --- CRM/Core/Permission/WordPress.php | 2 +- CRM/Utils/System/WordPress.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CRM/Core/Permission/WordPress.php b/CRM/Core/Permission/WordPress.php index 0e392ae8f7..8c5e6cf57c 100644 --- a/CRM/Core/Permission/WordPress.php +++ b/CRM/Core/Permission/WordPress.php @@ -66,7 +66,7 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base { return TRUE; } - if (!defined( ABSPATH ) || !defined( WPINC ) ) { + if (!defined(ABSPATH) || !defined(WPINC)) { require_once 'CRM/Utils/System.php'; CRM_Utils_System::loadBootStrap(); } diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index ba161e69d2..35739d2e4f 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -342,13 +342,15 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { 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) { -- 2.25.1