Something like this should work:
function my_search_filter($query){
if($query->is_search)
$query->set('author', get_current_user_id());
return $query;
};
add_filter('pre_get_posts', 'my_search_filter');
Something like this should work:
function my_search_filter($query){
if($query->is_search)
$query->set('author', get_current_user_id());
return $query;
};
add_filter('pre_get_posts', 'my_search_filter');