-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedd-software-github-sync.php
45 lines (35 loc) · 1.13 KB
/
edd-software-github-sync.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
43
44
45
<?php
/**
* Plugin Name: Easy Digital Downloads - Software GitHub Sync
* Plugin URI: https://github.com/Dev7studios/edd-software-github-sync
* Description: Sync GitHub releases with EDD downloads that use Software Licensing
* Version: 0.2.0
* Author: Dev7studios
* Author URI: http://dev7studios.com
* Text Domain: dev7-esgs
* Domain Path: lang
**/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Dev7EDDSoftwareGitHubSync {
private $text_domain = 'dev7-esgs';
private $plugin_path;
private $plugin_url;
public function __construct() {
$this->plugin_path = plugin_dir_path( __FILE__ );
$this->plugin_url = plugin_dir_url( __FILE__ );
load_plugin_textdomain( $this->text_domain, false, $this->plugin_path . 'lang' );
$this->loadIncludes();
new Dev7EsgsWebhooks( $this->text_domain );
add_action( 'init', array( $this, 'init' ) );
}
protected function loadIncludes() {
require_once $this->plugin_path . 'includes/Dev7EsgsWebhooks.php';
require_once $this->plugin_path . 'includes/Dev7EsgsSettings.php';
}
public function init() {
new Dev7EsgsSettings( $this->text_domain );
}
}
new Dev7EDDSoftwareGitHubSync();