Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function ICT_admin_notices() {
if ( ! class_exists( 'membershipcore' ) ) {
if ( $this->check_ioncube_loaders() == true ) {
if ( function_exists( 'ioncube_loader_iversion' ) ) {
$ioncube_loader_iversion = ioncube_loader_iversion();
$is_version_major_double_digit = (strlen($ioncube_loader_iversion) >= 6) ? true : false;
$ioncube_loader_version_major = ($is_version_major_double_digit) ? (int)substr( $ioncube_loader_iversion, 0, 2 ) : (int)substr( $ioncube_loader_iversion, 0, 1 );
$ioncube_loader_version_minor = ($is_version_major_double_digit) ? (int)substr( $ioncube_loader_iversion, 2, 2 ) : (int)substr( $ioncube_loader_iversion, 1, 2 );
$ioncube_loader_version_revision = ($is_version_major_double_digit) ? (int)substr( $ioncube_loader_iversion, 4, 2 ) : (int)substr( $ioncube_loader_iversion, 3, 2 );
$ioncube_loader_version = "$ioncube_loader_version_major.$ioncube_loader_version_minor.$ioncube_loader_version_revision";
} else {
$ioncube_loader_version = ioncube_loader_version();
$ioncube_loader_version_major = (int)substr( $ioncube_loader_version, 0, 1 );
$ioncube_loader_version_minor = (int)substr( $ioncube_loader_version, 2, 1 );
}
if ( $ioncube_loader_version_major > 4 || ( $ioncube_loader_version_major == 4 && $ioncube_loader_version_minor >= 4 ) ) {
// echo '<div class="updated" style="padding:5px 10px 10px 10px;"><h3>IonCube loader v' . $ioncube_loader_version . ' is <span style="color:green;font-weight:bold;">AVAILABLE</span> on this web server.</h3></div>';
}
else {
echo '<div class="updated" style="padding:5px 10px 10px 10px;"><h3>IonCube loader v' . $ioncube_loader_version . ' is installed on this web server.</h3>This is an out of date version, and you need to contact your webhost to upgrade to IonCube Loader 4.4 or higher.</div>';
}
} else {
echo '<div class="error" style="padding:5x 10px 10px 10px;"><h3>The IonCube loader is <span style="color:red;font-weight:bold;">NOT AVAILABLE</span> on this web server.</h3>' .
'Please contact your web host for assistance installing the required "ionCube Loader" on your web server.</div>';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment