-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforge-sync.php
More file actions
35 lines (29 loc) · 799 Bytes
/
forge-sync.php
File metadata and controls
35 lines (29 loc) · 799 Bytes
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
<?php
/**
* Plugin Name: WP-CLI Forge Env Sync
* Description: A Forge plugin that syncs from one env to the next, copying the database and any uploads folders, and allowing the unpacking of the folders
* Version: 1.0.0
* Author: Nick Makris
* Author URI: #
* License: MIT License
*/
require_once __DIR__ . '/vendor/autoload.php';
use ForgeSync\ForgeSyncCommands;
/**
* Checks if WP-CLI is installed
*
* @return trigger_error
*/
if (!class_exists('WP_CLI')) {
return trigger_error("This plugin requires WP_CLI");
}
/**
* Checks if PharData is installed
*
* @return trigger_error
*/
if (!class_exists('PharData')) {
return trigger_error("This plugin requires PharData to be activated.");
}
$instance = new ForgeSyncCommands();
WP_CLI::add_command('forgesync', $instance);