Skip to content

Commit 8209718

Browse files
committed
fix (theme): svg service compatibility with acf-svg-icon
1 parent d1b18bb commit 8209718

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/Services/Svg.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public function get_the_icon( string $icon_class, array $additionnal_classes = [
4343
return '';
4444
}
4545

46+
// acf-svg-icon already return sprite-name.svg#icon-name, ex: social.svg#icon-facebook
47+
// format the string to obtain sprite-name/icon-name
48+
$icon_class = str_replace( '.svg#icon-', '/', $icon_class );
49+
4650
$sprite_name = 'icons';
4751

4852
if ( false !== strpos( $icon_class, '/' ) ) {

0 commit comments

Comments
 (0)