Skip to content

Commit

Permalink
Plugin: Deprecate gutenberg_load_list_reusable_blocks (#13456)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and youknowriad committed Mar 6, 2019
1 parent cd33784 commit 7e1455f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- 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.
- The PHP function `gutenberg_prepare_blocks_for_js` has been removed. Use [`get_block_editor_server_block_settings`](https://developer.wordpress.org/reference/functions/get_block_editor_server_block_settings/) instead.
- The PHP function `gutenberg_load_list_reusable_blocks` has been removed.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
12 changes: 3 additions & 9 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1325,14 +1325,8 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
/**
* Enqueue the reusable blocks listing page's script
*
* @param string $hook Screen name.
* @deprecated 5.0.0
*/
function gutenberg_load_list_reusable_blocks( $hook ) {
$is_reusable_blocks_list_page = 'edit.php' === $hook && isset( $_GET['post_type'] ) && 'wp_block' === $_GET['post_type'];
if ( $is_reusable_blocks_list_page ) {
gutenberg_load_locale_data();
wp_enqueue_script( 'wp-list-reusable-blocks' );
wp_enqueue_style( 'wp-list-reusable-blocks' );
}
function gutenberg_load_list_reusable_blocks() {
_deprecated_function( __FUNCTION__, '5.0.0' );
}
add_action( 'admin_enqueue_scripts', 'gutenberg_load_list_reusable_blocks' );

0 comments on commit 7e1455f

Please sign in to comment.