forked from 10up/WP-Minions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-minions-runner.php
42 lines (34 loc) · 960 Bytes
/
wp-minions-runner.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
<?php
/**
* WP Minions Runner
*
* IMPORTANT: This file must be placed in (or symlinked to) the root of the WordPress install!
*
* If Composer is present it will be used, Else a custom autoloader will
* be used in it's place.
*/
function wp_minions_runner() {
$plugin = \WpMinions\Plugin::get_instance();
$plugin->enable();
return $plugin->run();
}
if ( ! defined( 'PHPUNIT_RUNNER' ) ) {
ignore_user_abort( true );
if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'DOING_ASYNC' ) ) {
die();
}
define( 'DOING_ASYNC', true );
if ( ! defined( 'ABSPATH' ) ) {
if (file_exists(__DIR__ . '/../../../wordpress/wp-load.php')) {
require_once(__DIR__ . '/../../../wordpress/wp-load.php');
} elseif (file_exists(__DIR__ . '/../../../wp-load.php')) {
require_once __DIR__ . '/../../../wp-load.php';
} else {
error_log(
'WP Minions Fatal Error - Cannot find wp-load.php'
);
exit;
}
}
wp_minions_runner();
}