Just wondering if my
else {return false;}
statements are superfluous... do I just need one return true;
here?
function has_access() {
if ( is_user_logged_in() ) {
$role = get_current_user_role();
$admins = array(
'Administrator',
'Agent',
'Contributor',
);
if (in_array($role, $admins)) {
return true;
} else {
return false;
}
} else {
return false;
}
}