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/popup-bu.../com/helpers
File: PopupBuilderActivePackage.php
<?php
[0] Fix | Delete
namespace sgpb;
[1] Fix | Delete
[2] Fix | Delete
class PopupBuilderActivePackage
[3] Fix | Delete
{
[4] Fix | Delete
// sections and additional options array
[5] Fix | Delete
private static $sections = array();
[6] Fix | Delete
[7] Fix | Delete
public static function init()
[8] Fix | Delete
{
[9] Fix | Delete
self::$sections = array(
[10] Fix | Delete
'userStatus' => array('min-version' => SGPB_POPUP_PRO_MIN_VERSION, 'min-pkg' => SGPB_POPUP_PKG_SILVER, 'name' => 'userStatus'),
[11] Fix | Delete
'popupConditionsSection' => array('min-version' => SGPB_POPUP_PRO_MIN_VERSION, 'min-pkg' => SGPB_POPUP_PKG_SILVER, 'name' => 'popupConditionsSection'),
[12] Fix | Delete
'popupOtherConditionsSection' => array('min-version' => SGPB_POPUP_PRO_MIN_VERSION, 'min-pkg' => SGPB_POPUP_PKG_SILVER, 'name' => 'popupOtherConditionsSection')
[13] Fix | Delete
);
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
public static function canUseSection($optionName)
[17] Fix | Delete
{
[18] Fix | Delete
if (!isset(self::$sections[$optionName])) {
[19] Fix | Delete
return false;
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
return self::checkVersionAndPackage(self::$sections[$optionName]);
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
public static function canUseOption($optionName)
[26] Fix | Delete
{
[27] Fix | Delete
global $SGPB_OPTIONS;
[28] Fix | Delete
$currentOption = array();
[29] Fix | Delete
[30] Fix | Delete
foreach ($SGPB_OPTIONS as $option) {
[31] Fix | Delete
if ($option['name'] == $optionName) {
[32] Fix | Delete
$currentOption = $option;
[33] Fix | Delete
break;
[34] Fix | Delete
}
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
return self::checkVersionAndPackage($currentOption);
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
private static function checkVersionAndPackage($option)
[41] Fix | Delete
{
[42] Fix | Delete
$currentOptionSupportedMinVersion = '';
[43] Fix | Delete
$currentOptionSupportedMinPackage = '';
[44] Fix | Delete
[45] Fix | Delete
if (isset($option['min-version'])) {
[46] Fix | Delete
$currentOptionSupportedMinVersion = $option['min-version'];
[47] Fix | Delete
}
[48] Fix | Delete
if (isset($option['min-pkg'])) {
[49] Fix | Delete
$currentOptionSupportedMinPackage = $option['min-pkg'];
[50] Fix | Delete
}
[51] Fix | Delete
$optionAvailable = apply_filters('sgpbOptionAvailable', $option);
[52] Fix | Delete
[53] Fix | Delete
// it can change option availability from extensions
[54] Fix | Delete
if (isset($optionAvailable['status'])) {
[55] Fix | Delete
return $optionAvailable['status'];
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
if ($currentOptionSupportedMinVersion <= SGPB_POPUP_VERSION) {
[59] Fix | Delete
if ($currentOptionSupportedMinPackage <= SGPB_POPUP_PKG) {
[60] Fix | Delete
return true;
[61] Fix | Delete
}
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
return false;
[65] Fix | Delete
}
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
PopupBuilderActivePackage::init();
[69] Fix | Delete
[70] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function