From 7a44e49f49437c25b06086a74b79876ce05042c4 Mon Sep 17 00:00:00 2001 From: Christian Wach Date: Tue, 10 Nov 2015 10:10:54 +0000 Subject: [PATCH] do not load theme files when bootstrapping WordPress --- CRM/Utils/System/WordPress.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index b9ab972110..bb4b8e721e 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -338,6 +338,10 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { public function loadBootStrap($name = NULL, $pass = NULL) { global $wp, $wp_rewrite, $wp_the_query, $wp_query, $wpdb, $current_site, $current_blog, $current_user; + if (!defined('WP_USE_THEMES')) { + define('WP_USE_THEMES', false); + } + $cmsRootPath = $this->cmsRootPath(); if (!$cmsRootPath) { CRM_Core_Error::fatal("Could not find the install directory for WordPress"); -- 2.25.1