Skip to content

Commit 663a5e9

Browse files
committed
Bundled Themes: Add theme support for responsive embeds
Add `add_theme_support( 'responsive-embeds' );` to all of the responsive default themes as part of their block editor support. This makes sure any embeds coming from the new block-based editor maintain their aspect ratios at different screen sizes. Merges [43868] into trunk. Props laurelfulford. Fixes #45274. git-svn-id: https://develop.svn.wordpress.org/trunk@44227 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 415f33c commit 663a5e9

7 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/wp-content/themes/twentyeleven/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ function twentyeleven_setup() {
8989
// Load default block styles.
9090
add_theme_support( 'wp-block-styles' );
9191

92+
// Add support for responsive embeds.
93+
add_theme_support( 'responsive-embeds' );
94+
9295
// Add support for custom color scheme.
9396
add_theme_support(
9497
'editor-color-palette',

src/wp-content/themes/twentyfifteen/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ function twentyfifteen_setup() {
177177
// Load default block styles.
178178
add_theme_support( 'wp-block-styles' );
179179

180+
// Add support for responsive embeds.
181+
add_theme_support( 'responsive-embeds' );
182+
180183
// Add support for custom color scheme.
181184
add_theme_support(
182185
'editor-color-palette',

src/wp-content/themes/twentyfourteen/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ function twentyfourteen_setup() {
7676
// Load default block styles.
7777
add_theme_support( 'wp-block-styles' );
7878

79+
// Add support for responsive embeds.
80+
add_theme_support( 'responsive-embeds' );
81+
7982
// Add support for custom color scheme.
8083
add_theme_support(
8184
'editor-color-palette',

src/wp-content/themes/twentyseventeen/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ function twentyseventeen_setup() {
123123
// Load default block styles.
124124
add_theme_support( 'wp-block-styles' );
125125

126+
// Add support for responsive embeds.
127+
add_theme_support( 'responsive-embeds' );
128+
126129
// Define and register starter content to showcase the theme on new sites.
127130
$starter_content = array(
128131
'widgets' => array(

src/wp-content/themes/twentysixteen/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ function twentysixteen_setup() {
141141
// Load default block styles.
142142
add_theme_support( 'wp-block-styles' );
143143

144+
// Add support for responsive embeds.
145+
add_theme_support( 'responsive-embeds' );
146+
144147
// Add support for custom color scheme.
145148
add_theme_support(
146149
'editor-color-palette',

src/wp-content/themes/twentythirteen/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ function twentythirteen_setup() {
8585
// Add support for full and wide align images.
8686
add_theme_support( 'align-wide' );
8787

88+
// Add support for responsive embeds.
89+
add_theme_support( 'responsive-embeds' );
90+
8891
// Add support for custom color scheme.
8992
add_theme_support(
9093
'editor-color-palette',

src/wp-content/themes/twentytwelve/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ function twentytwelve_setup() {
6161
// Load default block styles.
6262
add_theme_support( 'wp-block-styles' );
6363

64+
// Add support for responsive embeds.
65+
add_theme_support( 'responsive-embeds' );
66+
6467
// Add support for custom color scheme.
6568
add_theme_support(
6669
'editor-color-palette',

0 commit comments

Comments
 (0)