wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_wp_secrets_set › WordPress Function

Seit7.2.0
Veraltetn/v
› _wp_secrets_set ( $name, $value, $network, $needs_rotation = false, $action_override = null )
Parameter: (5)
  • (string) $name The secret's name.
    Erforderlich: Ja
  • (string) $value The plaintext value.
    Erforderlich: Ja
  • (bool) $network Whether this is a network-scope secret.
    Erforderlich: Ja
  • (bool) $needs_rotation Flag the stored secret as needing rotation.
    Erforderlich: Nein
    Standard: false
  • (string|null) $action_override Overrides the $action reported to wp_secret_changed.
    Erforderlich: Nein
    Standard: null
Gibt zurück:
  • (true|WP_Error)
Definiert in:
Codex:

Shared implementation behind wp_set_secret() and wp_set_network_secret().



Quellcode

function _wp_secrets_set( string $name, $value, bool $network, bool $needs_rotation = false, ?string $action_override = null ) {
	return _wp_secrets_get_provider()->set( $name, $value, $network, $needs_rotation, $action_override );
}