kompass/components/partials/telephon-link.php

9 lines
319 B
PHP
Raw Permalink Normal View History

<?php
function kompass_print_telephone_link(string $telephonnumber)
{
$numberInternational = $telephonnumber;
if (str_starts_with($numberInternational, '0')) {
$numberInternational = '+49' . substr($numberInternational,1);
}
echo '<a href="tel:' . $numberInternational . '">' . $telephonnumber . '</a>';
}