Function __global->get_option_with_overrides
Definitions
sources/cns_members_action.php
- Get a config option, with override support.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $option_name | ID_TEXT | No | No | required parameter | N/A | N/A | The config option |
| $overrides | ?array | No | No | required parameter | N/A | N/A | Map of config option codenames and overridden values (null: no overrides) |
Returns
- Config option value (null: config option disabled or not found)
- Type: ?ID_TEXT
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get a config option, with override support.
*
* @param ID_TEXT $option_name The config option
* @param ?array $overrides Map of config option codenames and overridden values (null: no overrides)
* @return ?ID_TEXT Config option value (null: config option disabled or not found)
*/
function get_option_with_overrides(string $option_name, ?array $overrides) : ?string
* Get a config option, with override support.
*
* @param ID_TEXT $option_name The config option
* @param ?array $overrides Map of config option codenames and overridden values (null: no overrides)
* @return ?ID_TEXT Config option value (null: config option disabled or not found)
*/
function get_option_with_overrides(string $option_name, ?array $overrides) : ?string
