-
Notifications
You must be signed in to change notification settings - Fork 128
Fix typos and clarify grammar in documentation and comments #2005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated various documentation and in-code comments to fix typos, improve grammar, and enhance clarity. These changes ensure better readability and more precise communication across the codebase, especially in user-facing docs and inline explanations. These issues were flagged via static analysis in PhpStorm.
$block_template = get_block_template( $_wp_current_template_id, 'wp_template' ); | ||
$block_template = get_block_template( $_wp_current_template_id ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PhpStorm flagged the passing of the default value for the second parameter.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #2005 +/- ##
=======================================
Coverage 72.54% 72.54%
=======================================
Files 88 88
Lines 7116 7116
=======================================
Hits 5162 5162
Misses 1954 1954
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
( element ) => [ element, element.dataset.odXpath ] | ||
( element ) => [ element, element.getAttribute( 'data-od-xpath' ) ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change here is done because in PhpStorm, it's not known that dataset
is defined on Element
not just HTMLElement
. I checked in Chrome, Safari, and Firefox and it turns out that dataset
is actually defined on embedded SVG and MathML elements. I can see that SVGElement.dataset
is defined as is MathMLElement.dataset
defined, although it is Baseline Newly available. So it on one hand this HTMLElement
could be replaced with HTMLElement|SVGElement|MathMLElement
, it seems better to just go with Element
and to use the getAttribute()
method which is guaranteed to be present everywhere. Also, the target
property of IntersectionObserverEntry
is defined as Element
.
Updated various documentation and in-code comments to fix typos, improve grammar, and enhance clarity. These changes ensure better readability and more precise communication across the codebase, especially in user-facing docs and inline explanations. These issues were flagged via static analysis in PhpStorm.