Hello
I used this code in functions to change the mobile toggle icon but the result looks weird. The icon doesn’t appear correctly like what i have in Figma. Can you advise?
Thanks
add_filter( 'generate_svg_icon', function( $output, $icon ) {
if ( 'menu-bars' === $icon ) {
$output = '<svg width="28" height="16" viewBox="0 0 28 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 2L14 13L26 2" stroke="black" stroke-width="3"/></svg>';
$classes = array(
'gp-icon',
'icon-' . $icon,
);
return sprintf(
'<span class="%1$s">%2$s</span>',
implode( ' ', $classes ),
$output
);
}
return $output;
}, 15, 2 );