protection if location list is empty
+ create script and style dir
This commit is contained in:
@@ -39,10 +39,10 @@ function mp_enqueue_scripts() {
|
||||
// https://developers.google.com/maps/documentation/javascript/marker-clustering
|
||||
$marker_clusterer = "https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js";
|
||||
|
||||
wp_enqueue_style( 'mp_style', plugins_url('mp_style.css', __FILE__), '', '', '');
|
||||
wp_enqueue_script('mp_marker_clusterer', $marker_clusterer, '', '', true);
|
||||
wp_enqueue_script('mp_init_map', plugins_url('mp_init_map.js', __FILE__), ['mp_marker_clusterer'],'', true);
|
||||
wp_enqueue_script('mp_google_api', mp_url_api(), ['mp_init_map'], '', true);
|
||||
wp_enqueue_style( 'mp_style', plugins_url('styles/mp_style.css', __FILE__), '', '', '');
|
||||
wp_enqueue_script('mp_marker_clusterer', $marker_clusterer, '', '', true);
|
||||
wp_enqueue_script('mp_init_map', plugins_url('scripts/mp_init_map.js', __FILE__), ['mp_marker_clusterer'],'', true);
|
||||
wp_enqueue_script('mp_google_api', mp_url_api(), ['mp_init_map'], '', true);
|
||||
|
||||
mp_add_to_scripts();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user