Last active
October 26, 2023 11:30
-
-
Save yuriinalivaiko/e65f39aea73c1dd5a4bb4947ecf5f763 to your computer and use it in GitHub Desktop.
This code snippet disables the map marker clustering in the User Locations extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Disable Clustering | |
| */ | |
| add_action( 'wp_footer', function () { | |
| ?><script type="text/javascript"> | |
| wp.hooks.addFilter( 'um_member_directory_disable_clustering', 'um_user_locations', function ( disableClustering, directory ) { | |
| disableClustering = true; | |
| return disableClustering; | |
| }, 20 ); | |
| </script><?php | |
| }, 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist is a part of the article User Locations - Hooks
You can add this code to the
functions.phpfile in the active theme directory. Skip the opening<?phptag.