Created
January 21, 2019 13:03
-
-
Save wpflippercode/7044871fb20bcf05ca030e5f8ad05b63 to your computer and use it in GitHub Desktop.
Change Marker Cluster Icon Using Filter
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
add_filter('wpgmp_map_markercluster',change_cluster_marker,10,2); | |
function change_cluster_marker($cluster_data,$map){ | |
// Add map specific condition here | |
if($map->map_id == '1'){ | |
//Change Main Cluster Image | |
$cluster_data['icon'] = 'university.png'; | |
//Change Cluster Hover Image | |
$cluster_data['hover_icon'] = 'university.png'; | |
} | |
return $cluster_data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment