<?php // functions.php function imnobby_check_user_roles(){ $user_id = get_current_user_id(); $user_info = get_userdata( $user_id ); //$user_roles = implode(', ', $user_info->roles); $user_roles = $user_info->roles; return $user_roles; // array }Related Keywords: Developer, How-to, Solved, Check User Roles, functions.php, Script
喜歡這篇文章嗎?
(暫時未有評分)
Loading...
(暫時未有評分)
Loading...