2021-07-09 12:20:38 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function to support inline SVG icons by name with div wrapper
|
|
|
|
*/
|
2021-07-11 14:24:13 -04:00
|
|
|
function svg_icon_use($icon_name, $div_class = '') {
|
|
|
|
$div_class .= ' icon';
|
2021-07-09 12:20:38 -04:00
|
|
|
$output = "<div class=\"$div_class $icon_name\"><svg class=\"$icon_name\" aria-hidden=\"true\">";
|
|
|
|
$output .= "<use xlink:href=\"" . get_stylesheet_directory_uri() . "/dist/images/icon-sprites.svg#$icon_name\"></use>";
|
|
|
|
return $output . "</svg></div>";
|
|
|
|
};
|
|
|
|
|
|
|
|
?>
|