Make WordPress Core


Ignore:
Timestamp:
07/10/2024 06:17:44 AM (2 years ago)
Author:
isabel_brison
Message:

Editor: enqueue block custom CSS only when block renders on the page.

Updates the global styles custom CSS handling logic to be consistent with other global styles and take advantage of conditional enqueuing of block styles.

Props isabel_brison, aaronrobertshaw, andrewserong.
Fixes #61395.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r58328 r58703  
    533533                 */
    534534                $global_styles[] = array(
    535                         'css'            => wp_get_global_styles_custom_css(),
     535                        'css'            => wp_get_global_stylesheet( array( 'custom-css' ) ),
    536536                        '__unstableType' => 'user',
    537537                        'isGlobalStyles' => true,
Note: See TracChangeset for help on using the changeset viewer.