Ticket #50280: 50280.5.diff
File 50280.5.diff, 1.7 KB (added by , 4 years ago) |
---|
-
src/wp-admin/includes/class-wp-plugins-list-table.php
203 203 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 204 204 // Extra info if known. array_merge() ensures $plugin_data has precedence if keys collide. 205 205 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 ); 207 207 } 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; 211 211 } 212 212 213 213 /* … … 1094 1094 } 1095 1095 $action = 'unavailable'; 1096 1096 $time_class = ' hidden'; 1097 } elseif ( ! $plugin_data[' auto-update-supported'] ) {1097 } elseif ( ! $plugin_data['update-supported'] ) { 1098 1098 $text = ''; 1099 1099 $action = 'unavailable'; 1100 1100 $time_class = ' hidden';