PluginProbe ʕ •ᴥ•ʔ
WP Chat App / 3.4.4
WP Chat App v3.4.4
3.8.1 3.8.2 trunk 2.6 3.4 3.4.1 3.4.2 3.4.4 3.4.5 3.4.6 3.5 3.6 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0
wp-whatsapp / views / meta-accounts.php
wp-whatsapp / views Last commit date
analytics.php 2 years ago design-preview.php 2 years ago design-settings.php 2 years ago display-settings.php 2 years ago floating-widget-settings.php 2 years ago meta-accounts.php 2 years ago meta-button-style.php 2 years ago selected-accounts.php 2 years ago settings.php 2 years ago url-settings.php 2 years ago woocommerce-button.php 2 years ago
meta-accounts.php
117 lines
1 <?php
2 use NTA_WhatsApp\Helper;
3 ?>
4 <table class="form-table" id="nta-custom-wc-button-settings">
5 <tbody>
6 <tr>
7 <th scope="row">
8 <label for="number">
9 <?php echo __('Account Number or group chat URL', 'ninjateam-whatsapp') ?>
10 </label>
11 </th>
12 <td>
13 <p>
14 <input type="text" class="widefat" id="number" name="number" value="<?php echo esc_attr($meta['number']) ?>" autocomplete="off">
15 </p>
16 <p class="description">
17 <?php echo __('Refer to <a href="https://faq.whatsapp.com/en/general/21016748" target="_blank">https://faq.whatsapp.com/en/general/21016748</a> for a detailed explanation.', 'ninjateam-whatsapp') ?>
18 </p>
19 </td>
20 </tr>
21 <tr>
22 <th scope="row">
23 <label for="wa-title"><?php echo __('Title', 'ninjateam-whatsapp') ?></label>
24 </th>
25 <td>
26 <input type="text" id="wa-title" name="title" value="<?php echo esc_attr($meta['title']) ?>" class="widefat" autocomplete="off">
27 </td>
28 </tr>
29 <tr>
30 <th scope="row">
31 <label for="predefinedText"><?php echo __('Predefined Text', 'ninjateam-whatsapp') ?></label>
32 </th>
33 <td>
34 <textarea name="predefinedText" id="predefinedText" rows="3" class="widefat"><?php echo esc_textarea($meta['predefinedText']) ?></textarea>
35 <p class="description">
36 <?php echo __('Use [njwa_page_title] and [njwa_page_url] shortcodes to output the page\'s title and URL respectively.', 'ninjateam-whatsapp') ?>
37 </p>
38 </td>
39 </tr>
40 <tr>
41 <th scope="row">
42 <label for="isAlwaysAvailable"><?php echo __('Always available online', 'ninjateam-whatsapp') ?></label>
43 </th>
44 <td>
45 <div class="nta-wa-switch-control">
46 <input type="checkbox" id="nta-wa-switch" name="isAlwaysAvailable" <?php checked($meta['isAlwaysAvailable'], 'ON') ?>>
47 <label for="nta-wa-switch" class="green"></label>
48 </div>
49 </td>
50 </tr>
51
52 <tr class="nta-btncustom-offline <?php echo ($meta['isAlwaysAvailable'] === 'ON' ? 'hidden' : '') ?>">
53 <th scope="row">
54 <label><?php echo __('Custom Availability (PRO)', 'ninjateam-whatsapp') ?></label>
55 </th>
56 <td>
57 <?php
58 $haveCustom = array_search('ON', array_column($meta['daysOfWeekWorking'], 'isWorkingOnDay'));
59 if ($haveCustom !== false): ?>
60 <p class="notice notice-warning" style="border-top: 0; border-bottom: 0; border-right: 0; box-shadow: none">
61 <?php echo sprintf(
62 __('This feature is now only available in Pro version.<br>If you still want to use it, please <a href="%s">Upgrade PRO</a> or turn back to <a href="%s">Version 2.6</a><br>Need help? <a href="%s" style="color: #444">Contact us</a>', 'ninjateam-whatsapp'),
63 'https://1.envato.market/Upgrade-WhatsApp-Pro',
64 'https://downloads.wordpress.org/plugin/wp-whatsapp.2.6.zip',
65 'https://ninjateam.org/support/'
66 )
67 ?>
68 </p>
69 <?php endif; ?>
70 <table class="form-table time-available">
71 <tbody>
72 <?php foreach ($daysOfWeek as $dayKey) : ?>
73 <?php foreach ($meta['daysOfWeekWorking'][$dayKey]['workHours'] as $i => $workHour): ?>
74 <tr class="working-<?php echo esc_attr($dayKey) ?>">
75 <td width="150">
76 <?php if($i === 0): ?>
77 <input class="njt-wa-pro" type="checkbox" id="daysOfWeekWorking[<?php echo esc_attr($dayKey) ?>][isWorkingOnDay]" name="daysOfWeekWorking[<?php echo ($dayKey) ?>][isWorkingOnDay]" <?php checked($meta["daysOfWeekWorking"][$dayKey]['isWorkingOnDay' ], 'ON') ?>>
78 <label for="daysOfWeekWorking[<?php echo ($dayKey) ?>][isWorkingOnDay]"><?php echo __(ucfirst($dayKey), 'ninjateam-whatsapp') ?> </label>
79 <?php endif ?>
80 </td>
81 <td width="100">
82 <select class="njt-wa-pro" name="daysOfWeekWorking[<?php echo esc_attr($dayKey) ?>][workHours][<?php echo $i ?>][startTime]" class="start-time"><?php echo Helper::buildTimeSelector($workHour['startTime']); ?></select>
83 </td>
84 <td width="100">
85 <select class="njt-wa-pro" name="daysOfWeekWorking[<?php echo esc_attr($dayKey) ?>][workHours][<?php echo $i ?>][endTime]" class="end-time"><?php echo Helper::buildTimeSelector($workHour['endTime']); ?></select>
86 </td>
87 <?php if ($i === 0): ?>
88 <td><a href="javascript:;" class="add-custom-time">Add</a></td>
89 <?php endif;?>
90 <?php if ($i !== 0): ?>
91 <td><a style="color: #a00" href="javascript:;" class="remove-custom-time">Remove</a></td>
92 <?php endif; ?>
93 <?php if ($dayKey === 'sunday' && $i === 0) : ?>
94 <td>
95 <a href="javascript:;" type="button" class="button" id="btn-apply-time"><?php echo __('Apply to All Days', 'ninjateam-whatsapp') ?></button>
96 </td>
97 <?php endif ?>
98 </tr>
99 <?php endforeach; ?>
100 <?php endforeach; ?>
101 </tbody>
102 </table>
103 </td>
104 </tr>
105 <tr class="nta-btncustom-offline <?php echo ($meta['isAlwaysAvailable'] === 'ON' ? 'hidden' : '') ?>">
106 <th scope="row"><label for="willBeBackText"><?php echo __('Description text when offline (PRO)', 'ninjateam-whatsapp') ?></label></th>
107 <td>
108 <input type="text" id="willBeBackText" name="willBeBackText" value="<?php echo esc_attr($meta['willBeBackText']) ?>" class="widefat njt-wa-pro" autocomplete="off" readonly>
109 <p class="description"><?php echo __('You can use shortcode [njwa_time_work] to display the exact time this account is back to work on a working day.', 'ninjateam-whatsapp') ?></p>
110 <input type="text" id="dayOffsText" name="dayOffsText" value="<?php echo esc_attr($meta['dayOffsText']) ?>" class="widefat njt-wa-pro" autocomplete="off" readonly>
111 <p class="description"><?php echo __('You can use this text to display on days this account does not work.', 'ninjateam-whatsapp') ?>
112 </p>
113 </td>
114 </tr>
115 </tbody>
116 </table>
117