Skip to content

Commit

Permalink
make search switchable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Prosser committed Sep 26, 2013
1 parent abe6bf1 commit f61f841
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/class.hacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function show_template() {

function advanced_search_query( $where ) {

if( is_search() ) {
if( is_search() && '1' === wpsf_get_setting( wpsf_get_option_group( '../settings/settings-general.php' ), 'search', 'enabled' )) {

global $wpdb;
$query = get_search_query();
Expand Down
15 changes: 15 additions & 0 deletions settings/settings-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
)
);

$wpsf_settings[] = array(
'section_id' => 'search',
'section_title' => 'Enhanced Search.',
'section_order' => 4,
'fields' => array(
array(
'id' => 'enabled',
'title' => 'Search',
'desc' => 'Enable WordPress search to look inside section content, eg. textbox/hero/etc.',
'type' => 'checkbox',
'std' => 1
)
)
);

$wpsf_settings[] = array(
'section_id' => 'memtest',
'section_title' => 'Memory Test.',
Expand Down

0 comments on commit f61f841

Please sign in to comment.