Make WordPress Core

Ticket #59022: 59022.diff

File 59022.diff, 873 bytes (added by hiteshtalpada, 20 months ago)
  • src/wp-admin/plugins.php

    diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php
    index 164467952f..d8bb36ec63 100644
    a b if ( $action ) { 
    485485                                $plugins = (array) wp_unslash( $_POST['checked'] );
    486486
    487487                                if ( 'enable-auto-update-selected' === $action ) {
    488                                         $new_auto_updates = array_merge( $auto_updates, $plugins );
    489                                         $new_auto_updates = array_unique( $new_auto_updates );
     488                                        $new_auto_updates = array_diff( $auto_updates, $plugins );
    490489                                        $query_args       = array( 'enabled-auto-update-multi' => 'true' );
    491490                                } else {
    492                                         $new_auto_updates = array_diff( $auto_updates, $plugins );
     491                                        $new_auto_updates = array_merge( $auto_updates, $plugins );
     492                                        $new_auto_updates = array_unique( $new_auto_updates );
    493493                                        $query_args       = array( 'disabled-auto-update-multi' => 'true' );
    494494                                }
    495495