OK … this seems to work for me…
Loop around the $return_hash array in the ft_search_submissions, end hook and remove whatever elements take your fancy!
As this is a multi-dimensional, associative array, my brain went into a loop of its own trying to code it… but try this… (p.s. don't forget to reduce the counters in $return_hash!)
HTHs someone!
Loop around the $return_hash array in the ft_search_submissions, end hook and remove whatever elements take your fancy!
As this is a multi-dimensional, associative array, my brain went into a loop of its own trying to code it… but try this… (p.s. don't forget to reduce the counters in $return_hash!)
Code:
$delete_count = 0;
foreach ($return_hash['search_rows'] as $index => $data) {
if ($data['account_id'] <> $acc_id ) { <= substitute your test here
unset($return_hash['search_rows'][$index]);
$delete_count = $delete_count + 1;
}
}
$return_hash['search_num_results'] = ($return_hash['search_num_results'] - $delete_count);
$return_hash['view_num_results'] = ($return_hash['view_num_results'] - $delete_count);
HTHs someone!