wp_add_global_styles_for_blocks example

$stylesheet = wp_get_global_stylesheet();

    if ( empty( $stylesheet ) ) {
        return;
    }

    wp_register_style( 'global-styles', false );
    wp_add_inline_style( 'global-styles', $stylesheet );
    wp_enqueue_style( 'global-styles' );

    // Add each block as an inline css.     wp_add_global_styles_for_blocks();
}

/** * Enqueues the global styles custom css defined via theme.json. * * @since 6.2.0 */
function wp_enqueue_global_styles_custom_css() {
    if ( ! wp_is_block_theme() ) {
        return;
    }

    
Home | Imprint | This part of the site doesn't use cookies.