-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [1.4.4] ### Stable - Security Release - Update Educare to v1.4.4 (and above): Please make sure to update your Educare plugin to version 1.4.4 or higher as soon as possible. - Added nonce to improve form security. - Fixed Cross Site Request Forgery (CSRF) issues. - Removed unnecessary code to enhance performance and security. - Eliminated inline JavaScript to improve security measures. - Addressed well-known bugs to ensure smoother functionality. **Notes:** Update includes security improvements and bug fixes: The latest version of Educare comes with important security enhancements and fixes for any known issues. Please update to this version to ensure a safer and smoother experience with the plugin. Sometimes users may need to clear browsing data to load the updated script correctly.
- Loading branch information
Showing
23 changed files
with
2,542 additions
and
1,918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* Educare functionality only (mainly for ajax) | ||
* | ||
* Autor: FixBD | ||
* Autor Link: https://fixbd.net | ||
* Source: https://github.com/fixbd/educare/assets/js/educare.js | ||
* | ||
*/ | ||
|
||
// jQuery | ||
// Front-End Results System | ||
jQuery(document).ready(function($) { | ||
// Ajax functionality for educare_results shortcode | ||
$(document).on("click", "#results_btn", function(event) { | ||
event.preventDefault(); | ||
$(this).attr('disabled', true); | ||
var current = $(this); | ||
var form_data = $(this).parents('form').serialize(); | ||
|
||
$.ajax({ | ||
url: educareAjax.url, | ||
type: 'POST', | ||
data: { | ||
action: 'educare_proccess_view_results', | ||
nonce: educareAjax.nonce, | ||
form_data: form_data | ||
}, | ||
beforeSend: function(event) { | ||
$('#educare-loading').fadeIn(); | ||
}, | ||
success: function(data) { | ||
if (data.message) { | ||
var arr; | ||
|
||
if (data.message == 'Result not found. Please try again') { | ||
arr = 'success' | ||
} else { | ||
arr = 'error'; | ||
} | ||
|
||
$('#msgs').html('<div class="results_form error_notice ' + arr + '">' + data.message) + '</div>'; | ||
} else { | ||
$('#educare-results-body').html(data); | ||
} | ||
|
||
}, | ||
error: function(data) { | ||
$('#educare-results-body').html(data + '<div class="notice notice-error is-dismissible"><p>Sorry, database connection error!</p></div>'); | ||
}, | ||
complete: function() { | ||
current.prop('disabled', false); | ||
$('#educare-loading').fadeOut(); | ||
grecaptcha.reset(); | ||
} | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.