PluginProbe
The WP Remote WordPress Plugin / 4.81
The WP Remote WordPress Plugin v4.81
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/manage.php +43 -402 5.684.81 View file →
@@ -4,15 +4,13 @@
4 4 if (!class_exists('BVManageCallback')) :
5 5 class BVManageCallback extends BVCallbackBase {
6 6 public $settings;
7 7 public $skin;
8 - public $bvinfo;
9 8
10 - const MANAGE_WING_VERSION = 1.6;
9 + const MANAGE_WING_VERSION = 1.0;
11 10
12 11 public function __construct($callback_handler) {
13 12 $this->settings = $callback_handler->settings;
14 - $this->bvinfo = new WPRInfo($this->settings);
15 13 }
16 14
17 15 function getError($err) {
18 16 return $this->objectToArray($err);
@@ -41,11 +39,10 @@
41 39 @include_once ABSPATH.'wp-admin/includes/misc.php';
42 40 @include_once ABSPATH.'wp-admin/includes/template.php';
43 41 @include_once ABSPATH.'wp-includes/pluggable.php';
44 42 @include_once ABSPATH.'wp-admin/includes/class-wp-upgrader.php';
45 - @include_once ABSPATH.'wp-admin/includes/class-theme-upgrader.php';
46 - @include_once ABSPATH.'wp-admin/includes/class-plugin-upgrader.php';
47 43 @include_once ABSPATH.'wp-admin/includes/user.php';
44 + @include_once ABSPATH.'wp-includes/registration.php';
48 45 @include_once ABSPATH.'wp-admin/includes/upgrade.php';
49 46 @include_once ABSPATH.'wp-admin/includes/update.php';
50 47 @require_once ABSPATH.'wp-admin/includes/update-core.php';
51 48 }
@@ -188,16 +185,11 @@
188 185 return array('status' => "Error", 'message' => $this->getError($result));
189 186 }
190 187 }
191 188
192 - function upgrade($params = null, $has_bv_skin = false, $bv_bulk_upgrade = false) {
189 + function upgrade($params = null, $has_bv_skin = false) {
193 190 $result = array();
194 191 $premium_upgrades = array();
195 - if (array_key_exists('clear_filters', $params)) {
196 - $filters = $params['clear_filters'];
197 - foreach ($filters as $filter)
198 - remove_all_filters($filter);
199 - }
200 192 if (array_key_exists('core', $params) && !empty($params['core'])) {
201 193 $result['core'] = $this->upgradeCore($params['core']);
202 194 }
203 195 if (array_key_exists('translations', $params) && !empty($params['translations'])) {
@@ -203,12 +195,24 @@
203 195 if (array_key_exists('translations', $params) && !empty($params['translations'])) {
204 196 $result['translations'] = $this->upgradeTranslations($params['translations'], $has_bv_skin);
205 197 }
206 198 if (array_key_exists('plugins', $params) && !empty($params['plugins'])) {
207 - $result['plugins'] = $this->upgradePlugins($params['plugins'], $has_bv_skin, $bv_bulk_upgrade);
199 + $files = array();
200 + foreach ($params['plugins'] as $plugin) {
201 + $files[] = $plugin['file'];
202 + }
203 + if (!empty($files)) {
204 + $result['plugins'] = $this->upgradePlugins($files, $has_bv_skin);
205 + }
208 206 }
209 207 if (array_key_exists('themes', $params) && !empty($params['themes'])) {
210 - $result['themes'] = $this->upgradeThemes($params['themes'], $has_bv_skin, $bv_bulk_upgrade);
208 + $stylesheets = array();
209 + foreach ($params['themes'] as $theme) {
210 + $stylesheets[] = $theme['stylesheet'];
211 + }
212 + if (!empty($stylesheets)) {
213 + $result['themes'] = $this->upgradeThemes($stylesheets, $has_bv_skin);
214 + }
211 215 }
212 216 return $result;
213 217 }
214 218
@@ -340,214 +344,34 @@
340 344 }
341 345 }
342 346 }
343 347
344 - function bv_plugin_bulk_upgrade($upgrader, $_plugins) {
345 - $plugins = array_keys($_plugins);
346 - $args = array();
347 - $defaults = array(
348 - 'clear_update_cache' => true,
349 - );
350 - $parsed_args = wp_parse_args($args, $defaults);
351 - $upgrader->init();
352 - $upgrader->bulk = true;
353 - $upgrader->upgrade_strings();
354 - add_filter('upgrader_clear_destination', array($upgrader, 'delete_old_plugin'), 10, 4);
355 - $upgrader->skin->header();
356 - $res = $upgrader->fs_connect(array(WP_CONTENT_DIR, WP_PLUGIN_DIR));
357 - if (!$res) {
358 - $upgrader->skin->footer();
359 - return false;
360 - }
361 - $upgrader->skin->bulk_header();
362 - $maintenance = (is_multisite() && ! empty($plugins));
363 - foreach ($plugins as $plugin) {
364 - $maintenance = $maintenance || (is_plugin_active($plugin));
365 - }
366 - if ($maintenance) {
367 - $upgrader->maintenance_mode(true);
368 - }
369 - $results = array();
370 - $upgrader->update_count = count($plugins);
371 - $upgrader->update_current = 0;
372 - foreach($plugins as $plugin) {
373 - $upgrader->update_current++;
374 - $upgrader->skin->plugin_info = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin, false, true);
375 - $upgrader->skin->plugin_active = is_plugin_active($plugin);
376 - $result = $upgrader->run(
377 - array(
378 - 'package' => $_plugins[$plugin],
379 - 'destination' => WP_PLUGIN_DIR,
380 - 'clear_destination' => true,
381 - 'clear_working' => true,
382 - 'is_multi' => true,
383 - 'hook_extra' => array(
384 - 'plugin' => $plugin,
385 - ),
386 - )
387 - );
388 - $results[$plugin] = $result;
389 - if (false === $result) {
390 - break;
391 - }
392 - }
393 - $upgrader->maintenance_mode(false);
394 - wp_clean_plugins_cache($parsed_args['clear_update_cache']);
395 - do_action(
396 - 'upgrader_process_complete',
397 - $upgrader,
398 - array(
399 - 'action' => 'update',
400 - 'type' => 'plugin',
401 - 'bulk' => true,
402 - 'plugins' => $plugins,
403 - )
404 - );
405 - $upgrader->skin->bulk_footer();
406 - $upgrader->skin->footer();
407 - remove_filter('upgrader_clear_destination', array($upgrader, 'delete_old_plugin'));
408 - $past_failure_emails = get_option('auto_plugin_theme_update_emails', array());
409 - foreach ($results as $plugin => $result) {
410 - if (!$result || is_wp_error($result) || !isset($past_failure_emails[$plugin])) {
411 - continue;
412 - }
413 - unset($past_failure_emails[$plugin]);
414 - }
415 - update_option('auto_plugin_theme_update_emails', $past_failure_emails);
416 - return $results;
417 - }
418 -
419 - function upgradePlugins($plugins, $has_bv_skin = false, $bv_bulk_upgrade = false) {
348 + function upgradePlugins($plugins, $has_bv_skin = false) {
420 349 $result = array();
421 - $_plugins = array();
422 - $plugins_by_name = array();
423 - foreach ($plugins as $plugin) {
424 - $_plugins[$plugin['file']] = $plugin['package'];
425 - $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin['file'], false, true);
426 - $plugins_by_name[$plugin_data['Name']] = $plugin['file'];
427 - }
428 - if (empty(array_keys($_plugins))) {
429 - return $result;
430 - }
431 350 if (class_exists('Plugin_Upgrader')) {
432 351 if ($has_bv_skin) {
433 352 require_once( "bv_upgrader_skin.php" );
434 - $skin = new BVUpgraderSkin("plugin_upgrade", $plugins_by_name);
353 + $skin = new BVUpgraderSkin("plugin_upgrade");
435 354 $this->skin = $skin;
436 355 } else {
437 356 $skin = new Bulk_Plugin_Upgrader_Skin();
438 357 }
439 358 $upgrader = new Plugin_Upgrader($skin);
440 -
441 - if ($bv_bulk_upgrade) {
442 - $result = $this->bv_plugin_bulk_upgrade($upgrader, $_plugins);
443 - } else {
444 - $result = $upgrader->bulk_upgrade(array_keys($_plugins));
445 - }
446 - foreach (array_keys($_plugins) as $file) {
447 - if (!array_key_exists($file, $result)) {
359 + $result = $upgrader->bulk_upgrade($plugins);
360 + }
361 + foreach($plugins as $file) {
362 + $res = $result[$file];
363 + if (!$res || is_wp_error($res)) {
448 364 $result[$file] = array('status' => "Error");
449 365 } else {
450 - $res = $result[$file];
451 - if (!$res || is_wp_error($res)) {
452 - $result[$file] = array('status' => "Error");
453 - } else {
454 - $result[$file] = array('status' => "Done");
455 - }
366 + $result[$file] = array('status' => "Done");
456 367 }
457 - }
458 368 }
459 369 return $result;
460 370 }
461 371
462 - function bv_theme_bulk_upgrade($upgrader, $_themes) {
463 - $themes = array_keys($_themes);
464 - $args = array();
465 - $defaults = array(
466 - 'clear_update_cache' => true,
467 - );
468 - $parsed_args = wp_parse_args($args, $defaults);
469 - $upgrader->init();
470 - $upgrader->bulk = true;
471 - $upgrader->upgrade_strings();
472 - add_filter('upgrader_pre_install', array($upgrader, 'current_before'), 10, 2);
473 - add_filter('upgrader_post_install', array( $upgrader, 'current_after'), 10, 2);
474 - add_filter('upgrader_clear_destination', array($upgrader, 'delete_old_theme'), 10, 4);
475 - $upgrader->skin->header();
476 - $res = $upgrader->fs_connect(array(WP_CONTENT_DIR));
477 - if (!$res) {
478 - $upgrader->skin->footer();
479 - return false;
480 - }
481 - $upgrader->skin->bulk_header();
482 - $maintenance = (is_multisite() && !empty($themes));
483 - foreach ($themes as $theme) {
484 - $maintenance = $maintenance || get_stylesheet() === $theme || get_template() === $theme;
485 - }
486 - if ($maintenance) {
487 - $upgrader->maintenance_mode(true);
488 - }
489 - $results = array();
490 - $upgrader->update_count = count($themes);
491 - $upgrader->update_current = 0;
492 - foreach ($themes as $theme) {
493 - $upgrader->update_current++;
494 - $upgrader->skin->theme_info = $upgrader->theme_info($theme);
495 - $result = $upgrader->run(
496 - array(
497 - 'package' => $_themes[$theme],
498 - 'destination' => get_theme_root($theme),
499 - 'clear_destination' => true,
500 - 'clear_working' => true,
501 - 'is_multi' => true,
502 - 'hook_extra' => array(
503 - 'theme' => $theme,
504 - ),
505 - )
506 - );
507 -
508 - $results[$theme] = $result;
509 - if (false === $result) {
510 - break;
511 - }
512 - }
513 - $upgrader->maintenance_mode(false);
514 - wp_clean_themes_cache($parsed_args['clear_update_cache']);
515 - do_action(
516 - 'upgrader_process_complete',
517 - $upgrader,
518 - array(
519 - 'action' => 'update',
520 - 'type' => 'theme',
521 - 'bulk' => true,
522 - 'themes' => $themes,
523 - )
524 - );
525 - $upgrader->skin->bulk_footer();
526 - $upgrader->skin->footer();
527 - remove_filter('upgrader_pre_install', array($upgrader, 'current_before'));
528 - remove_filter('upgrader_post_install', array($upgrader, 'current_after'));
529 - remove_filter('upgrader_clear_destination', array($upgrader, 'delete_old_theme'));
530 - $past_failure_emails = get_option('auto_plugin_theme_update_emails', array());
531 - foreach ($results as $theme => $result) {
532 - if (!$result || is_wp_error($result) || !isset($past_failure_emails[$theme])) {
533 - continue;
534 - }
535 - unset($past_failure_emails[$theme]);
536 - }
537 - update_option('auto_plugin_theme_update_emails', $past_failure_emails);
538 - return $results;
539 - }
540 -
541 - function upgradeThemes($themes, $has_bv_skin = false, $bv_bulk_upgrade = false) {
372 + function upgradeThemes($themes, $has_bv_skin = false) {
542 373 $result = array();
543 - $_themes = array();
544 - foreach ($themes as $theme) {
545 - $_themes[$theme['stylesheet']] = $theme['package'];
546 - }
547 - if (empty(array_keys($_themes))) {
548 - return $result;
549 - }
550 374 if (class_exists('Theme_Upgrader')) {
551 375 if ($has_bv_skin) {
552 376 require_once( "bv_upgrader_skin.php" );
553 377 $skin = new BVUpgraderSkin("theme_upgrade");
@@ -555,29 +379,21 @@
555 379 } else {
556 380 $skin = new Bulk_Theme_Upgrader_Skin();
557 381 }
558 382 $upgrader = new Theme_Upgrader($skin);
559 - if ($bv_bulk_upgrade) {
560 - $result = $this->bv_theme_bulk_upgrade($upgrader, $_themes);
383 + $result = $upgrader->bulk_upgrade($themes);
384 + }
385 + foreach($themes as $stylesheet) {
386 + $res = $result[$stylesheet];
387 + if (!$res || is_wp_error($res)) {
388 + $result[$stylesheet] = array('status' => "Error");
561 389 } else {
562 - $result = $upgrader->bulk_upgrade(array_keys($_themes));
390 + $result[$stylesheet] = array('status' => "Done");
563 391 }
564 - foreach (array_keys($_themes) as $stylesheet) {
565 - if (!array_key_exists($stylesheet, $result)) {
566 - $result[$stylesheet] = array('status' => "Error");
567 - } else {
568 - $res = $result[$stylesheet];
569 - if (!$res || is_wp_error($res)) {
570 - $result[$stylesheet] = array('status' => "Error");
571 - } else {
572 - $result[$stylesheet] = array('status' => "Done");
573 - }
574 - }
575 - }
576 392 }
577 393 return $result;
578 394 }
579 -
395 +
580 396 function install($params, $has_bv_skin = false) {
581 397 $result = array();
582 398 if (isset($params['plugins'])) {
583 399 foreach ($params['plugins'] as $plugin) {
@@ -583,9 +399,9 @@
583 399 foreach ($params['plugins'] as $plugin) {
584 400 if (!array_key_exists('plugins', $result))
585 401 $result["plugins"] = array();
586 402 $plugin['dest'] = WP_PLUGIN_DIR;
587 - $res = $this->installPackage("plugin", $plugin, $has_bv_skin);
403 + $res = $this->installPackage($plugin, $has_bv_skin);
588 404 $pluginName = $plugin['package'];
589 405 $result["plugins"][$pluginName] = $res;
590 406 }
591 407 }
@@ -593,9 +409,9 @@
593 409 foreach ($params['themes'] as $theme) {
594 410 if (!array_key_exists('themes', $result))
595 411 $result["themes"] = array();
596 412 $theme['dest'] = WP_CONTENT_DIR.'/themes';
597 - $res = $this->installPackage("theme", $theme, $has_bv_skin);
413 + $res = $this->installPackage($theme, $has_bv_skin);
598 414 $themeName = $theme['package'];
599 415 $result["themes"][$themeName] = $res;
600 416 }
601 417 }
@@ -601,9 +417,9 @@
601 417 }
602 418 return $result;
603 419 }
604 420
605 - function installPackage($type, $params, $has_bv_skin = false) {
421 + function installPackage($params, $has_bv_skin = false) {
606 422 global $wp_filesystem;
607 423
608 424 if (!isset($params['package']) || empty($params['package'])) {
609 425 return array('status' => "Error", 'message' => "No package is sent");
@@ -608,31 +424,24 @@
608 424 if (!isset($params['package']) || empty($params['package'])) {
609 425 return array('status' => "Error", 'message' => "No package is sent");
610 426 }
611 427 $valid_domain_regex = "/^(http|https):\/\/[\-\w]*\.(blogvault\.net|w\.org|wp\.org|wordpress\.org)\//";
612 - if (WPRHelper::safePregMatch($valid_domain_regex, $params['package']) !== 1) {
428 + if (preg_match($valid_domain_regex, $params['package']) !== 1) {
613 429 return array('status' => "Error", 'message' => "Invalid package domain");
614 430 }
615 431 if ($has_bv_skin) {
616 432 require_once( "bv_upgrader_skin.php" );
617 - $skin = new BVUpgraderSkin("installer", array(), $params['package']);
433 + $skin = new BVUpgraderSkin("installer", $params['package']);
618 434 $this->skin = $skin;
619 435 } else {
620 436 $skin = new WP_Upgrader_Skin();
621 437 }
622 - if ("plugin" === $type) {
623 - $upgrader = new Plugin_Upgrader($skin);
624 - } elseif ("theme" === $type) {
625 - $upgrader = new Theme_Upgrader($skin);
626 - } else {
627 - $upgrader = new WP_Upgrader($skin);
628 - }
438 + $upgrader = new WP_Upgrader($skin);
629 439 $upgrader->init();
630 440 $destination = $params['dest'];
631 441 $clear_destination = isset($params['cleardest']) ? $params['cleardest'] : false;
632 442 $package_url = $params['package'];
633 443 $key = basename($package_url);
634 - add_filter('upgrader_source_selection', array($upgrader, 'check_package'));
635 444 $res = $upgrader->run(
636 445 array(
637 446 'package' => $package_url,
638 447 'destination' => $destination,
@@ -637,15 +446,11 @@
637 446 'package' => $package_url,
638 447 'destination' => $destination,
639 448 'clear_destination' => $clear_destination,
640 449 'clear_working' => true,
641 - 'hook_extra' => array(
642 - "type" => $type,
643 - "action" => "install"
644 - ),
450 + 'hook_extra' => array(),
645 451 )
646 452 );
647 - remove_filter('upgrader_source_selection', array($upgrader, 'check_package'));
648 453 if (is_wp_error($res)) {
649 454 $res = array('status' => "Error", 'message' => $this->getError($res));
650 455 } else {
651 456 $res = array( 'status' => "Done");
@@ -677,141 +482,12 @@
677 482 exit;
678 483 }
679 484 }
680 485
681 - public function refreshPluginUpdates() {
682 - global $wp_current_filter;
683 - $wp_current_filter[] = 'load-update-core.php';
684 -
685 - wp_update_plugins();
686 -
687 - array_pop($wp_current_filter);
688 -
689 - wp_update_plugins();
690 -
691 - return true;
692 - }
693 -
694 - public function refreshThemeUpdates() {
695 - global $wp_current_filter;
696 - $wp_current_filter[] = 'load-update-core.php';
697 -
698 - wp_update_themes();
699 -
700 - array_pop($wp_current_filter);
701 -
702 - wp_update_themes();
703 -
704 - return true;
705 - }
706 -
707 - function upgradeElementorDB($file) {
708 - try {
709 - $managerClass = $file === "elementor/elementor.php" ? '\Elementor\Core\Upgrade\Manager' : '\ElementorPro\Core\Upgrade\Manager';
710 -
711 - if (!class_exists($managerClass)) {
712 - return array('status' => 'Error', 'error' => 'Elementor plugin not found or disabled', 'source' => 'BV');
713 - }
714 -
715 - $manager = new $managerClass();
716 - $required_methods = array('get_task_runner', 'should_upgrade', 'on_runner_complete',
717 - 'get_current_version', 'get_new_version');
718 - foreach ($required_methods as $method) {
719 - if (!method_exists($manager, $method)) {
720 - return array('status' => 'Error', 'error' => 'Required methods are missing', 'source' => 'BV');
721 - }
722 - }
723 -
724 - $updateInfo = array(
725 - 'from' => $manager->get_current_version(),
726 - 'to' => $manager->get_new_version(),
727 - );
728 -
729 - if ($manager->should_upgrade()) {
730 - $callbacks = $manager->get_upgrade_callbacks();
731 -
732 - if (!empty($callbacks)) {
733 - $manager->get_task_runner()->handle_immediately($callbacks);
734 - $manager->on_runner_complete(true);
735 - }
736 - } else {
737 - return array('status' => 'Error', 'error' => 'Database Update is not available currently',
738 - 'update_info' => $updateInfo, 'source' => 'BV');
739 - }
740 -
741 - return array('status' => 'Done', 'update_info' => $updateInfo);
742 - } catch (Exception $e) {
743 - return array('status' => 'Error', 'error' => $e->getMessage());
744 - }
745 - }
746 -
747 - function upgradeWoocommerceDb() {
748 - try {
749 - if (!defined('WC_ABSPATH')) {
750 - return array('status' => 'Error', 'error' => 'WC not found', 'source' => 'BV');
751 - }
752 -
753 - if (file_exists(WC_ABSPATH . 'includes/class-wc-install.php')) {
754 - include_once WC_ABSPATH . 'includes/class-wc-install.php';
755 - }
756 -
757 - if (file_exists(WC_ABSPATH . 'includes/wc-update-functions.php')) {
758 - include_once WC_ABSPATH . 'includes/wc-update-functions.php';
759 - }
760 -
761 - if (!class_exists('WC_Install') || !method_exists('WC_Install', 'needs_db_update') ||
762 - !method_exists('WC_Install', 'get_db_update_callbacks')) {
763 - return array('status' => 'Error', 'error' => 'WC files missing or corrupted', 'source' => 'BV');
764 - }
765 -
766 - $current_db_version = $this->settings->getOption('woocommerce_db_version');
767 - if (!$current_db_version) {
768 - return array('status' => 'Error', 'error' => 'Current WC DB version not available', 'source' => 'BV');
769 - }
770 -
771 - $latest_db_version = $this->bvinfo->getLatestWooCommerceDBVersion();
772 - if ($current_db_version >= $latest_db_version) {
773 - return array('status' => 'Error', 'error' => 'WC DB update not available', 'source' => 'BV');
774 - }
775 -
776 - $db_update_callbacks = WC_Install::get_db_update_callbacks();
777 -
778 - $loop = 0;
779 - foreach ($db_update_callbacks as $version => $update_callbacks) {
780 - if (version_compare($current_db_version, $version, '<')) {
781 - foreach ($update_callbacks as $update_callback) {
782 - WC()->queue()->schedule_single(
783 - time() + $loop,
784 - 'woocommerce_run_update_callback',
785 - array('update_callback' => $update_callback),
786 - 'woocommerce-db-updates'
787 - );
788 - $loop++;
789 - }
790 - }
791 - }
792 -
793 - $current_wc_version = WC()->version;
794 - if (version_compare($current_db_version, $current_wc_version, '<') &&
795 - !WC()->queue()->get_next('woocommerce_update_db_to_current_version')) {
796 - WC()->queue()->schedule_single(
797 - time() + $loop,
798 - 'woocommerce_update_db_to_current_version',
799 - array('version' => $current_wc_version),
800 - 'woocommerce-db-updates'
801 - );
802 - }
803 -
804 - return array('status' => 'Done');
805 - } catch (Exception $e) {
806 - return array('status' => 'Error', 'error' => $e->getMessage());
807 - }
808 - }
809 -
810 486 function upgrade_db(){
811 487 if (function_exists('wp_upgrade')) {
812 488 wp_upgrade();
813 - return "Done";
489 + return "DONE";
814 490 } else {
815 491 return "NOUPGRADERFUNCTION";
816 492 }
817 493 }
@@ -831,28 +507,10 @@
831 507 $resp = array("adduser" => $this->addUser($params['args']));
832 508 break;
833 509 case "upgrde":
834 510 $has_bv_skin = array_key_exists('bvskin', $params);
835 - $bv_bulk_upgrade = array_key_exists('bv_bulk_update', $params['args']);
836 - $resp = array("upgrades" => $this->upgrade($params['args'], $has_bv_skin, $bv_bulk_upgrade));
511 + $resp = array("upgrades" => $this->upgrade($params['args'], $has_bv_skin));
837 512 break;
838 - case "cmbneupgrde":
839 - $args = $params['args'];
840 - $has_bv_skin = array_key_exists('bvskin', $args);
841 - $bv_bulk_upgrade = array_key_exists('bv_bulk_update', $args);
842 -
843 - $resp['upgrades'] = $this->upgrade($args['upgrades'], $has_bv_skin, $bv_bulk_upgrade);
844 -
845 - if (isset($args['delete_transient'])) {
846 - $resp['delete_transient'] = $this->settings->deleteTransient($args['delete_transient']);
847 - }
848 - if (isset($args['wp_update_plugins'])) {
849 - $resp['wp_update_plugins'] = $this->refreshPluginUpdates();
850 - }
851 - if (isset($args['wp_update_themes'])) {
852 - $resp['wp_update_themes'] = $this->refreshThemeUpdates();
853 - }
854 - break;
855 513 case "edt":
856 514 $resp = array("edit" => $this->edit($params['args']));
857 515 break;
858 516 case "instl":
@@ -875,25 +533,8 @@
875 533 $resp = array("autologin" => $this->autoLogin($params['username'], $isHttps));
876 534 break;
877 535 case "updatedb":
878 536 $resp = array("status" => $this->upgrade_db());
879 - break;
880 - case "updateplgndb":
881 - $resp = array();
882 - $files = $params['files'];
883 -
884 - foreach ($files as $file) {
885 - switch ($file) {
886 - case "woocommerce/woocommerce.php":
887 - $resp[$file] = $this->upgradeWoocommerceDb();
888 - break;
889 - case "elementor/elementor.php":
890 - case "elementor-pro/elementor-pro.php":
891 - $resp[$file] = $this->upgradeElementorDB($file);
892 - break;
893 - }
894 - }
895 -
896 537 break;
897 538 default:
898 539 $resp = false;
899 540 }