Revert functions.php

This commit is contained in:
Markus Ankenbrand 2017-02-20 23:32:28 +01:00
parent caceb4fd50
commit b513afbecd
2 changed files with 4 additions and 10 deletions

View file

@ -6,7 +6,7 @@ function td_theme_styles() {
wp_enqueue_script(
'google-maps',
'//maps.googleapis.com/maps/api/js?key=AIzaSyDHNT102YHu-TP50F78bPyvf5ia6K6cjU8&callback=initMap',
array('page_pins_map'),
array(),
'1.0',
true
);
@ -82,11 +82,4 @@ function atravelblog_related_posts() {
add_post_image_thumbs($urlaub, 'Urlaub:');
wp_reset_query();
}
}
function enqueue_page_pins() {
// change the template file name according to your file
if ( ! is_page_template('page-pins.php') ) return;
wp_enqueue_script('page_pins_map', get_stylesheet_directory_uri() . '/js/page-pins-map.js', array('jquery'), null, true);
}
add_action('wp_enqueue_scripts','enqueue_page_pins');
}

View file

@ -78,8 +78,9 @@
}
}
endwhile;
wp_enqueue_script('page_pins_map', get_stylesheet_directory_uri() . '/js/page-pins-map.js', array('jquery'));
wp_localize_script('page_pins_map', 'page_pins_map', array('places' => $locations, 'traveler' => array_values($traveler)));
?>
<?php get_footer(); ?>
<?php get_footer(); ?>