13 lines
441 B
PHP
13 lines
441 B
PHP
<?php
|
|
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>';
|
|
}
|
|
|
|
function kompass_print_telephone_link(string $telephonnumber)
|
|
{
|
|
echo kompass_get_telephone_link($telephonnumber);
|
|
} |