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