PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.10.0
Independent Analytics – WordPress Analytics Plugin v2.10.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 1 year ago date-picker 1 year ago email 1 year ago icons 1 year ago interrupt 1 year ago notices 1 year ago partials 1 year ago settings 1 year ago tables 1 year ago campaign-builder.blade.php 2 years ago chart.blade.php 1 year ago plugin-group-options.blade.php 1 year ago quick-stats.blade.php 2 years ago real-time.blade.php 1 year ago support.blade.php 1 year ago updates.blade.php 1 year ago
plugin-group-options.blade.php
139 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); @endphp
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 @endphp
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 @endphp
34
35 <div data-controller="plugin-group-options"
36 data-plugin-group-options-option-type-value="{{ $option_type }}"
37 class="button-modal-container"
38 >
39 {{-- Toggle button --}}
40 <button id=""
41 class="stats-toggle-button iawp-button"
42 data-plugin-group-options-target="modalButton"
43 data-action="plugin-group-options#toggleModal"
44 >
45 <span class="dashicons dashicons-{{ $option_icon }}"></span>
46 {{ $option_name }}
47 </button>
48
49 {{-- Toggle modal --}}
50 <div data-plugin-group-options-target="modal"
51 class="stats-toggle"
52 >
53 <div class="top title-small">
54 <?php esc_html_e('Choose Stats to Display', 'independent-analytics'); ?>
55 <span data-plugin-group-options-target="spinner" class="dashicons dashicons-update spin hidden"></span>
56 </div>
57 <div class="inner">
58 <div id="stats-toggle-sidebar" class="sidebar">
59 <ul>
60 @foreach($plugin_groups as $plugin_group)
61 <li>
62 <a class="link-dark {{ $plugin_group->id() === 'general' ? 'current' : '' }}"
63 data-option-id="{{ $plugin_group->id() }}"
64 data-action="plugin-group-options#requestGroupChange"
65 data-plugin-group-options-target="tab"
66 href="#"
67 >
68 <span>{{ $plugin_group->name() }}</span>
69 @if($plugin_group->requires_pro() && iawp_is_free())
70 <span class="pro-label"><?php esc_html_e('PRO', 'independent-analytics'); ?></span>
71 @endif
72 </a>
73 </li>
74 @endforeach
75 </ul>
76 </div>
77 <div class="main">
78 @foreach($plugin_groups as $plugin_group)
79 <div class="checkbox-container {{ $plugin_group->id() === 'general' ? 'current' : '' }}"
80 data-option-id="{{ $plugin_group->id() }}"
81 data-plugin-group-options-target="checkboxContainer"
82 {{-- data-metric-category="{{ $plugin_group->id() }}"--}}
83 >
84 <span class="metrics-title">{{ $plugin_group->name() }}</span>
85
86 @foreach($options as $index => $option)
87 @if(!$option->is_subgroup_plugin_enabled() || !$option->is_member_of_plugin_group($plugin_group->id()))
88 @continue
89 @endif
90
91 @if(is_string($option->plugin_group_header()) && array_key_exists($index - 1, $options) && ($options[$index -1])->plugin_group_header() !== $option->plugin_group_header())
92 <span class="metrics-subtitle">{{ $option->plugin_group_header() }}</span>
93 @endif
94
95 <label class="{{ !$option->is_group_plugin_enabled() ? 'disabled' : '' }}">
96 @if(!$option->is_group_plugin_enabled())
97 <input id="iawp_{{ $option_type }}_{{$option->id()}}"
98 type="checkbox"
99 disabled="disabled">
100 @else
101 <input id="iawp_{{ $option_type }}_{{$option->id()}}"
102 type="checkbox"
103 data-action="plugin-group-options#toggleOption"
104 data-plugin-group-options-target="checkbox"
105 name="{{ $option->id() }}"
106 {{ checked(true, $option->is_visible(), true) }}
107 />
108 @endif
109 <span>{{ $option->name() }}</span>
110 </label>
111 @endforeach
112
113 @if($plugin_group->requires_pro() && iawp_is_free())
114 <div class="required-plugin-note">
115 <p>{{ $plugin_group->upgrade_message() }}</p>
116 <p><a href="{{ $plugin_group->upgrade_link() }}"
117 class="link-purple"
118 target="_blank"><?php esc_html_e('Learn more', 'independent-analytics'); ?></a>
119 </p>
120 </div>
121 @elseif(!$plugin_group->has_active_group_plugins() && iawp_is_pro())
122 <div class="required-plugin-note">
123 <p>{{ $plugin_group->activate_message() }}</p>
124 <p><a href="{{ $plugin_group->activate_link() }}"
125 class="link-purple"
126 target="_blank"><?php esc_html_e('Learn more', 'independent-analytics'); ?></a>
127 </p>
128 </div>
129 @elseif(!$plugin_group->has_tracked_data())
130 <div class="required-plugin-note">
131 <p>{{$plugin_group->no_tracked_data_message()}}</p>
132 </div>
133 @endif
134 </div>
135 @endforeach
136 </div>
137 </div>
138 </div>
139 </div>