Adding Allowed URL Protocols

For security we use the esc_url() WordPress function. It strips out certain known URL protocols. By default in WordPress esc_url() will allow these protocols: http, https, ftp, ftps, mailto, news, irc, gopher, nntp, feed, telnet, mms, rtsp, svn, tel, fax, xmpp

If you would like to allow others. Try this:

1. Open your functions.php file inside your child theme folder. Replace SMS with the protocol you wish to add.

2. Paste this in it:

 * Allowing additional URL protocols to list of allowed protocols.
 * @param array $protocols List of protocols allowed by (default WordPress.)
 * @return array $protocols Updated list including additional protocols.
function custom_themo_add_additional_protocols( $protocols ){
    $protocols[] = 'sms';
    return $protocols;
add_filter( 'kses_allowed_protocols' , 'custom_themo_add_additional_protocols' );

3. Save and test.