Gocodebox_Banner_Notifier::notification_test_pmpro_license( bool $value, $license_type )
PMPro license type test.
Contents
Parameters Parameters
- $value
-
(bool) (Required) The current test value.
- $license
-
(string) (Required) PMPro license type to check for.
Source Source
File: libraries/banner-notifications/src/notifications.php
function notification_test_pmpro_license( $value, $license_type ) {
if ( ! function_exists( 'pmpro_license_isValid' ) ) {
return false;
}
if ( empty( $license_type ) ) {
// If no license type, check they DON'T have a valid license key
$valid = ! pmpro_license_isValid();
} else {
// Check if they have a valid key of the type specified
$valid = pmpro_license_isValid( null, $license_type );
}
return $valid;
}
Expand full source code Collapse full source code View on GitHub