[Support request] change slideout exit icon

Home Forums Support [Support request] change slideout exit icon

Home Forums Support change slideout exit icon

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1230080
    Rodrigo

    Hello,

    How can I change the slideout exit icon (X) with a custom SVG image?

    Thanks in advance

    #1230554
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are you using font icons or SVG icons in “Customize > General”?

    Let me know 🙂

    #1230586
    Rodrigo

    I’m using SVG icons.

    #1230639
    Tom
    Lead Developer
    Lead Developer

    You could try this:

    add_filter( 'generate_svg_icon, function( $output, $icon ) {
        if ( 'pro-close' === $icon ) {
            $svg = 'Your SVG HTML';
        }
    
        if ( $svg ) {
            $output = sprint(
                '<span class="gp-icon %1$s">
                    %2$s
                </span>',
                $icon,
                $svg
            );
        }
    
        return $output;
    }, 15, 2 );
    #1254493
    Rodrigo

    I added this code and it breaks my site. What does that 15, 2 means?

    #1254864
    David
    Staff
    Customer Support

    15 is the priority of the function, and 2 is the number of the arguments required by the filter.
    Where did you add the code ? And what error did it produce?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.