-
Notifications
You must be signed in to change notification settings - Fork 3
/
search.php
35 lines (30 loc) · 1.25 KB
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// This file is part of the FaveBlog Theme for WordPress
//
// Copyright (c) 2008-2012 Crowd Favorite, Ltd. All rights reserved.
// http://crowdfavorite.com
//
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// **********************************************************************
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
if (CFCT_DEBUG) { cfct_banner(__FILE__); }
$s = get_query_var('s');
if (get_option('permalink_structure') != '') {
$onsubmit = "location.href=this.action+'search/'+encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;";
}
else {
$onsubmit = '';
}
?>
<form method="get" id="cfct-search" action="<?php echo trailingslashit(get_bloginfo('url')); ?>" onsubmit="<?php echo $onsubmit; ?>">
<div>
<input type="text" id="cfct-search-input" name="s" value="<?php echo esc_attr($s); ?>" size="15" />
<input type="submit" name="submit_button" value="<?php _e('Search', 'carrington-blog'); ?>" />
</div>
</form>