PluginProbe
The WP Remote WordPress Plugin / 4.81
The WP Remote WordPress Plugin v4.81
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 -90 5.564.81 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.2;
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 }
@@ -286,12 +256,8 @@
286 256 if (defined('WPE_APIKEY')) {
287 257 $host_info['WPE_APIKEY'] = WPE_APIKEY;
288 258 }
289 259
290 - if (defined('IS_ATOMIC')) {
291 - $host_info['IS_ATOMIC'] = IS_ATOMIC;
292 - }
293 -
294 260 return $host_info;
295 261 }
296 262
297 263 public function serverConfig() {
@@ -395,19 +361,8 @@
395 361
396 362 return $result;
397 363 }
398 364
399 - function getCoreHandler() {
400 - global $wp_db_version, $wp_version;
401 -
402 - $result = $this->getTransient('update_core');
403 - $result['current_db_version'] = $this->settings->getOption('db_version');
404 - $result['latest_db_version'] = $wp_db_version;
405 - $result['wp_version'] = $wp_version;
406 -
407 - return $result;
408 - }
409 -
410 365 function getSiteInfo($args) {
411 366 $result = array();
412 367
413 368 if (array_key_exists('pre_refresh_get_options', $args)) {
@@ -428,9 +383,9 @@
428 383 if (array_key_exists('themes', $args))
429 384 $result['themes'] = $this->getThemesHandler($args['themes']);
430 385
431 386 if (array_key_exists('core', $args))
432 - $result['core'] = $this->getCoreHandler();
387 + $result['core'] = $this->getTransient('update_core');
433 388
434 389 if (array_key_exists('sys', $args))
435 390 $result['sys'] = $this->getSystemInfo();
436 391
@@ -490,31 +445,8 @@
490 445
491 446 return $result;
492 447 }
493 448
494 - function getPluginFileData($plugin_file) {
495 - $result = array();
496 -
497 - if (!function_exists('get_plugin_data')) {
498 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
499 - }
500 - $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_file);
501 - if ($plugin_data && isset($plugin_data['Version'])) {
502 - $result['version'] = $plugin_data['Version'];
503 - }
504 -
505 - return $result;
506 - }
507 -
508 - function fetchPluginApiData($slug, $action) {
509 - $args = array('slug' => wp_unslash($slug));
510 - $args = (object) $args;
511 - $args = apply_filters('plugins_api_args', $args, $action);
512 - $data = apply_filters('plugins_api', false, $action, $args);
513 -
514 - return $data;
515 - }
516 -
517 449 public function process($request) {
518 450 $db = $this->db;
519 451 $params = $request->params;
520 452 switch ($request->method) {
@@ -532,12 +464,8 @@
532 464 break;
533 465 case "gtsts":
534 466 $resp = $this->getStats();
535 467 break;
536 - case "gtdbvariables":
537 - $variable = (array_key_exists('variable', $params)) ? $params['variable'] : "";
538 - $resp = $this->db->showDbVariables($variable);
539 - break;
540 468 case "gtplgs":
541 469 $resp = $this->getPlugins();
542 470 break;
543 471 case "gtthms":
@@ -570,22 +498,16 @@
570 498 break;
571 499 case "gthost":
572 500 $resp = array('host_info' => $this->getHostInfo());
573 501 break;
574 - case "gtplsinfo":
575 - $resp = array("plugins_info" => array());
576 - $file_by_slug = $params["file_by_slug"];
577 - foreach ($params['slugs'] as $slug) {
578 - $data = $this->fetchPluginApiData($slug, $params['action']);
579 - if (is_object($data) && !property_exists($data, 'version') && isset($file_by_slug[$slug])) {
580 - $plugin_data = $this->getPluginFileData($file_by_slug[$slug]);
581 - $data->version = $plugin_data['version'];
582 - }
583 - $resp['plugins_info'][$slug] = $data;
584 - }
585 - break;
586 502 case "gtplinfo":
587 - $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);
588 510 $resp = array("plugins_info" => $data);
589 511 break;
590 512 case "gtpostactinfo":
591 513 $resp = $this->getPostActivateInfo($params);