[wp-trac] [WordPress Trac] #42057: Add ability to pass a label for the <form> element returned by get_search_form()

WordPress Trac noreply at wordpress.org
Sun Oct 1 19:05:33 UTC 2017


#42057: Add ability to pass a label for the <form> element returned by
get_search_form()
---------------------------+------------------------------
 Reporter:  williampatton  |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  General        |     Version:  4.8.2
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  accessibility
---------------------------+------------------------------

Comment (by williampatton):

 I added a diff with changes that allows passing of an args array to
 `get_search_form()` and implements the label feature for the generated
 markup. It contains an empty default as it seems uncertain what the best
 way to label would be for cases where a custom label is not being passed.

 The diff also has some back compat code which will negate the need for any
 changes for the end user and allowing the old echo/return flag to still
 function.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42057#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list