PluginProbe
The WP Remote WordPress Plugin / 4.86
The WP Remote WordPress Plugin v4.86
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | info.php +20 -95 6.484.86 View file →
@@ -8,11 +8,10 @@
8 8 public $plugname = 'wpremote';
9 9 public $brandname = 'WP Remote';
10 10 public $badgeinfo = 'wprbadge';
11 11 public $ip_header_option = 'wpripheader';
12 - public $brand_option = 'bv_whitelabel_infos';
13 - public $wp_lp_whitelabel_option = 'wprLpWhitelabelConf';
14 - public $version = '6.48';
12 + public $brand_option = 'wprbrand';
13 + public $version = '4.86';
15 14 public $webpage = 'https://wpremote.com';
16 15 public $appurl = 'https://app.wpremote.com';
17 16 public $slug = 'wpremote/plugin.php';
18 17 public $plug_redirect = 'wprredirect';
@@ -21,10 +20,9 @@
21 20 public $services_option_name = 'wprconfig';
22 21 public $author = 'WP Remote';
23 22 public $title = 'WP Remote';
24 23
25 - const DB_VERSION = '5';
26 - const AL_CONF_VERSION = '1.1';
24 + const DB_VERSION = '3';
27 25
28 26 public function __construct($settings) {
29 27 $this->settings = $settings;
30 28 $this->config = $this->settings->getOption($this->services_option_name);
@@ -41,118 +39,45 @@
41 39 public function hasValidDBVersion() {
42 40 return WPRInfo::DB_VERSION === $this->getCurrentDBVersion();
43 41 }
44 42
45 - public function getLatestWooCommerceDBVersion() {
46 - if (defined('WC_ABSPATH') && file_exists(WC_ABSPATH . 'includes/class-wc-install.php')) {
47 - include_once WC_ABSPATH . 'includes/class-wc-install.php';
48 -
49 - if (class_exists('WC_Install')) {
50 - $update_versions = array_keys(WC_Install::get_db_update_callbacks());
51 -
52 - if (!empty($update_versions)) {
53 - asort($update_versions);
54 - return end($update_versions);
55 - }
56 - }
43 + public static function getRequestID() {
44 + if (!defined("BV_REQUEST_ID")) {
45 + define("BV_REQUEST_ID", uniqid(mt_rand()));
57 46 }
58 -
59 - return false;
47 + return BV_REQUEST_ID;
60 48 }
61 49
62 - public function getConnectionKey() {
63 - require_once dirname( __FILE__ ) . '/recover.php';
64 - $bvsiteinfo = new WPRWPSiteInfo();
65 - $encoded_url = base64_encode($bvsiteinfo->siteurl());
66 - $secret = WPRRecover::defaultSecret($this->settings);
50 + public function canSetCWBranding() {
51 + if (WPRWPSiteInfo::isCWServer()) {
67 52
68 - return base64_encode("v2:".$secret.":".$encoded_url.":".$this->plugname);
69 - }
53 + $bot_protect_accounts = WPRAccount::accountsByType($this->settings, 'botprotect');
54 + if (sizeof($bot_protect_accounts) >= 1)
55 + return true;
70 56
71 - public function getDefaultSecret() {
72 - require_once dirname( __FILE__ ) . '/recover.php';
73 - $bvsiteinfo = new WPRWPSiteInfo();
74 - return WPRRecover::defaultSecret($this->settings);
75 - }
76 -
77 - public function getLatestElementorDBVersion($file) {
78 - $managerClass = $file === "elementor/elementor.php" ? '\Elementor\Core\Upgrade\Manager' : '\ElementorPro\Core\Upgrade\Manager';
79 -
80 - if (!class_exists($managerClass)) {
81 - return false;
57 + $bot_protect_accounts = WPRAccount::accountsByPattern($this->settings, 'email', '/@cw_user\.com$/');
58 + if (sizeof($bot_protect_accounts) >= 1)
59 + return true;
82 60 }
83 61
84 - $manager = new $managerClass();
85 - return $manager->get_new_version();
62 + return false;
86 63 }
87 64
88 - public static function getRequestID() {
89 - if (!defined("WPR_REQUEST_ID")) {
90 - define("WPR_REQUEST_ID", uniqid(mt_rand())); // phpcs:ignore WordPress.WP.AlternativeFunctions.rand_mt_rand
91 - }
92 - return WPR_REQUEST_ID;
93 - }
94 -
95 - public function canWhiteLabel($slug = NULL) {
96 - // phpcs:disable WordPress.Security.NonceVerification.Recommended
97 - if (array_key_exists("bv_override_global_whitelabel", $_REQUEST)) {
98 - return false;
99 - }
100 - if (array_key_exists("bv_override_plugin_whitelabel", $_REQUEST) && isset($slug) &&
101 - $_REQUEST["bv_override_plugin_whitelabel"] === $slug) {
102 - return false;
103 - }
104 - // phpcs:enable WordPress.Security.NonceVerification.Recommended
105 - return true;
106 - }
107 -
108 - public function getPluginWhitelabelInfo($slug = null) {
109 - if ($slug === null) {
110 - $slug = $this->slug;
111 - }
112 - $whitelabel_infos = $this->getPluginsWhitelabelInfos();
113 - if (!array_key_exists($slug, $whitelabel_infos) || !is_array($whitelabel_infos[$slug])) {
114 - return array();
115 - }
116 - return $whitelabel_infos[$slug];
117 - }
118 -
119 65 public function getBrandInfo() {
120 66 return $this->settings->getOption($this->brand_option);
121 67 }
122 68
123 - public function getPluginsWhitelabelInfos() {
124 - $whitelabel_infos = $this->settings->getOption($this->brand_option);
125 - return is_array($whitelabel_infos) ? $whitelabel_infos : array();
126 - }
127 -
128 - public function getLPWhitelabelInfo() {
129 - $infos = $this->settings->getOption($this->wp_lp_whitelabel_option);
130 - return is_array($infos) ? $infos : array();
131 - }
132 -
133 - public function getPluginsWhitelabelInfoByTitle() {
134 - $whitelabel_infos = $this->getPluginsWhitelabelInfos();
135 - $whitelabel_infos_by_title = array();
136 - foreach ($whitelabel_infos as $slug => $whitelabel_info) {
137 - if (is_array($whitelabel_info) && array_key_exists('default_title', $whitelabel_info) && isset($whitelabel_info['default_title'])) {
138 - $whitelabel_info['slug'] = $slug;
139 - $whitelabel_infos_by_title[$whitelabel_info['default_title']] = $whitelabel_info;
140 - }
141 - }
142 - return $whitelabel_infos_by_title;
143 - }
144 -
145 69 public function getBrandName() {
146 - $brand = $this->getPluginWhitelabelInfo();
70 + $brand = $this->getBrandInfo();
147 71 if (is_array($brand) && array_key_exists('menuname', $brand)) {
148 72 return $brand['menuname'];
149 73 }
74 +
150 75 return $this->brandname;
151 76 }
152 77
153 78 public function getBrandIcon() {
154 - $brand = $this->getPluginWhitelabelInfo();
79 + $brand = $this->getBrandInfo();
155 80 if (is_array($brand) && array_key_exists('brand_icon', $brand)) {
156 81 return $brand['brand_icon'];
157 82 }
158 83 return $this->brand_icon;
@@ -166,9 +91,9 @@
166 91 public function appUrl() {
167 92 if (defined('BV_APP_URL')) {
168 93 return BV_APP_URL;
169 94 } else {
170 - $brand = $this->getPluginWhitelabelInfo();
95 + $brand = $this->getBrandInfo();
171 96 if (is_array($brand) && array_key_exists('appurl', $brand)) {
172 97 return $brand['appurl'];
173 98 }
174 99 return $this->appurl;