- htttp://www.flippercode.com
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
add_filter('wpgmp_map_output','wpgmp_map_output',1,3 ); | |
function wpgmp_map_output($output,$map_div,$listing_div,$map_id) { | |
// You can use $map_div and $listing_div to place them according to your need. | |
$output = "<div style='float:right'>".$map_div."</div>"; | |
$output .= "<div style='float:left'>".$listing_div."</div>"; | |
return $output; | |
} |
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
add_action('admin_head','fc_remove_profile_image'); | |
function fc_remove_profile_image(){ | |
echo '<script> | |
jQuery(document).ready(function(){ | |
jQuery("tr.user-profile-picture").remove(); | |
}); | |
</script>'; |
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
add_filter('wpgmp_maps_options','wpgmp_maps_options',2,1); | |
function wpgmp_maps_options($options,$map) { | |
//Here You can change zoom level according to the page. | |
if(is_home()) { | |
$options['zoom'] = 10; | |
} else if ( is_page('map-locator') ) { | |
$options['zoom'] = 15; | |
} | |
return $options; | |
} |
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
add_filter('wpgmp_infowindow_post_message', 'wpgmp_infowindow_post_message',1,2 ); | |
function wpgmp_infowindow_post_message($message,$map) { | |
global $post; | |
//This will apply for map id 1. | |
if( $post->ID == 1) { | |
$message = "<h1>{marker_title}</h1>"; | |
} | |
if( $post->ID == 107) { |
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
add_filter('wpgmp_location_criteria', 'wpgmp_location_criteria',1,2 ); | |
function wpgmp_location_criteria($location_criteria,$map) { | |
//This will apply for map id 1. | |
if( $map->map_id == 1) { | |
$location_criteria['limit'] = 5; | |
} | |
return $location_criteria; |
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
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'; |
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
add_filter('wpgmp_marker_source','wpgmp_marker_source',1,2); | |
function wpgmp_marker_source($markers,$map_id) { | |
/* You can create array of the markers to add on the google maps dynamically. It's very useful hook if you want to fetch | |
locations from an external database, API, JSON or XML. | |
*/ | |
$markers = array(); |
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
add_action("wp_head","fc_reset_zoom"); | |
function fc_reset_zoom() { | |
echo ' | |
<script>jQuery(document).ready(function($){ alert("ok"); | |
$("body").on("click",".test",function(){ var map_obj = $("#map5").data("wpgmp_maps"); map_obj.map.setZoom(8); } |
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
add_filter('wpgmp_accept_cookies','wpgmp_accept_cookies'); | |
function wpgmp_accept_cookies($is_allowed) { | |
// cookies-notice plugin integration - | |
if( function_exists('cn_cookies_accepted') ) { | |
$is_allowed = cn_cookies_accepted(); | |
} | |
// cookies-consent plugin integration. You may change cookie name here according to your needs. |
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
add_filter('wpgmp_show_place','wpgmp_show_place',1,3 ); | |
function wpgmp_show_place($show,$place,$map) { | |
global $post; | |
if($place['id'] != $post->ID) { | |
$show = FALSE; | |
} | |
return $show; | |
} |
NewerOlder