wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_secrets_site_health_test_needs_rotation › WordPress Function
Since7.2.0
Deprecatedn/a
› wp_secrets_site_health_test_needs_rotation ( No parameters )
| Returns: |
|
| Defined at: |
|
| Codex: |
Site Health test: are any secrets flagged as needing rotation?
Source
function wp_secrets_site_health_test_needs_rotation(): array {
$count = wp_secrets_site_health_count_needing_rotation( false );
if ( is_multisite() && is_super_admin() ) {
$count += wp_secrets_site_health_count_needing_rotation( true );
}
if ( 0 === $count ) {
return wp_secrets_site_health_result(
'secrets_api_needs_rotation',
__( 'No secrets are pending rotation' ),
'good',
sprintf( '<p>%s</p>', esc_html__( 'No secret is flagged as needing rotation.' ) )
);
}
return wp_secrets_site_health_result(
'secrets_api_needs_rotation',
__( 'Some secrets are pending rotation' ),
'recommended',
sprintf(
'<p>%s</p>',
esc_html(
sprintf(
/* translators: %d: Number of secrets flagged for rotation. */
_n(
'%d secret was imported from an existing option and is flagged for rotation. A credential that sat in a plain option has already been through whatever backups and replication paths that option went through; re-entering it with a new value is recommended.',
'%d secrets were imported from existing options and are flagged for rotation. A credential that sat in a plain option has already been through whatever backups and replication paths that option went through; re-entering each with a new value is recommended.',
$count
),
$count
)
)
)
);
}