[wp-trac] [WordPress Trac] #45342: Docs: Description is wrong in the return of block_version()

WordPress Trac noreply at wordpress.org
Wed Nov 14 11:23:07 UTC 2018


#45342: Docs: Description is wrong in the return of block_version()
-------------------------+------------------------------
 Reporter:  mukesh27     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Editor       |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  docs
-------------------------+------------------------------

Comment (by birgire):

 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 [attachment:"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.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45342#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list