-
Notifications
You must be signed in to change notification settings - Fork 7
/
wp-migrate-db-anonymization.php
60 lines (51 loc) · 1.68 KB
/
wp-migrate-db-anonymization.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
<?php
/*
Plugin Name: WP Migrate DB Anonymization
Plugin URI: https://deliciousbrains.com/wp-migrate-db-pro/
Description: An extension to WP Migrate DB and WP Migrate DB Pro that anonymizes user data.
Author: Delicious Brains
Version: 0.3.4
Author URI: https://deliciousbrains.com
Network: True
*/
// Copyright (c) 2018 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.
// **********************************************************************
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Bootstrap our autoloader
require_once dirname( __FILE__ ) . '/vendor/autoload.php';
/**
* The main function responsible for returning the one true Mergebot
* instance to functions everywhere.
*/
function wpmdb_anonymize() {
// Namespaced class name as variable so it can be parsed in < PHP 5.3
$class = 'WPMDB\\Anonymization\\Plugin';
$version = '0.3.4';
return call_user_func( array( $class, 'get_instance' ), __FILE__, $version );
}
/**
* Load the plugin if it is compatible with the site.
*/
function wpmdb_anonymize_init() {
$plugin_check = new WPMDB_Anonymization_Compatibility( __FILE__ );
if ( ! $plugin_check->is_compatible() ) {
// Plugin does not meet requirements, display notice and bail
$plugin_check->register_notice();
return;
}
// Start it up
wpmdb_anonymize();
}
// Initialize the plugin
wpmdb_anonymize_init();