Last active
July 16, 2018 05:33
-
-
Save craigsimps/a9435be00f828de6bc5006b99c0776d4 to your computer and use it in GitHub Desktop.
This file contains 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 | |
add_filter( 'facetwp_map_init_args', 'prefix_prevent_scroll_zoom_on_facet_map' ); | |
/** | |
* Filter the Google Map options to prevent scrollwheel zoom. | |
* @link https://craigsimpson.scot/filter-facetwp-google-map-options | |
* | |
* @param array $args Array of init settings for Google map. | |
* | |
* @return array $args Modified array. | |
*/ | |
function prefix_prevent_scroll_zoom_on_facet_map( $args ) { | |
$args['init']['scrollwheel'] = false; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment