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/clone/wp-conte.../plugins/popup-bu.../com/classes/popups
File: ImagePopup.php
<?php
[0] Fix | Delete
namespace sgpb;
[1] Fix | Delete
require_once(dirname(__FILE__).'/SGPopup.php');
[2] Fix | Delete
[3] Fix | Delete
class ImagePopup extends SGPopup
[4] Fix | Delete
{
[5] Fix | Delete
public function save()
[6] Fix | Delete
{
[7] Fix | Delete
$imageData = '';
[8] Fix | Delete
$savedImageUrl = '';
[9] Fix | Delete
$data = $this->getSanitizedData();
[10] Fix | Delete
$imageUrl = isset($data['sgpb-image-url']) ? $data['sgpb-image-url'] : '';
[11] Fix | Delete
$savedPopup = $this->getSavedPopup();
[12] Fix | Delete
[13] Fix | Delete
if (is_object($savedPopup)) {
[14] Fix | Delete
$imageData = $savedPopup->getOptionvalue('sgpb-image-data');
[15] Fix | Delete
$savedImageUrl = $savedPopup->getOptionValue('sgpb-image-url');
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
$data['sgpb-image-url'] = $imageUrl;
[19] Fix | Delete
$this->setSanitizedData($data);
[20] Fix | Delete
[21] Fix | Delete
parent::save();
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
public function getOptionValue($optionName, $forceDefaultValue = false)
[25] Fix | Delete
{
[26] Fix | Delete
return parent::getOptionValue($optionName, $forceDefaultValue);
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
public function getPopupTypeOptionsView()
[30] Fix | Delete
{
[31] Fix | Delete
return array(
[32] Fix | Delete
'filePath' => SG_POPUP_TYPE_MAIN_PATH.'image.php',
[33] Fix | Delete
'metaboxTitle' => __('Image Settings', 'popup-builder'),
[34] Fix | Delete
'short_description' => 'Upload your feature image for the popup'
[35] Fix | Delete
);
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
public function getRemoveOptions()
[39] Fix | Delete
{
[40] Fix | Delete
[41] Fix | Delete
// Where 1 mean this options must not show for this popup type
[42] Fix | Delete
$removeOptions = array(
[43] Fix | Delete
'sgpb-reopen-after-form-submission' => 1,
[44] Fix | Delete
'sgpb-background-image' => 1,
[45] Fix | Delete
'sgpb-background-image-mode' => 1,
[46] Fix | Delete
'sgpb-force-rtl' => 1,
[47] Fix | Delete
'sgpb-content-padding' => 1
[48] Fix | Delete
);
[49] Fix | Delete
$parentOptions = parent::getRemoveOptions();
[50] Fix | Delete
if ($this->getType() != 'image') {
[51] Fix | Delete
return $parentOptions;
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
return $removeOptions + $parentOptions;
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
public function getPopupTypeMainView()
[58] Fix | Delete
{
[59] Fix | Delete
return array();
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
/**
[63] Fix | Delete
* It returns what the current post supports (for example: title, editor, etc...)
[64] Fix | Delete
*
[65] Fix | Delete
* @since 1.0.0
[66] Fix | Delete
*
[67] Fix | Delete
* @return array
[68] Fix | Delete
*/
[69] Fix | Delete
public static function getPopupTypeSupports()
[70] Fix | Delete
{
[71] Fix | Delete
return array('title');
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
public function getPopupTypeContent()
[75] Fix | Delete
{
[76] Fix | Delete
$id = $this->getId();
[77] Fix | Delete
$imageUrl = $this->getOptionValue('sgpb-image-url');
[78] Fix | Delete
[79] Fix | Delete
$imageAltText = AdminHelper::getImageAltTextByUrl($imageUrl);
[80] Fix | Delete
[81] Fix | Delete
return '<img width="1" height="1" class="sgpb-preloaded-image-'.$id.'" alt="'.$imageAltText.'" src="'.$imageUrl.'" style="position:absolute;right:9999999999999px;">';
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
public function getExtraRenderOptions()
[85] Fix | Delete
{
[86] Fix | Delete
return array();
[87] Fix | Delete
}
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function