From 663a5e9662835438a762c498eddfc3c5da3f1026 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Sun, 16 Dec 2018 04:33:26 +0000 Subject: [PATCH] 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 --- src/wp-content/themes/twentyeleven/functions.php | 3 +++ src/wp-content/themes/twentyfifteen/functions.php | 3 +++ src/wp-content/themes/twentyfourteen/functions.php | 3 +++ src/wp-content/themes/twentyseventeen/functions.php | 3 +++ src/wp-content/themes/twentysixteen/functions.php | 3 +++ src/wp-content/themes/twentythirteen/functions.php | 3 +++ src/wp-content/themes/twentytwelve/functions.php | 3 +++ 7 files changed, 21 insertions(+) diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php index af7484e626..8b8c74439a 100644 --- a/src/wp-content/themes/twentyeleven/functions.php +++ b/src/wp-content/themes/twentyeleven/functions.php @@ -89,6 +89,9 @@ if ( ! function_exists( 'twentyeleven_setup' ) ) : // Load default block styles. add_theme_support( 'wp-block-styles' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Add support for custom color scheme. add_theme_support( 'editor-color-palette', diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index a9178f6b27..cf03b1a0f0 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -177,6 +177,9 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) : // Load default block styles. add_theme_support( 'wp-block-styles' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Add support for custom color scheme. add_theme_support( 'editor-color-palette', diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 62e162d86b..79a8a3d52b 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -76,6 +76,9 @@ if ( ! function_exists( 'twentyfourteen_setup' ) ) : // Load default block styles. add_theme_support( 'wp-block-styles' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Add support for custom color scheme. add_theme_support( 'editor-color-palette', diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index dde97fab7e..8a067d3a42 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -123,6 +123,9 @@ function twentyseventeen_setup() { // Load default block styles. add_theme_support( 'wp-block-styles' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Define and register starter content to showcase the theme on new sites. $starter_content = array( 'widgets' => array( diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index e8c75a243e..9dd1bab99e 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -141,6 +141,9 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) : // Load default block styles. add_theme_support( 'wp-block-styles' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Add support for custom color scheme. add_theme_support( 'editor-color-palette', diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 2a4188b33c..a46b5f9386 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -85,6 +85,9 @@ function twentythirteen_setup() { // Add support for full and wide align images. add_theme_support( 'align-wide' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Add support for custom color scheme. add_theme_support( 'editor-color-palette', diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 62d3a9a741..9fedeecd52 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -61,6 +61,9 @@ function twentytwelve_setup() { // Load default block styles. add_theme_support( 'wp-block-styles' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); + // Add support for custom color scheme. add_theme_support( 'editor-color-palette',