Skip to content

Commit

Permalink
Plugin: Deprecate gutenberg_load_list_reusable_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Jan 23, 2019
1 parent 0259f7b commit 43dbe17
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 @@ -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_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 @@ -1409,14 +1409,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 43dbe17

Please sign in to comment.