From 2ab6bb49efade15c3ffb29c2baf1a2f98bec3a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Re=C3=BCel=20van=20der=20Steege?= Date: Mon, 29 Jul 2024 16:21:41 +0200 Subject: [PATCH] Fix empty settings page for users with `manage_options` capability and no administrator role (https://github.com/cloudflare/Cloudflare-WordPress/issues/544). --- src/WordPress/WordPressAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WordPress/WordPressAPI.php b/src/WordPress/WordPressAPI.php index 390e792c..fe91968a 100644 --- a/src/WordPress/WordPressAPI.php +++ b/src/WordPress/WordPressAPI.php @@ -161,6 +161,6 @@ public function checkIfValidCloudflareSubdomain($response, $domainName) */ public function isCurrentUserAdministrator() { - return $this->wordPressWrapper->currentUserCan('administrator'); + return $this->wordPressWrapper->currentUserCan('manage_options'); } }