Looks like you could tack that on using the posts_where filter… maybe.
Would take some rooting around in the code to get the table prefix and format right (there are category exclusions you could model your code after).
Really great plugin out-of-the-box but as Mallander asked, how can we exclude specific custom fields not to be searcheable?
An example code for the post_where hook will be appreciated.
I have patched lines 569ff as follows:
.
$search .= "{$searchand}( (m.meta_value LIKE '{$n}{$term}{$n}') AND NOT (m.meta_key LIKE 'content%') )";
} else {
$search .= "{$searchand}( (meta_value LIKE '{$n}{$term}{$n}') AND NOT (meta_key LIKE 'content%') )";
}
$searchand = ' AND ';
}
$sentence_term = esc_sql( $s );
if ( count( $search_terms ) > 1 && $search_terms[0] != $sentence_term ) {
if ( $this->wp_ver23 ) {
$search = "($search) OR (m.meta_value LIKE '{$n}{$sentence_term}{$n}') AND NOT (m.meta_key LIKE 'content%') )";
} else {
$search = "($search) OR ( (meta_value LIKE '{$n}{$sentence_term}{$n}') AND NOT (meta_key LIKE 'content%') ) ";
The AND NOT parts are where the exclusion comes into play.
I would also be glad if there is a patch, though.