Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$current_user = wp_get_current_user()->roles;
if ( in_array('administrator', $current_user) ) {
echo 'Current user is an administrator.';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.