Skip to content

Commit

Permalink
Plugin: Deprecate gutenberg theme support (#13458)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and youknowriad committed Mar 6, 2019
1 parent 0ab9c05 commit 0e9f824
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- The PHP function `gutenberg_get_block_categories` has been removed. Use [`get_block_categories`](https://developer.wordpress.org/reference/functions/get_block_categories/) instead.
- The PHP function `register_tinymce_scripts` has been removed. Use [`wp_register_tinymce_scripts`](https://developer.wordpress.org/reference/functions/wp_register_tinymce_scripts/) instead.
- The PHP function `gutenberg_register_post_types` has been removed.
- The `gutenberg` theme support option has been removed. Use [`align-wide`](https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/#wide-alignment) instead.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
5 changes: 5 additions & 0 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,11 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
$color_palette = current( (array) get_theme_support( 'editor-color-palette' ) );
$font_sizes = current( (array) get_theme_support( 'editor-font-sizes' ) );

if ( ! empty( $gutenberg_theme_support ) ) {
wp_enqueue_script( 'wp-deprecated' );
wp_add_inline_script( 'wp-deprecated', 'wp.deprecated( "`gutenberg` theme support", { plugin: "Gutenberg", version: "5.2", alternative: "`align-wide` theme support" } );' );
}

/**
* Filters the allowed block types for the editor, defaulting to true (all
* block types supported).
Expand Down

0 comments on commit 0e9f824

Please sign in to comment.