Remove duplicate function keyword causing syntax error#135
Remove duplicate function keyword causing syntax error#135gziolo merged 3 commits intoWordPress:trunkfrom
function keyword causing syntax error#135Conversation
The callback `my_plugin_register_abilities` had `function function` declared, which caused a fatal syntax error. Removed the extra `function` keyword so the ability registers correctly according to the Abilities API docs.
|
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #135 +/- ##
=========================================
Coverage 80.39% 80.39%
Complexity 178 178
=========================================
Files 20 20
Lines 1474 1474
Branches 120 119 -1
=========================================
Hits 1185 1185
Misses 289 289
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:
|
Updated the import syntax from `import { getAbilities } from \`@wordpress/abilities\`;`
to use standard single quotes (`import { getAbilities } from '@wordpress/abilities';`)
for consistency with JavaScript conventions and project formatting.
The callback
my_plugin_register_abilitieshadfunction functiondeclared, which caused a fatal syntax error. Removed the extrafunctionkeyword so the ability registers correctly according to the Abilities API docs.