1 bootstrap.inc | settings_get($name, $default = NULL) |
Returns a site-wide setting, usually specified via the settings.php file.
This returns values from the global $settings variable, with an optional default if the setting has not be specified. Settings are used for low-level, global configuration. Unlike config_get(), this function is used to retrieve values that cannot be changed via the user-interface, hence why there is no matching settings_set() function.
Parameters
string $name: The name of the setting to return.
mixed $default: (optional) The default value to use if this setting is not set.
Return value
mixed: The value of the setting, the provided default if not set.
File
- core/
includes/ bootstrap.inc, line 1185 - Functions that need to be loaded on every Backdrop request.
Code
function settings_get($name, $default = NULL) {
global $settings;
return isset($settings[$name]) ? $settings[$name] : $default;
}