'' . __('Settings', 'add-whatsapp-button') . '');
$links = array_merge($settings, $links);
return $links;
}
// Load Plugin Settings in Admin Settings Page
if( is_admin() ) {
require_once(plugin_dir_path(__FILE__).'/includes/awb-settings.php'); //including plugin settings
}
/*
*
* Add the Whatsapp Button to the website
*
*/
function awb_html() {
global $awb_options;
$button_text = isset( $awb_options['button_text'] ) ? sanitize_text_field( $awb_options['button_text'] ) : _e('Message Us on WhatsApp', 'add-whatsapp-button');
$displayNoneIfIcon = ( $awb_options['button_type'] == 'wab-icon-plain' || $awb_options['button_type'] == 'wab-icon-styled' ) ? 'awb-displaynone' : '';
$button_style = !empty( $awb_options['button_type'] ) ? $awb_options['button_type'] : 'wab-side-rectangle';
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$subdomain = ( wp_is_mobile() ) ? 'api' : 'web';
$close_button_icon = '';
if ( 'wab-bottom-rectangle' !== $awb_options['button_type'] ) {
$button_location = isset( $awb_options['button_location'] ) ? 'wab-pull-'.$awb_options['button_location'] : 'wab-pull-left';
}
if ( 'full' === $awb_options['hide_button'] ) {
$close_button_icon = 'x';
}
else if ( 'hide' === $awb_options['hide_button'] ) {
if ( 'right' === $awb_options['button_location'] && 'wab-bottom-rectangle' !== $awb_options['button_type'] ) {
$close_button_icon = '';
} else if ( 'left' === $awb_options['button_location'] && 'wab-bottom-rectangle' !== $awb_options['button_type'] ) {
$close_button_icon = '
';
} else if ( 'wab-bottom-rectangle' === $awb_options['button_type'] ) {
$close_button_icon = '
';
}
}
ob_start();
?>