-
Notifications
You must be signed in to change notification settings - Fork 5
/
mergebot.php
64 lines (55 loc) · 1.75 KB
/
mergebot.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
<?php
/*
Plugin Name: Mergebot
Plugin URI: http://wordpress.org/extend/plugins/mergebot/
Description: WordPress database merging made easy
Author: Delicious Brains
Version: 1.1.6
Author URI: http://deliciousbrains.com/
Network: True
Text Domain: mergebot
Domain Path: /languages/
// Copyright (c) 2016 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__ ) . '/includes/autoload.php';
/**
* The main function responsible for returning the one true Mergebot
* instance to functions everywhere.
*/
function mergebot() {
// Load our main plugin class
require_once dirname( __FILE__ ) . '/includes/mergebot.php';
// Namespaced class name as variable so it can be parsed in < PHP 5.3
$class = 'DeliciousBrains\\Mergebot\\Mergebot';
$version = '1.1.6';
return call_user_func( array( $class, 'get_instance' ), __FILE__, $version );
}
/**
* Load the plugin if it is compatible with the site.
*/
function mergebot_init() {
$plugin_check = new DeliciousBrains_Mergebot_Compatibility( __FILE__ );
if ( ! $plugin_check->is_compatible() ) {
// Plugin does not meet requirements, display notice and bail
$plugin_check->register_notice();
return;
}
// Start it up
mergebot();
}
// Initialize the plugin
mergebot_init();