| @@ -1,5 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; | |
| 4 | +} | |
| 5 | + | |
| 2 | 6 | /** |
| 3 | 7 | * |
| 4 | 8 | * @package Wa_Notifier |
| 5 | 9 | */ |
| @@ -22,11 +26,12 @@ | ||
| 22 | 26 | if(!$btn_style){ |
| 23 | 27 | return; |
| 24 | 28 | } |
| 25 | 29 | |
| 26 | - if($enable_click_chat === 'yes' && !empty($click_chat_number)){ | |
| 27 | - if($btn_style !== 'default'){ | |
| 28 | - include_once NOTIFIER_PATH . 'templates/buttons/'.$btn_style.'.php'; | |
| 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'; | |
| 29 | 34 | } |
| 30 | 35 | } |
| 31 | 36 | } |
| 32 | 37 | } |