[wp-trac] [WordPress Trac] #65119: Docs: Correct the grammar/spelling in api.js documentation (was: Docs: Correct the grammer/spelling in api.js documentation)
WordPress Trac
noreply at wordpress.org
Fri Apr 24 07:07:03 UTC 2026
#65119: Docs: Correct the grammar/spelling in api.js documentation
--------------------------------+-------------------------------
Reporter: baikare.sandeep007 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 7.1
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript, docs
--------------------------------+-------------------------------
Changes (by sabernhardt):
* version: trunk => 4.7
Old description:
> 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.
New description:
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.
--
Comment:
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:
1. `// 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.
2. `// Go through the parsable date fields. If our model contains any of
them, it gets the TimeStampedMixin.` \\
The patch splits this into two sentences.
3. `// Fail silently, to avoid errors in Safari private mode.` \\
Failing silently does not //fix// errors.
4. 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65119#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list