There’s no WordPress function to directly get the current user’s role, so I typically include my own function to serve that purpose, similar to the one below. This function is even more versatile since if you pass a specific user’s ID or User object to it, it will return that user’s role. If you pass nothing to it, […]

Read more