PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | class/class-mainwp-wp-cli-command.php +17 -8 5.1 → 6.2.2 View file →
@@ -10,8 +10,13 @@
10 10 */
11 11
12 12 namespace MainWP\Dashboard;
13 13
14 +// Exit if accessed directly.
15 +if ( ! defined( 'ABSPATH' ) ) {
16 + exit;
17 +}
18 +
14 19 // Exit if access directly.
15 20 if ( ! defined( 'WP_CLI' ) ) {
16 21 return; // NOSONAR - jump to avoid CLI.
17 22 }
@@ -380,14 +385,16 @@
380 385
381 386 if ( is_array( $plugin_upgrades ) ) {
382 387 $ignored_plugins = json_decode( $website->ignored_plugins, true );
383 388 if ( is_array( $ignored_plugins ) ) {
384 - $plugin_upgrades = array_diff_key( $plugin_upgrades, $ignored_plugins );
389 + $plugin_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $plugin_upgrades, $ignored_plugins );
390 +
385 391 }
386 392
387 393 $ignored_plugins = json_decode( $userExtension->ignored_plugins, true );
388 394 if ( is_array( $ignored_plugins ) ) {
389 - $plugin_upgrades = array_diff_key( $plugin_upgrades, $ignored_plugins );
395 + $plugin_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $plugin_upgrades, $ignored_plugins );
396 +
390 397 }
391 398
392 399 $tmp = array();
393 400 foreach ( $plugin_upgrades as $plugin_upgrade ) {
@@ -545,14 +552,16 @@
545 552
546 553 if ( is_array( $plugin_upgrades ) ) {
547 554 $ignored_plugins = json_decode( $website->ignored_plugins, true );
548 555 if ( is_array( $ignored_plugins ) ) {
549 - $plugin_upgrades = array_diff_key( $plugin_upgrades, $ignored_plugins );
556 + $plugin_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $plugin_upgrades, $ignored_plugins );
557 +
550 558 }
551 559
552 560 $ignored_plugins = json_decode( $userExtension->ignored_plugins, true );
553 561 if ( is_array( $ignored_plugins ) ) {
554 - $plugin_upgrades = array_diff_key( $plugin_upgrades, $ignored_plugins );
562 + $plugin_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $plugin_upgrades, $ignored_plugins );
563 +
555 564 }
556 565
557 566 $tmp = array();
558 567 foreach ( $plugin_upgrades as $key => $plugin_upgrade ) {
@@ -651,14 +660,14 @@
651 660
652 661 if ( is_array( $theme_upgrades ) ) {
653 662 $ignored_themes = json_decode( $website->ignored_themes, true );
654 663 if ( is_array( $ignored_themes ) ) {
655 - $theme_upgrades = array_diff_key( $theme_upgrades, $ignored_themes );
664 + $theme_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $theme_upgrades, $ignored_themes );
656 665 }
657 666
658 667 $ignored_themes = json_decode( $userExtension->ignored_themes, true );
659 668 if ( is_array( $ignored_themes ) ) {
660 - $theme_upgrades = array_diff_key( $theme_upgrades, $ignored_themes );
669 + $theme_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $theme_upgrades, $ignored_themes );
661 670 }
662 671
663 672 $tmp = array();
664 673 foreach ( $theme_upgrades as $theme_upgrade ) {
@@ -817,14 +826,14 @@
817 826
818 827 if ( is_array( $theme_upgrades ) ) {
819 828 $ignored_themes = json_decode( $website->ignored_themes, true );
820 829 if ( is_array( $ignored_themes ) ) {
821 - $theme_upgrades = array_diff_key( $theme_upgrades, $ignored_themes );
830 + $theme_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $theme_upgrades, $ignored_themes );
822 831 }
823 832
824 833 $ignored_themes = json_decode( $userExtension->ignored_themes, true );
825 834 if ( is_array( $ignored_themes ) ) {
826 - $theme_upgrades = array_diff_key( $theme_upgrades, $ignored_themes );
835 + $theme_upgrades = MainWP_Common_Functions::instance()->get_not_ignored_updates_themesplugins( $theme_upgrades, $ignored_themes );
827 836 }
828 837
829 838 $tmp = array();
830 839 foreach ( $theme_upgrades as $key => $theme_upgrade ) {