PluginProbe
WANotifier for Forms and Actions / 3.0.1
WANotifier for Forms and Actions v3.0.1
3.1.0 3.0.4 2.7.10 2.7.11 2.7.12 2.7.13 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 3.0.0 3.0.1 3.0.2 3.0.3 trunk 0.1.0 0.1.1 1.0.0 1.0.1 1.0.2 1.0.3 All 66 releases
notifier / includes / classes / class-notifier-frontend.php

class-notifier-frontend.php in WANotifier for Forms and Actions 3.0.1, at includes/classes/class-notifier-frontend.php

38 lines 894 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 /**
7 *
8 * @package Wa_Notifier
9 */
10 class Notifier_Frontend {
11 /**
12 * Init
13 */
14 public static function init() {
15 add_action( 'wp_footer', array( __CLASS__ , 'display_whatsapp_chat_button' ) );
16 }
17
18 /**
19 * Display Whatsapp chat button.
20 */
21 public static function display_whatsapp_chat_button() {
22 $enable_click_chat = get_option('notifier_ctc_enable');
23 $btn_style = get_option('notifier_ctc_button_style');
24 $click_chat_number = get_option('notifier_ctc_whatsapp_number');
25
26 if(!$btn_style){
27 return;
28 }
29
30 if ( $enable_click_chat === 'yes' && ! empty( $click_chat_number ) ) {
31 $valid_styles = array_keys( Notifier_Backend::get_button_styles() );
32 if ( $btn_style !== 'default' && in_array( $btn_style, $valid_styles, true ) ) {
33 include_once NOTIFIER_PATH . 'templates/buttons/' . $btn_style . '.php';
34 }
35 }
36 }
37 }
38