diff --git a/src/wp-admin/includes/class-wp-plugin-install-list-table.php b/src/wp-admin/includes/class-wp-plugin-install-list-table.php
index ee744dec9d..330a35e624 100644
--- a/src/wp-admin/includes/class-wp-plugin-install-list-table.php
+++ b/src/wp-admin/includes/class-wp-plugin-install-list-table.php
@@ -686,52 +686,59 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
';
+ $incompatible_notice_message = '';
if ( ! $compatible_php && ! $compatible_wp ) {
- _e( 'This plugin does not work with your versions of WordPress and PHP.' );
+ $incompatible_notice_message .= __( 'This plugin does not work with your versions of WordPress and PHP.' );
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
- printf(
+ $incompatible_notice_message .= sprintf(
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ),
self_admin_url( 'update-core.php' ),
esc_url( wp_get_update_php_url() )
);
- wp_update_php_annotation( '
', '', false );
}
} elseif ( ! $compatible_wp ) {
- _e( 'This plugin does not work with your version of WordPress.' );
+ $incompatible_notice_message .= __( 'This plugin does not work with your version of WordPress.' );
if ( current_user_can( 'update_core' ) ) {
- printf(
+ $incompatible_notice_message .= printf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( 'Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
}
} elseif ( ! $compatible_php ) {
- _e( 'This plugin does not work with your version of PHP.' );
+ $incompatible_notice_message .= __( 'This plugin does not work with your version of PHP.' );
if ( current_user_can( 'update_php' ) ) {
- printf(
+ $incompatible_notice_message .= sprintf(
/* translators: %s: URL to Update PHP page. */
' ' . __( 'Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
- wp_update_php_annotation( '
- unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ),
- esc_url(
- add_query_arg(
- 'changeset_uuid',
- rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ),
- admin_url( 'customize.php' )
- )
- )
- );
- ?>
-
-
- unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ),
+ esc_url(
+ add_query_arg(
+ 'changeset_uuid',
+ rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ),
+ admin_url( 'customize.php' )
+ )
+ )
+ );
+ wp_admin_notice(
+ $message,
+ array(
+ 'type' => 'info',
+ 'additional_classes' => array( 'notice-alt', 'inline' ),
+ )
+ );
endif;
/**
diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php
index 8bb1b61072..7662076581 100644
--- a/src/wp-admin/includes/plugin-install.php
+++ b/src/wp-admin/includes/plugin-install.php
@@ -817,37 +817,54 @@ function install_plugin_information() {
$tested_wp = ( empty( $api->tested ) || version_compare( get_bloginfo( 'version' ), $api->tested, '<=' ) );
if ( ! $compatible_php ) {
- echo '
';
- _e( 'Error: This plugin requires a newer version of PHP.' );
+ $compatible_php_notice_message = '
';
+ $compatible_php_notice_message .= __( 'Error: This plugin requires a newer version of PHP.' );
+
if ( current_user_can( 'update_php' ) ) {
- printf(
+ $compatible_php_notice_message .= sprintf(
/* translators: %s: URL to Update PHP page. */
' ' . __( 'Click here to learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
- );
-
- wp_update_php_annotation( '
';
- _e( 'Warning: This plugin has not been tested with your current version of WordPress.' );
- echo '
';
+ wp_admin_notice(
+ __( 'Warning: This plugin has not been tested with your current version of WordPress.' ),
+ array(
+ 'type' => 'warning',
+ 'additional_classes' => array( 'notice-alt' ),
+ )
+ );
} elseif ( ! $compatible_wp ) {
- echo '
';
- _e( 'Error: This plugin requires a newer version of WordPress.' );
+ $compatible_wp_notice_message = __( 'Error: This plugin requires a newer version of WordPress.' );
if ( current_user_can( 'update_core' ) ) {
- printf(
+ $compatible_wp_notice_message .= sprintf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( 'Click here to update WordPress.' ),
esc_url( self_admin_url( 'update-core.php' ) )
);
}
- echo '