Server IP : 104.21.14.48 / Your IP : 3.15.198.92 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/plugins/defender-security/assets/js/ |
Upload File : |
window.Defender = window.Defender || {}; //Added extra parameter to allow for some actions to keep modal open Defender.showNotification = function (type, message, autoClose = false) { var jq = jQuery; var html = '<div class="sui-floating-notices"><div role="alert" id="defender-notification" class="sui-notice" aria-live="assertive"></div></div>'; if (jq('body').find('#defender-notification').size() === 0) { jq('.sui-wrap').prepend(html); }else{ jq('#defender-notification').closest('.sui-floating-notices').replaceWith(jQuery(html)); } var options = { type: 'green', icon: 'info' } if (type === 'error') { options.type = 'red'; } else if (type === 'warning') { options.type = 'warning'; } else if (type === 'info') { options.type = 'blue'; } if (true === autoClose) { options.autoclose = { show: true, timeout: 5000 }; } else { options.dismiss = { show: true, label: 'Click to close', tooltip: 'Dismiss' }; } SUI.openNotice('defender-notification', '<p>' + message + '</p>', options); } /** * Filter default wp.i18n.__ function * `defender-security` is our domain */ wp.hooks.addFilter( 'i18n.gettext_wpdef', 'defender', function ( translation, text ) { if ( defenderGetText && defenderGetText[ text ] ) { return defenderGetText[ text ]; } return translation; }, 20 );