Changeset 56571 for trunk/src/wp-admin/includes/plugin-install.php
- Timestamp:
- 09/14/2023 01:11:29 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin-install.php
r56446 r56571 818 818 819 819 if ( ! $compatible_php ) { 820 echo '<div class="notice notice-error notice-alt"><p>'; 821 _e( '<strong>Error:</strong> This plugin <strong>requires a newer version of PHP</strong>.' ); 820 $compatible_php_notice_message = '<p>'; 821 $compatible_php_notice_message .= __( '<strong>Error:</strong> This plugin <strong>requires a newer version of PHP</strong>.' ); 822 822 823 if ( current_user_can( 'update_php' ) ) { 823 printf(824 $compatible_php_notice_message .= sprintf( 824 825 /* translators: %s: URL to Update PHP page. */ 825 826 ' ' . __( '<a href="%s" target="_blank">Click here to learn more about updating PHP</a>.' ), 826 827 esc_url( wp_get_update_php_url() ) 827 ); 828 829 wp_update_php_annotation( '</p><p><em>', '</em>' ); 828 ) . wp_update_php_annotation( '</p><p><em>', '</em>', false ); 830 829 } else { 831 echo '</p>'; 832 } 833 echo '</div>'; 830 $compatible_php_notice_message .= '</p>'; 831 } 832 833 wp_admin_notice( 834 $compatible_php_notice_message, 835 array( 836 'type' => 'error', 837 'additional_classes' => array( 'notice-alt' ), 838 'paragraph_wrap' => false, 839 ) 840 ); 834 841 } 835 842 836 843 if ( ! $tested_wp ) { 837 echo '<div class="notice notice-warning notice-alt"><p>'; 838 _e( '<strong>Warning:</strong> This plugin <strong>has not been tested</strong> with your current version of WordPress.' ); 839 echo '</p></div>'; 844 wp_admin_notice( 845 __( '<strong>Warning:</strong> This plugin <strong>has not been tested</strong> with your current version of WordPress.' ), 846 array( 847 'type' => 'warning', 848 'additional_classes' => array( 'notice-alt' ), 849 ) 850 ); 840 851 } elseif ( ! $compatible_wp ) { 841 echo '<div class="notice notice-error notice-alt"><p>'; 842 _e( '<strong>Error:</strong> This plugin <strong>requires a newer version of WordPress</strong>.' ); 852 $compatible_wp_notice_message = __( '<strong>Error:</strong> This plugin <strong>requires a newer version of WordPress</strong>.' ); 843 853 if ( current_user_can( 'update_core' ) ) { 844 printf(854 $compatible_wp_notice_message .= sprintf( 845 855 /* translators: %s: URL to WordPress Updates screen. */ 846 856 ' ' . __( '<a href="%s" target="_parent">Click here to update WordPress</a>.' ), … … 848 858 ); 849 859 } 850 echo '</p></div>'; 860 861 wp_admin_notice( 862 $compatible_wp_notice_message, 863 array( 864 'type' => 'error', 865 'additional_classes' => array( 'notice-alt' ), 866 ) 867 ); 851 868 } 852 869
Note: See TracChangeset
for help on using the changeset viewer.