Make WordPress Core

Changeset 51720


Ignore:
Timestamp:
09/01/2021 07:08:51 PM (3 years ago)
Author:
desrosj
Message:

Customize: Add wp-embed-responsive class to body if using widgets block editor

Appends the wp-embed-responsive class to the body if the widgets block editor is enabled. This fixes a bug preventing embeds (e.g. YouTube embeds) appearing in the widgets block editor.

Props walbo, kevin940726, noisysocks.
Merges [51716] to the 5.8 branch.
Fixes #53609.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-admin/customize.php

    r51251 r51720  
    144144}
    145145$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
     146
     147if ( wp_use_widgets_block_editor() ) {
     148    $body_class .= ' wp-embed-responsive';
     149}
    146150
    147151$admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) );
Note: See TracChangeset for help on using the changeset viewer.