Skip to content

Instantly share code, notes, and snippets.

View stoffl6781's full-sized avatar

Christoph Purin - Stoffl/OE9CPV stoffl6781

View GitHub Profile
jQuery(function ($) {
let timeout;
const registerUpdateCartEvent = () => {
$(".woocommerce-cart-form").on("change", "input.qty", function () {
if (timeout !== undefined) {
clearTimeout(timeout);
}
timeout = setTimeout(function () {
$("[name='update_cart']").trigger("click");
@stoffl6781
stoffl6781 / gutenberg-font-style.php
Last active September 23, 2025 07:07
gutenberg-font-style.php
<?php
/**
* Gutenberg Inline Toolbar: "THIN" Button (font-weight: 100)
*
* Adds a small "THIN" button to the contextual inline toolbar (the one with Bold/Italic)
* in the block editor. When clicked (or via the shortcut), it wraps the current selection
* inside <span data-fw="100" style='font-weight:100; font-variation-settings:"wght" 100;'>…</span>.
* Clicking again on a selection that is fully wrapped will unwrap it (toggle behavior).
*
* Keyboard shortcut: Ctrl/Cmd + Alt + 1
@stoffl6781
stoffl6781 / readme.md
Last active September 23, 2025 08:41
Gutenbricks simpel slider

Splide Auto-Wrap for Bricks + Gutenberg (Gutenbricks)

This script fixes structural issues when using Splide sliders with Bricks Builder and Gutenbricks InnerBlocks.

Problem

  • Gutenberg may insert multiple <figure> elements (image blocks) inside a single Gutenbricks InnerBlock wrapper.
  • Bricks sometimes incorrectly applies .splide__slide classes to the wrapper instead of individual slides.
  • Splide requires the following structure: