PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.15.0
Independent Analytics – WordPress Analytics Plugin v2.15.0
2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / views / plugin-group-options.blade.php
independent-analytics / views Last commit date
click-tracking 2 days ago date-picker 2 days ago email 2 days ago examiner 3 months ago icons 2 days ago integrations 2 days ago interrupt 2 days ago journeys 2 days ago notices 6 months ago overview 2 days ago partials 2 days ago settings 2 days ago tables 2 days ago campaign-builder.blade.php 2 months ago chart.blade.php 11 months ago debug.blade.php 11 months ago plugin-group-options.blade.php 2 days ago quick-stat-loading.blade.php 11 months ago quick-stat.blade.php 2 days ago quick-stats.blade.php 2 days ago real-time.blade.php 2 days ago support.blade.php 6 months ago updates.blade.php 2 days ago woocommerce-order-meta-box.blade.php 2 days ago
plugin-group-options.blade.php
143 lines
1 @php /** @var \IAWP\Plugin_Group[] $plugin_groups */ @endphp
2 @php /** @var \IAWP\Plugin_Group_Option[] $options */ @endphp
3 @php /** @var string $option_type */ @endphp
4 @php /** @var string $option_name */ @endphp
5 @php /** @var string $option_icon */ @endphp
6
7 {{-- Array indicies are used to add section headers. Make sure there are no gaps. --}}
8 <?php $options = array_values($options); ?>
9
10 <?php
11 $plugin_groups = array_filter($plugin_groups, function ($plugin_group) use ($options) {
12 foreach ($options as $option) {
13 if($option->is_member_of_plugin_group($plugin_group->id())) {
14 return true;
15 }
16 }
17
18 return false;
19 });
20 ?>
21
22 <?php
23 // Only one group with one option? Don't render the button or modal.
24 if(count($plugin_groups) === 1) {
25 $plugin_group_options = array_filter($options, function ($option) use ($plugin_groups) {
26 return $option->is_member_of_plugin_group($plugin_groups[0]->id());
27 });
28
29 if(count($plugin_group_options) === 1) {
30 return;
31 }
32 }
33 ?>
34
35 <div data-controller="plugin-group-options"
36 data-plugin-group-options-option-type-value="<?php echo esc_attr($option_type); ?>"
37 class="button-modal-container"
38 >
39 {{-- Toggle button --}}
40 <button class="stats-toggle-button iawp-button"
41 data-plugin-group-options-target="modalButton"
42 data-action="plugin-group-options#toggleModal"
43 >
44 <span class="dashicons dashicons-<?php echo esc_attr($option_icon); ?>"></span>
45 <?php echo esc_html($option_name); ?>
46 </button>
47
48 {{-- Toggle modal --}}
49 <div data-plugin-group-options-target="modal"
50 class="stats-toggle"
51 >
52 <div class="top title-small">
53 <?php esc_html_e('Choose Stats to Display', 'independent-analytics'); ?>
54 <span data-plugin-group-options-target="spinner" class="dashicons dashicons-update iawp-spin hidden"></span>
55 </div>
56 <div class="inner">
57 <div id="stats-toggle-sidebar" class="sidebar">
58 <ul>
59 <?php foreach($plugin_groups as $plugin_group) : ?>
60 <li>
61 <a class="link-dark <?php echo $plugin_group->id() === 'general' ? 'current' : ''; ?>"
62 data-option-id="<?php echo esc_attr($plugin_group->id()); ?>"
63 data-action="plugin-group-options#requestGroupChange"
64 data-plugin-group-options-target="tab"
65 href="#"
66 >
67 <span><?php echo esc_html($plugin_group->name()); ?></span>
68 <?php if($plugin_group->requires_pro() && iawp_is_free()) : ?>
69 <span class="pro-label"><?php esc_html_e('PRO', 'independent-analytics'); ?></span>
70 <?php endif; ?>
71 </a>
72 </li>
73 <?php endforeach; ?>
74 </ul>
75 </div>
76 <div class="main">
77 <?php foreach($plugin_groups as $plugin_group) : ?>
78 <div class="checkbox-container <?php echo $plugin_group->id() === 'general' ? 'current' : ''; ?>"
79 data-option-id="<?php echo esc_attr($plugin_group->id()); ?>"
80 data-plugin-group-options-target="checkboxContainer"
81 {{-- data-metric-category="{{ $plugin_group->id() }}"--}}
82 >
83 <span class="metrics-title"><?php echo esc_attr($plugin_group->name()); ?></span>
84
85 <?php foreach($options as $index => $option) :
86 if(!$option->is_subgroup_plugin_enabled() || !$option->is_member_of_plugin_group($plugin_group->id())) {
87 continue;
88 }
89
90 if(is_string($option->plugin_group_header()) && array_key_exists($index - 1, $options) && ($options[$index - 1])->plugin_group_header() !== $option->plugin_group_header()) : ?>
91 <span class="metrics-subtitle"><?php echo esc_html($option->plugin_group_header()); ?></span>
92 <?php endif; ?>
93
94 <label class="<?php echo !$option->is_group_plugin_enabled() ? 'disabled' : ''; ?>">
95 <?php if (!$option->is_group_plugin_enabled()) : ?>
96 <input id="iawp_<?php echo esc_attr($option_type) . '_' . esc_attr($option->id()); ?>"
97 type="checkbox"
98 disabled="disabled">
99 <?php else : ?>
100 <input id="iawp_<?php echo esc_attr($option_type) . '_' . esc_attr($option->id()); ?>"
101 type="checkbox"
102 data-action="plugin-group-options#toggleOption"
103 data-plugin-group-options-target="checkbox"
104 name="<?php echo esc_attr($option->id()); ?>"
105 <?php checked(true, $option->is_visible(), true); ?>
106 />
107 <?php endif; ?>
108 <span><?php echo esc_html($option->name()); ?></span>
109 </label>
110 <?php endforeach;
111
112 if ($plugin_group->requires_pro() && iawp_is_free()) : ?>
113 <div class="required-plugin-note">
114 <p><?php echo esc_html($plugin_group->upgrade_message()); ?></p>
115 <p><a href="<?php echo esc_attr($plugin_group->upgrade_link()); ?>"
116 class="link-purple"
117 target="_blank"><?php esc_html_e('Learn more', 'independent-analytics'); ?></a>
118 </p>
119 </div>
120 <?php elseif(!$plugin_group->has_active_group_plugins() && iawp_is_pro()) : ?>
121 <div class="required-plugin-note">
122 <p><?php echo esc_html($plugin_group->activate_message()); ?></p>
123 <p><a href="<?php echo esc_attr($plugin_group->activate_link()); ?>"
124 class="link-purple"
125 target="_blank"><?php esc_html_e('Learn more', 'independent-analytics'); ?></a>
126 </p>
127 </div>
128 <?php elseif(!$plugin_group->has_tracked_data()) : ?>
129 <div class="required-plugin-note">
130 <p><?php echo esc_html($plugin_group->no_tracked_data_message()); ?></p>
131 <p>
132 <a class="link-purple" target="_blank" href="https://independentwp.com/knowledgebase/form-tracking/why-arent-forms-showing/">
133 <?php esc_html_e('Learn more', 'independent-analytics'); ?>
134 </a>
135 </p>
136 </div>
137 <?php endif; ?>
138 </div>
139 <?php endforeach; ?>
140 </div>
141 </div>
142 </div>
143 </div>