noptin_should_show_optins()

Checks whether an optin form should be displayed.


Return Return

(bool)


Top ↑

Source Source

File: includes/functions.php

function noptin_should_show_optins() {

	if ( get_noptin_option( 'hide_from_subscribers' ) ) {

		if ( ! empty( $_COOKIE['noptin_email_subscribed'] ) ) {
			return false;
		}

		$cookie = get_noptin_option( 'subscribers_cookie' );
		if ( ! empty( $cookie ) && is_string( $cookie ) && ! empty( $_COOKIE[ $cookie ] ) ) {
			return false;
		}

	}

	if ( ! empty( $_COOKIE['noptin_hide'] ) ) {
		return false;
	}

	return true;

}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.0.7Introduced.

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