llms_get_secure_option( $secure_name,  $default = false,  $db_name = '' )

Retrieve a “secure” option.


Description Description

Checks environment variables and then constant definitions


Parameters Parameters

$name

(string) (Required) Name of the variable.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/functions/llms-functions-options.php

function llms_get_secure_option( $secure_name, $default = false, $db_name = '' ) {

	// Try an environment variable first.
	$val = getenv( $secure_name );

	if ( false !== $val ) {
		return $val;
	}

	// Try a constant.
	if ( defined( $secure_name ) ) {
		return constant( $secure_name );
	}

	if ( $db_name ) {
		return get_option( $db_name, $default );
	}

	// Return default.
	return $default;

}

Top ↑

Changelog Changelog

Changelog
Version Description
3.29.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: