Last active
December 24, 2015 00:39
-
-
Save lynettechandler/6717721 to your computer and use it in GitHub Desktop.
Slideshare shortcode for self hosted WordPress
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
// Add slideshare shortcode | |
function tbm_slideshare( $atts ) { | |
$atts = extract( shortcode_atts( | |
array( | |
'id'=>'' | |
),$atts ) ); | |
// Break it up so we can get the first variable = presentation ID | |
$id = explode('&', $id); | |
return '<iframe src="http://www.slideshare.net/slideshow/embed_code/'.$id[0].'?rel=0" width="570" height="469" 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','tbm_slideshare' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment