Skip to content

Instantly share code, notes, and snippets.

@kprimdal-dk kprimdal-dk/gist:5144048
Last active Dec 14, 2015

Embed
What would you like to do?
WordPress Iframe Shortcode
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
You can’t perform that action at this time.