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



wp_secrets_site_health_tests › WordPress Function

Since7.2.0
Deprecatedn/a
› wp_secrets_site_health_tests ( $tests )
Parameters:
  • (array<string,array<string,array<string,mixed>>>) $tests Existing Site Health tests.
    Required: Yes
Returns:
  • (array<string,array<string,array<string,mixed>>>)
Defined at:
Codex:

Registers the Secrets API's Site Health tests.

No settings screen – the proposal defers that to 7.3 – but the health signal an operator needs to notice a broken key, a weak key source, or a pending rotation is in scope now.


Source

function wp_secrets_site_health_tests( $tests ) {
	$tests['direct']['secrets_api_key_source'] = array(
		'label' => __( 'Secrets API key source' ),
		'test'  => 'wp_secrets_site_health_test_key_source',
	);

	$tests['direct']['secrets_api_undecryptable'] = array(
		'label' => __( 'Secrets API: undecryptable secrets' ),
		'test'  => 'wp_secrets_site_health_test_undecryptable',
	);

	$tests['direct']['secrets_api_needs_rotation'] = array(
		'label' => __( 'Secrets API: credentials pending rotation' ),
		'test'  => 'wp_secrets_site_health_test_needs_rotation',
	);

	return $tests;
}