Skip to content

Instantly share code, notes, and snippets.

@kprimdal-dk
Last active December 14, 2015 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kprimdal-dk/5144048 to your computer and use it in GitHub Desktop.
Save kprimdal-dk/5144048 to your computer and use it in GitHub Desktop.
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