[wp-trac] [WordPress Trac] #14851: Add ¨searchform-{name}.php¨ support
WordPress Trac
noreply at wordpress.org
Sat Mar 23 15:17:57 UTC 2013
#14851: Add ¨searchform-{name}.php¨ support
------------------------------------+-----------------------------
Reporter: ramiy | Owner: nacin
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Template | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+-----------------------------
Comment (by WraithKenny):
(There are several pending commits on this function, so you should
probably refresh the patch with those taken into account.)
Echoing isn't really 'legacy' as it's still going to be the main usage
case for most people. The function should return as it currently does if
no argument is passed, or if a `bool` is passed.
What you really want is to 'overload' the arg, so check if it's a string
(rather then for a bool) and put your new functionality in the
conditional: assemble `$templates`, and set `$echo` as `false` (to match
the other `get_*` functions). Leave the rest of the function as is
('ninja' style).
Then update the docs that the arg is overloaded taking either bool or
string.
Hope that helps
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14851#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list