Snippets: Override Theme Icon HTML with custom SVG

add_filter( 'wpex_theme_icon_html', function( $html, $icon, $extra_class  ) {
    switch ( $icon ) {
        // In this example you will override the icon named "ICON_NAME-EXAMPLE_1" with your custom HTML.
        case 'ICON_NAME-EXAMPLE_1':
            return '<div class="wpex-svg-icon ' . $extra_class . '">YOUR_CUSTOM_SVG_CODE</div>';
            break;
        // In this example you will override the icon named "ICON_NAME-EXAMPLE_1" with your custom svg located
        // in your child theme under assets/svgs/YOUR_CUSTOM_SVG_NAME.svg
        case 'ICON_NAME-EXAMPLE_2':
            return wpex_get_svg( 'YOUR_CUSTOM_SVG_NAME.svg' );
            break;
    }
    return $icon_html;
}, 10, 3 );

Snippet Type: PHP

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)