• Resolved Camilo

    (@camilo517)


    This code loads in all administration pages (back-end)
    It could be done inline and make it native js and not jquery

    
    jQuery(document).ready(function($) {
        $( '.notice.is-dismissible' ).on('click', '.notice-dismiss', function ( event ) {
            event.preventDefault();
            var $this = $(this);
            if( 'undefined' == $this.parent().attr('id') ){
                return;
            }
            $.post( ajaxurl, {
                action: 'dnh_dismiss_notice',
                url: ajaxurl,
                id: $this.parent().attr('id')
            });
    
        });
    });
    

The topic ‘WPO’ is closed to new replies.