Server IP : 15.235.198.142 / Your IP : 216.73.216.197 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/yme/wp-content/themes/oceanwp/inc/activation-notice/assets/js/ |
Upload File : |
// Document Ready jQuery(document).ready(function ($) { var owp_notification = { isLoading: false, init: function () { if ($('.owp-ocean-extra-plugin-inner').length) { this.render_actions(); $(document).on('click', '.owp-ocean-extra-plugin-inner .notice-dismiss', this.dismiss_notice); $(document).on('click', '.owp-ocean-extra-plugin-inner .notice-actions button', this.main_action); } }, render_actions: function () { $.ajax({ type: 'post', url: ajaxurl, data: { action: 'oceanwp_check_notice_actions' }, success: function (response) { if (response.data != '') { $('.owp-notification-content').append(response.data); } }, complete: function () { } }); }, dismiss_notice: function (evt) { $(evt.target).closest('.notice-ocean-extra-plugin').remove(); $.ajax(ajaxurl, { type: 'POST', data: { action: 'oceanwp_dismissed_notice', }, }) }, main_action: function (evt) { owp_notification.isLoading = true; var $el = $(evt.target); $el.prop('disabled', 'disabled'); if ($el.data('action') == 'activate') { $(evt.target).text(owp_notification_i18n.activating); } else if ($el.data('action') == 'install_activate') { $(evt.target).text(owp_notification_i18n.installing_activating); } $(evt.target).append('<i className="dashicons dashicons-update" />'); $.ajax({ type: 'post', url: ajaxurl, data: { action: 'oceanwp_notice_button_click' }, success: function (response) { if (response.success) { if (response.data.status === 'active') { location.assign(response.data.pluginUrl) } } owp_notification.isLoading = false; }, complete: function () { } }); } } owp_notification.init(); });