flynt icon indicating copy to clipboard operation
flynt copied to clipboard

WP 6.3 has changed handles for Global and Inline styles

Open cafesk8 opened this issue 5 months ago • 1 comments

WP 6.3 introduced some changes in handles for Guttenberg styles. Sorry, I don't have time to create PR or better issue - but I would change blockEditor.php from:

add_action('wp_enqueue_scripts', function (): void {
    if (has_blocks()) {
        return;
    }

    wp_dequeue_style('core-block-supports');
    wp_dequeue_style('wp-block-library');
    wp_dequeue_style('wp-block-library-theme');
    wp_dequeue_style('wp-global-styles');
    wp_dequeue_style('block-style-variation-styles');
});

to:

add_action('wp_enqueue_scripts', function (): void {
    if (has_blocks()) {
        return;
    }

    // --- Global stylesheets generated from theme.json ---
    // 'wp-global-styles': used in WP 5.9 – 6.2
    // 'global-styles':    introduced in WP 6.3+ (replaces 'wp-global-styles')
    wp_dequeue_style('global-styles');      // WP 6.3+
    wp_dequeue_style('wp-global-styles');   // WP 5.9 – 6.2

    // --- Inline style variations & duotone filters ---
    // 'block-style-variation-styles': older handle (pre-6.3) for block style variations
    // 'global-styles-inline':         new handle (6.3+) for inline styles merged with global styles
    wp_dequeue_style('global-styles-inline');         // WP 6.3+
    wp_dequeue_style('block-style-variation-styles'); // WP 5.9 – 6.2y

    // Block core styles
    wp_dequeue_style('core-block-supports');
    wp_dequeue_style('wp-block-library');
    wp_dequeue_style('wp-block-library-theme');
});

cafesk8 avatar Jul 30 '25 09:07 cafesk8

@cafesk8 Thanks for bringing this up! I believe it's best to keep the Flynt core aligned with the current version of WordPress. This keeps the codebase lean and reduces complexity and maintenance. If backward compatibility is needed, we can always handle it in a separate layer or implementation.

Let me know what you think — happy to review a PR if you'd like to put one together!

timohubois avatar Aug 01 '25 08:08 timohubois