Modify the "Map It" Address Link

Available in GravityView 1.1.7 and higher.

To modify the "Map It" link generated by GravityView, use the gravityview_map_link filter.

The filter is located inside the gravityview_get_map_link() function.

The filter passes three arguments:

  • $link - Existing anchor tag
  • $address - Address to generate link for
  • $url - The URL that was generated by GravityView. By default, a Google Maps link

Here's a simple code snippet to change the 'Map It' text to 'View on Google Maps':