Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/smart-sl.../Nextend/SmartSli...
File: SmartSlider3Info.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
namespace Nextend\SmartSlider3;
[3] Fix | Delete
[4] Fix | Delete
use Nextend\Framework\Api;
[5] Fix | Delete
use Nextend\Framework\Asset\Js\Js;
[6] Fix | Delete
use Nextend\Framework\Notification\Notification;
[7] Fix | Delete
use Nextend\Framework\Platform\Platform;
[8] Fix | Delete
use Nextend\Framework\Request\Request;
[9] Fix | Delete
use Nextend\Framework\Url\Url;
[10] Fix | Delete
use Nextend\Framework\Url\UrlHelper;
[11] Fix | Delete
use Nextend\SmartSlider3\Application\ApplicationSmartSlider3;
[12] Fix | Delete
use Nextend\SmartSlider3\Application\Model\ModelLicense;
[13] Fix | Delete
[14] Fix | Delete
class SmartSlider3Info {
[15] Fix | Delete
[16] Fix | Delete
public static $version = '3.5.1.23';
[17] Fix | Delete
[18] Fix | Delete
public static $channel = 'stable';
[19] Fix | Delete
[20] Fix | Delete
public static $revision = '6f970dc23857c3e246accfe12a70f558ff6f8749';
[21] Fix | Delete
[22] Fix | Delete
public static $revisionShort = '6f970dc2';
[23] Fix | Delete
[24] Fix | Delete
public static $branch = 'release-3.5.1.23';
[25] Fix | Delete
[26] Fix | Delete
public static $completeVersion;
[27] Fix | Delete
[28] Fix | Delete
public static $completeVersionReadable;
[29] Fix | Delete
[30] Fix | Delete
public static $plan = 'pro';
[31] Fix | Delete
[32] Fix | Delete
public static $product = 'smartslider3';
[33] Fix | Delete
[34] Fix | Delete
public static $campaign = 'smartslider3';
[35] Fix | Delete
[36] Fix | Delete
public static $source = '';
[37] Fix | Delete
[38] Fix | Delete
public static $forceDesktop = false;
[39] Fix | Delete
[40] Fix | Delete
public static $forceAllDevices = false;
[41] Fix | Delete
[42] Fix | Delete
public static function init() {
[43] Fix | Delete
[44] Fix | Delete
self::$completeVersion = self::$version . '/b:' . self::$branch . '/r:' . self::$revision;
[45] Fix | Delete
[46] Fix | Delete
self::$completeVersionReadable = self::$version . 'r' . self::$revisionShort;
[47] Fix | Delete
self::$plan = 'free';
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
public static function shouldSkipLicenseModal() {
[51] Fix | Delete
return true;
[52] Fix | Delete
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
public static function applySource(&$params) {
[56] Fix | Delete
[57] Fix | Delete
if (!empty(self::$source)) {
[58] Fix | Delete
$params['source'] = self::$source;
[59] Fix | Delete
}
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
public static function getProUrlHome($params = array()) {
[63] Fix | Delete
self::applySource($params);
[64] Fix | Delete
[65] Fix | Delete
return 'https://smartslider3.com/?' . http_build_query($params);
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
public static function getProUrlPricing($params = array()) {
[69] Fix | Delete
self::applySource($params);
[70] Fix | Delete
[71] Fix | Delete
return 'https://smartslider3.com/pricing/?' . http_build_query($params);
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
public static function decorateExternalUrl($url, $params = array()) {
[75] Fix | Delete
[76] Fix | Delete
self::applySource($params);
[77] Fix | Delete
[78] Fix | Delete
$params['utm_campaign'] = self::$campaign;
[79] Fix | Delete
$params['utm_medium'] = 'smartslider-' . Platform::getName() . '-' . self::$plan;
[80] Fix | Delete
[81] Fix | Delete
return UrlHelper::add_query_arg($params, $url);
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
public static function getWhyProUrl($params = array()) {
[85] Fix | Delete
self::applySource($params);
[86] Fix | Delete
[87] Fix | Delete
$params['utm_campaign'] = self::$campaign;
[88] Fix | Delete
$params['utm_medium'] = 'smartslider-' . Platform::getName() . '-' . self::$plan;
[89] Fix | Delete
[90] Fix | Delete
[91] Fix | Delete
return 'https://smartslider3.com/features/?' . http_build_query($params);
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
public static function getSampleSlidesUrl($params = array()) {
[95] Fix | Delete
self::applySource($params);
[96] Fix | Delete
return 'https://smartslider3.com/slides/' . self::$version . '/free/?' . http_build_query($params);
[97] Fix | Delete
[98] Fix | Delete
}
[99] Fix | Delete
[100] Fix | Delete
public static function getActivationUrl($params = array()) {
[101] Fix | Delete
self::applySource($params);
[102] Fix | Delete
[103] Fix | Delete
return 'https://secure.nextendweb.com/activate/?' . http_build_query($params);
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
public static function getUpdateInfo() {
[107] Fix | Delete
return array(
[108] Fix | Delete
'name' => 'smartslider3',
[109] Fix | Delete
'plugin' => 'nextend-smart-slider3-pro/nextend-smart-slider3-pro.php'
[110] Fix | Delete
);
[111] Fix | Delete
}
[112] Fix | Delete
[113] Fix | Delete
public static function getDomain() {
[114] Fix | Delete
$domain = parse_url(Url::getSiteUri(), PHP_URL_HOST);
[115] Fix | Delete
if (empty($domain)) {
[116] Fix | Delete
if (Request::$SERVER->getVar('HTTP_HOST') !== null) {
[117] Fix | Delete
[118] Fix | Delete
$domain = Request::$SERVER->getVar('HTTP_HOST');
[119] Fix | Delete
}
[120] Fix | Delete
if (empty($domain) && Request::$SERVER->getVar('SERVER_NAME') !== null) {
[121] Fix | Delete
[122] Fix | Delete
$domain = Request::$SERVER->getVar('SERVER_NAME');
[123] Fix | Delete
}
[124] Fix | Delete
}
[125] Fix | Delete
[126] Fix | Delete
return $domain;
[127] Fix | Delete
}
[128] Fix | Delete
[129] Fix | Delete
public static function api($_posts, $returnUrl = false) {
[130] Fix | Delete
$isPro = 0;
[131] Fix | Delete
[132] Fix | Delete
$posts = array(
[133] Fix | Delete
'product' => self::$product,
[134] Fix | Delete
'pro' => $isPro
[135] Fix | Delete
);
[136] Fix | Delete
[137] Fix | Delete
return Api::api($_posts + $posts, $returnUrl);
[138] Fix | Delete
}
[139] Fix | Delete
[140] Fix | Delete
public static function hasApiError($status, $data = array()) {
[141] Fix | Delete
extract($data);
[142] Fix | Delete
switch ($status) {
[143] Fix | Delete
case 'OK':
[144] Fix | Delete
return false;
[145] Fix | Delete
case 'PRODUCT_ASSET_NOT_AVAILABLE':
[146] Fix | Delete
Notification::error(sprintf(n2_('Demo slider is not available with the following ID: %s'), $key));
[147] Fix | Delete
break;
[148] Fix | Delete
case 'ASSET_PREMIUM':
[149] Fix | Delete
Notification::error('Premium sliders are available in Pro version only!');
[150] Fix | Delete
break;
[151] Fix | Delete
case 'ASSET_VERSION':
[152] Fix | Delete
Notification::error('Please <a href="https://smartslider.helpscoutdocs.com/article/1752-update" target="_blank">update</a> your Smart Slider to the latest version to be able to import the selected sample slider!');
[153] Fix | Delete
break;
[154] Fix | Delete
case 'LICENSE_EXPIRED':
[155] Fix | Delete
Notification::error('Your license has <a href="https://smartslider.helpscoutdocs.com/article/1718-activation#nopackage" target="_blank">expired</a>! Get new one: <a href="https://smartslider3.com/pricing" target="_blank">smartslider3.com</a>.');
[156] Fix | Delete
break;
[157] Fix | Delete
case 'DOMAIN_REGISTER_FAILED':
[158] Fix | Delete
Notification::error('Smart Slider 3 Pro license is not registered on the current website. Please activate this website by following <a href="https://smartslider.helpscoutdocs.com/article/1718-activation" target="_blank">the license activation documentation</a>.');
[159] Fix | Delete
break;
[160] Fix | Delete
case 'LICENSE_INVALID':
[161] Fix | Delete
Notification::error('Smart Slider 3 Pro license is not registered on the current website. Please activate this website by following <a href="https://smartslider.helpscoutdocs.com/article/1718-activation" target="_blank">the license activation documentation</a>.');
[162] Fix | Delete
ModelLicense::getInstance()
[163] Fix | Delete
->setKey('');
[164] Fix | Delete
[165] Fix | Delete
return 'dashboard';
[166] Fix | Delete
break;
[167] Fix | Delete
case 'UPDATE_ERROR':
[168] Fix | Delete
Notification::error('Update error, please update manually!');
[169] Fix | Delete
break;
[170] Fix | Delete
case 'PLATFORM_NOT_ALLOWED':
[171] Fix | Delete
Notification::error(sprintf('Your license is not valid for Smart Slider3 - %s!', Platform::getLabel()));
[172] Fix | Delete
break;
[173] Fix | Delete
case 'ERROR_HANDLED':
[174] Fix | Delete
break;
[175] Fix | Delete
case '503':
[176] Fix | Delete
Notification::error('Licensing server is down. Please try again later.');
[177] Fix | Delete
break;
[178] Fix | Delete
case null:
[179] Fix | Delete
Notification::error('Licensing server not reachable. Please allow outgoing connection to the following ip addresses: 139.162.190.63, 172.104.28.39');
[180] Fix | Delete
break;
[181] Fix | Delete
default:
[182] Fix | Delete
Notification::error('Debug: ' . $status);
[183] Fix | Delete
Notification::error('Licensing server not reachable. Please allow outgoing connection to the following ip addresses: 139.162.190.63, 172.104.28.39');
[184] Fix | Delete
break;
[185] Fix | Delete
}
[186] Fix | Delete
[187] Fix | Delete
return true;
[188] Fix | Delete
}
[189] Fix | Delete
[190] Fix | Delete
public static function initLicense() {
[191] Fix | Delete
}
[192] Fix | Delete
[193] Fix | Delete
public static function sliderChanged() {
[194] Fix | Delete
do_action('smartslider3_slider_changed');
[195] Fix | Delete
[196] Fix | Delete
}
[197] Fix | Delete
}
[198] Fix | Delete
[199] Fix | Delete
SmartSlider3Info::init();
[200] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function