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 +2 -46 5.384.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 = 1.8;
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,37 +44,8 @@
44 44 "comments" => get_object_vars(wp_count_comments())
45 45 );
46 46 }
47 47
48 - public function getLatestWooCommerceDB() {
49 - $version = false;
50 -
51 - if (defined('WC_ABSPATH') && file_exists(WC_ABSPATH . 'includes/class-wc-install.php')) {
52 - include_once WC_ABSPATH . 'includes/class-wc-install.php';
53 - }
54 -
55 - if (class_exists('WC_Install')) {
56 - $update_versions = array_keys(WC_Install::get_db_update_callbacks());
57 - usort($update_versions, 'version_compare');
58 - if (!empty($update_versions)) {
59 - $version = end($update_versions);
60 - }
61 - }
62 -
63 - return $version;
64 - }
65 -
66 - public function addDBInfoToPlugin($pdata, $plugin_file) {
67 - switch ($plugin_file) {
68 - case "woocommerce/woocommerce.php":
69 - $pdata['current_db_version'] = $this->settings->getOption('woocommerce_db_version');
70 - $pdata['latest_db_version'] = $this->getLatestWooCommerceDB();
71 - break;
72 - }
73 -
74 - return $pdata;
75 - }
76 -
77 48 public function getPlugins() {
78 49 if (!function_exists('get_plugins')) {
79 50 require_once (ABSPATH."wp-admin/includes/plugin.php");
80 51 }
@@ -87,9 +58,8 @@
87 58 'version' => $plugin_data['Version'],
88 59 'active' => is_plugin_active($plugin_file),
89 60 'network' => $plugin_data['Network']
90 61 );
91 - $pdata = $this->addDBInfoToPlugin($pdata, $plugin_file);
92 62 $result["plugins"][] = $pdata;
93 63 }
94 64 return $result;
95 65 }
@@ -391,18 +361,8 @@
391 361
392 362 return $result;
393 363 }
394 364
395 - function getCoreHandler() {
396 - global $wp_db_version;
397 -
398 - $result = $this->getTransient('update_core');
399 - $result['current_db_version'] = $this->settings->getOption('db_version');
400 - $result['latest_db_version'] = $wp_db_version;
401 -
402 - return $result;
403 - }
404 -
405 365 function getSiteInfo($args) {
406 366 $result = array();
407 367
408 368 if (array_key_exists('pre_refresh_get_options', $args)) {
@@ -423,9 +383,9 @@
423 383 if (array_key_exists('themes', $args))
424 384 $result['themes'] = $this->getThemesHandler($args['themes']);
425 385
426 386 if (array_key_exists('core', $args))
427 - $result['core'] = $this->getCoreHandler();
387 + $result['core'] = $this->getTransient('update_core');
428 388
429 389 if (array_key_exists('sys', $args))
430 390 $result['sys'] = $this->getSystemInfo();
431 391
@@ -503,12 +463,8 @@
503 463 $resp = $this->getPosts($params['post_type'], $count);
504 464 break;
505 465 case "gtsts":
506 466 $resp = $this->getStats();
507 - break;
508 - case "gtdbvariables":
509 - $variable = (array_key_exists('variable', $params)) ? $variable : "";
510 - $resp = $this->db->showDbVariables($variable);
511 467 break;
512 468 case "gtplgs":
513 469 $resp = $this->getPlugins();
514 470 break;