Usage
Parameters
$option
(Required) (String) The name of the option.
Default: None
$fallback
(Optional) (String) The data to use if the option is not set or false.
Default: false
Parameter Notes
For a list of core Nebula option names, refer to the default_options documentation.
Examples
Echo a string-based option.
String-based with a default if false.
Check if a boolean option is enabled.
Check if a boolean option is disabled.
Source File
Located in /libs/Options/Options.php on line 46.
No Hooks
This function does not have any filters or actions available. Request one?public function get_option($option, $fallback=false){ $nebula_options = get_option('nebula_options'); if ( empty($nebula_options[$option]) ){ if ( !empty($fallback) ){ return $fallback; } return false; } if ( filter_var($nebula_options[$option], FILTER_VALIDATE_BOOLEAN) === 1 ){ return true; } return $nebula_options[$option]; }Copy to Clipboard
Override
This function can not be short-circuited with an override filter. Request one?