From a1b8cd0840eec9a037a1f739632048e0182fb884 Mon Sep 17 00:00:00 2001 From: Guillaume Molter Date: Sat, 6 Aug 2016 11:58:54 -0400 Subject: [PATCH] If multisite use manage_network_options priviledge Related to #11 --- postmark.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postmark.php b/postmark.php index f97e570..d95b085 100644 --- a/postmark.php +++ b/postmark.php @@ -75,7 +75,7 @@ function send_test_email() { } // We check that the current user is allowed to update settings. - if ( ! current_user_can('manage_options') ) { + if ( ( is_multisite() && ! current_user_can('manage_network_options') ) || ! current_user_can('manage_options') ) { wp_die(__('Cheatin’ uh?')); } @@ -140,7 +140,7 @@ function save_settings() { } // We check that the current user is allowed to update settings. - if ( ! current_user_can('manage_options') ) { + if ( ( is_multisite() && ! current_user_can('manage_network_options') ) || ! current_user_can('manage_options') ) { wp_die(__('Cheatin’ uh?')); }