File Manager
var BackUpWordPressAdmin=function(n){"use strict";var e;function t(e){e=void 0!==e?e:"manually";var t=jQuery(".recurring-setting"),c=jQuery("#schedule-start"),n=jQuery(".twice-js");switch(e){case"manually":case"hourly":t.hide();break;case"daily":t.hide(),c.show(),n.hide();break;case"twicedaily":t.hide(),c.show(),n.show();break;case"weekly":case"fortnightly":t.hide(),jQuery("#start-day").show(),c.show(),n.hide();break;case"monthly":t.hide(),c.show(),jQuery("#start-date").show(),n.hide()}}return{init:function(){e=n("select#hmbkp_schedule_recurrence_type"),n.ajaxSetup({cache:!1}),e.length&&(t(e.val()),n(document).on("change","select#hmbkp_schedule_recurrence_type",function(){t(n(this).val())})),n(".notice.is-dismissible").on("click",".notice-dismiss",function(){n.post(ajaxurl,{action:"hmbkp_dismiss_notice"})}),n(".notice.rate.is-dismissible").on("click",".notice-dismiss",function(){n.post(ajaxurl,{action:"hmbkp_dismiss_rate_notice"})}),n(document).on("click",".hmbkp-schedule-actions .delete-action",function(e){confirm(hmbkp.delete_schedule)||e.preventDefault()}),n(document).on("click",".hmbkp_manage_backups_row .delete-action",function(e){confirm(hmbkp.delete_backup)||e.preventDefault()}),n(document).on("click",".hmbkp-edit-schedule-excludes-form .delete-action",function(e){confirm(hmbkp.remove_exclude_rule)||e.preventDefault()}),n.post(ajaxurl,{nonce:hmbkp.nonce,action:"hmbkp_cron_test"},function(e){"1"!==e&&n(".wrap > h2").after(e)}),n(document).on("click",".hmbkp-run",function(e){wp.heartbeat.interval("fast"),n(this).closest(".hmbkp-schedule-sentence").addClass("hmbkp-running"),n(".hmbkp-error").removeClass("hmbkp-error");var t=n("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id");n.post(ajaxurl,{hmbkp_run_schedule_nonce:hmbkp.hmbkp_run_schedule_nonce,action:"hmbkp_run_schedule",hmbkp_schedule_id:t}),e.preventDefault()}),n(document).on("heartbeat-send",function(e,t){t.hmbkp_schedule_id=n("[data-hmbkp-schedule-id]").attr("data-hmbkp-schedule-id"),n(".hmbkp-schedule-sentence.hmbkp-running").length?t.hmbkp_is_in_progress=!0:t.hmbkp_client_request="site_size"}),n(document).on("heartbeat-tick",function(e,t){if(0!==t.hmbkp_schedule_status||n(".hmbkp-error").length||location.reload(!0),0!==t.hmbkp_schedule_status&&void 0!==t.hmbkp_schedule_status&&n(".hmbkp-status").replaceWith(t.hmbkp_schedule_status),void 0!==t.hmbkp_site_size&&n("code.calculating").length){n("code.calculating").text(t.hmbkp_site_size);var c=n(".hmbkp-exclude-settings");c.length&&c.replaceWith(t.hmbkp_dir_sizes)}}),n(document).on("click",".hmbkp-thickbox-close",function(e){e.preventDefault(),window.parent.tb_remove()}),n(document).on("click",'[id^="hmbkp-warning-"] .notice-dismiss',function(){n.post(ajaxurl,{action:"hmbkp_dismiss_error"})})}}}(jQuery);jQuery(document).ready(BackUpWordPressAdmin.init);
File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com