PluginProbe
WANotifier for Forms and Actions / 2.2.3
WANotifier for Forms and Actions v2.2.3
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 / views / admin-settings.php

admin-settings.php in WANotifier for Forms and Actions 2.2.3, at views/admin-settings.php

62 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin View: Settings
4 *
5 * @package Notifier
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11 ?>
12 <div class="wrap notifier">
13 <div class="notifier-wrapper">
14 <?php
15 $current_tab = isset($_GET['tab']) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'general';
16 $settings_tabs = Notifier_Settings::get_settings_tabs();
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 }
22 echo '</h2>';
23 ?>
24
25 <?php do_action('notifier_before_settings_fields_form', $current_tab); ?>
26
27 <form method="POST" id="notifier_settings_form" class="notifier-settings-form notifier-settings-form-<?php echo esc_attr( $current_tab ); ?>" action="" enctype="multipart/form-data">
28
29 <?php do_action('notifier_before_settings_fields', $current_tab); ?>
30
31 <?php Notifier_Settings::show_settings_fields($current_tab); ?>
32
33 <p class="submit">
34 <button name="save" class="button-primary notifier-save-button" type="submit" value="">Save changes</button>
35 <?php wp_nonce_field( NOTIFIER_NAME . '-settings' ); ?>
36 </p>
37
38 <?php do_action('notifier_after_settings_fields', $current_tab); ?>
39
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; ?>
57
58 <?php do_action('notifier_after_settings_fields_form', $current_tab); ?>
59
60 </div>
61 </div>
62