Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Plugin: Deprecate gutenberg_kses_allowedtags
  • Loading branch information
aduth committed Jan 24, 2019
commit 405706f6cb37168724f5b717b755c046afb1f6a5
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- The PHP function `gutenberg_filter_post_type_labels` has been removed.
- 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.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
10 changes: 4 additions & 6 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,19 +527,17 @@ function gutenberg_add_admin_body_class( $classes ) {
* Adds attributes to kses allowed tags that aren't in the default list
* and that Gutenberg needs to save blocks such as the Gallery block.
*
* @deprecated 5.0.0
*
* @param array $tags Allowed HTML.
* @return array (Maybe) modified allowed HTML.
*/
function gutenberg_kses_allowedtags( $tags ) {
if ( isset( $tags['img'] ) ) {
$tags['img']['data-link'] = true;
$tags['img']['data-id'] = true;
}
_deprecated_function( __FUNCTION__, '5.0.0' );

return $tags;
}

add_filter( 'wp_kses_allowed_html', 'gutenberg_kses_allowedtags', 10, 2 );

/**
* Adds the wp-embed-responsive class to the body tag if the theme has opted in to
* Gutenberg responsive embeds.
Expand Down