diff --git src/wp-admin/update-core.php src/wp-admin/update-core.php
index 61527bfc82..81c9793ffe 100644
|
|
foreach ( (array) $plugins as $plugin_file => $plugin_data ) { |
287 | 287 | $compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version ); |
288 | 288 | } |
289 | 289 | } |
| 290 | |
| 291 | $compatible_php = ( empty( $plugin_data->update->requires_php ) || version_compare( substr( PHP_VERSION, 0, strlen( $plugin_data->update->requires_php ) ), $plugin_data->update->requires_php, '>=' ) ); |
| 292 | |
| 293 | if ( ! $compatible_php ) { |
| 294 | $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' '; |
| 295 | /* translators: %s: Updating PHP page URL */ |
| 296 | $compat .= sprintf( |
| 297 | __( '<a href="%s">Learn more about updating PHP.</a>' ), |
| 298 | esc_url( __( 'https://wordpress.org/support/upgrade-php/' ) ) |
| 299 | ); |
| 300 | } |
| 301 | |
290 | 302 | // Get the upgrade notice for the new plugin version. |
291 | 303 | if ( isset( $plugin_data->update->upgrade_notice ) ) { |
292 | 304 | $upgrade_notice = '<br />' . strip_tags( $plugin_data->update->upgrade_notice ); |
… |
… |
foreach ( (array) $plugins as $plugin_file => $plugin_data ) { |
308 | 320 | ?> |
309 | 321 | <tr> |
310 | 322 | <td class="check-column"> |
| 323 | <?php if ( $compatible_php ) : ?> |
311 | 324 | <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" /> |
312 | 325 | <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> |
313 | | <?php |
314 | | /* translators: %s: plugin name */ |
315 | | printf( |
316 | | __( 'Select %s' ), |
317 | | $plugin_data->Name |
318 | | ); |
| 326 | <?php |
| 327 | /* translators: %s: plugin name */ |
| 328 | echo esc_html( sprintf( |
| 329 | __( 'Select %s' ), |
| 330 | $plugin_data->Name |
| 331 | ) ); |
319 | 332 | ?> |
320 | 333 | </label> |
321 | | </td> |
322 | | <td class="plugin-title"><p> |
323 | | <?php echo $icon; ?> |
324 | | <strong><?php echo $plugin_data->Name; ?></strong> |
325 | | <?php |
326 | | /* translators: 1: plugin version, 2: new version */ |
327 | | printf( |
328 | | __( 'You have version %1$s installed. Update to %2$s.' ), |
329 | | $plugin_data->Version, |
330 | | $plugin_data->update->new_version |
331 | | ); |
332 | | echo ' ' . $details . $compat . $upgrade_notice; |
| 334 | <?php endif; ?> |
| 335 | </td> |
| 336 | <td class="plugin-title"><p> |
| 337 | <?php echo $icon; ?> |
| 338 | <strong><?php echo esc_html( $plugin_data->Name ); ?></strong> |
| 339 | <?php |
| 340 | /* translators: 1: plugin version, 2: new version */ |
| 341 | echo esc_html( sprintf( |
| 342 | __( 'You have version %1$s installed. Update to %2$s.' ), |
| 343 | $plugin_data->Version, |
| 344 | $plugin_data->update->new_version |
| 345 | ) ); |
| 346 | echo esc_html( ' ' . $details . $compat . $upgrade_notice ); |
333 | 347 | ?> |
334 | | </p></td> |
335 | | </tr> |
336 | | <?php |
| 348 | </p></td> |
| 349 | </tr> |
| 350 | <?php |
337 | 351 | } |
338 | 352 | ?> |
339 | 353 | </tbody> |