Created
November 13, 2012 23:28
-
-
Save whyisjake/4069129 to your computer and use it in GitHub Desktop.
Slideshare Shortcode
This file contains hidden or 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
[slideshare id=15084328&doc=bbowsptwebinarpub12-11-08a-121108082042-phpapp02] |
This file contains hidden or 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 oreilly_slideshare_embed( $atts ) { | |
extract( shortcode_atts( array( | |
'width' => '370', | |
'height' => '208', | |
'id' => 'id' | |
), $atts ) ); | |
return '<iframe src="'. esc_url( 'http://www.slideshare.net/slideshow/embed_code/?id=' . $id ) . '" width="' . esc_html($width) . '" height="' . esc_html( $height ) . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>'; | |
} | |
add_shortcode( 'slideshare', 'oreilly_slideshare_embed' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment