It’s because I removed the filter that is adding the links in my plugin. It was causing errors with my plugin. If you want it back you can filter the values returned by my plugin. This is a sample code:
function my_show_field_value($value_to_return, $type, $id, $value) {
$field = new BP_XProfile_Field($id);
if ($type == 'birthdate') {
// Get children.
$childs = $field->get_children();
$show_age = false;
if (isset($childs) && $childs && count($childs) > 0 && is_object($childs[0])) {
if ($childs[0]->name == 'show_age')
$show_age = true;
}
if ($value != '') {
if ($show_age) {
$new_value = floor((time() - strtotime($value))/31556926);
} else {
$new_value = date_i18n(get_option('date_format') ,strtotime($value) );
}
$new_value = xprofile_filter_link_profile_data($new_value, $type);
$value_to_return = '<p>'.$new_value.'</p>';
}
}
return $value_to_return;
}
add_filter('bxcft_show_field_value', 'my_show_field_value', 10, 4);
If you add this filter in your functions.php of your theme. The age will be a clickable field too.