You need to go to bp-xprofile-custom-fields-type.php of my plugin, you need to change two functions: bxcft_get_field_data and bxcft_get_field_value. Search for:
elseif ($field->type == 'web') {
if (strpos($value, 'href=') === false) {
$value = str_replace("<p>", "", $value);
$value = str_replace("</p>", "", $value);
return '<p><a href="'.$value.'">'.$value.'</a></p>';
}
}
and
elseif ($type == 'web') {
if (strpos($value, 'href=') === false) {
$value = str_replace("<p>", "", $value);
$value = str_replace("</p>", "", $value);
return '<p><a href="'.$value.'">'.$value.'</a></p>';
}
}
You can put there the target=”_blank”.
Can I do this in function.php in order to not lose the changes when You update the plugin?
sorry to re open it but i’m not sure where to put the code
I tried this but doesn’t work
elseif ($field->type == 'web') {
if (strpos($value, 'href=') === false) {
$value = str_replace("<p>", "", $value);
$value = str_replace("</p>", "", $value);
return '<p><a href="'.$value.'" target="_blank">'.$value.'</a></p>';
}
}
And
elseif ($type == 'web') {
if (strpos($value, 'href=') === false) {
$value = str_replace("<p>", "", $value);
$value = str_replace("</p>", "", $value);
return '<p><a href="'.$value.'" target="_blank">'.$value.'</a></p>';
}
}
Cheers