If user is Admin or another role

If I understand you correctly, you want to determine if the user has any role that is in some pre-defined list like this: $accepted_roles = array( ‘administrator’, ‘editor’, ); if ( ! empty( array_intersect( $accepted_roles, $user->roles ) ) ) { …

cURL running slow in WordPress

The timeout issue, in my case, was caused by the remote server not sending back any response. I had to fix configuration on the remote server to send back a response. That has resolved the issue.