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 pdf_function($attr, $url) { | |
extract(shortcode_atts(array( | |
'width' => '640', | |
'height' => '480' | |
), $attr)); | |
return '<iframe src="http://docs.google.com/viewer?url=' . $url . '&embedded=true" style="width:' .$width. '; height:' .$height. ';">Your browser does not support iframes</iframe>'; | |
} | |
add_shortcode('pdf', 'pdf_function'); |
NewerOlder