- 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_taxonomy_separator', 'wpgmp_taxonomy_separator',1,2 ); | |
function wpgmp_taxonomy_separator($separtor,$map) { | |
$separtor = "|"; //default separator is comma (,) | |
return $separtor; | |
} |
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_featured_image_size', 'wpgmp_featured_image_size',1,3 ); | |
function wpgmp_featured_image_size($size,$post,$map) { | |
//$size = 'thumbnail'; | |
//$size = 'medium'; | |
$size = array(50,50); | |
return $size; |
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_featured_image', 'wpgmp_featured_image',1,3 ); | |
function wpgmp_featured_image($image,$post_id,$map_id) { | |
// Modify img tag containing featured image. | |
$image = '<img src="http://lorempixel.com/400/200/" />'; | |
return $image; | |
} |
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_post_placeholder', 'wpgmp_post_placeholder',1,3 ); | |
function wpgmp_post_placeholder($placeholders,$post,$map) { | |
// Posts Details | |
$placeholders['post_excerpt'] = get_the_content($post->ID); | |
return $placeholders; | |
} |
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_render_shortcode','wpgmp_render_shortcode',1,2 ); | |
function wpgmp_render_shortcode($bool,$map) { | |
//Default is TRUE. | |
$bool = FALSE; | |
return $bool; | |
} |
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) { | |
// Here hide the marker with ID = 12665. | |
if($place['id'] == 12665) { | |
$show = FALSE; | |
} | |
return $show; | |
} |
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_markers','wpgmp_markers',1,3 ); | |
function wpgmp_markers($places,$map) { | |
global $post; | |
if( $post->ID == 1 ) { | |
$places = array_slice($places, 1,10); | |
} else if ($post->ID == 2) { | |
$places = array_slice($places, 10,10); | |
} else { |
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
// Sort by city. | |
add_filter('wpgmp_sorting','wpgmp_sorting_location_field',2,2); | |
function wpgmp_sorting_location_field($sorting,$map) { | |
$sorting['city__asc'] ="City A-Z"; | |
$sorting['city__desc'] ="City Z-A"; | |
return $sorting; | |
} |
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
// Sort by extra field. e.g "phone". | |
add_filter('wpgmp_sorting','wpgmp_sorting_extra_field',3,2); | |
function wpgmp_sorting_extra_field($sorting,$map) { | |
$sorting['phone__asc__num'] ="Phone A-Z"; | |
$sorting['phone__desc__num'] ="Phone Z-A"; | |
return $sorting; | |
} |
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
// Sort by custom field. e.g "salary". | |
add_filter('wpgmp_sorting','wpgmp_sorting_custom_field',1,2); | |
function wpgmp_sorting_custom_field($sorting,$map) { | |
$sorting['%salary%__asc__num'] ="Salary Low-High"; | |
$sorting['%salary%__desc__num'] ="Salary High-Low"; | |
return $sorting; | |
} |