From 884cabf1af84aa3cc0e07c7b949efeb3daa085ab Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 24 Jan 2019 08:43:15 -0500 Subject: [PATCH] Plugin: Deprecate gutenberg_remove_wpcom_markdown_support (#13473) --- .../developers/backward-compatibility/deprecations.md | 1 + lib/plugin-compat.php | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 85e82f25549c6..b6f49917371be 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -21,6 +21,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `gutenberg_register_post_prepare_functions` has been removed. - The PHP function `gutenberg_silence_rest_errors` has been removed. - The PHP function `gutenberg_filter_post_type_labels` has been removed. +- The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/lib/plugin-compat.php b/lib/plugin-compat.php index 963535624de4c..74f6dbb2cb0c8 100644 --- a/lib/plugin-compat.php +++ b/lib/plugin-compat.php @@ -21,14 +21,13 @@ * plugins Jetpack, JP-Markdown, and WP Editor.MD * * @since 1.3.0 + * @deprecated 5.0.0 * * @param array $post Post object which contains content to check for block. * @return array $post Post object. */ function gutenberg_remove_wpcom_markdown_support( $post ) { - if ( class_exists( 'WPCom_Markdown' ) && has_blocks( $post['post_content'] ) ) { - WPCom_Markdown::get_instance()->unload_markdown_for_posts(); - } + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $post; } -add_filter( 'wp_insert_post_data', 'gutenberg_remove_wpcom_markdown_support', 9 );