wp_dashboard_browser_nag

The timeline below displays how wordpress function wp_dashboard_browser_nag has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Displays the browser update nag.
 *
 * @since 3.2.0
 * @since 5.8.0 Added a 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 ($is_IE) {
            $msg = __('Internet Explorer does not give you the best WordPress experience. Switch to Microsoft Edge, or another more modern browser to get the most from your site.');
        } 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."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        } else {
            $msg = sprintf(
                /* translators: %s: Browser name and link. */
                __("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><img src="' . esc_url($img_src) . '" alt="" /></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        if ($is_IE) {
            $msg_browsehappy = sprintf(
                /* translators: %s: Browse Happy URL. */
                __('Learn how to <a href="%s" class="update-browser-link">browse happy</a>'),
                esc_url($browsehappy)
            );
        } else {
            $msg_browsehappy = sprintf(
                /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */
                __('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'),
                esc_attr($response['update_url']),
                esc_html($response['name']),
                esc_url($browsehappy)
            );
        }
        $notice .= '<p>' . $msg_browsehappy . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string      $notice   The notice content.
     * @param array|false $response An array containing web browser information, or
     *                              false on failure. See wp_check_browser_version().
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
    // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}

WordPress Version: 5.9

/**
 * Displays the browser update nag.
 *
 * @since 3.2.0
 * @since 5.8.0 Added a 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 ($is_IE) {
            $msg = __('Internet Explorer does not give you the best WordPress experience. Switch to Microsoft Edge, or another more modern browser to get the most from your site.');
        } 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."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        } else {
            $msg = sprintf(
                /* translators: %s: Browser name and link. */
                __("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><img src="' . esc_attr($img_src) . '" alt="" /></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        if ($is_IE) {
            $msg_browsehappy = sprintf(
                /* translators: %s: Browse Happy URL. */
                __('Learn how to <a href="%s" class="update-browser-link">browse happy</a>'),
                esc_url($browsehappy)
            );
        } else {
            $msg_browsehappy = sprintf(
                /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */
                __('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'),
                esc_attr($response['update_url']),
                esc_html($response['name']),
                esc_url($browsehappy)
            );
        }
        $notice .= '<p>' . $msg_browsehappy . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string      $notice   The notice content.
     * @param array|false $response An array containing web browser information, or
     *                              false on failure. See `wp_check_browser_version()`.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
    // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}

WordPress Version: 5.8

/**
 * Displays the browser update nag.
 *
 * @since 3.2.0
 * @since 5.8.0 Added a 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 ($is_IE) {
            $msg = __('Internet Explorer does not give you the best WordPress experience. Switch to Microsoft Edge, or another more modern browser to get the most from your site.');
        } 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."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        } else {
            $msg = sprintf(
                /* translators: %s: Browser name and link. */
                __("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><img src="' . esc_attr($img_src) . '" alt="" /></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        if ($is_IE) {
            $msg_browsehappy = sprintf(
                /* translators: %s: Browse Happy URL. */
                __('Learn how to <a href="%s" class="update-browser-link">browse happy</a>'),
                esc_url($browsehappy)
            );
        } else {
            $msg_browsehappy = sprintf(
                /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */
                __('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'),
                esc_attr($response['update_url']),
                esc_html($response['name']),
                esc_url($browsehappy)
            );
        }
        $notice .= '<p>' . $msg_browsehappy . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information. See `wp_check_browser_version()`.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
    // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}

WordPress Version: 5.4

/**
 * Displays the browser update nag.
 *
 * @since 3.2.0
 */
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($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."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        } else {
            $msg = sprintf(
                /* translators: %s: Browser name and link. */
                __("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(
            /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */
            __('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'),
            esc_attr($response['update_url']),
            esc_html($response['name']),
            esc_url($browsehappy)
        ) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information. See `wp_check_browser_version()`.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
    // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}

WordPress Version: 5.3

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($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."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        } else {
            $msg = sprintf(
                /* translators: %s: Browser name and link. */
                __("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."),
                sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name']))
            );
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(
            /* translators: 1: Browser update URL, 2: Browser name, 3: Browse Happy URL. */
            __('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'),
            esc_attr($response['update_url']),
            esc_html($response['name']),
            esc_url($browsehappy)
        ) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information. See `wp_check_browser_version()`.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
    // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}

WordPress Version: 5.1

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("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."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        } else {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information. See `wp_check_browser_version()`.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 4.9

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("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."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        } else {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'https://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 4.7

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("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."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        } else {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'http://browsehappy.com/';
        $locale = get_user_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 4.6

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("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."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        } else {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'http://browsehappy.com/';
        $locale = get_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filters the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 4.5

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("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."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        } else {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'http://browsehappy.com/';
        $locale = get_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__('Dismiss the browser warning panel') . '">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filter the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 4.4

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("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."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        } else {
            /* translators: %s: browser name and link */
            $msg = sprintf(__("It looks like you're using an old version of %s. For the best WordPress experience, please update your browser."), sprintf('<a href="%s">%s</a>', esc_url($response['update_url']), esc_html($response['name'])));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'http://browsehappy.com/';
        $locale = get_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filter the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 3.9

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            $msg = sprintf(__("It looks like you're using an insecure version of <a href='%s'>%s</a>. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser."), esc_attr($response['update_url']), esc_html($response['name']));
        } else {
            $msg = sprintf(__("It looks like you're using an old version of <a href='%s'>%s</a>. For the best WordPress experience, please update your browser."), esc_attr($response['update_url']), esc_html($response['name']));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'http://browsehappy.com/';
        $locale = get_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    /**
     * Filter the notice output for the 'Browse Happy' nag meta box.
     *
     * @since 3.2.0
     *
     * @param string $notice   The notice content.
     * @param array  $response An array containing web browser information.
     */
    echo apply_filters('browse-happy-notice', $notice, $response);
}

WordPress Version: 3.7

// Display Browser Nag Meta Box
function wp_dashboard_browser_nag()
{
    $notice = '';
    $response = wp_check_browser_version();
    if ($response) {
        if ($response['insecure']) {
            $msg = sprintf(__("It looks like you're using an insecure version of <a href='%s'>%s</a>. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser."), esc_attr($response['update_url']), esc_html($response['name']));
        } else {
            $msg = sprintf(__("It looks like you're using an old version of <a href='%s'>%s</a>. For the best WordPress experience, please update your browser."), esc_attr($response['update_url']), esc_html($response['name']));
        }
        $browser_nag_class = '';
        if (!empty($response['img_src'])) {
            $img_src = (is_ssl() && !empty($response['img_src_ssl'])) ? $response['img_src_ssl'] : $response['img_src'];
            $notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr($img_src) . '" alt="" /></a></div>';
            $browser_nag_class = ' has-browser-icon';
        }
        $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
        $browsehappy = 'http://browsehappy.com/';
        $locale = get_locale();
        if ('en_US' !== $locale) {
            $browsehappy = add_query_arg('locale', $locale, $browsehappy);
        }
        $notice .= '<p>' . sprintf(__('<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>'), esc_attr($response['update_url']), esc_html($response['name']), esc_url($browsehappy)) . '</p>';
        $notice .= '<p class="hide-if-no-js"><a href="" class="dismiss">' . __('Dismiss') . '</a></p>';
        $notice .= '<div class="clear"></div>';
    }
    echo apply_filters('browse-happy-notice', $notice, $response);
}