[theme-reviewers] searchform.php
Andrew Nacin
wp at andrewnacin.com
Wed Sep 1 06:24:55 UTC 2010
In a recent theme review I read:
> searchform.php is included via a deprecated call in index.php,
sidebar.php,
archive.php and searchform.php. Please use get_template_part().
Whether including searchform.php directly via include() or require(), or
indirectly via get_template_part() -- neither are preferred methods.
For searchform.php, the proper function would be get_search_form().
This function then looks for searchform.php, uses it if it exists, and uses
a standard form if it doesn't.
Often, a theme's searchform.php is nearly identical to the HTML that
get_search_form() should generate. In this case, it would be easier if the
theme simply removed the file. (Twenty Ten had one originally; we removed it
before release.)
Hope that helps,
Nacin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20100901/a670c3d1/attachment.htm>
More information about the theme-reviewers
mailing list