Skip to content
Snippets Groups Projects
Select Git revision
  • 9424a1280525a78a6468036dc6bdafc3183245ec
  • master default protected
  • bugfix/wordpress-review
  • fix/duplicate
  • bugfix/get_current_screen_fail
  • feature/dismiss-nonce
  • replace-dodgy-path
  • bugfix/notice-not-show
  • devel
  • 3.3.0
  • 3.2.5
  • 3.2.4
  • 3.2.3
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.2.0-beta7
  • 3.2.0-beta6
  • 3.2.0-beta5
  • 3.2.0-beta4
  • 3.2.0-beta3
  • 3.2.0-beta2
  • 3.2.0-beta1
  • 3.1.4
  • 3.1.4-beta1
  • 3.1.3
  • 3.1.1
  • 3.1
  • 3.0
29 results

notice.js

Blame
  • notice.js 780 B
    jQuery( document ).on( 'click', '.notice-dismiss', function() {
        var notice_name = jQuery(this).closest('div.notice').data('notice-name');
        var source = jQuery(this).closest('div.notice').data('source');
        if ('' !== notice_name) {
            jQuery.ajax({
                url: ajaxurl,
                type: 'post',
                data: {
                    action: 'wpdesk_notice_dismiss',
                    notice_name: notice_name,
                    source: source,
                },
                success: function (response) {
                }
            });
        }
    });
    
    jQuery( document ).on( 'click', '.notice-dismiss-link', function() {
        jQuery(this).closest('div.notice').data('source',jQuery(this).data('source'));
        jQuery(this).closest('div.notice').find('.notice-dismiss').click();
    });