generate_svg_icon_element

generate_svg_icon_element

The generate_svg_icon_element filter allows change the default icons used throughout the theme.

The available options are:

menu-bars
close
search
categories
tags
comments
arrow
arrow-right
arrow-left
arrow-up

For example, if you want to use a custom navigation search icon to replace the default one, then this function can be used:

add_filter( 'generate_svg_icon_element', function( $output, $icon ) {
if ( 'search' === $icon ) {
$output = 'Your-custom-search-icon';
}
return $output;
}, 10, 2 );

Make sure to only replace your-svg-here with the actual SVG code in the snippet above.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註