Hi @jezthomp
There is not a simple way to change the icon at this time. You can do it by modifying the render callback on the block, via a PHP code snippet if you are interested. It will only modify the icon on the frontend, the editor will still have the default icon. Let me know if this is something you would like me to provide a sample for
Yes please, that would be handy. We just want to tweak it front end visually to match other icons.
Thank you 🙂
Alright here is a snippet to modify the SVG path. May need to adjust according to your SVG width and height however:
add_filter( 'render_block_cloudcatch/light-modal-block', function ( $block_content ) {
$processor = WP_HTML_Processor::create_fragment( $block_content );
// The new SVG path for the close icon.
$close_icon_path = 'M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z';
while ( $processor->next_tag( 'button' ) ) {
if ( ! $processor->has_class( 'wp-block-cloudcatch-light-modal-block__close' ) ) {
continue;
}
while ( $processor->next_tag( 'path' ) ) {
$processor->set_attribute( 'd', $close_icon_path );
break;
}
break;
}
return $processor->get_updated_html();
} );