diff --git a/.monorepo-source.json b/.monorepo-source.json index daee632..6a243d9 100644 --- a/.monorepo-source.json +++ b/.monorepo-source.json @@ -1,7 +1,7 @@ { "productId": "funkycommerce-headless", "repository": "coded-letter/superfunky-theme", - "source": "coded-letter/coded-letter-monorepo@28b15f2e1f97b76e7b5b1453d90651e9805d9074", + "source": "coded-letter/coded-letter-monorepo@7d65229487a558b1e2d5a1316ced1022f462fead", "sourcePath": "workspace/backend/wordpress/themes/free/funkycommerce-headless", "installSlug": "funkycommerce-headless", "kind": "theme", diff --git a/functions.php b/functions.php index 5c29706..1a1b0fc 100644 --- a/functions.php +++ b/functions.php @@ -9,7 +9,7 @@ exit; } -define( 'FUNKYCOMMERCE_HEADLESS_VERSION', '1.2.37' ); +define( 'FUNKYCOMMERCE_HEADLESS_VERSION', '1.2.38' ); /** * Whether Superfunky Pro is active and licensed. diff --git a/inc/artifact-invalidation.php b/inc/artifact-invalidation.php index 7d35412..17cd76e 100644 --- a/inc/artifact-invalidation.php +++ b/inc/artifact-invalidation.php @@ -323,6 +323,7 @@ function funkycommerce_collect_control_center_change( $old_value, $new_value ) { if ( empty( $changed_keys ) ) { return; } + funkycommerce_schedule_content_build(); funkycommerce_collect_artifact_changes( array( 'config:storefront', diff --git a/inc/build-webhooks.php b/inc/build-webhooks.php index b820eb9..eeb1a27 100644 --- a/inc/build-webhooks.php +++ b/inc/build-webhooks.php @@ -332,9 +332,12 @@ function funkycommerce_ensure_build_schedule() { /** * Debounce publishing changes into one build request. + * + * Artifact regeneration cannot compile new CMS Tailwind classes, so configured + * build hooks remain necessary in shadow and artifact modes too. */ function funkycommerce_schedule_content_build() { - if ( ! funkycommerce_is_headless_mode() || 'build-webhook' !== funkycommerce_artifact_mode() ) { + if ( ! funkycommerce_is_headless_mode() ) { return; } $settings = funkycommerce_control_center_settings(); @@ -346,7 +349,16 @@ function funkycommerce_schedule_content_build() { } /** - * Rebuild only for public content that can affect generated storefront routes. + * Shared blocks and templates render publicly despite their private post types. + */ +function funkycommerce_post_type_affects_storefront_build( $post_type_name ) { + $post_type = get_post_type_object( $post_type_name ); + return ( $post_type && $post_type->public ) + || in_array( $post_type_name, array( 'wp_block', 'wp_template', 'wp_template_part' ), true ); +} + +/** + * Rebuild only for content that can affect generated storefront routes. */ function funkycommerce_schedule_post_build( $post_id, $post, $update ) { unset( $update ); @@ -354,8 +366,7 @@ function funkycommerce_schedule_post_build( $post_id, $post, $update ) { return; } - $post_type = get_post_type_object( $post->post_type ); - if ( $post_type && $post_type->public ) { + if ( funkycommerce_post_type_affects_storefront_build( $post->post_type ) ) { funkycommerce_schedule_content_build(); } } @@ -369,8 +380,7 @@ function funkycommerce_schedule_status_build( $new_status, $old_status, $post ) return; } - $post_type = get_post_type_object( $post->post_type ); - if ( $post_type && $post_type->public ) { + if ( funkycommerce_post_type_affects_storefront_build( $post->post_type ) ) { funkycommerce_schedule_content_build(); } } @@ -381,8 +391,7 @@ function funkycommerce_schedule_status_build( $new_status, $old_status, $post ) */ function funkycommerce_schedule_deleted_post_build( $post_id, $post ) { unset( $post_id ); - $post_type = get_post_type_object( $post->post_type ); - if ( $post_type && $post_type->public ) { + if ( funkycommerce_post_type_affects_storefront_build( $post->post_type ) ) { funkycommerce_schedule_content_build(); } } @@ -391,3 +400,6 @@ function funkycommerce_schedule_deleted_post_build( $post_id, $post ) { add_action( 'edited_term', 'funkycommerce_schedule_content_build' ); add_action( 'delete_term', 'funkycommerce_schedule_content_build' ); add_action( 'profile_update', 'funkycommerce_schedule_content_build' ); +add_action( 'wp_update_nav_menu', 'funkycommerce_schedule_content_build' ); +add_action( 'wp_update_nav_menu_item', 'funkycommerce_schedule_content_build' ); +add_action( 'wp_delete_nav_menu', 'funkycommerce_schedule_content_build' ); diff --git a/package-lock.json b/package-lock.json index cc890cc..f618848 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "funkycommerce-headless-theme", - "version": "1.2.37", + "version": "1.2.38", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "funkycommerce-headless-theme", - "version": "1.2.37", + "version": "1.2.38", "devDependencies": { "autoprefixer": "^10.4.20", "esbuild": "^0.28.2", diff --git a/package.json b/package.json index 7f659a9..9bd6e8a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "funkycommerce-headless-theme", "private": true, - "version": "1.2.37", + "version": "1.2.38", "description": "Tailwind/build tooling for the FunkyCommerce Headless WordPress theme's native frontend assets (block templates, template parts, loader, and Spotify slot).", "scripts": { "build:css": "tailwindcss -i ./assets/css/theme-source.css -o ./assets/dist/theme.css --minify", diff --git a/readme.txt b/readme.txt index 7449957..cb971f7 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: headless, woocommerce, wpgraphql, full-site-editing Requires at least: 6.7 Tested up to: 6.8 Requires PHP: 7.4 -Stable tag: 1.2.37 +Stable tag: 1.2.38 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -15,6 +15,12 @@ Control Center, the theme also ships a complete native WordPress rendering path "Native frontend theme" below) with accessible header/footer/navigation templates and core front/home/singular/archive/search/404 routes styled to match the storefront. +== 1.2.38 highlights == + +* Restores configured, debounced storefront builds for CMS changes in shadow and artifact modes so new Tailwind utilities compile. +* Includes published shared blocks/templates, navigation changes, and public Control Center content in rebuild scheduling. +* Preserves webhook opt-in, headless-mode checks, and revision/autosave guards. + == 1.2.37 highlights == * Keeps WordPress uploads and WebP Express conversion requests on the backend when public headless redirects are enabled. diff --git a/style.css b/style.css index 12ee42a..0416954 100644 --- a/style.css +++ b/style.css @@ -7,7 +7,7 @@ Description: A minimal, content-first block theme for polished WordPress preview Requires at least: 6.7 Tested up to: 6.8 Requires PHP: 7.4 -Version: 1.2.37 +Version: 1.2.38 Update URI: https://github.com/coded-letter/superfunky-theme License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html