Strong Testimonials - Version 2.51.5

Version Description

Download this release

Release Info

Developer giucu91
Plugin Icon 128x128 Strong Testimonials
Version 2.51.5
Comparing to
See all releases

Code changes from version 2.51.4 to 2.51.5

admin/class-strong-testimonials-defaults.php CHANGED
@@ -31,8 +31,8 @@ class Strong_Testimonials_Defaults {
31
  $default_options = array(
32
  'embed_width' => '',
33
  'nofollow' => true,
34
- 'noopener' => false,
35
- 'noreferrer' => false,
36
  'disable_rewrite' => false,
37
  'pending_indicator' => true,
38
  'remove_whitespace' => true,
@@ -393,7 +393,7 @@ class Strong_Testimonials_Defaults {
393
  'fields' => $base_forms['default']['fields'],
394
  );
395
 
396
- return $forms;
397
  }
398
 
399
  /**
31
  $default_options = array(
32
  'embed_width' => '',
33
  'nofollow' => true,
34
+ 'noopener' => true,
35
+ 'noreferrer' => true,
36
  'disable_rewrite' => false,
37
  'pending_indicator' => true,
38
  'remove_whitespace' => true,
393
  'fields' => $base_forms['default']['fields'],
394
  );
395
 
396
+ return apply_filters( 'wpmtst_update_custom_form', $forms );
397
  }
398
 
399
  /**
admin/class-strong-testimonials-helper.php CHANGED
@@ -1,2046 +1,2560 @@
1
  <?php
 
2
  /**
3
  * Class Strong_Testimonials_Helper
4
  *
5
  * @since 2.5
6
  */
7
  class Strong_Testimonials_Helper {
8
- private $field;
9
-
10
- public function __construct() {
11
- $this->action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
12
- $this->view_id = abs( filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT ) );
13
- $this->view_options = apply_filters( 'wpmtst_view_options', get_option( 'wpmtst_view_options' ) );
14
- $this->cat_count = wpmtst_get_cat_count();
15
- }
16
-
17
- public function set_view() {
18
- $this->view = $this->get_view();
19
- $this->show_section = apply_filters('wpmtst_show_section', $this->view['mode']);
20
- if ( 'edit' == $this->action ) {
21
- $view_array = wpmtst_get_view( $this->view_id );
22
- $this->view = unserialize( $view_array['value'] );
23
- $this->view_name = $view_array['name'];
24
- } elseif ( 'duplicate' == $this->action ) {
25
- $view_array = wpmtst_get_view( $this->view_id );
26
- $this->view = unserialize( $view_array['value'] );
27
- $this->view_id = 0;
28
- $this->view_name = $view_array['name'] . ' - COPY';
29
- } else {
30
- $this->view_id = 1;
31
- $this->view = wpmtst_get_view_default();
32
- $this->view_name = 'new';
 
 
 
 
 
 
33
  }
34
- $this->view_cats_array = apply_filters( 'wpmtst_l10n_cats', explode( ',', $this->view['category'] ) );
35
- $this->sections = $this->get_sections();
36
- }
37
-
38
- public static function get_view() {
39
- $view_id = 1;
40
- $view = wpmtst_get_view_default();
41
- if (isset($_REQUEST['action'])) {
42
- $action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
43
- $id = abs( filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT ) );
44
- if ( 'edit' == $action ) {
45
- $view_array = wpmtst_get_view( $id );
46
- $view = unserialize( $view_array['value'] );
47
- } elseif ( 'duplicate' == $action ) {
48
- $view_array = wpmtst_get_view( $id );
49
- $view = unserialize( $view_array['value'] );
50
- }
51
- }
52
- return $view;
53
- }
54
-
55
- public function get_sections() {
56
- return apply_filters( 'wpmtst_view_sections', array(
57
- 'query' => array(
58
- 'section_action_before' => 'wpmtst_view_editor_before_group_select',
59
- 'section_action_after' => 'wpmtst_view_editor_after_group_select',
60
- 'fields_action_before' => '',
61
- 'fields_action_after' => array(
62
- 'action' => 'wpmtst_views_group_query',
63
- 'param' => $this->view
64
- ),
65
- 'classes' => array('then', 'then_display', 'then_not_form', 'then_slideshow', 'then_not_single_template'),
66
- 'title' => esc_html__( 'Query', 'strong-testimonials' ),
67
- 'table_classes' => 'form-table multiple group-select',
68
- 'subheading' => array(
69
- array(
70
- 'title' => esc_html__( 'Option', 'strong-testimonials' ),
71
- 'classes' => '',
72
- 'colspan' => 1,
73
- 'after' => ''
74
- ),
75
- array(
76
- 'title' => esc_html__( 'Settings', 'strong-testimonials' ),
77
- 'classes' => '',
78
- 'colspan' => 1,
79
- 'after' => ''
80
- ),
81
- array(
82
- 'title' => esc_html__( 'or Shortcode Attribute', 'strong-testimonials' ),
83
- 'classes' => 'divider',
84
- 'colspan' => 2,
85
- 'after' => '<span class="help-links"><span class="description"><a href="#tab-panel-wpmtst-help-shortcode" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a></span></span>'
86
- ),
87
- array(
88
- 'title' => esc_html__( 'Example', 'strong-testimonials' ),
89
- 'classes' => '',
90
- 'colspan' => 1,
91
- 'after' => ''
92
- )
93
- ),
94
- 'fields' => array(
95
- 'field_select' => array(
96
- 'label' => esc_html_x( 'Select', 'verb', 'strong-testimonials' ),
97
- 'type' => 'select',
98
- 'before' => '',
99
- 'after' => '',
100
- 'class' => 'view-single_or_multiple',
101
- 'container_classes' => 'then then_display then_slideshow then_not_form',
102
- 'id' => '',
103
- 'field_action_before' => '',
104
- 'field_action_after' => ''
105
- ),
106
- 'field_category' => array(
107
- 'label' => esc_html__( 'Categories', 'strong-testimonials' ),
108
- 'type' => 'category',
109
- 'before' => '',
110
- 'after' => '',
111
- 'class' => 'view-category-select',
112
- 'container_classes' => 'then then_display then_slideshow then_not_form',
113
- 'id' => '',
114
- 'field_action_before' => '',
115
- 'field_action_after' => ''
116
- ),
117
- 'field_order' => array(
118
- 'label' => esc_html_x( 'Order', 'noun', 'strong-testimonials' ),
119
- 'type' => 'order',
120
- 'before' => '',
121
- 'after' => '',
122
- 'class' => 'view-order',
123
- 'container_classes' => 'then then_display then_slideshow then_not_form',
124
- 'id' => '',
125
- 'field_action_before' => '',
126
- 'field_action_after' => ''
127
- ),
128
- 'field_limit' => array(
129
- 'label' => esc_html__( 'Quantity', 'strong-testimonials' ),
130
- 'type' => 'limit',
131
- 'before' => '',
132
- 'after' => '',
133
- 'class' => 'view-all',
134
- 'container_classes' => 'then then_display then_slideshow then_not_form',
135
- 'id' => '',
136
- 'field_action_before' => '',
137
- 'field_action_after' => ''
138
- )
139
- )
140
- ),
141
-
142
- 'fields' => array(
143
- 'section_action_before' => 'wpmtst_view_editor_before_group_fields',
144
- 'section_action_after' => '',
145
- 'fields_action_before' => '',
146
- 'fields_action_after' => '',
147
- 'classes' => array('then', 'then_display', 'then_not_form', 'then_slideshow', 'then_single_template'),
148
- 'title' => esc_html__( 'Fields', 'strong-testimonials' ),
149
- 'table_classes' => 'form-table multiple group-show',
150
- 'fields' => array(
151
- 'field_title' => array(
152
- 'label' => esc_html__( ' Title', 'strong-testimonials' ),
153
- 'type' => 'title',
154
- 'before' => '<input type="checkbox" id="view-title" name="view[data][title]" value="1"' . checked( $this->view['title'], true, false ) . 'class="checkbox if toggle">',
155
- 'after' => '',
156
- 'class' => 'view-title',
157
- 'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
158
- 'id' => '',
159
- 'field_action_before' => '',
160
- 'field_action_after' => ''
161
- ),
162
- 'field_thumbnail' => array(
163
- 'label' => esc_html__( ' Featured Image', 'strong-testimonials' ),
164
- 'type' => 'thumbnail',
165
- 'before' => '<input type="checkbox" id="view-images" class="checkbox if toggle" name="view[data][thumbnail]" value="1"' . checked( $this->view['thumbnail'], true, false ) . '>',
166
- 'after' => '',
167
- 'class' => 'view-images',
168
- 'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
169
- 'id' => '',
170
- 'field_action_before' => '',
171
- 'field_action_after' => ''
172
- ),
173
- 'field_content' => array(
174
- 'label' => esc_html__( ' Content', 'strong-testimonials' ),
175
- 'type' => 'content',
176
- 'before' => '',
177
- 'after' => '',
178
- 'class' => 'view-content',
179
- 'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
180
- 'id' => '',
181
- 'field_action_before' => '',
182
- 'field_action_after' => ''
183
- ),
184
- 'field_client_section' => array(
185
- 'include' => 'option-client-section.php',
186
- 'label' => esc_html__( ' Custom Fields', 'strong-testimonials' ),
187
- 'type' => 'client-section',
188
- 'before' => '',
189
- 'after' => '',
190
- 'class' => '',
191
- 'container_classes' => 'then then_display then_not_form then_slideshow then_single_template',
192
- 'id' => '',
193
- 'field_action_before' => '',
194
- 'field_action_after' => ''
195
- )
196
- )
197
- ),
198
-
199
- 'extra' => array(
200
- 'section_action_before' => 'wpmtst_view_editor_before_group_extra',
201
- 'section_action_after' => '',
202
- 'fields_action_before' => '',
203
- 'fields_action_after' => '',
204
- 'classes' => array('then', 'then_display', 'then_not_form', 'then_slideshow', 'then_not_single_template'),
205
- 'title' => esc_html__( 'Extra', 'strong-testimonials' ),
206
- 'table_classes' => 'form-table multiple group-layout',
207
- 'fields' => array(
208
- 'field_pagination' => array(
209
- 'label' => esc_html__( ' Pagination', 'strong-testimonials' ),
210
- 'type' => 'pagination',
211
- 'before' => '<input class="if toggle checkbox" id="view-pagination" name="view[data][pagination]" type="checkbox" value="1"' . checked( $this->view['pagination'], true, false ) . '/>',
212
- 'after' => '',
213
- 'class' => 'view-pagination',
214
- 'container_classes' => 'then then_display then_not_form then_not_slideshow then_not_single then_multiple',
215
- 'id' => '',
216
- 'field_action_before' => '',
217
- 'field_action_after' => ''
218
- ),
219
- 'field_read_more' => array(
220
- 'include' => 'option-read-more-page.php',
221
- 'label' => esc_html__( ' "Read more" link to a page or post', 'strong-testimonials' ),
222
- 'type' => 'read-more-page',
223
- 'before' => '<div class="checkbox"><input type="checkbox" id="view-more_page" class="if toggle" name="view[data][more_page]" value="1"' . checked( isset( $this->view['more_page'] ) && $this->view['more_page'], true, false ) . ' class="checkbox">',
224
- 'after' => '</div>',
225
- 'class' => 'view-more_page',
226
- 'container_classes' => 'then then_display then_not_form then_slideshow read-more',
227
- 'id' => '',
228
- 'field_action_before' => '',
229
- 'field_action_after' => ''
230
- ),
231
- )
232
- ),
233
- 'slideshow' => array(
234
- 'section_action_before' => 'wpmtst_view_editor_before_group_slideshow',
235
- 'section_action_after' => '',
236
- 'fields_action_before' => '',
237
- 'fields_action_after' => '',
238
- 'classes' => array('then', 'then_not_display', 'then_not_form', 'then_slideshow', 'then_not_single_template'),
239
- 'title' => esc_html__( 'Slideshow', 'strong-testimonials' ),
240
- 'table_classes' => 'form-table multiple group-select',
241
- 'fields' => array(
242
- 'field_slideshow_num' => array(
243
- 'label' => esc_html__( 'Show', 'strong-testimonials' ),
244
- 'type' => 'slideshow-num',
245
- 'before' => '',
246
- 'after' => '',
247
- 'class' => '',
248
- 'container_classes' => 'then then_slideshow',
249
- 'id' => '',
250
- 'field_action_before' => '',
251
- 'field_action_after' => ''
252
- ),
253
- 'field_slideshow_transition' => array(
254
- 'include' => 'option-slideshow-transition.php',
255
- 'label' => esc_html__( 'Transition', 'strong-testimonials' ),
256
- 'type' => 'slideshow-transition',
257
- 'before' => '',
258
- 'after' => '',
259
- 'class' => '',
260
- 'container_classes' => 'then then_slideshow',
261
- 'id' => '',
262
- 'field_action_before' => '',
263
- 'field_action_after' => ''
264
- ),
265
- 'field_slideshow_behavior' => array(
266
- 'label' => esc_html__( 'Behavior', 'strong-testimonials' ),
267
- 'type' => 'slideshow-behavior',
268
- 'before' => '',
269
- 'after' => '',
270
- 'class' => '',
271
- 'container_classes' => 'then then_slideshow',
272
- 'id' => '',
273
- 'field_action_before' => '',
274
- 'field_action_after' => ''
275
- ),
276
- 'field_slideshow_navigation' => array(
277
- 'label' => esc_html__( 'Navigation', 'strong-testimonials' ),
278
- 'type' => 'slideshow-navigation',
279
- 'before' => '',
280
- 'after' => '',
281
- 'class' => 'view-slideshow_nav',
282
- 'container_classes' => 'then then_slideshow',
283
- 'id' => '',
284
- 'field_action_before' => '',
285
- 'field_action_after' => ''
286
- )
287
- )
288
- ),
289
-
290
- 'form' => array(
291
- 'section_action_before' => 'wpmtst_view_editor_before_group_form',
292
- 'section_action_after' => '',
293
- 'fields_action_before' => '',
294
- 'fields_action_after' => '',
295
- 'classes' => array('then', 'then_not_display', 'then_not_slideshow', 'then_form', 'then_not_single_template'),
296
- 'title' => esc_html__( 'Actions', 'strong-testimonials' ),
297
- 'table_classes' => 'form-table multiple group-select',
298
- 'fields' => array(
299
- 'field_form_category' => array(
300
- 'label' => esc_html__( 'Assign to a category', 'strong-testimonials' ),
301
- 'type' => 'form-category',
302
- 'before' => '',
303
- 'after' => '',
304
- 'class' => '',
305
- 'container_classes' => 'then then_form',
306
- 'id' => '',
307
- 'field_action_before' => '',
308
- 'field_action_after' => ''
309
- ),
310
- 'field_form_ajax' => array(
311
- 'label' => esc_html__( ' Submit form without reloading the page (Ajax)', 'strong-testimonials' ),
312
- 'type' => 'form-ajax',
313
- 'before' => '<input type="checkbox" id="view-form_ajax" class="checkbox if toggle" name="view[data][form_ajax]" value="1"' . checked( $this->view['form_ajax'], true, false ) . '>',
314
- 'after' => '',
315
- 'class' => 'view-form_ajax',
316
- 'container_classes' => 'then then_form',
317
- 'id' => '',
318
- 'field_action_before' => '',
319
- 'field_action_after' => ''
320
- ),
321
- )
322
- ),
323
-
324
- 'style' => array(
325
- 'section_action_before' => 'wpmtst_view_editor_before_group_style',
326
- 'section_action_after' => 'wpmtst_after_style_view_section',
327
- 'fields_action_before' => '',
328
- 'fields_action_after' => array(
329
- 'action' => 'wpmtst_view_editor_after_style_section',
330
- 'param' => ''
331
- ),
332
- 'classes' => array('then', 'then_display', 'then_form', 'then_slideshow', 'then_not_single_template'),
333
- 'title' => esc_html__( 'Style', 'strong-testimonials' ),
334
- 'table_classes' => 'form-table multiple group-style',
335
- 'fields' => array(
336
- 'field_template_list_display' => array(
337
- 'label' => esc_html__( 'Template', 'strong-testimonials' ),
338
- 'type' => 'template-list-display',
339
- 'before' => '',
340
- 'after' => '',
341
- 'class' => '',
342
- 'container_classes' => 'then then_display then_not_form then_slideshow',
343
- 'id' => '',
344
- 'field_action_before' => 'wpmtst_view_editor_before_template_list',
345
- 'field_action_after' => ''
346
- ),
347
- 'field_template_list_form' => array(
348
- 'label' => esc_html__( 'Template', 'strong-testimonials' ),
349
- 'type' => 'template-list-form',
350
- 'before' => '',
351
- 'after' => '',
352
- 'class' => '',
353
- 'container_classes' => 'then then_not_display then_form then_not_slideshow',
354
- 'id' => '',
355
- 'field_action_before' => '',
356
- 'field_action_after' => ''
357
- ),
358
- 'field_option_layout' => array(
359
- 'include' => 'option-layout.php',
360
- 'label' => esc_html__( 'Layout', 'strong-testimonials' ),
361
- 'type' => 'layout',
362
- 'before' => '',
363
- 'after' => '',
364
- 'class' => '',
365
- 'container_classes' => 'then then_display then_not_form then_not_slideshow',
366
- 'id' => '',
367
- 'field_action_before' => 'wpmtst_view_editor_before_layout',
368
- 'field_action_after' => ''
369
- ),
370
- 'field_background' => array(
371
- 'label' => esc_html__( 'Background', 'strong-testimonials' ),
372
- 'type' => 'background',
373
- 'before' => '',
374
- 'after' => '',
375
- 'class' => '',
376
- 'id' => 'group-style-option-background',
377
- 'container_classes' => 'then then_display then_form then_slideshow',
378
- 'field_action_before' => 'wpmtst_view_editor_before_background',
379
- 'field_action_after' => ''
380
- ),
381
- 'field_color' => array(
382
- 'label' => esc_html__( 'Font Color', 'strong-testimonials' ),
383
- 'type' => 'color',
384
- 'before' => '',
385
- 'after' => '',
386
- 'class' => '',
387
- 'id' => 'group-style-option-color',
388
- 'container_classes' => 'then then_display then_form then_slideshow',
389
- 'field_action_before' => '',
390
- 'field_action_after' => ''
391
- ),
392
- 'field_classes' => array(
393
- 'label' => esc_html__( 'CSS Classes', 'strong-testimonials' ),
394
- 'type' => 'classes',
395
- 'before' => '',
396
- 'after' => '',
397
- 'class' => 'view-class',
398
- 'id' => '',
399
- 'container_classes' => 'then then_display then_form then_slideshow',
400
- 'field_action_before' => 'wpmtst_view_editor_before_classes',
401
- 'field_action_after' => ''
402
- ),
403
- )
404
- ),
405
-
406
- 'compat' => array(
407
- 'section_action_before' => 'wpmtst_view_editor_before_group_compat',
408
- 'section_action_after' => '',
409
- 'fields_action_before' => '',
410
- 'fields_action_after' => '',
411
- 'classes' => array('then'),
412
- 'title' => esc_html__( 'Compatibility', 'strong-testimonials' ),
413
- 'table_classes' => 'form-table multiple group-general',
414
- 'fields' => array(
415
- 'field_divi_builder' => array(
416
- 'label' => esc_html__( 'Divi Builder', 'strong-testimonials' ),
417
- 'type' => 'divi',
418
- 'before' => '',
419
- 'after' => '',
420
- 'class' => 'view-divi_builder',
421
- 'container_classes' => 'then then_display then_form then_slideshow then_not_single_template',
422
- 'id' => '',
423
- 'field_action_before' => '',
424
- 'field_action_after' => ''
425
- ),
426
- )
427
- ),
428
- ) );
429
- }
430
-
431
- public function render_form() {
432
- $actions = array( 'edit', 'duplicate', 'add' );
433
- if ( ! in_array( $this->action, $actions ) ) {
434
- wp_die( esc_html__( 'Invalid request. Please try again.', 'strong-testimonials' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
  }
436
- if ( ( 'edit' == $this->action || 'duplicate' == $this->action ) && ! $this->view_id ) return;
437
-
438
- $this->set_view();
439
- add_thickbox();
440
 
441
- $fields = wpmtst_get_custom_fields();
442
- $all_fields = wpmtst_get_all_fields();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
 
444
  /**
445
- * Show category filter if necessary.
446
  *
447
- * @since 2.2.0
448
  */
449
- if ( $this->cat_count > 5 ) {
450
- wp_enqueue_script( 'wpmtst-view-category-filter-script' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
  }
452
-
453
- // Select default template if necessary
454
- if ( !$this->view['template'] ) {
455
- if ( 'form' == $this->view['mode'] ) {
456
- $this->view['template'] = 'default-form';
457
- } else {
458
- $this->view['template'] = 'default';
459
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  }
461
 
462
- // Get urls
463
- $url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' );
464
- $url1 = $url . '&action=add';
465
- $url2 = $url . '&action=duplicate&id=' . $this->view_id;
466
-
467
- ?>
468
- <h1>
469
- <?php 'edit' == $this->action ? esc_html_e( 'Edit View', 'strong-testimonials' ) : esc_html_e( 'Add View', 'strong-testimonials' ); ?>
470
- <a href="<?php echo esc_url( $url1 ); ?>" class="add-new-h2"><?php esc_html_e( 'Add New', 'strong-testimonials' ); ?></a>
471
- <a href="<?php echo esc_url( $url ); ?>" class="add-new-h2"><?php esc_html_e( 'Return To List', 'strong-testimonials' ); ?></a>
472
- <?php if ( 'edit' == $this->action ) : ?>
473
- <a href="<?php echo esc_url( $url2 ); ?>" class="add-new-h2"><?php esc_html_e( 'Duplicate This View', 'strong-testimonials' ); ?></a>
474
- <?php endif; ?>
475
- </h1>
476
-
477
- <form id="wpmtst-views-form" method="post" action="<?php echo esc_url(admin_url( 'admin-post.php' )); ?>" autocomplete="off" enctype="multipart/form-data">
478
- <?php wp_nonce_field( 'view_form_submit', 'view_form_nonce', true, true ); ?>
479
-
480
- <input type="hidden" name="action" value="view_<?php echo esc_attr( $this->action ); ?>_form">
481
- <input type="hidden" name="view[id]" value="<?php echo esc_attr( $this->view_id ); ?>">
482
- <input type="hidden" name="view_original_mode" value="<?php echo esc_attr( $this->view['mode'] ); ?>">
483
- <input type="hidden" name="view[data][_form_id]" value="<?php echo esc_attr( $this->view['form_id'] ); ?>">
484
-
485
- <div class="table view-info">
486
- <?php $this->render_info(); ?>
487
- </div>
488
-
489
- <?php $this->render_sections(); ?>
490
-
491
- <p class="wpmtst-submit">
492
- <?php submit_button( '', 'primary', 'submit-form', false ); ?>
493
- <?php submit_button( esc_html__( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?>
494
- <?php submit_button( esc_html__( 'Restore Defaults', 'strong-testimonials' ), 'secondary', 'restore-defaults', false ); ?>
495
- </p>
496
- </form><?php
497
- }
498
-
499
- private function render_info() {
500
- if ( 'edit' == $this->action ) {
501
- $shortcode = '<div class="saved">';
502
- $shortcode .= '<input id="view-shortcode" type="text" value="[testimonial_view id=&quot;' . esc_attr( $this->view_id ) . '&quot;]" readonly />';
503
- $shortcode .= '<input id="copy-shortcode" class="button small" type="button" value="' . esc_attr__( 'copy to clipboard', 'strong-testimonials' ) . '" data-copytarget="#view-shortcode" />';
504
- $shortcode .= '<span id="copy-message">'. esc_html__('copied', 'strong-testimonials').'</span>';
505
- $shortcode .= '</div>';
506
- } else {
507
- $shortcode = '<div class="unsaved">' . esc_html_x( 'will be available after you save this', 'The shortcode for a new View.', 'strong-testimonials' ) . '</div>';
508
- }
509
-
510
- $classes = array(
511
- 'then',
512
- 'then_display',
513
- 'then_form',
514
- 'then_slideshow',
515
- 'then_not_single_template',
516
- apply_filters( 'wpmtst_view_section', '', 'shortcode' ),
517
- ); ?>
518
-
519
- <div class="table-row form-view-name">
520
- <div class="table-cell">
521
- <label for="view-name">
522
- <?php esc_html_e( 'Name', 'strong-testimonials' ); ?>
523
- </label>
524
- </div>
525
- <div class="table-cell">
526
- <input type="text" id="view-name" class="view-name" name="view[name]" value="<?php echo esc_attr( htmlspecialchars( stripslashes( $this->view_name ) ) ); ?>" tabindex="1">
527
- </div>
528
- </div>
529
-
530
- <div class="table-row form-view-shortcode <?php echo esc_attr( implode( ' ', array_filter( $classes ) ) ); ?>">
531
- <div class="table-cell">
532
- <label for="view-shortcode"><?php esc_html_e( 'Shortcode', 'strong-testimonials' ); ?></label>
533
- </div>
534
- <div class="table-cell">
535
- <?php echo $shortcode; ?>
536
- </div>
537
- </div>
538
-
539
- <div id="view-mode" class="table-row mode-select">
540
- <div class="table-cell">
541
- <?php esc_html_e( 'Mode', 'strong-testimonials' ); ?>
542
- </div>
543
- <div class="table-cell">
544
- <div class="mode-list">
545
- <?php foreach ( $this->view_options['mode'] as $mode ) : ?>
546
- <label>
547
- <input id="<?php echo esc_attr( $mode['name'] ); ?>" type="radio" name="view[data][mode]" value="<?php echo esc_attr( $mode['name'] ); ?>" <?php checked( $this->view['mode'], $mode['name'] ); ?>>
548
- <?php echo esc_html( $mode['label'] ); ?>
549
- <div class="mode-line"></div>
550
- </label>
551
- <?php endforeach; ?>
552
- </div>
553
- <div class="mode-description"></div>
554
- </div>
555
- </div><?php
556
- }
557
-
558
- private function render_sections() {
559
- $show_section = apply_filters('wpmtst_show_section', $this->view['mode']);
560
- foreach ($this->sections as $name => $section) {
561
- if (!empty($section['section_action_before'])) {
562
- do_action($section['section_action_before']);
563
- }
564
-
565
- $this->render_section($name, $section);
566
-
567
- if (!empty($section['section_action_after'])) {
568
- do_action($section['section_action_after']);
569
- }
570
- }
571
-
572
- do_action( 'wpmtst_view_editor_before_group_general' );
573
- do_action( 'wpmtst_view_editor_after_groups' );
574
- }
575
-
576
- public function render_section($name, $section) {
577
- $section['classes'][] = apply_filters('wpmtst_view_section', '', $name ); ?>
578
- <div class="<?php echo esc_attr(implode(' ', array_filter($section['classes']))); ?>" style="display:none">
579
- <h3><?php echo esc_html( $section['title'] ) ?></h3>
580
- <table class="<?php echo esc_attr( $section['table_classes'] )?>">
581
- <?php if (!empty($section['subheading'])): ?>
582
- <tr class="subheading">
583
- <?php foreach ($section['subheading'] as $subheading): ?>
584
- <td class="<?php echo esc_attr( $subheading['classes'] )?>" colspan="<?php echo esc_attr( $subheading['colspan'] ) ?>">
585
- <?php echo esc_html( $subheading['title'] ) ?>
586
- <?php echo wp_kses_post( $subheading['after'] ) ?>
587
- </td>
588
- <?php endforeach; ?>
589
- </tr>
590
- <?php endif;
591
- if (!empty($section['fields'])) {
592
- if (!empty($section['fields_action_before'])) {
593
- do_action($section['fields_action_before']['action'], $section['fields_action_before']['param']);
594
- }
595
- foreach ($section['fields'] as $key => $field) {
596
- $this->set_field($field);
597
- if (!empty($this->field['field_action_before'])) {
598
- do_action($field['field_action_before']);
599
- } ?>
600
- <tr id="<?php echo esc_attr( $this->field['id'] ) ?>" class="<?php echo esc_attr( $this->field['container_classes'] ) ?>" style="display:none">
601
- <?php $this->render_field() ?>
602
- </tr>
603
- <?php
604
- if (!empty($this->field['field_action_after'])) {
605
- do_action($field['field_action_after']);
606
- }
607
- }
608
- if (!empty($section['fields_action_after'])) {
609
- do_action($section['fields_action_after']['action'], $section['fields_action_after']['param']);
610
- }
611
- } ?>
612
- </table>
613
- </div>
614
- <?php
615
- }
616
-
617
- public function set_field($field) {
618
- $this->field = $field;
619
- }
620
-
621
- public function set_settings_field($field) {
622
- $this->field = $field;
623
- $this->isSetting = TRUE;
624
- }
625
-
626
- public function render_field() { ?>
627
- <th>
628
- <?php echo wp_kses_post( $this->field['before'] ); ?>
629
- <label for="<?php echo esc_attr( $this->field['class'] )?>"><?php echo esc_html($this->field['label']); ?></label>
630
- <?php echo wp_kses_post( $this->field['after'] ); ?>
631
- </th> <?php
632
- switch ($this->field['type']) {
633
- case 'select':
634
- $this->render_field_select();
635
- break;
636
- case 'category':
637
- $this->render_field_category();
638
- break;
639
- case 'order':
640
- $this->render_field_order();
641
- break;
642
- case 'limit':
643
- $this->render_field_limit();
644
- break;
645
- case 'title':
646
- $this->render_field_title();
647
- break;
648
- case 'thumbnail':
649
- $this->render_field_thumbnail();
650
- break;
651
- case 'content':
652
- $this->render_field_content();
653
- break;
654
- case 'client-section':
655
- $this->render_field_client_section();
656
- break;
657
- case 'pagination':
658
- $this->render_field_pagination();
659
- break;
660
- case 'read-more-page':
661
- $this->render_field_read_more_page();
662
- break;
663
- case 'slideshow-num':
664
- $this->render_field_slideshow_num();
665
- break;
666
- case 'slideshow-transition':
667
- $this->render_field_slideshow_transition();
668
- break;
669
- case 'slideshow-behavior':
670
- $this->render_field_slideshow_behavior();
671
- break;
672
- case 'slideshow-navigation':
673
- $this->render_field_slideshow_navigation();
674
- break;
675
- case 'form-category':
676
- $this->render_field_form_category();
677
- break;
678
- case 'form-ajax':
679
- $this->render_field_form_ajax();
680
- break;
681
- case 'template-list-display':
682
- $this->current_mode = 'template';
683
- $this->current_type = 'display';
684
- $this->render_field_template_list();
685
- break;
686
- case 'template-list-form':
687
- $this->current_mode = 'form-template';
688
- $this->current_type = 'form';
689
- $this->render_field_template_list();
690
- break;
691
- case 'layout':
692
- $this->render_field_layout();
693
- break;
694
- case 'background':
695
- $this->render_field_background();
696
- break;
697
- case 'color':
698
- $this->render_field_color();
699
- break;
700
- case 'classes':
701
- $this->render_field_classes();
702
- break;
703
- case 'divi':
704
- $this->render_field_divi();
705
- break;
706
- default:
707
- do_action('wpmtst_render_field', $this->field);
708
- }
709
- }
710
-
711
- public function render_option_select($input_name, $recommended = FALSE, $title = '') {
712
- $selected = $this->field['selected'];
713
- if ($this->isSetting) {
714
- $selected = $this->field['selected_settings'];
715
- }
716
- if (isset($this->field['options']) && !empty($this->field['options'])): ?>
717
- <td>
718
- <?php if (!empty($title)): ?>
719
- <h4 class="title"><?php esc_html_e($title); ?><h4>
720
- <?php endif; ?>
721
- <select id="<?php echo esc_attr( $this->field['class'] ) ?>" name="<?php echo esc_attr($input_name); ?>">
722
- <?php foreach ($this->field['options'] as $option): ?>
723
- <option value="<?php echo esc_attr( $option ); ?>" <?php selected( $option, $selected ); ?>><?php esc_html_e( $option, 'strong-testimonials-review-markup' ); ?></option>
724
- <?php endforeach; ?>
725
- </select>
726
- <?php if ($recommended): ?>
727
- <p class="description"><strong style="color: #00805e; font-style: normal;"><?php esc_html_e('Recommended.', 'strong-testimonials-review-markup') ?></strong>
728
- <?php if (is_string($recommended)) {
729
- echo esc_html($recommended);
730
- } ?>
731
- </p>
732
- <?php endif; ?>
733
- </td>
734
- <?php endif;
735
- }
736
-
737
- public function render_option_textfield($input_name, $recommended = FALSE, $description = '', $title = '', $placeholder = '') {
738
- $value = $this->field['value'];
739
- if ($this->isSetting) {
740
- $value = $this->field['value_settings'];
741
- } ?>
742
- <td>
743
- <?php if (!empty($title)): ?>
744
- <h4 class="title"><?php esc_html_e($title); ?><h4>
745
- <?php endif; ?>
746
- <div>
747
- <div class="has-input">
748
- <input class="regular-text" type="text" id="<?php echo esc_attr($this->field['class']) ?>" name="<?php echo esc_attr($input_name) ?>" value="<?php echo esc_html($value) ?>" data-default="<?php echo esc_attr($this->field['default']) ?>" placeholder="<?php echo esc_attr($placeholder, 'strong-testimonials-review-markup' ) ?>">
749
- </div>
750
- <div class="error-message"></div>
751
- </div>
752
- <p class="description">
753
- <?php if ($recommended): ?>
754
- <strong style="color: #00805e; font-style: normal;"><?php esc_html_e('Recommended.', 'strong-testimonials-review-markup') ?></strong>
755
- <?php endif; ?>
756
- <?php if (!empty($description)): ?>
757
- <?php esc_html_e($description, 'strong-testimonials-review-markup' ); ?>
758
- <?php endif; ?>
759
- </p>
760
- </td>
761
- <?php
762
- }
763
-
764
- private function render_field_select() {
765
- $testimonials_list = get_posts( array(
766
- 'orderby' => 'post_date',
767
- 'order' => 'ASC',
768
- 'post_type' => 'wpm-testimonial',
769
- 'post_status' => 'publish',
770
- 'posts_per_page' => -1,
771
- 'suppress_filters' => true,
772
- )); ?>
773
- <td>
774
- <div class="row">
775
- <div class="row-inner">
776
- <select id="view-single_or_multiple" class="if selectper" name="view[data][select]">
777
- <option value="multiple" <?php echo (int) $this->view['id'] == 0 ? 'selected' : ''; ?>><?php esc_html_e( 'one or more testimonials', 'strong-testimonials' ); ?></option>
778
- <option value="single" <?php echo (int) $this->view['id'] >= 1 ? 'selected' : ''; ?>><?php esc_html_e( 'a specific testimonial', 'strong-testimonials' ); ?></option>
779
- </select>
780
- </div>
781
- </div>
782
-
783
- <div class="row">
784
- <div class="then then_not_slideshow then_single then_not_multiple" style="display: none;">
785
- <div class="row-inner">
786
- <label>
787
- <select id="view-id" name="view[data][id]">
788
- <option value="0"><?php esc_html_e( '&mdash; select &mdash;', 'strong-testimonials' ); ?></option>
789
- <?php foreach ( $testimonials_list as $post ) : ?>
790
- <option value="<?php echo esc_attr($post->ID); ?>" <?php selected( $this->view['id'], $post->ID ); ?>>
791
- <?php echo $post->post_title ? esc_html($post->post_title) : __( '(untitled)', 'strong-testimonials' ); ?>
792
- </option>
793
- <?php endforeach; ?>
794
- </select>
795
- </label>
796
- </div>
797
- <div class="row-inner">
798
- <label for="view-post_id">
799
- <?php _ex( 'or enter its ID or slug', 'to select a testimonial', 'strong-testimonials' ); ?>
800
- </label>
801
- <input type="text" id="view-post_id" name="view[data][post_id]" size="30">
802
- </div>
803
- </div>
804
- </div>
805
- </td>
806
-
807
- <td class="divider">
808
- <p><?php echo wp_kses_post( '<code>post_ids</code>' ); ?></p>
809
- </td>
810
-
811
- <td>
812
- <p><?php esc_html_e( 'a comma-separated list of post ID\'s' , 'strong-testimonials' ); ?></p>
813
- </td>
814
-
815
- <td>
816
- <p><?php echo wp_kses_post( '<code>post_ids="123,456"</code>' ); ?></p>
817
- </td>
818
- <?php
819
- }
820
-
821
- private function render_field_category() {
822
- if ( $this->cat_count ) : ?>
823
- <td>
824
- <div id="view-category" class="row">
825
- <div class="table inline">
826
- <div class="table-row">
827
- <div class="table-cell select-cell then_display then_slideshow then_not_form">
828
- <select id="view-category-select" class="if selectper" name="view[data][category_all]">
829
- <option value="allcats" <?php selected( $this->view['category'], 'all' ); ?>><?php esc_html_e( 'all', 'strong-testimonials' ); ?></option>
830
- <option value="somecats" <?php echo( 'all' != $this->view['category'] ? 'selected' : '' ); ?>><?php _ex( 'select', 'verb', 'strong-testimonials' ); ?></option>
831
- </select>
832
- </div>
833
- <div class="table-cell then then_not_allcats then_somecats" style="display: none;">
834
- <div class="table">
835
- <?php if ( $this->cat_count > 5 ) : ?>
836
- <div class="table-row">
837
- <div class="table-cell">
838
- <div class="row" style="text-align: right; padding-bottom: 5px;">
839
- <input type="button" class="expand-cats button" value="expand list"/>
840
- </div>
841
- </div>
842
- </div>
843
- <?php endif; ?>
844
- <div class="table-row">
845
- <div class="table-cell"><?php wpmtst_category_checklist( $this->view_cats_array ); ?></div>
846
- </div>
847
- </div>
848
- </div>
849
- </div>
850
- </div>
851
- </div>
852
- </td>
853
- <?php else : ?>
854
- <td>
855
- <div id="view-category" class="row">
856
- <input type="hidden" name="view[data][category_all]" value="all">
857
- <p class="description tall"><?php esc_html_e( 'No categories found', 'strong-testimonials' ); ?></p>
858
- </div>
859
- </td>
860
- <?php endif; ?>
861
-
862
- <td class="divider">
863
- <p><?php echo wp_kses_post( '<code>category</code>' ); ?></p>
864
- </td>
865
- <td>
866
- <p><?php esc_html_e( 'a comma-separated list of category slugs or ID\'s', 'strong-testimonials' ); ?></p>
867
- </td>
868
- <td>
869
- <p><?php echo wp_kses_post( '<code>category="accounting"</code>' ); ?></p>
870
- </td><?php
871
- }
872
-
873
- private function render_field_order() {
874
- ?>
875
- <td>
876
- <div class="row">
877
- <div class="inline">
878
- <select id="view-order" name="view[data][order]">
879
- <?php foreach ( $this->view_options['order'] as $order => $order_label ) : ?>
880
- <option value="<?php echo esc_attr( $order ); ?>" <?php selected( $order, $this->view['order'] ); ?>><?php echo esc_attr( $order_label ); ?></option>
881
- <?php endforeach; ?>
882
- </select>
883
- </div>
884
- </div>
885
- </td>
886
- <td class="divider">
887
- <p><?php echo wp_kses_post( '<code>order</code>' ); ?></p>
888
- </td>
889
- <td>
890
- <p><?php echo wp_kses_post( 'oldest | newest | random | menu_order' ); ?></p>
891
- </td>
892
- <td>
893
- <p><?php echo wp_kses_post( '<code>order="random"</code>' ); ?></p>
894
- </td> <?php
895
- }
896
-
897
- private function render_field_limit() { ?>
898
- <td>
899
- <div class="row">
900
- <div class="inline">
901
- <select class="if select" id="view-all" name="view[data][all]">
902
- <option value="1" <?php selected( -1, $this->view['count'] ); ?>>
903
- <?php esc_html_e( 'all', 'strong-testimonials' ); ?>
904
- </option>
905
- <option class="trip" value="0" <?php selected( $this->view['count'] > 0 ); ?>>
906
- <?php _ex( 'count', 'noun', 'strong-testimonials' ); ?>
907
- </option>
908
- </select>
909
- &nbsp;
910
- <label><input class="input-incremental then_all" type="number" id="view-count" name="view[data][count]" value="<?php echo ( -1 == $this->view['count'] ) ? 1 : esc_attr($this->view['count']); ?>" min="1" size="5" style="display: none;"></label>
911
- </div>
912
- </div>
913
- </td>
914
- <td class="divider">
915
- <p><?php echo wp_kses_post( '<code>count</code>' ); ?></p>
916
- </td>
917
- <td></td>
918
- <td>
919
- <p><?php echo wp_kses_post( '<code>count=5</code>' ); ?></p>
920
- </td>
921
- <?php }
922
-
923
- private function render_field_title() {
924
- $custom_fields = wpmtst_get_custom_fields();
925
- $options = get_option( 'wpmtst_options' );
926
- $url_fields = array();
927
- foreach($custom_fields as $field){
928
- if('url' == $field['input_type']){
929
- $url_fields[] = $field;
930
- }
931
- }
932
- // For older versions where title_link was checkbox
933
- if ( '1' == $this->view['title_link'] ) {
934
- $this->view['title_link'] = 'wpmtst_testimonial';
935
- }
936
- if ( '0' == $this->view['title_link'] ) {
937
- $this->view['title_link'] = 'none';
938
- } ?>
939
- <td colspan="2">
940
- <div class="row">
941
- <div class="row-inner">
942
- <div class="then then_title" style="display: none;">
943
- <label for="view-title_link">
944
- <?php printf( esc_html_x( 'Link to %s', 'The name of this post type. "Testimonial" by default.', 'strong-testimonials' ), strtolower( apply_filters( 'wpmtst_cpt_singular_name', __( 'Testimonial', 'strong-testimonials' ) ) ) ); ?>
945
- </label>
946
- <div class="wpmtst-tooltip"><span>[?]</span>
947
- <div class="wpmtst-tooltip-content"><?php echo esc_html__('"Full testimonial" option doesn\'s work if "Disable permalinks for testimonials" from "Settings" page is enabled.','strong-testimonials'); ?></div>
948
- </div>
949
-
950
- <select name="view[data][title_link]">
951
- <option value="none" <?php selected( 'none', $this->view['title_link'], true ); ?>><?php echo esc_html__( 'None', 'strong-testimonials' ); ?></option>
952
- <?php if ( !isset( $options['disable_rewrite'] ) || '1' != $options['disable_rewrite'] ) { ?>
953
- <option value="wpmtst_testimonial" <?php selected( 'wpmtst_testimonial', $this->view['title_link'], true ); ?>><?php echo esc_html__( 'Full testimonial', 'strong-testimonials' ); ?></option>
954
- <?php } ?>
955
-
956
- <?php foreach ( $url_fields as $url ) { ?>
957
- <option value="<?php echo esc_url( $url['name'] ); ?>" <?php selected( $url['name'], $this->view['title_link'] ); ?>><?php echo esc_url($url['label']); ?></option>
958
- <?php } ?>
959
- </select>
960
- <?php do_action('wpmtst_view_editor_after_group_fields_title') ?>
961
- </div>
962
- </div>
963
- </div>
964
- </td>
965
- <?php
966
- }
967
-
968
- private function render_field_thumbnail() {
969
- $image_sizes = wpmtst_get_image_sizes();
970
- ?>
971
- <td colspan="2">
972
- <div class="then then_images" style="display: none;">
973
- <div class="row">
974
- <div class="row-inner">
975
- <div class="inline">
976
- <label for="view-thumbnail_size">Size</label>
977
- <select id="view-thumbnail_size" class="if select" name="view[data][thumbnail_size]">
978
- <?php foreach ( $image_sizes as $key => $size ) : ?>
979
- <option class="<?php echo ( 'custom' == $key ? 'trip' : '' ) ?>" value="<?php echo esc_attr($key); ?>"<?php selected( $key, $this->view['thumbnail_size'] ); ?>><?php echo esc_html($size['label']); ?></option>
980
- <?php endforeach; ?>
981
- </select>
982
- </div>
983
- <div class="inline then then_thumbnail_size" style="margin-left: 1em;">
984
- <label for="thumbnail_width"><?php esc_html_e( 'width', 'strong-testimonials' ); ?></label>
985
- <input id="thumbnail_width" class="input-number-px" type="text" name="view[data][thumbnail_width]" value="<?php echo esc_attr( $this->view['thumbnail_width'] ); ?>"> px
986
- <span style="display: inline-block; color: #BBB; margin: 0 1em;">|</span>
987
- <label for="thumbnail_height"><?php esc_html_e( 'height', 'strong-testimonials' ); ?></label>
988
- <input id="thumbnail_height" class="input-number-px" type="text" name="view[data][thumbnail_height]" value="<?php echo esc_attr( $this->view['thumbnail_height'] ); ?>"> px
989
- </div>
990
- </div>
991
- </div>
992
- <div class="row">
993
- <div class="row-inner">
994
- <div class="inline">
995
- <input type="checkbox" id="view-lightbox" class="if toggle" name="view[data][lightbox]"value="1" <?php checked( $this->view['lightbox'] ); ?> class="checkbox">
996
- <label for="view-lightbox"><?php esc_html_e( 'Open full-size image in a lightbox', 'strong-testimonials' ); ?></label>
997
- </div>
998
- <div class="inline then then_lightbox">
999
- <p class="description"><?php esc_html_e( 'Requires a lightbox provided by your theme or another plugin.', 'strong-testimonials' ); ?></p>
1000
- </div>
1001
- </div>
1002
- </div>
1003
-
1004
- <div class="row">
1005
- <div class="row-inner">
1006
- <div class="inline then then_lightbox input" style="display: none;">
1007
- <label for="view-lightbox_class"><?php esc_html_e( 'CSS class', 'strong-testimonials' ); ?></label>
1008
- <input type="text" id="view-lightbox_class" class="medium inline" name="view[data][lightbox_class]" value="<?php echo esc_attr($this->view['lightbox_class']); ?>">
1009
- <p class="inline description tall"><?php esc_html_e( 'To add a class to the image link.', 'strong-testimonials' ); ?></p>
1010
- </div>
1011
- </div>
1012
- </div>
1013
- <div class="row">
1014
- <div class="row-inner">
1015
- <div class="inline">
1016
- <label for="view-gravatar"><?php esc_html_e( 'If no Featured Image', 'strong-testimonials' ); ?></label>
1017
- <select id="view-gravatar" class="if select selectper" name="view[data][gravatar]">
1018
- <option value="no" <?php selected( $this->view['gravatar'], 'no' ); ?>><?php esc_html_e( 'show nothing', 'strong-testimonials' ); ?></option>
1019
- <option value="yes" <?php selected( $this->view['gravatar'], 'yes' ); ?>><?php esc_html_e( 'show Gravatar', 'strong-testimonials' ); ?></option>
1020
- <option value="if" <?php selected( $this->view['gravatar'], 'if' ); ?>><?php esc_html_e( 'show Gravatar only if found', 'strong-testimonials' ); ?></option>
1021
- <?php do_action('wpmtst_avatar_options', $this->view) ?>
1022
- </select>
1023
- </div>
1024
- <div class="inline">
1025
- <div class="then fast then_not_no then_not_default then_not_initials then_not_wp_avatars then_yes then_if" style="display: none;">
1026
- <p class="description tall"><a href="<?php echo esc_url( admin_url( 'options-discussion.php' ) ); ?>"><?php esc_html_e( 'Gravatar settings', 'strong-testimonials' ); ?></a></p>
1027
- </div>
1028
- </div>
1029
- <?php do_action('after_no_featured_image', $this->view) ?>
1030
- </div>
1031
- </div>
1032
- </div><!-- .then_images -->
1033
- </td>
1034
- <?php
1035
- }
1036
-
1037
- private function render_field_content() { ?>
1038
- <td colspan="2">
1039
- <!-- Content type -->
1040
- <div id="option-content" class="row">
1041
- <div class="row-inner">
1042
- <!-- select -->
1043
- <div class="inline">
1044
- <select id="view-content" class="if selectper min-width-1 label-not-adjacent" name="view[data][content]">
1045
- <option value="entire" <?php selected( 'entire', $this->view['content'] ); ?>><?php _ex( 'entire content', 'display setting', 'strong-testimonials' ); ?></option>
1046
- <option value="truncated" <?php selected( 'truncated', $this->view['content'] ); ?>><?php _ex( 'automatic excerpt', 'display setting', 'strong-testimonials' ); ?></option>
1047
- <option value="excerpt" <?php selected( 'excerpt', $this->view['content'] ); ?>><?php _ex( 'manual excerpt', 'display setting', 'strong-testimonials' ); ?></option>
1048
- </select>
1049
- </div>
1050
- <!-- info & screenshot -->
1051
- <div class="inline then fast then_truncated then_not_entire then_not_excerpt" style="display: none;">
1052
- <p class="description"><?php esc_html_e( 'This will strip tags like &lt;em&gt; and &lt;strong&gt;.', 'strong-testimonials' ); ?></p>
1053
- </div>
1054
- <div class="inline then fast then_not_truncated then_not_entire then_excerpt" style="display: none;">
1055
- <p class="description">
1056
- <?php printf( __( 'To create manual excerpts, you may need to enable them in the post editor like in this <a href="%s" class="thickbox">screenshot</a>.', 'strong-testimonials' ), esc_url( '#TB_inline?width=&height=210&inlineId=screenshot-screen-options' ) ); ?>
1057
- <span class="screenshot" id="screenshot-screen-options" style="display: none;"><img src="<?php echo esc_url(WPMTST_ADMIN_URL); ?>img/screen-options.png" width="600"></span>
1058
- </p>
1059
- </div>
1060
- </div>
1061
- </div>
1062
- <!-- Excerpt length -->
1063
- <div id="option-content-length" class="row then then_not_entire then_excerpt then_truncated" style="display: none;">
1064
- <div class="row-inner">
1065
- <!-- info -->
1066
- <div class="inline tight then then_excerpt then_not_truncated" style="display: none;">
1067
- <span><?php esc_html_e( 'If no manual excerpt, create an excerpt using', 'strong-testimonials' ); ?></span>
1068
- </div>
1069
- <!-- default or custom? -->
1070
- <div class="inline">
1071
- <label>
1072
- <select id="view-use_default_length" class="if selectgroup min-width-1" name="view[data][use_default_length]">
1073
- <option value="1" <?php selected( $this->view['use_default_length'] ); ?>><?php _ex( 'default length', 'display setting', 'strong-testimonials' ); ?></option>
1074
- <option value="0" <?php selected( !$this->view['use_default_length'] ); ?>><?php _ex( 'custom length', 'display setting', 'strong-testimonials' ); ?></option>
1075
- </select>
1076
- </label>
1077
- </div>
1078
- <!-- 1st option: default -->
1079
- <div class="inline then fast then_use_default_length then_1 then_not_0" style="display: none;">
1080
- <label for="view-use_default_length" class="inline-middle"><p class="description tall"><?php esc_html_e( 'The default length is 55 words but your theme may override that.', 'strong-testimonials' ); ?></p></label>
1081
- </div>
1082
- <!-- 2nd option: length -->
1083
- <div class="inline then fast then_use_default_length then_0 then_not_1" style="display: none;">
1084
- <label class="inline-middle"><?php printf( esc_html_x( 'the first %s words', 'the excerpt length', 'strong-testimonials' ), '<input id="view-excerpt_length" class="input-incremental" type="number" min="1" max="999" name="view[data][excerpt_length]" value="' . $this->view['excerpt_length'] . '">' ); ?></label>
1085
- </div>
1086
- </div>
1087
- </div><!-- #option-content-length -->
1088
-
1089
- <!-- Read-more link -->
1090
- <div id="option-content-read-more" class="row then then_not_entire then_excerpt then_truncated" style="display: none;">
1091
- <div class="row-inner subgroup">
1092
- <!-- action: full post or in place -->
1093
- <div class="row-inner">
1094
- <div class="inline"><?php _e( 'Add a <strong>Read more</strong> link to', 'strong-testimonials' ); ?></div>
1095
- <div class="inline tight">
1096
- <label>
1097
- <select id="view-more_post_in_place" class="if selectgroup" name="view[data][more_post_in_place]">
1098
- <option value="0" <?php selected( !$this->view['more_post_in_place'] ); ?>><?php esc_html_e( 'the full testimonial', 'strong-testimonials' ); ?></option>
1099
- <option value="1" <?php selected( $this->view['more_post_in_place'] ); ?>><?php esc_html_e( 'expand content in place', 'strong-testimonials' ); ?></option>
1100
- </select>
1101
- </label>
1102
- </div>
1103
- </div>
1104
- <!-- ellipsis -->
1105
- <div class="row-inner">
1106
- <div class="then then_use_default_more then_0 then_not_1" style="display: none;">
1107
- <div class="inline">
1108
- <label>
1109
- <select id="view-more_post_ellipsis" class="if selectgroup" name="view[data][more_post_ellipsis]">
1110
- <option value="1" <?php selected( $this->view['more_post_ellipsis'] ); ?>><?php esc_html_e( 'with an ellipsis', 'strong-testimonials' ); ?></option>
1111
- <option value="0" <?php selected( !$this->view['more_post_ellipsis'] ); ?>><?php esc_html_e( 'without an ellipsis', 'strong-testimonials' ); ?></option>
1112
- </select>
1113
- </label>
1114
- </div>
1115
- <div class="inline then then_excerpt then_not_truncated" style="display: none;">
1116
- <p class="description"><?php esc_html_e( 'Automatic excerpt only.', 'strong-testimonials' ); ?></p>
1117
- </div>
1118
- </div>
1119
- </div>
1120
- <!-- default or custom -->
1121
- <div class="row-inner">
1122
- <div class="inline tight then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
1123
- <?php esc_html_e( 'with link text to read more', 'strong-testimonials' ); ?>
1124
- </div>
1125
- <div class="inline then fast then_more_post_in_place then_0 then_not_1" style="display: none;">
1126
- <label>
1127
- <select id="view-use_default_more" class="if selectgroup min-width-1" name="view[data][use_default_more]">
1128
- <option value="1" <?php selected( $this->view['use_default_more'] ); ?>><?php _ex( 'with default link text', 'display setting', 'strong-testimonials' ); ?></option>
1129
- <option value="0" <?php selected( ! $this->view['use_default_more'] ); ?>><?php _ex( 'with custom link text', 'display setting', 'strong-testimonials' ); ?></option>
1130
- </select>
1131
- </label>
1132
- </div>
1133
- <div class="inline then fast then_use_default_more then_1 then_not_0" style="display: none;">
1134
- <p class="description"><?php esc_html_e( 'If you only see [&hellip;] without a link then use the custom link text instead.', 'strong-testimonials' ); ?></p>
1135
- </div>
1136
- <!-- read more -->
1137
- <div class="inline then fast then_use_default_more then_0 then_not_1" style="display: none;">
1138
  <span id="option-link-text" class="inline-span">
1139
  <label for="view-more_post_text">
1140
- <input type="text" id="view-more_post_text" name="view[data][more_post_text]" value="<?php echo esc_attr($this->view['more_post_text']); ?>" size="22" placeholder="<?php esc_html_e( 'enter a phrase', 'strong-testimonials' ); ?>">
 
 
1141
  </label>
1142
  </span>
1143
- </div>
1144
- </div>
1145
- <!-- read less -->
1146
- <div class="row-inner then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
1147
- <div class="inline tight">
1148
- <?php esc_html_e( 'and link text to read less', 'strong-testimonials' ); ?>
1149
- </div>
1150
- <div class="inline tight">
1151
  <span id="option-link-text-less" class="inline-span">
1152
  <label for="view-less_post_text">
1153
- <input type="text" id="view-less_post_text" name="view[data][less_post_text]" value="<?php echo $this->view['less_post_text']; ?>" size="22" placeholder="<?php esc_html_e( 'enter a phrase', 'strong-testimonials' ); ?>">
 
 
1154
  </label>
1155
  </span>
1156
- <p class="inline description"><?php esc_html_e( 'Leave blank to leave content expanded without a link.', 'strong-testimonials' ); ?></p>
1157
- </div>
1158
- <div class="html-content-checkbox">
1159
- <input class="checkbox" id="view-html-content" name="view[data][html_content]" value="1" type="checkbox" <?php checked( $this->view['html_content'] ); ?>/>
1160
- <label for="view-html-content"><?php _e( 'Show <strong>html content</strong>.', 'strong-testimonials' ); ?></label>
1161
- </div>
1162
- </div>
1163
- <!-- automatic or both -->
1164
- <div class="row-inner then then_excerpt then_not_truncated" style="display: none;">
1165
- <div class="inline">
1166
- <label>
1167
- <select id="view-more_full_post" class="if selectgroup" name="view[data][more_full_post]">
1168
- <option value="0" <?php selected( $this->view['more_full_post'], 0 ); ?>><?php _ex( 'for automatic excerpt only', 'display setting', 'strong-testimonials' ); ?></option>
1169
- <option value="1" <?php selected( $this->view['more_full_post'], 1 ); ?>><?php _ex( 'for both automatic and manual excerpts', 'display setting', 'strong-testimonials' ); ?></option>
1170
- </select>
1171
- </label>
1172
- </div>
1173
- </div>
1174
- </div>
1175
- </div>
1176
- <div class="row links then then_not_entire then_truncated then_excerpt" style="display: none;">
1177
- <p class="description tall solo"><?php printf(esc_html__( '%s about WordPress excerpts', 'strong-testimonials'), sprintf('<a href="%s" target="_blank">%s</a>', esc_url( 'http://buildwpyourself.com/wordpress-manual-excerpts-more-tag/' ), esc_html__( 'Learn more', 'strong-testimonials' )));?></p>
1178
- </div>
1179
- </td>
1180
- <?php
1181
- }
1182
-
1183
- private function render_field_client_section() { ?>
1184
- <td colspan="2">
1185
- <div id="client-section-table">
1186
- <div id="custom-field-list2" class="fields">
1187
- <?php
1188
- if ( isset( $this->view['client_section'] ) ) {
1189
- foreach ( $this->view['client_section'] as $key => $field ) {
1190
- wpmtst_view_field_inputs( $key, $field );
1191
- }
1192
- }
1193
- ?>
1194
- </div>
1195
- </div>
1196
- <div id="add-field-bar" class="is-below">
1197
- <input id="add-field" type="button" name="add-field" source="view[data]" value="<?php esc_html_e( 'Add Field', 'strong-testimonials' ); ?>" class="button-secondary" />
1198
- </div>
1199
- </td>
1200
- <?php
1201
- }
1202
-
1203
- private function render_field_pagination() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1204
  /**
1205
- * Attempt to repair bug from 2.28.2
 
 
1206
  */
1207
- if ( !isset( $this->view['pagination_settings']['end_size'] ) || !$this->view['pagination_settings']['end_size'] ) {
1208
- $this->view['pagination_settings']['end_size'] = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1209
  }
1210
- if ( !isset( $this->view['pagination_settings']['mid_size'] ) || !$this->view['pagination_settings']['mid_size'] ) {
1211
- $this->view['pagination_settings']['mid_size'] = 2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1212
  }
1213
- if ( !isset( $this->view['pagination_settings']['per_page'] ) || !$this->view['pagination_settings']['per_page'] ) {
1214
- $this->view['pagination_settings']['per_page'] = 5;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1215
  }
1216
- $links = '<span class="help-links">';
1217
- $links .= '<a href="#tab-panel-wpmtst-help-pagination" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a>';
1218
- $links .= '</span>';
1219
- ?>
1220
- <td>
1221
- <div class="row then then_pagination" style="display: none;">
1222
- <div class="row-inner">
1223
- <div class="inline">
1224
- <label for="view-pagination_type">
1225
- <select class="if selectper" id="view-pagination_type" name="view[data][pagination_settings][type]">
1226
- <option value="simple" <?php selected( 'simple', $this->view['pagination_settings']['type'] ); ?>><?php esc_html_e( 'simple', 'strong-testimonials' ); ?></option>
1227
- <option value="standard" <?php selected( 'standard', $this->view['pagination_settings']['type'] ); ?>><?php esc_html_e( 'WordPress standard', 'strong-testimonials' ); ?></option>
1228
- <?php do_action( 'wpmtst_form_pagination_options_after', $this->view ) ?>
1229
- </select>
1230
- </label>
1231
- </div>
1232
- <div class="inline then fast then_simple then_not_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
1233
- <p class="description">
1234
- <?php esc_html_e( 'Using JavaScript. Intended for small scale.', 'strong-testimonials' ); ?>
1235
- <?php echo wp_kses_post($links); ?>
1236
- </p>
1237
- </div>
1238
- <div class="inline then fast then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
1239
- <p class="description">
1240
- <?php esc_html_e( 'Using paged URLs: /page/2, /page/3, etc. Best for large scale.', 'strong-testimonials' ); ?>
1241
- <?php echo wp_kses_post($links); ?>
1242
- </p>
1243
- </div>
1244
- </div>
1245
- </div>
1246
- <div class="row then then_pagination" style="display: none;">
1247
- <div class="row-inner">
1248
- <div class="inline">
1249
- <label for="view-per_page"><?php _ex( 'Per page', 'quantity', 'strong-testimonials' ); ?></label>
1250
- <input class="input-incremental" id="view-per_page" name="view[data][pagination_settings][per_page]" type="number" min="1" step="1" value="<?php echo esc_attr($this->view['pagination_settings']['per_page']); ?>"/>
1251
- </div>
1252
- <div class="inline then then_simple then_standard then_not_infinitescroll then_not_loadmore">
1253
- <label for="view-nav"><?php esc_html_e( 'Navigation', 'strong-testimonials' ); ?></label>
1254
- <select id="view-nav" name="view[data][pagination_settings][nav]">
1255
- <option value="before" <?php selected( $this->view['pagination_settings']['nav'], 'before' ); ?>><?php esc_html_e( 'before', 'strong-testimonials' ); ?></option>
1256
- <option value="after" <?php selected( $this->view['pagination_settings']['nav'], 'after' ); ?>><?php esc_html_e( 'after', 'strong-testimonials' ); ?></option>
1257
- <option value="before,after" <?php selected( $this->view['pagination_settings']['nav'], 'before,after' ); ?>><?php esc_html_e( 'before & after', 'strong-testimonials' ); ?></option>
1258
- </select>
1259
- </div>
1260
- </div>
1261
- <div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
1262
- <div class="row-inner">
1263
- <div class="inline">
1264
- <label for="view-pagination-show_all">
1265
- <select class="if select" id="view-pagination-show_all" name="view[data][pagination_settings][show_all]">
1266
- <option value="on" <?php selected( $this->view['pagination_settings']['show_all'] ); ?>><?php esc_html_e( 'Show all page numbers', 'strong-testimonials' ); ?></option>
1267
- <option value="off" <?php selected( !$this->view['pagination_settings']['show_all'] ); ?>class="trip"><?php esc_html_e( 'Show condensed page numbers', 'strong-testimonials' ); ?></option>
1268
- </select>
1269
- </label>
1270
- </div>
1271
- <div class="inline then then_show_all" style="display: none;">
1272
- <div class="inline">
1273
- <label for="view-pagination-end_size"><?php _ex( 'End size', 'quantity', 'strong-testimonials' ); ?></label>
1274
- <input class="input-incremental" id="view-pagination-end_size" name="view[data][pagination_settings][end_size]" type="number" min="1" step="1" value="<?php echo esc_attr($this->view['pagination_settings']['end_size']); ?>"/>
1275
- </div>
1276
- <div class="inline">
1277
- <label for="view-pagination-mid_size"><?php _ex( 'Middle size', 'quantity', 'strong-testimonials' ); ?></label>
1278
- <input class="input-incremental" id="view-pagination-mid_size" name="view[data][pagination_settings][mid_size]" type="number" min="1" step="1" value="<?php echo esc_attr($this->view['pagination_settings']['mid_size']); ?>"/>
1279
- </div>
1280
- </div>
1281
- </div>
1282
- </div>
1283
- <div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
1284
- <div class="row-inner">
1285
- <div class="inline inline-middle">
1286
- <input class="if toggle checkbox" id="view-pagination-prev_next" name="view[data][pagination_settings][prev_next]" type="checkbox" value="1" <?php checked( $this->view['pagination_settings']['prev_next'] ); ?>>
1287
- <label for="view-pagination-prev_next"><?php esc_html_e( 'Show previous/next links', 'strong-testimonials' ); ?></label>
1288
- </div>
1289
- <div class="then then_prev_next inline inline-middle">
1290
- <label for="view-pagination-prev_text"><?php esc_html_e( 'Previous text', 'strong-testimonials' ); ?></label>
1291
- <input class="code" id="view-pagination-prev_text" name="view[data][pagination_settings][prev_text]" type="text" value="<?php echo htmlentities( $this->view['pagination_settings']['prev_text'] ); ?>">
1292
- </div>
1293
- <div class="then then_prev_next inline inline-middle">
1294
- <label for="view-pagination-next_text"><?php esc_html_e( 'Next text', 'strong-testimonials' ); ?></label>
1295
- <input class="code" id="view-pagination-next_text" name="view[data][pagination_settings][next_text]" type="text" value="<?php echo htmlentities( $this->view['pagination_settings']['next_text'] ); ?>">
1296
- </div>
1297
- </div>
1298
- </div>
1299
- <div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
1300
- <div class="row-inner">
1301
- <div class="inline">
1302
- <label for="view-pagination-before_page_number"><?php esc_html_e( 'Before page number', 'strong-testimonials' ); ?></label>
1303
- <input class="small-text" id="view-pagination-before_page_number" name="view[data][pagination_settings][before_page_number]" type="text" value="<?php echo esc_attr($this->view['pagination_settings']['before_page_number']); ?>">
1304
- </div>
1305
- <div class="inline">
1306
- <label for="view-pagination-after_page_number"><?php esc_html_e( 'After page number', 'strong-testimonials' ); ?></label>
1307
- <input class="small-text" id="view-pagination-after_page_number" name="view[data][pagination_settings][after_page_number]" type="text" value="<?php echo esc_attr($this->view['pagination_settings']['after_page_number']); ?>">
1308
- </div>
1309
- </div>
1310
- </div>
1311
- </div>
1312
- <?php do_action( 'wpmtst_view_editor_pagination_row_end' ); ?>
1313
- </td>
1314
- <?php
1315
- }
1316
-
1317
- private function render_field_read_more_page() {
1318
- $custom_list = apply_filters( 'wpmtst_custom_pages_list', array(), $this->view );
1319
- $pages_list = apply_filters( 'wpmtst_pages_list', wpmtst_get_pages() );
1320
- $posts_list = apply_filters( 'wpmtst_posts_list', wpmtst_get_posts() );
1321
- ?>
1322
- <td>
1323
- <div class="row then then_more_page" style="display: none;">
1324
- <!-- Select page -->
1325
- <div class="row then then_more_page" style="display: none;">
1326
- <div class="row-inner">
1327
- <label>
1328
- <select id="view-page" name="view[data][more_page_id]">
1329
- <option value=""><?php esc_html_e( '&mdash; select &mdash;', 'strong-testimonials' ); ?></option>
1330
- <?php
1331
- do_action( 'wpmtst_readmore_page_list', $this->view );
1332
- if ( $custom_list ) {
1333
- ?>
1334
- <optgroup label="<?php esc_html_e( 'Custom', 'strong-testimonials' ); ?>">
1335
- <?php
1336
- foreach ( $custom_list as $page ) {
1337
- echo wp_kses_post( $page );
1338
- }
1339
- ?>
1340
- </optgroup>
1341
- <?php } ?>
1342
- <optgroup label="<?php esc_attr_e( 'Pages', 'strong-testimonials' ); ?>">
1343
- <?php foreach ( $pages_list as $pages ) : ?>
1344
- <option value="<?php echo esc_attr($pages->ID); ?>" <?php selected( isset( $this->view['more_page_id'] ) ? $this->view['more_page_id'] : 0, $pages->ID ); ?>><?php echo esc_html($pages->post_title); ?></option>
1345
- <?php endforeach; ?>
1346
- </optgroup>
1347
- <optgroup label="<?php esc_attr_e( 'Posts', 'strong-testimonials' ); ?>">
1348
- <?php foreach ( $posts_list as $posts ) : ?>
1349
- <option value="<?php echo esc_attr($posts->ID); ?>" <?php selected( isset( $this->view['more_page_id'] ) ? $this->view['more_page_id'] : 0, $posts->ID ); ?>><?php echo esc_html($posts->post_title); ?></option>
1350
- <?php endforeach; ?>
1351
- </optgroup>
1352
- </select>
1353
- </label>
1354
- <label for="view-page_id2"><?php _ex( 'or enter its ID or slug', 'to select a target page', 'strong-testimonials' ); ?></label>
1355
- <input type="text" id="view-page_id2" name="view[data][more_page_id2]" size="30">
1356
- </div>
1357
- </div>
1358
- <!-- Link text -->
1359
- <div class="row">
1360
- <div class="row-inner">
1361
- <div class="inline">
1362
- <label for="view-more_page_text"><?php esc_html_e( 'with link text', 'strong-testimonials' ); ?></label>
1363
- <input type="text" id="view-more_page_text" name="view[data][more_page_text]" value="<?php echo esc_attr($this->view['more_page_text']); ?>" size="50">
1364
- </div>
1365
- </div>
1366
- </div>
1367
- <!-- location -->
1368
- <div class="row">
1369
- <div class="row-inner">
1370
- <label>
1371
- <select id="view-more_page_hook" name="view[data][more_page_hook]">
1372
- <option value="wpmtst_view_footer" <?php selected( 'wpmtst_view_footer', $this->view['more_page_hook'] ); ?>><?php _ex( 'after the last testimonial', 'display setting', 'strong-testimonials' ); ?></option>
1373
- <option value="wpmtst_after_testimonial" <?php selected( 'wpmtst_after_testimonial', $this->view['more_page_hook'] ); ?>><?php _ex( 'in each testimonial', 'display setting', 'strong-testimonials' ); ?></option>
1374
- </select>
1375
- </label>
1376
- </div>
1377
- </div>
1378
- </div>
1379
- </td>
1380
- <?php
1381
- }
1382
-
1383
- private function render_field_slideshow_num() { ?>
1384
- <td>
1385
- <div class="row">
1386
- <div class="inline inline-middle">
1387
- <label>
1388
- <select id="view-slider_type" name="view[data][slideshow_settings][type]" class="if selectgroup">
1389
- <option value="show_single" <?php selected( $this->view['slideshow_settings']['type'], 'show_single' ); ?>><?php esc_html_e( 'single', 'strong-testimonials' ); ?></option>
1390
- <option value="show_multiple" <?php selected( $this->view['slideshow_settings']['type'], 'show_multiple' ); ?>><?php esc_html_e( 'multiple', 'strong-testimonials' ); ?></option>
1391
- </select>
1392
- </label>
1393
- <div class="option-desc singular" style="display: none;">
1394
- <?php esc_html_e( 'slide at a time', 'strong-testimonials' ); ?>
1395
- </div>
1396
- <div class="option-desc plural" style="display: none;">
1397
- <?php esc_html_e( 'slides at a time with these responsive breakpoints:', 'strong-testimonials' ); ?>
1398
- </div>
1399
- </div>
1400
- </div>
1401
- </td>
1402
- <td>
1403
- <div class="inline then then_slider_type then_not_show_single then_show_multiple" style="display: none;">
1404
- <div class="row">
1405
- <div class="inner-table is-below">
1406
- <div class="inner-table-row bordered header">
1407
- <div class="inner-table-cell"><?php esc_html_e( 'minimum screen width', 'strong-testimonials' ); ?></div>
1408
- <div class="inner-table-cell"><?php esc_html_e( 'show', 'strong-testimonials' ); ?></div>
1409
- <div class="inner-table-cell"><?php esc_html_e( 'margin', 'strong-testimonials' ); ?></div>
1410
- <div class="inner-table-cell"><?php esc_html_e( 'move', 'strong-testimonials' ); ?></div>
1411
- </div>
1412
- <?php foreach ( $this->view['slideshow_settings']['breakpoints'] as $key => $breakpoint ) : ?>
1413
- <div class="inner-table-row bordered">
1414
- <div class="inner-table-cell">
1415
- <label>
1416
- <input id="view-breakpoint_<?php echo esc_attr($key); ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][width]" value="<?php echo esc_attr($breakpoint['width']); ?>" type="number" class="input-incremental"> px
1417
- </label>
1418
- </div>
1419
- <div class="inner-table-cell">
1420
- <label>
1421
- <select id="view-max_slides_<?php echo $key; ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][max_slides]" class="if selectgroup">
1422
- <option value="1" <?php selected( $breakpoint['max_slides'], 1 ); ?>>1</option>
1423
- <option value="2" <?php selected( $breakpoint['max_slides'], 2 ); ?>>2</option>
1424
- <option value="3" <?php selected( $breakpoint['max_slides'], 3 ); ?>>3</option>
1425
- <option value="4" <?php selected( $breakpoint['max_slides'], 4 ); ?>>4</option>
1426
- </select>
1427
- </label>
1428
- <div class="option-desc singular" style="display: none;"><?php esc_html_e( 'slide', 'strong-testimonials' ); ?></div>
1429
- <div class="option-desc plural" style="display: none;"><?php esc_html_e( 'slides', 'strong-testimonials' ); ?></div>
1430
- </div>
1431
- <div class="inner-table-cell">
1432
- <input id="view-margin_<?php echo $key; ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][margin]" value="<?php echo esc_attr($breakpoint['margin']); ?>" type="number" min="1" step="1" size="3" class="input-incremental"/> px
1433
- </div>
1434
- <div class="inner-table-cell">
1435
- <label>
1436
- <select id="view-move_slides_<?php echo esc_attr($key); ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][move_slides]"class="if selectgroup">
1437
- <option value="1" <?php selected( $breakpoint['move_slides'], 1 ); ?>>1</option>
1438
- <option value="2" <?php selected( $breakpoint['move_slides'], 2 ); ?>>2</option>
1439
- <option value="3" <?php selected( $breakpoint['move_slides'], 3 ); ?>>3</option>
1440
- <option value="4" <?php selected( $breakpoint['move_slides'], 4 ); ?>>4</option>
1441
- </select>
1442
- </label>
1443
- <div class="option-desc singular" style="display: none;"><?php esc_html_e( 'slide', 'strong-testimonials' ); ?></div>
1444
- <div class="option-desc plural" style="display: none;"><?php esc_html_e( 'slides', 'strong-testimonials' ); ?></div>
1445
- </div>
1446
- </div>
1447
- <?php endforeach; ?>
1448
- </div>
1449
- </div>
1450
- <div class="is-below">
1451
- <input id="restore-default-breakpoints"type="button" name="restore-default-breakpoints" value="<?php esc_html_e( 'Restore Default Breakpoints', 'strong-testimonials' ); ?>" class="button-secondary" />
1452
- <span id="restored-message"><?php esc_html_e( 'defaults restored', 'strong-testimonials' ); ?></span>
1453
- </div>
1454
- </div>
1455
- </td>
1456
- <?php
1457
- }
1458
-
1459
- private function render_field_slideshow_transition() { ?>
1460
- <td>
1461
- <div class="row">
1462
- <div class="inline inline-middle">
1463
- <label for="view-pause"><?php _ex( 'Show slides for', 'slideshow setting', 'strong-testimonials' ); ?></label>
1464
- <input type="number" id="view-pause" class="input-incremental" name="view[data][slideshow_settings][pause]" min=".1" step=".1" value="<?php echo esc_attr($this->view['slideshow_settings']['pause']); ?>" size="3"/>
1465
- <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
1466
- </div>
1467
- <div class="inline inline-middle then then_slider_type then_show_single then_not_show_multiple fast" style="display: none;">
1468
- <label for="view-effect"><?php esc_html_e( 'then', 'strong-testimonials' ); ?></label>
1469
- <select id="view-effect" name="view[data][slideshow_settings][effect]" class="if selectnot">
1470
- <?php foreach ( $this->view_options['slideshow_effect'] as $key => $label ) : ?>
1471
- <option value="<?php echo esC_attr($key); ?>"
1472
- <?php selected( $this->view['slideshow_settings']['effect'], $key ); ?>
1473
- <?php echo 'none' == $key ? 'class="trip"' : ''; ?>><?php echo esc_html($label); ?></option>
1474
- <?php endforeach; ?>
1475
- </select>
1476
- </div>
1477
- <div class="inline inline-middle then then_slider_type then_not_show_single then_show_multiple fast" style="display: none;">
1478
- <?php esc_html_e( 'then', 'strong-testimonials' ); ?> <?php _ex( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ); ?>
1479
- </div>
1480
- <div class="inline inline-middle then then_effect then_none">
1481
- <label for="view-speed"><?php esc_html_e( 'for', 'strong-testimonials' ); ?></label>
1482
- <input type="number" id="view-speed" class="input-incremental" name="view[data][slideshow_settings][speed]" min=".1" step=".1" value="<?php echo esc_attr($this->view['slideshow_settings']['speed']); ?>" size="3"/>
1483
- <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
1484
- </div>
1485
- </div>
1486
- </td>
1487
- <?php
1488
- }
1489
-
1490
- private function render_field_slideshow_behavior() { ?>
1491
- <td>
1492
- <div class="row">
1493
- <div class="inline inline-middle">
1494
- <input type="checkbox" id="view-auto_start" name="view[data][slideshow_settings][auto_start]" value="0" <?php checked( $this->view['slideshow_settings']['auto_start'] ); ?> class="checkbox">
1495
- <label for="view-auto_start"><?php _ex( 'Start automatically', 'slideshow setting', 'strong-testimonials' ); ?></label>
1496
- </div>
1497
- </div>
1498
- <div class="row">
1499
- <div class="inline inline-middle">
1500
- <input type="checkbox" id="view-continuous_sliding" name="view[data][slideshow_settings][continuous_sliding]" value="0" <?php checked( $this->view['slideshow_settings']['continuous_sliding'] ); ?> class="checkbox">
1501
- <label for="view-continuous_sliding"><?php _ex( 'Continuous Sliding', 'slideshow setting', 'strong-testimonials' ); ?></label>
1502
- </div>
1503
- </div>
1504
- <div class="row">
1505
- <div class="inline inline-middle">
1506
- <input type="checkbox" id="view-auto_hover" name="view[data][slideshow_settings][auto_hover]" value="0" <?php checked( $this->view['slideshow_settings']['auto_hover'] ); ?> class="checkbox">
1507
- <label for="view-auto_hover"><?php _ex( 'Pause on hover', 'slideshow setting', 'strong-testimonials' ); ?></label>
1508
- </div>
1509
- </div>
1510
- <div class="row">
1511
- <div class="inline inline-middle">
1512
- <input type="checkbox" id="view-stop_auto_on_click" name="view[data][slideshow_settings][stop_auto_on_click]" value="0" <?php checked( $this->view['slideshow_settings']['stop_auto_on_click'] ); ?> class="checkbox">
1513
- <label for="view-stop_auto_on_click"><?php _ex( 'Stop on interaction', 'slideshow setting', 'strong-testimonials' ); ?></label>
1514
- </div>
1515
- <div class="inline inline-middle">
1516
- <p class="description"><?php esc_html_e( 'Recommended if using navigation.', 'strong-testimonials' ); ?></p>
1517
- </div>
1518
- </div>
1519
- <?php
1520
- if ( $this->view['slideshow_settings']['adapt_height'] ) {
1521
- $height = 'dynamic';
1522
- } else {
1523
- $height = 'static';
1524
- }
1525
- ?>
1526
- <div class="row">
1527
- <div class="row-inner">
1528
- <div class="inline">
1529
- <label for="view-slideshow_height">
1530
- <select id="view-slideshow_height" name="view[data][slideshow_settings][height]" class="if selectgroup">
1531
- <?php foreach ( $this->view_options['slideshow_height'] as $key => $type ) : ?>
1532
- <option value="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>"
1533
- <?php selected( $height, $key ); ?>>
1534
- <?php echo esc_html($type); ?>
1535
- </option>
1536
- <?php endforeach; ?>
1537
- </select>
1538
- </label>
1539
- </div>
1540
- <div class="inline then then_slideshow_height then_dynamic then_not_static" style="display: none;">
1541
- <label for="view-adapt_height_speed"><?php esc_html_e( 'Duration', 'strong-testimonials' ); ?></label>
1542
- <input type="number" id="view-adapt_height_speed" class="input-incremental" name="view[data][slideshow_settings][adapt_height_speed]" min="0" step="0.1" value="<?php echo esc_attr($this->view['slideshow_settings']['adapt_height_speed']); ?>" size="3"/>
1543
- <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
1544
- </div>
1545
- <div class="inline then then_slideshow_height then_not_dynamic then_static" style="display: none;">
1546
- <input type="checkbox" id="view-stretch" name="view[data][slideshow_settings][stretch]" value="1" <?php checked( $this->view['slideshow_settings']['stretch'] ); ?> class="checkbox">
1547
- <label for="view-stretch"><?php esc_html_e( 'Stretch slides vertically', 'strong-testimonials' ); ?></label>
1548
- <div class="inline description">
1549
- <a href="#tab-panel-wpmtst-help-stretch" class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
1550
- </div>
1551
- </div>
1552
- </div>
1553
- </div>
1554
- <div class="row tall">
1555
- <p class="description"><?php esc_html_e( 'The slideshow will pause if the browser window becomes inactive.', 'strong-testimonials' ); ?></p>
1556
- </div>
1557
- </td>
1558
- <?php
1559
- }
1560
-
1561
- private function render_field_slideshow_navigation() { ?>
1562
- <td>
1563
- <div class="row">
1564
- <div class="row-inner">
1565
- <div class="inline">
1566
- <label for="view-slideshow_controls_type"><?php esc_html_e( 'Controls', 'strong-testimonials' ); ?></label>
1567
- <select id="view-slideshow_controls_type" name="view[data][slideshow_settings][controls_type]" class="if selectnot">
1568
- <?php foreach ( $this->view_options['slideshow_nav_method']['controls'] as $key => $type ) : ?>
1569
- <option value="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>"
1570
- <?php selected( $this->view['slideshow_settings']['controls_type'], $key ); ?>
1571
- <?php if ( 'none' == $key ) {
1572
- echo ' class="trip"';
1573
- } ?>>
1574
- <?php echo esc_html($type['label']); ?>
1575
- </option>
1576
- <?php endforeach; ?>
1577
- </select>
1578
- </div>
1579
- <div class="inline then then_slideshow_controls_type" style="display: none;">
1580
- <label for="view-slideshow_controls_style"><?php esc_html_e( 'Style', 'strong-testimonials' ); ?></label>
1581
- <select id="view-slideshow_controls_style" name="view[data][slideshow_settings][controls_style]">
1582
- <?php foreach ( $this->view_options['slideshow_nav_style']['controls'] as $key => $style ) : ?>
1583
- <option value="<?php echo esc_attr($key); ?>" <?php selected( $this->view['slideshow_settings']['controls_style'], $key ); ?>><?php echo esc_html($style['label']); ?></option>
1584
- <?php endforeach; ?>
1585
- </select>
1586
- </div>
1587
- </div>
1588
- </div>
1589
- <div class="row">
1590
- <div class="row-inner then then_has-pager">
1591
- <div class="inline">
1592
- <label for="view-slideshow_pager_type"><?php esc_html_e( 'Pagination', 'strong-testimonials' ); ?></label>
1593
- <select id="view-slideshow_pager_type" name="view[data][slideshow_settings][pager_type]" class="if selectnot">
1594
- <?php foreach ( $this->view_options['slideshow_nav_method']['pager'] as $key => $type ) : ?>
1595
- <option value="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>"
1596
- <?php selected( $this->view['slideshow_settings']['pager_type'], $key ); ?>
1597
- <?php if ( 'none' == $key ) {
1598
- echo ' class="trip"';
1599
- } ?>>
1600
- <?php echo esc_html($type['label']); ?>
1601
- </option>
1602
- <?php endforeach; ?>
1603
- </select>
1604
- </div>
1605
- <div class="inline then then_slideshow_pager_type" style="display: none;">
1606
- <label for="view-slideshow_pager_style"><?php esc_html_e( 'Style', 'strong-testimonials' ); ?></label>
1607
- <select id="view-slideshow_pager_style" name="view[data][slideshow_settings][pager_style]" class="if selectnot">
1608
- <?php foreach ( $this->view_options['slideshow_nav_style']['pager'] as $key => $style ) : ?>
1609
- <option value="<?php echo esc_attr($key); ?>" <?php selected( $this->view['slideshow_settings']['pager_style'], $key ); ?>><?php echo esc_html($style['label']); ?></option>
1610
- <?php endforeach; ?>
1611
- </select>
1612
- </div>
1613
- </div>
1614
- </div>
1615
- <div class="row">
1616
- <div class="row-inner">
1617
- <div class="then then_slider_type then_show_single then_not_show_multiple" style="display: none;">
1618
- <div class="inline then then_has-position" style="display: none;">
1619
- <label for="view-slideshow_nav_position"><?php esc_html_e( 'Position', 'strong-testimonials' ); ?></label>
1620
- <select id="view-slideshow_nav_position" name="view[data][slideshow_settings][nav_position]">
1621
- <?php foreach ( $this->view_options['slideshow_nav_position'] as $key => $label ) : ?>
1622
- <option value="<?php echo esc_attr($key); ?>" <?php selected( $this->view['slideshow_settings']['nav_position'], $key ); ?>><?php echo esc_html($label); ?></option>
1623
- <?php endforeach; ?>
1624
- </select>
1625
- <?php //esc_html_e( 'outside', 'strong-testimonials' ); ?>
1626
- <?php esc_html_e( 'the testimonial frame', 'strong-testimonials' ); ?>
1627
- </div>
1628
- </div>
1629
- </div>
1630
- </div>
1631
- </td>
1632
- <?php
1633
- }
1634
-
1635
- private function render_field_form_category() {
1636
- if ( $this->cat_count ) : ?>
1637
- <td>
1638
- <div class="table">
1639
- <?php if ( $this->cat_count > 5 ) : ?>
1640
- <div class="table-row">
1641
- <div class="table-cell">
1642
- <div class="row" style="text-align: right; padding-bottom: 5px;">
1643
- <input type="button" class="expand-cats button" value="expand list"/>
1644
- </div>
1645
- </div>
1646
- </div>
1647
- <?php endif; ?>
1648
- <div class="table-row">
1649
- <div class="table-cell">
1650
- <?php wpmtst_form_category_checklist( $this->view_cats_array ); ?>
1651
- </div>
1652
- </div>
1653
- </div>
1654
- </td>
1655
- <?php else : ?>
1656
- <td>
1657
- <p class="description tall"><?php esc_html_e( 'No categories found', 'strong-testimonials' ); ?></p>
1658
- </td>
1659
- <?php endif;
1660
- }
1661
-
1662
- private function render_field_form_ajax() {?>
1663
- <td>
1664
- <p class="description tall"><?php _e( 'This will override the <strong>Success Redirect</strong> setting.', 'strong-testimonials' ); ?></p>
1665
- </td>
1666
- <?php
1667
- }
1668
-
1669
- private function render_field_template_list() {
1670
- // Assemble list of templates
1671
- $templates = array(
1672
- 'display' => WPMST()->templates->get_templates( 'display' ),
1673
- 'form' => WPMST()->templates->get_templates( 'form' ),
1674
- );
1675
- $template_found = in_array( $this->view['template'], WPMST()->templates->get_template_keys() );
1676
- ?>
1677
- <td colspan="2">
1678
- <div id="view-template-list">
1679
- <div class="radio-buttons">
1680
- <?php if ( ! $template_found ) : ?>
1681
- <ul class="radio-list template-list">
1682
- <li>
1683
- <div>
1684
- <input class="error" type="radio" id="<?php echo esc_attr( $this->view['template'] ); ?>" name="view[data][<?php echo esc_attr( $this->current_mode ); ?>]" value="<?php echo esc_attr( $this->view['template'] ); ?>" checked>
1685
- <label for="<?php echo esc_attr( $this->view['template'] ); ?>"><?php echo esc_html($this->view['template']); ?></label>
1686
- </div>
1687
- <div class="template-description">
1688
- <p>
1689
- <span class="dashicons dashicons-warning error"></span>&nbsp;
1690
- <span class="error"><?php esc_html_e( 'not found', 'strong-testimonials' ); ?></span>
1691
- </p>
1692
- </div>
1693
- </li>
1694
- </ul>
1695
- <?php endif; ?>
1696
- <ul class="radio-list template-list">
1697
- <?php foreach ( $templates[ $this->current_type ] as $key => $template ) : ?>
1698
- <li>
1699
- <div>
1700
- <input type="radio" id="template-<?php echo esc_attr( $key ); ?>" name="view[data][<?php echo esc_attr( $this->current_mode ); ?>]" value="<?php echo esc_attr( $key ); ?>" <?php checked( $key, $this->view['template'] ); ?>>
1701
- <label for="template-<?php echo esc_attr( $key ); ?>"><?php echo esc_html($template['config']['name']); ?></label>
1702
- </div>
1703
- <div class="template-description">
1704
- <p><?php echo ( isset( $template['config']['description'] ) && $template['config']['description'] ? esc_html($template['config']['description']) : __( 'no description', 'strong-testimonials' ) ) ?></p>
1705
- <div class="options">
1706
- <div>
1707
- <?php if ( ! isset( $template['config']['options'] ) || ! is_array( $template['config']['options'] ) ) : ?>
1708
- <span><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></span>
1709
- <?php else : ?>
1710
- <?php foreach ( $template['config']['options'] as $option ) : ?>
1711
- <div style="margin-bottom: 10px;">
1712
- <?php
1713
- $name = sprintf( 'view[data][template_settings][%s][%s]', esc_attr($key), esc_attr($option->name) );
1714
- $id = $key . '-' . $option->name;
1715
- switch ( $option->type ) {
1716
- case 'select':
1717
- // Get default if not set
1718
- if ( ! isset( $this->view['template_settings'][ $key ][ $option->name ] ) ) {
1719
- $this->view['template_settings'][ $key ][ $option->name ] = $option->default;
1720
- }
1721
- if ( $option->label ) {
1722
- printf( '<label for="%s">%s</label>', $id, $option->label );
1723
- }
1724
- printf( '<select id="%s" name="%s">', esc_attr($id), $name );
1725
- foreach ( $option->values as $value ) {
1726
- $selected = selected( $value->value, $this->view['template_settings'][ $key ][ $option->name ], false );
1727
- printf( '<option value="%s" %s>%s</option>', esc_attr($value->value), $selected, esc_html($value->description) );
1728
- }
1729
- echo '</select>';
1730
- break;
1731
- case 'radio':
1732
- if ( ! isset( $this->view['template_settings'][ $key ][ $option->name ] ) ) {
1733
- $this->view['template_settings'][ $key ][ $option->name ] = $option->default;
1734
- }
1735
- foreach ( $option->values as $value ) {
1736
- $checked = checked( $value->value, $this->view['template_settings'][ $key ][ $option->name ], false );
1737
- printf( '<input type="radio" id="%s" name="%s" value="%s" %s>', esc_attr($id), $name, esc_attr($value->value), $checked );
1738
- printf( '<label for="%s">%s</label>', esc_attr($id), esc_html($value->description) );
1739
- }
1740
- break;
1741
- case 'colorpicker':
1742
- if ( $option->label ) {
1743
- printf( '<label for="%s">%s</label>', esc_attr($id), esc_html($option->label) );
1744
- }
1745
- $value = isset( $this->view['template_settings'][ $key ][ $option->name ] ) ? $this->view['template_settings'][ $key ][ $option->name ] : $option->default;
1746
- printf( '<input type="text" class="wp-color-picker-field" data-alpha="true" id="%s" name="%s" value="%s">', esc_attr($id), $name, esc_attr($value) );
1747
- break;
1748
- default:
1749
- do_action( 'wpmtst_views_render_template_option_' . $option->type, $this->view, $key, $option );
1750
- break;
1751
- }
1752
- ?>
1753
- </div>
1754
- <?php endforeach; ?>
1755
- <?php endif; ?>
1756
- </div>
1757
- </div>
1758
- <?php do_action('wpmtst_views_after_template_options', $this->view, $template, $key ); ?>
1759
- </div>
1760
- </li>
1761
- <?php endforeach; ?>
1762
- </ul>
1763
- </div>
1764
- </div>
1765
- <?php do_action('wpmtst_views_after_template_list' ); ?>
1766
- </td>
1767
- <?php
1768
- }
1769
-
1770
- private function render_field_layout() { ?>
1771
- <td colspan="2">
1772
- <div class="section-radios layout-section">
1773
- <div class="radio-buttons">
1774
- <ul class="radio-list layout-list">
1775
- <li>
1776
- <input type="radio" id="view-layout-normal" name="view[data][layout]" value="" <?php checked( false, $this->view['layout'] ); ?>>
1777
- <label for="view-layout-normal"><?php esc_html_e( 'normal', 'strong-testimonials' ); ?></label>
1778
- </li>
1779
- <li>
1780
- <input type="radio" id="view-layout-masonry" name="view[data][layout]" value="masonry" <?php checked( 'masonry', $this->view['layout'] ); ?>>
1781
- <label for="view-layout-masonry"><?php esc_html_e( 'Masonry', 'strong-testimonials' ); ?> </label>
1782
- </li>
1783
- <li>
1784
- <input type="radio"
1785
- id="view-layout-columns"
1786
- name="view[data][layout]"
1787
- value="columns" <?php checked( 'columns', $this->view['layout'] ); ?>>
1788
- <label for="view-layout-columns">
1789
- <?php esc_html_e( 'columns', 'strong-testimonials' ); ?>
1790
- </label>
1791
- </li>
1792
- <li>
1793
- <input type="radio" id="view-layout-grid" name="view[data][layout]" value="grid" <?php checked( 'grid', $this->view['layout'] ); ?>>
1794
- <label for="view-layout-grid"><?php esc_html_e( 'grid', 'strong-testimonials' ); ?></label>
1795
- </li>
1796
- </ul>
1797
- </div>
1798
- <div>
1799
- <div class="radio-description" id="view-layout-info">
1800
- <div class="layout-description view-layout-normal">
1801
- <p><?php esc_html_e( 'A single column.', 'strong-testimonials' ); ?></p>
1802
- </div>
1803
- <div class="layout-description view-layout-masonry">
1804
- <p><?php printf( __( 'A cascading, responsive grid using the jQuery plugin <a href="%s" target="_blank">Masonry</a>.', 'strong-testimonials' ), esc_url( 'http://masonry.desandro.com/' ) ); ?></p>
1805
- <p><?php esc_html_e( 'The universal solution that works well regardless of testimonial lengths.', 'strong-testimonials' ); ?></p>
1806
- <p><?php esc_html_e( 'Not compatible with pagination.', 'strong-testimonials' ); ?></p>
1807
- </div>
1808
- <div class="layout-description view-layout-columns">
1809
- <p><?php printf( __( 'Using <a href="%s" target="_blank">CSS multi-column</a>. Fill from top to bottom, then over to next column.', 'strong-testimonials' ), esc_url( 'https://css-tricks.com/guide-responsive-friendly-css-columns/' ) ); ?></p>
1810
- <p><?php esc_html_e( 'Works well with both long and short testimonials.', 'strong-testimonials' ); ?></p>
1811
- <p><?php esc_html_e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
1812
- </div>
1813
- <div class="layout-description view-layout-grid">
1814
- <p><?php
1815
- $url = 'https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties';
1816
- printf( __( 'Using <a href="%s" target="_blank">CSS flexbox</a>.', 'strong-testimonials' ), esc_url( $url ) );?>
1817
- </p>
1818
- <p><?php esc_html_e( 'Testimonials will be equal height so this works best when they are about the same length either naturally or using excerpts.', 'strong-testimonials' ); ?></p>
1819
- <p><?php esc_html_e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
1820
- </div>
1821
- </div>
1822
- <div class="radio-description options" id="column-count-wrapper">
1823
- <div>
1824
- <label for="view-column-count"><?php esc_html_e( 'Number of columns', 'strong-testimonials' ); ?></label>
1825
- <select id="view-column-count" name="view[data][column_count]">
1826
- <option value="2" <?php selected( $this->view['column_count'], 2 ); ?>>2</option>
1827
- <option value="3" <?php selected( $this->view['column_count'], 3 ); ?>>3</option>
1828
- <option value="4" <?php selected( $this->view['column_count'], 4 ); ?>>4</option>
1829
- </select>
1830
- </div>
1831
- </div>
1832
- </div>
1833
- <div>
1834
- <div class="layout-example view-layout-normal">
1835
- <div class="example-container">
1836
- <div class="box"><span>1</span></div>
1837
- <div class="box size2"><span>2</span></div>
1838
- <div class="box"><span>3</span></div>
1839
- <div class="box size2"><span>4</span></div>
1840
- <div class="box"><span>5</span></div>
1841
- </div>
1842
- </div>
1843
- <div class="layout-example view-layout-masonry">
1844
- <div class="example-container col-2">
1845
- <div class="grid-sizer"></div>
1846
- <div class="box"><span>1</span></div>
1847
- <div class="box size2"><span>2</span></div>
1848
- <div class="box"><span>3</span></div>
1849
- <div class="box size3"><span>4</span></div>
1850
- <div class="box"><span>5</span></div>
1851
- <div class="box size2"><span>6</span></div>
1852
- <div class="box"><span>7</span></div>
1853
- <div class="box size3"><span>8</span></div>
1854
- <div class="box"><span>9</span></div>
1855
- </div>
1856
- </div>
1857
- <div class="layout-example view-layout-columns">
1858
- <div class="example-container col-2">
1859
- <div class="box"><span>1</span></div>
1860
- <div class="box size2"><span>2</span></div>
1861
- <div class="box"><span>3</span></div>
1862
- <div class="box size3"><span>4</span></div>
1863
- <div class="box"><span>5</span></div>
1864
- <div class="box size2"><span>6</span></div>
1865
- <div class="box"><span>7</span></div>
1866
- <div class="box size3"><span>8</span></div>
1867
- <div class="box"><span>9</span></div>
1868
- </div>
1869
- </div>
1870
- <div class="layout-example view-layout-grid">
1871
- <div class="example-container col-2">
1872
- <div class="box"><span>1</span></div>
1873
- <div class="box"><span>2</span></div>
1874
- <div class="box"><span>3</span></div>
1875
- <div class="box"><span>4</span></div>
1876
- <div class="box"><span>5</span></div>
1877
- <div class="box"><span>6</span></div>
1878
- <div class="box"><span>7</span></div>
1879
- <div class="box"><span>8</span></div>
1880
- <div class="box"><span>9</span></div>
1881
- </div>
1882
- </div>
1883
- </div>
1884
- </div>
1885
- </td>
1886
- <?php
1887
- }
1888
-
1889
- private function render_field_background() { ?>
1890
- <td>
1891
- <div class="section-radios background-section">
1892
- <div class="radio-buttons">
1893
- <ul class="radio-list background-list">
1894
- <li>
1895
- <input type="radio" id="bg-none" name="view[data][background][type]" value="" <?php checked( $this->view['background']['type'], '' ); ?>>
1896
- <label for="bg-none"><?php esc_html_e( 'inherit from theme', 'strong-testimonials' ); ?></label>
1897
- </li>
1898
- <li>
1899
- <input type="radio" id="bg-single" name="view[data][background][type]" value="single" <?php checked( $this->view['background']['type'], 'single' ); ?>>
1900
- <label for="bg-single"><?php esc_html_e( 'single color', 'strong-testimonials' ); ?></label>
1901
- </li>
1902
- <li>
1903
- <input type="radio" id="bg-gradient" name="view[data][background][type]" value="gradient" <?php checked( $this->view['background']['type'], 'gradient' ); ?>>
1904
- <label for="bg-gradient"><?php esc_html_e( 'gradient', 'strong-testimonials' ); ?></label>
1905
- </li>
1906
- <li>
1907
- <input type="radio" id="bg-preset" name="view[data][background][type]" value="preset" <?php checked( $this->view['background']['type'], 'preset' ); ?>>
1908
- <label for="bg-preset"><?php esc_html_e( 'preset', 'strong-testimonials' ); ?></label>
1909
- </li>
1910
- </ul>
1911
- </div>
1912
- <div class="radio-description" id="view-background-info">
1913
- <div class="background-description bg-none">
1914
- <div class="description-inner options">
1915
- <div>
1916
- <?php esc_html_e( 'No options', 'strong-testimonials' ); ?>
1917
- </div>
1918
- </div>
1919
- </div>
1920
- <div class="background-description bg-single">
1921
- <div class="description-inner options">
1922
- <div>
1923
- <label>
1924
- <input type="text" id="bg-color" name="view[data][background][color]" value="<?php echo esc_attr($this->view['background']['color']); ?>" class="wp-color-picker-field">
1925
- </label>
1926
- </div>
1927
- </div>
1928
- </div>
1929
- <div class="background-description bg-gradient">
1930
- <div class="description-inner options">
1931
- <div>
1932
- <div class="color-picker-wrap">
1933
- <div><label for="bg-gradient1"><?php esc_html_e( 'From top', 'strong-testimonials' ); ?></label></div>
1934
- <div><input type="text" id="bg-gradient1" name="view[data][background][gradient1]" value="<?php echo esc_attr($this->view['background']['gradient1']); ?>" class="wp-color-picker-field gradient"></div>
1935
- </div>
1936
- </div>
1937
- </div>
1938
- <div class="description-inner options">
1939
- <div>
1940
- <div class="color-picker-wrap">
1941
- <div><label for ="bg-gradient2"><?php esc_html_e( 'To bottom', 'strong-testimonials' ); ?></label></div>
1942
- <div><input type="text" id="bg-gradient2" name="view[data][background][gradient2]" value="<?php echo esc_attr($this->view['background']['gradient2']); ?>" class="wp-color-picker-field gradient"></div>
1943
- </div>
1944
- </div>
1945
- </div>
1946
- </div>
1947
-
1948
- <div class="background-description bg-preset">
1949
- <div class="description-inner options">
1950
- <div>
1951
- <label for="view-background-preset">
1952
- <select id="view-background-preset" name="view[data][background][preset]">
1953
- <?php
1954
- $presets = wpmtst_get_background_presets();
1955
- $current_preset = ( isset( $this->view['background']['preset'] ) && $this->view['background']['preset'] ) ? $this->view['background']['preset'] : '';
1956
- echo '<option value="" ' . selected( $current_preset, '', false ) . '>&mdash;</option>';
1957
- foreach ( $presets as $key => $preset ) {
1958
- echo '<option value="' . esc_attr($key) . '" ' . selected( $current_preset, $key, false ) . '>' . esc_html($preset['label']) . '</option>';
1959
- }
1960
- ?>
1961
- </select>
1962
- </label>
1963
- </div>
1964
- </div>
1965
- </div>
1966
- </div>
1967
- </div>
1968
- </td>
1969
-
1970
- <td rowspan="2" class="rowspan">
1971
- <div id="view-color-preview" class="table-cell">
1972
- <div class="background-preview-wrap">
1973
- <div id="background-preview">
1974
- Lorem ipsum dolor sit amet, accusam complectitur an eos. No vix perpetua adolescens, vix vidisse maiorum
1975
- in. No erat falli scripta qui, vis ubique scripta electram ad. Vix prompta adipisci no, ad vidisse
1976
- expetendis.
1977
- </div>
1978
- </div>
1979
- </div>
1980
- </td>
1981
- <?php
1982
- }
1983
-
1984
- private function render_field_color() { ?>
1985
- <td>
1986
- <div class="section-radios font-color-section">
1987
- <div class="radio-buttons">
1988
- <ul class="radio-list font-folor-list">
1989
- <li>
1990
- <input type="radio" id="fc-none" name="view[data][font-color][type]" value="" <?php checked( $this->view['font-color']['type'], '' ); ?>>
1991
- <label for="fc-none"><?php esc_html_e( 'inherit from theme', 'strong-testimonials' ); ?></label>
1992
- </li>
1993
- <li>
1994
- <input type="radio" id="fc-custom" name="view[data][font-color][type]" value="custom" <?php checked( $this->view['font-color']['type'], 'custom' ); ?>>
1995
- <label for="fc-custom"><?php esc_html_e( 'custom', 'strong-testimonials' ); ?></label>
1996
- </li>
1997
- </ul>
1998
- </div>
1999
- <div class="radio-description" id="view-font-color-info">
2000
- <div class="font-color-description fc-none">
2001
- <div class="description-inner options">
2002
- <div><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></div>
2003
- </div>
2004
- </div>
2005
- <div class="font-color-description fc-custom">
2006
- <div class="description-inner options">
2007
- <div>
2008
- <label>
2009
- <input type="text" id="fc-color" name="view[data][font-color][color]" value="<?php echo esc_attr($this->view['font-color']['color']); ?>" class="wp-color-picker-field">
2010
- </label>
2011
- </div>
2012
- </div>
2013
- </div>
2014
- </div>
2015
- </div>
2016
- </td>
2017
- <?php
2018
- }
2019
-
2020
- private function render_field_classes() { ?>
2021
- <td colspan="2">
2022
- <div class="then then_display then_form then_slideshow input" style="display: none;">
2023
- <input type="text" id="view-class" class="long inline" name="view[data][class]" value="<?php echo esc_attr($this->view['class']); ?>">
2024
- <p class="inline description tall">
2025
- <?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?>
2026
- <?php esc_html_e( 'Separate class names by spaces.', 'strong-testimonials' ); ?>
2027
- </p>
2028
- </div>
2029
- </td>
2030
- <?php
2031
- }
2032
-
2033
- private function render_field_divi() { ?>
2034
- <td>
2035
- <div class="row">
2036
- <div class="row-inner">
2037
- <input type="checkbox" id="view-divi_builder" class="if toggle checkbox" name="view[data][divi_builder]" value="1" <?php checked( $this->view['divi_builder'] ); ?>/>
2038
- <label for="view-divi_builder"><?php esc_html_e( 'Check this if adding this view (via shortcode or widget) using the Visual Builder in <b>Divi Builder version 2</b>.', 'strong-testimonials' ); ?></label>
2039
- <p class="description short"><?php esc_html_e( 'Not required if simply adding this view in the default editor.', 'strong-testimonials' ); ?></p>
2040
- <p class="description short"><?php esc_html_e( 'Not required if simply adding this view in the <b>Divi theme</b> using either the default editor or Divi Builder.', 'strong-testimonials' ); ?></p>
2041
- </div>
2042
- </div>
2043
- </td>
2044
- <?php
2045
- }
2046
  }
1
  <?php
2
+
3
  /**
4
  * Class Strong_Testimonials_Helper
5
  *
6
  * @since 2.5
7
  */
8
  class Strong_Testimonials_Helper {
9
+
10
+ /**
11
+ * Our Class variables
12
+ *
13
+ * @since 2.51.5
14
+ */
15
+ public $field;
16
+ public $action;
17
+ public $view_id;
18
+ public $view_options;
19
+ public $cat_count = false;
20
+ public $show_section;
21
+ public $view;
22
+ public $view_name;
23
+ public $view_cats_array;
24
+ public $sections;
25
+ public $current_mode;
26
+ public $current_type;
27
+ public $isSetting;
28
+
29
+ /**
30
+ * Strong_Testimonials_Helper constructor.
31
+ *
32
+ * @since 2.51.5
33
+ */
34
+ public function __construct() {
35
+
36
+ $this->action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
37
+ $this->view_id = abs( filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT ) );
38
+ $this->view_options = apply_filters( 'wpmtst_view_options', get_option( 'wpmtst_view_options' ) );
39
+ $this->cat_count = wpmtst_get_cat_count();
40
  }
41
+
42
+ /**
43
+ * Set Strong Testimonial view
44
+ *
45
+ * @since 2.51.5
46
+ */
47
+ public function set_view() {
48
+
49
+ $this->view = $this->get_view();
50
+ $this->show_section = apply_filters( 'wpmtst_show_section', $this->view['mode'] );
51
+ if ( 'edit' == $this->action ) {
52
+ $view_array = wpmtst_get_view( $this->view_id );
53
+ $this->view = unserialize( $view_array['value'] );
54
+ $this->view_name = $view_array['name'];
55
+ } elseif ( 'duplicate' == $this->action ) {
56
+ $view_array = wpmtst_get_view( $this->view_id );
57
+ $this->view = unserialize( $view_array['value'] );
58
+ $this->view_id = 0;
59
+ $this->view_name = $view_array['name'] . ' - COPY';
60
+ } else {
61
+ $this->view_id = 1;
62
+ $this->view = wpmtst_get_view_default();
63
+ $this->view_name = 'new';
64
+ }
65
+ $this->view_cats_array = apply_filters( 'wpmtst_l10n_cats', explode( ',', $this->view['category'] ) );
66
+ $this->sections = $this->get_sections();
67
+ }
68
+
69
+ /**
70
+ * Get Strong Testimonial view
71
+ *
72
+ * @return array|mixed
73
+ *
74
+ * @since 2.51.5
75
+ */
76
+ public static function get_view() {
77
+
78
+ $view = wpmtst_get_view_default();
79
+ if ( isset( $_REQUEST['action'] ) ) {
80
+ $action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
81
+ $id = abs( filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT ) );
82
+ if ( 'edit' == $action || 'duplicate' == $action ) {
83
+ $view_array = wpmtst_get_view( $id );
84
+ if ( isset( $view_array['value'] ) ) {
85
+ $view = unserialize( $view_array['value'] );
86
+ }
87
+ }
88
+ }
89
+
90
+ return $view;
91
+ }
92
+
93
+ /**
94
+ * Get Strong Testimonials sections
95
+ *
96
+ * @return mixed|void
97
+ *
98
+ * @since 2.51.5
99
+ */
100
+ public function get_sections() {
101
+ return apply_filters( 'wpmtst_view_sections', array(
102
+ 'query' => array(
103
+ 'section_action_before' => 'wpmtst_view_editor_before_group_select',
104
+ 'section_action_after' => 'wpmtst_view_editor_after_group_select',
105
+ 'fields_action_before' => '',
106
+ 'fields_action_after' => array(
107
+ 'action' => 'wpmtst_views_group_query',
108
+ 'param' => $this->view
109
+ ),
110
+ 'classes' => array(
111
+ 'then',
112
+ 'then_display',
113
+ 'then_not_form',
114
+ 'then_slideshow',
115
+ 'then_not_single_template'
116
+ ),
117
+ 'title' => esc_html__( 'Query', 'strong-testimonials' ),
118
+ 'table_classes' => 'form-table multiple group-select',
119
+ 'subheading' => array(
120
+ array(
121
+ 'title' => esc_html__( 'Option', 'strong-testimonials' ),
122
+ 'classes' => '',
123
+ 'colspan' => 1,
124
+ 'after' => ''
125
+ ),
126
+ array(
127
+ 'title' => esc_html__( 'Settings', 'strong-testimonials' ),
128
+ 'classes' => '',
129
+ 'colspan' => 1,
130
+ 'after' => ''
131
+ ),
132
+ array(
133
+ 'title' => esc_html__( 'or Shortcode Attribute', 'strong-testimonials' ),
134
+ 'classes' => 'divider',
135
+ 'colspan' => 2,
136
+ 'after' => '<span class="help-links"><span class="description"><a href="#tab-panel-wpmtst-help-shortcode" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a></span></span>'
137
+ ),
138
+ array(
139
+ 'title' => esc_html__( 'Example', 'strong-testimonials' ),
140
+ 'classes' => '',
141
+ 'colspan' => 1,
142
+ 'after' => ''
143
+ )
144
+ ),
145
+ 'fields' => array(
146
+ 'field_select' => array(
147
+ 'label' => esc_html_x( 'Select', 'verb', 'strong-testimonials' ),
148
+ 'type' => 'select',
149
+ 'before' => '',
150
+ 'after' => '',
151
+ 'class' => 'view-single_or_multiple',
152
+ 'container_classes' => 'then then_display then_slideshow then_not_form',
153
+ 'id' => '',
154
+ 'field_action_before' => '',
155
+ 'field_action_after' => ''
156
+ ),
157
+ 'field_category' => array(
158
+ 'label' => esc_html__( 'Categories', 'strong-testimonials' ),
159
+ 'type' => 'category',
160
+ 'before' => '',
161
+ 'after' => '',
162
+ 'class' => 'view-category-select',
163
+ 'container_classes' => 'then then_display then_slideshow then_not_form',
164
+ 'id' => '',
165
+ 'field_action_before' => '',
166
+ 'field_action_after' => ''
167
+ ),
168
+ 'field_order' => array(
169
+ 'label' => esc_html_x( 'Order', 'noun', 'strong-testimonials' ),
170
+ 'type' => 'order',
171
+ 'before' => '',
172
+ 'after' => '',
173
+ 'class' => 'view-order',
174
+ 'container_classes' => 'then then_display then_slideshow then_not_form',
175
+ 'id' => '',
176
+ 'field_action_before' => '',
177
+ 'field_action_after' => ''
178
+ ),
179
+ 'field_limit' => array(
180
+ 'label' => esc_html__( 'Quantity', 'strong-testimonials' ),
181
+ 'type' => 'limit',
182
+ 'before' => '',
183
+ 'after' => '',
184
+ 'class' => 'view-all',
185
+ 'container_classes' => 'then then_display then_slideshow then_not_form',
186
+ 'id' => '',
187
+ 'field_action_before' => '',
188
+ 'field_action_after' => ''
189
+ )
190
+ )
191
+ ),
192
+ 'fields' => array(
193
+ 'section_action_before' => 'wpmtst_view_editor_before_group_fields',
194
+ 'section_action_after' => '',
195
+ 'fields_action_before' => '',
196
+ 'fields_action_after' => '',
197
+ 'classes' => array(
198
+ 'then',
199
+ 'then_display',
200
+ 'then_not_form',
201
+ 'then_slideshow',
202
+ 'then_single_template'
203
+ ),
204
+ 'title' => esc_html__( 'Fields', 'strong-testimonials' ),
205
+ 'table_classes' => 'form-table multiple group-show',
206
+ 'fields' => array(
207
+ 'field_title' => array(
208
+ 'label' => esc_html__( ' Title', 'strong-testimonials' ),
209
+ 'type' => 'title',
210
+ 'before' => '<input type="checkbox" id="view-title" name="view[data][title]" value="1"' . checked( $this->view['title'], true, false ) . ' class="checkbox if toggle">',
211
+ 'after' => '',
212
+ 'class' => 'view-title',
213
+ 'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
214
+ 'id' => '',
215
+ 'field_action_before' => '',
216
+ 'field_action_after' => ''
217
+ ),
218
+ 'field_thumbnail' => array(
219
+ 'label' => esc_html__( ' Featured Image', 'strong-testimonials' ),
220
+ 'type' => 'thumbnail',
221
+ 'before' => '<input type="checkbox" id="view-images" class="checkbox if toggle" name="view[data][thumbnail]" value="1"' . checked( $this->view['thumbnail'], true, false ) . '>',
222
+ 'after' => '',
223
+ 'class' => 'view-images',
224
+ 'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
225
+ 'id' => '',
226
+ 'field_action_before' => '',
227
+ 'field_action_after' => ''
228
+ ),
229
+ 'field_content' => array(
230
+ 'label' => esc_html__( ' Content', 'strong-testimonials' ),
231
+ 'type' => 'content',
232
+ 'before' => '',
233
+ 'after' => '',
234
+ 'class' => 'view-content',
235
+ 'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
236
+ 'id' => '',
237
+ 'field_action_before' => '',
238
+ 'field_action_after' => ''
239
+ ),
240
+ 'field_client_section' => array(
241
+ 'include' => 'option-client-section.php',
242
+ 'label' => esc_html__( ' Custom Fields', 'strong-testimonials' ),
243
+ 'type' => 'client-section',
244
+ 'before' => '',
245
+ 'after' => '',
246
+ 'class' => '',
247
+ 'container_classes' => 'then then_display then_not_form then_slideshow then_single_template',
248
+ 'id' => '',
249
+ 'field_action_before' => '',
250
+ 'field_action_after' => ''
251
+ )
252
+ )
253
+ ),
254
+
255
+ 'extra' => array(
256
+ 'section_action_before' => 'wpmtst_view_editor_before_group_extra',
257
+ 'section_action_after' => '',
258
+ 'fields_action_before' => '',
259
+ 'fields_action_after' => '',
260
+ 'classes' => array(
261
+ 'then',
262
+ 'then_display',
263
+ 'then_not_form',
264
+ 'then_slideshow',
265
+ 'then_not_single_template'
266
+ ),
267
+ 'title' => esc_html__( 'Extra', 'strong-testimonials' ),
268
+ 'table_classes' => 'form-table multiple group-layout',
269
+ 'fields' => array(
270
+ 'field_pagination' => array(
271
+ 'label' => esc_html__( ' Pagination', 'strong-testimonials' ),
272
+ 'type' => 'pagination',
273
+ 'before' => '<input class="if toggle checkbox" id="view-pagination" name="view[data][pagination]" type="checkbox" value="1"' . checked( $this->view['pagination'], true, false ) . '/>',
274
+ 'after' => '',
275
+ 'class' => 'view-pagination',
276
+ 'container_classes' => 'then then_display then_not_form then_not_slideshow then_not_single then_multiple',
277
+ 'id' => '',
278
+ 'field_action_before' => '',
279
+ 'field_action_after' => ''
280
+ ),
281
+ 'field_read_more' => array(
282
+ 'include' => 'option-read-more-page.php',
283
+ 'label' => esc_html__( ' "Read more" link to a page or post', 'strong-testimonials' ),
284
+ 'type' => 'read-more-page',
285
+ 'before' => '<div class="checkbox"><input type="checkbox" id="view-more_page" class="if toggle" name="view[data][more_page]" value="1"' . checked( isset( $this->view['more_page'] ) && $this->view['more_page'], true, false ) . ' class="checkbox">',
286
+ 'after' => '</div>',
287
+ 'class' => 'view-more_page',
288
+ 'container_classes' => 'then then_display then_not_form then_slideshow read-more',
289
+ 'id' => '',
290
+ 'field_action_before' => '',
291
+ 'field_action_after' => ''
292
+ ),
293
+ )
294
+ ),
295
+ 'slideshow' => array(
296
+ 'section_action_before' => 'wpmtst_view_editor_before_group_slideshow',
297
+ 'section_action_after' => '',
298
+ 'fields_action_before' => '',
299
+ 'fields_action_after' => '',
300
+ 'classes' => array(
301
+ 'then',
302
+ 'then_not_display',
303
+ 'then_not_form',
304
+ 'then_slideshow',
305
+ 'then_not_single_template'
306
+ ),
307
+ 'title' => esc_html__( 'Slideshow', 'strong-testimonials' ),
308
+ 'table_classes' => 'form-table multiple group-select',
309
+ 'fields' => array(
310
+ 'field_slideshow_num' => array(
311
+ 'label' => esc_html__( 'Show', 'strong-testimonials' ),
312
+ 'type' => 'slideshow-num',
313
+ 'before' => '',
314
+ 'after' => '',
315
+ 'class' => '',
316
+ 'container_classes' => 'then then_slideshow',
317
+ 'id' => '',
318
+ 'field_action_before' => '',
319
+ 'field_action_after' => ''
320
+ ),
321
+ 'field_slideshow_transition' => array(
322
+ 'include' => 'option-slideshow-transition.php',
323
+ 'label' => esc_html__( 'Transition', 'strong-testimonials' ),
324
+ 'type' => 'slideshow-transition',
325
+ 'before' => '',
326
+ 'after' => '',
327
+ 'class' => '',
328
+ 'container_classes' => 'then then_slideshow',
329
+ 'id' => '',
330
+ 'field_action_before' => '',
331
+ 'field_action_after' => ''
332
+ ),
333
+ 'field_slideshow_behavior' => array(
334
+ 'label' => esc_html__( 'Behavior', 'strong-testimonials' ),
335
+ 'type' => 'slideshow-behavior',
336
+ 'before' => '',
337
+ 'after' => '',
338
+ 'class' => '',
339
+ 'container_classes' => 'then then_slideshow',
340
+ 'id' => '',
341
+ 'field_action_before' => '',
342
+ 'field_action_after' => ''
343
+ ),
344
+ 'field_slideshow_navigation' => array(
345
+ 'label' => esc_html__( 'Navigation', 'strong-testimonials' ),
346
+ 'type' => 'slideshow-navigation',
347
+ 'before' => '',
348
+ 'after' => '',
349
+ 'class' => 'view-slideshow_nav',
350
+ 'container_classes' => 'then then_slideshow',
351
+ 'id' => '',
352
+ 'field_action_before' => '',
353
+ 'field_action_after' => ''
354
+ )
355
+ )
356
+ ),
357
+
358
+ 'form' => array(
359
+ 'section_action_before' => 'wpmtst_view_editor_before_group_form',
360
+ 'section_action_after' => '',
361
+ 'fields_action_before' => '',
362
+ 'fields_action_after' => '',
363
+ 'classes' => array(
364
+ 'then',
365
+ 'then_not_display',
366
+ 'then_not_slideshow',
367
+ 'then_form',
368
+ 'then_not_single_template'
369
+ ),
370
+ 'title' => esc_html__( 'Actions', 'strong-testimonials' ),
371
+ 'table_classes' => 'form-table multiple group-select',
372
+ 'fields' => array(
373
+ 'field_form_category' => array(
374
+ 'label' => esc_html__( 'Assign to a category', 'strong-testimonials' ),
375
+ 'type' => 'form-category',
376
+ 'before' => '',
377
+ 'after' => '',
378
+ 'class' => '',
379
+ 'container_classes' => 'then then_form',
380
+ 'id' => '',
381
+ 'field_action_before' => '',
382
+ 'field_action_after' => ''
383
+ ),
384
+ 'field_form_ajax' => array(
385
+ 'label' => esc_html__( ' Submit form without reloading the page (Ajax)', 'strong-testimonials' ),
386
+ 'type' => 'form-ajax',
387
+ 'before' => '<input type="checkbox" id="view-form_ajax" class="checkbox if toggle" name="view[data][form_ajax]" value="1"' . checked( $this->view['form_ajax'], true, false ) . '>',
388
+ 'after' => '',
389
+ 'class' => 'view-form_ajax',
390
+ 'container_classes' => 'then then_form',
391
+ 'id' => '',
392
+ 'field_action_before' => '',
393
+ 'field_action_after' => ''
394
+ ),
395
+ )
396
+ ),
397
+
398
+ 'style' => array(
399
+ 'section_action_before' => 'wpmtst_view_editor_before_group_style',
400
+ 'section_action_after' => 'wpmtst_after_style_view_section',
401
+ 'fields_action_before' => '',
402
+ 'fields_action_after' => array(
403
+ 'action' => 'wpmtst_view_editor_after_style_section',
404
+ 'param' => ''
405
+ ),
406
+ 'classes' => array(
407
+ 'then',
408
+ 'then_display',
409
+ 'then_form',
410
+ 'then_slideshow',
411
+ 'then_not_single_template'
412
+ ),
413
+ 'title' => esc_html__( 'Style', 'strong-testimonials' ),
414
+ 'table_classes' => 'form-table multiple group-style',
415
+ 'fields' => array(
416
+ 'field_template_list_display' => array(
417
+ 'label' => esc_html__( 'Template', 'strong-testimonials' ),
418
+ 'type' => 'template-list-display',
419
+ 'before' => '',
420
+ 'after' => '',
421
+ 'class' => '',
422
+ 'container_classes' => 'then then_display then_not_form then_slideshow',
423
+ 'id' => '',
424
+ 'field_action_before' => 'wpmtst_view_editor_before_template_list',
425
+ 'field_action_after' => ''
426
+ ),
427
+ 'field_template_list_form' => array(
428
+ 'label' => esc_html__( 'Template', 'strong-testimonials' ),
429
+ 'type' => 'template-list-form',
430
+ 'before' => '',
431
+ 'after' => '',
432
+ 'class' => '',
433
+ 'container_classes' => 'then then_not_display then_form then_not_slideshow',
434
+ 'id' => '',
435
+ 'field_action_before' => '',
436
+ 'field_action_after' => ''
437
+ ),
438
+ 'field_option_layout' => array(
439
+ 'include' => 'option-layout.php',
440
+ 'label' => esc_html__( 'Layout', 'strong-testimonials' ),
441
+ 'type' => 'layout',
442
+ 'before' => '',
443
+ 'after' => '',
444
+ 'class' => '',
445
+ 'container_classes' => 'then then_display then_not_form then_not_slideshow',
446
+ 'id' => '',
447
+ 'field_action_before' => 'wpmtst_view_editor_before_layout',
448
+ 'field_action_after' => ''
449
+ ),
450
+ 'field_background' => array(
451
+ 'label' => esc_html__( 'Background', 'strong-testimonials' ),
452
+ 'type' => 'background',
453
+ 'before' => '',
454
+ 'after' => '',
455
+ 'class' => '',
456
+ 'id' => 'group-style-option-background',
457
+ 'container_classes' => 'then then_display then_form then_slideshow',
458
+ 'field_action_before' => 'wpmtst_view_editor_before_background',
459
+ 'field_action_after' => ''
460
+ ),
461
+ 'field_color' => array(
462
+ 'label' => esc_html__( 'Font Color', 'strong-testimonials' ),
463
+ 'type' => 'color',
464
+ 'before' => '',
465
+ 'after' => '',
466
+ 'class' => '',
467
+ 'id' => 'group-style-option-color',
468
+ 'container_classes' => 'then then_display then_form then_slideshow',
469
+ 'field_action_before' => '',
470
+ 'field_action_after' => ''
471
+ ),
472
+ 'field_classes' => array(
473
+ 'label' => esc_html__( 'CSS Classes', 'strong-testimonials' ),
474
+ 'type' => 'classes',
475
+ 'before' => '',
476
+ 'after' => '',
477
+ 'class' => 'view-class',
478
+ 'id' => '',
479
+ 'container_classes' => 'then then_display then_form then_slideshow',
480
+ 'field_action_before' => 'wpmtst_view_editor_before_classes',
481
+ 'field_action_after' => ''
482
+ ),
483
+ )
484
+ ),
485
+
486
+ 'compat' => array(
487
+ 'section_action_before' => 'wpmtst_view_editor_before_group_compat',
488
+ 'section_action_after' => '',
489
+ 'fields_action_before' => '',
490
+ 'fields_action_after' => '',
491
+ 'classes' => array( 'then' ),
492
+ 'title' => esc_html__( 'Compatibility', 'strong-testimonials' ),
493
+ 'table_classes' => 'form-table multiple group-general',
494
+ 'fields' => array(
495
+ 'field_divi_builder' => array(
496
+ 'label' => esc_html__( 'Divi Builder', 'strong-testimonials' ),
497
+ 'type' => 'divi',
498
+ 'before' => '',
499
+ 'after' => '',
500
+ 'class' => 'view-divi_builder',
501
+ 'container_classes' => 'then then_display then_form then_slideshow then_not_single_template',
502
+ 'id' => '',
503
+ 'field_action_before' => '',
504
+ 'field_action_after' => ''
505
+ ),
506
+ )
507
+ ),
508
+ ) );
509
+ }
510
+
511
+ /**
512
+ * Render Strong Testimonials form
513
+ *
514
+ * @since 2.51.5
515
+ */
516
+ public function render_form() {
517
+
518
+ $actions = array( 'edit', 'duplicate', 'add' );
519
+
520
+ if ( ! in_array( $this->action, $actions ) ) {
521
+ wp_die( esc_html__( 'Invalid request. Please try again.', 'strong-testimonials' ) );
522
+ }
523
+
524
+ if ( ( 'edit' == $this->action || 'duplicate' == $this->action ) && ! $this->view_id ) {
525
+ return;
526
+ }
527
+
528
+ $this->set_view();
529
+ add_thickbox();
530
+
531
+ // @todo: these don't seem to be used anywhere
532
+ $fields = wpmtst_get_custom_fields();
533
+ $all_fields = wpmtst_get_all_fields();
534
+
535
+ /**
536
+ * Show category filter if necessary.
537
+ *
538
+ * @since 2.2.0
539
+ */
540
+ if ( $this->cat_count > 5 ) {
541
+ wp_enqueue_script( 'wpmtst-view-category-filter-script' );
542
+ }
543
+
544
+ // Select default template if necessary
545
+ if ( ! $this->view['template'] ) {
546
+ if ( 'form' == $this->view['mode'] ) {
547
+ $this->view['template'] = 'default-form';
548
+ } else {
549
+ $this->view['template'] = 'default';
550
+ }
551
+ }
552
+
553
+ // Get urls
554
+ $url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' );
555
+ $url1 = $url . '&action=add';
556
+ $url2 = $url . '&action=duplicate&id=' . $this->view_id;
557
+
558
+ ?>
559
+ <h1>
560
+ <?php 'edit' == $this->action ? esc_html_e( 'Edit View', 'strong-testimonials' ) : esc_html_e( 'Add View', 'strong-testimonials' ); ?>
561
+ <a href="<?php echo esc_url( $url1 ); ?>"
562
+ class="add-new-h2"><?php esc_html_e( 'Add New', 'strong-testimonials' ); ?></a>
563
+ <a href="<?php echo esc_url( $url ); ?>"
564
+ class="add-new-h2"><?php esc_html_e( 'Return To List', 'strong-testimonials' ); ?></a>
565
+ <?php if ( 'edit' == $this->action ) : ?>
566
+ <a href="<?php echo esc_url( $url2 ); ?>"
567
+ class="add-new-h2"><?php esc_html_e( 'Duplicate This View', 'strong-testimonials' ); ?></a>
568
+ <?php endif; ?>
569
+ </h1>
570
+
571
+ <form id="wpmtst-views-form" method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>"
572
+ autocomplete="off" enctype="multipart/form-data">
573
+ <?php wp_nonce_field( 'view_form_submit', 'view_form_nonce', true, true ); ?>
574
+
575
+ <input type="hidden" name="action" value="view_<?php echo esc_attr( $this->action ); ?>_form">
576
+ <input type="hidden" name="view[id]" value="<?php echo esc_attr( $this->view_id ); ?>">
577
+ <input type="hidden" name="view_original_mode" value="<?php echo esc_attr( $this->view['mode'] ); ?>">
578
+ <input type="hidden" name="view[data][_form_id]" value="<?php echo esc_attr( $this->view['form_id'] ); ?>">
579
+
580
+ <div class="table view-info">
581
+ <?php $this->render_info(); ?>
582
+ </div>
583
+
584
+ <?php $this->render_sections(); ?>
585
+
586
+ <p class="wpmtst-submit">
587
+ <?php submit_button( '', 'primary', 'submit-form', false ); ?>
588
+ <?php submit_button( esc_html__( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?>
589
+ <?php submit_button( esc_html__( 'Restore Defaults', 'strong-testimonials' ), 'secondary', 'restore-defaults', false ); ?>
590
+ </p>
591
+ </form>
592
+ <?php
593
  }
 
 
 
 
594
 
595
+ /**
596
+ * Render Strong Testimonials view info
597
+ *
598
+ * @since 2.51.5
599
+ */
600
+ private function render_info() {
601
+
602
+ if ( 'edit' == $this->action ) {
603
+ $shortcode = '<div class="saved">';
604
+ $shortcode .= '<input id="view-shortcode" type="text" value="[testimonial_view id=&quot;' . esc_attr( $this->view_id ) . '&quot;]" readonly />';
605
+ $shortcode .= '<input id="copy-shortcode" class="button small" type="button" value="' . esc_attr__( 'copy to clipboard', 'strong-testimonials' ) . '" data-copytarget="#view-shortcode" />';
606
+ $shortcode .= '<span id="copy-message">' . esc_html__( 'copied', 'strong-testimonials' ) . '</span>';
607
+ $shortcode .= '</div>';
608
+ } else {
609
+ $shortcode = '<div class="unsaved">' . esc_html_x( 'will be available after you save this', 'The shortcode for a new View.', 'strong-testimonials' ) . '</div>';
610
+ }
611
+
612
+ $classes = array(
613
+ 'then',
614
+ 'then_display',
615
+ 'then_form',
616
+ 'then_slideshow',
617
+ 'then_not_single_template',
618
+ apply_filters( 'wpmtst_view_section', '', 'shortcode' ),
619
+ ); ?>
620
+
621
+ <div class="table-row form-view-name">
622
+ <div class="table-cell">
623
+ <label for="view-name">
624
+ <?php esc_html_e( 'Name', 'strong-testimonials' ); ?>
625
+ </label>
626
+ </div>
627
+ <div class="table-cell">
628
+ <input type="text" id="view-name" class="view-name" name="view[name]"
629
+ value="<?php echo esc_attr( htmlspecialchars( stripslashes( $this->view_name ) ) ); ?>"
630
+ tabindex="1">
631
+ </div>
632
+ </div>
633
+
634
+ <div class="table-row form-view-shortcode <?php echo esc_attr( implode( ' ', array_filter( $classes ) ) ); ?>">
635
+ <div class="table-cell">
636
+ <label for="view-shortcode"><?php esc_html_e( 'Shortcode', 'strong-testimonials' ); ?></label>
637
+ </div>
638
+ <div class="table-cell">
639
+ <?php echo $shortcode; ?>
640
+ </div>
641
+ </div>
642
+
643
+ <div id="view-mode" class="table-row mode-select">
644
+ <div class="table-cell">
645
+ <?php esc_html_e( 'Mode', 'strong-testimonials' ); ?>
646
+ </div>
647
+ <div class="table-cell">
648
+ <div class="mode-list">
649
+ <?php foreach ( $this->view_options['mode'] as $mode ) : ?>
650
+ <label>
651
+ <input id="<?php echo esc_attr( $mode['name'] ); ?>" type="radio" name="view[data][mode]"
652
+ value="<?php echo esc_attr( $mode['name'] ); ?>" <?php checked( $this->view['mode'], $mode['name'] ); ?>>
653
+ <?php echo esc_html( $mode['label'] ); ?>
654
+ <div class="mode-line"></div>
655
+ </label>
656
+ <?php endforeach; ?>
657
+ </div>
658
+ <div class="mode-description"></div>
659
+ </div>
660
+ </div><?php
661
+ }
662
 
663
  /**
664
+ * Render Strong Testimonials view sections
665
  *
666
+ * @since 2.51.5
667
  */
668
+ private function render_sections() {
669
+
670
+ // @todo: check what `$show_section = apply_filters('wpmtst_show_section', $this->view['mode']);` does
671
+ // @todo: seems like the same filter is used above for $this->show_sections
672
+ $show_section = apply_filters( 'wpmtst_show_section', $this->view['mode'] );
673
+ foreach ( $this->sections as $name => $section ) {
674
+ if ( ! empty( $section['section_action_before'] ) ) {
675
+ do_action( $section['section_action_before'] );
676
+ }
677
+
678
+ $this->render_section( $name, $section );
679
+
680
+ if ( ! empty( $section['section_action_after'] ) ) {
681
+ do_action( $section['section_action_after'] );
682
+ }
683
+ }
684
+
685
+ do_action( 'wpmtst_view_editor_before_group_general' );
686
+ do_action( 'wpmtst_view_editor_after_groups' );
687
  }
688
+
689
+ /**
690
+ * Render Strong Testimonial section
691
+ *
692
+ * @param $name
693
+ * @param $section
694
+ *
695
+ * @since 2.51.5
696
+ */
697
+ public function render_section( $name, $section ) {
698
+
699
+ $section['classes'][] = apply_filters( 'wpmtst_view_section', '', $name ); ?>
700
+ <div class="<?php echo esc_attr( implode( ' ', array_filter( $section['classes'] ) ) ); ?>"
701
+ style="display:none">
702
+ <h3><?php echo esc_html( $section['title'] ) ?></h3>
703
+ <table class="<?php echo esc_attr( $section['table_classes'] ) ?>">
704
+
705
+ <?php if ( ! empty( $section['subheading'] ) ): ?>
706
+ <tr class="subheading">
707
+ <?php foreach ( $section['subheading'] as $subheading ): ?>
708
+ <td class="<?php echo esc_attr( $subheading['classes'] ) ?>"
709
+ colspan="<?php echo esc_attr( $subheading['colspan'] ) ?>">
710
+ <?php echo esc_html( $subheading['title'] ) ?>
711
+ <?php echo wp_kses_post( $subheading['after'] ) ?>
712
+ </td>
713
+ <?php endforeach; ?>
714
+ </tr>
715
+ <?php endif;
716
+
717
+ if ( ! empty( $section['fields'] ) ) {
718
+ if ( ! empty( $section['fields_action_before'] ) ) {
719
+ do_action( $section['fields_action_before']['action'], $section['fields_action_before']['param'] );
720
+ }
721
+ foreach ( $section['fields'] as $key => $field ) {
722
+ $this->set_field( $field );
723
+ if ( ! empty( $this->field['field_action_before'] ) ) {
724
+ do_action( $field['field_action_before'] );
725
+ } ?>
726
+ <tr id="<?php echo esc_attr( $this->field['id'] ) ?>"
727
+ class="<?php echo esc_attr( $this->field['container_classes'] ) ?>" style="display:none">
728
+ <?php $this->render_field() ?>
729
+ </tr>
730
+ <?php
731
+ if ( ! empty( $this->field['field_action_after'] ) ) {
732
+ do_action( $field['field_action_after'] );
733
+ }
734
+ }
735
+ if ( ! empty( $section['fields_action_after'] ) ) {
736
+ do_action( $section['fields_action_after']['action'], $section['fields_action_after']['param'] );
737
+ }
738
+ }
739
+ ?>
740
+ </table>
741
+ </div>
742
+ <?php
743
  }
744
 
745
+ /**
746
+ * Set Strong Testimonial field
747
+ *
748
+ * @param $field
749
+ *
750
+ * @since 2.51.5
751
+ */
752
+ public function set_field( $field ) {
753
+
754
+ $this->field = $field;
755
+ }
756
+
757
+ /**
758
+ * Set Strong Testimonial settings field
759
+ *
760
+ * @param $field
761
+ *
762
+ * @since 2.51.5
763
+ */
764
+ public function set_settings_field( $field ) {
765
+
766
+ $this->field = $field;
767
+ $this->isSetting = true;
768
+ }
769
+
770
+ /**
771
+ * Render Strong Testimonial field
772
+ *
773
+ * @since 2.51.5
774
+ */
775
+ public function render_field() { ?>
776
+
777
+ <th>
778
+ <?php echo wp_kses_post( $this->field['before'] ); ?>
779
+ <label for="<?php echo esc_attr( $this->field['class'] ) ?>"><?php echo wp_kses_post( $this->field['label'] ); ?></label>
780
+ <?php echo wp_kses_post( $this->field['after'] ); ?>
781
+ </th> <?php
782
+ switch ( $this->field['type'] ) {
783
+ case 'select':
784
+ $this->render_field_select();
785
+ break;
786
+ case 'category':
787
+ $this->render_field_category();
788
+ break;
789
+ case 'order':
790
+ $this->render_field_order();
791
+ break;
792
+ case 'limit':
793
+ $this->render_field_limit();
794
+ break;
795
+ case 'title':
796
+ $this->render_field_title();
797
+ break;
798
+ case 'thumbnail':
799
+ $this->render_field_thumbnail();
800
+ break;
801
+ case 'content':
802
+ $this->render_field_content();
803
+ break;
804
+ case 'client-section':
805
+ $this->render_field_client_section();
806
+ break;
807
+ case 'pagination':
808
+ $this->render_field_pagination();
809
+ break;
810
+ case 'read-more-page':
811
+ $this->render_field_read_more_page();
812
+ break;
813
+ case 'slideshow-num':
814
+ $this->render_field_slideshow_num();
815
+ break;
816
+ case 'slideshow-transition':
817
+ $this->render_field_slideshow_transition();
818
+ break;
819
+ case 'slideshow-behavior':
820
+ $this->render_field_slideshow_behavior();
821
+ break;
822
+ case 'slideshow-navigation':
823
+ $this->render_field_slideshow_navigation();
824
+ break;
825
+ case 'form-category':
826
+ $this->render_field_form_category();
827
+ break;
828
+ case 'form-ajax':
829
+ $this->render_field_form_ajax();
830
+ break;
831
+ case 'template-list-display':
832
+ $this->current_mode = 'template';
833
+ $this->current_type = 'display';
834
+ $this->render_field_template_list();
835
+ break;
836
+ case 'template-list-form':
837
+ $this->current_mode = 'form-template';
838
+ $this->current_type = 'form';
839
+ $this->render_field_template_list();
840
+ break;
841
+ case 'layout':
842
+ $this->render_field_layout();
843
+ break;
844
+ case 'background':
845
+ $this->render_field_background();
846
+ break;
847
+ case 'color':
848
+ $this->render_field_color();
849
+ break;
850
+ case 'classes':
851
+ $this->render_field_classes();
852
+ break;
853
+ case 'divi':
854
+ $this->render_field_divi();
855
+ break;
856
+ default:
857
+ do_action( 'wpmtst_render_field', $this->field );
858
+ }
859
+ }
860
+
861
+ /**
862
+ * Render ST select
863
+ *
864
+ * @param $input_name
865
+ * @param false $recommended
866
+ * @param string $title
867
+ *
868
+ * @since 2.51.5
869
+ */
870
+ public function render_option_select( $input_name, $recommended = false, $title = '' ) {
871
+
872
+ $selected = $this->field['selected'];
873
+
874
+ if ( $this->isSetting ) {
875
+ $selected = $this->field['selected_settings'];
876
+ }
877
+
878
+ if ( isset( $this->field['options'] ) && ! empty( $this->field['options'] ) ): ?>
879
+ <td>
880
+
881
+ <?php if ( ! empty( $title ) ): ?>
882
+ <h4 class="title"><?php esc_html_e( $title ); ?>
883
+ <h4>
884
+ <?php endif; ?>
885
+ <select id="<?php echo esc_attr( $this->field['class'] ) ?>"
886
+ name="<?php echo esc_attr( $input_name ); ?>">
887
+ <?php foreach ( $this->field['options'] as $option ): ?>
888
+ <option value="<?php echo esc_attr( $option ); ?>" <?php selected( $option, $selected ); ?>><?php esc_html_e( $option, 'strong-testimonials-review-markup' ); ?></option>
889
+ <?php endforeach; ?>
890
+ </select>
891
+ <?php if ( $recommended ): ?>
892
+ <p class="description"><strong
893
+ style="color: #00805e; font-style: normal;"><?php esc_html_e( 'Recommended.', 'strong-testimonials-review-markup' ) ?></strong>
894
+ <?php if ( is_string( $recommended ) ) {
895
+ echo esc_html( $recommended );
896
+ } ?>
897
+ </p>
898
+ <?php endif; ?>
899
+
900
+ </td>
901
+ <?php endif;
902
+ }
903
+
904
+ /**
905
+ * Render ST textfield
906
+ *
907
+ * @param $input_name
908
+ * @param false $recommended
909
+ * @param string $description
910
+ * @param string $title
911
+ * @param string $placeholder
912
+ *
913
+ * @SINCE 2.51.5
914
+ */
915
+ public function render_option_textfield( $input_name, $recommended = false, $description = '', $title = '', $placeholder = '' ) {
916
+
917
+ $value = $this->field['value'];
918
+
919
+ if ( $this->isSetting ) {
920
+ $value = $this->field['value_settings'];
921
+ } ?>
922
+
923
+ <td>
924
+ <?php if ( ! empty( $title ) ): ?>
925
+ <h4 class="title"><?php esc_html_e( $title ); ?>
926
+ <h4>
927
+ <?php endif; ?>
928
+
929
+ <div>
930
+ <div class="has-input">
931
+ <input class="regular-text" type="text" id="<?php echo esc_attr( $this->field['class'] ) ?>"
932
+ name="<?php echo esc_attr( $input_name ) ?>" value="<?php echo esc_attr( $value ) ?>"
933
+ data-default="<?php echo esc_attr( $this->field['default'] ) ?>"
934
+ placeholder="<?php echo esc_attr( $placeholder, 'strong-testimonials-review-markup' ) ?>">
935
+ </div>
936
+ <div class="error-message"></div>
937
+ </div>
938
+ <p class="description">
939
+
940
+ <?php if ( $recommended ): ?>
941
+ <strong style="color: #00805e; font-style: normal;"><?php esc_html_e( 'Recommended.', 'strong-testimonials-review-markup' ) ?></strong>
942
+ <?php endif; ?>
943
+
944
+ <?php if ( ! empty( $description ) ): ?>
945
+ <?php esc_html_e( $description, 'strong-testimonials-review-markup' ); ?>
946
+ <?php endif; ?>
947
+
948
+ </p>
949
+ </td>
950
+ <?php
951
+ }
952
+
953
+ /**
954
+ * Render ST select
955
+ *
956
+ * @since 2.51.5
957
+ */
958
+ private function render_field_select() {
959
+
960
+ $testimonials_list = get_posts( array(
961
+ 'orderby' => 'post_date',
962
+ 'order' => 'ASC',
963
+ 'post_type' => 'wpm-testimonial',
964
+ 'post_status' => 'publish',
965
+ 'posts_per_page' => - 1,
966
+ 'suppress_filters' => true,
967
+ ) ); ?>
968
+ <td>
969
+ <div class="row">
970
+ <div class="row-inner">
971
+ <select id="view-single_or_multiple" class="if selectper" name="view[data][select]">
972
+ <option value="multiple" <?php echo (int) $this->view['id'] == 0 ? 'selected' : ''; ?>><?php esc_html_e( 'one or more testimonials', 'strong-testimonials' ); ?></option>
973
+ <option value="single" <?php echo (int) $this->view['id'] >= 1 ? 'selected' : ''; ?>><?php esc_html_e( 'a specific testimonial', 'strong-testimonials' ); ?></option>
974
+ </select>
975
+ </div>
976
+ </div>
977
+
978
+ <div class="row">
979
+ <div class="then then_not_slideshow then_single then_not_multiple" style="display: none;">
980
+ <div class="row-inner">
981
+ <label>
982
+ <select id="view-id" name="view[data][id]">
983
+ <option value="0"><?php esc_html_e( '&mdash; select &mdash;', 'strong-testimonials' ); ?></option>
984
+ <?php foreach ( $testimonials_list as $post ) : ?>
985
+ <option value="<?php echo esc_attr( $post->ID ); ?>" <?php selected( $this->view['id'], $post->ID ); ?>>
986
+ <?php echo $post->post_title ? esc_html( $post->post_title ) : __( '(untitled)', 'strong-testimonials' ); ?>
987
+ </option>
988
+ <?php endforeach; ?>
989
+ </select>
990
+ </label>
991
+ </div>
992
+ <div class="row-inner">
993
+ <label for="view-post_id">
994
+ <?php _ex( 'or enter its ID or slug', 'to select a testimonial', 'strong-testimonials' ); ?>
995
+ </label>
996
+ <input type="text" id="view-post_id" name="view[data][post_id]" size="30">
997
+ </div>
998
+ </div>
999
+ </div>
1000
+ </td>
1001
+
1002
+ <td class="divider">
1003
+ <p><?php echo wp_kses_post( '<code>post_ids</code>' ); ?></p>
1004
+ </td>
1005
+
1006
+ <td>
1007
+ <p><?php esc_html_e( 'a comma-separated list of post ID\'s', 'strong-testimonials' ); ?></p>
1008
+ </td>
1009
+
1010
+ <td>
1011
+ <p><?php echo wp_kses_post( '<code>post_ids="123,456"</code>' ); ?></p>
1012
+ </td>
1013
+ <?php
1014
+ }
1015
+
1016
+ /**
1017
+ * Render ST category field
1018
+ *
1019
+ * @since 2.51.5
1020
+ */
1021
+ private function render_field_category() {
1022
+
1023
+ if ( $this->cat_count ) : ?>
1024
+ <td>
1025
+ <div id="view-category" class="row">
1026
+ <div class="table inline">
1027
+ <div class="table-row">
1028
+ <div class="table-cell select-cell then_display then_slideshow then_not_form">
1029
+ <select id="view-category-select" class="if selectper" name="view[data][category_all]">
1030
+ <option value="allcats" <?php selected( $this->view['category'], 'all' ); ?>><?php esc_html_e( 'all', 'strong-testimonials' ); ?></option>
1031
+ <option value="somecats" <?php echo( 'all' != $this->view['category'] ? 'selected' : '' ); ?>><?php _ex( 'select', 'verb', 'strong-testimonials' ); ?></option>
1032
+ </select>
1033
+ </div>
1034
+ <div class="table-cell then then_not_allcats then_somecats" style="display: none;">
1035
+ <div class="table">
1036
+ <?php if ( $this->cat_count > 5 ) : ?>
1037
+ <div class="table-row">
1038
+ <div class="table-cell">
1039
+ <div class="row" style="text-align: right; padding-bottom: 5px;">
1040
+ <input type="button" class="expand-cats button"
1041
+ value="expand list"/>
1042
+ </div>
1043
+ </div>
1044
+ </div>
1045
+ <?php endif; ?>
1046
+ <div class="table-row">
1047
+ <div class="table-cell"><?php wpmtst_category_checklist( $this->view_cats_array ); ?></div>
1048
+ </div>
1049
+ </div>
1050
+ </div>
1051
+ </div>
1052
+ </div>
1053
+ </div>
1054
+ </td>
1055
+ <?php else : ?>
1056
+ <td>
1057
+ <div id="view-category" class="row">
1058
+ <input type="hidden" name="view[data][category_all]" value="all">
1059
+ <p class="description tall"><?php esc_html_e( 'No categories found', 'strong-testimonials' ); ?></p>
1060
+ </div>
1061
+ </td>
1062
+ <?php endif; ?>
1063
+
1064
+ <td class="divider">
1065
+ <p><?php echo wp_kses_post( '<code>category</code>' ); ?></p>
1066
+ </td>
1067
+ <td>
1068
+ <p><?php esc_html_e( 'a comma-separated list of category slugs or ID\'s', 'strong-testimonials' ); ?></p>
1069
+ </td>
1070
+ <td>
1071
+ <p><?php echo wp_kses_post( '<code>category="accounting"</code>' ); ?></p>
1072
+ </td><?php
1073
+ }
1074
+
1075
+ /**
1076
+ * Render ST order field
1077
+ *
1078
+ * @since 2.51.5
1079
+ */
1080
+ private function render_field_order() {
1081
+
1082
+ ?>
1083
+ <td>
1084
+ <div class="row">
1085
+ <div class="inline">
1086
+ <select id="view-order" name="view[data][order]">
1087
+ <?php foreach ( $this->view_options['order'] as $order => $order_label ) : ?>
1088
+ <option value="<?php echo esc_attr( $order ); ?>" <?php selected( $order, $this->view['order'] ); ?>><?php echo esc_html( $order_label ); ?></option>
1089
+ <?php endforeach; ?>
1090
+ </select>
1091
+ </div>
1092
+ </div>
1093
+ </td>
1094
+ <td class="divider">
1095
+ <p><?php echo wp_kses_post( '<code>order</code>' ); ?></p>
1096
+ </td>
1097
+ <td>
1098
+ <p><?php echo wp_kses_post( 'oldest | newest | random | menu_order' ); ?></p>
1099
+ </td>
1100
+ <td>
1101
+ <p><?php echo wp_kses_post( '<code>order="random"</code>' ); ?></p>
1102
+ </td> <?php
1103
+ }
1104
+
1105
+ /**
1106
+ * Render ST limit fied
1107
+ *
1108
+ * @since 2.51.5
1109
+ */
1110
+ private function render_field_limit() {
1111
+
1112
+ ?>
1113
+ <td>
1114
+ <div class="row">
1115
+ <div class="inline">
1116
+ <select class="if select" id="view-all" name="view[data][all]">
1117
+ <option value="1" <?php selected( - 1, $this->view['count'] ); ?>>
1118
+ <?php esc_html_e( 'all', 'strong-testimonials' ); ?>
1119
+ </option>
1120
+ <option class="trip" value="0" <?php selected( $this->view['count'] > 0 ); ?>>
1121
+ <?php _ex( 'count', 'noun', 'strong-testimonials' ); ?>
1122
+ </option>
1123
+ </select>
1124
+ &nbsp;
1125
+ <label><input class="input-incremental then_all" type="number" id="view-count"
1126
+ name="view[data][count]"
1127
+ value="<?php echo ( - 1 == $this->view['count'] ) ? 1 : esc_attr( $this->view['count'] ); ?>"
1128
+ min="1" size="5" style="display: none;"></label>
1129
+ </div>
1130
+ </div>
1131
+ </td>
1132
+ <td class="divider">
1133
+ <p><?php echo wp_kses_post( '<code>count</code>' ); ?></p>
1134
+ </td>
1135
+ <td></td>
1136
+ <td>
1137
+ <p><?php echo wp_kses_post( '<code>count=5</code>' ); ?></p>
1138
+ </td>
1139
+ <?php
1140
+ }
1141
+
1142
+ /**
1143
+ * Render ST title field
1144
+ *
1145
+ * @since 2.51.5
1146
+ */
1147
+ private function render_field_title() {
1148
+
1149
+ $custom_fields = wpmtst_get_custom_fields();
1150
+ $options = get_option( 'wpmtst_options' );
1151
+ $url_fields = array();
1152
+
1153
+ foreach ( $custom_fields as $field ) {
1154
+ if ( 'url' == $field['input_type'] ) {
1155
+ $url_fields[] = $field;
1156
+ }
1157
+ }
1158
+
1159
+ // For older versions where title_link was checkbox
1160
+ if ( '1' == $this->view['title_link'] ) {
1161
+ $this->view['title_link'] = 'wpmtst_testimonial';
1162
+ }
1163
+
1164
+ if ( '0' == $this->view['title_link'] ) {
1165
+ $this->view['title_link'] = 'none';
1166
+ } ?>
1167
+
1168
+ <td colspan="2">
1169
+ <div class="row">
1170
+ <div class="row-inner">
1171
+ <div class="then then_title" style="display: none;">
1172
+ <label for="view-title_link">
1173
+ <?php printf( esc_html_x( 'Link to %s', 'The name of this post type. "Testimonial" by default.', 'strong-testimonials' ), strtolower( apply_filters( 'wpmtst_cpt_singular_name', __( 'Testimonial', 'strong-testimonials' ) ) ) ); ?>
1174
+ </label>
1175
+ <div class="wpmtst-tooltip"><span>[?]</span>
1176
+ <div class="wpmtst-tooltip-content"><?php echo esc_html__( '"Full testimonial" option doesn\'s work if "Disable permalinks for testimonials" from "Settings" page is enabled.', 'strong-testimonials' ); ?></div>
1177
+ </div>
1178
+
1179
+ <select name="view[data][title_link]">
1180
+ <option value="none" <?php selected( 'none', $this->view['title_link'], true ); ?>><?php echo esc_html__( 'None', 'strong-testimonials' ); ?></option>
1181
+ <?php if ( ! isset( $options['disable_rewrite'] ) || '1' != $options['disable_rewrite'] ) { ?>
1182
+ <option value="wpmtst_testimonial" <?php selected( 'wpmtst_testimonial', $this->view['title_link'], true ); ?>><?php echo esc_html__( 'Full testimonial', 'strong-testimonials' ); ?></option>
1183
+ <?php } ?>
1184
+
1185
+ <?php foreach ( $url_fields as $url ) { ?>
1186
+ <option value="<?php echo esc_attr( $url['name'] ); ?>" <?php selected( $url['name'], $this->view['title_link'] ); ?>><?php echo esc_html( $url['label'] ); ?></option>
1187
+ <?php } ?>
1188
+
1189
+ </select>
1190
+ <?php do_action( 'wpmtst_view_editor_after_group_fields_title' ) ?>
1191
+ </div>
1192
+ </div>
1193
+ </div>
1194
+ </td>
1195
+ <?php
1196
+ }
1197
+
1198
+ /**
1199
+ * Render ST thumbnail field
1200
+ *
1201
+ * @since 2.51.5
1202
+ */
1203
+ private function render_field_thumbnail() {
1204
+
1205
+ $image_sizes = wpmtst_get_image_sizes();
1206
+ ?>
1207
+ <td colspan="2">
1208
+ <div class="then then_images" style="display: none;">
1209
+ <div class="row">
1210
+ <div class="row-inner">
1211
+ <div class="inline">
1212
+ <label for="view-thumbnail_size">Size</label>
1213
+ <select id="view-thumbnail_size" class="if select" name="view[data][thumbnail_size]">
1214
+ <?php foreach ( $image_sizes as $key => $size ) : ?>
1215
+ <option class="<?php echo( 'custom' == $key ? 'trip' : '' ) ?>"
1216
+ value="<?php echo esc_attr( $key ); ?>"<?php selected( $key, $this->view['thumbnail_size'] ); ?>><?php echo esc_html( $size['label'] ); ?></option>
1217
+ <?php endforeach; ?>
1218
+ </select>
1219
+ </div>
1220
+ <div class="inline then then_thumbnail_size" style="margin-left: 1em;">
1221
+ <label for="thumbnail_width"><?php esc_html_e( 'width', 'strong-testimonials' ); ?></label>
1222
+ <input id="thumbnail_width" class="input-number-px" type="text"
1223
+ name="view[data][thumbnail_width]"
1224
+ value="<?php echo esc_attr( $this->view['thumbnail_width'] ); ?>"> px
1225
+ <span style="display: inline-block; color: #BBB; margin: 0 1em;">|</span>
1226
+ <label for="thumbnail_height"><?php esc_html_e( 'height', 'strong-testimonials' ); ?></label>
1227
+ <input id="thumbnail_height" class="input-number-px" type="text"
1228
+ name="view[data][thumbnail_height]"
1229
+ value="<?php echo esc_attr( $this->view['thumbnail_height'] ); ?>"> px
1230
+ </div>
1231
+ </div>
1232
+ </div>
1233
+ <div class="row">
1234
+ <div class="row-inner">
1235
+ <div class="inline">
1236
+ <input type="checkbox" id="view-lightbox" class="if toggle" name="view[data][lightbox]"
1237
+ value="1" <?php checked( $this->view['lightbox'] ); ?> class="checkbox">
1238
+ <label for="view-lightbox"><?php esc_html_e( 'Open full-size image in a lightbox', 'strong-testimonials' ); ?></label>
1239
+ </div>
1240
+ <div class="inline then then_lightbox">
1241
+ <p class="description"><?php esc_html_e( 'Requires a lightbox provided by your theme or another plugin.', 'strong-testimonials' ); ?></p>
1242
+ </div>
1243
+ </div>
1244
+ </div>
1245
+
1246
+ <div class="row">
1247
+ <div class="row-inner">
1248
+ <div class="inline then then_lightbox input" style="display: none;">
1249
+ <label for="view-lightbox_class"><?php esc_html_e( 'CSS class', 'strong-testimonials' ); ?></label>
1250
+ <input type="text" id="view-lightbox_class" class="medium inline"
1251
+ name="view[data][lightbox_class]"
1252
+ value="<?php echo esc_attr( $this->view['lightbox_class'] ); ?>">
1253
+ <p class="inline description tall"><?php esc_html_e( 'To add a class to the image link.', 'strong-testimonials' ); ?></p>
1254
+ </div>
1255
+ </div>
1256
+ </div>
1257
+ <div class="row">
1258
+ <div class="row-inner">
1259
+ <div class="inline">
1260
+ <label for="view-gravatar"><?php esc_html_e( 'If no Featured Image', 'strong-testimonials' ); ?></label>
1261
+ <select id="view-gravatar" class="if select selectper" name="view[data][gravatar]">
1262
+ <option value="no" <?php selected( $this->view['gravatar'], 'no' ); ?>><?php esc_html_e( 'show nothing', 'strong-testimonials' ); ?></option>
1263
+ <option value="yes" <?php selected( $this->view['gravatar'], 'yes' ); ?>><?php esc_html_e( 'show Gravatar', 'strong-testimonials' ); ?></option>
1264
+ <option value="if" <?php selected( $this->view['gravatar'], 'if' ); ?>><?php esc_html_e( 'show Gravatar only if found', 'strong-testimonials' ); ?></option>
1265
+ <?php do_action( 'wpmtst_avatar_options', $this->view ) ?>
1266
+ </select>
1267
+ </div>
1268
+ <div class="inline">
1269
+ <div class="then fast then_not_no then_not_default then_not_initials then_not_wp_avatars then_yes then_if"
1270
+ style="display: none;">
1271
+ <p class="description tall"><a
1272
+ href="<?php echo esc_url( admin_url( 'options-discussion.php' ) ); ?>"><?php esc_html_e( 'Gravatar settings', 'strong-testimonials' ); ?></a>
1273
+ </p>
1274
+ </div>
1275
+ </div>
1276
+ <?php do_action( 'after_no_featured_image', $this->view ) ?>
1277
+ </div>
1278
+ </div>
1279
+ </div><!-- .then_images -->
1280
+ </td>
1281
+ <?php
1282
+ }
1283
+
1284
+ /**
1285
+ * Render ST content field
1286
+ *
1287
+ * @since 2.51.5
1288
+ */
1289
+ private function render_field_content() {
1290
+
1291
+ ?>
1292
+ <td colspan="2">
1293
+ <!-- Content type -->
1294
+ <div id="option-content" class="row">
1295
+ <div class="row-inner">
1296
+ <!-- select -->
1297
+ <div class="inline">
1298
+ <select id="view-content" class="if selectper min-width-1 label-not-adjacent"
1299
+ name="view[data][content]">
1300
+ <option value="entire" <?php selected( 'entire', $this->view['content'] ); ?>><?php _ex( 'entire content', 'display setting', 'strong-testimonials' ); ?></option>
1301
+ <option value="truncated" <?php selected( 'truncated', $this->view['content'] ); ?>><?php _ex( 'automatic excerpt', 'display setting', 'strong-testimonials' ); ?></option>
1302
+ <option value="excerpt" <?php selected( 'excerpt', $this->view['content'] ); ?>><?php _ex( 'manual excerpt', 'display setting', 'strong-testimonials' ); ?></option>
1303
+ </select>
1304
+ </div>
1305
+ <!-- info & screenshot -->
1306
+ <div class="inline then fast then_truncated then_not_entire then_not_excerpt"
1307
+ style="display: none;">
1308
+ <p class="description"><?php esc_html_e( 'This will strip tags like &lt;em&gt; and &lt;strong&gt;.', 'strong-testimonials' ); ?></p>
1309
+ </div>
1310
+ <div class="inline then fast then_not_truncated then_not_entire then_excerpt"
1311
+ style="display: none;">
1312
+ <p class="description">
1313
+ <?php printf( __( 'To create manual excerpts, you may need to enable them in the post editor like in this <a href="%s" class="thickbox">screenshot</a>.', 'strong-testimonials' ), esc_url( '#TB_inline?width=&height=210&inlineId=screenshot-screen-options' ) ); ?>
1314
+ <span class="screenshot" id="screenshot-screen-options" style="display: none;"><img
1315
+ src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>img/screen-options.png"
1316
+ width="600"></span>
1317
+ </p>
1318
+ </div>
1319
+ </div>
1320
+ </div>
1321
+ <!-- Excerpt length -->
1322
+ <div id="option-content-length" class="row then then_not_entire then_excerpt then_truncated"
1323
+ style="display: none;">
1324
+ <div class="row-inner">
1325
+ <!-- info -->
1326
+ <div class="inline tight then then_excerpt then_not_truncated" style="display: none;">
1327
+ <span><?php esc_html_e( 'If no manual excerpt, create an excerpt using', 'strong-testimonials' ); ?></span>
1328
+ </div>
1329
+ <!-- default or custom? -->
1330
+ <div class="inline">
1331
+ <label>
1332
+ <select id="view-use_default_length" class="if selectgroup min-width-1"
1333
+ name="view[data][use_default_length]">
1334
+ <option value="1" <?php selected( $this->view['use_default_length'] ); ?>><?php _ex( 'default length', 'display setting', 'strong-testimonials' ); ?></option>
1335
+ <option value="0" <?php selected( ! $this->view['use_default_length'] ); ?>><?php _ex( 'custom length', 'display setting', 'strong-testimonials' ); ?></option>
1336
+ </select>
1337
+ </label>
1338
+ </div>
1339
+ <!-- 1st option: default -->
1340
+ <div class="inline then fast then_use_default_length then_1 then_not_0" style="display: none;">
1341
+ <label for="view-use_default_length" class="inline-middle"><p
1342
+ class="description tall"><?php esc_html_e( 'The default length is 55 words but your theme may override that.', 'strong-testimonials' ); ?></p>
1343
+ </label>
1344
+ </div>
1345
+ <!-- 2nd option: length -->
1346
+ <div class="inline then fast then_use_default_length then_0 then_not_1" style="display: none;">
1347
+ <label class="inline-middle"><?php printf( esc_html_x( 'the first %s words', 'the excerpt length', 'strong-testimonials' ), '<input id="view-excerpt_length" class="input-incremental" type="number" min="1" max="999" name="view[data][excerpt_length]" value="' . esc_attr( $this->view['excerpt_length'] ) . '">' ); ?></label>
1348
+ </div>
1349
+ </div>
1350
+ </div><!-- #option-content-length -->
1351
+
1352
+ <!-- Read-more link -->
1353
+ <div id="option-content-read-more" class="row then then_not_entire then_excerpt then_truncated"
1354
+ style="display: none;">
1355
+ <div class="row-inner subgroup">
1356
+ <!-- action: full post or in place -->
1357
+ <div class="row-inner">
1358
+ <div class="inline"><?php _e( 'Add a <strong>Read more</strong> link to', 'strong-testimonials' ); ?></div>
1359
+ <div class="inline tight">
1360
+ <label>
1361
+ <select id="view-more_post_in_place" class="if selectgroup"
1362
+ name="view[data][more_post_in_place]">
1363
+ <option value="0" <?php selected( ! $this->view['more_post_in_place'] ); ?>><?php esc_html_e( 'the full testimonial', 'strong-testimonials' ); ?></option>
1364
+ <option value="1" <?php selected( $this->view['more_post_in_place'] ); ?>><?php esc_html_e( 'expand content in place', 'strong-testimonials' ); ?></option>
1365
+ </select>
1366
+ </label>
1367
+ </div>
1368
+ </div>
1369
+ <!-- ellipsis -->
1370
+ <div class="row-inner">
1371
+ <div class="then then_use_default_more then_0 then_not_1" style="display: none;">
1372
+ <div class="inline">
1373
+ <label>
1374
+ <select id="view-more_post_ellipsis" class="if selectgroup"
1375
+ name="view[data][more_post_ellipsis]">
1376
+ <option value="1" <?php selected( $this->view['more_post_ellipsis'] ); ?>><?php esc_html_e( 'with an ellipsis', 'strong-testimonials' ); ?></option>
1377
+ <option value="0" <?php selected( ! $this->view['more_post_ellipsis'] ); ?>><?php esc_html_e( 'without an ellipsis', 'strong-testimonials' ); ?></option>
1378
+ </select>
1379
+ </label>
1380
+ </div>
1381
+ <div class="inline then then_excerpt then_not_truncated" style="display: none;">
1382
+ <p class="description"><?php esc_html_e( 'Automatic excerpt only.', 'strong-testimonials' ); ?></p>
1383
+ </div>
1384
+ </div>
1385
+ </div>
1386
+ <!-- default or custom -->
1387
+ <div class="row-inner">
1388
+ <div class="inline tight then fast then_more_post_in_place then_1 then_not_0"
1389
+ style="display: none;">
1390
+ <?php esc_html_e( 'with link text to read more', 'strong-testimonials' ); ?>
1391
+ </div>
1392
+ <div class="inline then fast then_more_post_in_place then_0 then_not_1" style="display: none;">
1393
+ <label>
1394
+ <select id="view-use_default_more" class="if selectgroup min-width-1"
1395
+ name="view[data][use_default_more]">
1396
+ <option value="1" <?php selected( $this->view['use_default_more'] ); ?>><?php _ex( 'with default link text', 'display setting', 'strong-testimonials' ); ?></option>
1397
+ <option value="0" <?php selected( ! $this->view['use_default_more'] ); ?>><?php _ex( 'with custom link text', 'display setting', 'strong-testimonials' ); ?></option>
1398
+ </select>
1399
+ </label>
1400
+ </div>
1401
+ <div class="inline then fast then_use_default_more then_1 then_not_0" style="display: none;">
1402
+ <p class="description"><?php esc_html_e( 'If you only see [&hellip;] without a link then use the custom link text instead.', 'strong-testimonials' ); ?></p>
1403
+ </div>
1404
+ <!-- read more -->
1405
+ <div class="inline then fast then_use_default_more then_0 then_not_1" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1406
  <span id="option-link-text" class="inline-span">
1407
  <label for="view-more_post_text">
1408
+ <input type="text" id="view-more_post_text" name="view[data][more_post_text]"
1409
+ value="<?php echo esc_attr( $this->view['more_post_text'] ); ?>" size="22"
1410
+ placeholder="<?php esc_html_e( 'enter a phrase', 'strong-testimonials' ); ?>">
1411
  </label>
1412
  </span>
1413
+ </div>
1414
+ </div>
1415
+ <!-- read less -->
1416
+ <div class="row-inner then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
1417
+ <div class="inline tight">
1418
+ <?php esc_html_e( 'and link text to read less', 'strong-testimonials' ); ?>
1419
+ </div>
1420
+ <div class="inline tight">
1421
  <span id="option-link-text-less" class="inline-span">
1422
  <label for="view-less_post_text">
1423
+ <input type="text" id="view-less_post_text" name="view[data][less_post_text]"
1424
+ value="<?php echo esc_attr( $this->view['less_post_text'] ); ?>" size="22"
1425
+ placeholder="<?php esc_html_e( 'enter a phrase', 'strong-testimonials' ); ?>">
1426
  </label>
1427
  </span>
1428
+ <p class="inline description"><?php esc_html_e( 'Leave blank to leave content expanded without a link.', 'strong-testimonials' ); ?></p>
1429
+ </div>
1430
+ <div class="html-content-checkbox">
1431
+ <input class="checkbox" id="view-html-content" name="view[data][html_content]" value="1"
1432
+ type="checkbox" <?php checked( $this->view['html_content'] ); ?>/>
1433
+ <label for="view-html-content"><?php _e( 'Show <strong>html content</strong>.', 'strong-testimonials' ); ?></label>
1434
+ </div>
1435
+ </div>
1436
+ <!-- automatic or both -->
1437
+ <div class="row-inner then then_excerpt then_not_truncated" style="display: none;">
1438
+ <div class="inline">
1439
+ <label>
1440
+ <select id="view-more_full_post" class="if selectgroup"
1441
+ name="view[data][more_full_post]">
1442
+ <option value="0" <?php selected( $this->view['more_full_post'], 0 ); ?>><?php _ex( 'for automatic excerpt only', 'display setting', 'strong-testimonials' ); ?></option>
1443
+ <option value="1" <?php selected( $this->view['more_full_post'], 1 ); ?>><?php _ex( 'for both automatic and manual excerpts', 'display setting', 'strong-testimonials' ); ?></option>
1444
+ </select>
1445
+ </label>
1446
+ </div>
1447
+ </div>
1448
+ </div>
1449
+ </div>
1450
+ <div class="row links then then_not_entire then_truncated then_excerpt" style="display: none;">
1451
+ <p class="description tall solo"><?php printf( esc_html__( '%s about WordPress excerpts', 'strong-testimonials' ), sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( 'http://buildwpyourself.com/wordpress-manual-excerpts-more-tag/' ), esc_html__( 'Learn more', 'strong-testimonials' ) ) ); ?></p>
1452
+ </div>
1453
+ </td>
1454
+ <?php
1455
+ }
1456
+
1457
+ /**
1458
+ * Render ST client field
1459
+ *
1460
+ * @since 2.51.5
1461
+ */
1462
+ private function render_field_client_section() {
1463
+
1464
+ ?>
1465
+ <td colspan="2">
1466
+ <div id="client-section-table">
1467
+ <div id="custom-field-list2" class="fields">
1468
+ <?php
1469
+ if ( isset( $this->view['client_section'] ) ) {
1470
+ foreach ( $this->view['client_section'] as $key => $field ) {
1471
+ wpmtst_view_field_inputs( $key, $field );
1472
+ }
1473
+ }
1474
+ ?>
1475
+ </div>
1476
+ </div>
1477
+ <div id="add-field-bar" class="is-below">
1478
+ <input id="add-field" type="button" name="add-field" source="view[data]"
1479
+ value="<?php esc_html_e( 'Add Field', 'strong-testimonials' ); ?>" class="button-secondary"/>
1480
+ </div>
1481
+ </td>
1482
+ <?php
1483
+ }
1484
+
1485
+ /**
1486
+ * Render ST pagination
1487
+ *
1488
+ * @since 2.51.5
1489
+ */
1490
+ private function render_field_pagination() {
1491
+ /**
1492
+ * Attempt to repair bug from 2.28.2
1493
+ */
1494
+ if ( ! isset( $this->view['pagination_settings']['end_size'] ) || ! $this->view['pagination_settings']['end_size'] ) {
1495
+ $this->view['pagination_settings']['end_size'] = 1;
1496
+ }
1497
+ if ( ! isset( $this->view['pagination_settings']['mid_size'] ) || ! $this->view['pagination_settings']['mid_size'] ) {
1498
+ $this->view['pagination_settings']['mid_size'] = 2;
1499
+ }
1500
+ if ( ! isset( $this->view['pagination_settings']['per_page'] ) || ! $this->view['pagination_settings']['per_page'] ) {
1501
+ $this->view['pagination_settings']['per_page'] = 5;
1502
+ }
1503
+ $links = '<span class="help-links">';
1504
+ $links .= '<a href="#tab-panel-wpmtst-help-pagination" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a>';
1505
+ $links .= '</span>';
1506
+ ?>
1507
+ <td>
1508
+ <div class="row then then_pagination" style="display: none;">
1509
+ <div class="row-inner">
1510
+ <div class="inline">
1511
+ <label for="view-pagination_type">
1512
+ <select class="if selectper" id="view-pagination_type"
1513
+ name="view[data][pagination_settings][type]">
1514
+ <option value="simple" <?php selected( 'simple', $this->view['pagination_settings']['type'] ); ?>><?php esc_html_e( 'simple', 'strong-testimonials' ); ?></option>
1515
+ <option value="standard" <?php selected( 'standard', $this->view['pagination_settings']['type'] ); ?>><?php esc_html_e( 'WordPress standard', 'strong-testimonials' ); ?></option>
1516
+ <?php do_action( 'wpmtst_form_pagination_options_after', $this->view ) ?>
1517
+ </select>
1518
+ </label>
1519
+ </div>
1520
+ <div class="inline then fast then_simple then_not_standard then_not_infinitescroll then_not_loadmore"
1521
+ style="display: none;">
1522
+ <p class="description">
1523
+ <?php esc_html_e( 'Using JavaScript. Intended for small scale.', 'strong-testimonials' ); ?>
1524
+ <?php echo wp_kses_post( $links ); ?>
1525
+ </p>
1526
+ </div>
1527
+ <div class="inline then fast then_not_simple then_standard then_not_infinitescroll then_not_loadmore"
1528
+ style="display: none;">
1529
+ <p class="description">
1530
+ <?php esc_html_e( 'Using paged URLs: /page/2, /page/3, etc. Best for large scale.', 'strong-testimonials' ); ?>
1531
+ <?php echo wp_kses_post( $links ); ?>
1532
+ </p>
1533
+ </div>
1534
+ </div>
1535
+ </div>
1536
+ <div class="row then then_pagination" style="display: none;">
1537
+ <div class="row-inner">
1538
+ <div class="inline">
1539
+ <label for="view-per_page"><?php _ex( 'Per page', 'quantity', 'strong-testimonials' ); ?></label>
1540
+ <input class="input-incremental" id="view-per_page"
1541
+ name="view[data][pagination_settings][per_page]" type="number" min="1" step="1"
1542
+ value="<?php echo esc_attr( $this->view['pagination_settings']['per_page'] ); ?>"/>
1543
+ </div>
1544
+ <div class="inline then then_simple then_standard then_not_infinitescroll then_not_loadmore">
1545
+ <label for="view-nav"><?php esc_html_e( 'Navigation', 'strong-testimonials' ); ?></label>
1546
+ <select id="view-nav" name="view[data][pagination_settings][nav]">
1547
+ <option value="before" <?php selected( $this->view['pagination_settings']['nav'], 'before' ); ?>><?php esc_html_e( 'before', 'strong-testimonials' ); ?></option>
1548
+ <option value="after" <?php selected( $this->view['pagination_settings']['nav'], 'after' ); ?>><?php esc_html_e( 'after', 'strong-testimonials' ); ?></option>
1549
+ <option value="before,after" <?php selected( $this->view['pagination_settings']['nav'], 'before,after' ); ?>><?php esc_html_e( 'before & after', 'strong-testimonials' ); ?></option>
1550
+ </select>
1551
+ </div>
1552
+ </div>
1553
+ <div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore"
1554
+ style="display: none;">
1555
+ <div class="row-inner">
1556
+ <div class="inline">
1557
+ <label for="view-pagination-show_all">
1558
+ <select class="if select" id="view-pagination-show_all"
1559
+ name="view[data][pagination_settings][show_all]">
1560
+ <option value="on" <?php selected( $this->view['pagination_settings']['show_all'] ); ?>><?php esc_html_e( 'Show all page numbers', 'strong-testimonials' ); ?></option>
1561
+ <option value="off"
1562
+ <?php selected( ! $this->view['pagination_settings']['show_all'] ); ?>class="trip"><?php esc_html_e( 'Show condensed page numbers', 'strong-testimonials' ); ?></option>
1563
+ </select>
1564
+ </label>
1565
+ </div>
1566
+ <div class="inline then then_show_all" style="display: none;">
1567
+ <div class="inline">
1568
+ <label for="view-pagination-end_size"><?php _ex( 'End size', 'quantity', 'strong-testimonials' ); ?></label>
1569
+ <input class="input-incremental" id="view-pagination-end_size"
1570
+ name="view[data][pagination_settings][end_size]" type="number" min="1" step="1"
1571
+ value="<?php echo esc_attr( $this->view['pagination_settings']['end_size'] ); ?>"/>
1572
+ </div>
1573
+ <div class="inline">
1574
+ <label for="view-pagination-mid_size"><?php _ex( 'Middle size', 'quantity', 'strong-testimonials' ); ?></label>
1575
+ <input class="input-incremental" id="view-pagination-mid_size"
1576
+ name="view[data][pagination_settings][mid_size]" type="number" min="1" step="1"
1577
+ value="<?php echo esc_attr( $this->view['pagination_settings']['mid_size'] ); ?>"/>
1578
+ </div>
1579
+ </div>
1580
+ </div>
1581
+ </div>
1582
+ <div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore"
1583
+ style="display: none;">
1584
+ <div class="row-inner">
1585
+ <div class="inline inline-middle">
1586
+ <input class="if toggle checkbox" id="view-pagination-prev_next"
1587
+ name="view[data][pagination_settings][prev_next]" type="checkbox"
1588
+ value="1" <?php checked( $this->view['pagination_settings']['prev_next'] ); ?>>
1589
+ <label for="view-pagination-prev_next"><?php esc_html_e( 'Show previous/next links', 'strong-testimonials' ); ?></label>
1590
+ </div>
1591
+ <div class="then then_prev_next inline inline-middle">
1592
+ <label for="view-pagination-prev_text"><?php esc_html_e( 'Previous text', 'strong-testimonials' ); ?></label>
1593
+ <input class="code" id="view-pagination-prev_text"
1594
+ name="view[data][pagination_settings][prev_text]" type="text"
1595
+ value="<?php echo htmlentities( $this->view['pagination_settings']['prev_text'] ); ?>">
1596
+ </div>
1597
+ <div class="then then_prev_next inline inline-middle">
1598
+ <label for="view-pagination-next_text"><?php esc_html_e( 'Next text', 'strong-testimonials' ); ?></label>
1599
+ <input class="code" id="view-pagination-next_text"
1600
+ name="view[data][pagination_settings][next_text]" type="text"
1601
+ value="<?php echo htmlentities( $this->view['pagination_settings']['next_text'] ); ?>">
1602
+ </div>
1603
+ </div>
1604
+ </div>
1605
+ <div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore"
1606
+ style="display: none;">
1607
+ <div class="row-inner">
1608
+ <div class="inline">
1609
+ <label for="view-pagination-before_page_number"><?php esc_html_e( 'Before page number', 'strong-testimonials' ); ?></label>
1610
+ <input class="small-text" id="view-pagination-before_page_number"
1611
+ name="view[data][pagination_settings][before_page_number]" type="text"
1612
+ value="<?php echo esc_attr( $this->view['pagination_settings']['before_page_number'] ); ?>">
1613
+ </div>
1614
+ <div class="inline">
1615
+ <label for="view-pagination-after_page_number"><?php esc_html_e( 'After page number', 'strong-testimonials' ); ?></label>
1616
+ <input class="small-text" id="view-pagination-after_page_number"
1617
+ name="view[data][pagination_settings][after_page_number]" type="text"
1618
+ value="<?php echo esc_attr( $this->view['pagination_settings']['after_page_number'] ); ?>">
1619
+ </div>
1620
+ </div>
1621
+ </div>
1622
+ </div>
1623
+ <?php do_action( 'wpmtst_view_editor_pagination_row_end' ); ?>
1624
+ </td>
1625
+ <?php
1626
+ }
1627
+
1628
  /**
1629
+ * Render ST read more
1630
+ *
1631
+ * @since 2.51.5
1632
  */
1633
+ private function render_field_read_more_page() {
1634
+
1635
+ $custom_list = apply_filters( 'wpmtst_custom_pages_list', array(), $this->view );
1636
+ $pages_list = apply_filters( 'wpmtst_pages_list', wpmtst_get_pages() );
1637
+ $posts_list = apply_filters( 'wpmtst_posts_list', wpmtst_get_posts() );
1638
+
1639
+ ?>
1640
+ <td>
1641
+ <div class="row then then_more_page" style="display: none;">
1642
+ <!-- Select page -->
1643
+ <div class="row then then_more_page" style="display: none;">
1644
+ <div class="row-inner">
1645
+ <label>
1646
+ <select id="view-page" name="view[data][more_page_id]">
1647
+ <option value=""><?php esc_html_e( '&mdash; select &mdash;', 'strong-testimonials' ); ?></option>
1648
+ <?php
1649
+ do_action( 'wpmtst_readmore_page_list', $this->view );
1650
+
1651
+ if ( $custom_list ) {
1652
+ ?>
1653
+ <optgroup label="<?php esc_html_e( 'Custom', 'strong-testimonials' ); ?>">
1654
+ <?php
1655
+ foreach ( $custom_list as $page ) {
1656
+ echo wp_kses_post( $page );
1657
+ }
1658
+ ?>
1659
+ </optgroup>
1660
+ <?php } ?>
1661
+
1662
+ <optgroup label="<?php esc_attr_e( 'Pages', 'strong-testimonials' ); ?>">
1663
+
1664
+ <?php foreach ( $pages_list as $pages ) : ?>
1665
+ <option value="<?php echo esc_attr( $pages->ID ); ?>" <?php selected( isset( $this->view['more_page_id'] ) ? $this->view['more_page_id'] : 0, $pages->ID ); ?>><?php echo esc_html( $pages->post_title ); ?></option>
1666
+ <?php endforeach; ?>
1667
+
1668
+ </optgroup>
1669
+
1670
+ <optgroup label="<?php esc_attr_e( 'Posts', 'strong-testimonials' ); ?>">
1671
+
1672
+ <?php foreach ( $posts_list as $posts ) : ?>
1673
+ <option value="<?php echo esc_attr( $posts->ID ); ?>" <?php selected( isset( $this->view['more_page_id'] ) ? $this->view['more_page_id'] : 0, $posts->ID ); ?>><?php echo esc_html( $posts->post_title ); ?></option>
1674
+ <?php endforeach; ?>
1675
+
1676
+ </optgroup>
1677
+ </select>
1678
+ </label>
1679
+ <label for="view-page_id2"><?php _ex( 'or enter its ID or slug', 'to select a target page', 'strong-testimonials' ); ?></label>
1680
+ <input type="text" id="view-page_id2"
1681
+ name="view[data][more_page_id2]" <?php echo( isset( $this->view['more_page_id'] ) ? 'value="' . esc_attr( $this->view['more_page_id'] ) . '"' : '' ); ?>
1682
+ size="30">
1683
+ </div>
1684
+ </div>
1685
+ <!-- Link text -->
1686
+ <div class="row">
1687
+ <div class="row-inner">
1688
+ <div class="inline">
1689
+ <label for="view-more_page_text"><?php esc_html_e( 'with link text', 'strong-testimonials' ); ?></label>
1690
+ <input type="text" id="view-more_page_text" name="view[data][more_page_text]"
1691
+ value="<?php echo esc_attr( $this->view['more_page_text'] ); ?>" size="50">
1692
+ </div>
1693
+ </div>
1694
+ </div>
1695
+ <!-- location -->
1696
+ <div class="row">
1697
+ <div class="row-inner">
1698
+ <label>
1699
+ <select id="view-more_page_hook" name="view[data][more_page_hook]">
1700
+ <option value="wpmtst_view_footer" <?php selected( 'wpmtst_view_footer', $this->view['more_page_hook'] ); ?>><?php _ex( 'after the last testimonial', 'display setting', 'strong-testimonials' ); ?></option>
1701
+ <option value="wpmtst_after_testimonial" <?php selected( 'wpmtst_after_testimonial', $this->view['more_page_hook'] ); ?>><?php _ex( 'in each testimonial', 'display setting', 'strong-testimonials' ); ?></option>
1702
+ </select>
1703
+ </label>
1704
+ </div>
1705
+ </div>
1706
+ </div>
1707
+ </td>
1708
+ <?php
1709
  }
1710
+
1711
+ /**
1712
+ * Render ST slideshow number
1713
+ *
1714
+ * @since 2.51.5
1715
+ */
1716
+ private function render_field_slideshow_num() {
1717
+
1718
+ ?>
1719
+ <td>
1720
+ <div class="row">
1721
+ <div class="inline inline-middle">
1722
+ <label>
1723
+ <select id="view-slider_type" name="view[data][slideshow_settings][type]"
1724
+ class="if selectgroup">
1725
+ <option value="show_single" <?php selected( $this->view['slideshow_settings']['type'], 'show_single' ); ?>><?php esc_html_e( 'single', 'strong-testimonials' ); ?></option>
1726
+ <option value="show_multiple" <?php selected( $this->view['slideshow_settings']['type'], 'show_multiple' ); ?>><?php esc_html_e( 'multiple', 'strong-testimonials' ); ?></option>
1727
+ </select>
1728
+ </label>
1729
+ <div class="option-desc singular" style="display: none;">
1730
+ <?php esc_html_e( 'slide at a time', 'strong-testimonials' ); ?>
1731
+ </div>
1732
+ <div class="option-desc plural" style="display: none;">
1733
+ <?php esc_html_e( 'slides at a time with these responsive breakpoints:', 'strong-testimonials' ); ?>
1734
+ </div>
1735
+ </div>
1736
+ </div>
1737
+ </td>
1738
+ <td>
1739
+ <div class="inline then then_slider_type then_not_show_single then_show_multiple" style="display: none;">
1740
+ <div class="row">
1741
+ <div class="inner-table is-below">
1742
+ <div class="inner-table-row bordered header">
1743
+ <div class="inner-table-cell"><?php esc_html_e( 'minimum screen width', 'strong-testimonials' ); ?></div>
1744
+ <div class="inner-table-cell"><?php esc_html_e( 'show', 'strong-testimonials' ); ?></div>
1745
+ <div class="inner-table-cell"><?php esc_html_e( 'margin', 'strong-testimonials' ); ?></div>
1746
+ <div class="inner-table-cell"><?php esc_html_e( 'move', 'strong-testimonials' ); ?></div>
1747
+ </div>
1748
+ <?php foreach ( $this->view['slideshow_settings']['breakpoints'] as $key => $breakpoint ) : ?>
1749
+ <div class="inner-table-row bordered">
1750
+ <div class="inner-table-cell">
1751
+ <label>
1752
+ <input id="view-breakpoint_<?php echo esc_attr( $key ); ?>"
1753
+ name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr( $key ); ?>][width]"
1754
+ value="<?php echo esc_attr( $breakpoint['width'] ); ?>" type="number"
1755
+ class="input-incremental"> px
1756
+ </label>
1757
+ </div>
1758
+ <div class="inner-table-cell">
1759
+ <label>
1760
+ <select id="view-max_slides_<?php echo $key; ?>"
1761
+ name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr( $key ); ?>][max_slides]"
1762
+ class="if selectgroup">
1763
+ <option value="1" <?php selected( $breakpoint['max_slides'], 1 ); ?>>1
1764
+ </option>
1765
+ <option value="2" <?php selected( $breakpoint['max_slides'], 2 ); ?>>2
1766
+ </option>
1767
+ <option value="3" <?php selected( $breakpoint['max_slides'], 3 ); ?>>3
1768
+ </option>
1769
+ <option value="4" <?php selected( $breakpoint['max_slides'], 4 ); ?>>4
1770
+ </option>
1771
+ </select>
1772
+ </label>
1773
+ <div class="option-desc singular"
1774
+ style="display: none;"><?php esc_html_e( 'slide', 'strong-testimonials' ); ?></div>
1775
+ <div class="option-desc plural"
1776
+ style="display: none;"><?php esc_html_e( 'slides', 'strong-testimonials' ); ?></div>
1777
+ </div>
1778
+ <div class="inner-table-cell">
1779
+ <input id="view-margin_<?php echo esc_attr( $key ); ?>"
1780
+ name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr( $key ); ?>][margin]"
1781
+ value="<?php echo esc_attr( $breakpoint['margin'] ); ?>" type="number"
1782
+ min="1" step="1" size="3" class="input-incremental"/> px
1783
+ </div>
1784
+ <div class="inner-table-cell">
1785
+ <label>
1786
+ <select id="view-move_slides_<?php echo esc_attr( $key ); ?>"
1787
+ name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr( $key ); ?>][move_slides]"
1788
+ class="if selectgroup">
1789
+ <option value="1" <?php selected( $breakpoint['move_slides'], 1 ); ?>>1
1790
+ </option>
1791
+ <option value="2" <?php selected( $breakpoint['move_slides'], 2 ); ?>>2
1792
+ </option>
1793
+ <option value="3" <?php selected( $breakpoint['move_slides'], 3 ); ?>>3
1794
+ </option>
1795
+ <option value="4" <?php selected( $breakpoint['move_slides'], 4 ); ?>>4
1796
+ </option>
1797
+ </select>
1798
+ </label>
1799
+ <div class="option-desc singular"
1800
+ style="display: none;"><?php esc_html_e( 'slide', 'strong-testimonials' ); ?></div>
1801
+ <div class="option-desc plural"
1802
+ style="display: none;"><?php esc_html_e( 'slides', 'strong-testimonials' ); ?></div>
1803
+ </div>
1804
+ </div>
1805
+ <?php endforeach; ?>
1806
+ </div>
1807
+ </div>
1808
+ <div class="is-below">
1809
+ <input id="restore-default-breakpoints" type="button" name="restore-default-breakpoints"
1810
+ value="<?php esc_html_e( 'Restore Default Breakpoints', 'strong-testimonials' ); ?>"
1811
+ class="button-secondary"/>
1812
+ <span id="restored-message"><?php esc_html_e( 'defaults restored', 'strong-testimonials' ); ?></span>
1813
+ </div>
1814
+ </div>
1815
+ </td>
1816
+ <?php
1817
  }
1818
+
1819
+ /**
1820
+ * Render ST Slideshow transition
1821
+ *
1822
+ * @since 2.51.5
1823
+ */
1824
+ private function render_field_slideshow_transition() {
1825
+
1826
+ ?>
1827
+ <td>
1828
+ <div class="row">
1829
+ <div class="inline inline-middle">
1830
+ <label for="view-pause"><?php _ex( 'Show slides for', 'slideshow setting', 'strong-testimonials' ); ?></label>
1831
+ <input type="number" id="view-pause" class="input-incremental"
1832
+ name="view[data][slideshow_settings][pause]" min=".1" step=".1"
1833
+ value="<?php echo esc_attr( $this->view['slideshow_settings']['pause'] ); ?>" size="3"/>
1834
+ <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
1835
+ </div>
1836
+ <div class="inline inline-middle then then_slider_type then_show_single then_not_show_multiple fast"
1837
+ style="display: none;">
1838
+ <label for="view-effect"><?php esc_html_e( 'then', 'strong-testimonials' ); ?></label>
1839
+ <select id="view-effect" name="view[data][slideshow_settings][effect]" class="if selectnot">
1840
+ <?php foreach ( $this->view_options['slideshow_effect'] as $key => $label ) : ?>
1841
+ <option value="<?php echo esc_attr( $key ); ?>"
1842
+ <?php selected( $this->view['slideshow_settings']['effect'], $key ); ?>
1843
+ <?php echo 'none' == $key ? 'class="trip"' : ''; ?>><?php echo esc_html( $label ); ?></option>
1844
+ <?php endforeach; ?>
1845
+ </select>
1846
+ </div>
1847
+ <div class="inline inline-middle then then_slider_type then_not_show_single then_show_multiple fast"
1848
+ style="display: none;">
1849
+ <?php esc_html_e( 'then', 'strong-testimonials' ); ?><?php _ex( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ); ?>
1850
+ </div>
1851
+ <div class="inline inline-middle then then_effect then_none">
1852
+ <label for="view-speed"><?php esc_html_e( 'for', 'strong-testimonials' ); ?></label>
1853
+ <input type="number" id="view-speed" class="input-incremental"
1854
+ name="view[data][slideshow_settings][speed]" min=".1" step=".1"
1855
+ value="<?php echo esc_attr( $this->view['slideshow_settings']['speed'] ); ?>" size="3"/>
1856
+ <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
1857
+ </div>
1858
+ </div>
1859
+ </td>
1860
+ <?php
1861
+ }
1862
+
1863
+ /**
1864
+ * Render ST Slideshow behavior
1865
+ *
1866
+ * @since 2.51.5
1867
+ */
1868
+ private function render_field_slideshow_behavior() {
1869
+
1870
+ ?>
1871
+ <td>
1872
+ <div class="row">
1873
+ <div class="inline inline-middle">
1874
+ <input type="checkbox" id="view-auto_start" name="view[data][slideshow_settings][auto_start]"
1875
+ value="0" <?php checked( $this->view['slideshow_settings']['auto_start'] ); ?>
1876
+ class="checkbox">
1877
+ <label for="view-auto_start"><?php _ex( 'Start automatically', 'slideshow setting', 'strong-testimonials' ); ?></label>
1878
+ </div>
1879
+ </div>
1880
+ <div class="row">
1881
+ <div class="inline inline-middle">
1882
+ <input type="checkbox" id="view-continuous_sliding"
1883
+ name="view[data][slideshow_settings][continuous_sliding]"
1884
+ value="0" <?php checked( $this->view['slideshow_settings']['continuous_sliding'] ); ?>
1885
+ class="checkbox">
1886
+ <label for="view-continuous_sliding"><?php _ex( 'Continuous Sliding', 'slideshow setting', 'strong-testimonials' ); ?></label>
1887
+ </div>
1888
+ </div>
1889
+ <div class="row">
1890
+ <div class="inline inline-middle">
1891
+ <input type="checkbox" id="view-auto_hover" name="view[data][slideshow_settings][auto_hover]"
1892
+ value="0" <?php checked( $this->view['slideshow_settings']['auto_hover'] ); ?>
1893
+ class="checkbox">
1894
+ <label for="view-auto_hover"><?php _ex( 'Pause on hover', 'slideshow setting', 'strong-testimonials' ); ?></label>
1895
+ </div>
1896
+ </div>
1897
+ <div class="row">
1898
+ <div class="inline inline-middle">
1899
+ <input type="checkbox" id="view-stop_auto_on_click"
1900
+ name="view[data][slideshow_settings][stop_auto_on_click]"
1901
+ value="0" <?php checked( $this->view['slideshow_settings']['stop_auto_on_click'] ); ?>
1902
+ class="checkbox">
1903
+ <label for="view-stop_auto_on_click"><?php _ex( 'Stop on interaction', 'slideshow setting', 'strong-testimonials' ); ?></label>
1904
+ </div>
1905
+ <div class="inline inline-middle">
1906
+ <p class="description"><?php esc_html_e( 'Recommended if using navigation.', 'strong-testimonials' ); ?></p>
1907
+ </div>
1908
+ </div>
1909
+ <?php
1910
+ if ( $this->view['slideshow_settings']['adapt_height'] ) {
1911
+ $height = 'dynamic';
1912
+ } else {
1913
+ $height = 'static';
1914
+ }
1915
+ ?>
1916
+ <div class="row">
1917
+ <div class="row-inner">
1918
+ <div class="inline">
1919
+ <label for="view-slideshow_height">
1920
+ <select id="view-slideshow_height" name="view[data][slideshow_settings][height]"
1921
+ class="if selectgroup">
1922
+ <?php foreach ( $this->view_options['slideshow_height'] as $key => $type ) : ?>
1923
+ <option value="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
1924
+ <?php selected( $height, $key ); ?>>
1925
+ <?php echo esc_html( $type ); ?>
1926
+ </option>
1927
+ <?php endforeach; ?>
1928
+ </select>
1929
+ </label>
1930
+ </div>
1931
+ <div class="inline then then_slideshow_height then_dynamic then_not_static" style="display: none;">
1932
+ <label for="view-adapt_height_speed"><?php esc_html_e( 'Duration', 'strong-testimonials' ); ?></label>
1933
+ <input type="number" id="view-adapt_height_speed" class="input-incremental"
1934
+ name="view[data][slideshow_settings][adapt_height_speed]" min="0" step="0.1"
1935
+ value="<?php echo esc_attr( $this->view['slideshow_settings']['adapt_height_speed'] ); ?>"
1936
+ size="3"/>
1937
+ <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
1938
+ </div>
1939
+ <div class="inline then then_slideshow_height then_not_dynamic then_static" style="display: none;">
1940
+ <input type="checkbox" id="view-stretch" name="view[data][slideshow_settings][stretch]"
1941
+ value="1" <?php checked( $this->view['slideshow_settings']['stretch'] ); ?>
1942
+ class="checkbox">
1943
+ <label for="view-stretch"><?php esc_html_e( 'Stretch slides vertically', 'strong-testimonials' ); ?></label>
1944
+ <div class="inline description">
1945
+ <a href="#tab-panel-wpmtst-help-stretch"
1946
+ class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
1947
+ </div>
1948
+ </div>
1949
+ </div>
1950
+ </div>
1951
+ <div class="row tall">
1952
+ <p class="description"><?php esc_html_e( 'The slideshow will pause if the browser window becomes inactive.', 'strong-testimonials' ); ?></p>
1953
+ </div>
1954
+ </td>
1955
+ <?php
1956
+ }
1957
+
1958
+ /**
1959
+ * Render ST Slideshow navigation
1960
+ *
1961
+ * @since 2.51.5
1962
+ */
1963
+ private function render_field_slideshow_navigation() {
1964
+
1965
+ ?>
1966
+ <td>
1967
+ <div class="row">
1968
+ <div class="row-inner">
1969
+ <div class="inline">
1970
+ <label for="view-slideshow_controls_type"><?php esc_html_e( 'Controls', 'strong-testimonials' ); ?></label>
1971
+ <select id="view-slideshow_controls_type" name="view[data][slideshow_settings][controls_type]"
1972
+ class="if selectnot">
1973
+
1974
+ <?php foreach ( $this->view_options['slideshow_nav_method']['controls'] as $key => $type ) : ?>
1975
+ <option value="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
1976
+ <?php selected( $this->view['slideshow_settings']['controls_type'], $key ); ?>
1977
+ <?php if ( 'none' == $key ) {
1978
+ echo ' class="trip"';
1979
+ } ?>>
1980
+ <?php echo esc_html( $type['label'] ); ?>
1981
+ </option>
1982
+ <?php endforeach; ?>
1983
+
1984
+ </select>
1985
+ </div>
1986
+ <div class="inline then then_slideshow_controls_type" style="display: none;">
1987
+ <label for="view-slideshow_controls_style"><?php esc_html_e( 'Style', 'strong-testimonials' ); ?></label>
1988
+ <select id="view-slideshow_controls_style"
1989
+ name="view[data][slideshow_settings][controls_style]">
1990
+ <?php foreach ( $this->view_options['slideshow_nav_style']['controls'] as $key => $style ) : ?>
1991
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $this->view['slideshow_settings']['controls_style'], $key ); ?>><?php echo esc_html( $style['label'] ); ?></option>
1992
+ <?php endforeach; ?>
1993
+ </select>
1994
+ </div>
1995
+ </div>
1996
+ </div>
1997
+ <div class="row">
1998
+ <div class="row-inner then then_has-pager">
1999
+ <div class="inline">
2000
+ <label for="view-slideshow_pager_type"><?php esc_html_e( 'Pagination', 'strong-testimonials' ); ?></label>
2001
+ <select id="view-slideshow_pager_type" name="view[data][slideshow_settings][pager_type]"
2002
+ class="if selectnot">
2003
+
2004
+ <?php foreach ( $this->view_options['slideshow_nav_method']['pager'] as $key => $type ) : ?>
2005
+ <option value="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>"
2006
+ <?php selected( $this->view['slideshow_settings']['pager_type'], $key ); ?>
2007
+ <?php if ( 'none' == $key ) {
2008
+ echo ' class="trip"';
2009
+ } ?>>
2010
+ <?php echo esc_html( $type['label'] ); ?>
2011
+ </option>
2012
+ <?php endforeach; ?>
2013
+
2014
+ </select>
2015
+ </div>
2016
+ <div class="inline then then_slideshow_pager_type" style="display: none;">
2017
+ <label for="view-slideshow_pager_style"><?php esc_html_e( 'Style', 'strong-testimonials' ); ?></label>
2018
+ <select id="view-slideshow_pager_style" name="view[data][slideshow_settings][pager_style]"
2019
+ class="if selectnot">
2020
+ <?php foreach ( $this->view_options['slideshow_nav_style']['pager'] as $key => $style ) : ?>
2021
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $this->view['slideshow_settings']['pager_style'], $key ); ?>><?php echo esc_html( $style['label'] ); ?></option>
2022
+ <?php endforeach; ?>
2023
+ </select>
2024
+ </div>
2025
+ </div>
2026
+ </div>
2027
+ <div class="row">
2028
+ <div class="row-inner">
2029
+ <div class="then then_slider_type then_show_single then_not_show_multiple" style="display: none;">
2030
+ <div class="inline then then_has-position" style="display: none;">
2031
+ <label for="view-slideshow_nav_position"><?php esc_html_e( 'Position', 'strong-testimonials' ); ?></label>
2032
+ <select id="view-slideshow_nav_position"
2033
+ name="view[data][slideshow_settings][nav_position]">
2034
+ <?php foreach ( $this->view_options['slideshow_nav_position'] as $key => $label ) : ?>
2035
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $this->view['slideshow_settings']['nav_position'], $key ); ?>><?php echo esc_html( $label ); ?></option>
2036
+ <?php endforeach; ?>
2037
+ </select>
2038
+ <?php //esc_html_e( 'outside', 'strong-testimonials' ); ?>
2039
+ <?php esc_html_e( 'the testimonial frame', 'strong-testimonials' ); ?>
2040
+ </div>
2041
+ </div>
2042
+ </div>
2043
+ </div>
2044
+ </td>
2045
+ <?php
2046
+ }
2047
+
2048
+ /**
2049
+ * Render ST form category field
2050
+ *
2051
+ * @since 2.51.5
2052
+ */
2053
+ private function render_field_form_category() {
2054
+
2055
+ if ( $this->cat_count ) : ?>
2056
+ <td>
2057
+ <div class="table">
2058
+
2059
+ <?php if ( $this->cat_count > 5 ) : ?>
2060
+ <div class="table-row">
2061
+ <div class="table-cell">
2062
+ <div class="row" style="text-align: right; padding-bottom: 5px;">
2063
+ <input type="button" class="expand-cats button" value="expand list"/>
2064
+ </div>
2065
+ </div>
2066
+ </div>
2067
+ <?php endif; ?>
2068
+
2069
+ <div class="table-row">
2070
+ <div class="table-cell">
2071
+ <?php wpmtst_form_category_checklist( $this->view_cats_array ); ?>
2072
+ </div>
2073
+ </div>
2074
+ </div>
2075
+ </td>
2076
+ <?php else : ?>
2077
+ <td>
2078
+ <p class="description tall"><?php esc_html_e( 'No categories found', 'strong-testimonials' ); ?></p>
2079
+ </td>
2080
+ <?php endif;
2081
+ }
2082
+
2083
+ /**
2084
+ * Render ST form AJAX field
2085
+ *
2086
+ * @since 2.51.5
2087
+ */
2088
+ private function render_field_form_ajax() {
2089
+
2090
+ ?>
2091
+ <td>
2092
+ <p class="description tall"><?php _e( 'This will override the <strong>Success Redirect</strong> setting.', 'strong-testimonials' ); ?></p>
2093
+ </td>
2094
+ <?php
2095
+ }
2096
+
2097
+ /**
2098
+ * Render ST template list field
2099
+ *
2100
+ * @since 2.51.5
2101
+ */
2102
+ private function render_field_template_list() {
2103
+
2104
+ // Assemble list of templates
2105
+ $templates = array(
2106
+ 'display' => WPMST()->templates->get_templates( 'display' ),
2107
+ 'form' => WPMST()->templates->get_templates( 'form' ),
2108
+ );
2109
+ $template_found = in_array( $this->view['template'], WPMST()->templates->get_template_keys() );
2110
+
2111
+ ?>
2112
+ <td colspan="2">
2113
+ <div id="view-template-list">
2114
+ <div class="radio-buttons">
2115
+
2116
+ <?php if ( ! $template_found ) : ?>
2117
+ <ul class="radio-list template-list">
2118
+ <li>
2119
+ <div>
2120
+ <input class="error" type="radio"
2121
+ id="<?php echo esc_attr( $this->view['template'] ); ?>"
2122
+ name="view[data][<?php echo esc_attr( $this->current_mode ); ?>]"
2123
+ value="<?php echo esc_attr( $this->view['template'] ); ?>" checked>
2124
+ <label for="<?php echo esc_attr( $this->view['template'] ); ?>"><?php echo esc_html( $this->view['template'] ); ?></label>
2125
+ </div>
2126
+ <div class="template-description">
2127
+ <p>
2128
+ <span class="dashicons dashicons-warning error"></span>&nbsp;
2129
+ <span class="error"><?php esc_html_e( 'not found', 'strong-testimonials' ); ?></span>
2130
+ </p>
2131
+ </div>
2132
+ </li>
2133
+ </ul>
2134
+ <?php endif; ?>
2135
+
2136
+ <ul class="radio-list template-list">
2137
+
2138
+ <?php foreach ( $templates[ $this->current_type ] as $key => $template ) : ?>
2139
+ <li>
2140
+ <div>
2141
+ <input type="radio" id="template-<?php echo esc_attr( $key ); ?>"
2142
+ name="view[data][<?php echo esc_attr( $this->current_mode ); ?>]"
2143
+ value="<?php echo esc_attr( $key ); ?>" <?php checked( $key, $this->view['template'] ); ?>>
2144
+ <label for="template-<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $template['config']['name'] ); ?></label>
2145
+ </div>
2146
+ <div class="template-description">
2147
+ <p><?php echo( isset( $template['config']['description'] ) && $template['config']['description'] ? esc_html( $template['config']['description'] ) : __( 'no description', 'strong-testimonials' ) ) ?></p>
2148
+ <div class="options">
2149
+ <div>
2150
+ <?php if ( ! isset( $template['config']['options'] ) || ! is_array( $template['config']['options'] ) ) : ?>
2151
+ <span><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></span>
2152
+ <?php else : ?>
2153
+ <?php foreach ( $template['config']['options'] as $option ) : ?>
2154
+ <div style="margin-bottom: 10px;">
2155
+ <?php
2156
+ $name = sprintf( 'view[data][template_settings][%s][%s]', esc_attr( $key ), esc_attr( $option->name ) );
2157
+ $id = $key . '-' . $option->name;
2158
+
2159
+ switch ( $option->type ) {
2160
+ case 'select':
2161
+
2162
+ // Get default if not set
2163
+ if ( ! isset( $this->view['template_settings'][ $key ][ $option->name ] ) ) {
2164
+ $this->view['template_settings'][ $key ][ $option->name ] = $option->default;
2165
+ }
2166
+
2167
+ if ( $option->label ) {
2168
+ printf( '<label for="%s">%s</label>', esc_attr( $id ), wp_kses_post( $option->label ) );
2169
+ }
2170
+
2171
+ printf( '<select id="%s" name="%s">', esc_attr( $id ), $name );
2172
+
2173
+ foreach ( $option->values as $value ) {
2174
+ $selected = selected( $value->value, $this->view['template_settings'][ $key ][ $option->name ], false );
2175
+ printf( '<option value="%s" %s>%s</option>', esc_attr( $value->value ), $selected, esc_html( $value->description ) );
2176
+ }
2177
+
2178
+ echo '</select>';
2179
+ break;
2180
+ case 'radio':
2181
+
2182
+ if ( ! isset( $this->view['template_settings'][ $key ][ $option->name ] ) ) {
2183
+ $this->view['template_settings'][ $key ][ $option->name ] = $option->default;
2184
+ }
2185
+
2186
+ foreach ( $option->values as $value ) {
2187
+ $checked = checked( $value->value, $this->view['template_settings'][ $key ][ $option->name ], false );
2188
+ printf( '<input type="radio" id="%s" name="%s" value="%s" %s>', esc_attr( $id ), $name, esc_attr( $value->value ), $checked );
2189
+ printf( '<label for="%s">%s</label>', esc_attr( $id ), esc_html( $value->description ) );
2190
+ }
2191
+
2192
+ break;
2193
+ case 'colorpicker':
2194
+
2195
+ if ( $option->label ) {
2196
+ printf( '<label for="%s">%s</label>', esc_attr( $id ), esc_html( $option->label ) );
2197
+ }
2198
+
2199
+ $value = isset( $this->view['template_settings'][ $key ][ $option->name ] ) ? $this->view['template_settings'][ $key ][ $option->name ] : $option->default;
2200
+ printf( '<input type="text" class="wp-color-picker-field" data-alpha="true" id="%s" name="%s" value="%s">', esc_attr( $id ), $name, esc_attr( $value ) );
2201
+ break;
2202
+ default:
2203
+ do_action( 'wpmtst_views_render_template_option_' . $option->type, $this->view, $key, $option );
2204
+ break;
2205
+ }
2206
+ ?>
2207
+ </div>
2208
+ <?php endforeach; ?>
2209
+
2210
+ <?php endif; ?>
2211
+ </div>
2212
+ </div>
2213
+ <?php do_action( 'wpmtst_views_after_template_options', $this->view, $template, $key ); ?>
2214
+ </div>
2215
+ </li>
2216
+ <?php endforeach; ?>
2217
+
2218
+ </ul>
2219
+ </div>
2220
+ </div>
2221
+ <?php do_action( 'wpmtst_views_after_template_list' ); ?>
2222
+ </td>
2223
+ <?php
2224
+ }
2225
+
2226
+ /**
2227
+ * Render ST layout field
2228
+ *
2229
+ * @since 2.51.5
2230
+ */
2231
+ private function render_field_layout() { ?>
2232
+ <td colspan="2">
2233
+ <div class="section-radios layout-section">
2234
+ <div class="radio-buttons">
2235
+ <ul class="radio-list layout-list">
2236
+ <li>
2237
+ <input type="radio" id="view-layout-normal" name="view[data][layout]"
2238
+ value="" <?php checked( false, $this->view['layout'] ); ?>>
2239
+ <label for="view-layout-normal"><?php esc_html_e( 'normal', 'strong-testimonials' ); ?></label>
2240
+ </li>
2241
+ <li>
2242
+ <input type="radio" id="view-layout-masonry" name="view[data][layout]"
2243
+ value="masonry" <?php checked( 'masonry', $this->view['layout'] ); ?>>
2244
+ <label for="view-layout-masonry"><?php esc_html_e( 'Masonry', 'strong-testimonials' ); ?> </label>
2245
+ </li>
2246
+ <li>
2247
+ <input type="radio"
2248
+ id="view-layout-columns"
2249
+ name="view[data][layout]"
2250
+ value="columns" <?php checked( 'columns', $this->view['layout'] ); ?>>
2251
+ <label for="view-layout-columns">
2252
+ <?php esc_html_e( 'columns', 'strong-testimonials' ); ?>
2253
+ </label>
2254
+ </li>
2255
+ <li>
2256
+ <input type="radio" id="view-layout-grid" name="view[data][layout]"
2257
+ value="grid" <?php checked( 'grid', $this->view['layout'] ); ?>>
2258
+ <label for="view-layout-grid"><?php esc_html_e( 'grid', 'strong-testimonials' ); ?></label>
2259
+ </li>
2260
+ </ul>
2261
+ </div>
2262
+ <div>
2263
+ <div class="radio-description" id="view-layout-info">
2264
+ <div class="layout-description view-layout-normal">
2265
+ <p><?php esc_html_e( 'A single column.', 'strong-testimonials' ); ?></p>
2266
+ </div>
2267
+ <div class="layout-description view-layout-masonry">
2268
+ <p><?php printf( __( 'A cascading, responsive grid using the jQuery plugin <a href="%s" target="_blank">Masonry</a>.', 'strong-testimonials' ), esc_url( 'http://masonry.desandro.com/' ) ); ?></p>
2269
+ <p><?php esc_html_e( 'The universal solution that works well regardless of testimonial lengths.', 'strong-testimonials' ); ?></p>
2270
+ <p><?php esc_html_e( 'Not compatible with pagination.', 'strong-testimonials' ); ?></p>
2271
+ </div>
2272
+ <div class="layout-description view-layout-columns">
2273
+ <p><?php printf( __( 'Using <a href="%s" target="_blank">CSS multi-column</a>. Fill from top to bottom, then over to next column.', 'strong-testimonials' ), esc_url( 'https://css-tricks.com/guide-responsive-friendly-css-columns/' ) ); ?></p>
2274
+ <p><?php esc_html_e( 'Works well with both long and short testimonials.', 'strong-testimonials' ); ?></p>
2275
+ <p><?php esc_html_e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
2276
+ </div>
2277
+ <div class="layout-description view-layout-grid">
2278
+ <p><?php
2279
+ $url = 'https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties';
2280
+ printf( __( 'Using <a href="%s" target="_blank">CSS flexbox</a>.', 'strong-testimonials' ), esc_url( $url ) ); ?>
2281
+ </p>
2282
+ <p><?php esc_html_e( 'Testimonials will be equal height so this works best when they are about the same length either naturally or using excerpts.', 'strong-testimonials' ); ?></p>
2283
+ <p><?php esc_html_e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
2284
+ </div>
2285
+ </div>
2286
+ <div class="radio-description options" id="column-count-wrapper">
2287
+ <div>
2288
+ <label for="view-column-count"><?php esc_html_e( 'Number of columns', 'strong-testimonials' ); ?></label>
2289
+ <select id="view-column-count" name="view[data][column_count]">
2290
+ <option value="2" <?php selected( $this->view['column_count'], 2 ); ?>>2</option>
2291
+ <option value="3" <?php selected( $this->view['column_count'], 3 ); ?>>3</option>
2292
+ <option value="4" <?php selected( $this->view['column_count'], 4 ); ?>>4</option>
2293
+ </select>
2294
+ </div>
2295
+ </div>
2296
+ </div>
2297
+ <div>
2298
+ <div class="layout-example view-layout-normal">
2299
+ <div class="example-container">
2300
+ <div class="box"><span>1</span></div>
2301
+ <div class="box size2"><span>2</span></div>
2302
+ <div class="box"><span>3</span></div>
2303
+ <div class="box size2"><span>4</span></div>
2304
+ <div class="box"><span>5</span></div>
2305
+ </div>
2306
+ </div>
2307
+ <div class="layout-example view-layout-masonry">
2308
+ <div class="example-container col-2">
2309
+ <div class="grid-sizer"></div>
2310
+ <div class="box"><span>1</span></div>
2311
+ <div class="box size2"><span>2</span></div>
2312
+ <div class="box"><span>3</span></div>
2313
+ <div class="box size3"><span>4</span></div>
2314
+ <div class="box"><span>5</span></div>
2315
+ <div class="box size2"><span>6</span></div>
2316
+ <div class="box"><span>7</span></div>
2317
+ <div class="box size3"><span>8</span></div>
2318
+ <div class="box"><span>9</span></div>
2319
+ </div>
2320
+ </div>
2321
+ <div class="layout-example view-layout-columns">
2322
+ <div class="example-container col-2">
2323
+ <div class="box"><span>1</span></div>
2324
+ <div class="box size2"><span>2</span></div>
2325
+ <div class="box"><span>3</span></div>
2326
+ <div class="box size3"><span>4</span></div>
2327
+ <div class="box"><span>5</span></div>
2328
+ <div class="box size2"><span>6</span></div>
2329
+ <div class="box"><span>7</span></div>
2330
+ <div class="box size3"><span>8</span></div>
2331
+ <div class="box"><span>9</span></div>
2332
+ </div>
2333
+ </div>
2334
+ <div class="layout-example view-layout-grid">
2335
+ <div class="example-container col-2">
2336
+ <div class="box"><span>1</span></div>
2337
+ <div class="box"><span>2</span></div>
2338
+ <div class="box"><span>3</span></div>
2339
+ <div class="box"><span>4</span></div>
2340
+ <div class="box"><span>5</span></div>
2341
+ <div class="box"><span>6</span></div>
2342
+ <div class="box"><span>7</span></div>
2343
+ <div class="box"><span>8</span></div>
2344
+ <div class="box"><span>9</span></div>
2345
+ </div>
2346
+ </div>
2347
+ </div>
2348
+ </div>
2349
+ </td>
2350
+ <?php
2351
+ }
2352
+
2353
+ /**
2354
+ * Render ST background field
2355
+ *
2356
+ * @since 2.51.5
2357
+ */
2358
+ private function render_field_background() {
2359
+
2360
+ ?>
2361
+ <td>
2362
+ <div class="section-radios background-section">
2363
+ <div class="radio-buttons">
2364
+ <ul class="radio-list background-list">
2365
+ <li>
2366
+ <input type="radio" id="bg-none" name="view[data][background][type]"
2367
+ value="" <?php checked( $this->view['background']['type'], '' ); ?>>
2368
+ <label for="bg-none"><?php esc_html_e( 'inherit from theme', 'strong-testimonials' ); ?></label>
2369
+ </li>
2370
+ <li>
2371
+ <input type="radio" id="bg-single" name="view[data][background][type]"
2372
+ value="single" <?php checked( $this->view['background']['type'], 'single' ); ?>>
2373
+ <label for="bg-single"><?php esc_html_e( 'single color', 'strong-testimonials' ); ?></label>
2374
+ </li>
2375
+ <li>
2376
+ <input type="radio" id="bg-gradient" name="view[data][background][type]"
2377
+ value="gradient" <?php checked( $this->view['background']['type'], 'gradient' ); ?>>
2378
+ <label for="bg-gradient"><?php esc_html_e( 'gradient', 'strong-testimonials' ); ?></label>
2379
+ </li>
2380
+ <li>
2381
+ <input type="radio" id="bg-preset" name="view[data][background][type]"
2382
+ value="preset" <?php checked( $this->view['background']['type'], 'preset' ); ?>>
2383
+ <label for="bg-preset"><?php esc_html_e( 'preset', 'strong-testimonials' ); ?></label>
2384
+ </li>
2385
+ </ul>
2386
+ </div>
2387
+ <div class="radio-description" id="view-background-info">
2388
+ <div class="background-description bg-none">
2389
+ <div class="description-inner options">
2390
+ <div>
2391
+ <?php esc_html_e( 'No options', 'strong-testimonials' ); ?>
2392
+ </div>
2393
+ </div>
2394
+ </div>
2395
+ <div class="background-description bg-single">
2396
+ <div class="description-inner options">
2397
+ <div>
2398
+ <label>
2399
+ <input type="text" id="bg-color" name="view[data][background][color]"
2400
+ value="<?php echo esc_attr( $this->view['background']['color'] ); ?>"
2401
+ class="wp-color-picker-field">
2402
+ </label>
2403
+ </div>
2404
+ </div>
2405
+ </div>
2406
+ <div class="background-description bg-gradient">
2407
+ <div class="description-inner options">
2408
+ <div>
2409
+ <div class="color-picker-wrap">
2410
+ <div>
2411
+ <label for="bg-gradient1"><?php esc_html_e( 'From top', 'strong-testimonials' ); ?></label>
2412
+ </div>
2413
+ <div><input type="text" id="bg-gradient1" name="view[data][background][gradient1]"
2414
+ value="<?php echo esc_attr( $this->view['background']['gradient1'] ); ?>"
2415
+ class="wp-color-picker-field gradient"></div>
2416
+ </div>
2417
+ </div>
2418
+ </div>
2419
+ <div class="description-inner options">
2420
+ <div>
2421
+ <div class="color-picker-wrap">
2422
+ <div>
2423
+ <label for="bg-gradient2"><?php esc_html_e( 'To bottom', 'strong-testimonials' ); ?></label>
2424
+ </div>
2425
+ <div><input type="text" id="bg-gradient2" name="view[data][background][gradient2]"
2426
+ value="<?php echo esc_attr( $this->view['background']['gradient2'] ); ?>"
2427
+ class="wp-color-picker-field gradient"></div>
2428
+ </div>
2429
+ </div>
2430
+ </div>
2431
+ </div>
2432
+
2433
+ <div class="background-description bg-preset">
2434
+ <div class="description-inner options">
2435
+ <div>
2436
+ <label for="view-background-preset">
2437
+ <select id="view-background-preset" name="view[data][background][preset]">
2438
+ <?php
2439
+ $presets = wpmtst_get_background_presets();
2440
+ $current_preset = ( isset( $this->view['background']['preset'] ) && $this->view['background']['preset'] ) ? $this->view['background']['preset'] : '';
2441
+ echo '<option value="" ' . selected( $current_preset, '', false ) . '>&mdash;</option>';
2442
+ foreach ( $presets as $key => $preset ) {
2443
+ echo '<option value="' . esc_attr( $key ) . '" ' . selected( $current_preset, $key, false ) . '>' . esc_html( $preset['label'] ) . '</option>';
2444
+ }
2445
+ ?>
2446
+ </select>
2447
+ </label>
2448
+ </div>
2449
+ </div>
2450
+ </div>
2451
+ </div>
2452
+ </div>
2453
+ </td>
2454
+
2455
+ <td rowspan="2" class="rowspan">
2456
+ <div id="view-color-preview" class="table-cell">
2457
+ <div class="background-preview-wrap">
2458
+ <div id="background-preview">
2459
+ Lorem ipsum dolor sit amet, accusam complectitur an eos. No vix perpetua adolescens, vix vidisse
2460
+ maiorum
2461
+ in. No erat falli scripta qui, vis ubique scripta electram ad. Vix prompta adipisci no, ad
2462
+ vidisse
2463
+ expetendis.
2464
+ </div>
2465
+ </div>
2466
+ </div>
2467
+ </td>
2468
+ <?php
2469
+ }
2470
+
2471
+ /**
2472
+ * Render ST color field
2473
+ *
2474
+ * @since 2.51.5
2475
+ */
2476
+ private function render_field_color() {
2477
+
2478
+ ?>
2479
+ <td>
2480
+ <div class="section-radios font-color-section">
2481
+ <div class="radio-buttons">
2482
+ <ul class="radio-list font-folor-list">
2483
+ <li>
2484
+ <input type="radio" id="fc-none" name="view[data][font-color][type]"
2485
+ value="" <?php checked( $this->view['font-color']['type'], '' ); ?>>
2486
+ <label for="fc-none"><?php esc_html_e( 'inherit from theme', 'strong-testimonials' ); ?></label>
2487
+ </li>
2488
+ <li>
2489
+ <input type="radio" id="fc-custom" name="view[data][font-color][type]"
2490
+ value="custom" <?php checked( $this->view['font-color']['type'], 'custom' ); ?>>
2491
+ <label for="fc-custom"><?php esc_html_e( 'custom', 'strong-testimonials' ); ?></label>
2492
+ </li>
2493
+ </ul>
2494
+ </div>
2495
+ <div class="radio-description" id="view-font-color-info">
2496
+ <div class="font-color-description fc-none">
2497
+ <div class="description-inner options">
2498
+ <div><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></div>
2499
+ </div>
2500
+ </div>
2501
+ <div class="font-color-description fc-custom">
2502
+ <div class="description-inner options">
2503
+ <div>
2504
+ <label>
2505
+ <input type="text" id="fc-color" name="view[data][font-color][color]"
2506
+ value="<?php echo esc_attr( $this->view['font-color']['color'] ); ?>"
2507
+ class="wp-color-picker-field">
2508
+ </label>
2509
+ </div>
2510
+ </div>
2511
+ </div>
2512
+ </div>
2513
+ </div>
2514
+ </td>
2515
+ <?php
2516
+ }
2517
+
2518
+ /**
2519
+ * Render ST class field
2520
+ *
2521
+ * @since 2.51.5
2522
+ */
2523
+ private function render_field_classes() {
2524
+
2525
+ ?>
2526
+ <td colspan="2">
2527
+ <div class="then then_display then_form then_slideshow input" style="display: none;">
2528
+ <input type="text" id="view-class" class="long inline" name="view[data][class]"
2529
+ value="<?php echo esc_attr( $this->view['class'] ); ?>">
2530
+ <p class="inline description tall">
2531
+ <?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?>
2532
+ <?php esc_html_e( 'Separate class names by spaces.', 'strong-testimonials' ); ?>
2533
+ </p>
2534
+ </div>
2535
+ </td>
2536
+ <?php
2537
+ }
2538
+
2539
+ /**
2540
+ * Render divi field
2541
+ *
2542
+ * @since 2.51.5
2543
+ */
2544
+ private function render_field_divi() {
2545
+
2546
+ ?>
2547
+ <td>
2548
+ <div class="row">
2549
+ <div class="row-inner">
2550
+ <input type="checkbox" id="view-divi_builder" class="if toggle checkbox"
2551
+ name="view[data][divi_builder]" value="1" <?php checked( $this->view['divi_builder'] ); ?>/>
2552
+ <label for="view-divi_builder"><?php esc_html_e( 'Check this if adding this view (via shortcode or widget) using the Visual Builder in <b>Divi Builder version 2</b>.', 'strong-testimonials' ); ?></label>
2553
+ <p class="description short"><?php esc_html_e( 'Not required if simply adding this view in the default editor.', 'strong-testimonials' ); ?></p>
2554
+ <p class="description short"><?php esc_html_e( 'Not required if simply adding this view in the <b>Divi theme</b> using either the default editor or Divi Builder.', 'strong-testimonials' ); ?></p>
2555
+ </div>
2556
+ </div>
2557
+ </td>
2558
+ <?php
2559
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2560
  }
admin/class-strong-testimonials-review.php CHANGED
@@ -38,6 +38,8 @@ class Strong_Review {
38
  add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
39
  }
40
 
 
 
41
  }
42
 
43
  private function check() {
@@ -149,6 +151,20 @@ class Strong_Review {
149
 
150
  <?php
151
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
153
 
154
  new Strong_Review();
38
  add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
39
  }
40
 
41
+ add_filter('st_uninstall_db_options',array($this,'uninstall_options'));
42
+
43
  }
44
 
45
  private function check() {
151
 
152
  <?php
153
  }
154
+
155
+ /**
156
+ * @param $options
157
+ *
158
+ * @return mixed
159
+ *
160
+ * @since 2.51.6
161
+ */
162
+ public function uninstall_options( $options ) {
163
+
164
+ $options[] = 'strong-testimonials-rate-time';
165
+
166
+ return $options;
167
+ }
168
  }
169
 
170
  new Strong_Review();
admin/class-strong-testimonials-upsell.php CHANGED
@@ -159,7 +159,6 @@ class Strong_Testimonials_Upsell {
159
  <ul>
160
  <?php foreach ( $general_upsells as $general_upsell ) { ?>
161
  <li>
162
- <span class="dashicons dashicons-yes"></span>
163
  <span>
164
  <?php echo wp_kses_post($general_upsell); ?>
165
  </span>
159
  <ul>
160
  <?php foreach ( $general_upsells as $general_upsell ) { ?>
161
  <li>
 
162
  <span>
163
  <?php echo wp_kses_post($general_upsell); ?>
164
  </span>
admin/js/views.js CHANGED
@@ -1154,6 +1154,13 @@ jQuery(document).ready(function ($) {
1154
  typeSelect.parent().hide();
1155
  break;
1156
  }
 
 
 
 
 
 
 
1157
 
1158
  if ('platform' === fieldType) {
1159
  typeSelect.val('platform').prop('disabled', true);
@@ -1402,23 +1409,16 @@ jQuery(document).ready(function ($) {
1402
  if (inp && inp.select) {
1403
 
1404
  // select text
1405
- inp.trigger('select');
1406
-
1407
- try {
1408
- // copy text
1409
- document.execCommand('copy');
1410
- inp.trigger('blur');
1411
-
1412
- //t.classList.add('copied');
1413
- //setTimeout(function() { t.classList.remove('copied'); }, 1500);
1414
- document.getElementById('copy-message').classList.add('copied');
1415
- setTimeout(function () {
1416
- document.getElementById('copy-message').classList.remove('copied');
1417
- }, 2000);
1418
- }
1419
- catch (err) {
1420
- alert('Sorry, please press Ctrl/Cmd+C to copy instead.');
1421
- }
1422
 
1423
  }
1424
 
1154
  typeSelect.parent().hide();
1155
  break;
1156
  }
1157
+
1158
+ if ('video_record' === fieldType || fieldValue == 'video_file') {
1159
+ typeSelect.val('video_record').prop('disabled', true);
1160
+ typeSelectParent.append('<input type="hidden" class="save-type" name="' + source + '[client_section][' + key + '][save-type]" value="video_record">');
1161
+ typeSelect.parent().hide();
1162
+ break;
1163
+ }
1164
 
1165
  if ('platform' === fieldType) {
1166
  typeSelect.val('platform').prop('disabled', true);
1409
  if (inp && inp.select) {
1410
 
1411
  // select text
1412
+ inp.focus();
1413
+ inp.select();
1414
+
1415
+ // copy text
1416
+ document.execCommand('copy');
1417
+ document.getElementById('copy-message').classList.add('copied');
1418
+
1419
+ setTimeout(function () {
1420
+ document.getElementById('copy-message').classList.remove('copied');
1421
+ }, 2000);
 
 
 
 
 
 
 
1422
 
1423
  }
1424
 
admin/settings/class-strong-testimonials-form.php CHANGED
@@ -46,7 +46,7 @@ class Strong_Testimonials_Forms {
46
  ?>
47
  <div class="wrap wpmtst">
48
 
49
- <h1><?php echo wp_kses_post( apply_filters( 'wpmtst_cpt_singular_name', esc_html__( 'Forms', 'strong-testimonials' ) ) ); ?></h1>
50
 
51
  <?php do_action( 'wpmtst_testimonials_settings' ); ?>
52
 
46
  ?>
47
  <div class="wrap wpmtst">
48
 
49
+ <h1><?php echo wp_kses_post( apply_filters( 'wpmtst_cpt_singular_name', esc_html__( 'Form', 'strong-testimonials' ) ) ); ?></h1>
50
 
51
  <?php do_action( 'wpmtst_testimonials_settings' ); ?>
52
 
admin/settings/partials/general.php CHANGED
@@ -210,7 +210,7 @@ $options = get_option( 'wpmtst_options' );
210
  <label>
211
  <input type="checkbox" name="wpmtst_options[noopener]" <?php checked( $options['noopener'] ); ?>>
212
  <?php _e( 'Add <code>rel="noopener"</code> to URL custom fields.', 'strong-testimonials' ); ?>
213
- <?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
214
  </label>
215
  </fieldset>
216
  </td>
@@ -225,13 +225,13 @@ $options = get_option( 'wpmtst_options' );
225
  <label>
226
  <input type="checkbox" name="wpmtst_options[noreferrer]" <?php checked( $options['noreferrer'] ); ?>>
227
  <?php _e( 'Add <code>rel="noreferrer"</code> to URL custom fields.', 'strong-testimonials' ); ?>
228
- <?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
229
  </label>
230
  </fieldset>
231
  </td>
232
  </tr>
233
 
234
- <?php if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true ) ) : ?>
235
  <tr valign="top">
236
  <th scope="row">
237
  <?php esc_html_e( 'Lazy Loading', 'strong-testimonials' ); ?>
210
  <label>
211
  <input type="checkbox" name="wpmtst_options[noopener]" <?php checked( $options['noopener'] ); ?>>
212
  <?php _e( 'Add <code>rel="noopener"</code> to URL custom fields.', 'strong-testimonials' ); ?>
213
+ <?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
214
  </label>
215
  </fieldset>
216
  </td>
225
  <label>
226
  <input type="checkbox" name="wpmtst_options[noreferrer]" <?php checked( $options['noreferrer'] ); ?>>
227
  <?php _e( 'Add <code>rel="noreferrer"</code> to URL custom fields.', 'strong-testimonials' ); ?>
228
+ <?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
229
  </label>
230
  </fieldset>
231
  </td>
232
  </tr>
233
 
234
+ <?php if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true, 'img', 'strong_testimonials_has_lazyload' ) ) : ?>
235
  <tr valign="top">
236
  <th scope="row">
237
  <?php esc_html_e( 'Lazy Loading', 'strong-testimonials' ); ?>
admin/uninstall/class-strong-testimonials-uninstall.php CHANGED
@@ -163,7 +163,7 @@ class Strong_Testimonials_Uninstall {
163
  // Delete options
164
  if ( '1' == $uninstall_option['delete_options'] ) {
165
  // filter for options to be added by Strong Testimonial's add-ons
166
- $options_array = apply_filters( 'st_uninstall_db_options', array( 'wpmtst_options', 'wpmtst_admin_notices', 'wpmtst_plugin_version', 'wpmtst_compat_options', 'wpmtst_do_activation_redirect', 'wpmtst_config_errors', 'wpmtst_history', 'wpmtst_addons', 'wpmtst_update_log', 'wpmtst_db_version', 'wpmtst_custom_forms', 'wpmtst_fields', 'wpmtst_form_options', 'strong_testimonials_license_key', 'wpmtst_sticky_views', 'wpmtst_view_options', 'wpmtst_importer_options', 'wpmtst_view_default', 'wpmtst_base_forms', 'widget_strong-testimonials-view-widget' ) );
167
 
168
  foreach ( $options_array as $db_option ) {
169
  delete_option( $db_option );
163
  // Delete options
164
  if ( '1' == $uninstall_option['delete_options'] ) {
165
  // filter for options to be added by Strong Testimonial's add-ons
166
+ $options_array = apply_filters( 'st_uninstall_db_options', array( 'wpmtst_options', 'wpmtst_admin_notices','wpmtst_auto_dismiss_notices', 'wpmtst_plugin_version', 'wpmtst_compat_options', 'wpmtst_do_activation_redirect', 'wpmtst_config_errors', 'wpmtst_history', 'wpmtst_addons', 'wpmtst_update_log', 'wpmtst_db_version', 'wpmtst_custom_forms', 'wpmtst_fields', 'wpmtst_form_options', 'strong_testimonials_license_key', 'wpmtst_sticky_views', 'wpmtst_view_options', 'wpmtst_importer_options', 'wpmtst_view_default', 'wpmtst_base_forms', 'widget_strong-testimonials-view-widget' ) );
167
 
168
  foreach ( $options_array as $db_option ) {
169
  delete_option( $db_option );
admin/views-validate.php CHANGED
@@ -211,7 +211,7 @@ function wpmtst_sanitize_view_readmore( $data, $input, $default_view ) {
211
  if ( isset( $input['more_page'] ) && $input['more_page'] ) {
212
 
213
  // Check the "ID or slug" field first
214
- if ( $input['more_page_id2'] ) {
215
 
216
  // is post ID?
217
  $id = sanitize_text_field( $input['more_page_id2'] );
211
  if ( isset( $input['more_page'] ) && $input['more_page'] ) {
212
 
213
  // Check the "ID or slug" field first
214
+ if ( isset($input['more_page_id2']) && !empty($input['more_page_id2']) ) {
215
 
216
  // is post ID?
217
  $id = sanitize_text_field( $input['more_page_id2'] );
admin/views.php CHANGED
@@ -338,8 +338,9 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
338
  'rating' => esc_html__( 'rating', 'strong-testimonials' ),
339
  'platform' => esc_html__( 'platform', 'strong-testimonials' ),
340
  'shortcode' => esc_html__( 'shortcode', 'strong-testimonials' ),
341
- 'checkbox' => esc_html__('checkbox', 'strong-testimonials'),
342
- 'video' => esc_html__('video', 'strong-testimonials')
 
343
  );
344
 
345
  if ( isset( $custom_fields[ $field['field'] ] ) ) {
@@ -356,8 +357,9 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
356
  $all_field_names = array_merge( array_keys( $custom_fields), array( 'post_date', 'submit_date', 'category', 'platform' ) );
357
  $label_class = '';
358
  if ( ! $adding && ! in_array( $field['field'], $all_field_names ) ) {
359
- $field_label .= ' < ERROR - not found >';
360
- $label_class = 'error';
 
361
  }
362
  ?>
363
  <div id="field-<?php echo esc_attr( $key ); ?>" class="field2">
@@ -408,13 +410,13 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
408
  </div>
409
 
410
  <!-- FIELD TYPE -->
411
- <div class="field-property field-type field-dep" <?php if ( $adding || in_array($field['type'], array('checkbox', 'video') ) ) echo ' style="display: none;"'; ?>>
412
  <label for="client_section_<?php echo esc_attr( $key ); ?>_type">
413
  <?php esc_html_e( 'Display Type', 'strong-testimonials' ); ?>
414
  </label>
415
  <select id="client_section_<?php echo esc_attr( $key ); ?>_type" name="<?php echo esc_attr( $source )?>[client_section][<?php echo esc_attr( $key ); ?>][type]" <?php echo ($field['type'] == 'checkbox' ? 'readonly' : '') ?>>
416
  <?php foreach ( $types as $type => $type_label ) : ?>
417
- <option value="<?php echo esc_attr( $type ); ?>" <?php selected( $type, $field['type'] ); ?> <?php echo(in_array($type, array('checkbox', 'video')) ? 'style="display:none"' : '') ?>><?php esc_html_e( $type_label ); ?></option>
418
  <?php endforeach; ?>
419
  </select>
420
  </div>
338
  'rating' => esc_html__( 'rating', 'strong-testimonials' ),
339
  'platform' => esc_html__( 'platform', 'strong-testimonials' ),
340
  'shortcode' => esc_html__( 'shortcode', 'strong-testimonials' ),
341
+ 'checkbox' => esc_html__('checkbox', 'strong-testimonials'),
342
+ 'video' => esc_html__('video', 'strong-testimonials'),
343
+ 'video_record' => esc_html__('video_record', 'strong-testimonials')
344
  );
345
 
346
  if ( isset( $custom_fields[ $field['field'] ] ) ) {
357
  $all_field_names = array_merge( array_keys( $custom_fields), array( 'post_date', 'submit_date', 'category', 'platform' ) );
358
  $label_class = '';
359
  if ( ! $adding && ! in_array( $field['field'], $all_field_names ) ) {
360
+ // $field_label .= ' < ERROR - not found >';
361
+ // $label_class = 'error';
362
+ return FALSE;
363
  }
364
  ?>
365
  <div id="field-<?php echo esc_attr( $key ); ?>" class="field2">
410
  </div>
411
 
412
  <!-- FIELD TYPE -->
413
+ <div class="field-property field-type field-dep" <?php if ( $adding || in_array($field['type'], array('checkbox', 'video', 'video_record') ) || $field['field'] == 'video_file' ) echo ' style="display: none;"'; ?>>
414
  <label for="client_section_<?php echo esc_attr( $key ); ?>_type">
415
  <?php esc_html_e( 'Display Type', 'strong-testimonials' ); ?>
416
  </label>
417
  <select id="client_section_<?php echo esc_attr( $key ); ?>_type" name="<?php echo esc_attr( $source )?>[client_section][<?php echo esc_attr( $key ); ?>][type]" <?php echo ($field['type'] == 'checkbox' ? 'readonly' : '') ?>>
418
  <?php foreach ( $types as $type => $type_label ) : ?>
419
+ <option value="<?php echo esc_attr( $type ); ?>" <?php selected( $type, $field['type'] ); ?> <?php echo (in_array($type, array('checkbox', 'video', 'video_record')) || $field['field'] == 'video_file' ? 'style="display:none"' : '') ?>><?php esc_html_e( $type_label ); ?></option>
420
  <?php endforeach; ?>
421
  </select>
422
  </div>
assets/css/admin-global.css CHANGED
@@ -1,91 +1,163 @@
1
  #menu-posts-wpm-testimonial .wp-submenu-wrap > li:last-child a {
2
- color: #FBC556;
3
  }
4
 
5
  /* Tabs tooltips */
6
  .wpmtst-tooltip {
7
- position: relative;
8
- display: inline-block;
9
  }
 
10
  .wpmtst-tooltip > span {
11
- cursor: pointer;
12
- color: #0073aa;
13
- text-decoration: underline;
14
- margin-left: 5px;
15
  }
 
16
  .wpmtst-tooltip .wpmtst-tooltip-content {
17
- display: none;
18
- position: absolute;
19
- top: 50%;
20
- right: -10px;
21
- transform: translate( 100% ,-50% );
22
- width: 300px;
23
- background: #000;
24
- color: #fff;
25
- padding: 10px;
26
- box-sizing: border-box;
27
- z-index: 99;
28
  }
 
29
  .wpmtst-tooltip .wpmtst-tooltip-content:before {
30
- content: '';
31
- width: 0px;
32
- height: 0px;
33
- border-style: solid;
34
- border-width: 8px 8px 8px 0;
35
- border-color: transparent #000 transparent transparent;
36
- display: block;
37
- position: absolute;
38
- top: 50%;
39
- left: -8px;
40
- transform: translateY( -50% );
41
  }
 
42
  .wpmtst-tooltip:hover .wpmtst-tooltip-content {
43
- display: block;
44
  }
45
 
 
 
 
 
46
  .wpmtst-inline-block {
47
- display:inline-block;
48
  }
49
 
50
  .wpmts-settings-columns {
51
- display: flex;
52
  }
53
 
54
  .wpmts-settings-columns > form {
55
- flex-grow: 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
 
58
  .wpmts-settings-columns .wpmtst-settings-upsell {
59
- width: 25%;
60
- padding-left: 30px;
61
- flex-grow: 0;
62
- flex-shrink: 0;
63
  }
64
 
65
  .wpmtst-settings-upsell .wpmtst-alert ul {
66
- list-style: none;
67
- padding: 0;
68
- margin: 0;
69
  }
 
70
  .wpmtst-settings-upsell .wpmtst-alert ul li {
71
- margin-bottom: 10px;
72
  }
73
 
74
- .wpmtst-alert {
75
- padding: 20px;
76
- background: #f4daa4;
77
- color: #8d6e30;
78
- position: relative;
79
  }
 
80
  span.wpmtst-upsell-badge {
81
- font-size: 10px;
82
- background: #f4daa4;
83
- padding: 2px 5px;
84
- display: inline-block;
85
- margin-left: 10px;
86
- border-radius: 10px;
87
  }
 
88
  .wpmtst-upsell-checkmark:before {
89
- content: "\2713";
90
- padding-right: 10px;
91
  }
1
  #menu-posts-wpm-testimonial .wp-submenu-wrap > li:last-child a {
2
+ color : #FBC556;
3
  }
4
 
5
  /* Tabs tooltips */
6
  .wpmtst-tooltip {
7
+ position : relative;
8
+ display : inline-block;
9
  }
10
+
11
  .wpmtst-tooltip > span {
12
+ cursor : pointer;
13
+ color : #0073aa;
14
+ text-decoration : underline;
15
+ margin-left : 5px;
16
  }
17
+
18
  .wpmtst-tooltip .wpmtst-tooltip-content {
19
+ display : none;
20
+ position : absolute;
21
+ top : 50%;
22
+ right : -10px;
23
+ transform : translate(100%, -50%);
24
+ width : 300px;
25
+ background : #000;
26
+ color : #fff;
27
+ padding : 10px;
28
+ box-sizing : border-box;
29
+ z-index : 99;
30
  }
31
+
32
  .wpmtst-tooltip .wpmtst-tooltip-content:before {
33
+ content : '';
34
+ width : 0px;
35
+ height : 0px;
36
+ border-style : solid;
37
+ border-width : 8px 8px 8px 0;
38
+ border-color : transparent #000 transparent transparent;
39
+ display : block;
40
+ position : absolute;
41
+ top : 50%;
42
+ left : -8px;
43
+ transform : translateY(-50%);
44
  }
45
+
46
  .wpmtst-tooltip:hover .wpmtst-tooltip-content {
47
+ display : block;
48
  }
49
 
50
+ /**
51
+ End Tooltips
52
+ */
53
+
54
  .wpmtst-inline-block {
55
+ display : inline-block;
56
  }
57
 
58
  .wpmts-settings-columns {
59
+ display : flex;
60
  }
61
 
62
  .wpmts-settings-columns > form {
63
+ flex-grow : 1;
64
+ }
65
+
66
+ /**
67
+ Start Upsells
68
+ */
69
+
70
+ #wpmtst-importer-upsell.postbox .inside {
71
+ margin : 0;
72
+ padding : 0;
73
+ }
74
+
75
+ #wpmtst-importer-upsell .wpmtst-alert {
76
+ padding : 10px;
77
+ }
78
+
79
+ #wpmtst-importer-upsell .wpmtst-alert > *:last-child {
80
+ text-align : center;
81
+ }
82
+
83
+ #wpmtst-importer-upsell .hndle {
84
+ display : none;
85
+ }
86
+
87
+ .wpmtst-alert {
88
+ padding : 20px;
89
+ background : #f1f1f1;
90
+ color : #3c434a;;
91
+ position : relative;
92
+
93
+ }
94
+
95
+ .wpmtst-alert__upgrade-btn {
96
+ position : absolute;
97
+ right : 0.5rem;
98
+ top : 50%;
99
+ transform : translateY(-50%) !important;
100
+ }
101
+
102
+ .wpmtst-alert > *:last-child {
103
+ margin-bottom : 0 !important;
104
+ }
105
+
106
+ .wpmtst-alert ul {
107
+ padding-left : 30px;
108
+ }
109
+
110
+ .wpmtst-alert ul li {
111
+ position : relative;
112
+ list-style-type : none !important;
113
+ text-align : left;
114
+ }
115
+
116
+ .wpmtst-alert ul li::before {
117
+ font-family : Dashicons;
118
+ content : "\f147";
119
+ position : absolute;
120
+ left : -30px;
121
+ font-size : 14px;
122
+ color : green;
123
+ background-color : #FFF;
124
+ padding : 0 3px;
125
+ border-radius : 50%;
126
+ border : 1px solid #DDD;
127
+ top : -1px;
128
  }
129
 
130
  .wpmts-settings-columns .wpmtst-settings-upsell {
131
+ width : 25%;
132
+ padding-left : 30px;
133
+ flex-grow : 0;
134
+ flex-shrink : 0;
135
  }
136
 
137
  .wpmtst-settings-upsell .wpmtst-alert ul {
138
+ list-style : none;
139
+ padding : 20px;
140
+ margin : 0;
141
  }
142
+
143
  .wpmtst-settings-upsell .wpmtst-alert ul li {
144
+ margin-bottom : 10px;
145
  }
146
 
147
+ .wpmts-settings-columns .wpmtst-alert {
148
+ background : #fff;
 
 
 
149
  }
150
+
151
  span.wpmtst-upsell-badge {
152
+ font-size : 10px;
153
+ background : #f4daa4;
154
+ padding : 2px 5px;
155
+ display : inline-block;
156
+ margin-left : 10px;
157
+ border-radius : 10px;
158
  }
159
+
160
  .wpmtst-upsell-checkmark:before {
161
+ content : "\2713";
162
+ padding-right : 10px;
163
  }
assets/css/admin-global.min.css CHANGED
@@ -1 +1 @@
1
- #menu-posts-wpm-testimonial .wp-submenu-wrap>li:last-child a{color:#FBC556}.wpmtst-tooltip{position:relative;display:inline-block}.wpmtst-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.wpmtst-tooltip .wpmtst-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100% ,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpmtst-tooltip .wpmtst-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpmtst-tooltip:hover .wpmtst-tooltip-content{display:block}.wpmtst-inline-block{display:inline-block}.wpmts-settings-columns{display:flex}.wpmts-settings-columns>form{flex-grow:1}.wpmts-settings-columns .wpmtst-settings-upsell{width:25%;padding-left:30px;flex-grow:0;flex-shrink:0}.wpmtst-settings-upsell .wpmtst-alert ul{list-style:none;padding:0;margin:0}.wpmtst-settings-upsell .wpmtst-alert ul li{margin-bottom:10px}.wpmtst-alert{padding:20px;background:#f4daa4;color:#8d6e30;position:relative}span.wpmtst-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}
1
+ #menu-posts-wpm-testimonial .wp-submenu-wrap>li:last-child a{color:#FBC556}.wpmtst-tooltip{position:relative;display:inline-block}.wpmtst-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.wpmtst-tooltip .wpmtst-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100% ,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.wpmtst-tooltip .wpmtst-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.wpmtst-tooltip:hover .wpmtst-tooltip-content{display:block}.wpmtst-inline-block{display:inline-block}.wpmts-settings-columns{display:flex}.wpmts-settings-columns>form{flex-grow:1}.wpmts-settings-columns .wpmtst-settings-upsell{width:25%;padding-left:30px;flex-grow:0;flex-shrink:0}.wpmtst-settings-upsell .wpmtst-alert ul{list-style:none;padding:0;margin:0}.wpmtst-settings-upsell .wpmtst-alert ul li{margin-bottom:10px}.wpmtst-alert{padding:20px;background:#f1f1f1;color:#3c434a;;position:relative}span.wpmtst-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}
assets/css/admin.css CHANGED
@@ -654,32 +654,6 @@ ul.standard {
654
  .edit-php.post-type-wpm-testimonial .wpmtst-notice img {
655
  max-width: 100%; }
656
 
657
- #wpmtst-importer-upsell .wpmtst-alert > *:last-child {
658
- text-align: center;
659
- }
660
-
661
- #wpmtst-importer-upsell .hndle {
662
- display: none;
663
- }
664
-
665
- .wpmtst-alert {
666
- padding: 20px;
667
- background: #f4daa4;
668
- color: #8d6e30;
669
- position: relative;
670
- }
671
-
672
- .wpmtst-alert__upgrade-btn {
673
- position: absolute;
674
- right: 0.5rem;
675
- top: 50%;
676
- transform: translateY(-50%) !important;
677
- }
678
-
679
- .wpmtst-alert > *:last-child {
680
- margin-bottom: 0 !important;
681
- }
682
-
683
  .edit-php.post-type-wpm-testimonial .wpmst-mascot {
684
  width: 120px;
685
  margin-right: 2rem;
@@ -851,45 +825,4 @@ margin-bottom: 0 !important;
851
  border-top: 1px solid #ddd;
852
  overflow: hidden;
853
  text-align: center;
854
- }
855
-
856
- /* alerts */
857
- #wpmtst-importer-upsell.postbox .inside {
858
- margin: 0;
859
- padding: 0;
860
- }
861
-
862
- #wpmtst-importer-upsell .wpmtst-alert {
863
- padding: 10px;
864
- }
865
-
866
- #wpmtst-importer-upsell .wpmtst-alert > *:last-child {
867
- text-align: center;
868
- }
869
-
870
- #wpmtst-importer-upsell .hndle {
871
- display: none;
872
- }
873
-
874
- .wpmtst-alert {
875
- padding: 20px;
876
- background: #f4daa4;
877
- color: #8d6e30;
878
- position: relative;
879
- }
880
-
881
- .wpmtst-alert ul {
882
- list-style: circle;
883
- padding-left: 30px;
884
- }
885
-
886
- .wpmtst-alert__upgrade-btn {
887
- position: absolute;
888
- right: 0.5rem;
889
- top: 50%;
890
- transform: translateY(-50%) !important;
891
- }
892
-
893
- .wpmtst-alert > *:last-child {
894
- margin-bottom: 0 !important;
895
- }
654
  .edit-php.post-type-wpm-testimonial .wpmtst-notice img {
655
  max-width: 100%; }
656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
657
  .edit-php.post-type-wpm-testimonial .wpmst-mascot {
658
  width: 120px;
659
  margin-right: 2rem;
825
  border-top: 1px solid #ddd;
826
  overflow: hidden;
827
  text-align: center;
828
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
changelog.txt CHANGED
@@ -1,7 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = v2.51.4 - 11/04/2021 =
 
2
  - Fixed: Compatibility with PHP8
3
- - Fixed: Gutenberg Block
4
- - Fixed: Added more escapes and sanitization
5
 
6
  = v2.51.3 - 16/03/2021 =
7
  - Changed: View backend in order to be more customizable ( https://github.com/WPChill/strong-testimonials/issues/222 )
1
+ = v2.51.5 - 20/07/2021 =
2
+ - Changed: The field for “Company Name” doesn't appear anymore in the list of default fields when creating a new view, if it has been removed via the form editor. ( https://github.com/WPChill/strong-testimonials/issues/240 )
3
+ - Changed: JQuery Strong slider public methods in order to allow users to acces public methods of bxSlider ( https://github.com/WPChill/strong-testimonials/issues/233 )
4
+ - Fixed: The Read More link display bug ( https://github.com/WPChill/strong-testimonials/issues/245 )
5
+ - Fixed: Undefined index ( https://github.com/WPChill/strong-testimonials/issues/249 )
6
+ - Fixed: Incompatibility problem with Swift Performance related to lazy load ( https://github.com/WPChill/strong-testimonials/issues/254 )
7
+ - Fixed: Error on slider arrows on the Wave accesibility report ( https://github.com/WPChill/strong-testimonials/issues/253 )
8
+ - Fixed: Extra pagination ID or slug sanitize issue from View ( https://github.com/WPChill/strong-testimonials/issues/246 )
9
+ - Fixed: Title setting sanitize issue from View ( https://github.com/WPChill/strong-testimonials/issues/241 )
10
+ - Fixed: Unstyled Template issue with grid layout and pagination ( https://github.com/WPChill/strong-testimonials/issues/242 )
11
+ - Fixed: Security fix with input escaping ( https://github.com/WPChill/strong-testimonials/issues/269 )
12
+ - Fixed: Notice when activating the plugin or entering CPT ( https://github.com/WPChill/strong-testimonials/issues/272 )
13
+ - Fixed: Complete data for uninstall process ( https://github.com/WPChill/strong-testimonials/issues/264 )
14
+ - Fixed: Copy shortcode functionality ( https://github.com/WPChill/strong-testimonials/issues/265 )
15
+ - Changed: Upsell messages display ( https://github.com/WPChill/strong-testimonials/issues/262 )
16
+ - Changed: Noopener and Noreferrer links ON by default ( https://github.com/WPChill/strong-testimonials/issues/257 )
17
+ - Fixed: WAVE accessibility report ( https://github.com/WPChill/strong-testimonials/issues/253 )
18
+ - Fixed: Maximum title length ( https://github.com/WPChill/strong-testimonials/issues/256 )
19
+
20
+
21
+
22
  = v2.51.4 - 11/04/2021 =
23
+ - Fixed: Addded more escapes and sanitization
24
  - Fixed: Compatibility with PHP8
25
+
 
26
 
27
  = v2.51.3 - 16/03/2021 =
28
  - Changed: View backend in order to be more customizable ( https://github.com/WPChill/strong-testimonials/issues/222 )
includes/class-strong-form.php CHANGED
@@ -197,6 +197,8 @@ class Strong_Testimonials_Form {
197
  */
198
  foreach ( $fields as $key => $field ) {
199
 
 
 
200
  if ( isset( $field['required'] ) && $field['required'] ) {
201
  if ( ( 'file' == $field['input_type'] ) ) {
202
  if ( ! isset( $_FILES[ $field['name'] ] ) || ! $_FILES[ $field['name'] ]['size'] ) {
197
  */
198
  foreach ( $fields as $key => $field ) {
199
 
200
+ $new_post = apply_filters( 'before_field_sanitize', $new_post, $field);
201
+
202
  if ( isset( $field['required'] ) && $field['required'] ) {
203
  if ( ( 'file' == $field['input_type'] ) ) {
204
  if ( ! isset( $_FILES[ $field['name'] ] ) || ! $_FILES[ $field['name'] ]['size'] ) {
includes/class-strong-testimonials-render.php CHANGED
@@ -81,29 +81,31 @@ class Strong_Testimonials_Render {
81
  add_action( 'wpmtst_form_rendered', array( $this, 'view_rendered' ) );
82
  add_action( 'wpmtst_form_success', array( $this, 'view_rendered' ) );
83
 
84
- switch ( $options['prerender'] ) {
85
- case 'none':
86
- /**
87
- * Use fallback.
88
- */
89
- break;
90
-
91
- case 'all':
92
- /**
93
- * Provision all views.
94
- * Enqueue stylesheets in head, scripts in footer.
95
- */
96
- add_action( 'wp_enqueue_scripts', array( $this, 'provision_all_views' ), 1 );
97
- add_action( 'wp_enqueue_scripts', array( $this, 'view_rendered' ) );
98
- break;
99
-
100
- default:
101
- /**
102
- * Provision views in current page only.
103
- * Enqueue stylesheets in head, scripts in footer.
104
- */
105
- $this->provision_current_page();
106
- add_action( 'wp_enqueue_scripts', array( $this, 'view_rendered' ) );
 
 
107
  }
108
  }
109
 
@@ -421,7 +423,9 @@ class Strong_Testimonials_Render {
421
 
422
  if ( isset( $text_widgets[ $id ] ) ) {
423
  $widget = $text_widgets[ $id ];
424
- $this->process_content( $widget['text'] );
 
 
425
  }
426
  }
427
 
81
  add_action( 'wpmtst_form_rendered', array( $this, 'view_rendered' ) );
82
  add_action( 'wpmtst_form_success', array( $this, 'view_rendered' ) );
83
 
84
+ if ( isset( $options['prerender'] ) ) {
85
+ switch ( $options['prerender'] ) {
86
+ case 'none':
87
+ /**
88
+ * Use fallback.
89
+ */
90
+ break;
91
+
92
+ case 'all':
93
+ /**
94
+ * Provision all views.
95
+ * Enqueue stylesheets in head, scripts in footer.
96
+ */
97
+ add_action( 'wp_enqueue_scripts', array( $this, 'provision_all_views' ), 1 );
98
+ add_action( 'wp_enqueue_scripts', array( $this, 'view_rendered' ) );
99
+ break;
100
+
101
+ default:
102
+ /**
103
+ * Provision views in current page only.
104
+ * Enqueue stylesheets in head, scripts in footer.
105
+ */
106
+ $this->provision_current_page();
107
+ add_action( 'wp_enqueue_scripts', array( $this, 'view_rendered' ) );
108
+ }
109
  }
110
  }
111
 
423
 
424
  if ( isset( $text_widgets[ $id ] ) ) {
425
  $widget = $text_widgets[ $id ];
426
+ if ( isset( $widget['text'] ) ) {
427
+ $this->process_content( $widget['text'] );
428
+ }
429
  }
430
  }
431
 
includes/class-strong-view-display.php CHANGED
@@ -536,7 +536,7 @@ class Strong_View_Display extends Strong_View {
536
  * @since 2.40.4
537
  */
538
  public function has_lazyload() {
539
- if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true ) ) {
540
  $options = get_option( 'wpmtst_options' );
541
  if ( isset( $options['lazyload'] ) && $options['lazyload'] ) {
542
  WPMST()->render->add_style( 'wpmtst-lazyload-css' );
@@ -545,7 +545,6 @@ class Strong_View_Display extends Strong_View {
545
  }
546
  }
547
  }
548
-
549
  }
550
 
551
  endif;
536
  * @since 2.40.4
537
  */
538
  public function has_lazyload() {
539
+ if( !function_exists( 'wp_lazy_loading_enabled' ) || apply_filters( 'wp_lazy_loading_enabled', true, 'img', 'strong_testimonials_has_lazyload' ) ) {
540
  $options = get_option( 'wpmtst_options' );
541
  if ( isset( $options['lazyload'] ) && $options['lazyload'] ) {
542
  WPMST()->render->add_style( 'wpmtst-lazyload-css' );
545
  }
546
  }
547
  }
 
548
  }
549
 
550
  endif;
includes/class-strong-view-slideshow.php CHANGED
@@ -484,7 +484,7 @@ class Strong_View_Slideshow extends Strong_View_Display {
484
  * @since 2.40.4
485
  */
486
  public function has_lazyload() {
487
- if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true ) ) {
488
  $options = get_option( 'wpmtst_options' );
489
  if ( isset( $options['lazyload'] ) && $options['lazyload'] ) {
490
  WPMST()->render->add_style( 'wpmtst-lazyload-css' );
484
  * @since 2.40.4
485
  */
486
  public function has_lazyload() {
487
+ if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true, 'img', 'strong_testimonials_has_lazyload' ) ) {
488
  $options = get_option( 'wpmtst_options' );
489
  if ( isset( $options['lazyload'] ) && $options['lazyload'] ) {
490
  WPMST()->render->add_style( 'wpmtst-lazyload-css' );
includes/functions-image.php CHANGED
@@ -124,7 +124,7 @@ add_action( 'init', 'wpmtst_lazyload_check' );
124
  * @return array
125
  */
126
  function wpmtst_add_lazyload( $attr, $attachment, $size ) {
127
- if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true ) ) {
128
  $options = get_option( 'wpmtst_options' );
129
 
130
  if ( isset( $options['lazyload'] ) && $options['lazyload']) {
124
  * @return array
125
  */
126
  function wpmtst_add_lazyload( $attr, $attachment, $size ) {
127
+ if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true, 'img', 'strong_testimonials_has_lazyload' ) ) {
128
  $options = get_option( 'wpmtst_options' );
129
 
130
  if ( isset( $options['lazyload'] ) && $options['lazyload']) {
includes/functions-template-form.php CHANGED
@@ -206,7 +206,7 @@ function wpmtst_single_form_field( $field ) {
206
  esc_html( $field['name'] ),
207
  wpmtst_field_value( $field, $form_values ),
208
  esc_attr( wpmtst_field_placeholder( $field ) ),
209
- absint( $max_length ),
210
  esc_attr( wpmtst_field_required_tag( $field ) )
211
  );
212
  }
206
  esc_html( $field['name'] ),
207
  wpmtst_field_value( $field, $form_values ),
208
  esc_attr( wpmtst_field_placeholder( $field ) ),
209
+ wpmtst_field_length( $field ),
210
  esc_attr( wpmtst_field_required_tag( $field ) )
211
  );
212
  }
includes/functions-template.php CHANGED
@@ -521,7 +521,7 @@ function wpmtst_the_custom_field( $field ) {
521
  }
522
 
523
  function wpmtst_container_class() {
524
- echo apply_filters( 'wpmtst_container_class', WPMST()->atts( 'container_class' ) );
525
  }
526
 
527
  function wpmtst_container_data() {
521
  }
522
 
523
  function wpmtst_container_class() {
524
+ echo esc_attr( apply_filters( 'wpmtst_container_class', WPMST()->atts( 'container_class' ) ) );
525
  }
526
 
527
  function wpmtst_container_data() {
includes/scripts.php CHANGED
@@ -170,7 +170,7 @@ function wpmtst_scripts() {
170
 
171
  wp_register_script( 'wpmtst-slider',
172
  WPMTST_PUBLIC_URL . "js/lib/strongslider/jquery-strongslider{$min}.js",
173
- array( 'jquery-actual', 'imagesloaded', 'underscore', 'verge' ),
174
  $plugin_version,
175
  true );
176
 
170
 
171
  wp_register_script( 'wpmtst-slider',
172
  WPMTST_PUBLIC_URL . "js/lib/strongslider/jquery-strongslider{$min}.js",
173
+ array( 'jquery-actual', 'imagesloaded', 'underscore', 'verge' , 'wp-i18n' ),
174
  $plugin_version,
175
  true );
176
 
public/css/columns.css CHANGED
@@ -22,6 +22,9 @@
22
  -webkit-column-break-inside: avoid;
23
  page-break-inside: avoid;
24
  break-inside: avoid;
 
 
 
25
  }
26
 
27
  /*
22
  -webkit-column-break-inside: avoid;
23
  page-break-inside: avoid;
24
  break-inside: avoid;
25
+ position: relative !important;
26
+ left: 0px !important;
27
+ top: 0px !important;
28
  }
29
 
30
  /*
public/css/grid.css CHANGED
@@ -27,6 +27,9 @@
27
  display: -ms-flexbox;
28
  display: flex;
29
  margin: 0 0 20px 0;
 
 
 
30
  }
31
 
32
  .strong-content.strong-grid.columns-2 .wpmtst-testimonial {
27
  display: -ms-flexbox;
28
  display: flex;
29
  margin: 0 0 20px 0;
30
+ position: relative !important;
31
+ left: 0px !important;
32
+ top: 0px !important;
33
  }
34
 
35
  .strong-content.strong-grid.columns-2 .wpmtst-testimonial {
public/js/lib/strongslider/jquery-strongslider.js CHANGED
@@ -13,7 +13,8 @@
13
  /**
14
  * @namespace verge.inViewport
15
  */
16
-
 
17
  ;(function ($) {
18
 
19
  var defaults = {
@@ -990,8 +991,8 @@
990
  * Appends prev control to the controls element
991
  */
992
  var appendControlPrev = function () {
993
- slider.controls.prev = $('<a class="wpmslider-prev" href="">' + slider.settings.prevText + '</a>');
994
-
995
  // bind click actions to the controls
996
  slider.controls.prev.on('click touchend', clickPrevBind);
997
 
@@ -1014,7 +1015,7 @@
1014
  * Appends next controls to the controls element
1015
  */
1016
  var appendControlNext = function () {
1017
- slider.controls.next = $('<a class="wpmslider-next" href="">' + slider.settings.nextText + '</a>');
1018
 
1019
  // bind click actions to the controls
1020
  slider.controls.next.on('click touchend', clickNextBind);
@@ -1982,14 +1983,14 @@
1982
  el.destroySlider();
1983
  init();
1984
  // store reference to self in order to access public functions later
1985
- $(el).data('strongSlider', this);
1986
  };
1987
 
1988
  // Fire it up!
1989
  init();
1990
 
1991
  // Store reference to self in order to access public functions later
1992
- $(el).data('strongSlider', this);
1993
 
1994
  // Set initialized flag on container
1995
  viewEl.attr('data-state', 'init');
13
  /**
14
  * @namespace verge.inViewport
15
  */
16
+ const { __ } = wp.i18n;
17
+
18
  ;(function ($) {
19
 
20
  var defaults = {
991
  * Appends prev control to the controls element
992
  */
993
  var appendControlPrev = function () {
994
+ slider.controls.prev = $('<a class="wpmslider-prev" href="/previous-slide"><span class="screen-reader-text">' + __('Previous Slide', 'strong-testimonials') + '</span>' + slider.settings.prevText + '</a>');
995
+
996
  // bind click actions to the controls
997
  slider.controls.prev.on('click touchend', clickPrevBind);
998
 
1015
  * Appends next controls to the controls element
1016
  */
1017
  var appendControlNext = function () {
1018
+ slider.controls.next = $('<a class="wpmslider-next" href="/next-slide"><span class="screen-reader-text">' + __('Next Slide', 'strong-testimonials') + '</span>' + slider.settings.nextText + '</a>');
1019
 
1020
  // bind click actions to the controls
1021
  slider.controls.next.on('click touchend', clickNextBind);
1983
  el.destroySlider();
1984
  init();
1985
  // store reference to self in order to access public functions later
1986
+ $(el).data('strongSlider', el);
1987
  };
1988
 
1989
  // Fire it up!
1990
  init();
1991
 
1992
  // Store reference to self in order to access public functions later
1993
+ $(el).data('strongSlider', el);
1994
 
1995
  // Set initialized flag on container
1996
  viewEl.attr('data-state', 'init');
public/js/lib/strongslider/jquery-strongslider.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={debug:!1,logAs:"strongSlider",compat:{lazyload:{active:!1,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:!0,hideControlOnEnd:!0,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:!1,captions:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:!1,imagesLoaded:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!0,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0},onAutoChange:function(){return!0}};e.fn.strongSlider=function(i){if(0===this.length)return this;var n={},s=this,o=this.find(".wpmslider-content");if(!e(o).data("strongSlider")){var r=function(){if(!e(o).data("strongSlider")){n.visibilityInterval=0,n.hidden=!1;var r=s.data("slider-var"),a={};void 0!==window[r]&&(a=window[r].config),n.settings=e.extend({},t,a,i),n.debug=n.settings.debug,n.logAs=n.settings.logAs,n.debug&&console.log(n.logAs,"slider.settings",n.settings),n.children=o.children(n.settings.slideSelector),n.children.length<n.settings.minSlides&&(n.settings.minSlides=n.children.length),n.children.length<n.settings.maxSlides&&(n.settings.maxSlides=n.children.length),n.settings.randomStart&&(n.settings.startSlide=Math.floor(Math.random()*n.children.length)),n.active={index:n.settings.startSlide},c(),n.carousel&&(n.settings.preloadImages="all"),n.working=!1,n.controls={},n.interval=null,n.animProp="vertical"===n.settings.mode?"top":"left",n.usingCSS=n.settings.useCSS&&"fade"!==n.settings.mode&&function(){for(var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<t.length;i++)if(void 0!==e.style[t[i]])return n.cssPrefix=t[i].replace("Perspective","").toLowerCase(),n.animProp="-"+n.cssPrefix+"-transform",!0;return!1}(),"vertical"===n.settings.mode&&(n.settings.maxSlides=n.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(n.settings.slideSelector).each(function(){e(this).data("origStyle",e(this).attr("style"))}),o.getSlideCount()&&(n.settings.imagesLoaded?s.imagesLoaded(function(){l()}):l())}},a=function(){return s.is(":visible")&&"hidden"!==s.css("visibility")},l=function(){a()&&function(){if(n.settings.compat.lazyload){for(var e=!1,t=0,i=n.settings.compat.lazyload.classes.length;t<i;t++){var o=n.settings.compat.lazyload.classes[t].start,r=n.settings.compat.lazyload.classes[t].finish;o&&r?s.find("img."+o).length&&!s.find("img."+r).length&&(e=!0):o?s.find("img."+o).length&&(e=!0):r&&(s.find("img."+r).length||(e=!0))}if(e)return n.debug&&console.log(n.logAs,"lazy loading..."),!1}return n.debug&&console.log(n.logAs,"compat check complete"),!0}()?(clearInterval(n.visibilityInterval),d()):0===n.visibilityInterval&&(n.visibilityInterval=setInterval(l,4e3))},d=function(){var t=n.children.eq(n.settings.startSlide);o.wrap('<div class="'+n.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>'),n.viewport=o.parent(),n.settings.ariaLive&&n.viewport.attr("aria-live","polite"),n.loader=e('<div class="wpmslider-loading" />'),n.viewport.prepend(n.loader),o.css({width:"horizontal"===n.settings.mode?1e3*n.children.length+215+"%":"auto",position:"relative"}),n.usingCSS&&n.settings.easing?o.css("-"+n.cssPrefix+"-transition-timing-function",n.settings.easing):n.settings.easing||(n.settings.easing="swing"),n.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),n.viewport.parent().css({maxWidth:b()}),n.settings.pager||n.settings.controls||n.viewport.parent().css({margin:"0 auto"}),n.children.css({float:"horizontal"===n.settings.mode?"left":"none",listStyle:"none",position:"relative"}),g(),"horizontal"===n.settings.mode&&n.settings.slideMargin>0&&n.children.css("marginRight",n.settings.slideMargin),"vertical"===n.settings.mode&&n.settings.slideMargin>0&&n.children.css("marginBottom",n.settings.slideMargin),"fade"===n.settings.mode?(n.children.css({position:"absolute",zIndex:0,display:"none"}),n.children.eq(n.settings.startSlide).css({zIndex:n.settings.slideZIndex,display:"block"})):n.children.css({display:"block"}),n.controls.el=e('<div class="wpmslider-controls" />'),n.settings.captions&&L(),n.active.last=n.settings.startSlide===P()-1,n.settings.video&&o.fitVids(),"none"===n.settings.preloadImages?t=null:"all"===n.settings.preloadImages&&(t=n.children),n.settings.controls&&A(),n.settings.auto&&n.settings.autoControls&&z(),n.settings.pager&&I(),n.settings.controls&&M(),(n.settings.controls||n.settings.autoControls||n.settings.pager)&&n.viewport.after(n.controls.el),null===t||navigator.userAgent.indexOf("Firefox")?u():p(t,u)},c=function(){n.debug&&console.log(n.logAs,"setBreakpoint");var e=n.settings.breakpoints.single,t=n.settings.breakpoints.multiple;if("show_multiple"===n.settings.type)for(var i in t)if(t.hasOwnProperty(i)&&verge.viewportW()>=t[i].width){e=t[i];break}n.debug&&console.log("current breakpoint",e),n.settings.maxSlides=e.maxSlides,n.settings.moveSlides=e.moveSlides,n.settings.slideMargin=e.slideMargin,n.carousel=n.settings.minSlides>1||n.settings.maxSlides>1},g=function(){c(),n.children.css("width",C())},p=function(t,i){var n=t.find('img:not([src=""]), iframe').length,s=0;0!==n?t.find('img:not([src=""]), iframe').each(function(){e(this).one("load error",function(){++s===n&&i()}).each(function(){(this.complete||""===this.src)&&e(this).trigger("load")})}):i()},u=function(){if(n.settings.infiniteLoop&&"fade"!==n.settings.mode){var t="vertical"===n.settings.mode?n.settings.minSlides:n.settings.maxSlides,i=n.children.slice(0,t).clone(!0).addClass("wpmslider-clone"),s=n.children.slice(-t).clone(!0).addClass("wpmslider-clone");n.settings.ariaHidden&&(i.attr("aria-hidden",!0),s.attr("aria-hidden",!0)),o.append(i).prepend(s)}n.loader.remove(),"vertical"===n.settings.mode&&(n.settings.adaptiveHeight=!0),o.redrawSlider(),n.settings.onSliderLoad.call(o,n.active.index),n.initialized=!0,n.visibilityInterval=setInterval(f,500),n.settings.responsive&&v(),n.settings.auto&&n.settings.autoStart&&(P()>1||n.settings.autoSlideForOnePage)&&X(),n.settings.pager&&N(n.settings.startSlide),n.settings.controls&&Y(),n.settings.touchEnabled&&Z(),n.settings.keyboardEnabled&&e(document).keydown(R)},v=function(){window.addEventListener("resize",h,!1),window.addEventListener("orientationchange",h,!1),window.addEventListener("toggleFullContent",h,!1),window.addEventListener("blur",function(){m("blur")}),window.addEventListener("focus",function(){S("blur")})},h=_.debounce(function(){n.debug&&console.log(n.logAs,"updateLayout"),G()},250),f=function(){n.settings.auto&&(a()?S("hide"):m("hide"),verge.inViewport(o)?S("scroll"):m("scroll"))},m=function(e){n.interval&&(o.stopAuto(!0),n.autoPaused=e,n.debug&&console.log(n.logAs,"pause",e))},S=function(e){n.autoPaused===e&&(o.startAuto(!0),n.autoPaused=null,n.debug&&console.log(n.logAs,"play",e))},w=function(e){return Math.max.apply(Math,e)},x=function(){var t=0,i=e();if("vertical"===n.settings.mode||n.settings.adaptiveHeight)if(n.carousel){var s=1===n.settings.moveSlides?n.active.index:n.active.index*E();i=n.children.eq(s);for(var o=1;o<=n.settings.maxSlides-1;o++)i=s+o>=n.children.length?i.add(n.children.eq(o-1)):i.add(n.children.eq(s+o))}else i=n.children.eq(n.active.index);else i=n.children;return"vertical"===n.settings.mode?(i.each(function(i){t+=e(this).outerHeight()}),n.settings.slideMargin>0&&(t+=n.settings.slideMargin*(n.settings.minSlides-1))):t=Math.max.apply(Math,i.map(function(){return e(this).outerHeight(!1)}).get()),"border-box"===n.viewport.css("box-sizing")?t+=parseFloat(n.viewport.css("padding-top"))+parseFloat(n.viewport.css("padding-bottom"))+parseFloat(n.viewport.css("border-top-width"))+parseFloat(n.viewport.css("border-bottom-width")):"padding-box"===n.viewport.css("box-sizing")&&(t+=parseFloat(n.viewport.css("padding-top"))+parseFloat(n.viewport.css("padding-bottom"))),t},b=function(){return"100%"},C=function(){var e=n.viewport.width(),t=n.settings.slideMargin*(n.settings.maxSlides-1);return Math.floor((e-t)/n.settings.maxSlides)},y=function(){return n.settings.maxSlides},P=function(){var e=0,t=0,i=0;if(n.settings.moveSlides>0){if(!n.settings.infiniteLoop){for(;t<n.children.length;)++e,t=i+y(),i+=n.settings.moveSlides<=y()?n.settings.moveSlides:y();return i}e=Math.ceil(n.children.length/E())}else e=Math.ceil(n.children.length/y());return e},E=function(){return n.settings.moveSlides>0&&n.settings.moveSlides<=y()?n.settings.moveSlides:y()},k=function(t,i,s,r){var a,l;n.usingCSS?("vertical"===n.settings.mode?l="translateY("+t+"px)":"horizontal"===n.settings.mode?l="translateX("+t+"px":"none"===n.settings.mode&&(l="translateY("+t+"px)",s=0),o.css("-"+n.cssPrefix+"-transition-duration",s/1e3+"s"),"slide"===i?(o.css(n.animProp,l),0!==s?o.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(t){e(t.target).is(o)&&(o.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),B())}):B()):"reset"===i&&o.css(n.animProp,l)):((a={})[n.animProp]=t,"slide"===i?o.animate(a,s,n.settings.easing,function(){B()}):"reset"===i&&o.css(n.animProp,t))},T=function(){for(var t="",i="",s=P(),o=0;o<s;o++)i="",n.settings.buildPager?("icons"===n.settings.buildPager&&(i=""),(e.isFunction(n.settings.buildPager)||n.settings.pagerCustom)&&(i=n.settings.buildPager(o)),n.pagerEl.addClass("wpmslider-custom-pager")):(i=o+1,n.pagerEl.addClass("wpmslider-default-pager")),t+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+o+'" class="wpmslider-pager-link">'+i+"</a></div>";n.pagerEl.html(t)},I=function(){n.settings.pagerCustom?n.pagerEl=e(n.settings.pagerCustom):(n.pagerEl=e('<div class="wpmslider-pager" />'),n.settings.pagerSelector?e(n.settings.pagerSelector).html(n.pagerEl):n.controls.el.addClass("wpmslider-has-pager").append(n.pagerEl),T()),n.pagerEl.on("click touchend","a",F)},A=function(){n.controls.prev=e('<a class="wpmslider-prev" href="">'+n.settings.prevText+"</a>"),n.controls.prev.on("click touchend",D),n.settings.prevSelector&&e(n.settings.prevSelector).append(n.controls.prev),n.settings.prevSelector||(n.controls.directionEl=e('<div class="wpmslider-controls-direction" />'),n.controls.directionEl.append(n.controls.prev),n.controls.el.addClass("wpmslider-has-controls-direction").append(n.controls.directionEl))},M=function(){n.controls.next=e('<a class="wpmslider-next" href="">'+n.settings.nextText+"</a>"),n.controls.next.on("click touchend",q),n.settings.nextSelector&&e(n.settings.nextSelector).append(n.controls.next),n.settings.nextSelector||(n.controls.directionEl=e('<div class="wpmslider-controls-direction" />'),n.controls.directionEl.append(n.controls.next),n.controls.el.addClass("wpmslider-has-controls-direction").append(n.controls.directionEl))},z=function(){n.controls.start=e('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+n.settings.startText+"</a></div>"),n.controls.stop=e('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+n.settings.stopText+"</a></div>"),n.controls.autoEl=e('<div class="wpmslider-controls-auto" />'),n.controls.autoEl.on("click",".wpmslider-start",H),n.controls.autoEl.on("click",".wpmslider-stop",O),n.settings.autoControlsCombine?n.controls.autoEl.append(n.controls.start):n.controls.autoEl.append(n.controls.start).append(n.controls.stop),n.settings.autoControlsSelector?e(n.settings.autoControlsSelector).html(n.controls.autoEl):n.controls.el.addClass("wpmslider-has-controls-auto").append(n.controls.autoEl),W(n.settings.autoStart?"stop":"start")},L=function(){n.children.each(function(t){var i=e(this).find("img:first").attr("title");void 0!==i&&(""+i).length&&e(this).append('<div class="wpmslider-caption"><span>'+i+"</span></div>")})},q=function(e){e.preventDefault(),e.stopPropagation(),n.controls.el.hasClass("disabled")||(n.settings.auto&&n.settings.stopAutoOnClick&&(n.debug&&console.log(n.logAs,"stop on navigation"),o.stopAuto()),o.goToNextSlide())},D=function(e){e.preventDefault(),e.stopPropagation(),n.controls.el.hasClass("disabled")||(n.settings.auto&&n.settings.stopAutoOnClick&&(n.debug&&console.log(n.logAs,"stop on navigation"),o.stopAuto()),o.goToPrevSlide())},H=function(e){o.startAuto(),e.preventDefault(),e.stopPropagation()},O=function(e){o.stopAuto(),e.preventDefault(),e.stopPropagation()},F=function(t){var i,s;t.preventDefault(),t.stopPropagation(),n.controls.el.hasClass("disabled")||(n.settings.auto&&n.settings.stopAutoOnClick&&(n.debug&&console.log(n.logAs,"stop on navigation"),o.stopAuto()),void 0!==(i=e(t.currentTarget)).attr("data-slide-index")&&(s=parseInt(i.attr("data-slide-index")))!==n.active.index&&o.goToSlide(s))},N=function(t){var i=n.children.length;if("short"===n.settings.pagerType)return n.settings.maxSlides>1&&(i=Math.ceil(n.children.length/n.settings.maxSlides)),void n.pagerEl.html(t+1+n.settings.pagerShortSeparator+i);n.pagerEl.find("a").removeClass("active"),n.pagerEl.each(function(i,n){e(n).find("a").eq(t).addClass("active")})},B=function(){if(n.settings.infiniteLoop){var e="";0===n.active.index?e=n.children.eq(0).position():n.active.index===P()-1&&n.carousel?e=n.children.eq((P()-1)*E()).position():n.active.index===n.children.length-1&&(e=n.children.eq(n.children.length-1).position()),e&&("horizontal"===n.settings.mode?k(-e.left,"reset",0):"vertical"===n.settings.mode&&k(-e.top,"reset",0))}n.working=!1,n.settings.onSlideAfter.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index)},W=function(e){n.settings.autoControlsCombine?n.controls.autoEl.html(n.controls[e]):(n.controls.autoEl.find("a").removeClass("active"),n.controls.autoEl.find("a:not(.wpmslider-"+e+")").addClass("active"))},Y=function(){1===P()?(n.controls.prev.addClass("disabled"),n.controls.next.addClass("disabled")):!n.settings.infiniteLoop&&n.settings.hideControlOnEnd&&(0===n.active.index?(n.controls.prev.addClass("disabled"),n.controls.next.removeClass("disabled")):n.active.index===P()-1?(n.controls.next.addClass("disabled"),n.controls.prev.removeClass("disabled")):(n.controls.prev.removeClass("disabled"),n.controls.next.removeClass("disabled")))},X=function(){n.settings.autoDelay>0?setTimeout(o.startAuto,n.settings.autoDelay):o.startAuto(),n.settings.autoHover&&o.hover(function(){m("hover")},function(){S("hover")})},R=function(e){var t=document.activeElement.tagName.toLowerCase();if(null===new RegExp(t,["i"]).exec("input|textarea")&&verge.inViewport(o)){if(39===e.keyCode)return q(e),!1;if(37===e.keyCode)return D(e),!1}},Z=function(){n.touch={start:{x:0,y:0},end:{x:0,y:0}},n.viewport.on("touchstart MSPointerDown pointerdown",U),n.viewport.on("click",".wpmslider a",function(e){n.viewport.hasClass("click-disabled")&&(e.preventDefault(),e.stopPropagation(),n.viewport.removeClass("click-disabled"))})},U=function(e){if(("touchstart"===e.type||0===e.button)&&"a"!==e.originalEvent.target.tagName.toLowerCase()&&!e.originalEvent.target.classList.contains("readmore-text"))if(n.controls.el.addClass("disabled"),n.working)e.preventDefault(),e.stopPropagation(),n.controls.el.removeClass("disabled");else{n.touch.originalPos=o.position();var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t];if("function"==typeof PointerEvent&&void 0===t.pointerId)return;n.touch.start.x=i[0].pageX,n.touch.start.y=i[0].pageY,n.viewport.get(0).setPointerCapture&&(n.pointerId=t.pointerId,n.viewport.get(0).setPointerCapture(n.pointerId)),n.originalClickTarget=t.originalTarget||t.target,n.originalClickButton=t.button,n.originalClickButtons=t.buttons,n.originalEventType=t.type,n.hasMove=!1,n.viewport.on("touchmove MSPointerMove pointermove",j),n.viewport.on("touchend MSPointerUp pointerup",Q),n.viewport.on("MSPointerCancel pointercancel",V)}},V=function(e){e.preventDefault(),k(n.touch.originalPos.left,"reset",0),n.controls.el.removeClass("disabled"),n.viewport.off("MSPointerCancel pointercancel",V),n.viewport.off("touchmove MSPointerMove pointermove",j),n.viewport.off("touchend MSPointerUp pointerup",Q),n.viewport.get(0).releasePointerCapture&&n.viewport.get(0).releasePointerCapture(n.pointerId)},j=function(e){var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t],s=Math.abs(i[0].pageX-n.touch.start.x),o=Math.abs(i[0].pageY-n.touch.start.y),r=0,a=0;n.hasMove=!0,3*s>o&&n.settings.preventDefaultSwipeX?(e.preventDefault(),e.stopPropagation()):3*o>s&&n.settings.preventDefaultSwipeY&&(e.preventDefault(),e.stopPropagation()),"touchmove"!==e.type&&e.preventDefault(),"fade"!==n.settings.mode&&n.settings.oneToOneTouch&&("horizontal"===n.settings.mode?(a=i[0].pageX-n.touch.start.x,r=n.touch.originalPos.left+a):(a=i[0].pageY-n.touch.start.y,r=n.touch.originalPos.top+a),k(r,"reset",0))},Q=function(t){t.preventDefault(),n.viewport.off("touchmove MSPointerMove pointermove",j),n.controls.el.removeClass("disabled");var i=t.originalEvent,s=void 0!==i.changedTouches?i.changedTouches:[i],r=0,a=0;n.touch.end.x=s[0].pageX,n.touch.end.y=s[0].pageY,"fade"===n.settings.mode?(a=Math.abs(n.touch.start.x-n.touch.end.x))>=n.settings.swipeThreshold&&(n.touch.start.x>n.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):("horizontal"===n.settings.mode?(a=n.touch.end.x-n.touch.start.x,r=n.touch.originalPos.left):(a=n.touch.end.y-n.touch.start.y,r=n.touch.originalPos.top),!n.settings.infiniteLoop&&(0===n.active.index&&a>0||n.active.last&&a<0)?k(r,"reset",200):Math.abs(a)>=n.settings.swipeThreshold?(a<0?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):k(r,"reset",200)),n.viewport.off("touchend MSPointerUp pointerup",Q),n.viewport.get(0).releasePointerCapture&&n.viewport.get(0).releasePointerCapture(n.pointerId),!1!==n.hasMove||0!==n.originalClickButton&&"touchstart"!==n.originalEventType||e(n.originalClickTarget).trigger({type:"click",button:n.originalClickButton,buttons:n.originalClickButtons})},G=function(e){n.initialized?n.working?(n.debug&&console.log(n.logAs,"slider working"),window.setTimeout(G,10)):(o.redrawSlider(),n.settings.onSliderResize.call(o,n.active.index)):n.debug&&console.log(n.logAs,"slider not initialized")},J=function(e){var t=y();n.settings.ariaHidden&&(n.children.attr("aria-hidden","true"),n.children.slice(e,e+t).attr("aria-hidden","false"))};return o.goToSlide=function(t,i){var s,r,a,l,d=!0,c=0,g={left:0,top:0},p=null;if(n.oldIndex=n.active.index,n.active.index=function(e){return e<0?n.settings.infiniteLoop?P()-1:n.active.index:e>=P()?n.settings.infiniteLoop?0:n.active.index:e}(t),!n.working&&n.active.index!==n.oldIndex){if(n.working=!0,void 0!==(d=n.settings.onSlideBefore.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index))&&!d)return n.active.index=n.oldIndex,void(n.working=!1);"next"===i?n.settings.onSlideNext.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index)||(d=!1):"prev"===i&&(n.settings.onSlidePrev.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index)||(d=!1)),n.active.last=n.active.index>=P()-1,(n.settings.pager||n.settings.pagerCustom)&&N(n.active.index),n.settings.controls&&Y(),"fade"===n.settings.mode?(n.settings.adaptiveHeight&&n.viewport.height()!==x()&&n.viewport.animate({height:x()},n.settings.adaptiveHeightSpeed),n.children.filter(":visible").fadeOut(n.settings.speed).css({zIndex:0}),n.children.eq(n.active.index).css("zIndex",n.settings.slideZIndex+1).fadeIn(n.settings.speed,function(){e(this).css("zIndex",n.settings.slideZIndex),B()})):(n.settings.adaptiveHeight&&n.viewport.height()!==x()&&n.viewport.animate({height:x()},n.settings.adaptiveHeightSpeed),!n.settings.infiniteLoop&&n.carousel&&n.active.last?"horizontal"===n.settings.mode?(g=(p=n.children.eq(n.children.length-1)).position(),c=n.viewport.width()-p.outerWidth()):(s=n.children.length-n.settings.minSlides,g=n.children.eq(s).position()):n.carousel&&n.active.last&&"prev"===i?(r=1===n.settings.moveSlides?n.settings.maxSlides-E():(P()-1)*E()-(n.children.length-n.settings.maxSlides),g=(p=o.children(".wpmslider-clone").eq(r)).position()):"next"===i&&0===n.active.index?(g=o.find("> .wpmslider-clone").eq(n.settings.maxSlides).position(),n.active.last=!1):t>=0&&(l=t*parseInt(E()),g=n.children.eq(l).position()),void 0!==g&&(a="horizontal"===n.settings.mode?-(g.left-c):-g.top,k(a,"slide",n.settings.speed))),n.settings.ariaHidden&&J(n.active.index*E())}},o.goToNextSlide=function(){if((n.settings.infiniteLoop||!n.active.last)&&!0!==n.working){var e=parseInt(n.active.index)+1;o.goToSlide(e,"next")}},o.goToPrevSlide=function(){if((n.settings.infiniteLoop||0!==n.active.index)&&!0!==n.working){var e=parseInt(n.active.index)-1;o.goToSlide(e,"prev")}},o.startAuto=function(e){n.interval||(n.interval=setInterval(function(){"next"===n.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},n.settings.pause),n.settings.onAutoChange.call(o,!0),n.settings.autoControls&&!0!==e&&W("stop"))},o.stopAuto=function(e){n.autoPaused&&(n.autoPaused=!1),n.interval&&(clearInterval(n.interval),n.interval=null,n.settings.onAutoChange.call(o,!1),n.settings.autoControls&&!0!==e&&W("start"))},o.getCurrentSlide=function(){return n.active.index},o.getCurrentSlideElement=function(){return n.children.eq(n.active.index)},o.getSlideElement=function(e){return n.children.eq(e)},o.getSlideCount=function(){return n.children.length},o.isWorking=function(){return n.working},o.redrawSlider=function(){var e,t,i,s,r;n.debug&&console.log(n.logAs,"redrawSlider"),g(),n.children.height("auto"),n.viewport.height(x()+2),n.settings.stretch&&(e=n.children.map(function(){return jQuery(this).actual("outerHeight")}).get(),t=w(e),n.children.height(t),n.children.add(o.find(".wpmslider-clone")).height(t)),n.children.add(o.find(".wpmslider-clone")).outerWidth(C()),n.children.length>n.settings.maxSlides&&n.active.last&&!n.settings.infiniteLoop?"horizontal"===n.settings.mode?(i=(s=n.children.last()).position(),k(-(i.left-(n.viewport.width()-s.outerWidth())),"reset",0)):"vertical"===n.settings.mode&&(r=n.children.length-n.settings.minSlides,i=n.children.eq(r).position(),k(-i.top,"reset",0)):(i=n.children.eq(n.active.index*E()).position(),n.active.index===P()-1&&(n.active.last=!0),void 0!==i&&("horizontal"===n.settings.mode?k(-i.left,"reset",0):"vertical"===n.settings.mode?k(-i.top,"reset",0):"none"===n.settings.mode&&k(-i.top,"reset",0))),n.active.last&&(n.active.index=P()-1),n.active.index>=P()&&(n.active.last=!0),n.settings.pager&&!n.settings.pagerCustom&&(T(),N(n.active.index)),n.settings.ariaHidden&&J(n.active.index*E())},o.destroySlider=function(){n.initialized&&(n.initialized=!1,e(".wpmslider-clone",this).remove(),n.children.each(function(){void 0!==e(this).data("origStyle")?e(this).attr("style",e(this).data("origStyle")):e(this).removeAttr("style")}),void 0!==e(this).data("origStyle")?this.attr("style",e(this).data("origStyle")):e(this).removeAttr("style"),e(this).unwrap().unwrap(),n.controls.el&&n.controls.el.remove(),n.controls.next&&n.controls.next.remove(),n.controls.prev&&n.controls.prev.remove(),n.pagerEl&&n.settings.controls&&!n.settings.pagerCustom&&n.pagerEl.remove(),e(".wpmslider-caption",this).remove(),n.controls.autoEl&&n.controls.autoEl.remove(),clearInterval(n.interval),clearInterval(n.visibilityInterval),n.settings.responsive&&e(window).off("resize",G),n.settings.keyboardEnabled&&e(document).off("keydown",R),e(this).removeData("strongSlider"))},o.reloadSlider=function(t){void 0!==t&&(i=t),o.destroySlider(),r(),e(o).data("strongSlider",this)},r(),e(o).data("strongSlider",this),s.attr("data-state","init"),n.debug&&console.log(n.logAs,"viewport",verge.viewportW(),"x",verge.viewportH()),this}}}(jQuery);
1
+ const{__:__}=wp.i18n;!function(e){var t={debug:!1,logAs:"strongSlider",compat:{lazyload:{active:!1,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:!0,hideControlOnEnd:!0,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:!1,captions:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:!1,imagesLoaded:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!0,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0},onAutoChange:function(){return!0}};e.fn.strongSlider=function(i){if(0===this.length)return this;var n={},s=this,o=this.find(".wpmslider-content");if(!e(o).data("strongSlider")){var r=function(){if(!e(o).data("strongSlider")){n.visibilityInterval=0,n.hidden=!1;var r=s.data("slider-var"),a={};void 0!==window[r]&&(a=window[r].config),n.settings=e.extend({},t,a,i),n.debug=n.settings.debug,n.logAs=n.settings.logAs,n.debug&&console.log(n.logAs,"slider.settings",n.settings),n.children=o.children(n.settings.slideSelector),n.children.length<n.settings.minSlides&&(n.settings.minSlides=n.children.length),n.children.length<n.settings.maxSlides&&(n.settings.maxSlides=n.children.length),n.settings.randomStart&&(n.settings.startSlide=Math.floor(Math.random()*n.children.length)),n.active={index:n.settings.startSlide},c(),n.carousel&&(n.settings.preloadImages="all"),n.working=!1,n.controls={},n.interval=null,n.animProp="vertical"===n.settings.mode?"top":"left",n.usingCSS=n.settings.useCSS&&"fade"!==n.settings.mode&&function(){for(var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<t.length;i++)if(void 0!==e.style[t[i]])return n.cssPrefix=t[i].replace("Perspective","").toLowerCase(),n.animProp="-"+n.cssPrefix+"-transform",!0;return!1}(),"vertical"===n.settings.mode&&(n.settings.maxSlides=n.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(n.settings.slideSelector).each(function(){e(this).data("origStyle",e(this).attr("style"))}),o.getSlideCount()&&(n.settings.imagesLoaded?s.imagesLoaded(function(){l()}):l())}},a=function(){return s.is(":visible")&&"hidden"!==s.css("visibility")},l=function(){a()&&function(){if(n.settings.compat.lazyload){for(var e=!1,t=0,i=n.settings.compat.lazyload.classes.length;t<i;t++){var o=n.settings.compat.lazyload.classes[t].start,r=n.settings.compat.lazyload.classes[t].finish;o&&r?s.find("img."+o).length&&!s.find("img."+r).length&&(e=!0):o?s.find("img."+o).length&&(e=!0):r&&(s.find("img."+r).length||(e=!0))}if(e)return n.debug&&console.log(n.logAs,"lazy loading..."),!1}return n.debug&&console.log(n.logAs,"compat check complete"),!0}()?(clearInterval(n.visibilityInterval),d()):0===n.visibilityInterval&&(n.visibilityInterval=setInterval(l,4e3))},d=function(){var t=n.children.eq(n.settings.startSlide);o.wrap('<div class="'+n.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>'),n.viewport=o.parent(),n.settings.ariaLive&&n.viewport.attr("aria-live","polite"),n.loader=e('<div class="wpmslider-loading" />'),n.viewport.prepend(n.loader),o.css({width:"horizontal"===n.settings.mode?1e3*n.children.length+215+"%":"auto",position:"relative"}),n.usingCSS&&n.settings.easing?o.css("-"+n.cssPrefix+"-transition-timing-function",n.settings.easing):n.settings.easing||(n.settings.easing="swing"),n.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),n.viewport.parent().css({maxWidth:b()}),n.settings.pager||n.settings.controls||n.viewport.parent().css({margin:"0 auto"}),n.children.css({float:"horizontal"===n.settings.mode?"left":"none",listStyle:"none",position:"relative"}),g(),"horizontal"===n.settings.mode&&n.settings.slideMargin>0&&n.children.css("marginRight",n.settings.slideMargin),"vertical"===n.settings.mode&&n.settings.slideMargin>0&&n.children.css("marginBottom",n.settings.slideMargin),"fade"===n.settings.mode?(n.children.css({position:"absolute",zIndex:0,display:"none"}),n.children.eq(n.settings.startSlide).css({zIndex:n.settings.slideZIndex,display:"block"})):n.children.css({display:"block"}),n.controls.el=e('<div class="wpmslider-controls" />'),n.settings.captions&&L(),n.active.last=n.settings.startSlide===y()-1,n.settings.video&&o.fitVids(),"none"===n.settings.preloadImages?t=null:"all"===n.settings.preloadImages&&(t=n.children),n.settings.controls&&A(),n.settings.auto&&n.settings.autoControls&&z(),n.settings.pager&&I(),n.settings.controls&&M(),(n.settings.controls||n.settings.autoControls||n.settings.pager)&&n.viewport.after(n.controls.el),null===t||navigator.userAgent.indexOf("Firefox")?u():p(t,u)},c=function(){n.debug&&console.log(n.logAs,"setBreakpoint");var e=n.settings.breakpoints.single,t=n.settings.breakpoints.multiple;if("show_multiple"===n.settings.type)for(var i in t)if(t.hasOwnProperty(i)&&verge.viewportW()>=t[i].width){e=t[i];break}n.debug&&console.log("current breakpoint",e),n.settings.maxSlides=e.maxSlides,n.settings.moveSlides=e.moveSlides,n.settings.slideMargin=e.slideMargin,n.carousel=n.settings.minSlides>1||n.settings.maxSlides>1},g=function(){c(),n.children.css("width",C())},p=function(t,i){var n=t.find('img:not([src=""]), iframe').length,s=0;0!==n?t.find('img:not([src=""]), iframe').each(function(){e(this).one("load error",function(){++s===n&&i()}).each(function(){(this.complete||""===this.src)&&e(this).trigger("load")})}):i()},u=function(){if(n.settings.infiniteLoop&&"fade"!==n.settings.mode){var t="vertical"===n.settings.mode?n.settings.minSlides:n.settings.maxSlides,i=n.children.slice(0,t).clone(!0).addClass("wpmslider-clone"),s=n.children.slice(-t).clone(!0).addClass("wpmslider-clone");n.settings.ariaHidden&&(i.attr("aria-hidden",!0),s.attr("aria-hidden",!0)),o.append(i).prepend(s)}n.loader.remove(),"vertical"===n.settings.mode&&(n.settings.adaptiveHeight=!0),o.redrawSlider(),n.settings.onSliderLoad.call(o,n.active.index),n.initialized=!0,n.visibilityInterval=setInterval(f,500),n.settings.responsive&&v(),n.settings.auto&&n.settings.autoStart&&(y()>1||n.settings.autoSlideForOnePage)&&X(),n.settings.pager&&F(n.settings.startSlide),n.settings.controls&&Y(),n.settings.touchEnabled&&Z(),n.settings.keyboardEnabled&&e(document).trigger("keydown",R)},v=function(){window.addEventListener("resize",h,!1),window.addEventListener("orientationchange",h,!1),window.addEventListener("toggleFullContent",h,!1),window.addEventListener("blur",function(){m("blur")}),window.addEventListener("focus",function(){S("blur")})},h=_.debounce(function(){n.debug&&console.log(n.logAs,"updateLayout"),G()},250),f=function(){n.settings.auto&&(a()?S("hide"):m("hide"),verge.inViewport(o)?S("scroll"):m("scroll"))},m=function(e){n.interval&&(o.stopAuto(!0),n.autoPaused=e,n.debug&&console.log(n.logAs,"pause",e))},S=function(e){n.autoPaused===e&&(o.startAuto(!0),n.autoPaused=null,n.debug&&console.log(n.logAs,"play",e))},x=function(e){return Math.max.apply(Math,e)},w=function(){var t=0,i=e();if("vertical"===n.settings.mode||n.settings.adaptiveHeight)if(n.carousel){var s=1===n.settings.moveSlides?n.active.index:n.active.index*E();i=n.children.eq(s);for(var o=1;o<=n.settings.maxSlides-1;o++)i=s+o>=n.children.length?i.add(n.children.eq(o-1)):i.add(n.children.eq(s+o))}else i=n.children.eq(n.active.index);else i=n.children;return"vertical"===n.settings.mode?(i.each(function(i){t+=e(this).outerHeight()}),n.settings.slideMargin>0&&(t+=n.settings.slideMargin*(n.settings.minSlides-1))):t=Math.max.apply(Math,i.map(function(){return e(this).outerHeight(!1)}).get()),"border-box"===n.viewport.css("box-sizing")?t+=parseFloat(n.viewport.css("padding-top"))+parseFloat(n.viewport.css("padding-bottom"))+parseFloat(n.viewport.css("border-top-width"))+parseFloat(n.viewport.css("border-bottom-width")):"padding-box"===n.viewport.css("box-sizing")&&(t+=parseFloat(n.viewport.css("padding-top"))+parseFloat(n.viewport.css("padding-bottom"))),t},b=function(){return"100%"},C=function(){var e=n.viewport.width(),t=n.settings.slideMargin*(n.settings.maxSlides-1);return Math.floor((e-t)/n.settings.maxSlides)},P=function(){return n.settings.maxSlides},y=function(){var e=0,t=0,i=0;if(n.settings.moveSlides>0){if(!n.settings.infiniteLoop){for(;t<n.children.length;)++e,t=i+P(),i+=n.settings.moveSlides<=P()?n.settings.moveSlides:P();return i}e=Math.ceil(n.children.length/E())}else e=Math.ceil(n.children.length/P());return e},E=function(){return n.settings.moveSlides>0&&n.settings.moveSlides<=P()?n.settings.moveSlides:P()},T=function(t,i,s,r){var a,l;n.usingCSS?("vertical"===n.settings.mode?l="translateY("+t+"px)":"horizontal"===n.settings.mode?l="translateX("+t+"px":"none"===n.settings.mode&&(l="translateY("+t+"px)",s=0),o.css("-"+n.cssPrefix+"-transition-duration",s/1e3+"s"),"slide"===i?(o.css(n.animProp,l),0!==s?o.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(t){e(t.target).is(o)&&(o.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),B())}):B()):"reset"===i&&o.css(n.animProp,l)):((a={})[n.animProp]=t,"slide"===i?o.animate(a,s,n.settings.easing,function(){B()}):"reset"===i&&o.css(n.animProp,t))},k=function(){for(var t="",i="",s=y(),o=0;o<s;o++)i="",n.settings.buildPager?("icons"===n.settings.buildPager&&(i=""),(e.isFunction(n.settings.buildPager)||n.settings.pagerCustom)&&(i=n.settings.buildPager(o)),n.pagerEl.addClass("wpmslider-custom-pager")):(i=o+1,n.pagerEl.addClass("wpmslider-default-pager")),t+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+o+'" class="wpmslider-pager-link">'+i+"</a></div>";n.pagerEl.html(t)},I=function(){n.settings.pagerCustom?n.pagerEl=e(n.settings.pagerCustom):(n.pagerEl=e('<div class="wpmslider-pager" />'),n.settings.pagerSelector?e(n.settings.pagerSelector).html(n.pagerEl):n.controls.el.addClass("wpmslider-has-pager").append(n.pagerEl),k()),n.pagerEl.on("click touchend","a",N)},A=function(){n.controls.prev=e('<a class="wpmslider-prev" href="/previous-slide"><span class="screen-reader-text">'+__("Previous Slide","strong-testimonials")+"</span>"+n.settings.prevText+"</a>"),n.controls.prev.on("click touchend",D),n.settings.prevSelector&&e(n.settings.prevSelector).append(n.controls.prev),n.settings.prevSelector||(n.controls.directionEl=e('<div class="wpmslider-controls-direction" />'),n.controls.directionEl.append(n.controls.prev),n.controls.el.addClass("wpmslider-has-controls-direction").append(n.controls.directionEl))},M=function(){n.controls.next=e('<a class="wpmslider-next" href="/next-slide"><span class="screen-reader-text">'+__("Next Slide","strong-testimonials")+"</span>"+n.settings.nextText+"</a>"),n.controls.next.on("click touchend",q),__("Next Slide","strong-testimonials"),n.settings.nextSelector&&e(n.settings.nextSelector).append(n.controls.next),n.settings.nextSelector||(n.controls.directionEl=e('<div class="wpmslider-controls-direction" />'),n.controls.directionEl.append(n.controls.next),n.controls.el.addClass("wpmslider-has-controls-direction").append(n.controls.directionEl))},z=function(){n.controls.start=e('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+n.settings.startText+"</a></div>"),n.controls.stop=e('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+n.settings.stopText+"</a></div>"),n.controls.autoEl=e('<div class="wpmslider-controls-auto" />'),n.controls.autoEl.on("click",".wpmslider-start",H),n.controls.autoEl.on("click",".wpmslider-stop",O),n.settings.autoControlsCombine?n.controls.autoEl.append(n.controls.start):n.controls.autoEl.append(n.controls.start).append(n.controls.stop),n.settings.autoControlsSelector?e(n.settings.autoControlsSelector).html(n.controls.autoEl):n.controls.el.addClass("wpmslider-has-controls-auto").append(n.controls.autoEl),W(n.settings.autoStart?"stop":"start")},L=function(){n.children.each(function(t){var i=e(this).find("img:first").attr("title");void 0!==i&&(""+i).length&&e(this).append('<div class="wpmslider-caption"><span>'+i+"</span></div>")})},q=function(t){t.preventDefault(),t.stopPropagation(),n.controls.el.hasClass("disabled")||(n.settings.auto&&n.settings.stopAutoOnClick&&(n.debug&&console.log(n.logAs,"stop on navigation"),o.stopAuto()),e(".strong-view").hasClass("rtl")?o.goToPrevSlide():o.goToNextSlide())},D=function(t){t.preventDefault(),t.stopPropagation(),n.controls.el.hasClass("disabled")||(n.settings.auto&&n.settings.stopAutoOnClick&&(n.debug&&console.log(n.logAs,"stop on navigation"),o.stopAuto()),e(".strong-view").hasClass("rtl")?o.goToNextSlide():o.goToPrevSlide())},H=function(e){o.startAuto(),e.preventDefault(),e.stopPropagation()},O=function(e){o.stopAuto(),e.preventDefault(),e.stopPropagation()},N=function(t){var i,s;t.preventDefault(),t.stopPropagation(),n.controls.el.hasClass("disabled")||(n.settings.auto&&n.settings.stopAutoOnClick&&(n.debug&&console.log(n.logAs,"stop on navigation"),o.stopAuto()),void 0!==(i=e(t.currentTarget)).attr("data-slide-index")&&(s=parseInt(i.attr("data-slide-index")))!==n.active.index&&o.goToSlide(s))},F=function(t){var i=n.children.length;if("short"===n.settings.pagerType)return n.settings.maxSlides>1&&(i=Math.ceil(n.children.length/n.settings.maxSlides)),void n.pagerEl.html(t+1+n.settings.pagerShortSeparator+i);n.pagerEl.find("a").removeClass("active"),n.pagerEl.each(function(i,n){e(n).find("a").eq(t).addClass("active")})},B=function(){if(n.settings.infiniteLoop){var e="";0===n.active.index?e=n.children.eq(0).position():n.active.index===y()-1&&n.carousel?e=n.children.eq((y()-1)*E()).position():n.active.index===n.children.length-1&&(e=n.children.eq(n.children.length-1).position()),e&&("horizontal"===n.settings.mode?T(-e.left,"reset",0):"vertical"===n.settings.mode&&T(-e.top,"reset",0))}n.working=!1,n.settings.onSlideAfter.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index)},W=function(e){n.settings.autoControlsCombine?n.controls.autoEl.html(n.controls[e]):(n.controls.autoEl.find("a").removeClass("active"),n.controls.autoEl.find("a:not(.wpmslider-"+e+")").addClass("active"))},Y=function(){1===y()?(n.controls.prev.addClass("disabled"),n.controls.next.addClass("disabled")):!n.settings.infiniteLoop&&n.settings.hideControlOnEnd&&(0===n.active.index?(n.controls.prev.addClass("disabled"),n.controls.next.removeClass("disabled")):n.active.index===y()-1?(n.controls.next.addClass("disabled"),n.controls.prev.removeClass("disabled")):(n.controls.prev.removeClass("disabled"),n.controls.next.removeClass("disabled")))},X=function(){n.settings.autoDelay>0?setTimeout(o.startAuto,n.settings.autoDelay):o.startAuto(),n.settings.autoHover&&o.hover(function(){m("hover")},function(){S("hover")})},R=function(e){var t=document.activeElement.tagName.toLowerCase();if(null===new RegExp(t,["i"]).exec("input|textarea")&&verge.inViewport(o)){if(39===e.keyCode)return q(e),!1;if(37===e.keyCode)return D(e),!1}},Z=function(){n.touch={start:{x:0,y:0},end:{x:0,y:0}},n.viewport.on("touchstart MSPointerDown pointerdown",U),n.viewport.on("click",".wpmslider a",function(e){n.viewport.hasClass("click-disabled")&&(e.preventDefault(),e.stopPropagation(),n.viewport.removeClass("click-disabled"))})},U=function(e){if(("touchstart"===e.type||0===e.button)&&"a"!==e.originalEvent.target.tagName.toLowerCase()&&!e.originalEvent.target.classList.contains("readmore-text"))if(n.controls.el.addClass("disabled"),n.working)e.preventDefault(),e.stopPropagation(),n.controls.el.removeClass("disabled");else{n.touch.originalPos=o.position();var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t];if("function"==typeof PointerEvent&&void 0===t.pointerId)return;n.touch.start.x=i[0].pageX,n.touch.start.y=i[0].pageY,n.viewport.get(0).setPointerCapture&&(n.pointerId=t.pointerId,n.viewport.get(0).setPointerCapture(n.pointerId)),n.originalClickTarget=t.originalTarget||t.target,n.originalClickButton=t.button,n.originalClickButtons=t.buttons,n.originalEventType=t.type,n.hasMove=!1,n.viewport.on("touchmove MSPointerMove pointermove",j),n.viewport.on("touchend MSPointerUp pointerup",Q),n.viewport.on("MSPointerCancel pointercancel",V)}},V=function(e){e.preventDefault(),T(n.touch.originalPos.left,"reset",0),n.controls.el.removeClass("disabled"),n.viewport.off("MSPointerCancel pointercancel",V),n.viewport.off("touchmove MSPointerMove pointermove",j),n.viewport.off("touchend MSPointerUp pointerup",Q),n.viewport.get(0).releasePointerCapture&&n.viewport.get(0).releasePointerCapture(n.pointerId)},j=function(e){var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t],s=Math.abs(i[0].pageX-n.touch.start.x),o=Math.abs(i[0].pageY-n.touch.start.y),r=0,a=0;n.hasMove=!0,3*s>o&&n.settings.preventDefaultSwipeX?(e.preventDefault(),e.stopPropagation()):3*o>s&&n.settings.preventDefaultSwipeY&&(e.preventDefault(),e.stopPropagation()),"touchmove"!==e.type&&e.preventDefault(),"fade"!==n.settings.mode&&n.settings.oneToOneTouch&&("horizontal"===n.settings.mode?(a=i[0].pageX-n.touch.start.x,r=n.touch.originalPos.left+a):(a=i[0].pageY-n.touch.start.y,r=n.touch.originalPos.top+a),T(r,"reset",0))},Q=function(t){t.preventDefault(),n.viewport.off("touchmove MSPointerMove pointermove",j),n.controls.el.removeClass("disabled");var i=t.originalEvent,s=void 0!==i.changedTouches?i.changedTouches:[i],r=0,a=0;n.touch.end.x=s[0].pageX,n.touch.end.y=s[0].pageY,"fade"===n.settings.mode?(a=Math.abs(n.touch.start.x-n.touch.end.x))>=n.settings.swipeThreshold&&(n.touch.start.x>n.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):("horizontal"===n.settings.mode?(a=n.touch.end.x-n.touch.start.x,r=n.touch.originalPos.left):(a=n.touch.end.y-n.touch.start.y,r=n.touch.originalPos.top),!n.settings.infiniteLoop&&(0===n.active.index&&a>0||n.active.last&&a<0)?T(r,"reset",200):Math.abs(a)>=n.settings.swipeThreshold?(a<0?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):T(r,"reset",200)),n.viewport.off("touchend MSPointerUp pointerup",Q),n.viewport.get(0).releasePointerCapture&&n.viewport.get(0).releasePointerCapture(n.pointerId),!1!==n.hasMove||0!==n.originalClickButton&&"touchstart"!==n.originalEventType||e(n.originalClickTarget).trigger({type:"click",button:n.originalClickButton,buttons:n.originalClickButtons})},G=function(e){n.initialized?n.working?(n.debug&&console.log(n.logAs,"slider working"),window.setTimeout(G,10)):(o.redrawSlider(),n.settings.onSliderResize.call(o,n.active.index)):n.debug&&console.log(n.logAs,"slider not initialized")},J=function(e){var t=P();n.settings.ariaHidden&&(n.children.attr("aria-hidden","true"),n.children.slice(e,e+t).attr("aria-hidden","false"))};return o.goToSlide=function(t,i){var s,r,a,l,d=!0,c=0,g={left:0,top:0},p=null;if(n.oldIndex=n.active.index,n.active.index=function(e){return e<0?n.settings.infiniteLoop?y()-1:n.active.index:e>=y()?n.settings.infiniteLoop?0:n.active.index:e}(t),!n.working&&n.active.index!==n.oldIndex){if(n.working=!0,void 0!==(d=n.settings.onSlideBefore.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index))&&!d)return n.active.index=n.oldIndex,void(n.working=!1);"next"===i?n.settings.onSlideNext.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index)||(d=!1):"prev"===i&&(n.settings.onSlidePrev.call(o,n.children.eq(n.active.index),n.oldIndex,n.active.index)||(d=!1)),n.active.last=n.active.index>=y()-1,(n.settings.pager||n.settings.pagerCustom)&&F(n.active.index),n.settings.controls&&Y(),"fade"===n.settings.mode?(n.settings.adaptiveHeight&&n.viewport.height()!==w()&&n.viewport.animate({height:w()},n.settings.adaptiveHeightSpeed),n.children.filter(":visible").fadeOut(n.settings.speed).css({zIndex:0}),n.children.eq(n.active.index).css("zIndex",n.settings.slideZIndex+1).fadeIn(n.settings.speed,function(){e(this).css("zIndex",n.settings.slideZIndex),B()})):(n.settings.adaptiveHeight&&n.viewport.height()!==w()&&n.viewport.animate({height:w()},n.settings.adaptiveHeightSpeed),!n.settings.infiniteLoop&&n.carousel&&n.active.last?"horizontal"===n.settings.mode?(g=(p=n.children.eq(n.children.length-1)).position(),c=n.viewport.width()-p.outerWidth()):(s=n.children.length-n.settings.minSlides,g=n.children.eq(s).position()):n.carousel&&n.active.last&&"prev"===i?(r=1===n.settings.moveSlides?n.settings.maxSlides-E():(y()-1)*E()-(n.children.length-n.settings.maxSlides),g=(p=o.children(".wpmslider-clone").eq(r)).position()):"next"===i&&0===n.active.index?(g=o.find("> .wpmslider-clone").eq(n.settings.maxSlides).position(),n.active.last=!1):t>=0&&(l=t*parseInt(E()),g=n.children.eq(l).position()),void 0!==g&&(a="horizontal"===n.settings.mode?-(g.left-c):-g.top,T(a,"slide",n.settings.speed))),n.settings.ariaHidden&&J(n.active.index*E())}},o.goToNextSlide=function(){if((n.settings.infiniteLoop||!n.active.last)&&!0!==n.working){var e=parseInt(n.active.index)+1;o.goToSlide(e,"next")}},o.goToPrevSlide=function(){if((n.settings.infiniteLoop||0!==n.active.index)&&!0!==n.working){var e=parseInt(n.active.index)-1;o.goToSlide(e,"prev")}},o.startAuto=function(e){n.interval||(n.interval=setInterval(function(){"next"===n.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},n.settings.pause),n.settings.onAutoChange.call(o,!0),n.settings.autoControls&&!0!==e&&W("stop"))},o.stopAuto=function(e){n.autoPaused&&(n.autoPaused=!1),n.interval&&(clearInterval(n.interval),n.interval=null,n.settings.onAutoChange.call(o,!1),n.settings.autoControls&&!0!==e&&W("start"))},o.getCurrentSlide=function(){return n.active.index},o.getCurrentSlideElement=function(){return n.children.eq(n.active.index)},o.getSlideElement=function(e){return n.children.eq(e)},o.getSlideCount=function(){return n.children.length},o.isWorking=function(){return n.working},o.redrawSlider=function(){var e,t,i,s,r;n.debug&&console.log(n.logAs,"redrawSlider"),g(),n.children.height("auto"),n.viewport.height(w()+2),n.settings.stretch&&(e=n.children.map(function(){return jQuery(this).actual("outerHeight")}).get(),t=x(e),n.children.height(t),n.children.add(o.find(".wpmslider-clone")).height(t)),n.children.add(o.find(".wpmslider-clone")).outerWidth(C()),n.children.length>n.settings.maxSlides&&n.active.last&&!n.settings.infiniteLoop?"horizontal"===n.settings.mode?(i=(s=n.children.last()).position(),T(-(i.left-(n.viewport.width()-s.outerWidth())),"reset",0)):"vertical"===n.settings.mode&&(r=n.children.length-n.settings.minSlides,i=n.children.eq(r).position(),T(-i.top,"reset",0)):(i=n.children.eq(n.active.index*E()).position(),n.active.index===y()-1&&(n.active.last=!0),void 0!==i&&("horizontal"===n.settings.mode?T(-i.left,"reset",0):"vertical"===n.settings.mode?T(-i.top,"reset",0):"none"===n.settings.mode&&T(-i.top,"reset",0))),n.active.last&&(n.active.index=y()-1),n.active.index>=y()&&(n.active.last=!0),n.settings.pager&&!n.settings.pagerCustom&&(k(),F(n.active.index)),n.settings.ariaHidden&&J(n.active.index*E())},o.destroySlider=function(){n.initialized&&(n.initialized=!1,e(".wpmslider-clone",this).remove(),n.children.each(function(){void 0!==e(this).data("origStyle")?e(this).attr("style",e(this).data("origStyle")):e(this).removeAttr("style")}),void 0!==e(this).data("origStyle")?this.attr("style",e(this).data("origStyle")):e(this).removeAttr("style"),e(this).unwrap().unwrap(),n.controls.el&&n.controls.el.remove(),n.controls.next&&n.controls.next.remove(),n.controls.prev&&n.controls.prev.remove(),n.pagerEl&&n.settings.controls&&!n.settings.pagerCustom&&n.pagerEl.remove(),e(".wpmslider-caption",this).remove(),n.controls.autoEl&&n.controls.autoEl.remove(),clearInterval(n.interval),clearInterval(n.visibilityInterval),n.settings.responsive&&e(window).off("resize",G),n.settings.keyboardEnabled&&e(document).off("keydown",R),e(this).removeData("strongSlider"))},o.reloadSlider=function(t){void 0!==t&&(i=t),o.destroySlider(),r(),e(o).data("strongSlider",o)},r(),e(o).data("strongSlider",o),s.attr("data-state","init"),n.debug&&console.log(n.logAs,"viewport",verge.viewportW(),"x",verge.viewportH()),this}}}(jQuery);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wpchill,silkalns,cdillon27
3
  Tags: testimonials, testimonial slider, testimonial form, star ratings
4
  Requires at least: 5.2
5
  Requires PHP: 5.6
6
- Tested up to: 5.7
7
- Stable tag: 2.51.4
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -207,7 +207,7 @@ No. If you already have testimonials in another plugin or theme, you will have t
207
 
208
  == Changelog ==
209
 
210
- * See [changelog.txt](https://github.com/MachoThemes/strong-testimonials/blob/master/changelog.txt) for previous versions.
211
 
212
  == Upgrade Notice ==
213
 
3
  Tags: testimonials, testimonial slider, testimonial form, star ratings
4
  Requires at least: 5.2
5
  Requires PHP: 5.6
6
+ Tested up to: 5.8
7
+ Stable tag: 2.51.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
207
 
208
  == Changelog ==
209
 
210
+ * See [changelog.txt](https://github.com/WPChill/strong-testimonials/blob/dev/changelog.txt) for previous versions.
211
 
212
  == Upgrade Notice ==
213
 
strong-testimonials.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: WPChill
7
  * Author URI: https://wpchill.com/
8
- * Version: 2.51.4
9
  * Text Domain: strong-testimonials
10
  * Domain Path: /languages
11
  * Requires: 4.6 or higher
@@ -45,7 +45,7 @@ if ( ! defined( 'ABSPATH' ) ) {
45
  exit;
46
  }
47
 
48
- define( 'WPMTST_VERSION', '2.51.4' );
49
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
50
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
51
  defined( 'WPMTST_STORE_URL' ) || define( 'WPMTST_STORE_URL', 'https://strongtestimonials.com' );
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: WPChill
7
  * Author URI: https://wpchill.com/
8
+ * Version: 2.51.5
9
  * Text Domain: strong-testimonials
10
  * Domain Path: /languages
11
  * Requires: 4.6 or higher
45
  exit;
46
  }
47
 
48
+ define( 'WPMTST_VERSION', '2.51.5' );
49
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
50
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
51
  defined( 'WPMTST_STORE_URL' ) || define( 'WPMTST_STORE_URL', 'https://strongtestimonials.com' );
templates/default/content.php CHANGED
@@ -14,7 +14,7 @@ do_action( 'wpmtst_before_view' );
14
  <div class="strong-view <?php wpmtst_container_class(); ?>"<?php wpmtst_container_data(); ?>>
15
  <?php do_action( 'wpmtst_view_header' ); ?>
16
 
17
- <div class="strong-content <?php wpmtst_content_class(); ?>">
18
  <?php do_action( 'wpmtst_before_content', $atts ); ?>
19
 
20
  <?php while ( $query->have_posts() ) : $query->the_post(); ?>
14
  <div class="strong-view <?php wpmtst_container_class(); ?>"<?php wpmtst_container_data(); ?>>
15
  <?php do_action( 'wpmtst_view_header' ); ?>
16
 
17
+ <div class="strong-content strong-grid <?php wpmtst_content_class(); ?>">
18
  <?php do_action( 'wpmtst_before_content', $atts ); ?>
19
 
20
  <?php while ( $query->have_posts() ) : $query->the_post(); ?>
templates/small-widget/content.css CHANGED
@@ -125,7 +125,8 @@ Thanks https://css-tricks.com/minimum-paragraph-widths/
125
  font-weight: 700;
126
  }
127
  .strong-view.wpmtst-small-widget .readmore {
128
- margin-top: 1em;
 
129
  }
130
  .strong-view.wpmtst-small-widget .readmore-page {
131
  border: 1px solid #E6E6E6;
125
  font-weight: 700;
126
  }
127
  .strong-view.wpmtst-small-widget .readmore {
128
+ margin-top: 0.5em;
129
+ margin-bottom: 0.5em;
130
  }
131
  .strong-view.wpmtst-small-widget .readmore-page {
132
  border: 1px solid #E6E6E6;
templates/small-widget/content.php CHANGED
@@ -41,7 +41,7 @@ do_action( 'wpmtst_before_view' );
41
  </div>
42
  <?php endwhile; ?>
43
 
44
- <?php do_action( 'wpmtst_after_testimonial' ,$atts); ?>
45
  </div>
46
 
47
  <?php do_action( 'wpmtst_view_footer' ); ?>
41
  </div>
42
  <?php endwhile; ?>
43
 
44
+ <?php do_action( 'wpmtst_after_content' ,$atts); ?>
45
  </div>
46
 
47
  <?php do_action( 'wpmtst_view_footer' ); ?>
templates/unstyled/content.css CHANGED
@@ -11,4 +11,21 @@
11
 
12
  .msHtmlOverlay .layer .disabled {
13
  display: block !important;
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  .msHtmlOverlay .layer .disabled {
13
  display: block !important;
14
+ }
15
+
16
+
17
+ .strong-view.wpmtst-unstyled .wpmtst-testimonial-inner {
18
+ display: block;
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+
23
+ /* Pagination
24
+ -----------------------------------------------*/
25
+
26
+ .strong-view ul.simplePagerNav li {
27
+ display: inline;
28
+ list-style: none;
29
+ margin: 0;
30
+ padding: 5px;
31
+ }