name = 'installer';
}
/**
* put your comment there...
*
*/
protected function doListen() {
// If not installed and not in manage page display admin notice!
if (!CJTPlugin::getInstance()->isInstalled() && $this->hasAccess()) {
add_action('admin_notices', array(&$this, 'notInstalledAdminNotice'));
}
//if ( class_exists( 'CJTPlus' ) && $this->isOldCJTPlus()) add_action( 'admin_notices', [ $this, '_oldCJTPlusDetected' ] );
}
protected function isOldCJTPlus()
{
if ( ! function_exists( 'get_plugin_data' ) ) require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$reflector = new \ReflectionClass( 'CJTPlus' );
$CJTPlusVersion = get_plugin_data( str_replace( 'plus.class', 'plus', $reflector->getFileName() ) )['Version'];
if ( version_compare( $CJTPlusVersion, '8.4', '<=' ) ) return true;
return false;
}
public function _oldCJTPlusDetected()
{
$class = 'notice notice-error';
$message = __( 'You are currently using CJT PLUS version 8.4 or under. Unfortunately, this version is not optimized for the new Gutenberg Editor.
Please make sure you have added your license key and update CJT PLUS with the latest version. If your license has expired, please click to: purchase a new subscription.
If you wish to continue using your current version, it may be best to roll back to: CJT Free - version 8.4.2' );
printf( '
%2$s