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 +18 -124 5.724.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.4;
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,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,
@@ -227,14 +195,8 @@
227 195 }
228 196 if (function_exists('openssl_public_decrypt')) {
229 197 $info['openssl_public_decrypt'] = "1";
230 198 }
231 - if (function_exists('openssl_encrypt')) {
232 - $info['openssl_encrypt'] = "1";
233 - }
234 - if (function_exists('openssl_decrypt')) {
235 - $info['openssl_decrypt'] = "1";
236 - }
237 199 $info['sha1'] = "1";
238 200 $info['apissl'] = "1";
239 201 if (function_exists('base64_encode')) {
240 202 $info['b64encode'] = true;
@@ -294,12 +256,8 @@
294 256 if (defined('WPE_APIKEY')) {
295 257 $host_info['WPE_APIKEY'] = WPE_APIKEY;
296 258 }
297 259
298 - if (defined('IS_ATOMIC')) {
299 - $host_info['IS_ATOMIC'] = IS_ATOMIC;
300 - }
301 -
302 260 return $host_info;
303 261 }
304 262
305 263 public function serverConfig() {
@@ -375,47 +333,16 @@
375 333 $transient = $this->objectToArray($transient);
376 334 return array("transient" => $transient);
377 335 }
378 336
379 - function getPluginsHandler($args = array()) {
380 - $result = array_merge($this->getPlugins(), $this->getTransient('update_plugins'));
381 -
382 - if (array_key_exists('clear_filters', $args)) {
383 - $filters = $args['clear_filters'];
384 - foreach ($filters as $filter)
385 - remove_all_filters($filter);
386 - $transient_without_filters = $this->getTransient('update_plugins');
387 - $result['transient_without_filters'] = $transient_without_filters['transient'];
388 - }
389 -
390 - return $result;
337 + function getPluginsHandler() {
338 + return array_merge($this->getPlugins(), $this->getTransient('update_plugins'));
391 339 }
392 340
393 - function getThemesHandler($args = array()) {
394 - $result = array_merge($this->getThemes(), $this->getTransient('update_themes'));
395 -
396 - if (array_key_exists('clear_filters', $args)) {
397 - $filters = $args['clear_filters'];
398 - foreach ($filters as $filter)
399 - remove_all_filters($filter);
400 - $transient_without_filters = $this->getTransient('update_themes');
401 - $result['transient_without_filters'] = $transient_without_filters['transient'];
402 - }
403 -
404 - return $result;
341 + function getThemesHandler() {
342 + return array_merge($this->getThemes(), $this->getTransient('update_themes'));
405 343 }
406 344
407 - function getCoreHandler() {
408 - global $wp_db_version, $wp_version;
409 -
410 - $result = $this->getTransient('update_core');
411 - $result['current_db_version'] = $this->settings->getOption('db_version');
412 - $result['latest_db_version'] = $wp_db_version;
413 - $result['wp_version'] = $wp_version;
414 -
415 - return $result;
416 - }
417 -
418 345 function getSiteInfo($args) {
419 346 $result = array();
420 347
421 348 if (array_key_exists('pre_refresh_get_options', $args)) {
@@ -430,15 +357,15 @@
430 357 if (array_key_exists('users', $args))
431 358 $result['users'] = $this->getUsersHandler($args['users']);
432 359
433 360 if (array_key_exists('plugins', $args))
434 - $result['plugins'] = $this->getPluginsHandler($args['plugins']);
361 + $result['plugins'] = $this->getPluginsHandler();
435 362
436 363 if (array_key_exists('themes', $args))
437 - $result['themes'] = $this->getThemesHandler($args['themes']);
364 + $result['themes'] = $this->getThemesHandler();
438 365
439 366 if (array_key_exists('core', $args))
440 - $result['core'] = $this->getCoreHandler();
367 + $result['core'] = $this->getTransient('update_core');
441 368
442 369 if (array_key_exists('sys', $args))
443 370 $result['sys'] = $this->getSystemInfo();
444 371
@@ -498,31 +425,8 @@
498 425
499 426 return $result;
500 427 }
501 428
502 - function getPluginFileData($plugin_file) {
503 - $result = array();
504 -
505 - if (!function_exists('get_plugin_data')) {
506 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
507 - }
508 - $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin_file);
509 - if ($plugin_data && isset($plugin_data['Version'])) {
510 - $result['version'] = $plugin_data['Version'];
511 - }
512 -
513 - return $result;
514 - }
515 -
516 - function fetchPluginApiData($slug, $action) {
517 - $args = array('slug' => wp_unslash($slug));
518 - $args = (object) $args;
519 - $args = apply_filters('plugins_api_args', $args, $action);
520 - $data = apply_filters('plugins_api', false, $action, $args);
521 -
522 - return $data;
523 - }
524 -
525 429 public function process($request) {
526 430 $db = $this->db;
527 431 $params = $request->params;
528 432 switch ($request->method) {
@@ -540,12 +444,8 @@
540 444 break;
541 445 case "gtsts":
542 446 $resp = $this->getStats();
543 447 break;
544 - case "gtdbvariables":
545 - $variable = (array_key_exists('variable', $params)) ? $params['variable'] : "";
546 - $resp = $this->db->showDbVariables($variable);
547 - break;
548 448 case "gtplgs":
549 449 $resp = $this->getPlugins();
550 450 break;
551 451 case "gtthms":
@@ -578,22 +478,16 @@
578 478 break;
579 479 case "gthost":
580 480 $resp = array('host_info' => $this->getHostInfo());
581 481 break;
582 - case "gtplsinfo":
583 - $resp = array("plugins_info" => array());
584 - $file_by_slug = $params["file_by_slug"];
585 - foreach ($params['slugs'] as $slug) {
586 - $data = $this->fetchPluginApiData($slug, $params['action']);
587 - if (is_object($data) && !property_exists($data, 'version') && isset($file_by_slug[$slug])) {
588 - $plugin_data = $this->getPluginFileData($file_by_slug[$slug]);
589 - $data->version = $plugin_data['version'];
590 - }
591 - $resp['plugins_info'][$slug] = $data;
592 - }
593 - break;
594 482 case "gtplinfo":
595 - $data = $this->fetchPluginApiData($params['slug'], $params['action']);
483 + $args = array(
484 + 'slug' => wp_unslash($params['slug'])
485 + );
486 + $action = $params['action'];
487 + $args = (object) $args;
488 + $args = apply_filters('plugins_api_args', $args, $action);
489 + $data = apply_filters('plugins_api', false, $action, $args);
596 490 $resp = array("plugins_info" => $data);
597 491 break;
598 492 case "gtpostactinfo":
599 493 $resp = $this->getPostActivateInfo($params);