Belajar WordPress: Memfasilitasi Contributor untuk Upload File

Contributer, adalah role di WordPress yang hanya dapat memberikan kontribusi tulisan saja. Silakan taruh snippet berikut di file function .php themes anda…

if ( current_user_can('contributor') && !current_user_can('upload_files') )
    add_action('admin_init', 'allow_contributor_uploads');

function allow_contributor_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');
}

Selamat mencoba!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: