Make WordPress Core

Changeset 48678


Ignore:
Timestamp:
07/28/2020 06:26:58 PM (5 years ago)
Author:
whyisjake
Message:

Upgrade/Install: Swap auto-update-supported to update-supported in update checks.

Ensures backwards compatability with external updaters.

See #50280.
Props everyone-in-the-core-updates-channel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r48669 r48678  
    204204            // Extra info if known. array_merge() ensures $plugin_data has precedence if keys collide.
    205205            if ( isset( $plugin_info->response[ $plugin_file ] ) ) {
    206                 $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], array( 'auto-update-supported' => true ), $plugin_data );
     206                $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], array( 'update-supported' => true ), $plugin_data );
    207207            } elseif ( isset( $plugin_info->no_update[ $plugin_file ] ) ) {
    208                 $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], array( 'auto-update-supported' => true ), $plugin_data );
    209             } elseif ( empty( $plugin_data['auto-update-supported'] ) ) {
    210                 $plugin_data['auto-update-supported'] = false;
     208                $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], array( 'update-supported' => true ), $plugin_data );
     209            } elseif ( empty( $plugin_data['update-supported'] ) ) {
     210                $plugin_data['update-supported'] = false;
    211211            }
    212212
     
    10951095                        $action     = 'unavailable';
    10961096                        $time_class = ' hidden';
    1097                     } elseif ( ! $plugin_data['auto-update-supported'] ) {
     1097                    } elseif ( ! $plugin_data['update-supported'] ) {
    10981098                        $text       = '';
    10991099                        $action     = 'unavailable';
Note: See TracChangeset for help on using the changeset viewer.