-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathupdater.php
28 lines (22 loc) · 819 Bytes
/
updater.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
<?php
if (!defined('ABSPATH')) die('No direct access.');
/* This file gives an example of how to use the updater class.
You will want to copy this file into your project, and adapt the parameters to suit. */
$possible_locations = array(
dirname(__FILE__).'/class-udm-updater.php',
dirname(__FILE__).'/vendor/davidanderson684/simba-plugin-manager-updater/class-udm-updater.php'
);
if (!class_exists('Updraft_Manager_Updater_1_9')) {
foreach ($possible_locations as $location) {
if (file_exists($location)) {
require_once($location);
break;
}
}
}
try {
new Updraft_Manager_Updater_1_9('https://example.com/your/WP/mothership/siteurl', 1, 'plugin-dir/plugin-file.php');
} catch (Exception $e) {
error_log($e->getMessage().' at '.$e->getFile().' line '.$e->getLine());
}
// $x->updater->debug = true;