Ticket #7910: get_search_tag.4.diff
| File get_search_tag.4.diff, 4.7 KB (added by , 17 years ago) |
|---|
-
wp-content/themes/default/searchform.php
1 <?php2 /**3 * @package WordPress4 * @subpackage Default_Theme5 */6 ?>7 <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">8 <label class="hidden" for="s"><?php _e('Search for:'); ?></label>9 <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />10 <input type="submit" id="searchsubmit" value="Search" />11 </div>12 </form> -
wp-content/themes/default/archives.php
12 12 13 13 <div id="content" class="widecolumn"> 14 14 15 <?php include (TEMPLATEPATH . '/searchform.php'); ?>15 <?php get_search_form(); ?> 16 16 17 17 <h2>Archives by Month:</h2> 18 18 <ul> -
wp-content/themes/default/search.php
37 37 <?php else : ?> 38 38 39 39 <h2 class="center">No posts found. Try a different search?</h2> 40 <?php include (TEMPLATEPATH . '/searchform.php'); ?>40 <?php get_search_form(); ?> 41 41 42 42 <?php endif; ?> 43 43 -
wp-content/themes/default/index.php
34 34 35 35 <h2 class="center">Not Found</h2> 36 36 <p class="center">Sorry, but you are looking for something that isn't here.</p> 37 <?php include (TEMPLATEPATH . "/searchform.php"); ?>37 <?php get_search_form(); ?> 38 38 39 39 <?php endif; ?> 40 40 -
wp-content/themes/default/sidebar.php
9 9 <?php /* Widgetized sidebar, if you have the plugin installed. */ 10 10 if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> 11 11 <li> 12 <?php include (TEMPLATEPATH . '/searchform.php'); ?>12 <?php get_search_form(); ?> 13 13 </li> 14 14 15 15 <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. -
wp-content/themes/default/archive.php
63 63 printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", get_userdatabylogin(get_query_var('author_name'))->display_name); 64 64 else 65 65 echo("<h2 class='center'>No posts found.</h2>"); 66 include (TEMPLATEPATH . '/searchform.php');66 get_search_form(); 67 67 68 68 endif; 69 69 ?> -
wp-includes/general-template.php
93 93 load_template( get_theme_root() . '/default/sidebar.php'); 94 94 } 95 95 96 function get_search_form() { 97 do_action( 'get_search' ); 98 if('' == locate_template(array('searchform.php'), true)) 99 { 100 $form = '<form method="get" id="searchform" action="' . get_option('siteurl') . '/" > 101 <label class="hidden" for="s">' . __('Search for:') . '</label> 102 <div><input type="text" value="' . the_search_query() . '" name="s" id="s" /> 103 <input type="submit" id="searchsubmit" value="Search" /> 104 </div> 105 </form>'; 106 } 107 echo apply_filters('get_searchform', $form); 108 } 109 96 110 /** 97 111 * Display the Log In/Out link. 98 112 * -
wp-includes/widgets.php
763 763 */ 764 764 function wp_widget_search($args) { 765 765 extract($args); 766 $searchform_template = get_template_directory() . '/searchform.php';767 768 766 echo $before_widget; 769 767 770 768 // Use current theme search form if it exists 771 if ( file_exists($searchform_template) ) { 772 include_once($searchform_template); 773 } else { ?> 774 <form id="searchform" method="get" action="<?php bloginfo('url'); ?>/"><div> 775 <label class="hidden" for="s"><?php _e('Search for:'); ?></label> 776 <input type="text" name="s" id="s" size="15" value="<?php the_search_query(); ?>" /> 777 <input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" /> 778 </div></form> 779 <?php } 780 769 get_search_form(); 770 781 771 echo $after_widget; 782 772 } 783 773