From 8518b09b35e6ac810716209df88badb85b5c3726 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 22 Jul 2014 23:53:54 -0700 Subject: [PATCH] CRM-15023 - Fix regression in CRM_Core_Permission_GenericTest Follow-up to 29f6fbb7c --- CRM/Core/Permission/WordPress.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Permission/WordPress.php b/CRM/Core/Permission/WordPress.php index dac689daaf..fbe9dbf7f6 100644 --- a/CRM/Core/Permission/WordPress.php +++ b/CRM/Core/Permission/WordPress.php @@ -46,7 +46,6 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base { * @access public */ function check($str) { - require_once ABSPATH . WPINC . '/pluggable.php'; // Generic cms 'administer users' role tranlates to 'administrator' WordPress role $str = $this->translatePermission($str, 'WordPress', array( 'administer users' => 'administrator', @@ -58,6 +57,8 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base { return TRUE; } + require_once ABSPATH . WPINC . '/pluggable.php'; + // for administrators give them all permissions if (!function_exists('current_user_can')) { return TRUE; -- 2.25.1