Added filter wp.hook um_member_directory_popstate_ignore.

Ability to ignore popstate with 3rd-party handlers.
This commit is contained in:
Mykyta Synelnikov
2026-02-09 11:47:53 +02:00
parent a3f652a4ce
commit c35debbc2f
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -1670,6 +1670,11 @@ jQuery(document.body).ready( function() {
//history events when back/forward and change window.location.hash
window.addEventListener( "popstate", function(e) {
let ignorePopstate = wp.hooks.applyFilters( 'um_member_directory_popstate_ignore', false );
if ( false !== ignorePopstate ) {
return;
}
jQuery( '.um-directory' ).each( function() {
var directory = jQuery(this);
var hash = um_members_get_hash( directory );
+1 -1
View File
File diff suppressed because one or more lines are too long