Untitled
By: a guest | Mar 16th, 2010 | Syntax:
PHP | Size: 0.33 KB | Hits: 120 | Expires: Never
add_action( 'init', 'contrib_can_upload', 10 );
function contrib_can_upload( ) {
$role =& get_role('contributor');
$role->add_cap('upload_files');
}
// Remove
add_action( 'init', 'contrib_can_upload', 10 );
function contrib_can_upload( ) {
$role =& get_role('contributor');
$role->remove_cap('upload_files');
}