WordPress

ユーザーの権限の追加のメモ

More than 5 years have passed since last update.

ここを参照

http://www.nouveller.com/quick-tips/quick-tip-9-change-the-default-capabilities-of-wordpress-users-with-ease/

    // store the 'Contributor' role

$edit_contributor = get_role('contributor');

// add a capability of 'upload_files'

$edit_contributor->add_cap('upload_files');