wp_print_head_scripts example

foreach ( $block_type->editor_style_handles as $style_handle ) {
                wp_enqueue_style( $style_handle );
            }
        }
    }

    ob_start();
    wp_print_styles();
    $styles = ob_get_clean();

    ob_start();
    wp_print_head_scripts();
    wp_print_footer_scripts();
    $scripts = ob_get_clean();

    // Restore the original instances.     $wp_styles  = $current_wp_styles;
    $wp_scripts = $current_wp_scripts;

    return array(
        'styles'  => $styles,
        'scripts' => $scripts,
    );
}
Home | Imprint | This part of the site doesn't use cookies.