PluginProbe
WP Database Backup – Unlimited Database & Files Backup by Backup for WP / 6.7
WP Database Backup – Unlimited Database & Files Backup by Backup for WP v6.7
7.13 7.12 trunk 1.1 2.1.1 5.9 6.0 6.1 6.10 6.11 6.12 6.12.1 6.2 6.3 6.4 6.5 6.5.1 6.6 6.7 6.8 6.9 7.0 7.0.1 7.1 7.10 All 34 releases
← All changes | includes/admin/filter.php +26 -0 6.46.7 View file →
@@ -34,4 +34,30 @@
34 34 $replace = array( '', '', '', '' );
35 35 $result = str_replace( $search, $replace, $string );
36 36 return $result;
37 37 }
38 +
39 +
40 +add_action( 'wp_ajax_wpdbbkp_email_unsubscribe', 'wpdbbkp_unsubcribe_email_notification' );
41 +add_action( 'wp_ajax_nopriv_wpdbbkp_email_unsubscribe', 'wpdbbkp_unsubcribe_email_notification' );
42 +
43 +function wpdbbkp_unsubcribe_email_notification(){
44 + if(isset($_GET['unsubscribe_token'])){
45 + $saved_token=get_option('wpdbbkp_unsubscribe_token',false);
46 + if($saved_token && $saved_token==$_GET['unsubscribe_token']){
47 + $current_status = get_option( 'wp_db_backup_destination_Email',false);
48 + if($current_status == 1){
49 + update_option('wp_db_backup_destination_Email', 0 , false);
50 + delete_option('wpdbbkp_unsubscribe_token');
51 + echo '<h3 align="center">'.esc_html__( 'You have successfully unsubscribed from recieveing backup notification on Email', 'wpdbbkp' ).'</h3>';
52 + }else if($current_status == 0){
53 + echo '<h3 align="center">'.esc_html__( 'You have already unsubscribed.', 'wpdbbkp' ).'</h3>';
54 + }else{
55 + echo '<h3 align="center">'.esc_html__( 'Invalid Request', 'wpdbbkp' ).'</h3>';
56 + }
57 + }
58 + else{
59 + echo '<h3 align="center">'.esc_html__( 'Unauthorised Access', 'wpdbbkp' ).'</h3>';
60 + }
61 + }
62 + wp_die();
63 +}