Skip to content

Commit

Permalink
Plugin: Deprecate gutenberg_content_block_version
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Jan 25, 2019
1 parent ff6b834 commit 9f3d079
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa
- The PHP function `gutenberg_add_edit_link` has been removed.
- The PHP function `gutenberg_block_bulk_actions` has been removed.
- The PHP function `gutenberg_replace_default_add_new_button` has been removed.
- The PHP function `gutenberg_content_block_version` has been removed. Use [`block_version`](https://developer.wordpress.org/reference/functions/block_version/) instead.

## 4.5.0
- `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed.
Expand Down
5 changes: 4 additions & 1 deletion lib/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,15 @@ function gutenberg_content_has_blocks( $content ) {
*
* @since 2.8.0
* @see gutenberg_content_has_blocks()
* @deprecated 5.0.0 block_version
*
* @param string $content Content to test.
* @return int The block format version.
*/
function gutenberg_content_block_version( $content ) {
return has_blocks( $content ) ? 1 : 0;
_deprecated_function( __FUNCTION__, '5.0.0', 'block_version' );

return block_version( $content );
}

/**
Expand Down

0 comments on commit 9f3d079

Please sign in to comment.