Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .monorepo-source.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions inc/artifact-invalidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
28 changes: 20 additions & 8 deletions inc/build-webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -346,16 +349,24 @@ 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 );
if ( wp_is_post_revision( $post_id ) || wp_is_post_autosave( $post_id ) || 'publish' !== $post->post_status ) {
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();
}
}
Expand All @@ -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();
}
}
Expand All @@ -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();
}
}
Expand All @@ -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' );
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading