Opened 6 years ago
Closed 5 years ago
#51877 closed defect (bug) (fixed)
Twenty Twenty: Wrong parameter name used in searchform.php
| Reported by: | poena | Owned by: | sabernhardt |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.8 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
In searchform.php, the parameter/argument that is used is named
$args['label'], the correct name for use with get_search_form() is $args['aria_label'].
See https://developer.wordpress.org/reference/functions/get_search_form/#parameters
Attachments (2)
Change History (9)
@
6 years ago
Wrong parameter name used in searchform.php in Twenty Twenty changed $argslabel to $argsaria_label
@
6 years ago
editing argument to aria-label in get_search_form() functions for 3 files, and updating searchform.php to give a fallback for child theme templates that might use label
#3
@
6 years ago
- Keywords has-patch added; needs-patch removed
This was a little more complicated than I had thought it might be. In addition to updating the argument in 4 files, 51877.2.patch adds a fallback for child theme backward compatibility.
Would this be a good first bug?
In addition to replacing 'label' with 'aria_label', Twenty Twenty's searchform template still needs to accept 'label' as a valid parameter (if used in a child theme).