,我有以下我的functions.php函數:WordPress的,如果當前用戶是
function admin_style()
{ global $user_ID;
if (current_user_can('shop_manager'))
{ wp_enqueue_style('admin-styles', '/wp-content/themes/electa-child/admin.css');
}}
add_action('admin_enqueue_scripts', 'admin_style');
我想添加其他用戶的角色,但是當我做if (current_user_can('shop_manager', 'shop_assistant'))
我得到一個錯誤。
我應該如何添加另一個用戶角色進行檢查?
由於提前,
做了詭計,非常感謝。 – Michel
歡迎:)然後將此標記爲答案,如果有用的投票太:) – Ashkar