This repository was archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremote.php
More file actions
52 lines (45 loc) · 1.45 KB
/
remote.php
File metadata and controls
52 lines (45 loc) · 1.45 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
52
<?php
/**
* Remote bootstrap file
*
* @category Multisite
* @package Remote
* @author Sebo <sebo@42geeks.gg>
* @license GPLv2 https://opensource.org/licenses/gpl-2.0.php
* @link https://42geeks.gg/
*
* @wordpress-plugin
* Plugin Name: Remote
* Plugin URI: https://42geeks.gg/
* Description: a Plugin to handle all sites using Fetcher Theme remotely.
* Author: Sebo <sebo@42geeks.gg>
* Version: 1.0
* Author URI: https://42geeks.gg/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: remote
*/
// If this file is accessed directory, then abort.
if (! defined('WPINC')) {
die;
}
// composer psr-4
if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) {
include_once dirname(__FILE__) . '/vendor/autoload.php';
}
// backend only plugin
if (class_exists('remote\\Remote')) {
define('REMOTE_VERSION', '1.0');
// ensure path is only set once
$pluginRootPath = plugin_dir_path(__FILE__);
$pluginRootUri = plugin_dir_url(__FILE__);
// init acf
if (! function_exists('acf_add_options_page')) {
include_once dirname(__FILE__) . '/helper/acfinit.php';
add_filter('acf/settings/show_admin', '__return_false');
}
// run plugin
$plugin = new \remote\Remote($pluginRootPath, $pluginRootUri);
register_activation_hook(__FILE__, [$plugin, 'activatePlugin']);
register_deactivation_hook(__FILE__, [$plugin, 'deactivatePlugin']);
}