Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lehanliii
Copy link

Please take a look and give me some feedback on how to proceed.

}
}

define( 'LITESPEED_WP_ROLE', $role );
define( 'LITESPEED_WP_ROLE', $roles );
Copy link
Collaborator

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 ) );
Copy link
Collaborator

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 ) {
Copy link
Collaborator

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();
Copy link
Collaborator

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?

@hi-hai hi-hai changed the base branch from dev to master October 31, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants