Advertisement
fauzanjeg

Check current user role

Jun 9th, 2021
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.18 KB | None | 0 0
  1. /* Check current user role */
  2. function check_current_user_role() {
  3.     var_dump( (array) wp_get_current_user()->roles );
  4. }
  5. add_action( 'jnews_after_body', 'check_current_user_role' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement