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/clone/wp-conte.../plugins/accelera.../includes
File: admin-script.js
ele.addEventListener('click', function(){
[1000] Fix | Delete
if (ele.innerText == 'Extensions') {
[1001] Fix | Delete
window.location.href = "admin.php?page=amp-extension-manager"
[1002] Fix | Delete
}
[1003] Fix | Delete
}
[1004] Fix | Delete
)
[1005] Fix | Delete
})
[1006] Fix | Delete
}
[1007] Fix | Delete
[1008] Fix | Delete
$(".redux-ampforwp-ext-deactivate").on("click", function(){
[1009] Fix | Delete
var currentThis = $(this);
[1010] Fix | Delete
var plugin_id = currentThis.attr("id");
[1011] Fix | Delete
var secure_nonce = currentThis.parents("li").attr('data-ext-secure');
[1012] Fix | Delete
currentThis.html("Please Wait...");
[1013] Fix | Delete
$deactivateConfirm = confirm("Are you sure you want to Deactivate ?");
[1014] Fix | Delete
if($deactivateConfirm){
[1015] Fix | Delete
$.ajax({
[1016] Fix | Delete
url: ajaxurl,
[1017] Fix | Delete
method: 'post',
[1018] Fix | Delete
data: {action: 'ampforwp_deactivate_license', ampforwp_license_deactivate:plugin_id,
[1019] Fix | Delete
verify_nonce: secure_nonce
[1020] Fix | Delete
},
[1021] Fix | Delete
dataType: 'json',
[1022] Fix | Delete
success: function(response){
[1023] Fix | Delete
currentThis.parents("li").find('.afw-license-response-message').remove();
[1024] Fix | Delete
if(response.status=='200'){
[1025] Fix | Delete
currentThis.parents(".extension_desc").find("input[name='redux_builder_amp[amp-license][amp-ads-google-adsense][license]']").val("");
[1026] Fix | Delete
[1027] Fix | Delete
currentThis.after("<div class='afw-license-response-message'>"+response.message+'</div>');
[1028] Fix | Delete
[1029] Fix | Delete
window.location.href = window.location.href;
[1030] Fix | Delete
}else{
[1031] Fix | Delete
alert(response.message);
[1032] Fix | Delete
currentThis.html("Deactivate");
[1033] Fix | Delete
}
[1034] Fix | Delete
}
[1035] Fix | Delete
})
[1036] Fix | Delete
}
[1037] Fix | Delete
});
[1038] Fix | Delete
[1039] Fix | Delete
}
[1040] Fix | Delete
deactivatelicence();
[1041] Fix | Delete
[1042] Fix | Delete
var helpSection = function(){
[1043] Fix | Delete
var open;
[1044] Fix | Delete
[1045] Fix | Delete
open = true;
[1046] Fix | Delete
[1047] Fix | Delete
$('.a-f-wp-help-tear').click(function() {
[1048] Fix | Delete
if (open) {
[1049] Fix | Delete
$('.a-f-wp-help-tear').addClass('active');
[1050] Fix | Delete
$('.a-f-wp-help-message').addClass('active');
[1051] Fix | Delete
$('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
[1052] Fix | Delete
return open = !open;
[1053] Fix | Delete
} else {
[1054] Fix | Delete
$('.a-f-wp-help-tear').removeClass('active');
[1055] Fix | Delete
$('.a-f-wp-help-message').removeClass('active');
[1056] Fix | Delete
$('.a-f-wp-help-message').val('');
[1057] Fix | Delete
$('.a-f-wp-help-tear').html("<span><i class='dashicons-admin-comments'></i></span>");
[1058] Fix | Delete
return open = !open;
[1059] Fix | Delete
}
[1060] Fix | Delete
});
[1061] Fix | Delete
[1062] Fix | Delete
$('input').on('input', function(e) {
[1063] Fix | Delete
var value;
[1064] Fix | Delete
value = $("input").val();
[1065] Fix | Delete
if (value.length >= 2) {
[1066] Fix | Delete
$('.a-f-wp-help-tear').addClass('green');
[1067] Fix | Delete
$('.a-f-wp-help-tear').removeClass('active');
[1068] Fix | Delete
return $('.a-f-wp-help-tear').html("<span><i class='dashicons-admin-comments'></i></span>");
[1069] Fix | Delete
} else {
[1070] Fix | Delete
$('.a-f-wp-help-tear').removeClass('green');
[1071] Fix | Delete
$('.a-f-wp-help-tear').addClass('active');
[1072] Fix | Delete
return $('.a-f-wp-help-tear').html("<span><i class='dashicons-no-alt'></i></span>");
[1073] Fix | Delete
}
[1074] Fix | Delete
});
[1075] Fix | Delete
}
[1076] Fix | Delete
helpSection();
[1077] Fix | Delete
[1078] Fix | Delete
var redux_title_modify = function(){
[1079] Fix | Delete
$( '.redux-group-tab-link-a' ).on("click", function(){
[1080] Fix | Delete
var link = $( this );
[1081] Fix | Delete
if ( link.parent().hasClass( 'empty_section' ) && link.parent().hasClass( 'hasSubSections' ) ) {
[1082] Fix | Delete
var elements = $( this ).closest( 'ul' ).find( '.redux-group-tab-link-a' );
[1083] Fix | Delete
var index = elements.index( this );
[1084] Fix | Delete
link = elements.slice( index + 1, index + 2 );
[1085] Fix | Delete
}
[1086] Fix | Delete
[1087] Fix | Delete
var el = link.parents( '.redux-container:first' );
[1088] Fix | Delete
var relid = link.data( 'rel' ); // The group ID of interest
[1089] Fix | Delete
var oldid = el.find( '.redux-group-tab-link-li.active:first .redux-group-tab-link-a' ).data( 'rel' );
[1090] Fix | Delete
[1091] Fix | Delete
var panelTitle = el.find( '#' + relid + '_section_group' ).find("h2:first").hide().html();
[1092] Fix | Delete
$('.redux-main').find("#info_bar h2#newTitle").remove();
[1093] Fix | Delete
if (typeof panelTitle !== 'undefined' || panelTitle){
[1094] Fix | Delete
$('.redux-main').find("#info_bar a.expand_options").after('<h2 id="newTitle" style="float: left;margin: 0px;padding-left: 10px;">'+panelTitle+'</h2>');
[1095] Fix | Delete
}
[1096] Fix | Delete
[1097] Fix | Delete
});
[1098] Fix | Delete
$('li.active .redux-group-tab-link-a').click();
[1099] Fix | Delete
}
[1100] Fix | Delete
});
[1101] Fix | Delete
[1102] Fix | Delete
function getQueryStringValue (key) {
[1103] Fix | Delete
return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
[1104] Fix | Delete
}
[1105] Fix | Delete
[1106] Fix | Delete
jQuery(document).ready(function($){
[1107] Fix | Delete
// Dismiss button functionlaity
[1108] Fix | Delete
$('#ampforwp-wizard-notice').on('click', 'button', function(){
[1109] Fix | Delete
var notice = {
[1110] Fix | Delete
'action': 'ampforwp_notice_delete',
[1111] Fix | Delete
};
[1112] Fix | Delete
jQuery.post(ajaxurl, notice, function(response) {
[1113] Fix | Delete
});
[1114] Fix | Delete
});
[1115] Fix | Delete
[1116] Fix | Delete
if(redux_data.ampforwp_css_tree_shaking == '0'){
[1117] Fix | Delete
jQuery('#ampforwp-clear-clearcss-data').addClass('hide');
[1118] Fix | Delete
jQuery('#ampforwp-clear-clcss-msg').html('Please Save Before Clearing Cache');
[1119] Fix | Delete
}
[1120] Fix | Delete
$('#ampforwp-clear-clearcss-data').click(function(e){
[1121] Fix | Delete
$('#ampforwp-clear-clcss-msg').removeClass('hide');
[1122] Fix | Delete
$('#ampforwp-clear-clcss-msg').text(' Please wait').css({'line-height':'25px'});
[1123] Fix | Delete
var datastr = {
[1124] Fix | Delete
'action': 'ampforwp_clear_css_tree_shaking',
[1125] Fix | Delete
'nonce': $(this).attr('data-nonce')
[1126] Fix | Delete
};
[1127] Fix | Delete
jQuery.ajax({
[1128] Fix | Delete
url: ajaxurl,
[1129] Fix | Delete
data: datastr,
[1130] Fix | Delete
dataType: 'json',
[1131] Fix | Delete
success: function(response) {
[1132] Fix | Delete
if(response.status==200){
[1133] Fix | Delete
$('#ampforwp-clear-clcss-msg').text(' '+response.message).css({'line-height':'25px'});
[1134] Fix | Delete
}
[1135] Fix | Delete
}
[1136] Fix | Delete
});
[1137] Fix | Delete
});
[1138] Fix | Delete
// AMP FrontPage notice in Reading Settings #2348
[1139] Fix | Delete
if ( 'false' == redux_data.frontpage){
[1140] Fix | Delete
$('#page_on_front').parent('label').append('<p class="afp" style="margin-left:10px;display:none"><span>We have detected that you have not setup the FrontPage for AMP, </span><a href="'+redux_data.admin_url+'">Click here to setup</a></span>');
[1141] Fix | Delete
}
[1142] Fix | Delete
$('#front-static-pages input[type=radio][name=show_on_front]').on('change', function(e) {
[1143] Fix | Delete
if ( this.value == 'page') {
[1144] Fix | Delete
$('.afp').show();
[1145] Fix | Delete
} else {
[1146] Fix | Delete
$('.afp').hide();
[1147] Fix | Delete
}
[1148] Fix | Delete
});
[1149] Fix | Delete
var sfp = $('#front-static-pages input[type=radio][checked=checked]');
[1150] Fix | Delete
if ( sfp[0] ) {
[1151] Fix | Delete
if(sfp[0].value == 'page'){
[1152] Fix | Delete
$('.afp').show();
[1153] Fix | Delete
}
[1154] Fix | Delete
}
[1155] Fix | Delete
[1156] Fix | Delete
});//(document).ready Closed
[1157] Fix | Delete
[1158] Fix | Delete
jQuery(window).on("YoastSEO:ready",function(){
[1159] Fix | Delete
AmpForWpYoastAnalysis = function() {
[1160] Fix | Delete
YoastSEO.app.registerPlugin( 'ampForWpYoastAnalysis', {status: 'ready'} );
[1161] Fix | Delete
[1162] Fix | Delete
/**
[1163] Fix | Delete
* @param modification {string} The name of the filter
[1164] Fix | Delete
* @param callable {function} The callable
[1165] Fix | Delete
* @param pluginName {string} The plugin that is registering the modification.
[1166] Fix | Delete
* @param priority {number} (optional) Used to specify the order in which the callables
[1167] Fix | Delete
* associated with a particular filter are called. Lower numbers
[1168] Fix | Delete
* correspond with earlier execution.
[1169] Fix | Delete
*/
[1170] Fix | Delete
YoastSEO.app.registerModification( 'content', this.myContentModification, 'ampForWpYoastAnalysis', 5 );
[1171] Fix | Delete
}
[1172] Fix | Delete
[1173] Fix | Delete
/**
[1174] Fix | Delete
* Adds some text to the data...
[1175] Fix | Delete
*
[1176] Fix | Delete
* @param data The data to modify
[1177] Fix | Delete
*/
[1178] Fix | Delete
AmpForWpYoastAnalysis.prototype.myContentModification = function(data) {
[1179] Fix | Delete
if(jQuery('#amp-page-builder-ready').length){
[1180] Fix | Delete
var pbdata = jQuery('#amp-page-builder-ready').html();
[1181] Fix | Delete
var takeover = redux_data['ampforwp-amp-takeover'];
[1182] Fix | Delete
var pb2 = jQuery('input[name="ampforwp_page_builder_enable"]:checked').val();
[1183] Fix | Delete
if ( takeover == 1 && 'yes' == pb2 ) {
[1184] Fix | Delete
data = pbdata;
[1185] Fix | Delete
}
[1186] Fix | Delete
}
[1187] Fix | Delete
return data;
[1188] Fix | Delete
};
[1189] Fix | Delete
new AmpForWpYoastAnalysis();
[1190] Fix | Delete
});
[1191] Fix | Delete
jQuery(document).ready(function($){
[1192] Fix | Delete
$("#redux_builder_amp-swift-sidebar").on( 'change', function(){
[1193] Fix | Delete
var value = $('#redux_builder_amp-swift-sidebar #swift-sidebar').val();
[1194] Fix | Delete
if(value == 1){
[1195] Fix | Delete
$("#single-design-type_2").attr('checked', true);
[1196] Fix | Delete
}else {
[1197] Fix | Delete
$("#single-design-type_1").attr('checked', true);
[1198] Fix | Delete
}
[1199] Fix | Delete
});
[1200] Fix | Delete
//Toggle Post and Page comments panel based on options
[1201] Fix | Delete
if($('#ampforwp-display-on-pages').length>0 && $('#ampforwp-display-on-posts').length>0){
[1202] Fix | Delete
var pageComments = $('#ampforwp-display-on-pages').val();
[1203] Fix | Delete
var postComments = $('#ampforwp-display-on-posts').val();
[1204] Fix | Delete
if( pageComments ==0 && postComments == 0 ){
[1205] Fix | Delete
$('#section-ampforwp-comments').hide();
[1206] Fix | Delete
$('#section-table-ampforwp-comments tbody').hide();
[1207] Fix | Delete
}
[1208] Fix | Delete
}
[1209] Fix | Delete
$("#redux_builder_amp-ampforwp-display-on-posts").on('change','input[type=checkbox]', function(){
[1210] Fix | Delete
var pageComments = $('#ampforwp-display-on-pages').val();
[1211] Fix | Delete
if($(this).is(":checked")) {
[1212] Fix | Delete
$('#section-ampforwp-comments').show();
[1213] Fix | Delete
$('#section-table-ampforwp-comments tbody').show();
[1214] Fix | Delete
}else{
[1215] Fix | Delete
if(pageComments==0){
[1216] Fix | Delete
$('#section-ampforwp-comments').hide();
[1217] Fix | Delete
$('#section-table-ampforwp-comments tbody').hide();
[1218] Fix | Delete
}else{
[1219] Fix | Delete
$('#section-ampforwp-comments').show();
[1220] Fix | Delete
$('#section-table-ampforwp-comments tbody').show();
[1221] Fix | Delete
}
[1222] Fix | Delete
}
[1223] Fix | Delete
});
[1224] Fix | Delete
$("#redux_builder_amp-ampforwp-display-on-pages").on('change','input[type=checkbox]', function(){
[1225] Fix | Delete
var postComments = $('#ampforwp-display-on-posts').val();
[1226] Fix | Delete
if($(this).is(":checked")) {
[1227] Fix | Delete
$('#section-ampforwp-comments').show();
[1228] Fix | Delete
$('#section-table-ampforwp-comments tbody').show();
[1229] Fix | Delete
}else{
[1230] Fix | Delete
if(postComments == 0){
[1231] Fix | Delete
$('#section-ampforwp-comments').hide();
[1232] Fix | Delete
$('#section-table-ampforwp-comments tbody').hide();
[1233] Fix | Delete
}else{
[1234] Fix | Delete
$('#section-ampforwp-comments').show();
[1235] Fix | Delete
$('#section-table-ampforwp-comments tbody').show();
[1236] Fix | Delete
}
[1237] Fix | Delete
[1238] Fix | Delete
}
[1239] Fix | Delete
});
[1240] Fix | Delete
});
[1241] Fix | Delete
[1242] Fix | Delete
// AMPforWP New UX #3520
[1243] Fix | Delete
jQuery(document).ready(function($) {
[1244] Fix | Delete
setTimeout(function(){
[1245] Fix | Delete
var cls = $('.ampforwp-new-ux' ).hasClass('active');
[1246] Fix | Delete
if(cls){
[1247] Fix | Delete
$('#redux-footer-sticky').hide();
[1248] Fix | Delete
}
[1249] Fix | Delete
},10);
[1250] Fix | Delete
$(".redux-group-tab-link-li").on("click", function(){
[1251] Fix | Delete
var this_c_val = $(this).children('a').children('span.group_title').html();
[1252] Fix | Delete
if($(this).hasClass('ampforwp-new-ux') || $(this).hasClass('opt-go-premium')){
[1253] Fix | Delete
$('#redux-footer-sticky').hide();
[1254] Fix | Delete
$('#redux-footer-sticky #redux-footer').addClass("hide");
[1255] Fix | Delete
}else{
[1256] Fix | Delete
$('#redux-footer-sticky').show();
[1257] Fix | Delete
$('#redux-footer-sticky #redux-footer').removeClass("hide");
[1258] Fix | Delete
[1259] Fix | Delete
}
[1260] Fix | Delete
// There is no save button in AMP "Basic setup" #4343
[1261] Fix | Delete
var selected = $(".amp-opt-change:checked").parent().find('label').attr('id');
[1262] Fix | Delete
if(selected=='basic'){
[1263] Fix | Delete
if(!$(this).hasClass('ampforwp-new-ux') && !$(this).hasClass('opt-go-premium')){
[1264] Fix | Delete
$('#redux-footer-sticky').show();
[1265] Fix | Delete
$('#redux-footer-sticky #redux-footer').removeClass("hide");
[1266] Fix | Delete
[1267] Fix | Delete
[1268] Fix | Delete
}else{
[1269] Fix | Delete
$('#redux-footer-sticky').hide();
[1270] Fix | Delete
$('#redux-footer-sticky #redux-footer').addClass("hide");
[1271] Fix | Delete
}
[1272] Fix | Delete
}
[1273] Fix | Delete
});
[1274] Fix | Delete
var new_data = JSON.parse(amp_fields);
[1275] Fix | Delete
var ampforwp_saveChangesInRedux = function($current){
[1276] Fix | Delete
[1277] Fix | Delete
// Save
[1278] Fix | Delete
window.onbeforeunload = null;
[1279] Fix | Delete
if ( redux.args.ajax_save === true ) {
[1280] Fix | Delete
setTimeout(function(){
[1281] Fix | Delete
$.redux.ajax_save( $current, true );
[1282] Fix | Delete
},1);
[1283] Fix | Delete
}
[1284] Fix | Delete
[1285] Fix | Delete
}
[1286] Fix | Delete
var ampCheckRequired = function($current){
[1287] Fix | Delete
var self = $current;
[1288] Fix | Delete
var current_id = self.attr('id');
[1289] Fix | Delete
var current_value = self.val();
[1290] Fix | Delete
var new_data = JSON.parse(amp_fields);
[1291] Fix | Delete
if( self.attr('type') == 'checkbox' ) {
[1292] Fix | Delete
if(self.prop("checked") == true){
[1293] Fix | Delete
current_value = 1;
[1294] Fix | Delete
}
[1295] Fix | Delete
else if(self.prop("checked") == false){
[1296] Fix | Delete
current_value = 0;
[1297] Fix | Delete
}
[1298] Fix | Delete
}
[1299] Fix | Delete
[1300] Fix | Delete
$.each(new_data, function(key,value) {
[1301] Fix | Delete
if (value.field_data.required ){
[1302] Fix | Delete
var required = value.field_data.required;
[1303] Fix | Delete
var child_element = $('#'+value.field_data.id);
[1304] Fix | Delete
var check = true;
[1305] Fix | Delete
switch(required[1]){
[1306] Fix | Delete
case '=':
[1307] Fix | Delete
if( required[0] == current_id){
[1308] Fix | Delete
if( required[2] == current_value){
[1309] Fix | Delete
if( value.field_type == 'checkbox' ) {
[1310] Fix | Delete
$(child_element).parent().parent('div').removeClass('hide');
[1311] Fix | Delete
}
[1312] Fix | Delete
else{
[1313] Fix | Delete
[1314] Fix | Delete
$(child_element).parent('div').removeClass('hide');
[1315] Fix | Delete
}
[1316] Fix | Delete
}
[1317] Fix | Delete
else{
[1318] Fix | Delete
if( value.field_type == 'checkbox' ) {
[1319] Fix | Delete
$(child_element).parent().parent('div').addClass('hide');
[1320] Fix | Delete
}
[1321] Fix | Delete
else{
[1322] Fix | Delete
$(child_element).parent('div').addClass('hide');
[1323] Fix | Delete
}
[1324] Fix | Delete
}
[1325] Fix | Delete
}
[1326] Fix | Delete
break;
[1327] Fix | Delete
[1328] Fix | Delete
case '!=':
[1329] Fix | Delete
if( required[0] == current_id ) {
[1330] Fix | Delete
if(required[2] != current_value){
[1331] Fix | Delete
$(child_element).parent('div').removeClass('hide');
[1332] Fix | Delete
}
[1333] Fix | Delete
else{
[1334] Fix | Delete
$(child_element).parent('div').addClass('hide');
[1335] Fix | Delete
}
[1336] Fix | Delete
}
[1337] Fix | Delete
break;
[1338] Fix | Delete
[1339] Fix | Delete
case 'in_array':
[1340] Fix | Delete
if( required[0] == current_id ){
[1341] Fix | Delete
if(jQuery.inArray(current_value,required[2]) ){
[1342] Fix | Delete
$(child_element).parent('div').removeClass('hide');
[1343] Fix | Delete
}
[1344] Fix | Delete
else{
[1345] Fix | Delete
$(child_element).parent('div').addClass('hide');
[1346] Fix | Delete
}
[1347] Fix | Delete
}
[1348] Fix | Delete
break;
[1349] Fix | Delete
[1350] Fix | Delete
default:
[1351] Fix | Delete
break;
[1352] Fix | Delete
}
[1353] Fix | Delete
}
[1354] Fix | Delete
});
[1355] Fix | Delete
};
[1356] Fix | Delete
// Color Picker
[1357] Fix | Delete
$('div.amp-ux-color-container').find('input').wpColorPicker({});
[1358] Fix | Delete
function hexToRgbA(hex){
[1359] Fix | Delete
var c;
[1360] Fix | Delete
if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)){
[1361] Fix | Delete
c= hex.substring(1).split('');
[1362] Fix | Delete
if(c.length== 3){
[1363] Fix | Delete
c= [c[0], c[0], c[1], c[1], c[2], c[2]];
[1364] Fix | Delete
}
[1365] Fix | Delete
c= '0x'+c.join('');
[1366] Fix | Delete
return 'rgba('+[(c>>16)&255, (c>>8)&255, c&255].join(',')+',1)';
[1367] Fix | Delete
}
[1368] Fix | Delete
throw new Error('Bad Hex');
[1369] Fix | Delete
}
[1370] Fix | Delete
$('#section-table-ampforwp-ux-website-type-section').addClass('drawer');
[1371] Fix | Delete
$('div.ampforwp-new-ux').find('div.ampforwp-ux-section-right').each(function(){
[1372] Fix | Delete
var selector = 'data-id="'+$(this).attr('id').replace('section-','')+'"';
[1373] Fix | Delete
[1374] Fix | Delete
$(this).parent().find($('table['+selector+']')).addClass('drawer');
[1375] Fix | Delete
[1376] Fix | Delete
});
[1377] Fix | Delete
$('.redux-group-menu').find('.redux-group-tab-link-li').each(function(){
[1378] Fix | Delete
$(this).on('click', function(){
[1379] Fix | Delete
if($(this).hasClass('ampforwp-new-ux')){
[1380] Fix | Delete
$('div.sticky-footer-fixed').addClass('hide');
[1381] Fix | Delete
}
[1382] Fix | Delete
else{
[1383] Fix | Delete
$('div.sticky-footer-fixed').removeClass('hide');
[1384] Fix | Delete
}
[1385] Fix | Delete
});
[1386] Fix | Delete
});
[1387] Fix | Delete
function ampforwp_set_ux_selected_val(){
[1388] Fix | Delete
var active_drower = localStorage.getItem('ampforwp_current_drawer_click');
[1389] Fix | Delete
var thishtml = "";
[1390] Fix | Delete
var button = '';
[1391] Fix | Delete
if(active_drower=='ampforwp-ux-website-type-section'){
[1392] Fix | Delete
thishtml = $("#ampforwp-ux-select option:selected").text();
[1393] Fix | Delete
if(thishtml=="Select Option"){
[1394] Fix | Delete
thishtml="";
[1395] Fix | Delete
}
[1396] Fix | Delete
if(thishtml=="Other"){
[1397] Fix | Delete
thishtml = $("#ampforwp-website-type-other").val();
[1398] Fix | Delete
}
[1399] Fix | Delete
button = "SELECT";
[1400] Fix | Delete
}else if(active_drower=='ampforwp-ux-need-type-section'){
[1401] Fix | Delete
var need_type_arr = [];
[1402] Fix | Delete
$(".amp-ux-field").each(function(){
[1403] Fix | Delete
var thisid = $(this).attr('id');
[1404] Fix | Delete
if(thisid=="amp-ux-homepage" || thisid=="amp-ux-frontpage" || thisid=="amp-ux-posts" || thisid=="amp-ux-pages" || thisid=="amp-ux-archives"){
[1405] Fix | Delete
if($(this).prop('checked')){
[1406] Fix | Delete
if(thisid=="amp-ux-homepage"){
[1407] Fix | Delete
need_type_arr.push('Home');
[1408] Fix | Delete
}else if(thisid=="amp-ux-posts"){
[1409] Fix | Delete
need_type_arr.push('Posts');
[1410] Fix | Delete
}else if(thisid=="amp-ux-pages"){
[1411] Fix | Delete
need_type_arr.push('Pages');
[1412] Fix | Delete
}else if(thisid=="amp-ux-archives"){
[1413] Fix | Delete
need_type_arr.push('Archives');
[1414] Fix | Delete
}
[1415] Fix | Delete
}
[1416] Fix | Delete
}
[1417] Fix | Delete
thishtml = need_type_arr.toString().replace(/,/g, ", ");
[1418] Fix | Delete
});
[1419] Fix | Delete
button = "CHOOSE";
[1420] Fix | Delete
}else if(active_drower=='ampforwp-ux-design-section'){
[1421] Fix | Delete
thishtml = "Configured";
[1422] Fix | Delete
button = "SET UP";
[1423] Fix | Delete
}else if(active_drower=='ampforwp-ux-analytics-section'){
[1424] Fix | Delete
var ga_field = $('#ga-feild').val();
[1425] Fix | Delete
var ga_field_gtm = $('#amp-gtm-id').val();
[1426] Fix | Delete
var amp_fb_pixel_id = $('#amp-fb-pixel-id').val();
[1427] Fix | Delete
var sa_feild = $('#sa-feild').val();
[1428] Fix | Delete
var pa_feild = $('#pa-feild').val();
[1429] Fix | Delete
var quantcast_c = $('#amp-quantcast-analytics-code').val();
[1430] Fix | Delete
var comscore_c1 = $('#amp-comscore-analytics-code-c1').val();
[1431] Fix | Delete
var comscore_c1 = $('#amp-comscore-analytics-code-c2').val();
[1432] Fix | Delete
var eam_c = $('#eam-feild').val();
[1433] Fix | Delete
var sc_c = $('#sc-feild').val();
[1434] Fix | Delete
var histats_c = $('#histats-field').val();
[1435] Fix | Delete
var yemdex_c = $('#amp-Yandex-Metrika-analytics-code').val();
[1436] Fix | Delete
var chartbeat_c = $('#amp-Chartbeat-analytics-code').val();
[1437] Fix | Delete
var alexa_c = $('#ampforwp-alexa-account').val();
[1438] Fix | Delete
var alexa_d = $('#ampforwp-alexa-domain').val();
[1439] Fix | Delete
var host = $('#ampforwp-adobe-host').val();
[1440] Fix | Delete
var adobe_orgid = $('#ampforwp-adobe-orgid').val();
[1441] Fix | Delete
var adobe_type = $('#ampforwp-adobe-type').val();
[1442] Fix | Delete
var adobe_subdomain = $('#ampforwp-adobe-subdomain').val();
[1443] Fix | Delete
var ReportSuiteId = $('#ampforwp-adobe-reportsuiteid').val();
[1444] Fix | Delete
var afs_c = $('#ampforwp-afs-siteid').val();
[1445] Fix | Delete
var clicky_side_id = $('#clicky-site-id').val();
[1446] Fix | Delete
var cr_config_url = $('#ampforwp-callrail-config-url').val();
[1447] Fix | Delete
var cr_number = $('#ampforwp-callrail-number').val();
[1448] Fix | Delete
var cr_analytics_url = $('#ampforwp-callrail-analytics-url').val();
[1449] Fix | Delete
var analytics_txt = "";
[1450] Fix | Delete
var ppas_host = $('#ppas-host').val();
[1451] Fix | Delete
var ppas_id = $('#ppas-website-id').val();
[1452] Fix | Delete
var ppas_hash = $('#ppas-website-hash').val();
[1453] Fix | Delete
var analytic_arr = [];
[1454] Fix | Delete
$(".ampforwp-ux-ana-sub").each(function(){
[1455] Fix | Delete
var data_href = $(this).attr('data-href');
[1456] Fix | Delete
var hasCls = $(this).hasClass('hide');
[1457] Fix | Delete
if(ga_field!="UA-XXXXX-Y" && ga_field!="" && !hasCls && data_href=='ampforwp-ga-switch'){analytic_arr.push("Google Analytics");}
[1458] Fix | Delete
if(ga_field_gtm!="" && !hasCls && data_href=='amp-use-gtm-option'){analytic_arr.push("Google Tag Manager");}
[1459] Fix | Delete
if(amp_fb_pixel_id!="" && !hasCls && data_href=='amp-fb-pixel'){analytic_arr.push("Facebook Pixel");}
[1460] Fix | Delete
if(sa_feild!="SEGMENT-WRITE-KEY" && sa_feild!="" && !hasCls && data_href=='ampforwp-Segment-switch'){analytic_arr.push("Segment Analytics");}
[1461] Fix | Delete
if(pa_feild!="#" && pa_feild!="" && !hasCls && data_href=='ampforwp-Piwik-switch'){ analytic_arr.push("Matomo Analytics");}
[1462] Fix | Delete
if(quantcast_c!="" && !hasCls && data_href=='ampforwp-Quantcast-switch'){ analytic_arr.push("Quantcast Measurement");}
[1463] Fix | Delete
if(comscore_c1!="" && comscore_c1!="" && !hasCls && data_href=='ampforwp-comScore-switch'){analytic_arr.push("comScore");}
[1464] Fix | Delete
if(eam_c!="#" && eam_c!="" && !hasCls && data_href=='ampforwp-Effective-switch'){analytic_arr.push("Effective Measure");}
[1465] Fix | Delete
if(sc_c!="#" && sc_c!="" && !hasCls && data_href=='ampforwp-StatCounter-switch'){analytic_arr.push("StatCounter");}
[1466] Fix | Delete
if(histats_c!="" && !hasCls && data_href=='ampforwp-Histats-switch'){analytic_arr.push("Histats Analytics");}
[1467] Fix | Delete
if(yemdex_c!="" && !hasCls && data_href=='ampforwp-Yandex-switch'){analytic_arr.push("Yandex Metrika");}
[1468] Fix | Delete
if(chartbeat_c!="" && !hasCls && data_href=='ampforwp-Chartbeat-switch'){analytic_arr.push("Chartbeat Analytics");}
[1469] Fix | Delete
if(alexa_c!="" && alexa_d!="" && !hasCls && data_href=='ampforwp-Alexa-switch'){analytic_arr.push("Alexa Metrics");}
[1470] Fix | Delete
if(host!="" && ReportSuiteId!="" && !hasCls && (adobe_type=='adobeanalytics_native' && adobe_orgid!="" && adobe_subdomain!="" || adobe_type=='adobeanalytics') && data_href=='ampforwp_adobe_switch'){analytic_arr.push("Adobe Analytics");}
[1471] Fix | Delete
if(afs_c!="" && !hasCls && data_href=='ampforwp-afs-analytics-switch'){analytic_arr.push("AFS Analytics");}
[1472] Fix | Delete
if(clicky_side_id!="" && !hasCls && data_href=='amp-clicky-switch'){analytic_arr.push("Clicky Analytics");}
[1473] Fix | Delete
if(cr_config_url!="" && cr_number!="" && cr_analytics_url!="" && !hasCls && data_href=='ampforwp-callrail-switch'){analytic_arr.push("Call Rail Analytics");}
[1474] Fix | Delete
if(ppas_host!="" && ppas_id!="" && ppas_hash!="" && data_href=='ampforwp-Piwik-Pro-switch'){analytic_arr.push("Piwik Pro Analytics");}
[1475] Fix | Delete
});
[1476] Fix | Delete
thishtml = analytic_arr.toString().replace(/,/g, ", ");
[1477] Fix | Delete
button = "CONFIG";
[1478] Fix | Delete
}else if(active_drower=='ampforwp-ux-privacy-section'){
[1479] Fix | Delete
var cookie_switch = $("#amp-ux-notice-switch").val();
[1480] Fix | Delete
var gdpr_switch = $("#amp-ux-gdpr-switch").val();
[1481] Fix | Delete
var policy_arr = [];
[1482] Fix | Delete
if(cookie_switch==1){
[1483] Fix | Delete
policy_arr.push("Cookie Consent");
[1484] Fix | Delete
}
[1485] Fix | Delete
if(gdpr_switch==1){
[1486] Fix | Delete
policy_arr.push("GDPR");
[1487] Fix | Delete
}
[1488] Fix | Delete
thishtml = policy_arr.toString().replace(/,/g, ", ");
[1489] Fix | Delete
button = "CHOOSE";
[1490] Fix | Delete
[1491] Fix | Delete
[1492] Fix | Delete
}
[1493] Fix | Delete
var option = '';
[1494] Fix | Delete
if(thishtml!=""){
[1495] Fix | Delete
option = '<div class="filled-lbl-blk">'+
[1496] Fix | Delete
'<p class="msg">'+thishtml+'</p>'+
[1497] Fix | Delete
'<span class="lbl">Change</span>'+
[1498] Fix | Delete
'</div>';
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function