# spoki/2.0.8/includes/page-setup.php

Spoki – Chat Buttons and WooCommerce Notifications, version 2.0.8. 63 lines.

- Page: https://pluginprobe.com/plugins/spoki/2.0.8/code/includes/page-setup.php
- Raw: https://pluginprobe.com/plugins/spoki/2.0.8/raw/includes/page-setup.php
- Modified: 2021-05-12T15:57:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/spoki/2.0.8/code/includes/page-setup.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) {
	exit;
}

$tabs = ['Welcome', 'Floating Button', 'WooCommerce', 'Settings'];
$GLOBALS['current_tab'] = isset($_GET['tab']) && in_array($_GET['tab'], $tabs) ? $_GET['tab'] : $tabs[0];
$has_telephone = isset($this->options['telephone']) && $this->options['telephone'] != '';

?>
<div class="wrap spoki-admin">
    <h1 class="title"><b><?php _e('Spoki', "spoki") ?></b></h1>

	<?php if (!$has_telephone) { ?>
        <div class="notice notice-error">
            <p>
                <?php _e('Please insert a valid telephone number!', "spoki"); ?>
                <a href="?page=<?php echo urlencode(SPOKI_PLUGIN_NAME) ?>&tab=<?php echo urlencode('Settings') ?>">
                    <?php _e('Settings', "spoki") ?>
                </a>
            </p>
        </div>
	<?php } ?>

    <h2 class="nav-tab-wrapper">
        <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' : ''; ?>">
			<?php _e('Dashboard', "spoki"); ?>
        </a>
        <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' : ''; ?>">
			<?php _e('Floating Button', "spoki"); ?>
        </a>
        <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' : ''; ?>">
			<?php _e('WooCommerce', "spoki"); ?>
        </a>
        <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' : ''; ?>">
			<?php _e('Settings', "spoki"); ?>
        </a>
    </h2>

    <form name="spoki-options-form" method="post" action="options.php">
		<?php settings_fields('wp-spoki-option');
		require_once SPOKI_DIR . 'views/html-welcome.php';
		require_once SPOKI_DIR . 'views/html-floating-button.php';
		require_once SPOKI_DIR . 'views/html-woocommerce.php';
		require_once SPOKI_DIR . 'views/html-settings.php';
		?>
    </form>

    <div id="spoki-feedback">
        <a href="https://wordpress.org/support/plugin/spoki/reviews/#new-post" target="_blank">
            <img src="<?php echo plugins_url() . '/' . SPOKI_PLUGIN_NAME . '/assets/images/logo.svg' ?>" alt="spoki logo">
            <?php _e('Feedback', "spoki") ?>
        </a>
    </div>

    <div id="spoki-support">
        <a href="https://api.whatsapp.com/send/?phone=447782375016&text=Hi%20Spoki,%20I%20need%20support%20about%20Spoki%20Plugin" target="_blank">
            <img src="<?php echo plugins_url() . '/' . SPOKI_PLUGIN_NAME . '/assets/images/whatsapp-logo.png' ?>" alt="whatsapp logo">
			<?php _e('Need Support?', "spoki") ?>
        </a>
    </div>
</div>

```
