| @@ -14,12 +14,12 @@ | ||
| 14 | 14 | <?php |
| 15 | 15 | $current_tab = isset($_GET['tab']) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'general'; |
| 16 | 16 | $settings_tabs = Notifier_Settings::get_settings_tabs(); |
| 17 | 17 | echo '<h2 class="nav-tab-wrapper">'; |
| 18 | - foreach ( $settings_tabs as $tab_key => $name ) { | |
| 19 | - $class = ( $tab_key == $current_tab ) ? ' nav-tab-active' : ''; | |
| 20 | - echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=notifier-settings&tab=' . esc_attr( $tab_key ) . '">' . esc_html($name) . '</a>'; | |
| 21 | - } | |
| 18 | + foreach ( $settings_tabs as $tab_key => $name ) { | |
| 19 | + $class = ( $tab_key == $current_tab ) ? ' nav-tab-active' : ''; | |
| 20 | + echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=notifier-settings&tab=' . esc_attr( $tab_key ) . '">' . esc_html($name) . '</a>'; | |
| 21 | + } | |
| 22 | 22 | echo '</h2>'; |
| 23 | 23 | ?> |
| 24 | 24 | |
| 25 | 25 | <?php do_action('notifier_before_settings_fields_form', $current_tab); ?> |
| @@ -37,8 +37,24 @@ | ||
| 37 | 37 | |
| 38 | 38 | <?php do_action('notifier_after_settings_fields', $current_tab); ?> |
| 39 | 39 | |
| 40 | 40 | </form> |
| 41 | + <?php if($current_tab === 'click_to_chat'): ?> | |
| 42 | + <?php $btn_style = get_option('notifier_ctc_button_style');?> | |
| 43 | + <div class="notifier-btn-preview-wrap"> | |
| 44 | + <?php | |
| 45 | + if($btn_style){ | |
| 46 | + if($btn_style == 'btn-custom-image'){ | |
| 47 | + echo '<style>.notifier-fields-table .notifier-chat-btn-image-url{display:table-row;}</style>'; | |
| 48 | + } | |
| 49 | + | |
| 50 | + if($btn_style !== 'default'){ | |
| 51 | + include_once NOTIFIER_PATH.'templates/buttons/'.$btn_style.'.php'; | |
| 52 | + } | |
| 53 | + } | |
| 54 | + ?> | |
| 55 | + </div> | |
| 56 | + <?php endif; ?> | |
| 41 | 57 | |
| 42 | 58 | <?php do_action('notifier_after_settings_fields_form', $current_tab); ?> |
| 43 | 59 | |
| 44 | 60 | </div> |