Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#7910 closed defect (bug) (fixed)

Search form should be a template tag

Reported by: technosailor Owned by: technosailor
Priority: normal Milestone: 2.7
Component: General Version:
Severity: normal Keywords: search template-tag
Cc: Focuses:

Description

The search form rarely changes from theme to theme, so it would be useful for theme developers to simply have a template tag get_search() similar to get_sidebar(), get_header() and get_footer() for use in themes.

This will also serve to standardize some of the annoying nuances of themes. In this patch, the function to display the form is supplied with a filter get_searchform which would allow plugin authors to modify the searchform or theme developers to bundle a more integrated search via the themes functions.php.

Attachments (5)

get_search_tag.diff​ (2.3 KB ) - added by technosailor 18 years ago.
get_search_tag.2.diff​ (2.3 KB ) - added by technosailor 18 years ago.
change to get_search_form to avoid possible collision of function names with query
get_search_tag-theme.diff​ (614 bytes ) - added by technosailor 18 years ago.
Updates default theme to use new tag
get_search_tag.3.diff​ (5.5 KB ) - added by technosailor 18 years ago.
Unified patch wrapping in all patch updates
get_search_tag.4.diff​ (4.7 KB ) - added by technosailor 18 years ago.
Unified patch wrapping in all patch updates

Download all attachments as: .zip

Change History (7)

@technosailor
18 years ago

change to get_search_form to avoid possible collision of function names with query

@technosailor
18 years ago

Updates default theme to use new tag

@technosailor
18 years ago

Unified patch wrapping in all patch updates

@technosailor
18 years ago

Unified patch wrapping in all patch updates

#1 @ryan
18 years ago

  • Milestone 2.8 → 2.7

#2 @ryan
18 years ago

  • Resolution → fixed
  • Status new → closed

(In [9234]) get_search_form from technosailor. fixes #7910

Note: See TracTickets for help on using tickets.