Posted By

gd6d on 01/20/10


Tagged

wordpress shortcode gmap


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

BrianCoyDesign


Google Maps Shortcode


 / Published in: PHP
 

URL: http://digwp.com/2010/01/google-maps-shortcode/

  1. //Google Maps Shortcode
  2. function fn_googleMaps($atts, $content = null) {
  3. extract(shortcode_atts(array(
  4. "width" => '640',
  5. "height" => '480',
  6. "src" => ''
  7. ), $atts));
  8. return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'&amp;output=embed"></iframe>';
  9. }
  10. add_shortcode("googlemap", "fn_googleMaps");
  11.  
  12.  
  13. [googlemap width="200" height="200" src="[url]"]

Report this snippet  

You need to login to post a comment.