- htttp://www.flippercode.com
View gist:c7c59e5da3be436dc8970f35c37e9335
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','flippercode_maps_fix' ); | |
function flippercode_maps_fix() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$('body').on('click','.responsive-tabs__list__item',function(){ | |
var id = $(this).attr('id'); | |
if( id == 'tablist1-tab2') { | |
if(typeof map1 != 'undefined') { |
View gist:1fc46599c6061c97e1d255161055618d
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','flippercode_maps_fix'); | |
function flippercode_maps_fix() | |
{ ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$('body').on('click','.nav-tabs li',function(){ | |
if(typeof map1 != 'undefined') { | |
$(map1).data('wpgmp_maps').resize_map(); | |
} |
View gist:36f3b309a6ec286aa0068b0d1b92e559
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','flippercode_maps_fix'); | |
function flippercode_maps_fix() | |
{ ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$("#yourModal").on("shown.bs.modal", function () { | |
if(typeof map1 != 'undefined') { | |
$(map1).data('wpgmp_maps').resize_map(); | |
} |
View gist:e9a02bc4eabb0b0098c6a6ffcfaa8ec4
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($){ | |
$("body").on("click","select[name=\"place_category\"]",function(){ | |
var map_obj = $(map1).data("wpgmp_maps").map; | |
map_obj.setZoom(5); | |
}); | |
});</script>'; | |
} |
View Function.php
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","add_markers",1,2); | |
function add_markers($markers,$map_id) | |
{ | |
global $post; | |
//echo '<pre>'.print_r($markers).'</pre>'; | |
$new_markers = array(); | |
$the_query_map = new WP_Query( array( 'posts_per_page' => -1 ) ); | |
if($the_query_map->have_posts()) : |
View gist:6e2b43fe7b622de8d81e7199cafc237e
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('wpp_layout_modifier', 'wpp_layout_modifier', 10, 2); | |
function wpp_layout_modifier( $layout_content,$post_id ) { | |
// Define your own html here and use placeholders e.g {title}, {date} etc. | |
$layout_content = '<div class="wpp_post" itemscope="" itemtype="http://schema.org/Article"> | |
{title} | |
<div class="wpp_meta"> | |
<span class="wpp_date">{date}</span> | |
<span class="wpp_author">{author}</span> | |
<span class="wpp_comments">{comments}</span> | |
</div> |
View gist:e0853d2797793a7707e5b68314de2694
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('wpp_comments_icon','wpp_comments_icon'); | |
function wpp_comments_icon($icon) { | |
$icon = ''; | |
return $icon; | |
} | |
add_filter('wpp_date_icon','wpp_date_icon'); | |
function wpp_date_icon($icon) { | |
$icon = ''; | |
return $icon; |
View gist:4af234bf9f31c2e350ab5740bc86c6ef
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
/** | |
* Modify featured image html. | |
* @param string $thumbnail Default featured image markup. | |
* @param int $post_id Post ID. | |
* @param int $thumbnail_id Attachment ID. | |
* @return string Modified featured image markup. | |
*/ | |
function wpp_thumbnail_html( $thumbnail,$post_id, $thumbnail_id) { | |
$image_attributes = wp_get_attachment_image_src( $thumbnail_id,'thumbnail' ); |
View gist:7ed4735bb523bcfdab129222c215e72f
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('wpp_posts_data','wpp_posts_data',10,2); | |
/** | |
* Modify Post's Data before placing in the template. | |
* @param array $placeholder_data Post's Data. | |
* @param int $post_id Post ID. | |
* @return array Modified Post's Data. | |
*/ | |
function wpp_posts_data($placeholder_data,$post_id) { |
View gist:cc52e76806cee8b8289a550e0b74734c
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",2,4); | |
function wpgmp_map_output($output,$map_div,$listing_div,$map_id) | |
{ | |
$output=" | |
<table width='100%'><tr><td width='50%' valign='top' style='vertical-align:top;'>".$listing_div."</td><td width='50%' valign='top' style='vertical-align:top;'>".$map_div."</td></tr></table>"; | |
return $ouput; |
OlderNewer