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: ConvertToNewVersion.php
$names['showAllPages'] = 'allPages';
[1000] Fix | Delete
$names['allSelectedPages'] = 'allSelectedPages';
[1001] Fix | Delete
$names['allPostsStatus'] = 'allPostsStatus';
[1002] Fix | Delete
$names['showAllPosts'] = 'allPosts';
[1003] Fix | Delete
$names['allSelectedPosts'] = 'allSelectedPosts';
[1004] Fix | Delete
$names['posts-all-categories'] = 'posts-all-categories';
[1005] Fix | Delete
$names['allCustomPostsStatus'] = 'allCustomPostsStatus';
[1006] Fix | Delete
$names['all-custom-posts'] = 'all-custom-posts';
[1007] Fix | Delete
$names['showAllCustomPosts'] = 'showAllCustomPosts';
[1008] Fix | Delete
$names['allSelectedCustomPosts'] = 'allSelectedCustomPosts';
[1009] Fix | Delete
// countdown pro popup type
[1010] Fix | Delete
$names['countdownNumbersBgColor'] = 'sgpb-counter-background-color';
[1011] Fix | Delete
$names['countdownNumbersTextColor'] = 'sgpb-counter-text-color';
[1012] Fix | Delete
$names['sg-due-date'] = 'sgpb-countdown-due-date';
[1013] Fix | Delete
$names['sg-countdown-type'] = 'sgpb-countdown-type';
[1014] Fix | Delete
$names['sg-time-zone'] = 'sgpb-countdown-timezone';
[1015] Fix | Delete
$names['counts-language'] = 'sgpb-countdown-language';
[1016] Fix | Delete
$names['pushToBottom'] = 'sgpb-countdown-show-on-top';
[1017] Fix | Delete
$names['countdown-autoclose'] = 'sgpb-countdown-close-timeout';
[1018] Fix | Delete
// contact form pro popup type
[1019] Fix | Delete
$names['show-form-to-top'] = 'sgpb-contact-show-form-to-top';
[1020] Fix | Delete
$names['contact-name-status'] = 'sgpb-contact-field-name';
[1021] Fix | Delete
$names['contact-name'] = 'sgpb-contact-name-placeholder';
[1022] Fix | Delete
$names['contact-name-required'] = 'sgpb-contact-name-required';
[1023] Fix | Delete
$names['contact-subject-status'] = 'sgpb-contact-field-subject';
[1024] Fix | Delete
$names['contact-subject'] = 'sgpb-contact-subject-placeholder';
[1025] Fix | Delete
$names['contact-subject-required'] = 'sgpb-contact-subject-required';
[1026] Fix | Delete
$names['contact-email'] = 'sgpb-contact-email-placeholder';
[1027] Fix | Delete
$names['contact-message'] = 'sgpb-contact-message-placeholder';
[1028] Fix | Delete
$names['contact-fail-message'] = 'sgpb-contact-error-message';
[1029] Fix | Delete
$names['contact-receive-email'] = 'sgpb-contact-to-email';
[1030] Fix | Delete
$names['contact-validation-message'] = 'sgpb-contact-required-message';
[1031] Fix | Delete
$names['contact-validate-email'] = 'sgpb-contact-invalid-email-message';
[1032] Fix | Delete
$names['contact-inputs-width'] = 'sgpb-contact-inputs-width';
[1033] Fix | Delete
$names['contact-inputs-height'] = 'sgpb-contact-inputs-height';
[1034] Fix | Delete
$names['contact-inputs-border-width'] = 'sgpb-contact-inputs-border-width';
[1035] Fix | Delete
$names['contact-text-input-bgcolor'] = 'sgpb-contact-inputs-bg-color';
[1036] Fix | Delete
$names['contact-text-bordercolor'] = 'sgpb-contact-inputs-border-color';
[1037] Fix | Delete
$names['contact-inputs-color'] = 'sgpb-contact-inputs-text-color';
[1038] Fix | Delete
$names['contact-placeholder-color'] = 'sgpb-contact-inputs-placeholder-color';
[1039] Fix | Delete
$names['contact-area-width'] = 'sgpb-contact-message-width';
[1040] Fix | Delete
$names['contact-area-height'] = 'sgpb-contact-message-height';
[1041] Fix | Delete
$names['sg-contact-resize'] = 'sgpb-contact-message-resize';
[1042] Fix | Delete
$names['contact-btn-width'] = 'sgpb-contact-submit-width';
[1043] Fix | Delete
$names['contact-btn-height'] = 'sgpb-contact-submit-height';
[1044] Fix | Delete
$names['contact-btn-title'] = 'sgpb-contact-submit-title';
[1045] Fix | Delete
$names['contact-btn-progress-title'] = 'sgpb-contact-submit-title-progress';
[1046] Fix | Delete
$names['contact-button-bgcolor'] = 'sgpb-contact-submit-bg-color';
[1047] Fix | Delete
$names['contact-button-color'] = 'sgpb-contact-submit-text-color';
[1048] Fix | Delete
$names['dont-show-content-to-contacted-user'] = 'sgpb-contact-hide-for-contacted-users';
[1049] Fix | Delete
$names['contact-success-behavior'] = 'sgpb-contact-success-behavior';
[1050] Fix | Delete
$names['contact-success-message'] = 'sgpb-contact-success-message';
[1051] Fix | Delete
$names['contact-success-redirect-url'] = 'sgpb-contact-success-redirect-URL';
[1052] Fix | Delete
$names['contact-success-redirect-new-tab'] = 'sgpb-contact-success-redirect-new-tab';
[1053] Fix | Delete
$names['contact-success-popups-list'] = 'sgpb-contact-success-popup';
[1054] Fix | Delete
$names['contact-gdpr'] = 'sgpb-contact-gdpr-status';
[1055] Fix | Delete
$names['contact-gdpr-label'] = 'sgpb-contact-gdpr-label';
[1056] Fix | Delete
$names['contact-gdpr-text'] = 'sgpb-contact-gdpr-text';
[1057] Fix | Delete
$names['sgpb-contact-message-bg-color'] = 'sgpb-contact-message-bg-color';
[1058] Fix | Delete
$names['sgpb-contact-message-border-color'] = 'sgpb-contact-message-border-color';
[1059] Fix | Delete
$names['sgpb-contact-message-text-color'] = 'sgpb-contact-message-text-color';
[1060] Fix | Delete
$names['sgpb-contact-message-placeholder-color'] = 'sgpb-contact-message-placeholder-color';
[1061] Fix | Delete
$names['sgpb-contact-message-border-width'] = 'sgpb-contact-message-border-width';
[1062] Fix | Delete
[1063] Fix | Delete
// Social
[1064] Fix | Delete
$names['shareUrlType'] = 'sgpb-social-share-url-type';
[1065] Fix | Delete
$names['sgShareUrl'] = 'sgpb-social-share-url';
[1066] Fix | Delete
$names['sgSocialTheme'] = 'sgpb-social-share-theme';
[1067] Fix | Delete
$names['sgSocialButtonsSize'] = 'sgpb-social-theme-size';
[1068] Fix | Delete
$names['sgSocialLabel'] = 'sgpb-social-show-labels';
[1069] Fix | Delete
$names['sgSocialShareCount'] = 'sgpb-social-share-count';
[1070] Fix | Delete
$names['sgRoundButton'] = 'sgpb-social-round-buttons';
[1071] Fix | Delete
$names['sgEmailStatus'] = 'sgpb-social-status-email';
[1072] Fix | Delete
$names['sgMailLable'] = 'sgpb-social-label-email';
[1073] Fix | Delete
$names['sgFbStatus'] = 'sgpb-social-status-facebook';
[1074] Fix | Delete
$names['fbShareLabel'] = 'sgpb-social-label-facebook';
[1075] Fix | Delete
$names['sgLinkedinStatus'] = 'sgpb-social-status-linkedin';
[1076] Fix | Delete
$names['lindkinLabel'] = 'sgpb-social-label-linkedin';
[1077] Fix | Delete
$names['sgGoogleStatus'] = 'sgpb-social-status-googleplus';
[1078] Fix | Delete
$names['googLelabel'] = 'sgpb-social-label-googleplus';
[1079] Fix | Delete
$names['sgTwitterStatus'] = 'sgpb-social-status-twitter';
[1080] Fix | Delete
$names['twitterLabel'] = 'sgpb-social-label-twitter';
[1081] Fix | Delete
$names['sgPinterestStatus'] = 'sgpb-social-status-pinterest';
[1082] Fix | Delete
$names['pinterestLabel'] = 'sgpb-social-label-pinterest';
[1083] Fix | Delete
[1084] Fix | Delete
// Subscription
[1085] Fix | Delete
$names['subscription-email'] = 'sgpb-subs-email-placeholder';
[1086] Fix | Delete
$names['subs-gdpr'] = 'sgpb-subs-gdpr-status';
[1087] Fix | Delete
$names['subs-gdpr-label'] = 'sgpb-subs-gdpr-label';
[1088] Fix | Delete
$names['subs-gdpr-text'] = 'sgpb-subs-gdpr-text';
[1089] Fix | Delete
$names['subs-first-name-status'] = 'sgpb-subs-first-name-status';
[1090] Fix | Delete
$names['subs-first-name'] = 'sgpb-subs-first-placeholder';
[1091] Fix | Delete
$names['subs-first-name-required'] = 'sgpb-subs-first-name-required';
[1092] Fix | Delete
$names['subs-last-name-status'] = 'sgpb-subs-last-name-status';
[1093] Fix | Delete
$names['subs-last-name'] = 'sgpb-subs-last-placeholder';
[1094] Fix | Delete
$names['subs-last-name-required'] = 'sgpb-subs-last-name-required';
[1095] Fix | Delete
$names['subs-validation-message'] = 'sgpb-subs-validation-message';
[1096] Fix | Delete
$names['subs-text-width'] = 'sgpb-subs-text-width';
[1097] Fix | Delete
$names['subs-text-height'] = 'sgpb-subs-text-height';
[1098] Fix | Delete
$names['subs-text-border-width'] = 'sgpb-subs-text-border-width';
[1099] Fix | Delete
$names['subs-text-input-bgColor'] = 'sgpb-subs-text-bg-color';
[1100] Fix | Delete
$names['subs-text-borderColor'] = 'sgpb-subs-text-border-color';
[1101] Fix | Delete
$names['subs-inputs-color'] = 'sgpb-subs-text-color';
[1102] Fix | Delete
$names['subs-placeholder-color'] = 'sgpb-subs-text-placeholder-color';
[1103] Fix | Delete
$names['subs-btn-width'] = 'sgpb-subs-btn-width';
[1104] Fix | Delete
$names['subs-btn-height'] = 'sgpb-subs-btn-height';
[1105] Fix | Delete
$names['subs-btn-title'] = 'sgpb-subs-btn-title';
[1106] Fix | Delete
$names['subs-btn-progress-title'] = 'sgpb-subs-btn-progress-title';
[1107] Fix | Delete
$names['subs-button-bgColor'] = 'sgpb-subs-btn-bg-color';
[1108] Fix | Delete
$names['subs-button-color'] = 'sgpb-subs-btn-text-color';
[1109] Fix | Delete
$names['subs-success-behavior'] = 'sgpb-subs-success-behavior';
[1110] Fix | Delete
$names['subs-success-message'] = 'sgpb-subs-success-message';
[1111] Fix | Delete
$names['subs-success-redirect-url'] = 'sgpb-subs-success-redirect-URL';
[1112] Fix | Delete
$names['subs-success-redirect-new-tab'] = 'sgpb-subs-success-redirect-new-tab';
[1113] Fix | Delete
$names['subs-success-popups-list'] = 'sgpb-subs-success-popup';
[1114] Fix | Delete
// Subscription new option
[1115] Fix | Delete
$names['sgpb-subs-form-bg-color'] = 'sgpb-subs-form-bg-color';
[1116] Fix | Delete
[1117] Fix | Delete
// Exit Intent extension names
[1118] Fix | Delete
$names['option-exit-intent-enable'] = 'sgpb-option-exit-intent-enable';
[1119] Fix | Delete
$names['option-exit-intent-type'] = 'sgpb-option-exit-intent-type';
[1120] Fix | Delete
$names['option-exit-intent-expire-time'] = 'sgpb-exit-intent-expire-time';
[1121] Fix | Delete
$names['option-exit-intent-cookie-level'] = 'sgpb-exit-intent-cookie-level';
[1122] Fix | Delete
$names['option-exit-intent-soft-from-top'] = 'sgpb-exit-intent-soft-from-top';
[1123] Fix | Delete
[1124] Fix | Delete
// Adblock extension names
[1125] Fix | Delete
$names['option-enable-ad-block'] = 'sgpb-option-enable-ad-block';
[1126] Fix | Delete
// MailChimp extension names
[1127] Fix | Delete
$names['mailchimp-list-id'] = 'sgpb-mailchimp-lists';
[1128] Fix | Delete
$names['mailchimp-double-optin'] = 'sgpb-enable-double-optin';
[1129] Fix | Delete
$names['mailchimp-only-required'] = 'sgpb-show-required-fields';
[1130] Fix | Delete
$names['mailchimp-form-aligment'] = 'sgpb-mailchimp-form-align';
[1131] Fix | Delete
$names['mailchimp-label-aligment'] = 'sgpb-mailchimp-label-alignment';
[1132] Fix | Delete
$names['mailchimp-indicates-required-fields'] = 'sgpb-enable-asterisk-label';
[1133] Fix | Delete
$names['mailchimp-asterisk-label'] = 'sgpb-mailchimp-asterisk-label';
[1134] Fix | Delete
$names['mailchimp-required-error-message'] = 'sgpb-mailchimp-required-message';
[1135] Fix | Delete
$names['mailchimp-email-validate-message'] = 'sgpb-mailchimp-email-message';
[1136] Fix | Delete
$names['mailchimp-email-label'] = 'sgpb-mailchimp-email-label';
[1137] Fix | Delete
$names['mailchimp-error-message'] = 'sgpb-mailchimp-error-message';
[1138] Fix | Delete
$names['mailchimp-show-form-to-top'] = 'sgpb-mailchimp-show-form-to-top';
[1139] Fix | Delete
$names['mailchimp-label-color'] = 'sgpb-mailchimp-label-color';
[1140] Fix | Delete
$names['mailchimp-input-width'] = 'sgpb-mailchimp-input-width';
[1141] Fix | Delete
$names['mailchimp-input-height'] = 'sgpb-mailchimp-input-height';
[1142] Fix | Delete
$names['mailchimp-input-border-radius'] = 'sgpb-mailchimp-border-radius';
[1143] Fix | Delete
$names['mailchimp-input-border-width'] = 'sgpb-mailchimp-border-width';
[1144] Fix | Delete
$names['mailchimp-input-border-color'] = 'sgpb-mailchimp-border-color';
[1145] Fix | Delete
$names['mailchimp-input-bg-color'] = 'sgpb-mailchimp-background-color';
[1146] Fix | Delete
$names['sgpb-mailchimp-input-color'] = 'sgpb-mailchimp-input-color';
[1147] Fix | Delete
$names['mailchimp-submit-title'] = 'sgpb-mailchimp-submit-title';
[1148] Fix | Delete
$names['mailchimp-submit-width'] = 'sgpb-mailchimp-submit-width';
[1149] Fix | Delete
$names['mailchimp-submit-height'] = 'sgpb-mailchimp-submit-height';
[1150] Fix | Delete
$names['mailchimp-submit-border-width'] = 'sgpb-mailchimp-submit-border-width';
[1151] Fix | Delete
$names['mailchimp-submit-border-radius'] = 'sgpb-mailchimp-submit-border-radius';
[1152] Fix | Delete
$names['mailchimp-submit-border-color'] = 'sgpb-mailchimp-submit-border-color';
[1153] Fix | Delete
$names['mailchimp-submit-button-bgcolor'] = 'sgpb-mailchimp-submit-background-color';
[1154] Fix | Delete
$names['mailchimp-submit-color'] = 'sgpb-mailchimp-submit-color';
[1155] Fix | Delete
$names['mailchimp-success-behavior'] = 'sgpb-mailchimp-success-behavior';
[1156] Fix | Delete
$names['mailchimp-success-message'] = 'sgpb-mailchimp-success-message';
[1157] Fix | Delete
$names['mailchimp-success-redirect-url'] = 'sgpb-mailchimp-success-redirect-URL';
[1158] Fix | Delete
$names['mailchimp-success-redirect-new-tab'] = 'sgpb-mailchimp-success-redirect-new-tab';
[1159] Fix | Delete
$names['mailchimp-success-popups-list'] = 'sgpb-mailchimp-success-popup';
[1160] Fix | Delete
$names['mailchimp-close-popup-already-subscribed'] = 'sgpb-mailchimp-close-popup-already-subscribed';
[1161] Fix | Delete
// AWeber extension
[1162] Fix | Delete
$names['sg-aweber-list'] = 'sgpb-aweber-list';
[1163] Fix | Delete
$names['sg-aweber-webform'] = 'sgpb-aweber-signup-form';
[1164] Fix | Delete
$names['aweber-custom-invalid-email-message'] = 'sgpb-aweber-invalid-email';
[1165] Fix | Delete
$names['aweber-invalid-email'] = 'sgpb-aweber-invalid-email-message';
[1166] Fix | Delete
$names['aweber-already-subscribed-message'] = 'sgpb-aweber-custom-subscribed-message';
[1167] Fix | Delete
$names['aweber-required-message'] = 'sgpb-aweber-required-message';
[1168] Fix | Delete
$names['aweber-validate-email-message'] = 'sgpb-aweber-validate-email-message';
[1169] Fix | Delete
$names['aweber-success-behavior'] = 'sgpb-aweber-success-behavior';
[1170] Fix | Delete
$names['aweber-success-message'] = 'sgpb-aweber-success-message';
[1171] Fix | Delete
$names['aweber-success-redirect-url'] = 'sgpb-aweber-success-redirect-URL';
[1172] Fix | Delete
$names['aweber-success-redirect-new-tab'] = 'sgpb-aweber-success-redirect-new-tab';
[1173] Fix | Delete
$names['aweber-success-popups-list'] = 'sgpb-aweber-success-popup';
[1174] Fix | Delete
[1175] Fix | Delete
return $names;
[1176] Fix | Delete
}
[1177] Fix | Delete
[1178] Fix | Delete
public static function saveCustomInserted()
[1179] Fix | Delete
{
[1180] Fix | Delete
global $post;
[1181] Fix | Delete
if (empty($post)) {
[1182] Fix | Delete
return false;
[1183] Fix | Delete
}
[1184] Fix | Delete
[1185] Fix | Delete
$postId = $post->ID;
[1186] Fix | Delete
if (get_option('sgpbSaveOldData'.$postId)) {
[1187] Fix | Delete
return false;
[1188] Fix | Delete
}
[1189] Fix | Delete
[1190] Fix | Delete
update_option('sgpbSaveOldData'.$postId, 1);
[1191] Fix | Delete
[1192] Fix | Delete
add_filter('sgpbConvertedPopupId', 'sgpb\sgpGetCorrectPopupId', 10, 1);
[1193] Fix | Delete
self::saveMetaboxPopup($postId);
[1194] Fix | Delete
$content = get_post_field('post_content', $postId);
[1195] Fix | Delete
SGPopup::deletePostCustomInsertedData($postId);
[1196] Fix | Delete
SGPopup::deletePostCustomInsertedEvents($postId);
[1197] Fix | Delete
// We detect all the popups that were inserted as a custom ones, in the content.
[1198] Fix | Delete
SGPopup::savePopupsFromContentClasses($content, $post);
[1199] Fix | Delete
}
[1200] Fix | Delete
[1201] Fix | Delete
public static function saveMetaboxPopup($postId)
[1202] Fix | Delete
{
[1203] Fix | Delete
$selectedPost = get_post_meta($postId, 'sg_promotional_popup', true);
[1204] Fix | Delete
[1205] Fix | Delete
if (empty($selectedPost)) {
[1206] Fix | Delete
return false;
[1207] Fix | Delete
}
[1208] Fix | Delete
global $SGPB_DATA_CONFIG_ARRAY;
[1209] Fix | Delete
[1210] Fix | Delete
$postType = get_post_type($postId);
[1211] Fix | Delete
$postTitle = get_the_title($postId);
[1212] Fix | Delete
$popupId = sgpGetCorrectPopupId($selectedPost);
[1213] Fix | Delete
$popupTargetParam = $postType.'_selected';
[1214] Fix | Delete
[1215] Fix | Delete
if (!get_post_meta($popupId, 'sg_popup_events')) {
[1216] Fix | Delete
update_post_meta($popupId, 'sg_popup_events', array($SGPB_DATA_CONFIG_ARRAY['events']['initialData']));
[1217] Fix | Delete
}
[1218] Fix | Delete
[1219] Fix | Delete
$savedTarget = get_post_meta($popupId, 'sg_popup_target');
[1220] Fix | Delete
if (empty($savedTarget[0]['sgpb-target'][0])) {
[1221] Fix | Delete
$savedTarget['sgpb-target'][] = array(array('param' => $popupTargetParam, 'operator' => '==', 'value' => array($postId => $postTitle)));
[1222] Fix | Delete
$savedTarget['sgpb-conditions'][] = $SGPB_DATA_CONFIG_ARRAY['conditions']['initialData'];
[1223] Fix | Delete
[1224] Fix | Delete
update_post_meta($popupId, 'sg_popup_target', $savedTarget, true);
[1225] Fix | Delete
return true;
[1226] Fix | Delete
}
[1227] Fix | Delete
$targets = $savedTarget[0]['sgpb-target'][0];
[1228] Fix | Delete
$targetExists = false;
[1229] Fix | Delete
[1230] Fix | Delete
foreach ($targets as $key => $target) {
[1231] Fix | Delete
if ($key == 0 && $target['param'] == 'not_rule') {
[1232] Fix | Delete
$target['param'] = $popupTargetParam;
[1233] Fix | Delete
$savedTarget[0]['sgpb-target'][0][$key]['param'] = $popupTargetParam;
[1234] Fix | Delete
}
[1235] Fix | Delete
if ($target['param'] == $popupTargetParam) {
[1236] Fix | Delete
$targetExists = true;
[1237] Fix | Delete
$targetValue = array();
[1238] Fix | Delete
if (!empty($target['value'])) {
[1239] Fix | Delete
$targetValue = $target['value'];
[1240] Fix | Delete
}
[1241] Fix | Delete
[1242] Fix | Delete
$targetValue[$postId] = $postTitle;
[1243] Fix | Delete
$savedTarget[0]['sgpb-target'][0][$key]['value'] = $targetValue;
[1244] Fix | Delete
break;
[1245] Fix | Delete
}
[1246] Fix | Delete
}
[1247] Fix | Delete
[1248] Fix | Delete
if (!$targetExists) {
[1249] Fix | Delete
$savedTargetsLength = count($savedTarget[0]['sgpb-target'][0]);
[1250] Fix | Delete
$savedTarget[0]['sgpb-target'][0][$savedTargetsLength] = array('param' => $popupTargetParam, 'operator' => '==', 'value' => array($postId => $postTitle));
[1251] Fix | Delete
}
[1252] Fix | Delete
[1253] Fix | Delete
delete_post_meta($postId, 'sg_promotional_popup');
[1254] Fix | Delete
delete_post_meta($popupId, 'sg_popup_target');
[1255] Fix | Delete
update_post_meta($popupId, 'sg_popup_target', $savedTarget[0], true);
[1256] Fix | Delete
[1257] Fix | Delete
return true;
[1258] Fix | Delete
}
[1259] Fix | Delete
}
[1260] Fix | Delete
[1261] Fix | Delete
function sgpGetCorrectPopupId($popupId)
[1262] Fix | Delete
{
[1263] Fix | Delete
$convertedIds = get_option('sgpbConvertedIds');
[1264] Fix | Delete
[1265] Fix | Delete
if (empty($convertedIds) || empty($convertedIds[$popupId])) {
[1266] Fix | Delete
return $popupId;
[1267] Fix | Delete
}
[1268] Fix | Delete
[1269] Fix | Delete
return $convertedIds[$popupId];
[1270] Fix | Delete
}
[1271] Fix | Delete
[1272] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function