wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_secrets_site_health_result › WordPress Function
Since7.2.0
Deprecatedn/a
› wp_secrets_site_health_result ( $test, $label, $status, $description )
| Parameters: (4) |
|
| Returns: |
|
| Defined at: | |
| Codex: |
Builds the standard shape a Site Health test callback returns.
Source
function wp_secrets_site_health_result( string $test, string $label, string $status, string $description ): array {
$colors = array(
'good' => 'green',
'recommended' => 'orange',
'critical' => 'red',
);
return array(
'test' => $test,
'label' => $label,
'status' => $status,
'badge' => array(
'label' => __( 'Security' ),
'color' => isset( $colors[ $status ] ) ? $colors[ $status ] : 'blue',
),
'description' => $description,
);
}