-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.php
More file actions
31 lines (31 loc) · 886 Bytes
/
template.php
File metadata and controls
31 lines (31 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php return function(
$size = "1em",
$color = "currentColor",
$width = null,
$height = null,
$viewBox = "0 0 24 24",
$className = null,
$ariaLabel = null,
$ariaHidden = null,
$title = null,
$desc = null,
) { ?>
<svg <?php
$attribs = "";
$attribs .= " viewBox=\"$viewBox\"";
$attribs .= " width=\"" . ($width === null ? $size : $width) . "\"";
$attribs .= " height=\"" . ($height === null ? $size : $height) . "\"";
if ($className !== null) $attribs .= " class=\"$className\"";
if ($ariaLabel !== null) $attribs .= " aria-label=\"$ariaLabel\"";
if ($ariaHidden !== null) $attribs .= " aria-hidden=\"$ariaHidden\"";
echo $attribs;
?>><?php
if ($desc !== null) {
echo "<desc>" . $desc . "</desc>";
}
?><?php
if ($title !== null) {
echo "<title>" . $title . "</title>";
}
?><path d="PATH_CONTENT" fill="<?php echo $color; ?>"/></svg>
<?php } ?>