mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01:00
the_search_query() from mdawaffe. fixes #914
git-svn-id: http://svn.automattic.com/wordpress/trunk@4171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
42a9977b7e
commit
853c59eeb3
@ -1,5 +1,5 @@
|
||||
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
|
||||
<div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
|
||||
<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
|
||||
<input type="submit" id="searchsubmit" value="Search" />
|
||||
</div>
|
||||
</form>
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
|
||||
<p>You have searched the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
|
||||
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
|
||||
for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
|
||||
|
||||
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
|
||||
<p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
|
||||
|
@ -801,4 +801,9 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
||||
<?php
|
||||
}
|
||||
|
||||
function the_search_query() {
|
||||
global $s;
|
||||
echo wp_specialchars( stripslashes($s), 1 );
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user