Opened 3 years ago
Closed 3 years ago
#49523 closed defect (bug) (fixed)
Twenty Twenty: searchform.php error
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | coding-standards | Cc: |
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
@
3 years ago
- Keywords reporter-feedback added
- Version changed from 5.3.2 to 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
@
3 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
@
3 years ago
- Keywords commit added; reporter-feedback removed
- Owner set to ianbelanger
- Status changed from new to 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
@
3 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
Patch