Last active
August 29, 2015 14:17
-
-
Save derekshirk/d190e68065274ec09a4a to your computer and use it in GitHub Desktop.
WordPress-Inline-SVG-function
This file contains hidden or 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
<?php | |
function grav_get_svg($svg){ | |
$path = get_stylesheet_directory().'/library/images/svgs/'.$svg; | |
if(file_exists($path)){ | |
return file_get_contents($path); | |
} return ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
courtesy of @BrianFerdinand at Gravitate