diff --git a/bp-compliments.php b/bp-compliments.php
index 787e94b..f25951e 100644
--- a/bp-compliments.php
+++ b/bp-compliments.php
@@ -127,7 +127,6 @@ function bp_compliments_activate() {
if ( is_admin() ) {
register_activation_hook( __FILE__, 'bp_compliments_activate' );
register_deactivation_hook( __FILE__, 'bp_compliments_deactivate' );
- add_filter( 'geodir_plugins_uninstall_settings', 'bp_compliments_uninstall_settings', 10, 1 );
add_action( 'admin_init', 'bp_compliments_activation_redirect' );
}
@@ -188,18 +187,4 @@ function bp_compliments_older_version_notice() {
$older_version_notice = __( "Hey! BP Compliments requires BuddyPress 1.5 or higher.", 'bp-compliments' );
echo '
' . $older_version_notice . '
';
-}
-
-/**
- * Add the plugin to uninstall settings.
- *
- * @since 1.0.7
- *
- * @return array $settings the settings array.
- * @return array The modified settings.
- */
-function bp_compliments_uninstall_settings($settings) {
- $settings[] = plugin_basename(dirname(__FILE__));
-
- return $settings;
-}
+}
\ No newline at end of file
diff --git a/includes/bp-compliments-settings.php b/includes/bp-compliments-settings.php
index 5d89408..2aa0366 100644
--- a/includes/bp-compliments-settings.php
+++ b/includes/bp-compliments-settings.php
@@ -31,6 +31,7 @@ function bp_compliments_register_settings() {
register_setting( 'bp-compliment-settings', 'bp_compliment_enable_notifications' );
register_setting( 'bp-compliment-settings', 'bp_comp_per_page' );
register_setting( 'bp-compliment-settings', 'bp_comp_custom_css' );
+ register_setting( 'bp-compliment-settings', 'bp_compliment_uninstall_delete');
}
function bp_compliments_settings_page() {
@@ -61,6 +62,9 @@ function bp_compliments_settings_page() {
$comp_custom_css_value = esc_attr( get_option('bp_comp_custom_css'));
$comp_custom_css = $comp_custom_css_value ? $comp_custom_css_value : '';
+
+ $bp_compliment_uninstall_delete_value = esc_attr( get_option('bp_compliment_uninstall_delete'));
+ $bp_compliment_uninstall_delete = $bp_compliment_uninstall_delete_value ? $bp_compliment_uninstall_delete_value : 'no';
?>
@@ -130,6 +134,15 @@ function bp_compliments_settings_page() {
|
|
+
+ |
+
+
+ |
+
|
|
diff --git a/uninstall.php b/uninstall.php
index c06d9a0..c3fe48e 100644
--- a/uninstall.php
+++ b/uninstall.php
@@ -15,7 +15,7 @@
global $wpdb, $bp;
-if ( get_option( 'geodir_un_buddypress-compliments' ) ) {
+if ( get_option( 'bp_compliment_uninstall_delete' ) ) {
$wpdb->hide_errors();
if ( !defined( 'BP_COMPLIMENTS_VER' ) ) {