WordPress at a glance
function is not described

wp_common_block_scripts_and_styles() WP 5.0.0

Handles the enqueueing of block scripts and styles that are common to both the editor and the front-end.

  • Global. WP_Screen. $current_screen
Hooks in function
Return

Nothing (null).

Usage

wp_common_block_scripts_and_styles();

Code of wp common block scripts and styles: wp-includes/script-loader.php VER 5.0.3

<?php
function wp_common_block_scripts_and_styles() {
	global $current_screen;

	if ( is_admin() && ( $current_screen instanceof WP_Screen ) && ! $current_screen->is_block_editor() ) {
		return;
	}

	wp_enqueue_style( 'wp-block-library' );

	if ( current_theme_supports( 'wp-block-styles' ) ) {
		wp_enqueue_style( 'wp-block-library-theme' );
	}

	/**
 	 * Fires after enqueuing block assets for both editor and front-end.
 	 *
 	 * Call `add_action` on any hook before 'wp_enqueue_scripts'.
 	 *
 	 * In the function call you supply, simply use `wp_enqueue_script` and
 	 * `wp_enqueue_style` to add your functionality to the Gutenberg editor.
 	 *
 	 * @since 5.0.0
 	 */
	  do_action( 'enqueue_block_assets' );
}