Skip to content

Instantly share code, notes, and snippets.

@craigsimps craigsimps/functions.php
Last active Jul 16, 2018

Embed
What would you like to do?
<?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
You can’t perform that action at this time.