Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Utils_Alerts::has_dismissed_alert( string $code = '' )


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Parameters Parameters

$code

(Optional)

Default value: ''


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: classes/Utils/Alerts.php

	public static function has_dismissed_alert( $code = '' ) {
		$dimissed_alerts = self::dismissed_alerts();

		$alert_dismissed = array_key_exists( $code, $dimissed_alerts );

		// If the alert was dismissed and has a non true type value, it is an expiry time.
		if ( $alert_dismissed && true !== $dimissed_alerts[ $code ] ) {
			return strtotime( 'now' ) < $dimissed_alerts[ $code ];
		}

		return $alert_dismissed;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.