??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/netecfwd.co.uk/wp-content/plugins/sureforms/admin/assets/js/notice-response.js
⬅ Kembali
/* global srfmNoticeResponse */
( function () {
const notices = {
'srfm-getting-started-notice': {
primary: 'go_to_dashboard',
snooze: 'maybe_later',
dismiss: 'dismissed',
},
'srfm-plugin-review-notice': {
primary: 'rate_sureforms',
snooze: 'maybe_later',
dismiss: 'dismissed',
},
};
function getAction( el, noticeId ) {
const config = notices[ noticeId ];
if ( ! config ) {
return null;
}
if (
el.classList.contains( 'button-primary' ) ||
( el.classList.contains( 'astra-notice-close' ) &&
el.getAttribute( 'target' ) === '_blank' )
) {
return config.primary;
}
if ( el.hasAttribute( 'data-repeat-notice-after' ) ) {
return config.snooze;
}
if ( el.classList.contains( 'astra-notice-close' ) ) {
return config.dismiss;
}
return null;
}
function sendResponse( noticeId, button ) {
const body = new FormData();
body.append( 'action', 'srfm_notice_response' );
body.append( 'nonce', srfmNoticeResponse.nonce );
body.append( 'notice_id', noticeId );
body.append( 'button', button );
fetch( srfmNoticeResponse.ajaxurl, { method: 'POST', body } ).catch(
() => {}
);
}
Object.keys( notices ).forEach( function ( noticeId ) {
const container = document.getElementById( noticeId );
if ( ! container ) {
return;
}
container.addEventListener( 'click', function ( e ) {
const link = e.target.closest( 'a' );
if ( ! link ) {
return;
}
const action = getAction( link, noticeId );
if ( action ) {
sendResponse( noticeId, action );
}
} );
} );
}() );
Nama
Tipe
Ukuran
Diubah
Aksi
📜 notice-response.js
js
1.5 KB
2026-06-25 16:24
📜 sureforms-pointer.js
js
2.4 KB
2026-06-25 16:24