Changeset 8250
- Timestamp:
- 07/03/2008 05:03:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r8171 r8250 462 462 function wp_widget_search($args) { 463 463 extract($args); 464 ?> 465 <?php echo $before_widget; ?> 466 <form id="searchform" method="get" action="<?php bloginfo('home'); ?>"> 467 <div> 464 $searchform_template = get_template_directory() . '/searchform.php'; 465 466 echo $before_widget; 467 468 // Use current theme search form if it exists 469 if ( file_exists($searchform_template) ) { 470 include_once($searchform_template); 471 } else { ?> 472 <form id="searchform" method="get" action="<?php bloginfo('url'); ?>/"><div> 468 473 <label class="hidden" for="s"><?php _e('Search for:'); ?></label> 469 <input type="text" name="s" id="s" size="15" /><br/>474 <input type="text" name="s" id="s" size="15" value="<?php the_search_query(); ?>" /> 470 475 <input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" /> 471 </div>472 </form>473 <?php echo $after_widget; ?>474 <?php 476 </div></form> 477 <?php } 478 479 echo $after_widget; 475 480 } 476 481
Note: See TracChangeset
for help on using the changeset viewer.