| 1 | <?php |
| 2 | /** |
| 3 | * BuddyPress Uninstaller |
| 4 | */ |
| 5 | if ( !defined( 'BP_PLUGIN_DIR' ) ) |
| 6 | define( 'BP_PLUGIN_DIR', WP_PLUGIN_DIR . '/buddypress' ); |
| 7 | |
| 8 | // Load core |
| 9 | require( BP_PLUGIN_DIR . '/bp-core/bp-core-wpabstraction.php' ); |
| 10 | require( BP_PLUGIN_DIR . '/bp-core/bp-core-loader.php' ); |
| 11 | |
| 12 | function bp_unloader_delete_site_options() { |
| 13 | if ( !function_exists( 'delete_site_option') ) |
| 14 | return false; |
| 15 | |
| 16 | delete_site_option( 'bp-core-db-version' ); |
| 17 | delete_site_option( 'bp-activity-db-version' ); |
| 18 | delete_site_option( 'bp-blogs-db-version' ); |
| 19 | delete_site_option( 'bp-friends-db-version' ); |
| 20 | delete_site_option( 'bp-groups-db-version' ); |
| 21 | delete_site_option( 'bp-messages-db-version' ); |
| 22 | delete_site_option( 'bp-xprofile-db-version' ); |
| 23 | delete_site_option( 'bp-deactivated-components' ); |
| 24 | delete_site_option( 'bp-blogs-first-install' ); |
| 25 | |
| 26 | } |
| 27 | |
| 28 | function bp_unloader_delete_tables() { |
| 29 | /** Delete table created by BP? */ |
| 30 | } |
| 31 | |
| 32 | bp_unloader_delete_site_options(); |
| 33 | bp_unloader_delete_tables(); |
| 34 | |
| 35 | ?> |
| 36 | No newline at end of file |