- htttp://www.flippercode.com
View gist:ee4a168ead51d9c30595314e439327e8
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; | |
} |
View gist:6c9aa8d02d52201fc63b87b6c7dffd85
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>'; |
View gist:bc2eb104cc0250a2b66187e54f5327ad
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; | |
} |
View gist:1293f805f532494e0b8d5dc05caef749
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) { |
View gist:f94dee4927d24e771e2c8670cea84b32
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; |
View gist:7044871fb20bcf05ca030e5f8ad05b63
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'; |
View gist:c920b59f4eee6c8edead58a2c96dd5c5
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(); |
View gist:0b119ae1b6714b3e9657356adac70410
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); } |
View gist:97ea3c89de11d2e3ba72e36c6e1c0de0
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. |
View gist:b02e04871fe823d1b71bb04993cc153e
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