From c1fd97a78995ee9ab287fa72c3f64b20dece4e78 Mon Sep 17 00:00:00 2001 From: Franz Josef Kaiser Date: Mon, 12 Oct 2015 03:02:49 +0200 Subject: [PATCH] fix(profile) Check if constant is defined, see #21 --- src/Views/UploadView.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Views/UploadView.php b/src/Views/UploadView.php index 8b5ea23..f36afa5 100755 --- a/src/Views/UploadView.php +++ b/src/Views/UploadView.php @@ -56,7 +56,10 @@ public function setup() is_admin() && ( ! current_user_can( 'upload_files' ) - or ( ! IS_PROFILE_PAGE && ! current_user_can( 'edit_users' ) ) + or ( + ( defined( 'IS_PROFILE_PAGE' ) && ! IS_PROFILE_PAGE ) + && ! current_user_can( 'edit_users' ) + ) or ! in_array( get_current_screen()->base, [ 'profile', 'user-edit',