Created
May 28, 2016 22:08
-
-
Save brojask/3c724f13409f11877258cb5e8354f012 to your computer and use it in GitHub Desktop.
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
<?php | |
function cwc_viewpdf($attr, $url) { | |
return '<iframe src="http://docs.google.com/viewer?url=' . $url . '&embedded=true" style="width:' .$attr['width']. '; height:' .$attr['height']. ';" frameborder="0">Your browser should support iFrame to view this PDF document</iframe>'; | |
} | |
add_shortcode('embedpdf', 'cwc_viewpdf'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment