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@f8ac2a236416b16346b5cc77699d2776ee504545",
"source": "coded-letter/coded-letter-monorepo@4224efddad9a73afb0b87455199868b333f3a297",
"sourcePath": "workspace/backend/wordpress/themes/free/funkycommerce-headless",
"installSlug": "funkycommerce-headless",
"kind": "theme",
Expand Down
20 changes: 20 additions & 0 deletions build/public-defaults.test.mjs
Original file line number Diff line number Diff line change
@@ -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'/);
});
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.55' );
define( 'FUNKYCOMMERCE_HEADLESS_VERSION', '1.2.56' );

/**
* Whether Superfunky Pro is active and licensed.
Expand Down
4 changes: 2 additions & 2 deletions inc/control-center-schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ function funkycommerce_control_center_sections() {
'label' => __( 'Theme credit text', 'funkycommerce-headless' ),
'type' => 'textarea',
'tier' => 'pro',
'default' => 'Made with <a href="https://superfunky.pro" target="_blank" rel="noopener noreferrer">FunkyCommerce WordPress theme</a> by <a href="https://codedletter.com" target="_blank" rel="noopener noreferrer">Coded Letter</a>.',
'default' => 'Made with <a href="https://superfunky.pro" target="_blank" rel="noopener noreferrer">Superfunky WordPress theme</a> by <a href="https://codedletter.com" target="_blank" rel="noopener noreferrer">Coded Letter</a>.',
'sanitize' => 'html',
'description' => __( 'PRO sites may customize or hide this credit. Free sites always display the bundled attribution.', 'funkycommerce-headless' ),
),
Expand Down Expand Up @@ -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' ),
Expand Down
10 changes: 8 additions & 2 deletions inc/control-center.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://superfunky.pro" target="_blank" rel="noopener noreferrer">FunkyCommerce WordPress theme</a> by <a href="https://codedletter.com" target="_blank" rel="noopener noreferrer">Coded Letter</a>.';
$default_theme_credit = 'Made with <a href="https://superfunky.pro" target="_blank" rel="noopener noreferrer">Superfunky WordPress theme</a> by <a href="https://codedletter.com" target="_blank" rel="noopener noreferrer">Coded Letter</a>.';
$configured_theme_credit = (string) ( $settings['theme_credit_text'] ?? $default_theme_credit );
$legacy_theme_credit = 'Made with <a href="https://superfunky.pro" target="_blank" rel="noopener noreferrer">FunkyCommerce WordPress theme</a> by <a href="https://codedletter.com" target="_blank" rel="noopener noreferrer">Coded Letter</a>.';
// 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(
Expand Down
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.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"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",
"build:js": "esbuild ./assets/js/theme.js --bundle --minify --target=es2018 --outfile=./assets/dist/theme.js",
"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",
Expand Down
15 changes: 11 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading