Last active
December 14, 2015 20:28
-
-
Save kprimdal-dk/5144048 to your computer and use it in GitHub Desktop.
WordPress Iframe Shortcode
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
function mux_iframe($atts, $content = null) { | |
extract( shortcode_atts( | |
array( | |
'width' => '558', | |
'height' => '250', | |
'overflow' => 'hidden', | |
'scrolling' => 'no', | |
'frameborder' => '0' | |
), $atts) | |
); | |
return '<iframe style="overflow: '. $overflow .';" src="'. do_shortcode( $content ).'" height="'. $height .'" width="'. $width .'" frameborder="'. $frameborder .'" scrolling="'. $scrolling .'"></iframe>'; | |
} | |
add_shortcode("iframe", "mux_iframe"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment