wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_secrets_site_health_count_needing_rotation › WordPress Function
Seit7.2.0
Veraltetn/v
› wp_secrets_site_health_count_needing_rotation ( $network )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Counts secrets flagged needs_rotation, for one scope.
Quellcode
function wp_secrets_site_health_count_needing_rotation( bool $network ): int {
$entries = $network ? wp_list_network_secrets() : wp_list_secrets();
if ( is_wp_error( $entries ) ) {
return 0;
}
$count = 0;
foreach ( $entries as $entry ) {
if ( ! empty( $entry['needs_rotation'] ) ) {
++$count;
}
}
return $count;
}