So I’ve made other 2 filters, one for last_user and one for first_user
add_filter(‘sph_forumview_stats_records’, ‘sph_addMetatoLastPostedByForumViewObj’);
function sph_addMetatoLastPostedByForumViewObj($objData) {
if(property_exists($objData->last_user_id)){
$cortesiaTitle = get_user_meta($objData->last_user_id, ‘cortesia’, True);
$objData->last_display_name = $cortesiaTitle . ‘ ‘.$objData->last_display_name;
}
return $objData;
}
add_filter(‘sph_forumview_stats_records’, ‘sph_addMetatoTopicStartedByForumViewObj’);
function sph_addMetatoTopicStartedByForumViewObj($objData) {
if(property_exists($objData->first_user_id)){
$cortesiaTitle = get_user_meta($objData->first_user_id, ‘cortesia’, True);
$objData->first_display_name = $cortesiaTitle . ‘ ‘.$objData->first_display_name;
}
return $objData;
}
but I have errors on the use of property_exist: Wrong parameter count for property_exists()
I’ve searched for that php function, and it actually needs a second parameter, but I don’t understand what to use
SO I’ve tried using isset instead : if(isset($objData->first_user_id))
and it looks like it’s working, but on the $objData->first_display_name the “cortesia” title is prepend 2 times before display name…odd