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/wpforms-.../src/Frontend
File: Captcha.php
captchaID = turnstile.render(el, {
[500] Fix | Delete
theme: "' . $captcha_settings['theme'] . '",
[501] Fix | Delete
callback: function () {
[502] Fix | Delete
turnstileUpdateContainer(el);
[503] Fix | Delete
wpformsRecaptchaCallback(el);
[504] Fix | Delete
},
[505] Fix | Delete
"timeout-callback": function() {
[506] Fix | Delete
turnstileUpdateContainer(el);
[507] Fix | Delete
}
[508] Fix | Delete
});
[509] Fix | Delete
el.setAttribute("data-recaptcha-id", captchaID);
[510] Fix | Delete
});
[511] Fix | Delete
[512] Fix | Delete
wpformsDispatchEvent( document, "wpformsRecaptchaLoaded", true );
[513] Fix | Delete
};
[514] Fix | Delete
';
[515] Fix | Delete
[516] Fix | Delete
return $data;
[517] Fix | Delete
}
[518] Fix | Delete
[519] Fix | Delete
if ( $captcha_settings['recaptcha_type'] === 'v3' ) {
[520] Fix | Delete
$data = $dispatch;
[521] Fix | Delete
[522] Fix | Delete
$data .= /** @lang JavaScript */
[523] Fix | Delete
'var wpformsRecaptchaV3Execute = function ( callback ) {
[524] Fix | Delete
grecaptcha.execute( "' . $captcha_settings['site_key'] . '", { action: "wpforms" } ).then( function ( token ) {
[525] Fix | Delete
Array.prototype.forEach.call( document.getElementsByName( "wpforms[recaptcha]" ), function ( el ) {
[526] Fix | Delete
el.value = token;
[527] Fix | Delete
} );
[528] Fix | Delete
if ( typeof callback === "function" ) {
[529] Fix | Delete
return callback();
[530] Fix | Delete
}
[531] Fix | Delete
} );
[532] Fix | Delete
}
[533] Fix | Delete
grecaptcha.ready( function () {
[534] Fix | Delete
wpformsDispatchEvent( document, "wpformsRecaptchaLoaded", true );
[535] Fix | Delete
} );
[536] Fix | Delete
';
[537] Fix | Delete
} elseif ( $captcha_settings['recaptcha_type'] === 'invisible' ) {
[538] Fix | Delete
$data = $polyfills;
[539] Fix | Delete
$data .= $dispatch;
[540] Fix | Delete
$data .= $sync;
[541] Fix | Delete
[542] Fix | Delete
$data .= /** @lang JavaScript */
[543] Fix | Delete
'var wpformsRecaptchaLoad = wpformsRecaptchaSync( function () {
[544] Fix | Delete
Array.prototype.forEach.call(document.querySelectorAll(".g-recaptcha"), function (el) {
[545] Fix | Delete
try {
[546] Fix | Delete
var recaptchaID = grecaptcha.render(el, {
[547] Fix | Delete
"callback": function () {
[548] Fix | Delete
wpformsRecaptchaCallback(el);
[549] Fix | Delete
},
[550] Fix | Delete
"error-callback": function () {
[551] Fix | Delete
wpformsRecaptchaErrorCallback(el);
[552] Fix | Delete
}
[553] Fix | Delete
}, true);
[554] Fix | Delete
el.closest("form").querySelector("button[type=submit]").recaptchaID = recaptchaID;
[555] Fix | Delete
} catch (error) {}
[556] Fix | Delete
});
[557] Fix | Delete
wpformsDispatchEvent(document, "wpformsRecaptchaLoaded", true);
[558] Fix | Delete
} );
[559] Fix | Delete
var wpformsRecaptchaCallback = function (el) {
[560] Fix | Delete
var $form = el.closest("form");
[561] Fix | Delete
if (typeof wpforms.formSubmit === "function") {
[562] Fix | Delete
wpforms.formSubmit($form);
[563] Fix | Delete
} else {
[564] Fix | Delete
$form.querySelector("button[type=submit]").recaptchaID = false;
[565] Fix | Delete
$form.submit();
[566] Fix | Delete
}
[567] Fix | Delete
};
[568] Fix | Delete
var wpformsRecaptchaErrorCallback = function (el) {
[569] Fix | Delete
var $form = el.closest("form");
[570] Fix | Delete
$form.querySelector("button[type=submit]").dataset.captchaInvalid = true;
[571] Fix | Delete
};
[572] Fix | Delete
';
[573] Fix | Delete
} else {
[574] Fix | Delete
$data = $dispatch;
[575] Fix | Delete
$data .= $callback;
[576] Fix | Delete
[577] Fix | Delete
$data .= /** @lang JavaScript */
[578] Fix | Delete
'var wpformsRecaptchaLoad = function () {
[579] Fix | Delete
Array.prototype.forEach.call(document.querySelectorAll(".g-recaptcha"), function (el) {
[580] Fix | Delete
try {
[581] Fix | Delete
var recaptchaID = grecaptcha.render(el, {
[582] Fix | Delete
callback: function () {
[583] Fix | Delete
wpformsRecaptchaCallback(el);
[584] Fix | Delete
}
[585] Fix | Delete
});
[586] Fix | Delete
el.setAttribute("data-recaptcha-id", recaptchaID);
[587] Fix | Delete
} catch (error) {}
[588] Fix | Delete
});
[589] Fix | Delete
wpformsDispatchEvent(document, "wpformsRecaptchaLoaded", true);
[590] Fix | Delete
};
[591] Fix | Delete
';
[592] Fix | Delete
}
[593] Fix | Delete
[594] Fix | Delete
return $data;
[595] Fix | Delete
}
[596] Fix | Delete
[597] Fix | Delete
/**
[598] Fix | Delete
* Cloudflare Turnstile captcha requires defer attribute.
[599] Fix | Delete
*
[600] Fix | Delete
* @since 1.8.1
[601] Fix | Delete
*
[602] Fix | Delete
* @param string $tag HTML for the script tag.
[603] Fix | Delete
* @param string $handle Handle of script.
[604] Fix | Delete
* @param string $src Src of script.
[605] Fix | Delete
*
[606] Fix | Delete
* @return string
[607] Fix | Delete
*/
[608] Fix | Delete
public function set_defer_attribute( $tag, $handle, $src ) {
[609] Fix | Delete
[610] Fix | Delete
$captcha_settings = wpforms_get_captcha_settings();
[611] Fix | Delete
[612] Fix | Delete
if ( $captcha_settings['provider'] !== 'turnstile' ) {
[613] Fix | Delete
return $tag;
[614] Fix | Delete
}
[615] Fix | Delete
[616] Fix | Delete
if ( $handle !== 'wpforms-recaptcha' ) {
[617] Fix | Delete
return $tag;
[618] Fix | Delete
}
[619] Fix | Delete
[620] Fix | Delete
return str_replace( ' src', ' defer src', $tag );
[621] Fix | Delete
}
[622] Fix | Delete
}
[623] Fix | Delete
[624] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function