wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_wp_secrets_get › WordPress Function
Seit7.2.0
Veraltetn/v
› _wp_secrets_get ( $name, $version, $network )
| Parameter: (3) |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Shared implementation behind wp_get_secret() and wp_get_network_secret().
Ähnliche Funktionen: _wp_secrets_set, _wp_secrets_delete, _wp_secrets_retire, _wp_secrets_list, _wp_secrets_get_store
Quellcode
function _wp_secrets_get( string $name, string $version, bool $network ) {
/*
* Checked here rather than inside the provider: this is a contract between
* the API and its caller, and asking every provider to re-validate a core
* constant would be duplicated work that a third-party provider could
* silently skip.
*/
if ( ! in_array( $version, array( WP_Secret_Version::CURRENT, WP_Secret_Version::PREVIOUS ), true ) ) {
_doing_it_wrong(
__FUNCTION__,
__( 'The version must be WP_Secret_Version::CURRENT or WP_Secret_Version::PREVIOUS.' ),
'7.2.0'
);
return new WP_Error(
WP_SECRETS_ERROR_INVALID_ARGUMENT,
__( 'The version must be WP_Secret_Version::CURRENT or WP_Secret_Version::PREVIOUS.' )
);
}
return _wp_secrets_get_provider()->get( $name, $version, $network );
}