You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Administration: Introduce dashboard notice to discourage use of out of date browser.
If a browser matches Internet Explorer, the dashboard will display a notice recommending a more modern browser.
Props youknowriad, sabernhardt, afercia, SergeyBiryukov, davidbaumwald, netweb, johnbillion, jeherve.
See #48743.
git-svn-id: https://develop.svn.wordpress.org/trunk@51117 602fd350-edb4-49c9-b593-d223f7449a82
Copy file name to clipboardExpand all lines: src/wp-admin/includes/dashboard.php
+27-9Lines changed: 27 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1658,13 +1658,21 @@ function wp_dashboard_quota() {
1658
1658
* Displays the browser update nag.
1659
1659
*
1660
1660
* @since 3.2.0
1661
+
* @since 5.8.0 Display special message for Internet Explorer users.
1662
+
*
1663
+
* @global bool $is_IE
1664
+
*
1661
1665
*/
1662
1666
functionwp_dashboard_browser_nag() {
1667
+
global$is_IE;
1668
+
1663
1669
$notice = '';
1664
1670
$response = wp_check_browser_version();
1665
1671
1666
1672
if ( $response ) {
1667
-
if ( $response['insecure'] ) {
1673
+
if ( $is_IE ) {
1674
+
$msg = __( "For the best WordPress experience, please use Microsoft Edge or another modern browser instead of Internet Explorer." );
1675
+
} elseif ( $response['insecure'] ) {
1668
1676
$msg = sprintf(
1669
1677
/* translators: %s: Browser name and link. */
1670
1678
__( "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() {
0 commit comments