From f7d63208b13c07b1a0ec3d471e14b903e2604c2f Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Wed, 23 Jan 2019 19:22:11 -0500 Subject: [PATCH] Plugin: Deprecate gutenberg_add_responsive_body_class --- .../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 5e7d0d7555be4..fe1ca0b4a287e 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 990418ebf74a8..7e019de8b8a25 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' );