From b69d28b34b6372587c0f67bce796c426a6140efb Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 17 Jun 2024 09:25:44 -0400 Subject: [PATCH 1/4] add block filters for image block --- block-filters/image/index.php | 36 +++++++++++++++++++++ block-filters/image/index.tsx | 59 +++++++++++++++++++++++++++++++++++ plugin.php | 1 + webpack.config.js | 1 + 4 files changed, 97 insertions(+) create mode 100644 block-filters/image/index.php create mode 100644 block-filters/image/index.tsx diff --git a/block-filters/image/index.php b/block-filters/image/index.php new file mode 100644 index 00000000..f31d69eb --- /dev/null +++ b/block-filters/image/index.php @@ -0,0 +1,36 @@ + { unregisterBlockStyle('core/image', ['default', 'rounded']); }); diff --git a/plugin.php b/plugin.php index 3f710b13..7921fdc8 100644 --- a/plugin.php +++ b/plugin.php @@ -51,6 +51,7 @@ function () { require_once __DIR__ . '/src/utils.php'; require_once __DIR__ . '/block-filters/separator/index.php'; require_once __DIR__ . '/block-filters/heading/index.php'; +require_once __DIR__ . '/block-filters/image/index.php'; require_once __DIR__ . '/block-filters/paragraph/index.php'; require_once __DIR__ . '/block-filters/list/index.php'; require_once __DIR__ . '/plugins/newsletter-from-post/index.php'; diff --git a/webpack.config.js b/webpack.config.js index 828cd8c1..1718be59 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -26,6 +26,7 @@ module.exports = (env, { mode }) => ({ // All other custom entry points can be included here. 'wp-newsletter-builder-separator/index': './block-filters/separator', 'wp-newsletter-builder-heading/index': './block-filters/heading', + 'wp-newsletter-builder-image/index': './block-filters/image', 'wp-newsletter-builder-paragraph/index': './block-filters/paragraph', 'wp-newsletter-builder-list/index': './block-filters/list', 'wp-newsletter-builder-from-post/index': './plugins/newsletter-from-post', From 436fa4eef35cda21f64e0c2522c5be0bb4457bac Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 17 Jun 2024 13:38:36 -0400 Subject: [PATCH 2/4] wip --- block-filters/image/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block-filters/image/index.tsx b/block-filters/image/index.tsx index c631b999..f89cee13 100644 --- a/block-filters/image/index.tsx +++ b/block-filters/image/index.tsx @@ -22,9 +22,13 @@ function modifyImageSupports(settings, name) { ) { return { ...settings, + attributes: Object.assign(settings.attributes, { + allowResize: { type: 'boolean', default: false }, + }), supports: Object.assign(settings.supports, { anchor: false, - align: ['full'], + align: false, + alignWide: false, customClassName: false, dimensions: { defaultAspectRatios: false, @@ -43,6 +47,7 @@ function modifyImageSupports(settings, name) { width: false, }, }, + interactivity: false, }), }; } From 994e3e0c77e270e3f192121d165b907fbcc38ea1 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 17 Jun 2024 16:28:33 -0400 Subject: [PATCH 3/4] disable shadow --- block-filters/image/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/block-filters/image/index.tsx b/block-filters/image/index.tsx index f89cee13..e144fdac 100644 --- a/block-filters/image/index.tsx +++ b/block-filters/image/index.tsx @@ -30,9 +30,6 @@ function modifyImageSupports(settings, name) { align: false, alignWide: false, customClassName: false, - dimensions: { - defaultAspectRatios: false, - }, filter: { duotone: false, }, @@ -47,7 +44,7 @@ function modifyImageSupports(settings, name) { width: false, }, }, - interactivity: false, + shadow: false, }), }; } From b391b64db6bbf8cede2e8784f02361ac2fd812f5 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 17 Jun 2024 17:01:39 -0400 Subject: [PATCH 4/4] version bump --- README.md | 2 +- plugin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 91e47c09..35a64493 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Contributors: alleyinteractive Tags: alleyinteractive, wp-newsletter-builder -Stable tag: 0.3.22 +Stable tag: 0.3.24 Requires at least: 6.2 diff --git a/plugin.php b/plugin.php index 9570a832..a54cea21 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: Newsletter Builder * Plugin URI: https://github.com/alleyinteractive/wp-newsletter-builder * Description: Interface to manage email newsletters - * Version: 0.3.23 + * Version: 0.3.24 * Author: Alley Interactive * Author URI: https://github.com/alleyinteractive/wp-newsletter-builder * Requires at least: 6.2