- 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_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') { |
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('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(); | |
} |
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('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(); | |
} |
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('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>'; | |
} |
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_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()) : |
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('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> |
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('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; |
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
/** | |
* 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' ); |
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('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) { |
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_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