- htttp://www.flippercode.com
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_infowindow_message', 'wpgmp_infowindow_message',1,2 ); | |
function wpgmp_infowindow_message($message,$map) { | |
global $post; | |
if( $post->ID == 1) { | |
$message = "<h1>{marker_title}</h1>"; | |
} | |
if( $post->ID == 2) { |
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_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 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_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['show_all_locations'] = true; | |
$location_criteria['category__not_in'] = array(1,2); // You can use category name as well. | |
} | |
return $location_criteria; |
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_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['show_all_locations'] = true; | |
} | |
return $location_criteria; |
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_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 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_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['show_all_locations'] = true; | |
$location_criteria['category__in'] = array(1,2,3); // You can use category name as well. | |
} | |
return $location_criteria; |
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
<?php | |
$CURRENTPOST_LAT = get_post_meta(get_the_ID(),'_wpgmp_metabox_latitude',true); | |
$CURRENTPOST_LON = get_post_meta(get_the_ID(),'_wpgmp_metabox_longitude',true); | |
echo do_shortcode("[display_map marker1='$CURRENTPOST_LAT | $CURRENTPOST_LON | hello world | Bla Bla | category']"); | |
?> |
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('agp_current_settings', 'agp_current_settings',1,1); | |
function agp_current_settings($options) { | |
if(is_category('beer')) { | |
$options['min_age'] = 16; | |
} elseif(is_category('spirits')) { | |
$options['min_age'] = 18; | |
} |
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_location_criteria','wpgmp_location_criteria',1,2 ); | |
function wpgmp_location_criteria($criteria,$map) { | |
$criteria['show_all_locations'] = true; | |
return $criteria; | |
} |
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_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>'; |