#65119 closed defect (bug) (fixed)
Docs: Correct the grammar/spelling in api.js documentation
| Reported by: | baikare.sandeep007 | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | REST API | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | javascript, docs |
Description (last modified by )
During a routine review of src/js/_enqueues/wp/api.js, I identified several grammatical errors and spelling inconsistencies within the inline comments. These issues, while minor, can hinder readability and comprehension for developers working with or learning from this code.
Changes Made:
This patch improves the inline documentation by:
- Correcting spelling mistakes throughout the file's comment blocks
- Fixing grammatical errors to enhance sentence clarity and flow
- Maintaining the original technical meaning and intent of all comments
- Preserving consistent terminology and code comment formatting standards
Impact:
These changes are purely documentation-focused and have no impact on:
- Code execution or functionality
- API behavior or public interfaces
- Performance or backward compatibility
Testing:
No functional testing is required as these changes only affect inline comments. The patch has been verified to contain only whitespace and text modifications within comment blocks.
Attachments (2)
Change History (15)
This ticket was mentioned in Slack in #core by baikaresandeep007-1. View the logs.
6 months ago
#3
@
6 months ago
- Component Text Changes → REST API
- Focuses coding-standards removed
- Milestone Awaiting Review → 7.1
#5
@
6 months ago
@gaurangsondagar Thank you, but I suggest focusing your efforts on testing patches that actually have functionality. Testing reports for coding standards and docs updates aren't particularly helpful.
#6
@
6 months ago
- Description modified (diff)
- Summary Docs: Correct the grammer/spelling in api.js documentation → Docs: Correct the grammar/spelling in api.js documentation
- Version trunk → 4.7
The three sentences edited in api.js-doc-enhancement.patch were all included in api.js when [38832] introduced the script file.
- Capitalizing ID is good, but I would capitalize it in another line too.
- URL, MySQL, and Safari were also lowercase.
- The word "thru" is used in two lines.
Special notes about 65119.diff:
// Attach parent post ID to the collection.
The script sets 'parent_post' (not 'post_parent'), and I think a space fits the documentation instead of the underscore.// Go through the parsable date fields. If our model contains any of them, it gets the TimeStampedMixin.
The patch splits this into two sentences.// Fail silently, to avoid errors in Safari private mode.
Failing silently does not fix errors.- 65119.diff corrects the typos for "nonce", "route" and "it is" (or "it's"). I noticed later that these were reported—and edited—in #65112.
#7
@
6 months ago
- Owner set to
- Status new → reviewing
Self-assigning to move this forward to commit when trunk is unfrozen.
#8
@
3 months ago
- Type enhancement → defect (bug)
The trunk is no longer frozen, so feel free to commit a patch at any time.
This ticket was mentioned in PR #12477 on WordPress/wordpress-develop by @sabernhardt.
3 months ago
#9
- Capitalizes ID, URL, MySQL, and Safari.
- Replaces the word "thru" with "through"
- Replaces "post_parent id" with "parent post ID"
- Splits the "Go through the parsable date fields..." sentence into two.
- Edits the comment about failing silently.
Use of AI Tools: none by me
@sabernhardt commented on PR #12477:
3 months ago
#13
Committed in r62692
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch Testing Report:
Patch Tested: https://core.trac.wordpress.org/attachment/ticket/65119/api.js-doc-enhancement.patch
Environment:
Test Cases:
Result:
I have verified and patch looks correctly applied.
Please review the attached screenshots for reference:
https://snipboard.io/zGhc53.jpg
https://snipboard.io/Xq6k2U.jpg
https://snipboard.io/envRLd.jpg