Hello,
My website automatically updated to v2. This broke my website, and I had to spend several days fixing various elements.
One particular element is still not working.
I had guust put together a custom snippet to hide a particular additional tab that we created from everybody except the venue owner (i.e. the person who claimed the listing).
This snippet was as follows:
// this is the snippet that adds the filter, calling the function below.
add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;
function geodir_detail_page_tab_list_extend($tab_array)
{
//print_r($tab_array);
// only show edit score to the post owner and siteadmin
if(isset($tab_array['geodir_editscores'])){
global $post;
$user_id = get_current_user_id();
if($post->post_author != $user_id && $user_id != 10){
unset($tab_array['geodir_editscores']);
}
}
return $tab_array ;
}
Could you please advise what needs to be changed so that this is fixed and works as intended?