Opened 8 years ago
Closed 8 years ago
#45342 closed enhancement (fixed)
Docs: Description is wrong in the return of block_version()
| Reported by: | mukesh27 | Owned by: | youknowriad |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch fixed-5.0 |
| Cc: | Focuses: | docs |
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
@
8 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
@
8 years ago
- Keywords commit added
Thanks for the update, @mukesh27. Looks like a good improvement to me.
#9
@
8 years ago
- Keywords fixed-5.0 added; commit removed
- Resolution fixed
- Status closed → reopened
Commited as I got an approval from @matveb
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch