-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyncengine.php
More file actions
53 lines (43 loc) · 905 Bytes
/
syncengine.php
File metadata and controls
53 lines (43 loc) · 905 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* @author Jory Hogeveen
*
* Plugin Name: SyncEngine
* Description: Integration Manager
* Version: 1.0
* Author: SyncEngine
* Author URI: http://www.syncengine.io/
*/
if ( ! defined( 'ABSPATH' ) ) {
die;
}
SyncEngine::get_instance();
class SyncEngine
{
private static $dir = '';
private static $url = '';
private static $_instance;
public static function get_instance()
{
if ( ! isset( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
public static function get_dir()
{
return self::$dir;
}
public static function get_url()
{
return self::$url;
}
protected function __construct() {
include "vendor/autoload.php";
self::$dir = plugin_dir_path( __FILE__ );
self::$url = plugin_dir_url( __FILE__ );
if ( class_exists( 'SyncEngine\WordPress\Plugin' ) ) {
\SyncEngine\WordPress\Plugin::get_instance();
}
}
}