<?php
defined('ABSPATH') or die('No script kiddies please!!'); 
$wh_url = '';

if ($url_for_desktop == 'web') {
    // WhatsApp Web/Desktop URL
    $account_number = str_replace('+', '', $account_number);
    $wh_url = "https://web.whatsapp.com/send?phone=".$account_number;
   
    if (!empty($default_text)) {
        $wh_url .= "&text=" . $default_text;
    }
} elseif ($url_for_desktop == 'api' && !empty($account_number)) {
    // WhatsApp Moble URL
    $account_number = str_replace('+', '', $account_number);
    $wh_url = "https://api.whatsapp.com/send?phone=" . $account_number;
    if (!empty($default_text)) {
        $wh_url .= "&text=" . $default_text;
    }
    $wh_url .= "&type=phone_number&app_absent=0";
}

$mob_wh_url = '';
if ($url_for_mobile == 'protocol') {
    // WhatsApp Web/Desktop URL
    $account_number = str_replace('+', '', $account_number);
    $mob_wh_url = "https://web.whatsapp.com/send?phone=".$account_number;
    
    if (!empty($default_text)) {
        $mob_wh_url .="&text=" . $default_text;
    }
} elseif ($url_for_mobile == 'api' && !empty($account_number)) {
    // WhatsApp Moble URL
    $account_number = str_replace('+', '', $account_number);
    $mob_wh_url = "https://api.whatsapp.com/send?phone=" . $account_number;
    if (!empty($default_text)) {
        $mob_wh_url .= "&text=" . $default_text;
    }
    $mob_wh_url .= "&type=phone_number&app_absent=0";
}