-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultisite-exporter.php
More file actions
51 lines (45 loc) · 1.57 KB
/
multisite-exporter.php
File metadata and controls
51 lines (45 loc) · 1.57 KB
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
<?php
/*
Plugin Name: Multisite Exporter
Description: Runs WordPress Exporter on each subsite in a multisite, in the background.
Version: 1.2.1
Author: Per Søderlind
Author URI: https://soderlind.no
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: multisite-exporter
Domain Path: /languages
Network: true
*/
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Define plugin constants
define( 'MULTISITE_EXPORTER_VERSION', '1.2.1' );
define( 'MULTISITE_EXPORTER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'MULTISITE_EXPORTER_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'MULTISITE_EXPORTER_PLUGIN_FILE', __FILE__ );
// Load Action Scheduler before plugins_loaded
$action_scheduler_file = MULTISITE_EXPORTER_PLUGIN_DIR . 'vendor/woocommerce/action-scheduler/action-scheduler.php';
if ( file_exists( $action_scheduler_file ) ) {
require_once $action_scheduler_file;
}
require_once MULTISITE_EXPORTER_PLUGIN_DIR . 'vendor/autoload.php';
// Include plugin updater
if ( ! class_exists( 'Soderlind\WordPress\GitHub_Plugin_Updater' ) ) {
require_once MULTISITE_EXPORTER_PLUGIN_DIR . 'includes/class-github-plugin-updater.php';
}
// Include the main plugin class
require_once MULTISITE_EXPORTER_PLUGIN_DIR . 'includes/class-multisite-exporter.php';
/**
* Returns the main instance of Multisite_Exporter.
*
* @since 1.0.1
* @return Multisite_Exporter
*/
function Multisite_Exporter() {
return Multisite_Exporter::instance();
}
// Global for backwards compatibility
$GLOBALS[ 'multisite_exporter' ] = Multisite_Exporter();