backup_service = new WPCBR_Backup_Service(); $this->restore_service = new WPCBR_Restore_Service(); $this->job_service = new WPCBR_Job_Service($this->backup_service, $this->restore_service); $this->admin_page = new WPCBR_Admin_Page($this->backup_service, $this->restore_service, $this->job_service); add_action('admin_menu', array($this->admin_page, 'register_menu')); add_action('admin_enqueue_scripts', array($this->admin_page, 'enqueue_assets')); add_action('admin_post_wpcbr_create_backup', array($this->admin_page, 'handle_backup_request')); add_action('admin_post_wpcbr_delete_backup', array($this->admin_page, 'handle_delete_request')); add_action('admin_post_wpcbr_download_backup', array($this->admin_page, 'handle_download_request')); add_action('admin_post_wpcbr_fix_upload_limit', array($this->admin_page, 'handle_fix_upload_limit')); add_action('admin_post_wpcbr_inspect_backup', array($this->admin_page, 'handle_inspect_request')); add_action('admin_post_wpcbr_restore_backup', array($this->admin_page, 'handle_restore_request')); add_action('admin_post_wpcbr_rollback_restore', array($this->admin_page, 'handle_rollback_request')); add_action('admin_post_wpcbr_discard_rollback', array($this->admin_page, 'handle_discard_rollback_request')); add_action('admin_post_wpcbr_discard_imported', array($this->admin_page, 'handle_discard_imported_request')); add_action('admin_post_wpcbr_drop_db_copy', array($this->admin_page, 'handle_drop_db_copy_request')); add_action('admin_post_wpcbr_mark_copy', array($this->admin_page, 'handle_mark_copy_request')); add_action('admin_post_wpcbr_stage_server_file', array($this->admin_page, 'handle_stage_server_file')); add_action('admin_post_wpcbr_save_settings', array($this->admin_page, 'handle_save_settings')); add_action('admin_post_wpcbr_confirm_restore', array($this->admin_page, 'handle_confirm_restore_request')); // The recovery watcher (mu-plugin) normally does this before any plugin loads; run it // here too in case the watcher file was removed while a restore is open. add_action('plugins_loaded', array('WPCBR_Recovery', 'watch'), 0); // Chunked (AJAX-driven) export/import job endpoints. add_action('wp_ajax_wpcbr_export_start', array($this->admin_page, 'handle_export_start')); add_action('wp_ajax_wpcbr_export_tick', array($this->admin_page, 'handle_export_tick')); add_action('wp_ajax_wpcbr_import_start', array($this->admin_page, 'handle_import_start')); add_action('wp_ajax_wpcbr_import_tick', array($this->admin_page, 'handle_import_tick')); add_action('wp_ajax_wpcbr_upload_part', array($this->admin_page, 'handle_upload_part')); add_action('wp_ajax_wpcbr_upload_status', array($this->admin_page, 'handle_upload_status')); add_action('wp_ajax_wpcbr_assemble_parts', array($this->admin_page, 'handle_assemble_parts')); add_action('wp_ajax_wpcbr_job_status', array($this->admin_page, 'handle_job_status')); add_action('wp_ajax_wpcbr_job_cancel', array($this->admin_page, 'handle_job_cancel')); } }