Opened 7 years ago
Closed 7 years ago
#49523 closed defect (bug) (fixed)
Twenty Twenty: searchform.php error
| Reported by: | fahimmurshed | Owned by: | ianbelanger |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Bundled Theme | Version: | 5.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | coding-standards |
Description
twentytwenty/searchform.php
**18 ERROR Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$unique_id".
// phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound 20 ERROR Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$aria_label".
phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound
Attachments (5)
Change History (15)
#2
@
7 years ago
- Keywords reporter-feedback added
- Version 5.3.2 → 5.3
Thanks for you patch @fahimmurshed, I tested it and found that there were 2 undefined variable notices, so I uploaded a new patch with all variables updated. Please test it to confirm that my patch works for you. Thanks
#4
@
7 years ago
Perfect!
I have removed the hyphen $twentytwenty_unique_id = twentytwenty_unique_id( 'search-form' );:18
Removed from this word search-form
Do you think that's the right decision?
#5
@
7 years ago
- Keywords commit added; reporter-feedback removed
- Owner set to
- Status new → reviewing
I think that the hyphen needs to stay, so that the ID is something like search-form-1 vs search-form1. That is more in line with how things are done in WP. Thanks for submitting you patches.
#6
@
7 years ago
I'll re-upload the correct patch, Ian.
Thanks so much for pointing me. You know I am learning day by day :D
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch