get_noptin_option( string $key, mixed $default = null )
Retrieves an option from the db
Parameters Parameters
- $key
(string) (Required) The option key.
- $default
(mixed) (Optional) The default value for the option.
Default value: null
Return Return
(mixed|null) option or null
Source Source
File: includes/functions.php
function get_noptin_option( $key, $default = null ) { $options = get_noptin_options(); $value = $default; if ( isset( $options[ $key ] ) ) { $value = $options[ $key ]; } if ( 'false' === $value ) { $value = false; } if ( 'true' === $value ) { $value = true; } return apply_filters( 'get_noptin_option', $value, $key ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.5 | Introduced. |