Skip to content

Instantly share code, notes, and snippets.

@golanlevin
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save golanlevin/a90dbc100dc7c7128f38 to your computer and use it in GitHub Desktop.
Save golanlevin/a90dbc100dc7c7128f38 to your computer and use it in GitHub Desktop.
Repair to Sketchfab Viewer WP Plugin
This fixes an error in the Sketchfab Embed Wordpress plugin.
/* The code for the Sketchfab Embed Wordpress plugin,
sketchfab-viewer/sketchfab-viewer.php
had fault-inducing line breaks. I replaced the following section:
*/
return '<iframe frameborder="0" height="'.$height.'"
width="'.$width.'"
webkitallowfullscreen="true" mozallowfullscreen="true"
src="https://sketchfab.com/embed/'.$id.'?autostart='.$start.'&autospin='.$spin.'&controls='.$controls.'&transparent='.$transparent.'"
></iframe>';
/* with the following replacement code: */
return '<iframe frameborder="0" height="'.$height.'" width="'.$width.'" webkitallowfullscreen="true" mozallowfullscreen="true" src="https://sketchfab.com/embed/'.$id.'" autostart='.$start.'&autospin='.$spin.'&controls='.$controls.'&transparent='.$transparent.'"></iframe>';
/* after which everything worked perfectly. Note, there was also a missing quote mark, I believe. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment