mirror of
https://github.com/getgrav/grav.git
synced 2026-03-02 18:41:34 +01:00
allow null for classes
This commit is contained in:
@@ -1420,10 +1420,12 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface
|
||||
* @param $classes
|
||||
* @return string|string[]|null
|
||||
*/
|
||||
public static function svgImageFunction($path, $classes)
|
||||
public static function svgImageFunction($path, $classes = null)
|
||||
{
|
||||
$path = Utils::fullPath($path);
|
||||
|
||||
$classes = $classes ?: '';
|
||||
|
||||
if (file_exists($path)) {
|
||||
$svg = file_get_contents($path);
|
||||
$classes = " inline-block $classes";
|
||||
|
||||
Reference in New Issue
Block a user