Skip to content

Instantly share code, notes, and snippets.

@nhnmomonga
Created January 8, 2014 17:50
Show Gist options
  • Save nhnmomonga/8321124 to your computer and use it in GitHub Desktop.
Save nhnmomonga/8321124 to your computer and use it in GitHub Desktop.
plugin
<?php
function plugin_machinations_init() {
}
function plugin_machinations_inline() {
$args = func_get_args();
$xml = $args[0];
$width = $args[1];
$height = $args[2];
if($xml != "") {
$xml = "?file=" . $xml . "&start=true";
}
if($width = " ") {
$width = "640px";
} else {
$width = $width . "px";
}
if($height = " ") {
$height = "480px";
} else {
$height = $height . "px";
}
$ret = <<<EOD
<object data="./machinations.swf$xml" width="$width" height="$height" type="application/x-shockwave-flash">
<param name="src" value="./machinations.swf$xml" />
</object>
EOD;
return $ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment