Last active
December 29, 2015 06:29
-
-
Save ginocremer/bbf2d4433a22d71b6f6e to your computer and use it in GitHub Desktop.
Dieses Snippet erstellt wieder einen Shortcode, den Sie innerhalb des Inhalts nutzen können:
[doc dokument="PFAD ZU IHRER DATEI" width="800" height="600"]
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
/* GOOGLE DOCUMENT VIEWER */ | |
function doc_viewer($atts, $content = null) { | |
extract( | |
shortcode_atts( | |
array( | |
"dokument" => 'http://', | |
"class" => '', | |
'width' => '700', | |
'height' => '400' | |
), | |
$atts) | |
); | |
return '<iframe width="'.$width.'" height="'.$height.'" src="http://docs.google.com/viewer?url='.$dokument.'&embedded=true" class="'.$class.' googleviewer"></iframe>'; | |
} | |
add_shortcode("doc", "doc_viewer"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment