From 1ff3d6644c7c890c96c68e29315aec32cac76718 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 09:27:15 +0000 Subject: [PATCH] chore: sync funkycommerce-headless from monorepo Source: coded-letter/coded-letter-monorepo@4224efddad9a73afb0b87455199868b333f3a297 --- .monorepo-source.json | 2 +- build/public-defaults.test.mjs | 20 ++++++++++++++++++++ functions.php | 2 +- inc/control-center-schema.php | 4 ++-- inc/control-center.php | 10 ++++++++-- package-lock.json | 4 ++-- package.json | 5 +++-- readme.txt | 15 +++++++++++---- style.css | 4 ++-- 9 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 build/public-defaults.test.mjs diff --git a/.monorepo-source.json b/.monorepo-source.json index 36f6037..12f7104 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@f8ac2a236416b16346b5cc77699d2776ee504545", + "source": "coded-letter/coded-letter-monorepo@4224efddad9a73afb0b87455199868b333f3a297", "sourcePath": "workspace/backend/wordpress/themes/free/funkycommerce-headless", "installSlug": "funkycommerce-headless", "kind": "theme", diff --git a/build/public-defaults.test.mjs b/build/public-defaults.test.mjs new file mode 100644 index 0000000..e626eaa --- /dev/null +++ b/build/public-defaults.test.mjs @@ -0,0 +1,20 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { test } from "node:test"; + +const stylesheet = readFileSync(new URL("../style.css", import.meta.url), "utf8"); +const schema = readFileSync(new URL("../inc/control-center-schema.php", import.meta.url), "utf8"); +const controlCenter = readFileSync(new URL("../inc/control-center.php", import.meta.url), "utf8"); + +test("public theme defaults use Superfunky branding without renaming internal identifiers", () => { + assert.match(stylesheet, /^Description:.*Superfunky/m); + assert.doesNotMatch(stylesheet, /^Description:.*FunkyCommerce/m); + assert.match(schema, /Superfunky WordPress theme/); + assert.match(controlCenter, /Superfunky WordPress theme/); + assert.match(controlCenter, /\$legacy_theme_credit === \$configured_theme_credit/); + assert.match(controlCenter, /funkycommerce-headless/); +}); + +test("new installations default public order numbers to the order prefix", () => { + assert.match(schema, /'order_prefix'\s*=>.*'default'\s*=>\s*'order'/); +}); diff --git a/functions.php b/functions.php index cedb450..e5cbbdf 100644 --- a/functions.php +++ b/functions.php @@ -9,7 +9,7 @@ exit; } -define( 'FUNKYCOMMERCE_HEADLESS_VERSION', '1.2.55' ); +define( 'FUNKYCOMMERCE_HEADLESS_VERSION', '1.2.56' ); /** * Whether Superfunky Pro is active and licensed. diff --git a/inc/control-center-schema.php b/inc/control-center-schema.php index cba9b7f..0ea4fcc 100644 --- a/inc/control-center-schema.php +++ b/inc/control-center-schema.php @@ -460,7 +460,7 @@ function funkycommerce_control_center_sections() { 'label' => __( 'Theme credit text', 'funkycommerce-headless' ), 'type' => 'textarea', 'tier' => 'pro', - 'default' => 'Made with FunkyCommerce WordPress theme by Coded Letter.', + 'default' => 'Made with Superfunky WordPress theme by Coded Letter.', 'sanitize' => 'html', 'description' => __( 'PRO sites may customize or hide this credit. Free sites always display the bundled attribution.', 'funkycommerce-headless' ), ), @@ -563,7 +563,7 @@ function funkycommerce_control_center_sections() { 'enabled_currencies' => array( 'label' => __( 'Supported currencies', 'funkycommerce-headless' ), 'type' => 'currencies', 'tier' => 'pro', 'default' => array( 'EUR', 'USD', 'GBP', 'PLN' ) ), 'currency_rate_mode' => array( 'label' => __( 'Currency rate mode', 'funkycommerce-headless' ), 'type' => 'select', 'tier' => 'pro', 'default' => 'automatic', 'options' => array( 'automatic' => __( 'Automatic public rates', 'funkycommerce-headless' ), 'manual' => __( 'Manual rates', 'funkycommerce-headless' ) ) ), 'currency_manual_rates' => array( 'label' => __( 'Manual currency rates', 'funkycommerce-headless' ), 'type' => 'json', 'tier' => 'pro', 'default' => '{}', 'description' => __( 'JSON object keyed by ISO currency code, for example {"USD":1.08}.', 'funkycommerce-headless' ) ), - 'order_prefix' => array( 'label' => __( 'Order number prefix', 'funkycommerce-headless' ), 'type' => 'text', 'tier' => 'pro', 'default' => '#' ), + 'order_prefix' => array( 'label' => __( 'Order number prefix', 'funkycommerce-headless' ), 'type' => 'text', 'tier' => 'pro', 'default' => 'order' ), 'products_per_page' => array( 'label' => __( 'Products per page override', 'funkycommerce-headless' ), 'type' => 'number', 'tier' => 'free', 'default' => '0', 'min' => '0', 'max' => '100', 'step' => '1', 'description' => __( '0 follows native WooCommerce products per row and rows per page. A positive value overrides both native and headless product archives.', 'funkycommerce-headless' ) ), 'stock_badge_enabled' => array( 'label' => __( 'Stock-status badges', 'funkycommerce-headless' ), 'type' => 'toggle', 'tier' => 'free', 'default' => 'yes' ), 'reviews_enabled' => array( 'label' => __( 'Product reviews and ratings', 'funkycommerce-headless' ), 'type' => 'toggle', 'tier' => 'free', 'default' => 'yes' ), diff --git a/inc/control-center.php b/inc/control-center.php index 9c960e6..1ebe899 100644 --- a/inc/control-center.php +++ b/inc/control-center.php @@ -884,9 +884,15 @@ function funkycommerce_storefront_control_settings( $language = '' ) { $assistant_show_footer = $has_surface_settings ? 'yes' === $settings['ai_assistant_show_footer'] : 'footer' === $legacy_placement; $assistant_show_fixed = $has_surface_settings ? 'yes' === $settings['ai_assistant_show_fixed'] : 'fixed' === $legacy_placement; $assistant_placement = $assistant_show_header ? 'header' : ( $assistant_show_fixed ? 'fixed' : 'footer' ); - $default_theme_credit = 'Made with FunkyCommerce WordPress theme by Coded Letter.'; + $default_theme_credit = 'Made with Superfunky WordPress theme by Coded Letter.'; + $configured_theme_credit = (string) ( $settings['theme_credit_text'] ?? $default_theme_credit ); + $legacy_theme_credit = 'Made with FunkyCommerce WordPress theme by Coded Letter.'; + // Replace only the former default; preserve any user-customized credit. + if ( $legacy_theme_credit === $configured_theme_credit ) { + $configured_theme_credit = $default_theme_credit; + } $theme_credit = funkycommerce_is_pro() - ? wp_kses_post( (string) ( $settings['theme_credit_text'] ?? $default_theme_credit ) ) + ? wp_kses_post( $configured_theme_credit ) : $default_theme_credit; return array( diff --git a/package-lock.json b/package-lock.json index 4a28e9f..e26caf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "funkycommerce-headless-theme", - "version": "1.2.55", + "version": "1.2.56", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "funkycommerce-headless-theme", - "version": "1.2.55", + "version": "1.2.56", "devDependencies": { "autoprefixer": "^10.4.20", "esbuild": "^0.28.2", diff --git a/package.json b/package.json index d596dbf..375bcb8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "funkycommerce-headless-theme", "private": true, - "version": "1.2.55", + "version": "1.2.56", "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", @@ -9,7 +9,8 @@ "build": "npm run build:css && npm run build:js && npm run sync-parts", "watch:css": "tailwindcss -i ./assets/css/theme-source.css -o ./assets/dist/theme.css --watch", "sync-parts": "node ./build/sync-template-assets.mjs", - "lint:php": "node ./build/lint-php.mjs" + "lint:php": "node ./build/lint-php.mjs", + "test:public-defaults": "node --test ./build/public-defaults.test.mjs" }, "devDependencies": { "autoprefixer": "^10.4.20", diff --git a/readme.txt b/readme.txt index 225d5a0..5818ca5 100644 --- a/readme.txt +++ b/readme.txt @@ -4,11 +4,11 @@ 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.55 +Stable tag: 1.2.56 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html -This block theme is the WordPress control plane for the FunkyCommerce storefront. +This block theme is the WordPress control plane for the Superfunky storefront. By default it renders a minimal, headless-only shell because customer-facing output is served by the separate headless application. When headless mode is disabled in the Control Center, the theme also ships a complete native WordPress rendering path (see @@ -32,10 +32,17 @@ the deferred editor removes that layer. Legacy markers remain supported. The existing customCss output and legacy option combine both editors with the same marker; no GraphQL schema change is required. WordPress Additional CSS keeps its existing position and stays critical unless it explicitly uses the marker. -With the matching storefront, deferred styles activate on window load or after -two seconds, with a no-JavaScript fallback. Rebuild the storefront after saving to +With the matching storefront, static builds keep deferred styles in a +non-render-blocking stylesheet. They activate on window load or after two seconds, +with a no-JavaScript stylesheet fallback. Rebuild the storefront after saving to publish static pages. Older storefronts apply all CSS immediately. +== 1.2.56 == + +* Uses Superfunky branding in the theme description and default storefront credit. +* Changes the default public order-number prefix to "order". +* Publishes deferred custom CSS as a separate non-render-blocking storefront asset, with a no-JavaScript fallback. + == 1.2.55 == * Adds the Control Center inputs for Netlify redirects and security headers, and emits them with static storefront builds. diff --git a/style.css b/style.css index 043a994..c4e9aec 100644 --- a/style.css +++ b/style.css @@ -3,11 +3,11 @@ Theme Name: Superfunky Headless Theme URI: https://github.com/coded-letter/superfunky-theme Author: Coded Letter Author URI: https://codedletter.com/ -Description: A minimal, content-first block theme for polished WordPress previews and a smooth path to the FunkyCommerce headless storefront. +Description: A minimal, content-first block theme for polished WordPress previews and a smooth path to the Superfunky storefront. Requires at least: 6.7 Tested up to: 6.8 Requires PHP: 7.4 -Version: 1.2.55 +Version: 1.2.56 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