Bonjour,
Premierement, je ne comprend pas la variable optionnel passer en parametre:
$content=null
A quoi sert-elle ?
Le short code en lui meme fonctionne, mais pas pour la carte
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 function xa_map_it($atts, $content=null){ $addr = '30 Canterbury ST, Austin, US'; shortcode_atts( array('title' => 'Your map', 'adress' => ''), $atts); $base_map_url = "http://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&sensor=false"; return '<h2>'.$atts['title'].'</h2> <img alt="no image no image no image no image " scr="'. $base_map_url.urlencode($atts['adress']) .'">'; }
Partager