Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #4678 - Improve tests for 'classic-editor' #4693

Closed
wants to merge 11 commits into from
5 changes: 4 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ function gutenberg_prepare_blocks_for_js() {
* @since 0.4.0
*/
function gutenberg_common_scripts_and_styles() {
// Avoid enqueuing block scripts into classic editor.
if ( isset( $_GET['classic-editor'] ) ) {
return;
}
// Enqueue basic styles built out of Gutenberg through `npm build`.
wp_enqueue_style( 'wp-blocks' );

Expand All @@ -712,7 +716,6 @@ function gutenberg_common_scripts_and_styles() {
do_action( 'enqueue_block_assets' );
}
add_action( 'wp_enqueue_scripts', 'gutenberg_common_scripts_and_styles' );
add_action( 'admin_enqueue_scripts', 'gutenberg_common_scripts_and_styles' );

/**
* Enqueues registered block scripts and styles, depending on current rendered
Expand Down