initial commit; POC dev based off wp-73k theme
This commit is contained in:
commit
7325162871
50 changed files with 19419 additions and 0 deletions
20
custom-functions.php
Normal file
20
custom-functions.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Function to support inline SVG icons by name with div wrapper
|
||||
*/
|
||||
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>";
|
||||
};
|
||||
|
||||
function svg_logo_use($icon_name, $div_class = '', $svg_title = 'Logo') {
|
||||
$div_class .= ' logo';
|
||||
$output = "<div class=\"$div_class $icon_name\"><svg class=\"$icon_name\" role=\"img\"><title>$svg_title</title>";
|
||||
$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