diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 8b256c8370..1dfe3b5736 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -1026,33 +1026,23 @@ a.rsswidget { } #dashboard_browser_nag p.browser-update-nag.has-browser-icon { - padding-right: 125px; + padding-right: 128px; } #dashboard_browser_nag .browser-icon { - margin-top: -35px; -} - -#dashboard_browser_nag.postbox.browser-insecure { - background-color: #b32d2e; - border-color: #b32d2e; + margin-top: -32px; } #dashboard_browser_nag.postbox { - background-color: #dba617; + background-color: #b32d2e; background-image: none; - border-color: #f0c33c; + border-color: #b32d2e; color: #fff; box-shadow: none; } -#dashboard_browser_nag.postbox.browser-insecure h2 { - border-bottom-color: #e65054; - color: #fff; -} - #dashboard_browser_nag.postbox h2 { - border-bottom-color: #f5e6ab; + border-bottom-color: transparent; background: transparent none; color: #fff; box-shadow: none; @@ -1062,6 +1052,10 @@ a.rsswidget { color: #fff; } +#dashboard_browser_nag.postbox .postbox-header { + border-color: transparent; +} + #dashboard_browser_nag h2.hndle { border: none; font-weight: 600; diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 4245084c3c..950c4aadce 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1658,13 +1658,21 @@ function wp_dashboard_quota() { * Displays the browser update nag. * * @since 3.2.0 + * @since 5.8.0 Display special message for Internet Explorer users. + * + * @global bool $is_IE + * */ function wp_dashboard_browser_nag() { + global $is_IE; + $notice = ''; $response = wp_check_browser_version(); if ( $response ) { - if ( $response['insecure'] ) { + if ( $is_IE ) { + $msg = __( "For the best WordPress experience, please use Microsoft Edge or another modern browser instead of Internet Explorer." ); + } elseif ( $response['insecure'] ) { $msg = sprintf( /* translators: %s: Browser name and link. */ __( "It looks like you're using an insecure version of %s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), @@ -1682,7 +1690,7 @@ function wp_dashboard_browser_nag() { if ( ! empty( $response['img_src'] ) ) { $img_src = ( is_ssl() && ! empty( $response['img_src_ssl'] ) ) ? $response['img_src_ssl'] : $response['img_src']; - $notice .= '
'; + $notice .= ''; $browser_nag_class = ' has-browser-icon'; } $notice .= "{$msg}
"; @@ -1693,13 +1701,23 @@ function wp_dashboard_browser_nag() { $browsehappy = add_query_arg( 'locale', $locale, $browsehappy ); } - $notice .= '' . sprintf( - /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */ - __( 'Update %2$s or learn how to browse happy' ), - esc_attr( $response['update_url'] ), - esc_html( $response['name'] ), - esc_url( $browsehappy ) - ) . '
'; + if ( $is_IE ) { + $msg_browsehappy = sprintf( + /* translators: %s: Browse Happy URL. */ + __( 'Learn how to browse happy' ), + esc_url( $browsehappy ) + ); + } else { + $msg_browsehappy = sprintf( + /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */ + __( 'Update %2$s or learn how to browse happy' ), + esc_attr( $response['update_url'] ), + esc_html( $response['name'] ), + esc_url( $browsehappy ) + ); + } + + $notice .= '' . $msg_browsehappy . '
'; $notice .= ''; $notice .= ''; }