[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@52.14.60.56: ~ $
<?php

defined( 'ABSPATH' ) || exit;

use DeliciousBrains\WPMDB\Common\Util\Util;

/**
 * Populate the $wpe_migrations global with an instance of the WPMDBPro class and return it.
 *
 * @return DeliciousBrains\WPMDB\SiteMigration\WPESiteMigration The one true global instance of the WPMDBPro class.
 */
function wpe_migrations() {
	global $wpe_migrations;

	//Load in front-end code
	require_once __DIR__ . '/react-wp-scripts.php';

	if ( ! is_null( $wpe_migrations ) ) {
		return $wpe_migrations;
	}

	$wpe_migrations = new DeliciousBrains\WPMDB\SiteMigration\WPESiteMigration();
	$wpe_migrations->register();

	return $wpe_migrations;
}

/**
 * once all plugins are loaded, load up the rest of this plugin
 *
 * @return boolean
 */
function wpe_migrations_loaded() {
	if ( ! function_exists( 'wpe_migrations' ) ) {
		return false;
	}

	if ( Util::is_frontend() ) {
		return false;
	}

	// Exit quickly on multisite unless: user can admin, one of our AJAX calls, CLI request or handling cron.
	if (
		is_multisite() &&
		! current_user_can( 'manage_network_options' ) &&
		! Util::wpmdb_is_ajax() &&
		! Util::is_cli() &&
		! Util::is_cron()
	) {
		return false;
	}

	register_deactivation_hook(
		__DIR__ . '/wpe-site-migration.php',
		'wpe_site_migration_deactivate_plugin'
	);
	register_uninstall_hook( __DIR__ . '/wpe-site-migration.php', 'wpe_site_migration_delete_plugin' );

	wpe_migrations();

	return true;
}

add_action( 'plugins_loaded', 'wpe_migrations_loaded' );

/**
 * Checks if another build of WP Migrate is active and deactivates it.
 * Deactivates this pluugin when activating another build of WP Migrate
 * To be hooked on `activated_plugin` so other plugin is deactivated when current plugin is activated.
 *
 * @handles activated_plugin
 *
 * @param string $plugin
 *
 */
function wpe_deactivate_other_instances( $plugin ) {
	$basename        = basename( $plugin );
	$migrate_plugins = [ 'wp-migrate-db-pro.php', 'wp-migrate-db.php', 'wpe-site-migration.php' ];
	if ( ! in_array( $basename, $migrate_plugins ) ) {
		return;
	}

	if ( 'wpe-site-migration.php' === $basename ) {
		$plugins_to_handle     = [ 'wp-migrate-db-pro.php', 'wp-migrate-db.php' ];
		$deactivated_notice_id = WPMDB_DEACTIVATED_FOR_WPESM_ID;
	} else {
		$plugins_to_handle     = [ 'wpe-site-migration.php' ];
		$deactivated_notice_id = WPESM_DEACTIVATED_FOR_WPMDB_ID;
	}

	$active_plugins = wpmdb_get_active_plugins();

	foreach ( $active_plugins as $active_plugin ) {
		foreach ( $plugins_to_handle as $plugin_to_handle ) {
			if ( false !== strpos( $active_plugin, $plugin_to_handle ) ) {
				set_transient( WPMDB_DEACTIVATED_NOTICE_ID_TRANSIENT, $deactivated_notice_id, HOUR_IN_SECONDS );
				deactivate_plugins( $active_plugin );

				return;
			}
		}
	}
}

add_action( 'activated_plugin', 'wpe_deactivate_other_instances' );

Filemanager

Name Type Size Permission Actions
class Folder 0755
compatibility Folder 0755
frontend Folder 0755
img Folder 0755
languages Folder 0755
template Folder 0755
vendor Folder 0755
constants.php File 10.09 KB 0644
react-wp-scripts.php File 10.05 KB 0644
requirements-checker.php File 3.63 KB 0644
setup-plugin.php File 1.34 KB 0644
setup-wpe.php File 2.76 KB 0644
version-wpe.php File 74 B 0644
wpe-site-migration.php File 2.31 KB 0644
wpesm-readme.txt File 19.77 KB 0644