כפתור צף
add_action('wp_footer',function(){ if(wp_is_mobile()): ?> <a href="whatsapp://send?text=https://arutz7.mst-net.co.il&phone=" target="_blank" style="color:#50A349; font-weight:bold;font-size: 15px;" data-action="share/whatsapp/share"><img src="https://image.flaticon.com/icons/svg/124/124034.svg" style="width: 50px; color:#50A349; font-weight:bold;font-size: 15px;position:absolute;top:10%"></a> <?php else: ?> <a href="https://api.whatsapp.com://send?text=https://facebook.mst-net.co.il&phone=" target="_blank" style="color:#50A349; font-weight:bold;font-size: 15px;"><img src="https://image.flaticon.com/icons/svg/124/124034.svg" style="width: 50px; color:#50A349; font-weight:bold;font-size: 15px;position:absolute;top:10%"></a> <?php endif; });
שורטקוד
add_action('gs_whatsapp','whatsapp'); function whatsapp(){ if(wp_is_mobile()): ?> <a href="whatsapp://send?text=https://arutz7.mst-net.co.il&phone=" target="_blank" style="color:#50A349; font-weight:bold;font-size: 15px;" data-action="share/whatsapp/share"><img src="https://image.flaticon.com/icons/svg/124/124034.svg" style="width: 50px; color:#50A349; font-weight:bold;font-size: 15px;position:absolute;top:10%"></a> <?php else: ?> <p style="direction: ltr;"><span style="font-size: 12.8px;"><?php endif;</span></p><p style="direction: ltr;"><span style="font-size: 12.8px;"> <a href="https://api.whatsapp.com://send?text=https://facebook.mst-net.co.il&phone=" target="_blank" style="color:#50A349; font-weight:bold;font-size: 15px;"><img src="https://image.flaticon.com/icons/svg/124/124034.svg" style="width: 50px; color:#50A349; font-weight:bold;font-size: 15px;position:absolute;top:10%"></a></span></p> <?php endif; ?> }