[wp-trac] Re: [WordPress Trac] #8799: get_search_form() is inadequately documented

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 4 22:46:43 GMT 2009


#8799: get_search_form() is inadequately documented
----------------------------------------------+-----------------------------
 Reporter:  sampablokuper                     |        Owner:  matt    
     Type:  enhancement                       |       Status:  reopened
 Priority:  normal                            |    Milestone:  2.7.1   
Component:  WordPress.org                     |      Version:  2.7     
 Severity:  normal                            |   Resolution:          
 Keywords:  search theme documentation codex  |  
----------------------------------------------+-----------------------------
Comment (by sampablokuper):

 technosailor wrote:
 >As a developer, you should be able to look at source code. As a WordPress
 developer, you should understand the principles behind filters and
 actions.
 Perhaps, but as a ''new'' Wordpress developer, I rely on the Codex to get
 me up to speed. Furthermore, I'm clearly not the only person who's had
 trouble understanding how to use get_search_form() to create a custom
 form. See the references I provided when I opened this ticket.

 >So use the get_search_form filter and replace the form.
 I still feel this filter ought to at least be documented in
 [http://codex.wordpress.org/Plugin_API/Filter_Reference], which describes
 itself as, "a (hopefully complete) list of the filter hooks available for
 use in plugin development in Version 2.1 and above of WordPress."

 But I've read [http://codex.wordpress.org/Plugin_API#Filters the Codex
 page on filtering], and the email you sent me (for which, thank you),
 which says much the same thing as that Codex page, and it's still not
 clear to me how to modify the search form without either using a
 searchform.php (which, as far as I can tell is deprecated, since it's
 described as being an option only
 "[http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7 in order
 to preserve compatibility with older themes]") or creating a plugin.

 I don't want to have to create a plugin to modify the search form, because
 I want to customise the search form with a theme. But I don't want to use
 a searchform.php file either, because (IIUC, see above) this is
 deprecated.

 Is there no other way to achieve a custom search form using
 get_search_form()?

  * If there is, then it should be documented.
  * If not, then the docs should make clear whether or not developers
 should feel free to use searchform.php files in WP 2.7 templates, because:
   * if they are not free to do so (i.e. if this really is deprecated
 practice), then if they want a custom search form, they must either avoid
 get_search_form() or else write a plugin.
   * if they are free to do so, what's the point of get_search_form()? Is
 its sole ''raison d'etre'' to create a hook? If so, please say so
 explicitly (in the Codex), because it's unclear to me.

 Many thanks,

 Sam

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8799#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list