dashboard_browser_nag_class() WordPress Function

The dashboard_browser_nag_class() function is used to display a notice to users who are using an outdated browser. This notice will be displayed on the dashboard and will encourage the user to update their browser.

dashboard_browser_nag_class( string[] $classes ) #

Adds an additional class to the browser nag if the current version is insecure.


Parameters

$classes

(string[])(Required)Array of meta box classes.


Top ↑

Return

(string[]) Modified array of meta box classes.


Top ↑

Source

File: wp-admin/includes/dashboard.php

function dashboard_browser_nag_class( $classes ) {
	$response = wp_check_browser_version();

	if ( $response && $response['insecure'] ) {
		$classes[] = 'browser-insecure';
	}

	return $classes;
}


Top ↑

Changelog

Changelog
VersionDescription
3.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.