Last active
July 26, 2018 20:20
-
-
Save slushman/4c1295adc18a98678b05 to your computer and use it in GitHub Desktop.
Sane Inline SVG
This file contains 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
/** | |
* Returns the requested SVG icon. | |
* | |
* Returns FALSE if $svg is not set. | |
* | |
* @param string $svg The name of the SVG icon | |
* @return mixed The SVG icon | |
*/ | |
function prefix_get_svg( $svg ) { | |
if ( empty( $svg ) ) { return FALSE; } | |
$icons['logo'] = '<svg... SVG stuff here..."/></svg>'; | |
return $icons[ $svg ]; | |
} // get_svg() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment