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: subscribers.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
require_once(SG_POPUP_CLASSES_PATH.'/dataTable/Subscribers.php');
[5] Fix | Delete
require_once(SG_POPUP_CLASSES_POPUPS_PATH.'SubscriptionPopup.php');
[6] Fix | Delete
require_once(SG_POPUP_HELPERS_PATH.'AdminHelper.php');
[7] Fix | Delete
use sgpb\AdminHelper;
[8] Fix | Delete
use sgpb\SubscriptionPopup;
[9] Fix | Delete
[10] Fix | Delete
$subscribers = SubscriptionPopup::getSubscribersCount();
[11] Fix | Delete
$allData = SubscriptionPopup::getAllSubscriptionForms();
[12] Fix | Delete
[13] Fix | Delete
$fistElement = array_values($allData);
[14] Fix | Delete
if (isset($fistElement[0])) {
[15] Fix | Delete
$fistElement = $fistElement[0];
[16] Fix | Delete
}
[17] Fix | Delete
$subscribersSelectbox = AdminHelper::createSelectBox(
[18] Fix | Delete
$allData,
[19] Fix | Delete
__('Select subscription(s):', 'popup-builder'),
[20] Fix | Delete
array(
[21] Fix | Delete
'name' => 'sgpb-add-subscriber-input',
[22] Fix | Delete
'class' => 'js-sg-select2 js-sg-newsletter-forms sgpb-add-subscriber-input js-select-basic',
[23] Fix | Delete
'multiple' => 'multiple',
[24] Fix | Delete
'autocomplete' => 'off'
[25] Fix | Delete
)
[26] Fix | Delete
);
[27] Fix | Delete
[28] Fix | Delete
$importSubscribersSelectbox = AdminHelper::createSelectBox(
[29] Fix | Delete
$allData,
[30] Fix | Delete
$fistElement,
[31] Fix | Delete
array(
[32] Fix | Delete
'name' => 'sgpb-import-subscriber-input',
[33] Fix | Delete
'class' => 'js-sg-select2 js-sg-import-list sgpb-add-subscriber-input js-select-basic',
[34] Fix | Delete
'autocomplete' => 'off'
[35] Fix | Delete
)
[36] Fix | Delete
);
[37] Fix | Delete
$isEmpty = empty($allData);
[38] Fix | Delete
$disable = '';
[39] Fix | Delete
if ($isEmpty) {
[40] Fix | Delete
$disable = 'disabled';
[41] Fix | Delete
}
[42] Fix | Delete
?>
[43] Fix | Delete
<div class="sgpb sgpb-wrapper ">
[44] Fix | Delete
<div class="sgpb-subscription sgpb-padding-20">
[45] Fix | Delete
<h2 class="sgpb-header-h1 sgpb-margin-top-10 sgpb-margin-bottom-40"><?php esc_html_e('Subscribers', 'popup-builder')?></h2>
[46] Fix | Delete
<div class="sgpb-margin-bottom-20 sgpb-display-flex sgpb-justify-content-between">
[47] Fix | Delete
[48] Fix | Delete
<div>
[49] Fix | Delete
<a href="javascript:void(0)"
[50] Fix | Delete
data-target="addSubscriber"
[51] Fix | Delete
class="sgpb-display-inline-block sgpb-btn sgpb-btn-blue--outline sgpb-btn--rounded sgpb-padding-x-30 sgpb-modal-btn">
[52] Fix | Delete
<?php esc_html_e('Add new', 'popup-builder'); ?>
[53] Fix | Delete
</a>
[54] Fix | Delete
<a href="javascript:void(0)"
[55] Fix | Delete
class="sgpb-display-inline-block sgpb-btn sgpb-btn-blue--outline sgpb-btn--rounded sgpb-padding-x-30 sgpb-export-subscriber">
[56] Fix | Delete
<?php esc_html_e('Export', 'popup-builder'); ?>
[57] Fix | Delete
</a>
[58] Fix | Delete
<a href="javascript:void(0)"
[59] Fix | Delete
data-target="importSubscriber"
[60] Fix | Delete
class="sgpb-display-inline-block sgpb-btn sgpb-btn-blue--outline sgpb-btn--rounded sgpb-padding-x-30 sgpb-modal-btn">
[61] Fix | Delete
<?php esc_html_e('Import', 'popup-builder'); ?>
[62] Fix | Delete
</a>
[63] Fix | Delete
</div>
[64] Fix | Delete
[65] Fix | Delete
[66] Fix | Delete
<div style="text-align: right" id="sgpbPostSearch">
[67] Fix | Delete
<div class="sgpb--group">
[68] Fix | Delete
<input type="text" id="sgpbSearchInAllSubscribers" placeholder="Search Subscriber" class="sgpb-input">
[69] Fix | Delete
<input type="submit" value="GO!" id="sgpbSearchInAllSubscribersSubmit" class="sgpb-btn sgpb-btn-blue">
[70] Fix | Delete
</div>
[71] Fix | Delete
</div>
[72] Fix | Delete
</div>
[73] Fix | Delete
<?php
[74] Fix | Delete
$table = new SGPBSubscribers();
[75] Fix | Delete
echo wp_kses($table, AdminHelper::allowed_html_tags());
[76] Fix | Delete
?>
[77] Fix | Delete
</div>
[78] Fix | Delete
</div>
[79] Fix | Delete
[80] Fix | Delete
<div id="addSubscriber" class="sgpb-display-none">
[81] Fix | Delete
<span id="addSubscriberHeader"><?php esc_html_e('Add New Subscribers', 'popup-builder'); ?></span>
[82] Fix | Delete
<div id="addSubscriberBody">
[83] Fix | Delete
<div class="formItem sgpb-subscriber-adding-error sg-hide-element">
[84] Fix | Delete
<div class="alert alert-danger fade in alert-dismissable">
[85] Fix | Delete
<?php esc_html_e('Error occurred: could not add subscriber.', 'popup-builder')?>
[86] Fix | Delete
</div>
[87] Fix | Delete
</div>
[88] Fix | Delete
<div class="sgpb-add-subscriber-header-spinner-column">
[89] Fix | Delete
<img src="<?php echo esc_url(SG_POPUP_IMG_URL.'ajaxSpinner.gif'); ?>" alt="gif" class="sgpb-subscribers-add-spinner js-sg-spinner js-sgpb-add-spinner sg-hide-element js-sg-import-gif" width="20px">
[90] Fix | Delete
</div>
[91] Fix | Delete
[92] Fix | Delete
<div class="formItem">
[93] Fix | Delete
<?php echo wp_kses($subscribersSelectbox, AdminHelper::allowed_html_tags()); ?>
[94] Fix | Delete
</div>
[95] Fix | Delete
<div class="sg-hide-element sgpb-subscription-error formItem"><?php esc_html_e('Subscription is not selected', 'popup-builder')?>.</div>
[96] Fix | Delete
<div class="formItem">
[97] Fix | Delete
<input type="email" autocomplete="off" name="subs-email" class="sgpb-add-subscribers-email sgpb-add-subscriber-input sgpb-formItem-input" placeholder="<?php esc_html_e('Email', 'popup-builder')?>">
[98] Fix | Delete
</div>
[99] Fix | Delete
<div class="sg-hide-element sgpb-email-error formItem"><?php esc_html_e('Invalid email address', 'popup-builder')?>.</div>
[100] Fix | Delete
<div class="formItem">
[101] Fix | Delete
<input type="text" autocomplete="off" name="subs-firstName" class="sgpb-add-subscribers-first-name sgpb-add-subscriber-input sgpb-formItem-input" placeholder="<?php esc_html_e('First name', 'popup-builder')?>">
[102] Fix | Delete
</div>
[103] Fix | Delete
<div class="formItem">
[104] Fix | Delete
<input type="text" autocomplete="off" name="subs-firstName" class="sgpb-add-subscribers-last-name sgpb-add-subscriber-input sgpb-formItem-input" placeholder="<?php esc_html_e('Last name', 'popup-builder')?>">
[105] Fix | Delete
</div>
[106] Fix | Delete
</div>
[107] Fix | Delete
<div id="addSubscriberFooter">
[108] Fix | Delete
<input type="button" value="<?php esc_html_e('Add to list', 'popup-builder')?>"
[109] Fix | Delete
class="sgpb-btn sgpb-btn-blue sgpb-add-to-list-js" data-ajaxNonce="<?php echo esc_attr(SG_AJAX_NONCE);?>">
[110] Fix | Delete
</div>
[111] Fix | Delete
</div>
[112] Fix | Delete
<div id="importSubscriber" class="sgpb-display-none">
[113] Fix | Delete
<span id="importSubscriberHeader"><?php esc_html_e('Import Subscribers', 'popup-builder'); ?></span>
[114] Fix | Delete
<div id="importSubscriberBody">
[115] Fix | Delete
<div class="formItem">
[116] Fix | Delete
<div class="formItem__title sgpb-margin-bottom-10">
[117] Fix | Delete
<?php esc_html_e('Select subscription(s):', 'popup-builder'); ?>
[118] Fix | Delete
</div>
[119] Fix | Delete
<?php echo wp_kses($importSubscribersSelectbox, AdminHelper::allowed_html_tags()); ?>
[120] Fix | Delete
</div>
[121] Fix | Delete
<div class="formItem">
[122] Fix | Delete
<div class="formItem__title">
[123] Fix | Delete
<?php esc_html_e('Import Subscribers from csv file:', 'popup-builder'); ?>
[124] Fix | Delete
</div>
[125] Fix | Delete
</div>
[126] Fix | Delete
<div class="formItem">
[127] Fix | Delete
<input class="formItem__input formItem__input_sgpb-popup-overlay" id="js-import-subscriber-file-url" type="text" size="36" name="js-import-subscriber-file-url" value="" readonly>
[128] Fix | Delete
<div class="easy-icons-wrapper">
[129] Fix | Delete
<div class="icons__item">
[130] Fix | Delete
<img id="js-import-subscriber-button" class="sgpb-cursor-pointer" src="<?php echo esc_url(SG_POPUP_PUBLIC_URL.'icons/cloud.svg'); ?>" title="<?php esc_html_e('Select file', 'popup-builder')?>" alt="<?php esc_html_e('Select file', 'popup-builder')?>">
[131] Fix | Delete
</div>
[132] Fix | Delete
</div>
[133] Fix | Delete
</div>
[134] Fix | Delete
</div>
[135] Fix | Delete
<div id="importSubscriberFooter">
[136] Fix | Delete
<input type="button" value="<?php esc_html_e('Import', 'popup-builder'); ?>"
[137] Fix | Delete
class="sgpb-btn sgpb-btn-blue sgpb-import-subscriber-to-list" data-ajaxnonce="popupBuilderAjaxNonce" <?php echo esc_attr($disable); ?>>
[138] Fix | Delete
</div>
[139] Fix | Delete
</div>
[140] Fix | Delete
<?php
[141] Fix | Delete
wp_register_script( 'sgpb-subscribers-js-footer', '', array("jquery"), '1.0', true );
[142] Fix | Delete
wp_enqueue_script( 'sgpb-subscribers-js-footer' );
[143] Fix | Delete
wp_add_inline_script( 'sgpb-subscribers-js-footer', "jQuery(document).ready(function($) {
[144] Fix | Delete
const myForm = $('#posts-filter-sgpbAllSubscribers');
[145] Fix | Delete
const searchValue = $('#sgpbAllSubscribers-search-input').val();
[146] Fix | Delete
$('#posts-filter-sgpbAllSubscribers .tablenav.top .tablenav-pages').append($('.subsubsub').addClass('show'));
[147] Fix | Delete
myForm.append($('#posts-filter-sgpbAllSubscribers .tablenav.bottom .tablenav-pages:not(.no-pages, .one-page) .pagination-links'));
[148] Fix | Delete
$('#sgpbSearchInAllSubscribers').val(searchValue);
[149] Fix | Delete
$('#sgpbSearchInAllSubscribers').keyup('enter', function (e) {
[150] Fix | Delete
if (e.key === 'Enter') {
[151] Fix | Delete
$('#sgpbAllSubscribers-search-input').val(this.value);
[152] Fix | Delete
$(myForm).submit();
[153] Fix | Delete
}
[154] Fix | Delete
});
[155] Fix | Delete
$('#sgpbSearchInAllSubscribersSubmit').on('click', function () {
[156] Fix | Delete
$('#sgpbAllSubscribers-search-input').val($('#sgpbSearchInAllSubscribers').val());
[157] Fix | Delete
$(myForm).submit();
[158] Fix | Delete
})
[159] Fix | Delete
});");
[160] Fix | Delete
?>
[161] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function