Cannot uninstall after ticking remove data on deletion
-
After ticking the delete cache and data on removal the page restrictions remain.
After adding the following code there appeared what looked like shortcakes above the page header so I had to rollback the database to fix it.
'
// global $wp_roles;
// $roles = $wp_roles->roles;
// echo '' . print_r( $roles, true ) . '';
// function um_custom_echo_roles() {
// global $wp_roles;
// foreach ( $wp_roles->roles as $roleID => &$role_data ) {
// unset( $role_data['_um_can_access_wpadmin'] );
// unset( $role_data['_um_can_not_see_adminbar'] );
// unset( $role_data['_um_can_edit_everyone'] );
// unset( $role_data['_um_can_delete_everyone'] );
// unset( $role_data['_um_can_edit_profile'] );
// unset( $role_data['_um_can_delete_profile'] );
// unset( $role_data['_um_default_homepage'] );
// unset( $role_data['_um_after_login'] );
// unset( $role_data['_um_after_logout'] );
// unset( $role_data['_um_can_view_all'] );
// unset( $role_data['_um_can_make_private_profile'] );
// unset( $role_data['_um_can_access_private_profile'] );
// unset( $role_data['_um_status'] );
// unset( $role_data['_um_auto_approve_act'] );
// if ( ! empty( $role_meta ) ) {
// $wp_roles->roles[ $roleID ] = array_merge( $role_data, $role_meta );
// }
// }
// update_option( $wp_roles->role_key, $wp_roles->roles );
// $um_instructors = get_users( array(
// 'role__in' => 'um_instructor',
// ) );
// if ( ! empty( $um_instructors ) ) {
// foreach ( $um_instructors as $instructor ) {
// $instructor->remove_role( 'um_instructor' );
// }
// }
// }
// add_action( 'init', 'um_custom_echo_roles' );Maybe that’s why it’s all commented? I also checked the users and only found one key master but cannot delete as it is me!!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Cannot uninstall after ticking remove data on deletion’ is closed to new replies.