PATH:
home
/
thebhoeo
/
.trash
/
backwpup
/
inc
<?php /** * Restore Page. * * @package BackWPup */ use Inpsyde\BackWPup\Infrastructure\Restore\TemplateLoader; use function Inpsyde\BackWPup\Infrastructure\Restore\restore_container; if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class for BackWPup restore page. */ class BackWPup_Page_Restore { /** * Enqueue JS. */ public static function admin_print_scripts() { $url = untrailingslashit( BackWPup::get_plugin_data( 'url' ) ); $dir = untrailingslashit( BackWPup::get_plugin_data( 'plugindir' ) ); $path_js = "{$url}/assets/js"; $dir_js = "{$dir}/assets/js"; $shared_scripts_path = "{$url}/vendor/inpsyde/backwpup-shared/resources/js"; $shared_scripts_dir = "{$dir}/vendor/inpsyde/backwpup-shared/resources/js"; $restore_scripts_path = "{$url}/vendor/inpsyde/backwpup-restore-shared/resources/js"; $restore_scripts_dir = "{$dir}/vendor/inpsyde/backwpup-restore-shared/resources/js"; $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Vendor. wp_register_script( 'js-url', "{$path_js}/vendor/url.min.js", [ 'jquery' ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'backwpup_functions', "{$shared_scripts_path}/functions{$suffix}.js", [ 'underscore', 'jquery', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'backwpup_states', "{$shared_scripts_path}/states{$suffix}.js", [ 'backwpup_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_functions', "{$restore_scripts_path}/restore-functions{$suffix}.js", [ 'underscore', 'jquery', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_decompress', "{$restore_scripts_path}/decompress{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', 'decrypter', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_download', "{$restore_scripts_path}/download{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', 'backwpup_states', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_strategy', "{$restore_scripts_path}/strategy{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_database', "{$restore_scripts_path}/database{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_database_restore', "{$restore_scripts_path}/database-restore{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_files_restore', "{$restore_scripts_path}/files-restore{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_controller', "{$restore_scripts_path}/controller{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'decrypter', "{$restore_scripts_path}/decrypter{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_register_script( 'restore_migrate', "{$restore_scripts_path}/migrate{$suffix}.js", [ 'underscore', 'jquery', 'backwpup_functions', 'restore_functions', ], BackWPup::get_plugin_data( 'Version' ), true ); wp_enqueue_script( 'backwpupgeneral', [], '', BackWPup::get_plugin_data( 'Version' ), true ); wp_enqueue_script( 'restore_restore', "{$path_js}/restore{$suffix}.js", [ 'underscore', 'jquery', 'plupload', 'js-url', 'backwpup_functions', 'restore_functions', 'restore_decompress', 'restore_download', 'restore_strategy', 'restore_database', 'restore_database_restore', 'restore_files_restore', 'restore_controller', 'decrypter', 'restore_migrate', ], BackWPup::get_plugin_data( 'Version' ), true ); } /** * The Content of the page. */ public function content() { $template = new TemplateLoader( restore_container( null ) ); $template->load(); if ( ! \BackWPup::is_pro() ) { $step = (int) ( filter_input( INPUT_GET, 'step', FILTER_SANITIZE_NUMBER_INT ) ?: 1 ); if ( 1 === $step ) { add_action( 'backwpup_restore_before_main_content', static function (): void { \BackWPup\Utils\BackWPupHelpers::component( 'restore/upgrade-banner' ); }, 20 ); } } backwpup_template( null, '/restore/index.php' ); } /** * Page Title. */ public function title() { echo esc_html( sanitize_text_field( sprintf( // Translators: $1 is the name of the plugin. esc_html__( '%s › Restore', 'backwpup' ), BackWPup::get_plugin_data( 'name' ) ) ) ); } /** * Load. * * Load the basic for the page and also, perform stuffs before render the content. */ public static function load() { do_action( 'backwpup_page_restore' ); } /** * Entry method to display WordPress page. */ public static function page() { $restore_page = new self(); ?> <div class="wrap" id="backwpup-page"> <h1> <?php $restore_page->title(); ?> </h1> <?php $restore_page->content(); ?> </div> <?php } }
[-] class-system-tests-runner.php
[edit]
[-] class-jobtype-dbdump.php
[edit]
[-] class-destination-rsc.php
[edit]
[-] class-encryption.php
[edit]
[-] class-destination-downloader-factory.php
[edit]
[-] class-destination-downloader-interface.php
[edit]
[-] class-destination-ftp-type-ftp.php
[edit]
[-] class-path-fixer.php
[edit]
[-] class-message-box.php
[edit]
[-] class-destination-dropbox-api.php
[edit]
[-] class-option.php
[edit]
[-] class-destination-dropbox-api-request-exception.php
[edit]
[-] class-page-about.php
[edit]
[-] class-migrate.php
[edit]
[-] class-system-requirements.php
[edit]
[-] class-adminbar.php
[edit]
[-] class-msazure-destination-configuration.php
[edit]
[-] class-job.php
[edit]
[-] class-destination-ftp-type-exception.php
[edit]
[-] class-destination-sugarsync-api.php
[edit]
[-] class-download-file-interface.php
[edit]
[-] class-encryption-fallback.php
[edit]
[-] BackWPup.php
[edit]
[-] class-page-backwpup.php
[edit]
[-] class-destination-downloader-data.php
[edit]
[-] class-mysqldump-exception.php
[edit]
[-] class-s3-destination.php
[edit]
[-] class-destination-ftp.php
[edit]
[-] class-cron.php
[edit]
[+]
Notice
[-] class-destination-downloader.php
[edit]
[-] class-destinations.php
[edit]
[-] class-destination-ftp-downloader.php
[edit]
[-] class-destination-dropbox-downloader.php
[edit]
[-] class-download-handler.php
[edit]
[-] class-destination-dropbox.php
[edit]
[-] class-system-tests.php
[edit]
[-] class-destination-folder-downloader.php
[edit]
[-] class-destination-ftp-type.php
[edit]
[-] class-thirdparties.php
[edit]
[-] class-jobtype-wpplugin.php
[edit]
[-] class-directory.php
[edit]
[-] class-recursive-directory.php
[edit]
[-] class-destination-msazure-downloader.php
[edit]
[-] class-destination-connect-interface.php
[edit]
[-] class-install.php
[edit]
[-] class-admin.php
[edit]
[-] class-jobtype-file.php
[edit]
[-] functions.php
[edit]
[+]
Utils
[+]
ThirdParty
[-] class-destination-s3-downloader.php
[edit]
[-] class-destination-rsc-downloader.php
[edit]
[-] class-destination-sugarsync-downloader.php
[edit]
[-] class-destination-email.php
[edit]
[+]
..
[-] class-mysqldump.php
[edit]
[-] class-page-firstbackup.php
[edit]
[-] class-jobtype-wpexp.php
[edit]
[-] class-jobtype-dbcheck.php
[edit]
[-] class-file.php
[edit]
[-] class-sanitize-path.php
[edit]
[+]
Settings
[-] class-destination-s3.php
[edit]
[-] class-page-logs.php
[edit]
[-] class-factory-exception.php
[edit]
[-] class-page-restore.php
[edit]
[+]
dependencies
[-] class-create-archive-exception.php
[edit]
[-] class-page-editjob.php
[edit]
[-] class-page-backups.php
[edit]
[-] class-destination-dropbox-api-exception.php
[edit]
[-] class-create-archive.php
[edit]
[-] class-encryption-openssl.php
[edit]
[-] class-destination-onedrive-config-trait.php
[edit]
[-] class-destination-download-exception.php
[edit]
[-] class-download-file.php
[edit]
[-] class-page-settings.php
[edit]
[-] class-destination-msazure.php
[edit]
[-] class-page-onboarding.php
[edit]
[-] class-destination-folder.php
[edit]
[-] class-jobtypes.php
[edit]
[-] class-destination-connect-exception.php
[edit]
[-] class-destination-sugarsync.php
[edit]
[-] class-page-jobs.php
[edit]
[-] class-destination-sugarsync-api-exception.php
[edit]
[-] class-encryption-mcrypt.php
[edit]