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
$("input[id=amp-enable-notifications]").val(0);
[2000] Fix | Delete
$(this).val(0);
[2001] Fix | Delete
}
[2002] Fix | Delete
[2003] Fix | Delete
});
[2004] Fix | Delete
[2005] Fix | Delete
$('input[id="amp-ux-gdpr-switch"]').on("click", function(){
[2006] Fix | Delete
if($(this).prop("checked") == true){
[2007] Fix | Delete
$(this).val(1);
[2008] Fix | Delete
if($('input[id="amp-gdpr-compliance-switch"]').val() != 1 ) {
[2009] Fix | Delete
$("input[data-id=amp-gdpr-compliance-switch]").prop('checked', true).trigger( 'change' );
[2010] Fix | Delete
$("input[id=amp-gdpr-compliance-switch]").val(1);
[2011] Fix | Delete
}
[2012] Fix | Delete
if($('input[id="amp-ux-notice-switch"]').val() == 1 ) {
[2013] Fix | Delete
$("input[data-id=amp-ux-notice-switch]").prop('checked', false).trigger( 'change' );
[2014] Fix | Delete
$("input[id=amp-ux-notice-switch]").val(0);
[2015] Fix | Delete
}
[2016] Fix | Delete
if($('input[id="amp-enable-notifications"]').val() == 1 ) {
[2017] Fix | Delete
$("input[data-id=amp-enable-notifications]").prop('checked', false).trigger( 'change' );
[2018] Fix | Delete
$("input[id=amp-enable-notifications]").val(0);
[2019] Fix | Delete
}
[2020] Fix | Delete
}
[2021] Fix | Delete
else if( $(this).prop("checked") == false && $('input[id="amp-gdpr-compliance-switch"]').val() == 1 ){
[2022] Fix | Delete
$("input[data-id=amp-gdpr-compliance-switch]").prop('checked', false).trigger( 'change' );
[2023] Fix | Delete
$("input[id=amp-gdpr-compliance-switch]").val(0);
[2024] Fix | Delete
$(this).val(0);
[2025] Fix | Delete
}
[2026] Fix | Delete
});
[2027] Fix | Delete
$(".amp-ux-section-field").on("click", function(){
[2028] Fix | Delete
var track = $(this).attr('data-href');
[2029] Fix | Delete
localStorage.setItem('ampforwp_current_drawer_click',track);
[2030] Fix | Delete
});
[2031] Fix | Delete
[2032] Fix | Delete
function ampforwp_ux_save_loader(){
[2033] Fix | Delete
$(".amp-ux-loader").show();
[2034] Fix | Delete
setTimeout(function(){
[2035] Fix | Delete
$('.amp-ux-loader .amp-ux-loading').addClass("hide");
[2036] Fix | Delete
$('#amp-ux-loading-saved').removeClass("hide");
[2037] Fix | Delete
setTimeout(function(){
[2038] Fix | Delete
$('.amp-ux-loader .amp-ux-loading').removeClass("hide");
[2039] Fix | Delete
$('#amp-ux-loading-saved').addClass("hide");
[2040] Fix | Delete
$(".amp-ux-loader").hide();
[2041] Fix | Delete
}, 1500);
[2042] Fix | Delete
},500);
[2043] Fix | Delete
}
[2044] Fix | Delete
var check_img_upload = $('input[id="redux_builder_amp[opt-media][url]"]').val();
[2045] Fix | Delete
if(check_img_upload!=""){
[2046] Fix | Delete
$('input[id="redux_builder_amp[opt-media][url]"]').hide();
[2047] Fix | Delete
}
[2048] Fix | Delete
function ampforwp_check_required(value,required){
[2049] Fix | Delete
if(value==0){
[2050] Fix | Delete
$("[required="+required+"]").addClass("hide");
[2051] Fix | Delete
}else{
[2052] Fix | Delete
$("[required="+required+"]").removeClass("hide");
[2053] Fix | Delete
}
[2054] Fix | Delete
}
[2055] Fix | Delete
$("#ampforwp-add-more-analytics").on("click", function(){
[2056] Fix | Delete
var analytics = $("#ampforwp-ux-analytics-more").val();
[2057] Fix | Delete
[2058] Fix | Delete
if( analytics && $("[data-href="+analytics+"]").hasClass('hide')){
[2059] Fix | Delete
$("[data-href="+analytics+"]").removeClass('hide');
[2060] Fix | Delete
var has_data = true;
[2061] Fix | Delete
$("[data-href="+analytics+"]").children('.amp-ux-text-container').children('input').each(function(){
[2062] Fix | Delete
var thisval = $(this).val();
[2063] Fix | Delete
if(thisval=="" || thisval=="#" || thisval=="UA-XXXXX-Y" || thisval=="SEGMENT-WRITE-KEY"){
[2064] Fix | Delete
has_data = false;
[2065] Fix | Delete
return false;
[2066] Fix | Delete
}
[2067] Fix | Delete
});
[2068] Fix | Delete
if(has_data){
[2069] Fix | Delete
$('#redux_builder_amp-'+analytics).children('.switch-options').children('.ios7-switch').children('.switch-on-off').click();
[2070] Fix | Delete
$('[name="redux_builder_amp['+analytics+']"]').val(1);
[2071] Fix | Delete
ampforwp_saveChangesInRedux($(this));
[2072] Fix | Delete
}
[2073] Fix | Delete
}
[2074] Fix | Delete
});
[2075] Fix | Delete
[2076] Fix | Delete
$('.ampforwp-ux-closable').on("click", function(){
[2077] Fix | Delete
$(this).parent('.ampforwp-ux-sub-section').addClass('hide');
[2078] Fix | Delete
var data_href = $(this).parent('.ampforwp-ux-sub-section').attr('data-href');
[2079] Fix | Delete
var checked = $('#redux_builder_amp-'+data_href).children('.switch-options').children('.ios7-switch').children('.switch-on-off').prop('checked');
[2080] Fix | Delete
if(checked){
[2081] Fix | Delete
$('#redux_builder_amp-'+data_href).children('.switch-options').children('.ios7-switch').children('.switch-on-off').click();
[2082] Fix | Delete
$('[name="redux_builder_amp['+data_href+']"]').val(0);
[2083] Fix | Delete
}
[2084] Fix | Delete
ampforwp_saveChangesInRedux($(this));
[2085] Fix | Delete
});
[2086] Fix | Delete
// Required condition for each field
[2087] Fix | Delete
$.each(new_data, function(key,value) {
[2088] Fix | Delete
ampCheckRequired($('#'+value.field_data.id));
[2089] Fix | Delete
});
[2090] Fix | Delete
// Required && saved Condition JS
[2091] Fix | Delete
$(document).on('click change',".amp-ux-field",function() {
[2092] Fix | Delete
// Handle click...
[2093] Fix | Delete
if($(this).hasClass("amp-ux-extension-switch")){
[2094] Fix | Delete
if($(this).prop('checked')==true){
[2095] Fix | Delete
$(this).val(1);
[2096] Fix | Delete
}else{
[2097] Fix | Delete
$(this).val(0);
[2098] Fix | Delete
}
[2099] Fix | Delete
ampforwp_check_required($(this).val(),$(this).attr('id'));
[2100] Fix | Delete
}else{
[2101] Fix | Delete
ampCheckRequired($(this));
[2102] Fix | Delete
ampforwp_saveChangesInRedux($(this));
[2103] Fix | Delete
ampforwp_ux_save_loader();
[2104] Fix | Delete
ampforwp_set_ux_selected_val();
[2105] Fix | Delete
}
[2106] Fix | Delete
});
[2107] Fix | Delete
// Drawer JS
[2108] Fix | Delete
var drawer,
[2109] Fix | Delete
drawerElem,
[2110] Fix | Delete
iconElem;
[2111] Fix | Delete
window.addEventListener("load", function (e) {
[2112] Fix | Delete
[2113] Fix | Delete
var list = document.getElementsByClassName("amp-ux-section-field");
[2114] Fix | Delete
for (var i = 0; i < list.length; i++) {
[2115] Fix | Delete
// list[i] is a node with the desired class name
[2116] Fix | Delete
if(list[i].getAttribute('data-href')){
[2117] Fix | Delete
var attr = list[i].getAttribute('data-href');
[2118] Fix | Delete
if(attr!='ampforwp-ux-advertisement-section'){
[2119] Fix | Delete
iconElem = document.getElementsByClassName("amp-ux-section-field")[i];
[2120] Fix | Delete
var table = $('table[data-id="'+attr+'"]');
[2121] Fix | Delete
if( ! table.hasClass(attr) ){
[2122] Fix | Delete
table.addClass(attr);
[2123] Fix | Delete
}
[2124] Fix | Delete
var div = $('div[id="'+attr+'"]');
[2125] Fix | Delete
if( ! div.hasClass(attr) ){
[2126] Fix | Delete
div.addClass(attr);
[2127] Fix | Delete
}
[2128] Fix | Delete
drawerElem = document.getElementsByClassName(attr)[0];
[2129] Fix | Delete
drawer = new Drawer(drawerElem);
[2130] Fix | Delete
drawer.setDrawerIcon(new DrawerIcon(iconElem));
[2131] Fix | Delete
}
[2132] Fix | Delete
}
[2133] Fix | Delete
}
[2134] Fix | Delete
});
[2135] Fix | Delete
[2136] Fix | Delete
[2137] Fix | Delete
/* Drawer Library */
[2138] Fix | Delete
function Drawer(drawerElem) {
[2139] Fix | Delete
"use strict";
[2140] Fix | Delete
[2141] Fix | Delete
function checkMobile(a) {
[2142] Fix | Delete
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4));
[2143] Fix | Delete
}
[2144] Fix | Delete
var drawerIcon = {
[2145] Fix | Delete
set: function (a) {},
[2146] Fix | Delete
setState: function (a, b) {},
[2147] Fix | Delete
setOnClick: function(a) {}
[2148] Fix | Delete
},
[2149] Fix | Delete
drawerBg,
[2150] Fix | Delete
drawerStarted = false,
[2151] Fix | Delete
width = drawerElem.offsetWidth,
[2152] Fix | Delete
correct = 0,
[2153] Fix | Delete
percent = 0,
[2154] Fix | Delete
trx = 0,
[2155] Fix | Delete
opened = false,
[2156] Fix | Delete
startMoveTime = 0,
[2157] Fix | Delete
startX = 0,
[2158] Fix | Delete
speedSwipe = 0,
[2159] Fix | Delete
isMobile = checkMobile(navigator.userAgent || navigator.vendor || window.opera),
[2160] Fix | Delete
isIE = window.navigator.msPointerEnabled,
[2161] Fix | Delete
isIE11 = window.navigator.pointerEnabled,
[2162] Fix | Delete
typeStart = isIE ? "MSPointerDown" : (isMobile ? "touchstart" : "mousedown"),
[2163] Fix | Delete
typeMove = isIE ? "MSPointerMove" : (isMobile ? "touchmove" : "mousemove"),
[2164] Fix | Delete
typeEnd = isIE ? "MSPointerUp" : (isMobile ? "touchend" : "mouseup"),
[2165] Fix | Delete
trZ = "translateZ(0)",
[2166] Fix | Delete
stateMoved = false,
[2167] Fix | Delete
transformProp = "transform",
[2168] Fix | Delete
transitionProp = "transition",
[2169] Fix | Delete
propPrefixCss = "",
[2170] Fix | Delete
antiSelect,
[2171] Fix | Delete
onOpened = function () {},
[2172] Fix | Delete
onClosed = function () {},
[2173] Fix | Delete
onMove = function (x, percent, animation, duration) {};
[2174] Fix | Delete
[2175] Fix | Delete
function setProperty(elem, property, value) {
[2176] Fix | Delete
elem.style[property] = value;
[2177] Fix | Delete
}
[2178] Fix | Delete
[2179] Fix | Delete
function transfrom(x) {
[2180] Fix | Delete
setProperty(drawerElem, transformProp, x + " " + trZ);
[2181] Fix | Delete
}
[2182] Fix | Delete
[2183] Fix | Delete
function setTransition(s) {
[2184] Fix | Delete
setProperty(drawerElem, transitionProp, propPrefixCss + "transform " + s + "s cubic-bezier(0.0, 0.0, 0.2, 1)");
[2185] Fix | Delete
setProperty(drawerBg, transitionProp, "opacity " + s + "s cubic-bezier(0.0, 0.0, 0.2, 1)");
[2186] Fix | Delete
}
[2187] Fix | Delete
[2188] Fix | Delete
function clearTransition() {
[2189] Fix | Delete
setProperty(drawerElem, transitionProp, "none");
[2190] Fix | Delete
setProperty(drawerBg, transitionProp, "none");
[2191] Fix | Delete
}
[2192] Fix | Delete
[2193] Fix | Delete
function openDrawer(s) {
[2194] Fix | Delete
s = s || 0.225;
[2195] Fix | Delete
opened = true;
[2196] Fix | Delete
setTransition(s);
[2197] Fix | Delete
drawerElem.style.opacity = 1;
[2198] Fix | Delete
drawerBg.style.opacity = 1;
[2199] Fix | Delete
drawerBg.style.visibility = "visible";
[2200] Fix | Delete
transfrom("translateX(0)");
[2201] Fix | Delete
drawerIcon.setState(1, s);
[2202] Fix | Delete
onMove(width, 1, true, s);
[2203] Fix | Delete
setTimeout(function () {
[2204] Fix | Delete
clearTransition();
[2205] Fix | Delete
if (drawerStarted) {
[2206] Fix | Delete
return;
[2207] Fix | Delete
}
[2208] Fix | Delete
onOpened();
[2209] Fix | Delete
}, s * 1000);
[2210] Fix | Delete
}
[2211] Fix | Delete
[2212] Fix | Delete
function closeDrawer(s) {
[2213] Fix | Delete
s = s || 0.225;
[2214] Fix | Delete
opened = false;
[2215] Fix | Delete
setTransition(s);
[2216] Fix | Delete
drawerBg.style.opacity = 0.001;
[2217] Fix | Delete
transfrom("translateX(" + 320 + "px)");
[2218] Fix | Delete
drawerIcon.setState(0, s);
[2219] Fix | Delete
onMove(0, 0, true, s);
[2220] Fix | Delete
setTimeout(function () {
[2221] Fix | Delete
clearTransition();
[2222] Fix | Delete
if (drawerStarted) {
[2223] Fix | Delete
return;
[2224] Fix | Delete
}
[2225] Fix | Delete
drawerElem.style.opacity = 0.001;
[2226] Fix | Delete
drawerBg.style.visibility = "hidden";
[2227] Fix | Delete
onClosed();
[2228] Fix | Delete
}, s * 1000);
[2229] Fix | Delete
}
[2230] Fix | Delete
[2231] Fix | Delete
function toggleDrawer() {
[2232] Fix | Delete
if (opened) {
[2233] Fix | Delete
closeDrawer(0.225);
[2234] Fix | Delete
} else {
[2235] Fix | Delete
openDrawer(0.225);
[2236] Fix | Delete
}
[2237] Fix | Delete
}
[2238] Fix | Delete
[2239] Fix | Delete
this.setDrawerIcon = function (icon) {
[2240] Fix | Delete
drawerIcon = icon;
[2241] Fix | Delete
drawerIcon.setOnClick(function (e) {
[2242] Fix | Delete
toggleDrawer();
[2243] Fix | Delete
});
[2244] Fix | Delete
};
[2245] Fix | Delete
[2246] Fix | Delete
(function () {
[2247] Fix | Delete
drawerBg = document.createElement("DIV");
[2248] Fix | Delete
drawerBg.className = "drawer_bg";
[2249] Fix | Delete
//drawerBg.id = "drawer_bg";
[2250] Fix | Delete
drawerElem.parentElement.insertBefore(drawerBg, drawerElem);
[2251] Fix | Delete
drawerBg.onclick = function () {
[2252] Fix | Delete
if (opened) {
[2253] Fix | Delete
closeDrawer(0.225);
[2254] Fix | Delete
}
[2255] Fix | Delete
};
[2256] Fix | Delete
antiSelect = document.createElement("DIV");
[2257] Fix | Delete
antiSelect.className = "antiSelect";
[2258] Fix | Delete
drawerElem.appendChild(antiSelect);
[2259] Fix | Delete
var label = document.createElement("DIV");
[2260] Fix | Delete
label.className = "label";
[2261] Fix | Delete
drawerElem.appendChild(label);
[2262] Fix | Delete
//Find prop name
[2263] Fix | Delete
var vendors;
[2264] Fix | Delete
if (antiSelect.style.transform === undefined) {
[2265] Fix | Delete
vendors = ['Webkit', 'Moz', 'ms', 'O'];
[2266] Fix | Delete
for (var vendor in vendors) {
[2267] Fix | Delete
if (antiSelect.style[vendors[vendor] + 'Transform'] !== undefined) {
[2268] Fix | Delete
transformProp = vendors[vendor] + 'Transform';
[2269] Fix | Delete
propPrefixCss = "-" + vendors[vendor].toLowerCase() + "-";
[2270] Fix | Delete
}
[2271] Fix | Delete
if (antiSelect.style[vendors[vendor] + 'Transition'] !== undefined) {
[2272] Fix | Delete
transitionProp = vendors[vendor] + 'Transition';
[2273] Fix | Delete
}
[2274] Fix | Delete
}
[2275] Fix | Delete
}
[2276] Fix | Delete
if (/.*opera.*presto/i.test(navigator.userAgent)) {
[2277] Fix | Delete
trZ = "";
[2278] Fix | Delete
}
[2279] Fix | Delete
})();
[2280] Fix | Delete
}
[2281] Fix | Delete
$(document ).on('click','.ampforwp_install_ux_plugin',function(e){
[2282] Fix | Delete
e.preventDefault();
[2283] Fix | Delete
var result = confirm("This required a free plugin to install in your WordPress");
[2284] Fix | Delete
if (result) {
[2285] Fix | Delete
$(".amp-ux-loader").show();
[2286] Fix | Delete
var self = $(this);
[2287] Fix | Delete
var oldself = $(this).parent('.ios7-switch').html();
[2288] Fix | Delete
self.parent('.ios7-switch').html('<div class="amp-ux-loader"><div class="amp-ux-loading"></div><span class="hide amp-ux-check"></span></div>');
[2289] Fix | Delete
var nonce = self.attr('data-secure');
[2290] Fix | Delete
var currentId = self.attr('id');
[2291] Fix | Delete
var activate = '';
[2292] Fix | Delete
if (currentId == 'amp-ux-ext-pwafwp') {
[2293] Fix | Delete
activate = '&activate=pwa';
[2294] Fix | Delete
} else if (currentId == 'amp-ux-ext-ssd') {
[2295] Fix | Delete
activate = '&activate=structure_data';
[2296] Fix | Delete
} else if (currentId == 'amp-ux-ext-afwp') {
[2297] Fix | Delete
activate = '&activate=quads-settings';
[2298] Fix | Delete
}
[2299] Fix | Delete
console.log(wp.updates.l10n.installing);
[2300] Fix | Delete
[2301] Fix | Delete
$.ajax({
[2302] Fix | Delete
url: ajaxurl,
[2303] Fix | Delete
type: 'post',
[2304] Fix | Delete
data: 'action=ampforwp_enable_modules_upgread' + activate + '&verify_nonce=' + nonce,
[2305] Fix | Delete
dataType: 'json',
[2306] Fix | Delete
success: function (response) {
[2307] Fix | Delete
if (response.status == 200) {
[2308] Fix | Delete
if (self.hasClass('not-exist')) {
[2309] Fix | Delete
[2310] Fix | Delete
//To installation
[2311] Fix | Delete
wp.updates.installPlugin(
[2312] Fix | Delete
{
[2313] Fix | Delete
slug: response.slug,
[2314] Fix | Delete
success: function (pluginresponse) {
[2315] Fix | Delete
console.log(pluginresponse.activateUrl);
[2316] Fix | Delete
ampforwpActivateModulesUpgrade(pluginresponse.activateUrl, self, response, nonce)
[2317] Fix | Delete
}
[2318] Fix | Delete
}
[2319] Fix | Delete
);
[2320] Fix | Delete
[2321] Fix | Delete
} else {
[2322] Fix | Delete
var activateUrl = self.attr('data-url');
[2323] Fix | Delete
ampforwpActivateModulesUpgrade(activateUrl, self, response, nonce)
[2324] Fix | Delete
}
[2325] Fix | Delete
} else {
[2326] Fix | Delete
alert(response.message)
[2327] Fix | Delete
}
[2328] Fix | Delete
[2329] Fix | Delete
}
[2330] Fix | Delete
});
[2331] Fix | Delete
}else{
[2332] Fix | Delete
var currentId = $(this).attr('id');
[2333] Fix | Delete
$("[required='"+currentId+"']").addClass("hide");
[2334] Fix | Delete
}
[2335] Fix | Delete
});
[2336] Fix | Delete
function ampforwp_generate_plugin_ulr(url){
[2337] Fix | Delete
url = '<a target="_blank" href="'+url+'" class="afw-plugin-url"><i class="el el-cog"></i></a>';
[2338] Fix | Delete
return url;
[2339] Fix | Delete
}
[2340] Fix | Delete
var ampforwpActivateModulesUpgrade = function(url, self, response, nonce){
[2341] Fix | Delete
if (typeof url === 'undefined' || !url) {
[2342] Fix | Delete
return;
[2343] Fix | Delete
}
[2344] Fix | Delete
console.log( 'Activating...' );
[2345] Fix | Delete
jQuery.ajax(
[2346] Fix | Delete
{
[2347] Fix | Delete
async: true,
[2348] Fix | Delete
type: 'GET',
[2349] Fix | Delete
//data: dataString,
[2350] Fix | Delete
url: url,
[2351] Fix | Delete
success: function () {
[2352] Fix | Delete
var msgplug = '';
[2353] Fix | Delete
if(self.attr('id')=='amp-ux-ext-pwafwp'){
[2354] Fix | Delete
msgplug = 'PWA';
[2355] Fix | Delete
console.log("PWA Activated");
[2356] Fix | Delete
var res_url = ampforwp_generate_plugin_ulr(response.redirect_url);
[2357] Fix | Delete
$('.amp-ux-ext-pwafwp').html(res_url);
[2358] Fix | Delete
$("[required=amp-ux-ext-pwafwp]").addClass("hide");
[2359] Fix | Delete
ampforwp_ux_save_loader();
[2360] Fix | Delete
}else if(self.attr('id')=='amp-ux-ext-ssd'){
[2361] Fix | Delete
msgplug = 'Structure Data';
[2362] Fix | Delete
//Import Data
[2363] Fix | Delete
jQuery.ajax({
[2364] Fix | Delete
url: ajaxurl,
[2365] Fix | Delete
type: 'post',
[2366] Fix | Delete
data: 'action=ampforwp_import_modules_scema&verify_nonce='+nonce,
[2367] Fix | Delete
success: function () {
[2368] Fix | Delete
console.log("Structure Data Activated");
[2369] Fix | Delete
var res_url = ampforwp_generate_plugin_ulr(response.redirect_url);
[2370] Fix | Delete
$('.amp-ux-ext-ssd').html(res_url);
[2371] Fix | Delete
$("[required=amp-ux-ext-ssd]").addClass("hide");
[2372] Fix | Delete
$("#section-ampforwp-sd_1").hide();
[2373] Fix | Delete
$("#section-table-ampforwp-sd_1").hide();
[2374] Fix | Delete
$("#section-ampforwp-sd_2").hide();
[2375] Fix | Delete
$("#section-table-ampforwp-sd_2").hide();
[2376] Fix | Delete
var std_str = 'Thank you for upgrading the Structured data'+
[2377] Fix | Delete
'<div class="row">'+
[2378] Fix | Delete
'<div class="col-1">'+
[2379] Fix | Delete
'<a href="'+response.redirect_url+'"><div class="ampforwp-recommendation-btn updated-message"><p>Go to Structure Data settings</p></div></a>'+
[2380] Fix | Delete
'&nbsp;<a href="https://ampforwp.com/tutorials/article/what-is-the-structured-data-update-all-about/" class="amp_recommend_learnmore" target="_blank">Learn more</a>'+
[2381] Fix | Delete
'</div>'+
[2382] Fix | Delete
'</div>';
[2383] Fix | Delete
$(".ampforwp-st-data-update").html(std_str);
[2384] Fix | Delete
ampforwp_ux_save_loader();
[2385] Fix | Delete
}
[2386] Fix | Delete
});
[2387] Fix | Delete
}else if(self.attr('id')=='amp-ux-ext-afwp'){
[2388] Fix | Delete
msgplug = 'Ads by WPQuads';
[2389] Fix | Delete
self.text( 'Importing data...' );
[2390] Fix | Delete
//Import Data
[2391] Fix | Delete
jQuery.ajax({
[2392] Fix | Delete
url: ajaxurl,
[2393] Fix | Delete
type: 'post',
[2394] Fix | Delete
data: 'action=ampforwp_import_modules_ads&verify_nonce='+nonce,
[2395] Fix | Delete
success: function () {
[2396] Fix | Delete
console.log("Ads by WPQuads");
[2397] Fix | Delete
var res_url = ampforwp_generate_plugin_ulr(response.redirect_url);
[2398] Fix | Delete
$('.amp-ux-ext-afwp').html(res_url);
[2399] Fix | Delete
$("[required=amp-ux-ext-afwp]").addClass("hide");
[2400] Fix | Delete
var afwp_str = '<div id="section-ampforwp-ads-section" class="redux-section-field redux-field adsactive redux-section-indent-start afw-accordion-header afw-accordion-tab-open">'+
[2401] Fix | Delete
'<h3 style="margin-top: 20px;">Introducing Ads by WPQuads</h3>'+
[2402] Fix | Delete
'</div>'+
[2403] Fix | Delete
'<table id="section-table-ampforwp-ads-section" data-id="ampforwp-ads-section" class="form-table form-table-section no-border form-table-section-indented" style="display: inline-table;">'+
[2404] Fix | Delete
'<tbody>'+
[2405] Fix | Delete
'<tr>'+
[2406] Fix | Delete
'<th></th>'+
[2407] Fix | Delete
'<td id="5d95bd8ed5093"></td>'+
[2408] Fix | Delete
'</tr>'+
[2409] Fix | Delete
'<tr class="adsactive">'+
[2410] Fix | Delete
'<td colspan="2">'+
[2411] Fix | Delete
'<fieldset id="redux_builder_amp-ampforwp-ads-module" class="redux-field-container redux-field redux-field-init redux-container-raw redux_remove_th" data-id="ampforwp-ads-module" data-type="raw">'+
[2412] Fix | Delete
'<div class="ampforwp-ads-data-update">'+
[2413] Fix | Delete
'<input type="hidden" value="admin.php?page=quads-settings&amp;tab=general&amp;reference=ampforwp" class="ampforwp-activation-url" id="active">'+
[2414] Fix | Delete
'Thank you for upgrading the Ads by WPQuads'+
[2415] Fix | Delete
'<div class="row"><div>'+
[2416] Fix | Delete
'<a href="http://localhost/wasweb/wp-admin/edit.php?post_type=quads-settings">'+
[2417] Fix | Delete
'<div class="ampforwp-recommendation-btn updated-message">'+
[2418] Fix | Delete
'<p>Go to Ads by WPQuads settings</p>'+
[2419] Fix | Delete
'</div>'+
[2420] Fix | Delete
'</a>&nbsp;<br>'+
[2421] Fix | Delete
'<a href="https://wpquads.com/documentation/" class="amp_recommend_learnmore" target="_blank">Learn more</a>'+
[2422] Fix | Delete
'</div>'+
[2423] Fix | Delete
'</fieldset>'+
[2424] Fix | Delete
'</td>'+
[2425] Fix | Delete
'</tr>'+
[2426] Fix | Delete
'</tbody>'+
[2427] Fix | Delete
'</table>';
[2428] Fix | Delete
$(".redux-group-tab.ampforwp_new_features.amp-ads").html(afwp_str);
[2429] Fix | Delete
[2430] Fix | Delete
ampforwp_ux_save_loader();
[2431] Fix | Delete
}
[2432] Fix | Delete
});
[2433] Fix | Delete
}
[2434] Fix | Delete
},
[2435] Fix | Delete
error: function (jqXHR, exception) {
[2436] Fix | Delete
var msg = '';
[2437] Fix | Delete
if (jqXHR.status === 0) {
[2438] Fix | Delete
msg = 'Not connect.\n Verify Network.';
[2439] Fix | Delete
} else if (jqXHR.status === 404) {
[2440] Fix | Delete
msg = 'Requested page not found. [404]';
[2441] Fix | Delete
} else if (jqXHR.status === 500) {
[2442] Fix | Delete
msg = 'Internal Server Error [500].';
[2443] Fix | Delete
} else if (exception === 'parsererror') {
[2444] Fix | Delete
msg = 'Requested JSON parse failed.';
[2445] Fix | Delete
} else if (exception === 'timeout') {
[2446] Fix | Delete
msg = 'Time out error.';
[2447] Fix | Delete
} else if (exception === 'abort') {
[2448] Fix | Delete
msg = 'Ajax request aborted.';
[2449] Fix | Delete
} else {
[2450] Fix | Delete
msg = 'Uncaught Error.\n' + jqXHR.responseText;
[2451] Fix | Delete
}
[2452] Fix | Delete
console.log(msg);
[2453] Fix | Delete
},
[2454] Fix | Delete
}
[2455] Fix | Delete
);
[2456] Fix | Delete
}
[2457] Fix | Delete
function amp_option_panel_view_func(){
[2458] Fix | Delete
if(amp_option_panel_view!="1" && amp_option_panel_view!="2" && amp_option_panel_view!="31" && amp_option_panel_view!="32"){
[2459] Fix | Delete
$('html, body').animate({scrollTop:0},500);
[2460] Fix | Delete
var amp_opt_view_pop = '<div class="ampforwp-option-panel-view-pop" role="dialog">'+
[2461] Fix | Delete
'<div class="m-dialog">'+
[2462] Fix | Delete
'<div class="m-content">'+
[2463] Fix | Delete
'<div class="m-header">'+
[2464] Fix | Delete
'<h1 class="m-title">Choose Option Panel View</h1>'+
[2465] Fix | Delete
'</div>'+
[2466] Fix | Delete
'<div class="m-body">'+
[2467] Fix | Delete
'<p class="mb-msg">What view would you prefer?</p>'+
[2468] Fix | Delete
'<div class="e-f-btns">'+
[2469] Fix | Delete
'<div class="option-button b1 amp-opt-view" id="amp-opt-easy-view">'+
[2470] Fix | Delete
'<h2>Basic</h2>'+
[2471] Fix | Delete
'<div class="e-img"></div>'+
[2472] Fix | Delete
'<p>For Beginers</p>'+
[2473] Fix | Delete
'</div>'+
[2474] Fix | Delete
'<div class="option-button b2 amp-opt-view" id="amp-opt-full-view">'+
[2475] Fix | Delete
'<h2>Advance</h2>'+
[2476] Fix | Delete
'<div class="f-img"></div>'+
[2477] Fix | Delete
'<p>For Experts</p>'+
[2478] Fix | Delete
'</div>'+
[2479] Fix | Delete
'</div>'+
[2480] Fix | Delete
'</div>'+
[2481] Fix | Delete
'</div>'+
[2482] Fix | Delete
'</div>'+
[2483] Fix | Delete
'</div>';
[2484] Fix | Delete
$("body").prepend(amp_opt_view_pop);
[2485] Fix | Delete
setTimeout(function(){
[2486] Fix | Delete
$("body").css({'overflow':'hidden'});
[2487] Fix | Delete
},510);
[2488] Fix | Delete
}
[2489] Fix | Delete
if(amp_option_panel_view==1){
[2490] Fix | Delete
setTimeout(function(){
[2491] Fix | Delete
$("#1_section_group_li_a").click();
[2492] Fix | Delete
},100);
[2493] Fix | Delete
}
[2494] Fix | Delete
}
[2495] Fix | Delete
amp_option_panel_view_func();
[2496] Fix | Delete
[2497] Fix | Delete
$(".amp-opt-view").on("click", function(){
[2498] Fix | Delete
var thisid = $(this).attr('id');
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function