Function __global->get_theme_option
Definitions
sources/config.php
- Find the value of the specified theme-overridable configuration option / theme-only option.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $name | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the option |
| $default | ?string | No | No | Null | N/A | N/A | Default value (null: also is a configuration option, look in that -- OR we have a hard-coded default for it) |
| $theme | ?ID_TEXT | No | No | Null | N/A | N/A | Theme to load for (null: active theme) (blank: non-existent theme) |
| $missing_ok | boolean | No | No | False | N/A | N/A | Where to accept a missing option (and return null) |
Returns
- The value (null: means either disabled option, or no option found while $missing_ok set)
- Type: ?SHORT_TEXT
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find the value of the specified theme-overridable configuration option / theme-only option.
*
* @param ID_TEXT $name The name of the option
* @param ?string $default Default value (null: also is a configuration option, look in that -- OR we have a hard-coded default for it)
* @param ?ID_TEXT $theme Theme to load for (null: active theme) (blank: non-existent theme)
* @param boolean $missing_ok Where to accept a missing option (and return null)
* @return ?SHORT_TEXT The value (null: means either disabled option, or no option found while $missing_ok set)
*/
function get_theme_option(string $name, ?string $default = null, ?string $theme = null, bool $missing_ok = false) : ?string
* Find the value of the specified theme-overridable configuration option / theme-only option.
*
* @param ID_TEXT $name The name of the option
* @param ?string $default Default value (null: also is a configuration option, look in that -- OR we have a hard-coded default for it)
* @param ?ID_TEXT $theme Theme to load for (null: active theme) (blank: non-existent theme)
* @param boolean $missing_ok Where to accept a missing option (and return null)
* @return ?SHORT_TEXT The value (null: means either disabled option, or no option found while $missing_ok set)
*/
function get_theme_option(string $name, ?string $default = null, ?string $theme = null, bool $missing_ok = false) : ?string
