Summery Summery
Displays the PHP update nag.
Syntax Syntax
Source Source
File: wp-admin/includes/dashboard.php
$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 } /**
Advertisement
Changelog Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |