Opened 6 years ago
Closed 6 years ago
#45342 closed enhancement (fixed)
Docs: Description is wrong in the return of block_version()
Reported by: | mukesh27 | Owned by: | youknowriad |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch fixed-5.0 |
Focuses: | docs | Cc: |
Description
Description is wrong in the return of block_version()
current description is:
* @return int The block format version.
must be:
* @return int 0 if the string doesn't contain blocks, 1 otherwise.
Attachments (2)
Change History (13)
#1
@
6 years ago
Related #43887 and https://github.com/WordPress/gutenberg/issues/6435
It seems that the idea was to have the possibility to increment the block version if breaking changes are introduced in the future.
It looks like a good improvement, as suggested by @mukesh27, to explain the possible return values, that are currently either 0 or 1.
Here's are suggested adjustments for 45342.patch, to e.g. avoid starting the description with a number:
* @return int The block format version is 1 if the content contains one or more blocks, 0 otherwise.
#7
@
6 years ago
- Keywords commit added
Thanks for the update, @mukesh27. Looks like a good improvement to me.
#8
@
6 years ago
- Owner set to youknowriad
- Resolution set to fixed
- Status changed from new to closed
In 43924:
#9
@
6 years ago
- Keywords fixed-5.0 added; commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Commited as I got an approval from @matveb
Patch