diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
index 3d7778863a..a9e329c362 100644
a
|
b
|
function list_plugin_updates() { |
294 | 294 | $compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version ); |
295 | 295 | } |
296 | 296 | } |
| 297 | |
| 298 | $compatible_php = ( empty( $plugin_data->update->requires_php ) || version_compare( phpversion(), $plugin_data->update->requires_php, '>=' ) ); |
| 299 | |
| 300 | if ( ! $compatible_php && current_user_can( 'update_php' ) ) { |
| 301 | $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' '; |
| 302 | /* translators: %s: Update PHP page URL */ |
| 303 | $compat .= sprintf( |
| 304 | __( '<a href="%s">Learn more about updating PHP.</a>' ), |
| 305 | esc_url( wp_get_update_php_url() ) |
| 306 | ); |
| 307 | $compat .= '<br><span class="description">' . wp_get_update_php_annotation() . '</span>'; |
| 308 | } |
| 309 | |
297 | 310 | // Get the upgrade notice for the new plugin version. |
298 | 311 | if ( isset( $plugin_data->update->upgrade_notice ) ) { |
299 | 312 | $upgrade_notice = '<br />' . strip_tags( $plugin_data->update->upgrade_notice ); |
… |
… |
function list_plugin_updates() { |
315 | 328 | ?> |
316 | 329 | <tr> |
317 | 330 | <td class="check-column"> |
| 331 | <?php if ( $compatible_php ) : ?> |
318 | 332 | <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" /> |
319 | 333 | <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> |
320 | 334 | <?php |
321 | 335 | /* translators: %s: plugin name */ |
322 | 336 | printf( |
323 | 337 | __( 'Select %s' ), |
324 | | $plugin_data->Name |
| 338 | esc_attr( $plugin_data->Name ) |
325 | 339 | ); |
326 | 340 | ?> |
327 | 341 | </label> |
| 342 | <?php endif; ?> |
328 | 343 | </td> |
329 | 344 | <td class="plugin-title"><p> |
330 | | <?php echo $icon; ?> |
331 | | <strong><?php echo $plugin_data->Name; ?></strong> |
| 345 | <?php echo $icon; ?> |
| 346 | <strong><?php echo esc_html( $plugin_data->Name ); ?></strong> |
332 | 347 | <?php |
333 | 348 | /* translators: 1: plugin version, 2: new version */ |
334 | 349 | printf( |
335 | 350 | __( 'You have version %1$s installed. Update to %2$s.' ), |
336 | | $plugin_data->Version, |
337 | | $plugin_data->update->new_version |
| 351 | esc_attr( $plugin_data->Version ), |
| 352 | esc_attr( $plugin_data->update->new_version ) |
338 | 353 | ); |
339 | | echo ' ' . $details . $compat . $upgrade_notice; |
| 354 | echo ' ' . $details . $compat . $upgrade_notice; |
340 | 355 | ?> |
341 | 356 | </p></td> |
342 | 357 | </tr> |
343 | | <?php |
| 358 | <?php |
344 | 359 | } |
345 | 360 | ?> |
346 | 361 | </tbody> |