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



_wp_secrets_set › WordPress Function

Since7.2.0
Deprecatedn/a
› _wp_secrets_set ( $name, $value, $network, $needs_rotation = false, $action_override = null )
Parameters: (5)
  • (string) $name The secret's name.
    Required: Yes
  • (string) $value The plaintext value.
    Required: Yes
  • (bool) $network Whether this is a network-scope secret.
    Required: Yes
  • (bool) $needs_rotation Flag the stored secret as needing rotation.
    Required: No
    Default: false
  • (string|null) $action_override Overrides the $action reported to wp_secret_changed.
    Required: No
    Default: null
Returns:
  • (true|WP_Error)
Defined at:
Codex:

Shared implementation behind wp_set_secret() and wp_set_network_secret().



Source

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 );
}