2024-03-23 00:37:20 +01:00
|
|
|
<?php
|
2024-05-27 16:59:30 +02:00
|
|
|
function kompass_get_telephone_link(string $telephonnumber) : string {
|
|
|
|
$numberInternational = $telephonnumber;
|
|
|
|
if (str_starts_with($numberInternational, '0')) {
|
|
|
|
$numberInternational = '+49' . substr($numberInternational,1);
|
|
|
|
}
|
|
|
|
return '<a href="tel:' . $numberInternational . '">' . $telephonnumber . '</a>';
|
|
|
|
}
|
|
|
|
|
2024-03-23 00:37:20 +01:00
|
|
|
function kompass_print_telephone_link(string $telephonnumber)
|
|
|
|
{
|
2024-05-27 16:59:30 +02:00
|
|
|
echo kompass_get_telephone_link($telephonnumber);
|
2024-03-23 00:37:20 +01:00
|
|
|
}
|