From ff9961bd69c34c0caf488276b79c163bc63f94ff Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 24 Jan 2019 10:32:47 -0500 Subject: [PATCH] Plugin: Deprecate gutenberg_add_responsive_body_class (#13461) --- .../developers/backward-compatibility/deprecations.md | 1 + gutenberg.php | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 5e7d0d7555be4b..fe1ca0b4a287e9 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -24,6 +24,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed. - The PHP function `gutenberg_bulk_post_updated_messages` has been removed. - The PHP function `gutenberg_kses_allowedtags` has been removed. +- The PHP function `gutenberg_add_responsive_body_class` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/gutenberg.php b/gutenberg.php index 990418ebf74a87..7e019de8b8a252 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -543,15 +543,13 @@ function gutenberg_kses_allowedtags( $tags ) { * Gutenberg responsive embeds. * * @since 4.1.0 + * @deprecated 5.0.0 * * @param Array $classes Array of classes being added to the body tag. * @return Array The $classes array, with wp-embed-responsive appended. */ function gutenberg_add_responsive_body_class( $classes ) { - if ( current_theme_supports( 'responsive-embeds' ) ) { - $classes[] = 'wp-embed-responsive'; - } + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $classes; } - -add_filter( 'body_class', 'gutenberg_add_responsive_body_class' );