From 058ceda4373c7ee7b221a1342551b0f33e3cea49 Mon Sep 17 00:00:00 2001 From: tobey Date: Thu, 26 Oct 2023 18:45:45 +0100 Subject: [PATCH 1/2] Update root classname --- includes/blocks/safe-svg/edit.js | 2 +- includes/blocks/safe-svg/frontend.scss | 2 +- includes/blocks/safe-svg/register.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/blocks/safe-svg/edit.js b/includes/blocks/safe-svg/edit.js index 1d66d0bc..070db441 100644 --- a/includes/blocks/safe-svg/edit.js +++ b/includes/blocks/safe-svg/edit.js @@ -48,7 +48,7 @@ const SafeSvgBlockEdit = ( props ) => { } = attributes; const blockProps = useBlockProps( { - className:` safe-svg-cover`, + className:` wp-block-safe-svg-svg-icon`, style: { textAlign: alignment, } diff --git a/includes/blocks/safe-svg/frontend.scss b/includes/blocks/safe-svg/frontend.scss index 8468d276..33eb38b2 100644 --- a/includes/blocks/safe-svg/frontend.scss +++ b/includes/blocks/safe-svg/frontend.scss @@ -1,4 +1,4 @@ -.safe-svg-cover { +.wp-block-safe-svg-svg-icon { text-align: center; .safe-svg-inside { diff --git a/includes/blocks/safe-svg/register.php b/includes/blocks/safe-svg/register.php index 4e625aa1..97f4cba5 100644 --- a/includes/blocks/safe-svg/register.php +++ b/includes/blocks/safe-svg/register.php @@ -67,7 +67,7 @@ function render_block_callback( $attributes ) { return apply_filters( 'safe_svg_inline_markup', sprintf( - '
+ '
%s
', isset( $attributes['alignment'] ) ? esc_attr( $attributes['alignment'] ) : 'left', From 3d58ed7cb60210432e84528a35fd0bbe91422878 Mon Sep 17 00:00:00 2001 From: tobey Date: Thu, 26 Oct 2023 22:57:57 +0100 Subject: [PATCH 2/2] keep old css class for compatability --- includes/blocks/safe-svg/edit.js | 2 +- includes/blocks/safe-svg/frontend.scss | 2 +- includes/blocks/safe-svg/register.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/blocks/safe-svg/edit.js b/includes/blocks/safe-svg/edit.js index 070db441..ac224c9c 100644 --- a/includes/blocks/safe-svg/edit.js +++ b/includes/blocks/safe-svg/edit.js @@ -48,7 +48,7 @@ const SafeSvgBlockEdit = ( props ) => { } = attributes; const blockProps = useBlockProps( { - className:` wp-block-safe-svg-svg-icon`, + className:` wp-block-safe-svg-svg-icon safe-svg-cover`, style: { textAlign: alignment, } diff --git a/includes/blocks/safe-svg/frontend.scss b/includes/blocks/safe-svg/frontend.scss index 33eb38b2..8468d276 100644 --- a/includes/blocks/safe-svg/frontend.scss +++ b/includes/blocks/safe-svg/frontend.scss @@ -1,4 +1,4 @@ -.wp-block-safe-svg-svg-icon { +.safe-svg-cover { text-align: center; .safe-svg-inside { diff --git a/includes/blocks/safe-svg/register.php b/includes/blocks/safe-svg/register.php index 97f4cba5..b54895c5 100644 --- a/includes/blocks/safe-svg/register.php +++ b/includes/blocks/safe-svg/register.php @@ -67,7 +67,7 @@ function render_block_callback( $attributes ) { return apply_filters( 'safe_svg_inline_markup', sprintf( - '
+ '
%s
', isset( $attributes['alignment'] ) ? esc_attr( $attributes['alignment'] ) : 'left',