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 +3 -49 5.244.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 }
@@ -184,11 +154,9 @@
184 154 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null,
185 155 'custom_usermeta' => defined('CUSTOM_USERMETA_TABLE') ? CUSTOM_USERMETA_TABLE : null,
186 156 'locale' => get_locale(),
187 157 'wp_local_string' => $wp_local_package,
188 - 'charset_collate' => $db->getCharsetCollate(),
189 - 'login_url' => wp_login_url(),
190 - 'admin_url' => get_admin_url()
158 + 'charset_collate' => $db->getCharsetCollate()
191 159 );
192 160 return $wp_info;
193 161 }
194 162
@@ -393,18 +361,8 @@
393 361
394 362 return $result;
395 363 }
396 364
397 - function getCoreHandler() {
398 - global $wp_db_version;
399 -
400 - $result = $this->getTransient('update_core');
401 - $result['current_db_version'] = $this->settings->getOption('db_version');
402 - $result['latest_db_version'] = $wp_db_version;
403 -
404 - return $result;
405 - }
406 -
407 365 function getSiteInfo($args) {
408 366 $result = array();
409 367
410 368 if (array_key_exists('pre_refresh_get_options', $args)) {
@@ -425,9 +383,9 @@
425 383 if (array_key_exists('themes', $args))
426 384 $result['themes'] = $this->getThemesHandler($args['themes']);
427 385
428 386 if (array_key_exists('core', $args))
429 - $result['core'] = $this->getCoreHandler();
387 + $result['core'] = $this->getTransient('update_core');
430 388
431 389 if (array_key_exists('sys', $args))
432 390 $result['sys'] = $this->getSystemInfo();
433 391
@@ -505,12 +463,8 @@
505 463 $resp = $this->getPosts($params['post_type'], $count);
506 464 break;
507 465 case "gtsts":
508 466 $resp = $this->getStats();
509 - break;
510 - case "gtdbvariables":
511 - $variable = (array_key_exists('variable', $params)) ? $variable : "";
512 - $resp = $this->db->showDbVariables($variable);
513 467 break;
514 468 case "gtplgs":
515 469 $resp = $this->getPlugins();
516 470 break;