Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Deprecate gutenberg_content_block_version #13469

Merged
merged 1 commit into from
Jan 25, 2019
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
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