Some documentation improvements in WP_Block_Parser_Block
.
#47947
Labels
[Feature] Parsing
Related to efforts to improving the parsing of a string of data and converting it into a different f
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Type] Code Quality
Issues or PRs that relate to code quality
Description
There are some documentation improvements suggested in the
WP_Block_Parse_Block
class. These changes were originally committed to Core (references at the end), but resulted in aEnsure version-controlled files are not modified or deleted
failure in GitHub Actions.These included:
@since
tagsWP_Block_Parser::$empty_attrs
WP_Block_Parser::next_token()
WP_Block_Parser::freeform()
WP_Block_Parser_Block::$innerContent
The
@since
tags referred to early Gutenberg versions instead of WordPress core. These properties and methods were introduced in WordPress 5.0, so 5.0.0 is the correct version.It is suggested that some of the other
@since
tags are removed, as they are related to early Gutenberg development before it was merged into WordPress core, and are not relevant for core.Return value
WP_Block_Parser::parse()
- This appears to have been changed toarray[]
already.WP_Block_Parser::$output
**Both the method and the property are documented as returning
WP_Block_Parser_Block[]
(an array ofWP_Block_Parser_Block
objects), but the result is in fact an array of arrays of various values, soarray[]
is the correct notation.Step-by-step reproduction instructions
Related Trac ticket: https://core.trac.wordpress.org/ticket/56581
Related changesets:
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: