'smartslider3',
'plugin' => 'nextend-smart-slider3-pro/nextend-smart-slider3-pro.php'
);
}
public static function getDomain() {
$domain = parse_url(Url::getSiteUri(), PHP_URL_HOST);
if (empty($domain)) {
if (Request::$SERVER->getVar('HTTP_HOST') !== null) {
$domain = Request::$SERVER->getVar('HTTP_HOST');
}
if (empty($domain) && Request::$SERVER->getVar('SERVER_NAME') !== null) {
$domain = Request::$SERVER->getVar('SERVER_NAME');
}
}
return $domain;
}
public static function api($_posts, $returnUrl = false) {
$isPro = 0;
$posts = array(
'product' => self::$product,
'pro' => $isPro
);
return Api::api($_posts + $posts, $returnUrl);
}
public static function hasApiError($status, $data = array()) {
extract($data);
switch ($status) {
case 'OK':
return false;
case 'PRODUCT_ASSET_NOT_AVAILABLE':
Notification::error(sprintf(n2_('Demo slider is not available with the following ID: %s'), $key));
break;
case 'ASSET_PREMIUM':
Notification::error('Premium sliders are available in Pro version only!');
break;
case 'ASSET_VERSION':
Notification::error('Please update your Smart Slider to the latest version to be able to import the selected sample slider!');
break;
case 'LICENSE_EXPIRED':
Notification::error('Your license has expired! Get new one: smartslider3.com.');
break;
case 'DOMAIN_REGISTER_FAILED':
Notification::error('Smart Slider 3 Pro license is not registered on the current website. Please activate this website by following the license activation documentation.');
break;
case 'LICENSE_INVALID':
Notification::error('Smart Slider 3 Pro license is not registered on the current website. Please activate this website by following the license activation documentation.');
ModelLicense::getInstance()
->setKey('');
return 'dashboard';
break;
case 'UPDATE_ERROR':
Notification::error('Update error, please update manually!');
break;
case 'PLATFORM_NOT_ALLOWED':
Notification::error(sprintf('Your license is not valid for Smart Slider3 - %s!', Platform::getLabel()));
break;
case 'ERROR_HANDLED':
break;
case '503':
Notification::error('Licensing server is down. Please try again later.');
break;
case null:
Notification::error('Licensing server not reachable. Please allow outgoing connection to the following ip addresses: 139.162.190.63, 172.104.28.39');
break;
default:
Notification::error('Debug: ' . $status);
Notification::error('Licensing server not reachable. Please allow outgoing connection to the following ip addresses: 139.162.190.63, 172.104.28.39');
break;
}
return true;
}
public static function initLicense() {
}
public static function sliderChanged() {
do_action('smartslider3_slider_changed');
}
}
SmartSlider3Info::init();