dashboard_php_nag_class() WordPress Function
The dashboard_php_nag_class() function is used to display a warning to users who are running an outdated version of PHP on their website. This function is only available in WordPress 4.4 or later.
dashboard_php_nag_class( string[] $classes ) #
Adds an additional class to the PHP nag if the current version is insecure.
Parameters
- $classes
(string[])(Required)Array of meta box classes.
Return
(string[]) Modified array of meta box classes.
Source
File: wp-admin/includes/dashboard.php
function dashboard_php_nag_class( $classes ) { $response = wp_check_php_version(); if ( $response && isset( $response['is_secure'] ) && ! $response['is_secure'] ) { $classes[] = 'php-insecure'; } return $classes; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |