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_Licensing::get_status_classes( object|bool|null $license = null )


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

$license

(Optional)

Default value: null


Top ↑

Return Return

(bool|string)


Top ↑

Source Source

File: classes/Licensing.php

	public static function get_status_classes( $license = null ) {
		$class = false;

		if ( self::has_license( $license ) && false !== $license->success ) {
			$now        = current_time( 'timestamp' );
			$expiration = self::get_license_expiration( $license );

			if ( 'lifetime' === $expiration ) {
				$class = 'pum-license-lifetime-notice';
			} elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
				$class = 'pum-license-expires-soon-notice';
			} else {
				$class = 'pum-license-expiration-date-notice';
			}
		}

		return $class;
	}


Top ↑

User Contributed Notes User Contributed Notes

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