WordPress: get the role of the current user

  1. /* get the role of the current user */
  2. global $current_user, $wpdb;
  3. $var = $wpdb->prefix . ‘capabilities’;
  4. $caps = $current_user->$var;

Tags: , , , , ,

Comments are closed.