-
Notifications
You must be signed in to change notification settings - Fork 513
/
wp-migrate-db.php
69 lines (54 loc) · 2.14 KB
/
wp-migrate-db.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/*
Plugin Name: WP Migrate Lite
Plugin URI: https://deliciousbrains.com/
Description: Migrate your database. Export full sites including media, themes, and plugins. Find and replace content with support for serialized data.
Author: WP Engine
Version: 2.7.0
Author URI: https://deliciousbrains.com/wp-migrate-db-pro/?utm_source=plugin-header&utm_medium=plugin&utm_campaign=plugin-author&utm_content=wp-migrate-author
Update URI: false
Network: True
Text Domain: wp-migrate-db
Domain Path: /languages/
*/
// Copyright (c) 2013 Delicious Brains. All rights reserved.
//
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// **********************************************************************
defined( 'ABSPATH' ) || exit;
$wpmdb_base_path = dirname( __FILE__ );
require_once 'version-lite.php';
$plugin_root = '/';
if(!defined('WPMDB_VENDOR_DIR')){
define('WPMDB_VENDOR_DIR', __DIR__ . $plugin_root."vendor");
}
require WPMDB_VENDOR_DIR . '/autoload.php';
require 'setup-plugin.php';
if ( version_compare( PHP_VERSION, WPMDB_MINIMUM_PHP_VERSION, '>=' ) ) {
require_once $wpmdb_base_path . '/class/autoload.php';
require_once $wpmdb_base_path . '/setup-mdb.php';
}
function wpmdb_remove_mu_plugin() {
do_action( 'wp_migrate_db_remove_compatibility_plugin' );
}
if (class_exists('\Deliciousbrains\MigrateDevTools\Launcher') && \DeliciousBrains\WPMDB\Common\Util\Util::is_dev_environment()) {
\Deliciousbrains\MigrateDevTools\Launcher::register($wpmdb_base_path);
}
/**
* Initialize the checking for plugin updates.
*/
function wpmdb_check_for_upgrades() {
$properties = array(
'plugin_slug' => 'wp-migrate-db',
'plugin_basename' => plugin_basename( __FILE__ ),
);
require_once __DIR__ . '/class/Free/PluginUpdater.php';
new \DeliciousBrains\WPMDB\Free\PluginUpdater( $properties );
}
add_action( 'admin_init', 'wpmdb_check_for_upgrades' );