Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/ninja-fo.../assets/js/lib
File: sendwp.js
function ninja_forms_sendwp_remote_install() {
[0] Fix | Delete
var data = {
[1] Fix | Delete
'action': 'ninja_forms_sendwp_remote_install',
[2] Fix | Delete
};
[3] Fix | Delete
[4] Fix | Delete
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
[5] Fix | Delete
jQuery.post(ajaxurl, data, function(response) {
[6] Fix | Delete
var data = JSON.parse(response);
[7] Fix | Delete
ninja_forms_sendwp_register_client(data.register_url, data.client_name, data.client_secret, data.client_redirect, data.partner_id);
[8] Fix | Delete
});
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
function ninja_forms_sendwp_register_client(register_url, client_name, client_secret, client_redirect, partner_id) {
[12] Fix | Delete
[13] Fix | Delete
var form = document.createElement("form");
[14] Fix | Delete
form.setAttribute("method", 'POST');
[15] Fix | Delete
form.setAttribute("action", register_url);
[16] Fix | Delete
[17] Fix | Delete
function ninja_forms_sendwp_append_form_input(name, value) {
[18] Fix | Delete
var input = document.createElement("input");
[19] Fix | Delete
input.setAttribute("type", "hidden");
[20] Fix | Delete
input.setAttribute("name", name);
[21] Fix | Delete
input.setAttribute("value", value);
[22] Fix | Delete
form.appendChild(input);
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
ninja_forms_sendwp_append_form_input('client_name', client_name);
[26] Fix | Delete
ninja_forms_sendwp_append_form_input('client_secret', client_secret);
[27] Fix | Delete
ninja_forms_sendwp_append_form_input('client_redirect', client_redirect);
[28] Fix | Delete
ninja_forms_sendwp_append_form_input('partner_id', partner_id);
[29] Fix | Delete
[30] Fix | Delete
document.body.appendChild(form);
[31] Fix | Delete
form.submit();
[32] Fix | Delete
}
[33] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function