Backup and Restore WordPress – WPBackItUp Backup Plugin - Version 1.18

Version Description

*Release Date - May 22, 2018

  • UPDATE: Minor updates to UI scripts
Download this release

Release Info

Developer cssimmon
Plugin Icon 128x128 Backup and Restore WordPress – WPBackItUp Backup Plugin
Version 1.18
Comparing to
See all releases

Code changes from version 1.17.0 to 1.18

Files changed (3) hide show
  1. js/wp-backitup-admin.min.js +1 -1
  2. readme.txt +7 -1
  3. wp-backitup.php +2 -2
js/wp-backitup-admin.min.js CHANGED
@@ -1 +1 @@
1
- var WPBNewBackupData={},ajaxNamespace="wpbackitup-safe",ENUM={GDRIVE:"GDRIVE",AMAZONS3:"AMAZONS3",DROPBOX:"DROPBOX"},CLOUDSTATUS={READY:"ready",UPLOADING:"uploading",UPLOADED:"uploaded",ERROR:"error"},wpbackitup_get_action_name=function(e){return ajaxNamespace+"_"+e},AjaxGetSafe=function(e){return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:wpbackitup_get_action_name(e),security:WPBackItUpSafeLocals[e]},dataType:"json"})},AjaxGetCore=function(e){var a=wpbackitup_local[e];return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:"wp-backitup_"+e,security:a},dataType:"json"})},AjaxPostSafe=function(e,a){var a=a||{};return a.action=wpbackitup_get_action_name(e),a.security=WPBackItUpSafeLocals[e],jQuery.ajax({url:ajaxurl,type:"POST",data:a,dataType:"json"})};!function(e){"use strict";if(document.querySelector("#wpbackitup-core-backup"))var a=new Vue({el:"#wpbackitup-core-backup",data:{cloudStatus:{},isNewRowAvailable:!1,backupNewRow:{}},methods:{getAvailableBackups:function(){AjaxGetCore("get_available_backups").then(function(e){if(e.success)for(var t=0;t<e.data.length;t++){var i=e.data[t].backup_job_id,s=e.data[t].backup_job_cloud_status;a.$set(a.cloudStatus,i,s)}})},getBackupStatus:function(){var e=WPBNewBackupData;if("success"===e.backupStatus){var a=e.backupName,t=a.lastIndexOf("_"),i=a.substring(t+1);this.isNewRowAvailable=!0,this.backupNewRow={name:e.backupName,type:e.backupRuntype,date:e.backupDate,duration:e.backupDuration,status:e.backupStatus,row:99999,jobId:i,zipExist:!0},WPBNewBackupData={}}}},mounted:function(){this.getAvailableBackups(),this.getBackupStatusInterval=setInterval(function(){0!==Object.keys(WPBNewBackupData).length&&this.getBackupStatus()}.bind(this),1e3),this.getAvailableBackupsInterval=setInterval(function(){this.getAvailableBackups()}.bind(this),3e3)},beforeDestroy:function(){clearInterval(this.getAvailableBackupsInterval),clearInterval(this.getBackupStatusInterval)}})}(jQuery),function(e){function a(){e(".viewloglink").click(function(){var a=e(this).attr("href");return e("#backup_name").val(a),e("#viewlog").submit(),!1})}function t(){e(".downloadbackuplink").bind("click",function(){var a=e(this).attr("href");return e("#backup_file").val(a),e(this).append('<i class="fa fa-check"></i>'),e(this).css({color:"green"}),e("#download_backup").submit(),!1})}function i(a,i){var n=({action:f("backup_zip_filelist"),job_id:a},i.replace(/[^A-Za-z0-9\-]/g,"")),o=0,c="",l='<div id="'+n+'"> <h2>'+wpbackitup_local.bl_backup_set+"&nbsp; <em>"+i+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button><span id="wpbiu-note-response">'+wpbackitup_local.bl_note_saved_success+"</span></div> <p>"+wpbackitup_local.bl_backup_download+'</p> <table class="widefat" id="datatable"> <tbody>';e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_zip_filelist"),job_id:a},dataType:"json"}).done(function(i){i.data?(e.each(i.data,function(){var a=e(this)[0].name.split(/[\/]+/).pop(),t=e(this)[0].size,i=e(this)[0].file_exists;if(console.log(a,t),a.indexOf("-backupset-")>-1)c='<p><a class="downloadbackuplink" href="'+a+'"><i class="fa fa-cloud-download fa-3x"></i> <strong>'+wpbackitup_local.bl_backup_download_single+"</strong></a> <br><em>"+wpbackitup_local.bl_please_note+t+wpbackitup_local.bl_may_timeout+"</em></p>";else{o++;var s="";o%2!=0&&(s="alternate"),l+='<tr class="'+s+'" id="row'+o+'">',l+=i?'<td><a class="downloadbackuplink" href="'+a+'">'+a+"</a></td>":"<td>"+a+"</td>",l+="<td>"+t+"</td> </tr>"}}),l+=c+"</tbody></table></div>",e("#TB_ajaxContent").html(l),t(),e.ajax({url:ajaxurl,type:"post",data:{action:f("backup_get_note"),job_id:a},success:function(a){e("#wpbiu-note-box").val(a.data)}}),e("#wpbiu-note-btn").click(function(){var t=e("#wpbiu-note-box").val();e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_add_note"),job_id:a,note:t},dataType:"json"}).success(function(a){e("#wpbiu-note-response").fadeIn()})}),e("#wpbiu-note-box").focus(function(){e("#wpbiu-note-response").hide()})):s(i,null,null)}).fail(function(e,a,t){s(e,a,t)})}function s(e,a,t){var i="Error-Invalid response from server: ";a&&(i+=a+"\n"),t&&(i+=t+"\n"),i+="\nResponse: \n\n"+JSON.stringify(e),alert(i)}function n(){var a={action:f("restore_status_reader"),job_id:v};e.post(ajaxurl,a,function(a){var t=e(a);t.each(function(){var a="."+e(this).attr("class"),t="."+e(this).attr("class")+"-icon";0==e(this).html()&&(e(a).find(".status").hide(),e(a).find(".status-icon").hide()),1==e(this).html()&&(e(t).css("visibility","visible"),e(a).find(".status").fadeOut(200),e(a).find(".status-icon").fadeIn(1500)),2==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500)),e(this).html()==-1&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".fail").fadeIn(1500),e(a).find(".isa_error").fadeIn(1500),clearInterval(window.intervalDefine)),e(this).html()==-2&&e(a).find(".isa_warning").fadeIn(1500),99==e(this).html()&&(e(a).find(".isa_success").fadeIn(1500),clearInterval(window.intervalDefine))})})}function o(){var a={action:f("backup_status_reader"),job_id:v};e.post(ajaxurl,a,function(a){if(x)return clearInterval(window.intervalDefine),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").fadeOut(200),e(".backup-cancelled").fadeIn(200),!1;var t=e(a);t.each(function(){var a="."+e(this).attr("class"),t="."+e(this).attr("class")+"-icon";0==e(this).html()&&(e(a).find(".status").hide(),e(a).find(".status-icon").hide()),1==e(this).html()&&(e(t).css("visibility","visible"),e(a).find(".status").fadeOut(200),e(a).find(".status-icon").fadeIn(1500)),2==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500)),e(this).html()==-1&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".fail").fadeIn(1500),clearInterval(window.intervalDefine),c()),e(this).html()==-2&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".wpbackitup-warning").fadeIn(1500)),99==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500),clearInterval(window.intervalDefine),c())})})}function c(){var a=e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_response_reader")},dataType:"json"});a.always(function(a,t,i){if(console.log("Backup Response:"+JSON.stringify(a)),"undefined"!=typeof a.backupStatus&&"undefined"!=typeof a.backupMessage){if(console.log("JSON Backup Status:"+a.backupStatus),console.log("JSON Backup Message:"+a.backupMessage),y)return;switch(y=!0,a.backupStatus){case"success":if(console.log("JSON success response received."),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("cancel-hidden"),e(".isa_success").show,e(".backup-success").fadeIn(1500),_(a),"undefined"!=typeof a.backupWarnings){var s=e(".backup-warning"),n=a.backupWarnings;n.forEach(function(e){var a=e.warningMessage;s.append('<li class="isa_warning">'+wpbackitup_local.warning+": "+a+"</li>")}),s.fadeIn(1500)}break;case"error":console.log("JSON error response received.");var o=wpbackitup_local.unexpected_err;"undefined"!=typeof a.backupMessage&&(o=a.backupMessage);var c=wpbackitup_local.error+": &nbsp;"+o,l=e(".backup-error");l.html(c),l.addClass("isa_error"),l.fadeIn(1500),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("cancel-hidden");break;default:console.log("Unexpected JSON response status received.");var o=wpbackitup_local.unexpected_err2;"undefined"!=typeof a.backupMessage&&(o=a.backupMessage);var c=wpbackitup_local.error+"(JS998) : &nbsp;"+o,u=e(".backup-error");u.html(c),u.addClass("isa_error"),u.fadeIn(1500),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("cancel-hidden")}}else{console.log("NON JSON response received."),console.log("Backup Response:"+i),c=wpbackitup_local.unexpected_err3+": &nbsp;",c+="</br>"+wpbackitup_local.response+": &nbsp;"+JSON.stringify(a),c+="</br>"+wpbackitup_local.status+": &nbsp;"+t,c+="</br>"+wpbackitup_local.error+": &nbsp;"+JSON.stringify(i),e(".backup-status").hide();var u=e(".backup-error");u.html(c),u.addClass("isa_error"),u.show(),e(".status-icon").fadeOut(200)}})}function l(){e(".backup-icon").css("visibility","visible"),e(".backup-icon").show(),e(".backup-success").hide(),e(".default-status").hide(),e(".backup-error").hide(),e(".backup-cancelled").hide(),e("ul.backup-status").children().children().hide(),e(".backup-errors").children().children().hide(),e(".backup-success").children().children().hide(),e(".backup-status").show(),y=!1,window.intervalDefine=setInterval(o,5e3)}function u(){e(".backup-icon").css("visibility","visible"),e(".backup-icon").show(),e(".backup-status").show(),y=!1,clearInterval(window.intervalDefine),window.intervalDefine=setInterval(o,5e3)}function r(){e(".restore-icon").css("visibility","visible"),e(".default-status, .upload-status").hide(),e("ul.restore-status").children().children().hide(),e(".restore-errors").children().children().hide(),e(".restore-success").children().children().hide(),e(".restore-status, .restore-errors, .restore-success").show(),e(".preparing-icon").css("visibility","visible"),e(".preparing").find(".status-icon").fadeIn(1500),window.intervalDefine=setInterval(n,5e3)}function p(a){var t=new plupload.Uploader(a);t.init(),t.bind("FilesAdded",function(a,t){plupload.each(t,function(a){e("#filelist").append('<div id="media-item-'+a.id+'" class="media-item child-of-0"><img class="pinkynail" alt="" src="'+site_url+'/wp-includes/images/media/archive.png"><div class="filename new" id="'+a.id+'">'+a.name+" (<span>"+plupload.formatSize(0)+"</span> of "+plupload.formatSize(a.size)+') <div class="progress" style="width: 0%;"></div></div></div>')}),a.refresh(),a.start()}),t.bind("UploadProgress",function(a,t){e("#"+t.id+" .progress").width(.15*t.percent+"%"),e("#"+t.id+" span").html(plupload.formatSize(parseInt(t.size*t.percent/100)))}),t.bind(" ChunkUploaded",function(e,a,t){console.log("Chunk Uploaded:"),console.log(t),d(t,e,a)&&console.log("chunk error")}),t.bind("Error",function(a,t){console.log("PlUpload Error:"),console.log(t);var i="error-item-"+t.file.id;e("#"+i).length||e("#filelist").append('<div class="error-div error" id="'+i+'" ><strong>'+t.file.name+" has failed to upload due to error:&nbsp;</strong> <span>"+t.message+"</span> </div>")}),t.bind("FileUploaded",function(a,t,i){console.log("File Uploaded"),console.log(i),d(i,a,t)?console.log("uploaded error"):(console.log("uploaded success"),e("#"+t.id+" .progress").css("background-color","green"),e("#import-uploads").show())})}function d(e,a,t){if("200"!=e.status)return alert("Unknown server response status: "+e.code),console.log(e),b(a,t,999,e.response),!0;try{return response_json=jQuery.parseJSON(e.response),!!response_json.error&&(b(a,t,100,response_json.error),!0)}catch(i){return console.log("Unexpected JSON Error"+i),b(a,t,998,e.response),!0}}function b(a,t,i,s){t.status=plupload.FAILED,a.trigger("Error",{code:i,message:s,file:t}),e("#media-item-"+t.id).hide()}function _(i){"undefined"!=typeof i&&(WPBNewBackupData=i,e("#nofiles")&&e("#nofiles").remove(),a(),t())}function f(e){return w+"_"+e}function k(){notification_bar=e("#wp-backitup-notification-parent"),notification_bar.fadeOut("slow")}function h(a){notification_bar_message=e("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+a+"</p>"),notification_bar=e("#wp-backitup-notification-parent"),notification_bar.toggleClass("error",!1),notification_bar.toggleClass("updated",!0),notification_bar.show(),e("html, body").animate({scrollTop:0},"slow")}function g(a){notification_bar_message=e("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+a+"</p>"),notification_bar=e("#wp-backitup-notification-parent"),notification_bar.toggleClass("updated",!1),notification_bar.toggleClass("error",!0),notification_bar.show(),e("html, body").animate({scrollTop:0},"slow")}var w="wp-backitup",v=0;a(),t();try{"undefined"!=typeof wpbackitup_plupload_config&&p(wpbackitup_plupload_config)}catch(m){console.log(m)}e(".logs_backup").click(function(){var a=e(this).attr("href");return e("#backup_file").val(a),e("#download_logs").val(),e("#download_backup").submit(),!1}),e("#scheduled-backups-accordian").click(function(){scheduled_backups=e("#scheduled-backups"),scheduled_backups_button=e("#scheduled-backups-accordian"),e(this).is(".fa-angle-double-down")?(scheduled_backups.fadeIn("slow"),scheduled_backups_button.toggleClass("fa-angle-double-down",!1),scheduled_backups_button.toggleClass("fa-angle-double-up",!0)):(scheduled_backups_button.toggleClass("fa-angle-double-down",!0),scheduled_backups_button.toggleClass("fa-angle-double-up",!1),scheduled_backups.fadeOut("slow"))}),e("#upload-backups-accordian").click(function(){upload_backups=e("#wpbackitup-plupload-modal"),upload_backups_button=e("#upload-backups-accordian"),e(this).is(".fa-angle-double-down")?(upload_backups.fadeIn("slow"),upload_backups_button.toggleClass("fa-angle-double-down",!1),upload_backups_button.toggleClass("fa-angle-double-up",!0)):(upload_backups_button.toggleClass("fa-angle-double-down",!0),upload_backups_button.toggleClass("fa-angle-double-up",!1),upload_backups.fadeOut("slow"))}),e("#wpbackitup-zip").bind("change",function(){var a=this.files[0].size,t=e("#maxfilesize").val();"undefined"!=a&&"undefined"!=t&&""!=a&&""!=t&&a>t&&(alert(wpbackitup_local.upload_file_size_exceed),e("#wpbackitup-zip").val(""))}),e("#import-uploads").click(function(){setTimeout(function(){window.location.reload()},100)}),e(document.body).on("click",".thickbox",function(){if(!e(this).parents(".wpbiu-restore-item").length){var a=e(this).data("jobid");console.log(a);var t=this.name;i(a,t)}}),e(document.body).on("click",".thickbox",function(){var a=e(this).data("jobid"),t=e(this).attr("name");if(e(this).parents(".wpbiu-restore-item").length){var i="<h2>"+wpbackitup_local.bl_backup_set+"&nbsp;<em>"+t+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-restore-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-restore-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button> <span id="wpbiu-restore-note-response">'+wpbackitup_local.bl_note_saved_success+"</span> </div>";e("#wpbiu-restore-note").html(i),e("#wpbiu-restore-note-response").hide(),e.ajax({url:ajaxurl,type:"post",data:{action:f("backup_get_note"),job_id:a},success:function(a){e("#wpbiu-restore-note-box").val(a.data)}}),e("#wpbiu-restore-note-btn").click(function(){var t=e("#wpbiu-restore-note-box").val();e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_add_note"),job_id:a,note:t},dataType:"json"}).success(function(a){e("#wpbiu-restore-note-response").fadeIn()})})}e("#wpbiu-restore-note-box").focus(function(){e("#wpbiu-restore-note-response").hide()})});var y=!1;e("#wp-backitup-notification-widget-close").click(function(){notification_bar=e("#wp-backitup-notification-widget"),notification_bar.fadeOut("slow");var a=e.ajax({url:ajaxurl,type:"POST",data:{action:f("delete_transient")},dataType:"json"});a.always(function(a,t,i){a!==!1&&(notification_bar.removeClass(),notification_bar.addClass("notice"),notification_bar.addClass("notice-"+a.message_type),e("#wp-backitup-notification-widget-message p").html(a.message),notification_bar.hide().fadeIn("slow"))})}),e("#wp-backitup-notification-close").click(function(){k()}),e("#wp-backitup-save_schedule_form").submit(function(){var a=new FormData;a.append("action",f("update-schedule")),a.append("_wpnonce",e("#wp-backitup_nonce-update-schedule").val()),a.append("_wp_http_referer",e("[name='_wp_http_referer']").val());var t=[];return e.each(e("input[name='dow']:checked"),function(){t.push(e(this).val())}),a.append("days_selected",t),jQuery.ajax({url:ajaxurl,type:"POST",cache:!1,contentType:!1,processData:!1,dataType:"json",data:a,success:function(e,a,t){switch(response=e.message,console.log("Success:"+response),response){case"success":h(wpbackitup_local.scheduled_saved);break;case"error":g(wpbackitup_local.scheduled_not_saved)}},error:function(e,a,t){console.log("Error."+a+":"+t)},complete:function(e,a){console.log("Complete")}}),!1});var j=null;e(".backup-button").click(function(a){a.preventDefault(),x=!1,e("#backup-button").attr("disabled","disabled"),e("#cancel-button").removeClass("cancel-hidden"),e("#cancel-button").removeAttr("disabled"),e("#cancel-button").fadeIn(200),j=e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup")},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),l()}}),j.always(function(e,a,t){console.log("Backup Button Click - Always"),console.log(e.message),"undefined"!=typeof e.job_id?(v=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})});var x=!1;e(".cancel-button").click(function(a){a.preventDefault(),e("#cancel-button").attr("disabled","disabled"),null!=j&&(j.abort(),j=null),j=e.ajax({url:ajaxurl,type:"POST",data:{action:f("cancel_backup"),job_id:v},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),u()}}),j.always(function(e,a,t){console.log("Cancel Button Click - Always"),console.log(e),"undefined"!=typeof e.success&&1==e.success?console.log("Job Cancelled successfully"):console.log("Job was not cancelled successfully"),x=!0})}),e("#datatable").on("click","a.restoreRow",function(a){if(a.preventDefault(),confirm(wpbackitup_local.confirm_restore)){var t=this.title;this.id.replace("restoreRow","row");userid=e("input[name=user_id]").val();var i=e.ajax({url:ajaxurl,type:"post",data:{action:f("restore"),selected_file:t,user_id:userid},cache:!1,dataType:"json",beforeSend:function(){console.log("BeforeSend:Nothing to report."),r()}});i.always(function(e,a,t){"undefined"!=typeof e.job_id?(v=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})}}),e("#datatable").on("click","a.deleteRow",function(a){if(a.preventDefault(),confirm(wpbackitup_local.sure)){var t=this.title,i=e(this).data("id"),s=this.id.replace("deleteRow","row");e.ajax({url:ajaxurl,type:"post",data:{action:f("delete_file"),filed:t,post_id:i},success:function(a){var t=a.search("deleted");0==t?e("#"+s).remove():alert(wpbackitup_local.file_not_del)}})}})}(jQuery),function(e){"use strict";var a="wp-backitup",t=function(e){return a+"_"+e},i=function(a){return e.ajax({url:ajaxurl,type:"GET",data:{action:t(a)},dataType:"json"})},s=function(a,i){var i=i||{};return i.action=t(a),i.security=e("#wpbackitup-core-ajax-nonce").val(),e.ajax({url:ajaxurl,type:"POST",data:i,dataType:"json"})};e(window).load(function(){if(document.querySelector("#wpbackitup-core-settings")){Vue.use(VueTabs);var e=new Vue({el:"#wpbackitup-core-settings",data:{loading:!1,updated:!1,emailsArray:[],errorMessages:{},backup_retained_number:3,logging:!1,single_file_db:!1,single_file_backupset:!1,rversion_compare:!1,remove_supporting_zip_files:!1,backup_plugins_filter:[],backup_themes_filter:[],backup_uploads_filter:[],backup_others_filter:[],dbFilterOptions:[],db_filters:[],allow_usage_tracking:!1,backup_dbtables_batch_size:1e4,backup_sql_merge_batch_size:1e4,backup_sql_batch_size:1e4,backup_plugins_batch_size:5e3,backup_themes_batch_size:5e3,backup_uploads_batch_size:500,backup_others_batch_size:500,backup_zip_max_size:524288e3,backup_max_timeout:120,delete_all:!1,safe_sync:!1},computed:{dbFilterHasSearch:function(){return 0==this.dbFilterOptions.length},dbFilterPlaceholder:function(){return this.dbFilterOptions.length>0?wpbackitup_local.settings_select_database_table_to_filter:wpbackitup_local.settings_no_database_table_to_filter}},methods:{handleEmailInput:function(e){},handleTagsInput:function(e){},setSettings:function(){var a={data:{notification_email:this.emailsArray.join(","),backup_retained_number:this.backup_retained_number,logging:this.logging,single_file_db:this.single_file_db,single_file_backupset:this.single_file_backupset,rversion_compare:this.rversion_compare,remove_supporting_zip_files:this.remove_supporting_zip_files,backup_plugins_filter:this.backup_plugins_filter.join(","),backup_themes_filter:this.backup_themes_filter.join(","),backup_uploads_filter:this.backup_uploads_filter.join(","),backup_others_filter:this.backup_others_filter.join(","),backup_dbtables_filter_list:this.db_filters.map(function(e){return e.value}).join(","),backup_dbtables_batch_size:this.backup_dbtables_batch_size,backup_sql_merge_batch_size:this.backup_sql_merge_batch_size,backup_sql_batch_size:this.backup_sql_batch_size,backup_plugins_batch_size:this.backup_plugins_batch_size,backup_themes_batch_size:this.backup_themes_batch_size,backup_uploads_batch_size:this.backup_uploads_batch_size,backup_others_batch_size:this.backup_others_batch_size,backup_zip_max_size:this.backup_zip_max_size,backup_max_timeout:this.backup_max_timeout,delete_all:this.delete_all,safe_sync:this.safe_sync,allow_usage_tracking:this.allow_usage_tracking}};console.log(a),s("set_settings",a).then(function(a){a.success?(e.updated=!0,e.errorMessages={},swal(wpbackitup_local.settings_save_awesome,wpbackitup_local.settings_save_success_message,"success")):(e.errorMessages=a.data,swal(wpbackitup_local.settings_save_oops,wpbackitup_local.settings_save_error_message,"error"))})},getSettings:function(){this.loading=!0,i("get_settings").then(function(a){e.loading=!1,a.success&&(console.log(a),e.emailsArray=a.data.notification_email.split(",").filter(Boolean),e.backup_retained_number=a.data.backup_retained_number,e.logging="1"===a.data.logging,e.single_file_db="1"===a.data.single_file_db,e.rversion_compare="1"===a.data.rversion_compare,e.single_file_backupset="1"===a.data.single_file_backupset,e.remove_supporting_zip_files="1"===a.data.remove_supporting_zip_files,e.backup_plugins_filter=a.data.backup_plugins_filter.split(",").filter(Boolean),e.backup_themes_filter=a.data.backup_themes_filter.split(",").filter(Boolean),e.backup_uploads_filter=a.data.backup_uploads_filter.split(",").filter(Boolean),e.backup_others_filter=a.data.backup_others_filter.split(",").filter(Boolean),e.db_filters=a.data.backup_dbtables_filter_list.split(",").filter(Boolean).map(function(e){return{label:e,value:e}}),e.dbFilterOptions=Object.keys(a.data.backup_dbtables_filterable).map(function(e){var t=a.data.backup_dbtables_filterable[e];return{label:t,value:t}}),e.allow_usage_tracking=a.data.allow_usage_tracking,e.backup_dbtables_batch_size=a.data.backup_dbtables_batch_size,e.backup_sql_merge_batch_size=a.data.backup_sql_merge_batch_size,e.backup_sql_batch_size=a.data.backup_sql_batch_size,e.backup_plugins_batch_size=a.data.backup_plugins_batch_size,e.backup_themes_batch_size=a.data.backup_themes_batch_size,e.backup_uploads_batch_size=a.data.backup_uploads_batch_size,e.backup_others_batch_size=a.data.backup_others_batch_size,e.backup_zip_max_size=a.data.backup_zip_max_size,e.backup_max_timeout=a.data.backup_max_timeout,e.delete_all="1"===a.data.delete_all,e.safe_sync="1"===a.data.safe_sync)})}},created:function(){this.getSettings()}})}})}(jQuery);
1
+ var WPBNewBackupData={},ajaxNamespace="wpbackitup-safe",ENUM={GDRIVE:"GDRIVE",AMAZONS3:"AMAZONS3",DROPBOX:"DROPBOX"},CLOUDSTATUS={READY:"ready",UPLOADING:"uploading",UPLOADED:"uploaded",ERROR:"error"},debugFlag=!1,wpbackitup_get_action_name=function(e){return ajaxNamespace+"_"+e},AjaxGetSafe=function(e){return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:wpbackitup_get_action_name(e),security:WPBackItUpSafeLocals[e]},dataType:"json"})},AjaxGetCore=function(e){var a=wpbackitup_local[e];return jQuery.ajax({url:ajaxurl,type:"GET",data:{action:"wp-backitup_"+e,security:a},dataType:"json"})},AjaxPostSafe=function(e,a){var a=a||{};return a.action=wpbackitup_get_action_name(e),a.security=WPBackItUpSafeLocals[e],jQuery.ajax({url:ajaxurl,type:"POST",data:a,dataType:"json"})};!function(e){"use strict";if(document.querySelector("#wpbackitup-core-backup"))var a=new Vue({el:"#wpbackitup-core-backup",data:{cloudStatus:{},isNewRowAvailable:!1,backupNewRow:{}},methods:{getAvailableBackups:function(){AjaxGetCore("get_available_backups").then(function(e){if(e.success)for(var t=0;t<e.data.length;t++){var i=e.data[t].backup_job_id,s=e.data[t].backup_job_cloud_status;a.$set(a.cloudStatus,i,s)}})},getBackupStatus:function(){var e=WPBNewBackupData;if("success"===e.backupStatus){var a=e.backupName,t=a.lastIndexOf("_"),i=a.substring(t+1);this.isNewRowAvailable=!0,this.backupNewRow={name:e.backupName,type:e.backupRuntype,date:e.backupDate,duration:e.backupDuration,status:e.backupStatus,row:99999,jobId:i,zipExist:!0},WPBNewBackupData={}}}},mounted:function(){this.getAvailableBackups(),this.getBackupStatusInterval=setInterval(function(){0!==Object.keys(WPBNewBackupData).length&&this.getBackupStatus()}.bind(this),1e3),this.getAvailableBackupsInterval=setInterval(function(){this.getAvailableBackups()}.bind(this),3e3)},beforeDestroy:function(){clearInterval(this.getAvailableBackupsInterval),clearInterval(this.getBackupStatusInterval)}})}(jQuery),function(e){function a(){e(".viewloglink").click(function(){var a=e(this).attr("href");return e("#backup_name").val(a),e("#viewlog").submit(),!1})}function t(){e(".downloadbackuplink").bind("click",function(){var a=e(this).attr("href");return e("#backup_file").val(a),e(this).append('<i class="fa fa-check"></i>'),e(this).css({color:"green"}),e("#download_backup").submit(),!1})}function i(a,i){var n=({action:f("backup_zip_filelist"),job_id:a},i.replace(/[^A-Za-z0-9\-]/g,"")),o=0,c="",l='<div id="'+n+'"> <h2>'+wpbackitup_local.bl_backup_set+"&nbsp; <em>"+i+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button><span id="wpbiu-note-response">'+wpbackitup_local.bl_note_saved_success+"</span></div> <p>"+wpbackitup_local.bl_backup_download+'</p> <table class="widefat" id="datatable"> <tbody>';e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_zip_filelist"),job_id:a},dataType:"json"}).done(function(i){i.data?(e.each(i.data,function(){var a=e(this)[0].name.split(/[\/]+/).pop(),t=e(this)[0].size,i=e(this)[0].file_exists;if(console.log(a,t),a.indexOf("-backupset-")>-1)c='<p><a class="downloadbackuplink" href="'+a+'"><i class="fa fa-cloud-download fa-3x"></i> <strong>'+wpbackitup_local.bl_backup_download_single+"</strong></a> <br><em>"+wpbackitup_local.bl_please_note+t+wpbackitup_local.bl_may_timeout+"</em></p>";else{o++;var s="";o%2!=0&&(s="alternate"),l+='<tr class="'+s+'" id="row'+o+'">',l+=i?'<td><a class="downloadbackuplink" href="'+a+'">'+a+"</a></td>":"<td>"+a+"</td>",l+="<td>"+t+"</td> </tr>"}}),l+=c+"</tbody></table></div>",e("#TB_ajaxContent").html(l),t(),e.ajax({url:ajaxurl,type:"post",data:{action:f("backup_get_note"),job_id:a},success:function(a){e("#wpbiu-note-box").val(a.data)}}),e("#wpbiu-note-btn").click(function(){var t=e("#wpbiu-note-box").val();e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_add_note"),job_id:a,note:t},dataType:"json"}).success(function(a){e("#wpbiu-note-response").fadeIn()})}),e("#wpbiu-note-box").focus(function(){e("#wpbiu-note-response").hide()})):s(i,null,null)}).fail(function(e,a,t){s(e,a,t)})}function s(e,a,t){var i="Error-Invalid response from server: ";a&&(i+=a+"\n"),t&&(i+=t+"\n"),i+="\nResponse: \n\n"+JSON.stringify(e),alert(i)}function n(){var a={action:f("restore_status_reader"),job_id:v};e.post(ajaxurl,a,function(a){var t=e(a);t.each(function(){var a="."+e(this).attr("class"),t="."+e(this).attr("class")+"-icon";0==e(this).html()&&(e(a).find(".status").hide(),e(a).find(".status-icon").hide()),1==e(this).html()&&(e(t).css("visibility","visible"),e(a).find(".status").fadeOut(200),e(a).find(".status-icon").fadeIn(1500)),2==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500)),e(this).html()==-1&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".fail").fadeIn(1500),e(a).find(".isa_error").fadeIn(1500),clearInterval(window.intervalDefine)),e(this).html()==-2&&e(a).find(".isa_warning").fadeIn(1500),99==e(this).html()&&(e(a).find(".isa_success").fadeIn(1500),clearInterval(window.intervalDefine))})})}function o(){var a={action:f("backup_status_reader"),job_id:v};e.post(ajaxurl,a,function(a){if(x)return clearInterval(window.intervalDefine),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").fadeOut(200),e(".backup-cancelled").fadeIn(200),!1;var t=e(a);t.each(function(){var a="."+e(this).attr("class"),t="."+e(this).attr("class")+"-icon";0==e(this).html()&&(e(a).find(".status").hide(),e(a).find(".status-icon").hide()),1==e(this).html()&&(e(t).css("visibility","visible"),e(a).find(".status").fadeOut(200),e(a).find(".status-icon").fadeIn(1500)),2==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500)),e(this).html()==-1&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".fail").fadeIn(1500),clearInterval(window.intervalDefine),c()),e(this).html()==-2&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".wpbackitup-warning").fadeIn(1500)),99==e(this).html()&&(e(a).find(".status-icon").fadeOut(200),e(a).find(".status").fadeIn(1500),clearInterval(window.intervalDefine),c())})})}function c(){var a=e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_response_reader")},dataType:"json"});a.always(function(a,t,i){if(console.log("Backup Response:"+JSON.stringify(a)),"undefined"!=typeof a.backupStatus&&"undefined"!=typeof a.backupMessage){if(console.log("JSON Backup Status:"+a.backupStatus),console.log("JSON Backup Message:"+a.backupMessage),y)return;switch(y=!0,a.backupStatus){case"success":if(console.log("JSON success response received."),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("cancel-hidden"),e(".isa_success").show,e(".backup-success").fadeIn(1500),_(a),"undefined"!=typeof a.backupWarnings){var s=e(".backup-warning"),n=a.backupWarnings;n.forEach(function(e){var a=e.warningMessage;s.append('<li class="isa_warning">'+wpbackitup_local.warning+": "+a+"</li>")}),s.fadeIn(1500)}break;case"error":console.log("JSON error response received.");var o=wpbackitup_local.unexpected_err;"undefined"!=typeof a.backupMessage&&(o=a.backupMessage);var c=wpbackitup_local.error+": &nbsp;"+o,l=e(".backup-error");l.html(c),l.addClass("isa_error"),l.fadeIn(1500),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("cancel-hidden");break;default:console.log("Unexpected JSON response status received.");var o=wpbackitup_local.unexpected_err2;"undefined"!=typeof a.backupMessage&&(o=a.backupMessage);var c=wpbackitup_local.error+"(JS998) : &nbsp;"+o,u=e(".backup-error");u.html(c),u.addClass("isa_error"),u.fadeIn(1500),e(".status-icon").fadeOut(200),e("#backup-button").removeAttr("disabled"),e("#cancel-button").addClass("cancel-hidden")}}else{console.log("NON JSON response received."),console.log("Backup Response:"+i),c=wpbackitup_local.unexpected_err3+": &nbsp;",c+="</br>"+wpbackitup_local.response+": &nbsp;"+JSON.stringify(a),c+="</br>"+wpbackitup_local.status+": &nbsp;"+t,c+="</br>"+wpbackitup_local.error+": &nbsp;"+JSON.stringify(i),e(".backup-status").hide();var u=e(".backup-error");u.html(c),u.addClass("isa_error"),u.show(),e(".status-icon").fadeOut(200)}})}function l(){e(".backup-icon").css("visibility","visible"),e(".backup-icon").show(),e(".backup-success").hide(),e(".default-status").hide(),e(".backup-error").hide(),e(".backup-cancelled").hide(),e("ul.backup-status").children().children().hide(),e(".backup-errors").children().children().hide(),e(".backup-success").children().children().hide(),e(".backup-status").show(),y=!1,window.intervalDefine=setInterval(o,5e3)}function u(){e(".backup-icon").css("visibility","visible"),e(".backup-icon").show(),e(".backup-status").show(),y=!1,clearInterval(window.intervalDefine),window.intervalDefine=setInterval(o,5e3)}function r(){e(".restore-icon").css("visibility","visible"),e(".default-status, .upload-status").hide(),e("ul.restore-status").children().children().hide(),e(".restore-errors").children().children().hide(),e(".restore-success").children().children().hide(),e(".restore-status, .restore-errors, .restore-success").show(),e(".preparing-icon").css("visibility","visible"),e(".preparing").find(".status-icon").fadeIn(1500),window.intervalDefine=setInterval(n,5e3)}function p(a){var t=new plupload.Uploader(a);t.init(),t.bind("FilesAdded",function(a,t){plupload.each(t,function(a){e("#filelist").append('<div id="media-item-'+a.id+'" class="media-item child-of-0"><img class="pinkynail" alt="" src="'+site_url+'/wp-includes/images/media/archive.png"><div class="filename new" id="'+a.id+'">'+a.name+" (<span>"+plupload.formatSize(0)+"</span> of "+plupload.formatSize(a.size)+') <div class="progress" style="width: 0%;"></div></div></div>')}),a.refresh(),a.start()}),t.bind("UploadProgress",function(a,t){e("#"+t.id+" .progress").width(.15*t.percent+"%"),e("#"+t.id+" span").html(plupload.formatSize(parseInt(t.size*t.percent/100)))}),t.bind(" ChunkUploaded",function(e,a,t){console.log("Chunk Uploaded:"),console.log(t),d(t,e,a)&&console.log("chunk error")}),t.bind("Error",function(a,t){console.log("PlUpload Error:"),console.log(t);var i="error-item-"+t.file.id;e("#"+i).length||e("#filelist").append('<div class="error-div error" id="'+i+'" ><strong>'+t.file.name+" has failed to upload due to error:&nbsp;</strong> <span>"+t.message+"</span> </div>")}),t.bind("FileUploaded",function(a,t,i){console.log("File Uploaded"),console.log(i),d(i,a,t)?console.log("uploaded error"):(console.log("uploaded success"),e("#"+t.id+" .progress").css("background-color","green"),e("#import-uploads").show())})}function d(e,a,t){if("200"!=e.status)return alert("Unknown server response status: "+e.code),console.log(e),b(a,t,999,e.response),!0;try{return response_json=jQuery.parseJSON(e.response),!!response_json.error&&(b(a,t,100,response_json.error),!0)}catch(i){return console.log("Unexpected JSON Error"+i),b(a,t,998,e.response),!0}}function b(a,t,i,s){t.status=plupload.FAILED,a.trigger("Error",{code:i,message:s,file:t}),e("#media-item-"+t.id).hide()}function _(i){"undefined"!=typeof i&&(WPBNewBackupData=i,e("#nofiles")&&e("#nofiles").remove(),a(),t())}function f(e){return w+"_"+e}function k(){notification_bar=e("#wp-backitup-notification-parent"),notification_bar.fadeOut("slow")}function h(a){notification_bar_message=e("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+a+"</p>"),notification_bar=e("#wp-backitup-notification-parent"),notification_bar.toggleClass("error",!1),notification_bar.toggleClass("updated",!0),notification_bar.show(),e("html, body").animate({scrollTop:0},"slow")}function g(a){notification_bar_message=e("#wp-backitup-notification-message"),notification_bar_message.html("<p>"+a+"</p>"),notification_bar=e("#wp-backitup-notification-parent"),notification_bar.toggleClass("updated",!1),notification_bar.toggleClass("error",!0),notification_bar.show(),e("html, body").animate({scrollTop:0},"slow")}var w="wp-backitup",v=0;a(),t();try{"undefined"!=typeof wpbackitup_plupload_config&&p(wpbackitup_plupload_config)}catch(m){console.log(m)}e(".logs_backup").click(function(){var a=e(this).attr("href");return e("#backup_file").val(a),e("#download_logs").val(),e("#download_backup").submit(),!1}),e("#scheduled-backups-accordian").click(function(){scheduled_backups=e("#scheduled-backups"),scheduled_backups_button=e("#scheduled-backups-accordian"),e(this).is(".fa-angle-double-down")?(scheduled_backups.fadeIn("slow"),scheduled_backups_button.toggleClass("fa-angle-double-down",!1),scheduled_backups_button.toggleClass("fa-angle-double-up",!0)):(scheduled_backups_button.toggleClass("fa-angle-double-down",!0),scheduled_backups_button.toggleClass("fa-angle-double-up",!1),scheduled_backups.fadeOut("slow"))}),e("#upload-backups-accordian").click(function(){upload_backups=e("#wpbackitup-plupload-modal"),upload_backups_button=e("#upload-backups-accordian"),e(this).is(".fa-angle-double-down")?(upload_backups.fadeIn("slow"),upload_backups_button.toggleClass("fa-angle-double-down",!1),upload_backups_button.toggleClass("fa-angle-double-up",!0)):(upload_backups_button.toggleClass("fa-angle-double-down",!0),upload_backups_button.toggleClass("fa-angle-double-up",!1),upload_backups.fadeOut("slow"))}),e("#wpbackitup-zip").bind("change",function(){var a=this.files[0].size,t=e("#maxfilesize").val();"undefined"!=a&&"undefined"!=t&&""!=a&&""!=t&&a>t&&(alert(wpbackitup_local.upload_file_size_exceed),e("#wpbackitup-zip").val(""))}),e("#import-uploads").click(function(){setTimeout(function(){window.location.reload()},100)}),e(document.body).on("click",".thickbox",function(){if(!e(this).parents(".wpbiu-restore-item").length){var a=e(this).data("jobid");console.log(a);var t=this.name;i(a,t)}}),e(document.body).on("click",".thickbox",function(){var a=e(this).data("jobid"),t=e(this).attr("name");if(e(this).parents(".wpbiu-restore-item").length){var i="<h2>"+wpbackitup_local.bl_backup_set+"&nbsp;<em>"+t+'</em></h2> <div class="wpbiu-notes"> <textarea class="backupnotes" id="wpbiu-restore-note-box" placeholder="'+wpbackitup_local.bl_note_placeholder+'"></textarea> <button id="wpbiu-restore-note-btn" class="button-primary">'+wpbackitup_local.bl_note_save+'</button> <span id="wpbiu-restore-note-response">'+wpbackitup_local.bl_note_saved_success+"</span> </div>";e("#wpbiu-restore-note").html(i),e("#wpbiu-restore-note-response").hide(),e.ajax({url:ajaxurl,type:"post",data:{action:f("backup_get_note"),job_id:a},success:function(a){e("#wpbiu-restore-note-box").val(a.data)}}),e("#wpbiu-restore-note-btn").click(function(){var t=e("#wpbiu-restore-note-box").val();e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup_add_note"),job_id:a,note:t},dataType:"json"}).success(function(a){e("#wpbiu-restore-note-response").fadeIn()})})}e("#wpbiu-restore-note-box").focus(function(){e("#wpbiu-restore-note-response").hide()})});var y=!1;e("#wp-backitup-notification-widget-close").click(function(){notification_bar=e("#wp-backitup-notification-widget"),notification_bar.fadeOut("slow");var a=e.ajax({url:ajaxurl,type:"POST",data:{action:f("delete_transient")},dataType:"json"});a.always(function(a,t,i){a!==!1&&(notification_bar.removeClass(),notification_bar.addClass("notice"),notification_bar.addClass("notice-"+a.message_type),e("#wp-backitup-notification-widget-message p").html(a.message),notification_bar.hide().fadeIn("slow"))})}),e("#wp-backitup-notification-close").click(function(){k()}),e("#wp-backitup-save_schedule_form").submit(function(){var a=new FormData;a.append("action",f("update-schedule")),a.append("_wpnonce",e("#wp-backitup_nonce-update-schedule").val()),a.append("_wp_http_referer",e("[name='_wp_http_referer']").val());var t=[];return e.each(e("input[name='dow']:checked"),function(){t.push(e(this).val())}),a.append("days_selected",t),jQuery.ajax({url:ajaxurl,type:"POST",cache:!1,contentType:!1,processData:!1,dataType:"json",data:a,success:function(e,a,t){switch(response=e.message,console.log("Success:"+response),response){case"success":h(wpbackitup_local.scheduled_saved);break;case"error":g(wpbackitup_local.scheduled_not_saved)}},error:function(e,a,t){console.log("Error."+a+":"+t)},complete:function(e,a){console.log("Complete")}}),!1});var j=null;e(".backup-button").click(function(a){a.preventDefault(),x=!1,e("#backup-button").attr("disabled","disabled"),e("#cancel-button").removeClass("cancel-hidden"),e("#cancel-button").removeAttr("disabled"),e("#cancel-button").fadeIn(200),j=e.ajax({url:ajaxurl,type:"POST",data:{action:f("backup")},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),l()}}),j.always(function(e,a,t){console.log("Backup Button Click - Always"),console.log(e.message),"undefined"!=typeof e.job_id?(v=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})});var x=!1;e(".cancel-button").click(function(a){a.preventDefault(),e("#cancel-button").attr("disabled","disabled"),null!=j&&(j.abort(),j=null),j=e.ajax({url:ajaxurl,type:"POST",data:{action:f("cancel_backup"),job_id:v},cache:!1,dataType:"json",beforeSend:function(e,a){console.log("BeforeSend:Nothing to report."),u()}}),j.always(function(e,a,t){console.log("Cancel Button Click - Always"),console.log(e),"undefined"!=typeof e.success&&1==e.success?console.log("Job Cancelled successfully"):console.log("Job was not cancelled successfully"),x=!0})}),e("#datatable").on("click","a.restoreRow",function(a){if(a.preventDefault(),confirm(wpbackitup_local.confirm_restore)){var t=this.title;this.id.replace("restoreRow","row");userid=e("input[name=user_id]").val();var i=e.ajax({url:ajaxurl,type:"post",data:{action:f("restore"),selected_file:t,user_id:userid},cache:!1,dataType:"json",beforeSend:function(){console.log("BeforeSend:Nothing to report."),r()}});i.always(function(e,a,t){"undefined"!=typeof e.job_id?(v=e.job_id,console.log("Job_Id:"+e.job_id)):console.log("No Job Id found:"+e)})}}),e("#datatable").on("click","a.deleteRow",function(a){if(a.preventDefault(),confirm(wpbackitup_local.sure)){var t=this.title,i=e(this).data("id"),s=this.id.replace("deleteRow","row");e.ajax({url:ajaxurl,type:"post",data:{action:f("delete_file"),filed:t,post_id:i},success:function(a){var t=a.search("deleted");0==t?e("#"+s).remove():alert(wpbackitup_local.file_not_del)}})}})}(jQuery),function(e){"use strict";var a="wp-backitup",t=function(e){return a+"_"+e},i=function(a){return e.ajax({url:ajaxurl,type:"GET",data:{action:t(a)},dataType:"json"})},s=function(a,i){var i=i||{};return i.action=t(a),i.security=e("#wpbackitup-core-ajax-nonce").val(),e.ajax({url:ajaxurl,type:"POST",data:i,dataType:"json"})};e(window).load(function(){if(document.querySelector("#wpbackitup-core-settings")){Vue.use(VueTabs);var e=new Vue({el:"#wpbackitup-core-settings",data:{loading:!1,updated:!1,emailsArray:[],errorMessages:{},backup_retained_number:3,logging:!1,single_file_db:!1,single_file_backupset:!1,rversion_compare:!1,remove_supporting_zip_files:!1,backup_plugins_filter:[],backup_themes_filter:[],backup_uploads_filter:[],backup_others_filter:[],dbFilterOptions:[],db_filters:[],allow_usage_tracking:!1,backup_dbtables_batch_size:1e4,backup_sql_merge_batch_size:1e4,backup_sql_batch_size:1e4,backup_plugins_batch_size:5e3,backup_themes_batch_size:5e3,backup_uploads_batch_size:500,backup_others_batch_size:500,backup_zip_max_size:524288e3,backup_max_timeout:120,delete_all:!1,safe_sync:!1},computed:{dbFilterHasSearch:function(){return 0==this.dbFilterOptions.length},dbFilterPlaceholder:function(){return this.dbFilterOptions.length>0?wpbackitup_local.settings_select_database_table_to_filter:wpbackitup_local.settings_no_database_table_to_filter}},methods:{handleEmailInput:function(e){},handleTagsInput:function(e){},setSettings:function(){var a={data:{notification_email:this.emailsArray.join(","),backup_retained_number:this.backup_retained_number,logging:this.logging,single_file_db:this.single_file_db,single_file_backupset:this.single_file_backupset,rversion_compare:this.rversion_compare,remove_supporting_zip_files:this.remove_supporting_zip_files,backup_plugins_filter:this.backup_plugins_filter.join(","),backup_themes_filter:this.backup_themes_filter.join(","),backup_uploads_filter:this.backup_uploads_filter.join(","),backup_others_filter:this.backup_others_filter.join(","),backup_dbtables_filter_list:this.db_filters.map(function(e){return e.value}).join(","),backup_dbtables_batch_size:this.backup_dbtables_batch_size,backup_sql_merge_batch_size:this.backup_sql_merge_batch_size,backup_sql_batch_size:this.backup_sql_batch_size,backup_plugins_batch_size:this.backup_plugins_batch_size,backup_themes_batch_size:this.backup_themes_batch_size,backup_uploads_batch_size:this.backup_uploads_batch_size,backup_others_batch_size:this.backup_others_batch_size,backup_zip_max_size:this.backup_zip_max_size,backup_max_timeout:this.backup_max_timeout,delete_all:this.delete_all,safe_sync:this.safe_sync,allow_usage_tracking:this.allow_usage_tracking}};console.log(a),s("set_settings",a).then(function(a){a.success?(e.updated=!0,e.errorMessages={},swal(wpbackitup_local.settings_save_awesome,wpbackitup_local.settings_save_success_message,"success")):(e.errorMessages=a.data,swal(wpbackitup_local.settings_save_oops,wpbackitup_local.settings_save_error_message,"error"))})},getSettings:function(){this.loading=!0,i("get_settings").then(function(a){e.loading=!1,a.success&&(console.log(a),e.emailsArray=a.data.notification_email.split(",").filter(Boolean),e.backup_retained_number=a.data.backup_retained_number,e.logging="1"===a.data.logging,e.single_file_db="1"===a.data.single_file_db,e.rversion_compare="1"===a.data.rversion_compare,e.single_file_backupset="1"===a.data.single_file_backupset,e.remove_supporting_zip_files="1"===a.data.remove_supporting_zip_files,e.backup_plugins_filter=a.data.backup_plugins_filter.split(",").filter(Boolean),e.backup_themes_filter=a.data.backup_themes_filter.split(",").filter(Boolean),e.backup_uploads_filter=a.data.backup_uploads_filter.split(",").filter(Boolean),e.backup_others_filter=a.data.backup_others_filter.split(",").filter(Boolean),e.db_filters=a.data.backup_dbtables_filter_list.split(",").filter(Boolean).map(function(e){return{label:e,value:e}}),e.dbFilterOptions=Object.keys(a.data.backup_dbtables_filterable).map(function(e){var t=a.data.backup_dbtables_filterable[e];return{label:t,value:t}}),e.allow_usage_tracking=a.data.allow_usage_tracking,e.backup_dbtables_batch_size=a.data.backup_dbtables_batch_size,e.backup_sql_merge_batch_size=a.data.backup_sql_merge_batch_size,e.backup_sql_batch_size=a.data.backup_sql_batch_size,e.backup_plugins_batch_size=a.data.backup_plugins_batch_size,e.backup_themes_batch_size=a.data.backup_themes_batch_size,e.backup_uploads_batch_size=a.data.backup_uploads_batch_size,e.backup_others_batch_size=a.data.backup_others_batch_size,e.backup_zip_max_size=a.data.backup_zip_max_size,e.backup_max_timeout=a.data.backup_max_timeout,e.delete_all="1"===a.data.delete_all,e.safe_sync="1"===a.data.safe_sync)})}},created:function(){this.getSettings()}})}})}(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: backup, backups, back up, backup plugin, database backup, multisite backup
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
- Stable tag: 1.16
8
  Author URI: https://www.wpbackitup.com
9
  Donate link: https://www.wpbackitup.com
10
  License: GPLv2 or later
@@ -64,6 +64,7 @@ Here are just a few of our incredible features.
64
  * Migrate your site to different host, domain or table prefix
65
  * **Clone** your site for development, staging or testing
66
  * **Priority** support gets you right to the front of the line
 
67
 
68
  = Don't Risk Losing Your Website =
69
  Does the thought of losing your website keep you up at night? All that time, effort and money you've invested could be gone in an instant.
@@ -214,6 +215,11 @@ Our online documentation and full list of FAQs can be found at [support.wpbackit
214
 
215
 
216
  == Changelog ==
 
 
 
 
 
217
  = 1.17 =
218
  *Release Date - May 19, 2018
219
 
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
+ Stable tag: 1.17
8
  Author URI: https://www.wpbackitup.com
9
  Donate link: https://www.wpbackitup.com
10
  License: GPLv2 or later
64
  * Migrate your site to different host, domain or table prefix
65
  * **Clone** your site for development, staging or testing
66
  * **Priority** support gets you right to the front of the line
67
+ * Save your backups to **DropBox** with WPBackItUp Safe
68
 
69
  = Don't Risk Losing Your Website =
70
  Does the thought of losing your website keep you up at night? All that time, effort and money you've invested could be gone in an instant.
215
 
216
 
217
  == Changelog ==
218
+ = 1.18 =
219
+ *Release Date - May 22, 2018
220
+
221
+ * UPDATE: Minor updates to UI scripts
222
+
223
  = 1.17 =
224
  *Release Date - May 19, 2018
225
 
wp-backitup.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
7
  * Author: WPBackItUp
8
  * Author URI: https://www.wpbackitup.com
9
- * Version: 1.17
10
  * Text Domain: wp-backitup
11
  *
12
  * License: GPL3
@@ -32,7 +32,7 @@ define( 'WPBACKITUP__NAMESPACE', 'wp-backitup' );
32
  define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
33
 
34
  define( 'WPBACKITUP__MAJOR_VERSION', 1);
35
- define( 'WPBACKITUP__MINOR_VERSION', 17);
36
  define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
37
  define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
38
 
6
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
7
  * Author: WPBackItUp
8
  * Author URI: https://www.wpbackitup.com
9
+ * Version: 1.18
10
  * Text Domain: wp-backitup
11
  *
12
  * License: GPL3
32
  define( 'WPBACKITUP__CLASSNAMESPACE', 'WPBackItUp' );
33
 
34
  define( 'WPBACKITUP__MAJOR_VERSION', 1);
35
+ define( 'WPBACKITUP__MINOR_VERSION', 18);
36
  define( 'WPBACKITUP__MAINTENANCE_VERSION', 0); //Dont forget to update version in header on WP release
37
  define( 'WPBACKITUP__BUILD_VERSION', 0); //Used for hotfix releases
38