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


Top ↑

Return Return

(mixed|null) option or null


Top ↑

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 );

}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.0.5Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation