map is showing and files are enqueued and included the right way
This commit is contained in:
25
srcs/plugins/map_prof/mp_url_api.php
Normal file
25
srcs/plugins/map_prof/mp_url_api.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
function mp_url_api() {
|
||||
$mp_url = array(
|
||||
'src' => 'https://maps.googleapis.com/maps/api/js',
|
||||
'sensor' => 'false',
|
||||
'key' => 'AIzaSyCvdGV2ssD4ov4a9CuIlQhoJyz5gWWiSvE',
|
||||
'callback' => 'mp_init_map',
|
||||
);
|
||||
$mp_src = "";
|
||||
foreach ($mp_url as $url_key => $url_value) {
|
||||
if ($url_key === 'src') {
|
||||
$mp_src .= $url_value;
|
||||
if (count($mp_url > 1))
|
||||
$mp_src .= "?";
|
||||
}
|
||||
else
|
||||
$mp_src .= "&" . $url_key . "=" . $url_value;
|
||||
};
|
||||
|
||||
//$mp_api_script = '<script async defer ';
|
||||
//$mp_api_script .= 'src="' . $mp_src . '"></script>';
|
||||
//return $mp_api_script;
|
||||
return $mp_src;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user