| @@ -3,11 +3,10 @@ | ||
| 3 | 3 | /* |
| 4 | 4 | Plugin Name: WT Security |
| 5 | 5 | Description: WT is a SaaS which provides powerful tools for securing and monitoring your website in one place in easy and flexible way. |
| 6 | 6 | Author: WT Security |
| 7 | -Version: 2.1.5 | |
| 7 | +Version: 1.0.6 | |
| 8 | 8 | */ |
| 9 | - | |
| 10 | 9 | define("WTSEC_PAGE_TITLE", 'Dashboard'); |
| 11 | 10 | define("WTSEC_MENU_TITLE", 'WT Security'); |
| 12 | 11 | define("WTSEC_PLUGIN_PATH", plugin_dir_path(__FILE__)); |
| 13 | 12 | define("WTSEC_PLUGIN_NAME", 'wt-security'); |
| @@ -12,9 +11,9 @@ | ||
| 12 | 11 | define("WTSEC_PLUGIN_PATH", plugin_dir_path(__FILE__)); |
| 13 | 12 | define("WTSEC_PLUGIN_NAME", 'wt-security'); |
| 14 | 13 | define("WTSEC_PLUGIN_PREFIX", 'wtsec_'); |
| 15 | 14 | define("WTSEC_PAGE_PREFIX", WTSEC_PLUGIN_NAME . '-'); |
| 16 | -define("WTSEC_FILE_URL", "https://api.wtotem.com/agent"); | |
| 15 | +define("WTSEC_FILE_URL", "https://api.wtotem.com"); | |
| 17 | 16 | define("WTSEC_ROOT", WP_PLUGIN_DIR . '/'); |
| 18 | 17 | define("WTSEC_MODULES_DIR", WTSEC_PLUGIN_PATH . 'uploads/'); |
| 19 | 18 | if (is_dir(WTSEC_MODULES_DIR) && is_writable(WTSEC_MODULES_DIR)) { |
| 20 | 19 | define("WTSEC_INSTALLATION_DIR", WTSEC_MODULES_DIR); |
| @@ -25,9 +24,9 @@ | ||
| 25 | 24 | } |
| 26 | 25 | define("WTSEC_PLUGIN_URL", plugins_url("", __FILE__)); |
| 27 | 26 | define("WTSEC_SITE_URL", str_replace(['http://', 'https://', 'www.', '//', '://'], '', get_site_url())); |
| 28 | 27 | |
| 29 | -define("WTSEC_PLUGIN_INFORMATION_VERSION", "2.1"); | |
| 28 | +define("WTSEC_PLUGIN_INFORMATION_VERSION", "1.0"); | |
| 30 | 29 | |
| 31 | 30 | add_action('admin_init', 'wtsec_admin_init'); |
| 32 | 31 | add_action('wp_loaded', 'wtsec_init'); |
| 33 | 32 | |
| @@ -34,16 +33,16 @@ | ||
| 34 | 33 | function wtsec_init() |
| 35 | 34 | { |
| 36 | 35 | require_once WTSEC_PLUGIN_PATH . 'library/App.php'; |
| 37 | 36 | require_once WTSEC_PLUGIN_PATH . 'library/Request.php'; |
| 38 | -// if (!is_admin() && in_array(WTSEC_LIBRARY_App::getOption('waf_status'), ["start", "uninstalled"])) { | |
| 39 | -// if ($waf = WTSEC_LIBRARY_App::getOption(("waf_installed_file"))) { | |
| 40 | -// $path_to_waf = WTSEC_INSTALLATION_DIR . '/' . $waf; | |
| 41 | -// if (is_file($path_to_waf) && is_readable($path_to_waf)) { | |
| 42 | -// include $path_to_waf; | |
| 43 | -// } | |
| 44 | -// } | |
| 45 | -// } | |
| 37 | + if (!is_admin() && in_array(WTSEC_LIBRARY_App::getOption('waf_status'), ["start", "uninstalled"])) { | |
| 38 | + if ($waf = WTSEC_LIBRARY_App::getOption(("waf_installed_file"))) { | |
| 39 | + $path_to_waf = WTSEC_INSTALLATION_DIR . '/' . $waf; | |
| 40 | + if (is_file($path_to_waf) && is_readable($path_to_waf)) { | |
| 41 | + include $path_to_waf; | |
| 42 | + } | |
| 43 | + } | |
| 44 | + } | |
| 46 | 45 | if (is_admin()) { |
| 47 | 46 | require_once WTSEC_PLUGIN_PATH . 'library/WT.php'; |
| 48 | 47 | require_once WTSEC_PLUGIN_PATH . 'library/Localization.php'; |
| 49 | 48 | require_once WTSEC_PLUGIN_PATH . 'library/Idn.php'; |
| @@ -101,10 +100,8 @@ | ||
| 101 | 100 | wp_enqueue_script('chart', plugins_url('/htdocs/js/Chart.min.js', __FILE__), [], false, true); |
| 102 | 101 | wp_enqueue_script('chart'); |
| 103 | 102 | wp_enqueue_script('app', plugins_url('/htdocs/js/src.e31bb0bc.js', __FILE__), [], false, true); |
| 104 | 103 | wp_enqueue_script('app'); |
| 105 | - wp_enqueue_script('subscriber', plugins_url('/htdocs/js/subscriber.js', __FILE__), [], false, true); | |
| 106 | - wp_enqueue_script('subscriber'); | |
| 107 | 104 | $page = wtsec_request()->page; |
| 108 | 105 | if ($page === wtsec_getRoute("login")) { |
| 109 | 106 | if (WTSEC_LIBRARY_App::authorized()) { |
| 110 | 107 | wp_safe_redirect(wtsec_getUrl('dashboard')); |