Skip to content

WP 6.3 has changed handles for Global and Inline styles #606

@cafesk8

Description

@cafesk8

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');
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions