mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Added filter wp.hook um_member_directory_popstate_ignore.
Ability to ignore popstate with 3rd-party handlers.
This commit is contained in:
@@ -1670,6 +1670,11 @@ jQuery(document.body).ready( function() {
|
|||||||
|
|
||||||
//history events when back/forward and change window.location.hash
|
//history events when back/forward and change window.location.hash
|
||||||
window.addEventListener( "popstate", function(e) {
|
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() {
|
jQuery( '.um-directory' ).each( function() {
|
||||||
var directory = jQuery(this);
|
var directory = jQuery(this);
|
||||||
var hash = um_members_get_hash( directory );
|
var hash = um_members_get_hash( directory );
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user