[wp-trac] [WordPress Trac] #19579: Make get_search_form() more filterable/extensible
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 16 15:16:18 UTC 2011
#19579: Make get_search_form() more filterable/extensible
-------------------------+-------------------------------------
Reporter: chipbennett | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.3
Severity: normal | Keywords: has-patch needs-testing
-------------------------+-------------------------------------
I notice that a lot of the time when Themes include custom search form
markup via `searchform.php`, they are making very minor changes to the
default markup. (A common on is adding onfocus/onblur attributes to the
input.) Unfortunately, I've also noticed that custom search form markup
tends to be... forgotten, and ends up becoming more insecure over time.
So, in the interest of encouraging/facilitating use of the core markup, I
propose making `get_search_form()` more extensible, similar to the
extensibility of `comment_form()`.
This patch replaces `$echo = true` with `$args = array()` as the parameter
passed to `get_search_form()`, while retaining backward compatibility with
`$echo = true`. Also, a (self-explanatory) `search_form_defaults` filter
is added.
Also addresses #16538
Does '''not''' address #16541, which is potentially related.
Probably '''conflicts''' with #14851
Also related: #19321
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19579>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list