Created
June 19, 2014 05:29
-
-
Save Bradley-D/b5353b9eabe21e66d638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Google Maps Shortcode - [googlemap] | |
function bd_google_maps( $atts, $content = null ) { | |
extract(shortcode_atts(array( | |
'width' => '', //set the width | |
'height' => '', // set the height | |
'src' => '' // get the src from google map embed | |
), $atts)); | |
return '<iframe width="' . $width . '" height="' . $height . '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $src . '&output=embed"></iframe>'; | |
} | |
add_shortcode( 'googlemap', 'bd_google_maps' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment