Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dieses Snippet erstellt wieder einen Shortcode, den Sie innerhalb des Inhalts nutzen können: [doc dokument="PFAD ZU IHRER DATEI" width="800" height="600"]
/* 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
You can’t perform that action at this time.