2017-05-22 41 views

回答

0

您需要使用下面的邏輯來分配能力的銷售作用,

function add_theme_caps() { 
    // gets the author role 
    $role = get_role('sales'); 

    // This only works, because it accesses the class instance. 
    // would allow the author to edit others' posts for current theme only 
    $role->add_cap('list_users'); 
} 
add_action('admin_init', 'add_theme_caps'); 
+0

銷售角色可以查看和編輯的訂戶角色。 –

+0

您需要爲自定義角色創建自定義功能。我建議你使用:https://wordpress.org/plugins/user-roles-and-capabilities/ plugin –

+0

我使用這個插件:https://wordpress.org/plugins/advanced-access-manager/ –

相關問題