[wp-trac] [WordPress Trac] #14851: Add ¨searchform-{name}.php¨ support
WordPress Trac
noreply at wordpress.org
Tue Sep 30 12:25:51 UTC 2014
#14851: Add ¨searchform-{name}.php¨ support
-------------------------------------------------+-------------------------
Reporter: ramiy | Owner: nacin
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future
Component: Themes | Release
Severity: normal | Version: 3.1
Keywords: has-patch dev-feedback needs- | Resolution:
testing | Focuses: template
-------------------------------------------------+-------------------------
Comment (by obenland):
I'm not a big fan of this, for two reasons:
* It would be extremely confusing to use the same function argument for
two different purposes, with different contexts, and different expected
data types.
* I'm not sure the argument to make it "easier to include other type
search forms" is valid.
How many different types of search forms do theme authors really need?
Beyond contextual classes in parent elements? The current form is fully
style-able, so it would come down to varying input elements.
I agree, it is inconsistent with `get_header()`, `get_footer()`, and
`get_sidebar()`. But that compatibility would come at a high price.
Especially since `get_template_part()` can mitigate that need:
{{{
#!php
get_template_part( 'search-form', 'header' );
get_template_part( 'search-form', 'sidebar' );
get_template_part( 'search-form', 'footer' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14851#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list