Opened 5 years ago
Closed 4 years ago
#48640 closed task (blessed) (fixed)
Update docblocks of register block type related function and classes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Editor | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
This patch updates docblocks of register_block_type
, WP_Block_Type_Registry::register
and WP_Block_Type::__construct
methods concerning the optional arg
parameter.
Attachments (4)
Change History (20)
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#5
@
5 years ago
- Milestone changed from Future Release to 5.5
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#10
@
5 years ago
@SergeyBiryukov Since the newly added param doesn't have any description of their own in class WP_Block_Type
, I added them using the description I've found in https://github.com/WordPress/gutenberg/blob/master/packages/blocks/src/api/registration.js and https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-registration.md
If you think they are not appropriate, please suggest how I can improve.
#13
@
4 years ago
- Milestone changed from 5.6 to 5.7
Didn't get a chance to review this in time for 5.6 RC, moving to the next release for now.
#14
@
4 years ago
render_callback()
is optional and defaults to null
, throughout it is documented only as callable
. Should that be callable|null
?
For the WP_Block
property descriptions it would be nice to include short summaries/titles for category, parent and keywords. There's a minor alignment issues on the constructors parameters, with further changes needed, I won't upload a fix.
This ticket still needs a review, and with 5.4 Beta 1 landing today, this is being moved to
Future Release
. If any maintainer or committer feels this can be included in 5.4 or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.