Skip to content

Commit

Permalink
Plugin: Deprecate gutenberg_remove_wpcom_markdown_support (#13473)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and youknowriad committed Mar 6, 2019
1 parent bb2c05b commit fc00f0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions lib/plugin-compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

0 comments on commit fc00f0b

Please sign in to comment.