Skip to content

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