option_value('posttypes'); if (!is_array($posttypes)) { $posttypes = array(); } if (!is_singular($posttypes)) { $is_deactivated = true; } } // deactivate display of the functions if ($is_deactivated) { return; } essb_click2chat_draw(); } function essb_click2chat_draw($settings = array()) { global $post; $shortcode_call = false; $click2chat_text = essb_option_value('click2chat_text'); $click2chat_bgcolor = essb_option_value('click2chat_bgcolor'); $click2chat_color = essb_option_value('click2chat_color'); $click2chat_icon = essb_option_value('click2chat_icon'); $click2chat_location = essb_option_value('click2chat_location'); $click2chat_welcome_text = essb_option_value('click2chat_welcome_text'); if ($click2chat_bgcolor != '' || $click2chat_color != '') { echo ''; } if (isset($settings['shortcode'])) { $shortcode_call = true; $button_text = isset($settings['text']) ? $settings['text'] : $click2chat_text; $button_background = isset($settings['background']) ? $settings['background'] : $click2chat_bgcolor; $button_color = isset($settings['color']) ? $settings['color'] : $click2chat_color; $button_icon = isset($settings['icon']) ? $settings['icon'] : $click2chat_icon; $button_align = isset($settings['align']) ? $settings['align'] : 'left'; if ($button_background != '' || $button_color != '') { echo ''; } } if ($click2chat_location == '') { $click2chat_location = 'right'; } if ($click2chat_text == '') { $click2chat_text = __('Chat With Us', 'essb'); } if ($shortcode_call) { if ($button_text != '') { $click2chat_text = $button_text; } } if ($click2chat_icon == '') { $click2chat_icon = 'comments'; } if ($shortcode_call) { if ($button_icon != '') { $click2chat_icon = $button_icon; } } if ($shortcode_call) { echo '
'; } echo '