function wp_migrate_db_loaded() { // exit quickly unless: standalone admin; multisite network admin; one of our AJAX calls if (!is_admin() || is_multisite() && !is_network_admin() && !WPMDB_Utils::is_ajax()) { return; } wp_migrate_db(); }
function wp_migrate_db_loaded() { // exit quickly unless: standalone admin; one of our AJAX calls if (!is_admin() || is_multisite() && !current_user_can('manage_network_options') && !WPMDB_Utils::is_ajax()) { return false; } wp_migrate_db(); }
/** * once all plugins are loaded, load up the rest of this plugin * * @return boolean */ function wp_migrate_db_pro_loaded() { // load if it is wp-cli, so that version update will show in wp-cli if (defined('WP_CLI') && WP_CLI) { wp_migrate_db_pro(); return true; } // exit quickly unless: standalone admin; one of our AJAX calls if (!is_admin() || is_multisite() && !current_user_can('manage_network_options') && !WPMDB_Utils::is_ajax()) { return false; } wp_migrate_db_pro(); return true; }
/** * When the "Use SSL for WP-admin and WP-login" option is checked in the * WP Engine settings, the WP Engine must-use plugin buffers the output and * does a find & replace for URLs. When we return PHP serialized data, it * replaces http:// with https:// and corrupts the serialization. * So here, we disable this filtering for our requests. */ function maybe_disable_wp_engine_filtering() { // Detect if the must-use WP Engine plugin is running if (!defined('WPE_PLUGIN_BASE')) { return; } // Make sure this is a WP Migrate DB Ajax request if (!class_exists('WPMDB_Utils') || !WPMDB_Utils::is_ajax()) { return; } // Turn off WP Engine's output filtering if (!defined('WPE_NO_HTML_FILTER')) { define('WPE_NO_HTML_FILTER', true); } }