From 2f89611215af7070f8a3b6b4b27f50b9ef168679 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Fri, 13 Mar 2026 08:25:04 +0100 Subject: [PATCH] feat(args): accept snake_case and kebab-case keys in bookshop validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For bookshop content blocks, normalize argument keys bidirectionally so that both snake_case and kebab-case pass validation without errors: - snake_case key not found → try kebab-case lookup (v5 InitTypes stores kebab keys); silently accepted since snake_case is the preferred style - kebab-case key not found → try snake_case lookup (v4 InitTypes stores snake keys); accepted with a warn-level message - kebab-case key found directly → accepted with a warn-level message The guard `if and $bookshop (ne $key "_default")` limits the normalization to content blocks only; partials and shortcodes (using $structure) are unaffected. Co-Authored-By: Claude Sonnet 4.6 --- layouts/_partials/utilities/InitArgs.html | 44 +++++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/layouts/_partials/utilities/InitArgs.html b/layouts/_partials/utilities/InitArgs.html index f4a8cb9..594ea61 100644 --- a/layouts/_partials/utilities/InitArgs.html +++ b/layouts/_partials/utilities/InitArgs.html @@ -1,4 +1,4 @@ -