llms_is_option_secure( string $secure_name )
Determines if the given option name is stored in a “secure” manner, i.e. an environment variable or a constant.
Parameters Parameters
- $secure_name
-
(string) (Required) The name of the possibly secure option.
Return Return
(bool) Returns true
if the option is defined in an environment variable or a constant, else false
.
Source Source
File: includes/functions/llms-functions-options.php
function llms_is_option_secure( $secure_name ) { // Sanity check for empty strings to prevent `getenv()` from returning ALL variables. if ( '' === $secure_name ) { return false; } /* * Note: Do not store `false` values in an environment variable * because `getenv()` returns `false` if the variable is not set. */ if ( false !== getenv( $secure_name ) ) { return true; } return defined( $secure_name ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |