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
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wpforms-.../assets/js/integrat.../elemento...
File: frontend.js
/* global wpforms, wpformsElementorVars, wpformsModernFileUpload, wpformsRecaptchaLoad, grecaptcha */
[0] Fix | Delete
[1] Fix | Delete
'use strict';
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* WPForms integration with Elementor on the frontend.
[5] Fix | Delete
*
[6] Fix | Delete
* @since 1.6.2 Moved from `wpforms-elementor.js`
[7] Fix | Delete
*/
[8] Fix | Delete
var WPFormsElementorFrontend = window.WPFormsElementorFrontend || ( function( document, window, $ ) {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Public functions and properties.
[12] Fix | Delete
*
[13] Fix | Delete
* @since 1.6.2
[14] Fix | Delete
*
[15] Fix | Delete
* @type {object}
[16] Fix | Delete
*/
[17] Fix | Delete
var app = {
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Start the engine.
[21] Fix | Delete
*
[22] Fix | Delete
* @since 1.6.2
[23] Fix | Delete
*/
[24] Fix | Delete
init: function() {
[25] Fix | Delete
[26] Fix | Delete
app.events();
[27] Fix | Delete
},
[28] Fix | Delete
[29] Fix | Delete
/**
[30] Fix | Delete
* Register JS events.
[31] Fix | Delete
*
[32] Fix | Delete
* @since 1.6.2
[33] Fix | Delete
*/
[34] Fix | Delete
events: function() {
[35] Fix | Delete
[36] Fix | Delete
window.addEventListener( 'elementor/popup/show', function( event ) {
[37] Fix | Delete
[38] Fix | Delete
let $modal = $( '#elementor-popup-modal-' + event.detail.id ),
[39] Fix | Delete
$form = $modal.find( '.wpforms-form' );
[40] Fix | Delete
[41] Fix | Delete
if ( ! $form.length ) {
[42] Fix | Delete
return;
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
app.initFields( $form );
[46] Fix | Delete
} );
[47] Fix | Delete
},
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Init all things for WPForms.
[51] Fix | Delete
*
[52] Fix | Delete
* @since 1.6.2
[53] Fix | Delete
*
[54] Fix | Delete
* @param {object} $form jQuery selector.
[55] Fix | Delete
*/
[56] Fix | Delete
initFields: function( $form ) {
[57] Fix | Delete
[58] Fix | Delete
// Init WPForms things.
[59] Fix | Delete
wpforms.ready();
[60] Fix | Delete
[61] Fix | Delete
// Init `Modern File Upload` field.
[62] Fix | Delete
if ( 'undefined' !== typeof wpformsModernFileUpload ) {
[63] Fix | Delete
wpformsModernFileUpload.init();
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
// Init CAPTCHA.
[67] Fix | Delete
if ( 'undefined' !== typeof wpformsRecaptchaLoad ) {
[68] Fix | Delete
if ( 'recaptcha' === wpformsElementorVars.captcha_provider && 'v3' === wpformsElementorVars.recaptcha_type ) {
[69] Fix | Delete
if ( 'undefined' !== typeof grecaptcha ) {
[70] Fix | Delete
grecaptcha.ready( wpformsRecaptchaLoad );
[71] Fix | Delete
}
[72] Fix | Delete
} else {
[73] Fix | Delete
wpformsRecaptchaLoad();
[74] Fix | Delete
}
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
// Register a custom event.
[78] Fix | Delete
$( document ).trigger( 'wpforms_elementor_form_fields_initialized', [ $form ] );
[79] Fix | Delete
},
[80] Fix | Delete
};
[81] Fix | Delete
[82] Fix | Delete
return app;
[83] Fix | Delete
[84] Fix | Delete
}( document, window, jQuery ) );
[85] Fix | Delete
[86] Fix | Delete
// Initialize.
[87] Fix | Delete
WPFormsElementorFrontend.init();
[88] Fix | Delete
[89] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function