2009-05-06 73 views
0

什麼是current_user_can()函數參數?什麼是current_user_can()函數參數?

這個函數用在wordpress腳本中,我知道一個叫做publish_posts的參數,我想知道其他參數。

有一個示例代碼:

if(current_user_can('publish_posts')) { 
    require_once dirname(__FILE__) . '/post-form.php'; 
} 

回答

1

您可以找到這些WordPress的Roles and Capabilities頁面上。

您可以使用任何角色或功能作爲current_user_can()函數的參數。查看該頁面右側的內容 - 角色和功能(全部可用)全部列出。