| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; | |
| 4 | -} | |
| 5 | 2 | /** |
| 6 | 3 | * Backup Filters |
| 7 | 4 | * |
| 8 | 5 | * @package wpdbbkp |
| @@ -7,9 +4,9 @@ | ||
| 7 | 4 | * |
| 8 | 5 | * @package wpdbbkp |
| 9 | 6 | */ |
| 10 | 7 | |
| 11 | -add_filter( 'upgrader_pre_install', 'wpdbbkp_upgrader_pre_install', 10, 2 ); | |
| 8 | +add_filter( 'upgrader_pre_install', 'wp_db_backup_upgrader_pre_install', 10, 2 ); | |
| 12 | 9 | |
| 13 | 10 | /** |
| 14 | 11 | * Filter for upgrade theme or plugin. |
| 15 | 12 | * |
| @@ -16,9 +13,9 @@ | ||
| 16 | 13 | * @param bool $response - Installation response. |
| 17 | 14 | * @param array $hook_extra - Extra arguments passed to hooked filters. |
| 18 | 15 | * @return bool |
| 19 | 16 | */ |
| 20 | -function wpdbbkp_upgrader_pre_install( $response, $hook_extra ) { | |
| 17 | +function wp_db_backup_upgrader_pre_install( $response, $hook_extra ) { | |
| 21 | 18 | $wp_db_backup_enable_auto_upgrade = get_option( 'wp_db_backup_enable_auto_upgrade' ); |
| 22 | 19 | if ( 1 === $wp_db_backup_enable_auto_upgrade ) { |
| 23 | 20 | $before_update_backup_obj = new wpdb_Admin(); |
| 24 | 21 | $before_update_backup_obj->wp_db_backup_event_process(); |
| @@ -31,9 +28,9 @@ | ||
| 31 | 28 | * |
| 32 | 29 | * @param string $string - Input data. |
| 33 | 30 | * @return string |
| 34 | 31 | */ |
| 35 | -function wpdbbkp_filter_data( $string ) { | |
| 32 | +function wp_db_filter_data( $string ) { | |
| 36 | 33 | $search = array( 'animation-name', 'alert(', 'style=', 'onanimationstart' ); |
| 37 | 34 | $replace = array( '', '', '', '' ); |
| 38 | 35 | $result = str_replace( $search, $replace, $string ); |
| 39 | 36 | return $result; |
| @@ -43,11 +40,11 @@ | ||
| 43 | 40 | add_action( 'wp_ajax_wpdbbkp_email_unsubscribe', 'wpdbbkp_unsubcribe_email_notification' ); |
| 44 | 41 | add_action( 'wp_ajax_nopriv_wpdbbkp_email_unsubscribe', 'wpdbbkp_unsubcribe_email_notification' ); |
| 45 | 42 | |
| 46 | 43 | function wpdbbkp_unsubcribe_email_notification(){ |
| 47 | - if(isset($_GET['unsubscribe_token'])){ // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- unsubscribe_token is doing the job of nonce. | |
| 44 | + if(isset($_GET['unsubscribe_token'])){ | |
| 48 | 45 | $saved_token=get_option('wpdbbkp_unsubscribe_token',false); |
| 49 | - if($saved_token && $saved_token==$_GET['unsubscribe_token']){ // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- unsubscribe_token is doing the job of nonce. | |
| 46 | + if($saved_token && $saved_token==$_GET['unsubscribe_token']){ | |
| 50 | 47 | $current_status = get_option( 'wp_db_backup_destination_Email',false); |
| 51 | 48 | if($current_status == 1){ |
| 52 | 49 | update_option('wp_db_backup_destination_Email', 0 , false); |
| 53 | 50 | delete_option('wpdbbkp_unsubscribe_token'); |