Changeset 56570 for trunk/src/wp-admin/themes.php
- Timestamp:
- 09/14/2023 12:52:45 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/themes.php
r56515 r56570 470 470 <?php 471 471 if ( ! $theme['compatibleWP'] || ! $theme['compatiblePHP'] ) { 472 echo '<div class="notice inline notice-error notice-alt"><p>';472 $message = ''; 473 473 if ( ! $theme['compatibleWP'] && ! $theme['compatiblePHP'] ) { 474 _e( 'This theme does not work with your versions of WordPress and PHP.' );474 $message = __( 'This theme does not work with your versions of WordPress and PHP.' ); 475 475 if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { 476 printf(476 $message .= sprintf( 477 477 /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ 478 478 ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), … … 480 480 esc_url( wp_get_update_php_url() ) 481 481 ); 482 wp_update_php_annotation( '</p><p><em>', '</em>');482 $message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 483 483 } elseif ( current_user_can( 'update_core' ) ) { 484 printf(484 $message .= sprintf( 485 485 /* translators: %s: URL to WordPress Updates screen. */ 486 486 ' ' . __( '<a href="%s">Please update WordPress</a>.' ), … … 488 488 ); 489 489 } elseif ( current_user_can( 'update_php' ) ) { 490 printf(490 $message .= sprintf( 491 491 /* translators: %s: URL to Update PHP page. */ 492 492 ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), 493 493 esc_url( wp_get_update_php_url() ) 494 494 ); 495 wp_update_php_annotation( '</p><p><em>', '</em>');495 $message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 496 496 } 497 497 } elseif ( ! $theme['compatibleWP'] ) { 498 _e( 'This theme does not work with your version of WordPress.' );498 $message .= __( 'This theme does not work with your version of WordPress.' ); 499 499 if ( current_user_can( 'update_core' ) ) { 500 printf(500 $message .= sprintf( 501 501 /* translators: %s: URL to WordPress Updates screen. */ 502 502 ' ' . __( '<a href="%s">Please update WordPress</a>.' ), … … 505 505 } 506 506 } elseif ( ! $theme['compatiblePHP'] ) { 507 _e( 'This theme does not work with your version of PHP.' );507 $message .= __( 'This theme does not work with your version of PHP.' ); 508 508 if ( current_user_can( 'update_php' ) ) { 509 printf(509 $message .= sprintf( 510 510 /* translators: %s: URL to Update PHP page. */ 511 511 ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), 512 512 esc_url( wp_get_update_php_url() ) 513 513 ); 514 wp_update_php_annotation( '</p><p><em>', '</em>');514 $message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 515 515 } 516 516 } 517 echo '</p></div>'; 517 518 wp_admin_notice( 519 $message, 520 array( 521 'type' => 'error', 522 'additional_classes' => array( 'inline', 'notice-alt' ), 523 ) 524 ); 518 525 } 519 526 ?> … … 693 700 */ 694 701 function wp_theme_auto_update_setting_template() { 702 $notice = wp_get_admin_notice( 703 '', 704 array( 705 'type' => 'error', 706 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), 707 ) 708 ); 695 709 $template = ' 696 710 <div class="theme-autoupdate"> … … 718 732 <br />' . wp_get_auto_update_message() . '</span> 719 733 <# } #> 720 <div class="notice notice-error notice-alt inline hidden"><p></p></div>734 ' . $notice . ' 721 735 </div> 722 736 ';
Note: See TracChangeset
for help on using the changeset viewer.