diff --git a/CHANGELOG.md b/CHANGELOG.md index 02f546da..b1d4d526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `WP Curate` will be documented in this file. +## 2.4.9 - 2025-01-13 + +- Bug Fix: Allow manually resetting custom post title back to original title. + ## 2.4.8 - 2024-12-17 - Bug Fix: Roll back to React 18 again. diff --git a/blocks/post-title/edit.tsx b/blocks/post-title/edit.tsx index 859de56b..554ab98c 100644 --- a/blocks/post-title/edit.tsx +++ b/blocks/post-title/edit.tsx @@ -92,10 +92,7 @@ export default function Edit({ * Handle cases for when it's not necessary to update the collection of * custom titles */ - if ( - title === rawTitle - || title === currentCustomPostTitle?.title - ) { + if (title === currentCustomPostTitle?.title) { return; } @@ -113,6 +110,10 @@ export default function Edit({ }, ]; } + // If the custom title matches the original title, we don't want to store it. + if (title === rawTitle) { + newCustomPostTitles = newCustomPostTitles.filter((item) => item?.postId !== postId); + } // @ts-ignore dispatch('core/block-editor').updateBlockAttributes(queryParentId, { diff --git a/wp-curate.php b/wp-curate.php index b906be87..be666cac 100644 --- a/wp-curate.php +++ b/wp-curate.php @@ -3,7 +3,7 @@ * Plugin Name: WP Curate * Plugin URI: https://github.com/alleyinteractive/wp-curate * Description: Plugin to curate homepages and other landing pages - * Version: 2.4.8 + * Version: 2.4.9 * Author: Alley Interactive * Author URI: https://github.com/alleyinteractive/wp-curate * Requires at least: 6.4