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 | callback/wings/info.php +12 -98 5.734.86 View file →
@@ -9,9 +9,9 @@
9 9 public $siteinfo;
10 10 public $bvinfo;
11 11 public $bvapi;
12 12
13 - const INFO_WING_VERSION = 2.4;
13 + const INFO_WING_VERSION = 1.5;
14 14
15 15 public function __construct($callback_handler) {
16 16 $this->db = $callback_handler->db;
17 17 $this->siteinfo = $callback_handler->siteinfo;
@@ -44,27 +44,8 @@
44 44 "comments" => get_object_vars(wp_count_comments())
45 45 );
46 46 }
47 47
48 - public function addDBInfoToPlugin($pdata, $plugin_file) {
49 - switch ($plugin_file) {
50 - case "woocommerce/woocommerce.php":
51 - $pdata['current_db_version'] = $this->settings->getOption('woocommerce_db_version');
52 - $pdata['latest_db_version'] = $this->bvinfo->getLatestWooCommerceDBVersion();
53 - break;
54 - case "elementor/elementor.php":
55 - $pdata['current_db_version'] = $this->settings->getOption('elementor_version');
56 - $pdata['latest_db_version'] = $this->bvinfo->getLatestElementorDBVersion($plugin_file);
57 - break;
58 - case "elementor-pro/elementor-pro.php":
59 - $pdata['current_db_version'] = $this->settings->getOption('elementor_pro_version');
60 - $pdata['latest_db_version'] = $this->bvinfo->getLatestElementorDBVersion($plugin_file);
61 - break;
62 - }
63 -
64 - return $pdata;
65 - }
66 -
67 48 public function getPlugins() {
68 49 if (!function_exists('get_plugins')) {
69 50 require_once (ABSPATH."wp-admin/includes/plugin.php");
70 51 }
@@ -75,15 +56,10 @@
75 56 'file' => $plugin_file,
76 57 'title' => $plugin_data['Title'],
77 58 'version' => $plugin_data['Version'],
78 59 'active' => is_plugin_active($plugin_file),
79 - 'network' => $plugin_data['Network'],
80 - "plugin_uri" => $plugin_data["PluginURI"],
81 - "update_uri" => $plugin_data["UpdateURI"],
82 - "author_uri" => $plugin_data["AuthorURI"],
83 - "author" => $plugin_data["AuthorName"],
60 + 'network' => $plugin_data['Network']
84 61 );
85 - $pdata = $this->addDBInfoToPlugin($pdata, $plugin_file);
86 62 $result["plugins"][] = $pdata;
87 63 }
88 64 return $result;
89 65 }
@@ -94,13 +70,9 @@
94 70 'name' => $theme->Name,
95 71 'title' => $theme->Title,
96 72 'stylesheet' => $theme->get_stylesheet(),
97 73 'template' => $theme->Template,
98 - 'version' => $theme->Version,
99 - 'theme_uri' => $theme->get('ThemeURI'),
100 - 'author' => $theme->get('Author'),
101 - 'author_uri' => $theme->get('AuthorURI'),
102 - 'update_uri' => $theme->get('UpdateURI'),
74 + 'version' => $theme->Version
103 75 );
104 76 } else {
105 77 $pdata = array(
106 78 'name' => $theme["Name"],
@@ -106,11 +78,9 @@
106 78 'name' => $theme["Name"],
107 79 'title' => $theme["Title"],
108 80 'stylesheet' => $theme["Stylesheet"],
109 81 'template' => $theme["Template"],
110 - 'version' => $theme["Version"],
111 - 'author' => $theme['Author'],
112 - 'author_uri' => $theme['Author URI'],
82 + 'version' => $theme["Version"]
113 83 );
114 84 }
115 85 return $pdata;
116 86 }
@@ -177,10 +147,8 @@
177 147 'uploaddir' => wp_upload_dir(),
178 148 'contentdir' => defined('WP_CONTENT_DIR') ? WP_CONTENT_DIR : null,
179 149 'contenturl' => defined('WP_CONTENT_URL') ? WP_CONTENT_URL : null,
180 150 'plugindir' => defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : null,
181 - 'themedir' => get_stylesheet_directory(),
182 - 'templatedir' => get_template_directory(),
183 151 'dbcharset' => defined('DB_CHARSET') ? DB_CHARSET : null,
184 152 'disallow_file_edit' => defined('DISALLOW_FILE_EDIT'),
185 153 'disallow_file_mods' => defined('DISALLOW_FILE_MODS'),
186 154 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null,
@@ -227,14 +195,8 @@
227 195 }
228 196 if (function_exists('openssl_public_decrypt')) {
229 197 $info['openssl_public_decrypt'] = "1";
230 198 }
231 - if (function_exists('openssl_encrypt')) {
232 - $info['openssl_encrypt'] = "1";
233 - }
234 - if (function_exists('openssl_decrypt')) {
235 - $info['openssl_decrypt'] = "1";
236 - }
237 199 $info['sha1'] = "1";
238 200 $info['apissl'] = "1";
239 201 if (function_exists('base64_encode')) {
240 202 $info['b64encode'] = true;
@@ -294,12 +256,8 @@
294 256 if (defined('WPE_APIKEY')) {
295 257 $host_info['WPE_APIKEY'] = WPE_APIKEY;
296 258 }
297 259
298 - if (defined('IS_ATOMIC')) {
299 - $host_info['IS_ATOMIC'] = IS_ATOMIC;
300 - }
301 -
302 260 return $host_info;
303 261 }
304 262
305 263 public function serverConfig() {
@@ -403,19 +361,8 @@
403 361
404 362 return $result;
405 363 }
406 364
407 - function getCoreHandler() {
408 - global $wp_db_version, $wp_version;
409 -
410 - $result = $this->getTransient('update_core');
411 - $result['current_db_version'] = $this->settings->getOption('db_version');
412 - $result['latest_db_version'] = $wp_db_version;
413 - $result['wp_version'] = $wp_version;
414 -
415 - return $result;
416 - }
417 -
418 365 function getSiteInfo($args) {
419 366 $result = array();
420 367
421 368 if (array_key_exists('pre_refresh_get_options', $args)) {
@@ -436,9 +383,9 @@
436 383 if (array_key_exists('themes', $args))
437 384 $result['themes'] = $this->getThemesHandler($args['themes']);
438 385
439 386 if (array_key_exists('core', $args))
440 - $result['core'] = $this->getCoreHandler();
387 + $result['core'] = $this->getTransient('update_core');
441 388
442 389 if (array_key_exists('sys', $args))
443 390 $result['sys'] = $this->getSystemInfo();
444 391
@@ -498,31 +445,8 @@
498 445
499 446 return $result;
500 447 }
501 448
502 - function getPluginFileData($plugin_file) {
503 - $result = array();
504 -
505 - if (!function_exists('get_plugin_data')) {
506 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
507 - }
508 - $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_file);
509 - if ($plugin_data && isset($plugin_data['Version'])) {
510 - $result['version'] = $plugin_data['Version'];
511 - }
512 -
513 - return $result;
514 - }
515 -
516 - function fetchPluginApiData($slug, $action) {
517 - $args = array('slug' => wp_unslash($slug));
518 - $args = (object) $args;
519 - $args = apply_filters('plugins_api_args', $args, $action);
520 - $data = apply_filters('plugins_api', false, $action, $args);
521 -
522 - return $data;
523 - }
524 -
525 449 public function process($request) {
526 450 $db = $this->db;
527 451 $params = $request->params;
528 452 switch ($request->method) {
@@ -540,12 +464,8 @@
540 464 break;
541 465 case "gtsts":
542 466 $resp = $this->getStats();
543 467 break;
544 - case "gtdbvariables":
545 - $variable = (array_key_exists('variable', $params)) ? $params['variable'] : "";
546 - $resp = $this->db->showDbVariables($variable);
547 - break;
548 468 case "gtplgs":
549 469 $resp = $this->getPlugins();
550 470 break;
551 471 case "gtthms":
@@ -578,22 +498,16 @@
578 498 break;
579 499 case "gthost":
580 500 $resp = array('host_info' => $this->getHostInfo());
581 501 break;
582 - case "gtplsinfo":
583 - $resp = array("plugins_info" => array());
584 - $file_by_slug = $params["file_by_slug"];
585 - foreach ($params['slugs'] as $slug) {
586 - $data = $this->fetchPluginApiData($slug, $params['action']);
587 - if (is_object($data) && !property_exists($data, 'version') && isset($file_by_slug[$slug])) {
588 - $plugin_data = $this->getPluginFileData($file_by_slug[$slug]);
589 - $data->version = $plugin_data['version'];
590 - }
591 - $resp['plugins_info'][$slug] = $data;
592 - }
593 - break;
594 502 case "gtplinfo":
595 - $data = $this->fetchPluginApiData($params['slug'], $params['action']);
503 + $args = array(
504 + 'slug' => wp_unslash($params['slug'])
505 + );
506 + $action = $params['action'];
507 + $args = (object) $args;
508 + $args = apply_filters('plugins_api_args', $args, $action);
509 + $data = apply_filters('plugins_api', false, $action, $args);
596 510 $resp = array("plugins_info" => $data);
597 511 break;
598 512 case "gtpostactinfo":
599 513 $resp = $this->getPostActivateInfo($params);