From 42384571e5e530fc0800e7add40163006ddcb89e Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Wed, 12 Jun 2024 09:52:14 -0400 Subject: [PATCH 1/9] remove separator hr from footer block --- blocks/footer/edit.tsx | 17 +---------------- blocks/footer/render.php | 4 ---- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/blocks/footer/edit.tsx b/blocks/footer/edit.tsx index 65a6af0b..ce0af4a1 100644 --- a/blocks/footer/edit.tsx +++ b/blocks/footer/edit.tsx @@ -4,7 +4,6 @@ * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ */ import { __ } from '@wordpress/i18n'; -import classNames from 'classnames'; /** * React hook that is used to mark the block wrapper element. @@ -19,12 +18,6 @@ import { Spinner } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; import { useEffect, useState } from '@wordpress/element'; -interface EditProps { - attributes: { - narrow_separator: boolean, - }; -} - interface FooterSettings { facebook_url: string, twitter_url: string, @@ -42,11 +35,7 @@ interface FooterSettings { * * @return {WPElement} Element to render. */ -export default function Edit({ - attributes: { - narrow_separator: narrowSeparator = false, - }, -}: EditProps) { +export default function Edit() { const [isLoading, setIsLoading] = useState(true); const [footerSettings, setFooterSettings] = useState(); @@ -79,10 +68,6 @@ export default function Edit({ return (
-
{isLoading ? ( /* @ts-ignore */ diff --git a/blocks/footer/render.php b/blocks/footer/render.php index aa14f89b..aa2806cf 100644 --- a/blocks/footer/render.php +++ b/blocks/footer/render.php @@ -18,12 +18,8 @@ $nb_image_id = $nb_footer_settings['image'] ?? 0; $nb_address = $nb_footer_settings['address'] ?? ''; $nb_has_social_links = ! empty( $nb_facebook_url ) || ! empty( $nb_twitter_url ) || ! empty( $nb_instagram_url ) || ! empty( $nb_youtube_url ); -$nb_narrow_separator = ! empty( $attributes['narrow_separator'] ); -$nb_separator_class = $nb_narrow_separator ? '' : 'is-style-wide'; ?>
align="center"> -
-