fixing svg icon use function to always include icon class; also updated README and removed TODO
This commit is contained in:
parent
59f70d24d0
commit
3ef1ecfe4e
10 changed files with 20 additions and 30 deletions
|
@ -3,7 +3,8 @@
|
|||
/**
|
||||
* Function to support inline SVG icons by name with div wrapper
|
||||
*/
|
||||
function svg_icon_use($icon_name, $div_class) {
|
||||
function svg_icon_use($icon_name, $div_class = '') {
|
||||
$div_class .= ' icon';
|
||||
$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>";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue