PluginProbe
Spoki – Chat Buttons and WooCommerce Notifications / 2.0.8
Spoki – Chat Buttons and WooCommerce Notifications v2.0.8
2.17.4 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.10.0 2.11.0 2.11.1 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.14.0 All 69 releases
spoki / includes / page-setup.php

page-setup.php in Spoki – Chat Buttons and WooCommerce Notifications 2.0.8, at includes/page-setup.php

63 lines 2.9 KB
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 $tabs = ['Welcome', 'Floating Button', 'WooCommerce', 'Settings'];
7 $GLOBALS['current_tab'] = isset($_GET['tab']) && in_array($_GET['tab'], $tabs) ? $_GET['tab'] : $tabs[0];
8 $has_telephone = isset($this->options['telephone']) && $this->options['telephone'] != '';
9
10 ?>
11 <div class="wrap spoki-admin">
12 <h1 class="title"><b><?php _e('Spoki', "spoki") ?></b></h1>
13
14 <?php if (!$has_telephone) { ?>
15 <div class="notice notice-error">
16 <p>
17 <?php _e('Please insert a valid telephone number!', "spoki"); ?>
18 <a href="?page=<?php echo urlencode(SPOKI_PLUGIN_NAME) ?>&tab=<?php echo urlencode('Settings') ?>">
19 <?php _e('Settings', "spoki") ?>
20 </a>
21 </p>
22 </div>
23 <?php } ?>
24
25 <h2 class="nav-tab-wrapper">
26 <a href="?page=<?php echo urlencode(SPOKI_PLUGIN_NAME) ?>&tab=<?php echo urlencode('Welcome') ?>" class="nav-tab <?php echo esc_attr($GLOBALS['current_tab'] == 'Welcome') ? 'nav-tab-active' : ''; ?>">
27 <?php _e('Dashboard', "spoki"); ?>
28 </a>
29 <a href="?page=<?php echo urlencode(SPOKI_PLUGIN_NAME) ?>&tab=<?php echo urlencode('Floating Button') ?>" class="nav-tab <?php echo esc_attr($GLOBALS['current_tab'] == 'Floating Button') ? 'nav-tab-active' : ''; ?>">
30 <?php _e('Floating Button', "spoki"); ?>
31 </a>
32 <a href="?page=<?php echo urlencode(SPOKI_PLUGIN_NAME) ?>&tab=<?php echo urlencode('WooCommerce') ?>" class="nav-tab <?php echo esc_attr($GLOBALS['current_tab'] == 'WooCommerce') ? 'nav-tab-active' : ''; ?>">
33 <?php _e('WooCommerce', "spoki"); ?>
34 </a>
35 <a href="?page=<?php echo urlencode(SPOKI_PLUGIN_NAME) ?>&tab=<?php echo urlencode('Settings') ?>" class="nav-tab <?php echo esc_attr($GLOBALS['current_tab'] == 'Settings') ? 'nav-tab-active' : ''; ?>">
36 <?php _e('Settings', "spoki"); ?>
37 </a>
38 </h2>
39
40 <form name="spoki-options-form" method="post" action="options.php">
41 <?php settings_fields('wp-spoki-option');
42 require_once SPOKI_DIR . 'views/html-welcome.php';
43 require_once SPOKI_DIR . 'views/html-floating-button.php';
44 require_once SPOKI_DIR . 'views/html-woocommerce.php';
45 require_once SPOKI_DIR . 'views/html-settings.php';
46 ?>
47 </form>
48
49 <div id="spoki-feedback">
50 <a href="https://wordpress.org/support/plugin/spoki/reviews/#new-post" target="_blank">
51 <img src="<?php echo plugins_url() . '/' . SPOKI_PLUGIN_NAME . '/assets/images/logo.svg' ?>" alt="spoki logo">
52 <?php _e('Feedback', "spoki") ?>
53 </a>
54 </div>
55
56 <div id="spoki-support">
57 <a href="https://api.whatsapp.com/send/?phone=447782375016&text=Hi%20Spoki,%20I%20need%20support%20about%20Spoki%20Plugin" target="_blank">
58 <img src="<?php echo plugins_url() . '/' . SPOKI_PLUGIN_NAME . '/assets/images/whatsapp-logo.png' ?>" alt="whatsapp logo">
59 <?php _e('Need Support?', "spoki") ?>
60 </a>
61 </div>
62 </div>
63