PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 1.1.9
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v1.1.9
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / uninstall.php

uninstall.php in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 1.1.9, at uninstall.php

35 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if( !defined( 'WP_UNINSTALL_PLUGIN' ) )
3 exit (); // If uninstall not called from WordPress exit
4
5 delete_option( 'wppb_default_settings' ); // Delete default settings from options table
6 delete_option( 'wppb_default_style' ); // Delete "use default css or not" settings
7 delete_option( 'wppb_display_admin_settings' ); // Delete display admin bar option
8 delete_option( 'wppb_custom_fields' ); // Delete the default fields
9 delete_option( 'wppb_profile_builder_pro_serial' ); // Delete the serial number associated with this instalation
10 delete_option( 'serial_number_availability' ); // Delete the serial number status
11 delete_option( 'wppb_premium_addon_settings' ); // Delete addon settings
12 delete_option( 'wppb_premium_addon_settings_description' ); // Delete addon settings description
13 delete_option( 'customRedirectSettings' ); // Delete the custom redirect settings
14 delete_option( 'userListingSettings' ); // Delete the user-listing settings
15
16
17 /* delete all the custom fields */
18 global $wpdb;
19 $allUserMeta = $wpdb->get_results("SELECT * FROM $wpdb->usermeta");
20
21 foreach ($allUserMeta as $userMeta) {
22 $found = strpos ( $userMeta->meta_key , 'custom_field_' );
23 if ( $found !== FALSE ){
24 $metaFieldName = $userMeta->meta_key;
25 $metaFieldValue = $userMeta->meta_value;
26 $wpdb->query("DELETE FROM $wpdb->usermeta WHERE meta_key = '".$metaFieldName."' AND meta_value = '".$metaFieldValue."'");
27 }
28
29 $foundAvatar = strpos ( $userMeta->meta_key , 'custom_field_resized' );
30 if ( $foundAvatar !== FALSE ){
31 $metaFieldName = $userMeta->meta_key;
32 $metaFieldValue = $userMeta->meta_value;
33 $wpdb->query("DELETE FROM $wpdb->usermeta WHERE meta_key = '".$metaFieldName."' AND meta_value = '".$metaFieldValue."'");
34 }
35 }