Opened 7 weeks ago
Closed 6 weeks ago
#65390 closed defect (bug) (fixed)
Docs: Fix malformed and missing @since tags in WP_Theme_JSON for responsive block nodes
| Reported by: | khokansardar | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Editor | Version: | trunk |
| Severity: | trivial | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description (last modified by )
When responsive global styles for blocks were added in [62444], two @since documentation issues were introduced in src/wp-includes/class-wp-theme-json.php:
WP_Theme_JSON::get_block_name_from_metadata_path()has@since 7.1— missing the patch version. WordPress coding standards require three-part version strings. Should be@since 7.1.0.WP_Theme_JSON::get_block_nodes()was extended to generate responsive block nodes for breakpoint-based styles, but no@since 7.1.0changelog entry was added to its docblock. The existing@sincechain ends at 6.7.0.
Change History (5)
This ticket was mentioned in PR #12052 on WordPress/wordpress-develop by @khokansardar.
7 weeks ago
#1
- Keywords has-patch added
#2
@
7 weeks ago
- Component Bundled Theme → Editor
- Description modified (diff)
- Milestone Awaiting Review → 7.1
#3
@
7 weeks ago
Reviewed the patch on src/wp-includes/class-wp-theme-json.php.
Both documentation fixes are correct — @since 7.1 updated to @since 7.1.0 on get_block_name_from_metadata_path(), and the missing @since 7.1.0 changelog entry added to get_block_nodes(). Changes follow WordPress coding standards for version strings.
@isabel_brison commented on PR #12052:
6 weeks ago
#4
Thanks for the PR! Documentation of changes to WP_Theme_JSON functions has been very ad-hoc with some changes being noted in the tags and others not. https://github.com/WordPress/wordpress-develop/commit/5bc40a6263c24649e6e97b2883fd9f16239f14de also made significant updates to sanitize, get_styles_for_block and remove_insecure_properties; perhaps these should also be tagged.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
## Summary
Fixes two
@sincedocumentation issues introduced in [5bc40a6] when responsive global styles for blocks were added.WP_Theme_JSON::get_block_name_from_metadata_path()had@since 7.1(missing patch version). WordPress always uses three-part version strings (major.minor.patch). Corrected to@since 7.1.0.WP_Theme_JSON::get_block_nodes()was significantly extended to generate responsive block nodes for breakpoint-based styles, but the docblock was not updated with a new@since 7.1.0changelog entry. Added the missing entry.