function EMU2_add_default_capabilities() {
$role = get_role('contributor');
$role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role = get_role('author');
$role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role = get_role('editor');
$role->add_cap(EMU2_NOTIFY_USERS_CAP);
$role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role->add_cap(EMU2_EMAIL_USER_GROUPS_CAP);
$role->add_cap(EMU2_EXPORT_LIST_CAP);
$role = get_role('administrator');
$role->add_cap(EMU2_MANAGE_OPTIONS_CAP);
$role->add_cap(EMU2_NOTIFY_USERS_CAP);
$role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role->add_cap(EMU2_EMAIL_USER_GROUPS_CAP);
$role->add_cap(EMU2_EXPORT_LIST_CAP);
}function EMU2_remove_default_capabilities() {
$role = get_role('contributor');
$role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role = get_role('author');
$role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role = get_role('editor');
$role->remove_cap(EMU2_NOTIFY_USERS_CAP);
$role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role->remove_cap(EMU2_EMAIL_USER_GROUPS_CAP);
$role->remove_cap(EMU2_EXPORT_LIST_CAP);
$role = get_role('administrator');
$role->remove_cap(EMU2_MANAGE_OPTIONS_CAP);
$role->remove_cap(EMU2_NOTIFY_USERS_CAP);
$role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role->remove_cap(EMU2_EMAIL_USER_GROUPS_CAP);
$role->remove_cap(EMU2_EXPORT_LIST_CAP);
}
$role = get_role('advertiser');
$role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role = get_role('author');
$role->add_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->add_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role = get_role('advertiser');
$role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
$role = get_role('author');
$role->remove_cap(EMU2_EMAIL_SINGLE_USER_CAP);
$role->remove_cap(EMU2_EMAIL_MULTIPLE_USERS_CAP);
There are currently 1 users browsing this thread. (0 members and 1 guests)