PluginProbe
The WP Remote WordPress Plugin / 4.74
The WP Remote WordPress Plugin v4.74
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 +8 -60 5.454.74 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.0;
13 + const INFO_WING_VERSION = 1.4;
14 14
15 15 public function __construct($callback_handler) {
16 16 $this->db = $callback_handler->db;
17 17 $this->siteinfo = $callback_handler->siteinfo;
@@ -44,24 +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 - case "elementor-pro/elementor-pro.php":
56 - $pdata['current_db_version'] = $this->settings->getOption('elementor_version');
57 - $pdata['latest_db_version'] = $this->bvinfo->getLatestElementorDBVersion($plugin_file);
58 - break;
59 - }
60 -
61 - return $pdata;
62 - }
63 -
64 48 public function getPlugins() {
65 49 if (!function_exists('get_plugins')) {
66 50 require_once (ABSPATH."wp-admin/includes/plugin.php");
67 51 }
@@ -74,9 +58,8 @@
74 58 'version' => $plugin_data['Version'],
75 59 'active' => is_plugin_active($plugin_file),
76 60 'network' => $plugin_data['Network']
77 61 );
78 - $pdata = $this->addDBInfoToPlugin($pdata, $plugin_file);
79 62 $result["plugins"][] = $pdata;
80 63 }
81 64 return $result;
82 65 }
@@ -350,47 +333,16 @@
350 333 $transient = $this->objectToArray($transient);
351 334 return array("transient" => $transient);
352 335 }
353 336
354 - function getPluginsHandler($args = array()) {
355 - $result = array_merge($this->getPlugins(), $this->getTransient('update_plugins'));
356 -
357 - if (array_key_exists('clear_filters', $args)) {
358 - $filters = $args['clear_filters'];
359 - foreach ($filters as $filter)
360 - remove_all_filters($filter);
361 - $transient_without_filters = $this->getTransient('update_plugins');
362 - $result['transient_without_filters'] = $transient_without_filters['transient'];
363 - }
364 -
365 - return $result;
337 + function getPluginsHandler() {
338 + return array_merge($this->getPlugins(), $this->getTransient('update_plugins'));
366 339 }
367 340
368 - function getThemesHandler($args = array()) {
369 - $result = array_merge($this->getThemes(), $this->getTransient('update_themes'));
370 -
371 - if (array_key_exists('clear_filters', $args)) {
372 - $filters = $args['clear_filters'];
373 - foreach ($filters as $filter)
374 - remove_all_filters($filter);
375 - $transient_without_filters = $this->getTransient('update_themes');
376 - $result['transient_without_filters'] = $transient_without_filters['transient'];
377 - }
378 -
379 - return $result;
341 + function getThemesHandler() {
342 + return array_merge($this->getThemes(), $this->getTransient('update_themes'));
380 343 }
381 344
382 - function getCoreHandler() {
383 - global $wp_db_version, $wp_version;
384 -
385 - $result = $this->getTransient('update_core');
386 - $result['current_db_version'] = $this->settings->getOption('db_version');
387 - $result['latest_db_version'] = $wp_db_version;
388 - $result['wp_version'] = $wp_version;
389 -
390 - return $result;
391 - }
392 -
393 345 function getSiteInfo($args) {
394 346 $result = array();
395 347
396 348 if (array_key_exists('pre_refresh_get_options', $args)) {
@@ -405,15 +357,15 @@
405 357 if (array_key_exists('users', $args))
406 358 $result['users'] = $this->getUsersHandler($args['users']);
407 359
408 360 if (array_key_exists('plugins', $args))
409 - $result['plugins'] = $this->getPluginsHandler($args['plugins']);
361 + $result['plugins'] = $this->getPluginsHandler();
410 362
411 363 if (array_key_exists('themes', $args))
412 - $result['themes'] = $this->getThemesHandler($args['themes']);
364 + $result['themes'] = $this->getThemesHandler();
413 365
414 366 if (array_key_exists('core', $args))
415 - $result['core'] = $this->getCoreHandler();
367 + $result['core'] = $this->getTransient('update_core');
416 368
417 369 if (array_key_exists('sys', $args))
418 370 $result['sys'] = $this->getSystemInfo();
419 371
@@ -491,12 +443,8 @@
491 443 $resp = $this->getPosts($params['post_type'], $count);
492 444 break;
493 445 case "gtsts":
494 446 $resp = $this->getStats();
495 - break;
496 - case "gtdbvariables":
497 - $variable = (array_key_exists('variable', $params)) ? $params['variable'] : "";
498 - $resp = $this->db->showDbVariables($variable);
499 447 break;
500 448 case "gtplgs":
501 449 $resp = $this->getPlugins();
502 450 break;