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.../public/views
File: popupDesignView.php
<?php
[0] Fix | Delete
/* Exit if accessed directly */
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
use sgpb\AdminHelper;
[5] Fix | Delete
use sgpb\PopupBuilderActivePackage;
[6] Fix | Delete
$defaultData = SGPBConfigDataHelper::defaultData();
[7] Fix | Delete
$enablePopupOverlay = PopupBuilderActivePackage::canUseOption('sgpb-enable-popup-overlay');
[8] Fix | Delete
$removedOptions = $popupTypeObj->getRemoveOptions();
[9] Fix | Delete
$popupTheme = $popupTypeObj->getOptionValue('sgpb-popup-themes');
[10] Fix | Delete
$hidePopupBorderOption = ' sg-hide';
[11] Fix | Delete
if ($popupTheme == 'sgpb-theme-2' || $popupTheme == 'sgpb-theme-3') {
[12] Fix | Delete
$hidePopupBorderOption = '';
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
?>
[16] Fix | Delete
<div class="sgpb sgpb-wrapper">
[17] Fix | Delete
<div class="sgpb-design">
[18] Fix | Delete
<?php if (empty($removedOptions['sgpb-force-rtl'])) :?>
[19] Fix | Delete
<div class="formItem formItem_itemsCentered ">
[20] Fix | Delete
<label for="sgpb-force-rtl" class="sgpb-design-label formItem__title">
[21] Fix | Delete
<?php esc_html_e('Force RTL', 'popup-builder')?>:
[22] Fix | Delete
</label>
[23] Fix | Delete
<div class="sgpb-onOffSwitch">
[24] Fix | Delete
<input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-force-rtl" name="sgpb-force-rtl" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-force-rtl')); ?>>
[25] Fix | Delete
<label class="sgpb-onOffSwitch__label" for="sgpb-force-rtl">
[26] Fix | Delete
<span class="sgpb-onOffSwitch-inner"></span>
[27] Fix | Delete
<span class="sgpb-onOffSwitch-switch"></span>
[28] Fix | Delete
</label>
[29] Fix | Delete
</div>
[30] Fix | Delete
</div>
[31] Fix | Delete
<?php endif; ?>
[32] Fix | Delete
<?php if (empty($removedOptions['sgpb-content-padding'])) :?>
[33] Fix | Delete
<div class="formItem formItem_itemsCentered">
[34] Fix | Delete
<span class="formItem__title"><?php esc_html_e('Padding', 'popup-builder')?>:</span>
[35] Fix | Delete
<input type="number" min="0" class="formItem__input" id="content-padding" name="sgpb-content-padding" value="<?php echo esc_attr((int)$popupTypeObj->getOptionValue('sgpb-content-padding')); ?>">
[36] Fix | Delete
<div class="formItem__inputValueType">px</div>
[37] Fix | Delete
<div class="question-mark">B</div>
[38] Fix | Delete
<div class="sgpb-info-wrapper">
[39] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[40] Fix | Delete
<?php esc_html_e('Add some space, in pixels, around your popup content.', 'popup-builder');?>
[41] Fix | Delete
</span>
[42] Fix | Delete
</div>
[43] Fix | Delete
</div>
[44] Fix | Delete
<?php endif; ?>
[45] Fix | Delete
<?php if (empty($removedOptions['sgpb-popup-z-index'])) : ?>
[46] Fix | Delete
<div class="formItem formItem_itemsCentered">
[47] Fix | Delete
<span class="formItem__title"><?php esc_html_e('Popup z-index', 'popup-builder'); ?>:</span>
[48] Fix | Delete
<input type="number" min="1" name="sgpb-popup-z-index" id="sgpb-popup-z-index" class="formItem__input formItem__input_sgpb-pixels" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-popup-z-index')); ?>">
[49] Fix | Delete
<div class="question-mark sgpb-info-icon">B</div>
[50] Fix | Delete
<div class="sgpb-info-wrapper">
[51] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[52] Fix | Delete
<?php esc_html_e('Increase or dicrease the value to set the priority of displaying the popup content in comparison of other elements on the page. The highest value of z-index is 2147483647.', 'popup-builder');?>
[53] Fix | Delete
</span>
[54] Fix | Delete
</div>
[55] Fix | Delete
</div>
[56] Fix | Delete
<?php endif; ?>
[57] Fix | Delete
[58] Fix | Delete
<div class="formItem formItem_itemsCentered">
[59] Fix | Delete
<span class="formItem__title"><?php esc_html_e('Themes', 'popup-builder')?>:</span>
[60] Fix | Delete
<?php AdminHelper::createRadioButtons($defaultData['theme'], "sgpb-popup-themes", esc_html($popupTheme), true, 'bg_img'); ?>
[61] Fix | Delete
</div>
[62] Fix | Delete
<div class="formItem sgpb-disable-border-wrapper<?php echo esc_attr($hidePopupBorderOption) ;?>">
[63] Fix | Delete
<span class="formItem__title"><?php esc_html_e('Disable popup border', 'popup-builder')?>:</span>
[64] Fix | Delete
<div class="sgpb-onOffSwitch">
[65] Fix | Delete
<input type="checkbox" class="sgpb-onOffSwitch-checkbox" id="sgpb-disable-border" name="sgpb-disable-border" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-disable-border', true)); ?>>
[66] Fix | Delete
<label class="sgpb-onOffSwitch__label" for="sgpb-disable-border">
[67] Fix | Delete
<span class="sgpb-onOffSwitch-inner"></span>
[68] Fix | Delete
<span class="sgpb-onOffSwitch-switch"></span>
[69] Fix | Delete
</label>
[70] Fix | Delete
</div>
[71] Fix | Delete
</div>
[72] Fix | Delete
<?php if (empty($removedOptions['sgpb-enable-popup-overlay'])) :?>
[73] Fix | Delete
<?php if (!$enablePopupOverlay): ?>
[74] Fix | Delete
<div class="formItem formItem_lessMargin sgpb-padding-20 sgpb-option-disable"
[75] Fix | Delete
onclick="window.open('<?php echo esc_url(SG_POPUP_ADVANCED_CLOSING_URL);?>', '_blank')">
[76] Fix | Delete
<span class="formItem__title "><?php esc_html_e('Enable popup overlay', 'popup-builder')?>:</span>
[77] Fix | Delete
<div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
[78] Fix | Delete
<input type="checkbox" id="sgpb-enable-popup-overlay" name="sgpb-enable-popup-overlay" disabled>
[79] Fix | Delete
<label class="sgpb-onOffSwitch__label" for="sgpb-enable-popup-overlay">
[80] Fix | Delete
<span class="sgpb-onOffSwitch-inner"></span>
[81] Fix | Delete
<span class="sgpb-onOffSwitch-switch"></span>
[82] Fix | Delete
</label>
[83] Fix | Delete
</div>
[84] Fix | Delete
<div class="question-mark">B</div>
[85] Fix | Delete
<div class="sgpb-info-wrapper">
[86] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[87] Fix | Delete
<?php esc_html_e('If this option is checked, the popup will appear with an overlay.', 'popup-builder');?>
[88] Fix | Delete
</span>
[89] Fix | Delete
</div>
[90] Fix | Delete
<div class="sgpb-unlock-options">
[91] Fix | Delete
<div class="sgpb-unlock-options__icon">
[92] Fix | Delete
<img src="<?php echo esc_url(SG_POPUP_PUBLIC_URL.'icons/time-is-money.svg');?>" alt="Time icon" />
[93] Fix | Delete
</div>
[94] Fix | Delete
<span class="sgpb-unlock-options__title"><?php esc_html_e('Unlock Option', 'popup-builder'); ?></span>
[95] Fix | Delete
</div>
[96] Fix | Delete
</div>
[97] Fix | Delete
<?php else: ?>
[98] Fix | Delete
<div class="formItem formItem_lessMargin">
[99] Fix | Delete
<span class="formItem__title "><?php esc_html_e('Enable popup overlay', 'popup-builder')?>:</span>
[100] Fix | Delete
<div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
[101] Fix | Delete
<input type="checkbox" id="sgpb-enable-popup-overlay" name="sgpb-enable-popup-overlay" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-enable-popup-overlay')); ?> <?php echo esc_attr((!empty($removedOptions['sgpb-enable-popup-overlay'])) ? ' disabled' : '') ?>>
[102] Fix | Delete
<label class="sgpb-onOffSwitch__label" for="sgpb-enable-popup-overlay">
[103] Fix | Delete
<span class="sgpb-onOffSwitch-inner"></span>
[104] Fix | Delete
<span class="sgpb-onOffSwitch-switch"></span>
[105] Fix | Delete
</label>
[106] Fix | Delete
</div>
[107] Fix | Delete
<div class="question-mark">B</div>
[108] Fix | Delete
<div class="sgpb-info-wrapper">
[109] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[110] Fix | Delete
<?php esc_html_e('If this option is checked, the popup will appear with an overlay.', 'popup-builder');?>
[111] Fix | Delete
</span>
[112] Fix | Delete
</div>
[113] Fix | Delete
</div>
[114] Fix | Delete
<?php endif; ?>
[115] Fix | Delete
<div class="formItem sgpb-padding-20 sgpb-width-100 sgpb-bg-black__opacity-02 sgpb-border-radius-5px">
[116] Fix | Delete
<div class="subForm">
[117] Fix | Delete
<div class="subFormItem sgpb-display-flex sgpb-align-item-center">
[118] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20"><?php esc_html_e('Overlay custom css class', 'popup-builder')?>:</span>
[119] Fix | Delete
<input type="text" class="subFormItem__input formItem__input_sgpb-popup-overlay" value="sgpb-popup-overlay">
[120] Fix | Delete
<div class="question-mark">B</div>
[121] Fix | Delete
<div class="sgpb-info-wrapper">
[122] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[123] Fix | Delete
<?php esc_html_e('Add a custom class to the overlay for additional customization.', 'popup-builder');?>
[124] Fix | Delete
</span>
[125] Fix | Delete
</div>
[126] Fix | Delete
</div>
[127] Fix | Delete
<div class="subFormItem sgpb-margin-y-20 sgpb-display-flex sgpb-align-item-center">
[128] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20"><?php esc_html_e('Change color', 'popup-builder')?>:</span>
[129] Fix | Delete
<div class="sgpb-color-picker-wrapper sgpb-position-relative">
[130] Fix | Delete
<input class="sgpb-color-picker sgpb-overlay-color" type="text" name="sgpb-overlay-color" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-overlay-color')); ?>" >
[131] Fix | Delete
</div>
[132] Fix | Delete
</div>
[133] Fix | Delete
<div class="subFormItem sgpb-display-flex sgpb-align-item-center">
[134] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20">
[135] Fix | Delete
<?php esc_html_e('Opacity', 'popup-builder')?>:
[136] Fix | Delete
</span>
[137] Fix | Delete
<div class="sgpb-slider-wrapper sgpb-range-wrap">
[138] Fix | Delete
<div class="slider-wrapper sgpb-display-inline-flex">
[139] Fix | Delete
<?php $overlayOpacity = $popupTypeObj->getOptionValue('sgpb-overlay-opacity'); ?>
[140] Fix | Delete
<input type="range" class="sgpb-range-input js-popup-overlay-opacity sgpb-margin-right-10"
[141] Fix | Delete
name="sgpb-overlay-opacity"
[142] Fix | Delete
id="js-popup-overlay-opacity" min="0.0" step="0.1" max="1" value="<?php echo esc_attr($overlayOpacity)?>">
[143] Fix | Delete
<span class="js-popup-overlay-opacity-value"><?php echo esc_html($overlayOpacity)?></span>
[144] Fix | Delete
</div>
[145] Fix | Delete
</div>
[146] Fix | Delete
</div>
[147] Fix | Delete
</div>
[148] Fix | Delete
</div>
[149] Fix | Delete
<?php endif; ?>
[150] Fix | Delete
<div class="formItem formItem_itemsCentered">
[151] Fix | Delete
<span class="formItem__title"><?php esc_html_e('Content custom css class', 'popup-builder'); ?>:</span>
[152] Fix | Delete
<input type="text" class="formItem__input formItem__input_sgpb-popup-overlay" id="content-custom-class" name="sgpb-content-custom-class" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-content-custom-class'))?>">
[153] Fix | Delete
<div class="question-mark">B</div>
[154] Fix | Delete
<div class="sgpb-info-wrapper">
[155] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[156] Fix | Delete
<?php esc_html_e('Add a custom class to the content for additional customization', 'popup-builder');?>.
[157] Fix | Delete
</span>
[158] Fix | Delete
</div>
[159] Fix | Delete
</div>
[160] Fix | Delete
<?php if (empty($removedOptions['sgpb-show-background'])) :?>
[161] Fix | Delete
<div class="formItem formItem_lessMargin">
[162] Fix | Delete
<span class="formItem__title"><?php esc_html_e('Background settings', 'popup-builder')?>:</span>
[163] Fix | Delete
<div class="sgpb-onOffSwitch sgpb-onOffSwitch_smallLeftMargin">
[164] Fix | Delete
<input type="checkbox" class="sgpb-onOffSwitch-checkbox js-checkbox-accordion" id="sgpb-show-background" name="sgpb-show-background" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-show-background')); ?>>
[165] Fix | Delete
<label class="sgpb-onOffSwitch__label" for="sgpb-show-background">
[166] Fix | Delete
<span class="sgpb-onOffSwitch-inner"></span>
[167] Fix | Delete
<span class="sgpb-onOffSwitch-switch"></span>
[168] Fix | Delete
</label>
[169] Fix | Delete
</div>
[170] Fix | Delete
</div>
[171] Fix | Delete
[172] Fix | Delete
<div class="formItem sg-full-width sgpb-padding-20 sgpb-width-100 sgpb-bg-black__opacity-02 sgpb-border-radius-5px">
[173] Fix | Delete
<div class="subForm">
[174] Fix | Delete
<div class="subFormItem sgpb-display-flex sgpb-align-item-center">
[175] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20"><?php esc_html_e('Color', 'popup-builder'); ?>:</span>
[176] Fix | Delete
<div class="sgpb-color-picker-wrapper unhideColorPicker">
[177] Fix | Delete
<input class="sgpb-color-picker" type="text" name="sgpb-background-color" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-background-color')); ?>" >
[178] Fix | Delete
</div>
[179] Fix | Delete
</div>
[180] Fix | Delete
<div class="subFormItem sgpb-display-flex sgpb-align-item-center sgpb-margin-y-20">
[181] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20"><?php esc_html_e('Opacity', 'popup-builder')?>:</span>
[182] Fix | Delete
<div class="sgpb-slider-wrapper sgpb-range-wrap">
[183] Fix | Delete
<div class="slider-wrapper sgpb-display-inline-flex">
[184] Fix | Delete
<?php $contentOpacity = $popupTypeObj->getOptionValue('sgpb-content-opacity'); ?>
[185] Fix | Delete
<input type="range" name="sgpb-content-opacity" class="sgpb-range-input js-popup-content-opacity sgpb-margin-right-10"
[186] Fix | Delete
id="js-popup-content-opacity" min="0.0" step="0.1" max="1" value="<?php echo esc_attr($contentOpacity)?>">
[187] Fix | Delete
<span class="js-popup-content-opacity-value"><?php echo esc_html($contentOpacity)?></span>
[188] Fix | Delete
</div>
[189] Fix | Delete
</div>
[190] Fix | Delete
</div>
[191] Fix | Delete
<?php if (empty($removedOptions['sgpb-background-image'])) : ?>
[192] Fix | Delete
<div class="subFormItem sgpb-display-flex sgpb-align-item-center sgpb-margin-y-20">
[193] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20"><?php esc_html_e('Image', 'popup-builder');?>:</span>
[194] Fix | Delete
<div class="sgpb-background-image-block-1 sgpb-display-flex subFormBackground sgpb-padding-10 subFormItemImages<?php echo esc_attr((!$popupTypeObj->getOptionValue('sgpb-background-image')) ? ' sgpb-display-none' : '');?>">
[195] Fix | Delete
<div>
[196] Fix | Delete
<div class="sgpb-button-image-uploader-wrapper">
[197] Fix | Delete
<input class="sgpb-display-none" id="js-background-upload-image" type="text" size="36" name="sgpb-background-image" value="<?php echo (esc_attr($popupTypeObj->getOptionValue('sgpb-background-image'))) ? esc_attr($popupTypeObj->getOptionValue('sgpb-background-image')) : '' ; ?>" autocomplete="off">
[198] Fix | Delete
</div>
[199] Fix | Delete
</div>
[200] Fix | Delete
<img class="sgpb-show-background-image-container" src="<?php echo (esc_attr($popupTypeObj->getOptionValue('sgpb-background-image'))) ? esc_attr($popupTypeObj->getOptionValue('sgpb-background-image')) : '' ; ?>" width="200" height="150">
[201] Fix | Delete
<div class="sgpb-margin-left-10 subFormItemIcons">
[202] Fix | Delete
<div class="icons__item">
[203] Fix | Delete
<img class="js-background-upload-image-button" src="<?php echo esc_url(SG_POPUP_PUBLIC_URL.'icons/cloud.svg'); ;?>" alt="<?php esc_html_e('Cloud icon', 'popup-builder');?>">
[204] Fix | Delete
</div>
[205] Fix | Delete
<div class="icons__item icons_pink">
[206] Fix | Delete
<img id="js-background-upload-image-remove-button" src="<?php echo esc_url(SG_POPUP_PUBLIC_URL.'icons/recycle-bin.svg') ;?>" alt="<?php esc_html_e('Recycle Bin', 'popup-builder');?>">
[207] Fix | Delete
</div>
[208] Fix | Delete
</div>
[209] Fix | Delete
</div>
[210] Fix | Delete
<div class="sgpb-background-image-block-2 subFormItemImages <?php echo esc_attr(($popupTypeObj->getOptionValue('sgpb-background-image')) ? ' sgpb-display-none' : '');?>">
[211] Fix | Delete
<div class="subFormBackground sgpb-display-flex sgpb-align-item-center sgpb-padding-x-20">
[212] Fix | Delete
<div class="icons__item">
[213] Fix | Delete
<img class="js-background-upload-image-button" src="<?php echo esc_url(SG_POPUP_PUBLIC_URL.'icons/cloud.svg') ;?>" alt="<?php esc_html_e('Change image', 'popup-builder');?>">
[214] Fix | Delete
</div>
[215] Fix | Delete
<img src="<?php echo esc_url(SG_POPUP_PUBLIC_URL.'images/NoImage.png') ;?>" alt="No Image">
[216] Fix | Delete
</div>
[217] Fix | Delete
</div>
[218] Fix | Delete
</div>
[219] Fix | Delete
<?php endif; ?>
[220] Fix | Delete
<?php if (empty($removedOptions['sgpb-background-image-mode'])) : ?>
[221] Fix | Delete
[222] Fix | Delete
<div class="subFormItem sgpb-display-flex sgpb-align-item-center">
[223] Fix | Delete
<span class="subFormItem__title sgpb-margin-right-20"><?php esc_html_e('Mode', 'popup-builder')?>:</span>
[224] Fix | Delete
<?php echo wp_kses(AdminHelper::createSelectBox($defaultData['backroundImageModes'], $popupTypeObj->getOptionValue('sgpb-background-image-mode'), array('name' => 'sgpb-background-image-mode', 'class'=>'select__select js-sg-select2')), AdminHelper::allowed_html_tags()); ?>
[225] Fix | Delete
<div class="question-mark">B</div>
[226] Fix | Delete
<div class="sgpb-info-wrapper">
[227] Fix | Delete
<span class="infoSelectRepeat samefontStyle sgpb-info-text" style="display: none;">
[228] Fix | Delete
<?php esc_html_e('Choose how the background image will be displayed with your content', 'popup-builder');?>.
[229] Fix | Delete
</span>
[230] Fix | Delete
</div>
[231] Fix | Delete
</div>
[232] Fix | Delete
<?php endif; ?>
[233] Fix | Delete
[234] Fix | Delete
[235] Fix | Delete
</div>
[236] Fix | Delete
</div>
[237] Fix | Delete
<?php endif; ?>
[238] Fix | Delete
</div>
[239] Fix | Delete
</div>
[240] Fix | Delete
<script>
[241] Fix | Delete
jQuery('.js-popup-overlay-opacity, .js-popup-content-opacity').on('change', function () {
[242] Fix | Delete
jQuery(this).siblings('span').text(this.value);
[243] Fix | Delete
})
[244] Fix | Delete
</script>
[245] Fix | Delete
[246] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function