-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
temp commit for Hai's check: add support for multiple roles #374
base: master
Are you sure you want to change the base?
Conversation
} | ||
} | ||
|
||
define( 'LITESPEED_WP_ROLE', $role ); | ||
define( 'LITESPEED_WP_ROLE', $roles ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this on PHP5.3?
} | ||
} | ||
Debug2::debug( '[Router] get_role: ' . $role ); | ||
Debug2::debug( '[Router] get_roles: ' . var_export( $roles, true ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug function supports 2nd param which can be an array.
* @param array $roles The roles of the current user | ||
* @return boolean | ||
*/ | ||
public function has_optm_exc_role( $roles = null ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't reuse or rename in_optm_exc_roles
function?
*/ | ||
public function in_optm_exc_roles( $role = null ) { | ||
// Get user role | ||
if ( $role === null ) { | ||
$role = Router::get_role(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If dropped $role assignment in in_optm_exc_roles
, will this break the existing code?
Please take a look and give me some feedback on how to proceed.