forked from michelve/slm-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsoftware-license-manager.php
More file actions
executable file
·64 lines (57 loc) · 2.95 KB
/
software-license-manager.php
File metadata and controls
executable file
·64 lines (57 loc) · 2.95 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
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
Plugin Name: Software License Manager
Version: 5.6.2
Plugin URI: https://github.com/michelve/software-license-manager/
Author: Michel Velis
Author URI: http://www.epikly.com/
Description: Software license management solution for your web applications (WordPress plugins, Themes, Applications, PHP based license software script etc.). Supports WooCommerce.
Author2: <a href="https://www.tipsandtricks-hq.com/">Tips and Tricks HQ</a>
Text Domain: softwarelicensemanager
Domain Path: /i18n/languages/
WC tested up to: 6.1.0
*/
// If this file is called directly, abort.
if (!defined('WPINC')) {
die();
}
global $wpdb, $slm_debug_logger;
//Short name/slug "SLM" or "slm"
define('SLM_VERSION', '5.6.2');
define('SLM_DB_VERSION', '4.3.5');
define('SLM_REWRITE_VERSION', '2.4.5');
define('SLM_FOLDER', dirname(plugin_basename(__FILE__)));
define('SLM_URL', plugins_url('', __FILE__));
define('SLM_ASSETS_URL', SLM_URL . '/public/assets/');
define('SLM_PATH', plugin_dir_path(__FILE__));
define('SLM_LIB', SLM_PATH . 'includes/');
define('SLM_WOO', SLM_PATH . 'woocommerce/');
define('SLM_ADDONS', SLM_PATH . 'addons/');
define('SLM_ADMIN', SLM_PATH . 'admin/');
define('SLM_ADMIN_ADDONS', SLM_ADMIN . 'includes/');
define('SLM_CRONS', SLM_ADMIN_ADDONS . 'cronjobs/');
define('SLM_PUBLIC', SLM_PATH . 'public/');
define('SLM_TEAMPLATES', SLM_PATH . 'templates/');
define('SLM_SITE_HOME_URL', get_home_url());
define('SLM_SITE_URL', get_site_url() . '/');
define('SLM_TBL_LICENSE_KEYS', $wpdb->prefix . "lic_key_tbl");
define('SLM_TBL_EMAILS', $wpdb->prefix . "lic_emails_tbl");
define('SLM_TBL_LIC_DOMAIN', $wpdb->prefix . "lic_reg_domain_tbl");
define('SLM_TBL_LIC_DEVICES', $wpdb->prefix . "lic_reg_devices_tbl");
define('SLM_TBL_LIC_LOG', $wpdb->prefix . "lic_log_tbl");
define('SLM_MANAGEMENT_PERMISSION', 'manage_options');
define('SLM_MAIN_MENU_SLUG', 'slm_overview');
define('SLM_MENU_ICON', 'dashicons-lock');
if (file_exists(SLM_LIB . 'slm-plugin-core.php')) {
include_once SLM_LIB . 'slm-plugin-core.php';
}
// Options and filters
define('WOO_SLM_API_SECRET', SLM_Helper_Class::slm_get_option('lic_creation_secret'));
define('KEY_API', SLM_Helper_Class::slm_get_option('lic_creation_secret'));
define('KEY_API_PREFIX', SLM_Helper_Class::slm_get_option('lic_prefix'));
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'slm_settings_link');
// plugin auto updater helper
if (file_exists('plugin-update-checker/plugin-update-checker.php')) {
require 'plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker('https://github.com/michelve/software-license-manager', __FILE__, '/software-license-manager');
}