FIX added check for empty user roles before verifying administrator status in screen options
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f20a40920b
commit
c26617174e
|
|
@ -260,7 +260,7 @@ function reinsert_submitdiv_meta_box()
|
|||
function de_activite_screen_options()
|
||||
{
|
||||
$current_user = wp_get_current_user();
|
||||
if ($current_user->roles[0] !== 'administrator') {
|
||||
if (!empty($current_user->roles) && $current_user->roles[0] !== 'administrator') {
|
||||
add_filter('screen_options_show_screen', '__return_false');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user