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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/popup-bu.../com/classes
File: Actions.php
foreach ($rows as $value) {
[1500] Fix | Delete
$content .= $value;
[1501] Fix | Delete
if ($value != 'popup') {
[1502] Fix | Delete
$content .= ',';
[1503] Fix | Delete
}
[1504] Fix | Delete
}
[1505] Fix | Delete
$content .= "\n";
[1506] Fix | Delete
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- No applicable variables for this query.
[1507] Fix | Delete
$subscribers = $wpdb->get_results($query, ARRAY_A);
[1508] Fix | Delete
[1509] Fix | Delete
$subscribers = apply_filters('sgpbSubscribersCsv', $subscribers);
[1510] Fix | Delete
[1511] Fix | Delete
foreach($subscribers as $values) {
[1512] Fix | Delete
foreach ($values as $key => $value) {
[1513] Fix | Delete
$content .= $value;
[1514] Fix | Delete
if ($key != 'subscriptionTitle') {
[1515] Fix | Delete
$content .= ',';
[1516] Fix | Delete
}
[1517] Fix | Delete
}
[1518] Fix | Delete
$content .= "\n";
[1519] Fix | Delete
}
[1520] Fix | Delete
[1521] Fix | Delete
$content = apply_filters('sgpbSubscribersContent', $content);
[1522] Fix | Delete
[1523] Fix | Delete
header('Pragma: public');
[1524] Fix | Delete
header('Expires: 0');
[1525] Fix | Delete
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
[1526] Fix | Delete
header('Cache-Control: private', false);
[1527] Fix | Delete
header('Content-Type: application/octet-stream');
[1528] Fix | Delete
header('Content-Disposition: attachment; filename=subscribersList.csv;');
[1529] Fix | Delete
header('Content-Transfer-Encoding: binary');
[1530] Fix | Delete
echo wp_kses($content, AdminHelper::allowed_html_tags());
[1531] Fix | Delete
}
[1532] Fix | Delete
[1533] Fix | Delete
public function getSystemInfoFile()
[1534] Fix | Delete
{
[1535] Fix | Delete
$allowToAction = AdminHelper::userCanAccessTo();
[1536] Fix | Delete
if (!$allowToAction) {
[1537] Fix | Delete
return false;
[1538] Fix | Delete
}
[1539] Fix | Delete
[1540] Fix | Delete
$content = AdminHelper::getSystemInfoText();
[1541] Fix | Delete
[1542] Fix | Delete
header('Pragma: public');
[1543] Fix | Delete
header('Expires: 0');
[1544] Fix | Delete
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
[1545] Fix | Delete
header('Cache-Control: private', false);
[1546] Fix | Delete
header('Content-Type: application/octet-stream');
[1547] Fix | Delete
header('Content-Disposition: attachment; filename=popupBuilderSystemInfo.txt;');
[1548] Fix | Delete
header('Content-Transfer-Encoding: binary');
[1549] Fix | Delete
[1550] Fix | Delete
echo wp_kses($content, AdminHelper::allowed_html_tags());
[1551] Fix | Delete
}
[1552] Fix | Delete
[1553] Fix | Delete
public function saveSettings()
[1554] Fix | Delete
{
[1555] Fix | Delete
$allowToAction = AdminHelper::userCanAccessTo();
[1556] Fix | Delete
$nonce = isset($_POST['sgpb_saveSettings_nonce']) ? sanitize_text_field($_POST['sgpb_saveSettings_nonce']): '';
[1557] Fix | Delete
if (!$allowToAction || !wp_verify_nonce($nonce, 'sgpbSaveSettings')) {
[1558] Fix | Delete
wp_redirect(get_home_url());
[1559] Fix | Delete
exit();
[1560] Fix | Delete
}
[1561] Fix | Delete
[1562] Fix | Delete
$deleteData = 0;
[1563] Fix | Delete
$enableDebugMode = 0;
[1564] Fix | Delete
$disableAnalytics = 0;
[1565] Fix | Delete
[1566] Fix | Delete
if (isset($_POST['sgpb-dont-delete-data'])) {
[1567] Fix | Delete
$deleteData = 1;
[1568] Fix | Delete
}
[1569] Fix | Delete
if (isset($_POST['sgpb-enable-debug-mode'])) {
[1570] Fix | Delete
$enableDebugMode = 1;
[1571] Fix | Delete
}
[1572] Fix | Delete
if (isset($_POST['sgpb-disable-custom-js'])) {
[1573] Fix | Delete
$disableCustomJs = 1;
[1574] Fix | Delete
}
[1575] Fix | Delete
if (isset($_POST['sgpb-disable-analytics-general'])) {
[1576] Fix | Delete
$disableAnalytics = 1;
[1577] Fix | Delete
}
[1578] Fix | Delete
if (!empty($_POST['sgpb-user-roles'])){
[1579] Fix | Delete
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
[1580] Fix | Delete
$userRoles = $_POST['sgpb-user-roles'];
[1581] Fix | Delete
array_walk_recursive($userRoles, function(&$item){
[1582] Fix | Delete
$item = sanitize_text_field($item);
[1583] Fix | Delete
});
[1584] Fix | Delete
update_option('sgpb-user-roles', $userRoles);
[1585] Fix | Delete
}
[1586] Fix | Delete
update_option('sgpb-dont-delete-data', $deleteData);
[1587] Fix | Delete
update_option('sgpb-enable-debug-mode', $enableDebugMode);
[1588] Fix | Delete
update_option('sgpb-disable-analytics-general', $disableAnalytics);
[1589] Fix | Delete
update_option('sgpb-disable-custom-js', $disableCustomJs);
[1590] Fix | Delete
[1591] Fix | Delete
AdminHelper::filterUserCapabilitiesForTheUserRoles('save');
[1592] Fix | Delete
[1593] Fix | Delete
wp_redirect(admin_url().'edit.php?post_type='.SG_POPUP_POST_TYPE.'&page='.SG_POPUP_SETTINGS_PAGE);
[1594] Fix | Delete
}
[1595] Fix | Delete
[1596] Fix | Delete
/*
[1597] Fix | Delete
* this method will add a filter to exclude the current post from popup list
[1598] Fix | Delete
* which have a post_type=popupbuilder and it is on post edit page
[1599] Fix | Delete
* */
[1600] Fix | Delete
public function postExcludeFromPopupsList(){
[1601] Fix | Delete
global $pagenow;
[1602] Fix | Delete
if ( isset($pagenow) && $pagenow === 'post.php') {
[1603] Fix | Delete
if (get_post_type() === SG_POPUP_POST_TYPE){
[1604] Fix | Delete
add_filter('sgpb_exclude_from_popups_list', function($excludedPopups) {
[1605] Fix | Delete
array_push($excludedPopups, get_the_ID());
[1606] Fix | Delete
return $excludedPopups;
[1607] Fix | Delete
});
[1608] Fix | Delete
}
[1609] Fix | Delete
}
[1610] Fix | Delete
}
[1611] Fix | Delete
}
[1612] Fix | Delete
[1613] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function