wpseek.com
A WordPress-centric search engine for devs and theme authors



dashboard_php_nag_class › WordPress Function

Since5.1.0
Deprecatedn/a
dashboard_php_nag_class ( $classes )
Parameters:
  • (string[]) $classes Array of meta box classes.
    Required: Yes
Returns:
  • (string[]) Modified array of meta box classes.
Defined at:
Codex:

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



Source

function dashboard_php_nag_class( $classes ) {
	$response = wp_check_php_version();

	if ( ! $response ) {
		return $classes;
	}

	if ( isset( $response['is_secure'] ) && ! $response['is_secure'] ) {
		$classes[] = 'php-no-security-updates';
	} elseif ( $response['is_lower_than_future_minimum'] ) {
		$classes[] = 'php-version-lower-than-future-minimum';
	}

	return $classes;
}