Changeset 48654
- Timestamp:
- 07/28/2020 01:00:40 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r48589 r48654 410 410 <tr> 411 411 <td class="check-column"> 412 <?php if ( $compatible_php ) : ?>413 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />414 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text">415 <?php416 /* translators: %s: Plugin name. */417 printf( __( 'Select %s' ), $plugin_data->Name );418 ?>419 </label>420 <?php endif; ?>412 <?php if ( $compatible_php ) : ?> 413 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" /> 414 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> 415 <?php 416 /* translators: %s: Plugin name. */ 417 printf( __( 'Select %s' ), $plugin_data->Name ); 418 ?> 419 </label> 420 <?php endif; ?> 421 421 </td> 422 422 <td class="plugin-title"><p> … … 430 430 $plugin_data->update->new_version 431 431 ); 432 432 433 echo ' ' . $details . $compat . $upgrade_notice; 434 433 435 if ( in_array( $plugin_file, $auto_updates, true ) ) { 434 436 echo $auto_update_notice; … … 437 439 </p></td> 438 440 </tr> 439 <?php441 <?php 440 442 } 441 443 ?> … … 500 502 501 503 foreach ( $themes as $stylesheet => $theme ) { 504 $requires_wp = isset( $theme->update['requires'] ) ? $theme->update['requires'] : null; 505 $requires_php = isset( $theme->update['requires_php'] ) ? $theme->update['requires_php'] : null; 506 507 $compatible_wp = is_wp_version_compatible( $requires_wp ); 508 $compatible_php = is_php_version_compatible( $requires_php ); 509 510 $compat = ''; 511 512 if ( ! $compatible_wp && ! $compatible_php ) { 513 $compat .= '<br>' . __( 'This update doesn’t work with your versions of WordPress and PHP.' ) . ' '; 514 if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { 515 $compat .= sprintf( 516 /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ 517 __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), 518 self_admin_url( 'update-core.php' ), 519 esc_url( wp_get_update_php_url() ) 520 ); 521 522 $annotation = wp_get_update_php_annotation(); 523 524 if ( $annotation ) { 525 $compat .= '</p><p><em>' . $annotation . '</em>'; 526 } 527 } elseif ( current_user_can( 'update_core' ) ) { 528 $compat .= sprintf( 529 /* translators: %s: URL to WordPress Updates screen. */ 530 __( '<a href="%s">Please update WordPress</a>.' ), 531 self_admin_url( 'update-core.php' ) 532 ); 533 } elseif ( current_user_can( 'update_php' ) ) { 534 $compat .= sprintf( 535 /* translators: %s: URL to Update PHP page. */ 536 __( '<a href="%s">Learn more about updating PHP</a>.' ), 537 esc_url( wp_get_update_php_url() ) 538 ); 539 540 $annotation = wp_get_update_php_annotation(); 541 542 if ( $annotation ) { 543 $compat .= '</p><p><em>' . $annotation . '</em>'; 544 } 545 } 546 } elseif ( ! $compatible_wp ) { 547 $compat .= '<br>' . __( 'This update doesn’t work with your version of WordPress.' ) . ' '; 548 if ( current_user_can( 'update_core' ) ) { 549 $compat .= sprintf( 550 /* translators: %s: URL to WordPress Updates screen. */ 551 __( '<a href="%s">Please update WordPress</a>.' ), 552 self_admin_url( 'update-core.php' ) 553 ); 554 } 555 } elseif ( ! $compatible_php ) { 556 $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' '; 557 if ( current_user_can( 'update_php' ) ) { 558 $compat .= sprintf( 559 /* translators: %s: URL to Update PHP page. */ 560 __( '<a href="%s">Learn more about updating PHP</a>.' ), 561 esc_url( wp_get_update_php_url() ) 562 ); 563 564 $annotation = wp_get_update_php_annotation(); 565 566 if ( $annotation ) { 567 $compat .= '</p><p><em>' . $annotation . '</em>'; 568 } 569 } 570 } 571 502 572 $checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) ); 503 504 573 ?> 505 574 <tr> 506 575 <td class="check-column"> 507 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" /> 508 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> 509 <?php 510 /* translators: %s: Theme name. */ 511 printf( __( 'Select %s' ), $theme->display( 'Name' ) ); 512 ?> 513 </label> 576 <?php if ( $compatible_wp && $compatible_php ) : ?> 577 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" /> 578 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"> 579 <?php 580 /* translators: %s: Theme name. */ 581 printf( __( 'Select %s' ), $theme->display( 'Name' ) ); 582 ?> 583 </label> 584 <?php endif; ?> 514 585 </td> 515 586 <td class="plugin-title"><p> … … 523 594 $theme->update['new_version'] 524 595 ); 596 597 echo ' ' . $compat; 598 525 599 if ( in_array( $stylesheet, $auto_updates, true ) ) { 526 600 echo $auto_update_notice;
Note: See TracChangeset
for help on using the changeset viewer.