Skip to content

Instantly share code, notes, and snippets.

@diego-betto
Last active April 10, 2017 09:47
Show Gist options
  • Save diego-betto/b5be60e1b2f9407a66c0d6631d97790c to your computer and use it in GitHub Desktop.
Save diego-betto/b5be60e1b2f9407a66c0d6631d97790c to your computer and use it in GitHub Desktop.
inline-svg.php
function inlineSvg($file)
{
$theFile = get_template_directory().'/dist/images/'.$file.'.svg';
echo (is_file($theFile) ? file_get_contents(get_template_directory().'/dist/images/'.$file.'.svg') : '');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment