File: /var/www/html/wpamazingsecret/wp-content/plugins_/send-users-email/uninstall.php
<?php
/**
* Fired when the plugin is uninstalled.
*/
// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
// Delete option created by send users email
delete_option( 'sue_send_users_email' );
// Remove capability to send email for all roles
$all_roles = sue_get_roles();
// Remove capability from all roles
foreach ( $all_roles as $role_slug ) {
$role = get_role( $role_slug );
if ( $role ) {
$role->remove_cap( SEND_USERS_EMAIL_SEND_MAIL_CAPABILITY );
}
}