INVP::prepare_phone_number_for_link( string $number )

prepare_phone_number_for_link


Description Description

Takes a phone number and prepares it for the href attribute of a link.

Removes all non-alphanumeric characters, converts letters to dial pad digits, and prepends a country dialing code if the number is 10 digits or less.


Top ↑

Parameters Parameters

$number

(Required) The phone number to prepare.


Top ↑

Return Return

(string) A version of the phone number provided with letters converted to dial pad digits, non-numeric characters removed, and a country code prepended if the length of the provided number was 10 or less.


Top ↑

Source Source

File: includes/class-invp.php