|
Server : Apache System : Linux box5719.bluehost.com 5.14.0-687.54.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 6 04:43:47 EDT 2026 x86_64 User : uaeambul ( 1793) PHP Version : 8.3.36 Disable Function : NONE Directory : /home1/uaeambul/public_html/wp-content/plugins/tm-plugin/admin/assets/js/ | |
|
Path: /home1/uaeambul/public_html/wp-content/plugins/tm-plugin/admin/assets/js/tm_admin_custom.js
Size: 1.07 KB
Permissions: 0644
(function ($) {
"use strict";
// #tm_reset_theme_mod
$(document).on ('click', 'button#reset_settings', function () {
if(window.confirm('Are you sure to reset all the ThemeMountain theme mod options to default?')){
var nonce = reset_all_settings_nonce;
var $message_elm = $(this).find('option[value="hide"]');
$message_elm.text('Pelase wait while processing your request.');
$.ajax({
'url': ajaxurl,
'type': 'post',
'data': {
'action': 'TM_Ajax',
'_tm_ajax_nonce': nonce,
'ajax_command': 'resetAllSettings',
}
})
.done(function( _response ) {
if(_response.response) {
$message_elm.text('Theme Mod has been resetted. Refreshing the page now.');
// window.location = _response.message;
} else {
$message_elm.text('There was an error in handling your request at the server. Please try again later.');
}
})
.fail(function( _response ) {
$message_elm.text('There was an error in handling your request. Please try again later.');
});
} else {
// nothing to do
}
return false;
});
})(window.jQuery);