wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_secrets_site_health_result › WordPress Function
Seit7.2.0
Veraltetn/v
› wp_secrets_site_health_result ( $test, $label, $status, $description )
| Parameter: (4) |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Builds the standard shape a Site Health test callback returns.
Quellcode
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,
);
}