Strong Testimonials - Version 2.38

Version Description

Download this release

Release Info

Developer machothemes
Plugin Icon 128x128 Strong Testimonials
Version 2.38
Comparing to
See all releases

Code changes from version 2.37 to 2.38

Files changed (41) hide show
  1. admin/about/class-strong-testimonials-about.php +3 -2
  2. admin/about/how-to.php +5 -5
  3. admin/about/upsell.php +10 -0
  4. admin/admin-notices.php +4 -21
  5. admin/admin.php +30 -0
  6. admin/class-strong-testimonials-addons.php +132 -0
  7. admin/class-strong-testimonials-admin-scripts.php +7 -0
  8. admin/class-strong-testimonials-post-editor.php +2 -2
  9. admin/class-strong-testimonials-updater.php +1 -0
  10. admin/class-strong-testimonials-upsell.php +117 -0
  11. admin/css/views.css +1 -1
  12. admin/custom-fields.php +4 -2
  13. admin/partials/fields/field-type.php +2 -0
  14. admin/partials/views/template-input.php +4 -4
  15. admin/partials/views/template-not-found.php +4 -4
  16. admin/scss/_partials/_elements.scss +1 -1
  17. admin/settings/class-strong-testimonials-settings-licenses.php +0 -111
  18. admin/settings/class-strong-testimonials-settings.php +1 -1
  19. admin/settings/partials/form.php +11 -11
  20. admin/settings/partials/licenses.php +0 -27
  21. admin/views.php +1 -0
  22. assets/css/admin-global.css +3 -0
  23. assets/css/admin.css +182 -11
  24. assets/img/logo.png +0 -0
  25. assets/img/notice-bg-1.png +0 -0
  26. assets/img/notice-bg-2.png +0 -0
  27. assets/js/admin-js.js +74 -3
  28. assets/src/js/admin.js +6 -0
  29. assets/src/js/modules/addonspage.js +33 -0
  30. assets/src/js/modules/notice.js +4 -1
  31. changelog.txt +7 -0
  32. includes/class-strong-testimonials-render.php +1 -1
  33. includes/class-strong-view.php +1 -1
  34. includes/functions-template-form.php +2 -2
  35. includes/functions-template.php +1 -1
  36. public/js/lib/readmore/readmore.js +78 -83
  37. public/js/lib/readmore/readmore.min.js +1 -1
  38. public/js/lib/strongslider/jquery.strongslider.js +1 -1
  39. public/js/lib/strongslider/jquery.strongslider.min.js +1 -1
  40. readme.txt +2 -2
  41. strong-testimonials.php +7 -6
admin/about/class-strong-testimonials-about.php CHANGED
@@ -86,8 +86,9 @@ class Strong_Testimonials_About {
86
  break;
87
  }
88
 
89
- include WPMTST_ADMIN. 'about/links.php';
90
- include WPMTST_ADMIN. 'about/addons.php';
 
91
  ?>
92
 
93
  </div>
86
  break;
87
  }
88
 
89
+ include WPMTST_ADMIN . 'about/upsell.php';
90
+ include WPMTST_ADMIN . 'about/links.php';
91
+ include WPMTST_ADMIN . 'about/addons.php';
92
  ?>
93
 
94
  </div>
admin/about/how-to.php CHANGED
@@ -4,8 +4,8 @@ $add_the_view = __( 'Add the view to a page or sidebar using its unique shortcod
4
  <h2><?php _e( 'Let\'s Get Started', 'strong-testimonials' ); ?></h2>
5
  <p class="lead-description"><?php _e( 'This plugin is different than others you may have tried.', 'strong-testimonials' ); ?></p>
6
 
7
- <div class="feature-section two-col">
8
- <div class="col">
9
  <h3><?php _e('How to Add the Form', 'strong-testimonials' ); ?></h3>
10
  <p>1. <?php printf( __( '<a href="%s">Check the custom fields</a>. The default set of fields are designed to suit most situations. Add or remove fields as you see fit.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-fields' ) ); ?>
11
  </p>
@@ -15,7 +15,7 @@ $add_the_view = __( 'Add the view to a page or sidebar using its unique shortcod
15
  <p>3. <?php echo $add_the_view; ?></p>
16
  </div>
17
 
18
- <div class="col">
19
  <h3><?php _e( 'How to Display Your Testimonials', 'strong-testimonials' ); ?></h3>
20
  <p>1. <?php printf( __( '<a href="%s">Enter your testimonials</a> if necessary. The plugin will not read existing testimonials from another plugin or theme. It will not import testimonials.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial' ) ); ?></p>
21
  <p>2. <?php printf( __( 'Create a <a href="%s">view</a>.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ); ?>
@@ -24,7 +24,7 @@ $add_the_view = __( 'Add the view to a page or sidebar using its unique shortcod
24
  <p>3. <?php echo $add_the_view; ?></p>
25
  </div>
26
 
27
- <div class="col">
28
  <h3><?php _e( 'How to Add a Slideshow', 'strong-testimonials' ); ?></h3>
29
  <p>1. <?php printf( __( '<a href="%s">Enter your testimonials</a> if necessary. The plugin will not read existing testimonials from another plugin or theme. It will not import testimonials.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial' ) ); ?></p>
30
  <p>2. <?php printf( __( 'Create a <a href="%s">view</a>.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ); ?>
@@ -33,7 +33,7 @@ $add_the_view = __( 'Add the view to a page or sidebar using its unique shortcod
33
  <p>3. <?php echo $add_the_view; ?></p>
34
  </div>
35
 
36
- <div class="col">
37
  <h3><?php _e( 'How to Translate', 'strong-testimonials' ); ?></h3>
38
  <p><?php _e( 'Strong Testimonials is compatible with WPML, Polylang and WP Globus.', 'strong-testimonials' ); ?></p>
39
  <p><?php _e( 'In WPML and Polylang, domains are added to the <strong>String Translation</strong> pages. Those domains encompass the form fields, the form messages, the notification email, and the "Read more" link text in your views. They are updated automatically when any of those settings change.', 'strong-testimonials' ); ?></p>
4
  <h2><?php _e( 'Let\'s Get Started', 'strong-testimonials' ); ?></h2>
5
  <p class="lead-description"><?php _e( 'This plugin is different than others you may have tried.', 'strong-testimonials' ); ?></p>
6
 
7
+ <div class="feature-section has-4-columns is-fullwidth four-col">
8
+ <div class="col column">
9
  <h3><?php _e('How to Add the Form', 'strong-testimonials' ); ?></h3>
10
  <p>1. <?php printf( __( '<a href="%s">Check the custom fields</a>. The default set of fields are designed to suit most situations. Add or remove fields as you see fit.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-fields' ) ); ?>
11
  </p>
15
  <p>3. <?php echo $add_the_view; ?></p>
16
  </div>
17
 
18
+ <div class="col column">
19
  <h3><?php _e( 'How to Display Your Testimonials', 'strong-testimonials' ); ?></h3>
20
  <p>1. <?php printf( __( '<a href="%s">Enter your testimonials</a> if necessary. The plugin will not read existing testimonials from another plugin or theme. It will not import testimonials.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial' ) ); ?></p>
21
  <p>2. <?php printf( __( 'Create a <a href="%s">view</a>.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ); ?>
24
  <p>3. <?php echo $add_the_view; ?></p>
25
  </div>
26
 
27
+ <div class="col column">
28
  <h3><?php _e( 'How to Add a Slideshow', 'strong-testimonials' ); ?></h3>
29
  <p>1. <?php printf( __( '<a href="%s">Enter your testimonials</a> if necessary. The plugin will not read existing testimonials from another plugin or theme. It will not import testimonials.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial' ) ); ?></p>
30
  <p>2. <?php printf( __( 'Create a <a href="%s">view</a>.', 'strong-testimonials' ), admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ); ?>
33
  <p>3. <?php echo $add_the_view; ?></p>
34
  </div>
35
 
36
+ <div class="col column">
37
  <h3><?php _e( 'How to Translate', 'strong-testimonials' ); ?></h3>
38
  <p><?php _e( 'Strong Testimonials is compatible with WPML, Polylang and WP Globus.', 'strong-testimonials' ); ?></p>
39
  <p><?php _e( 'In WPML and Polylang, domains are added to the <strong>String Translation</strong> pages. Those domains encompass the form fields, the form messages, the notification email, and the "Read more" link text in your views. They are updated automatically when any of those settings change.', 'strong-testimonials' ); ?></p>
admin/about/upsell.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wpmtst-notice wpmtst-notice--upsell">
2
+ <div class="wpmtst-notice--upsell__bg"></div>
3
+ <h3><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></h3>
4
+ <p>
5
+ <?php esc_html_e( 'Build trust and credibility with your products.', 'strong-testimonials' ); ?><br/>
6
+ <?php esc_html_e( 'Do more with Strong Testimonials extensions.', 'strong-testimonials' ); ?>
7
+ </p>
8
+ <a class="button button-primary" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'View pricing', 'strong-testimonials' ); ?></a>
9
+ <a class="button button-secondary" href="<?php echo esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=strong-testimonials-addons' ) ); ?>"><?php esc_html_e( 'View Extensions', 'strong-testimonials' ); ?></a>
10
+ </div>
admin/admin-notices.php CHANGED
@@ -61,7 +61,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
61
  case 'defaults-restored' :
62
  ob_start();
63
  ?>
64
- <div class="wpmtst notice notice-success is-dismissible" data-key="<?php esc_attr_e( $key ); ?>">
65
  <p>
66
  <?php _e( 'Defaults restored.', 'strong-testimonials' ); ?>
67
  </p>
@@ -73,7 +73,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
73
  case 'fields-saved' :
74
  ob_start();
75
  ?>
76
- <div class="wpmtst notice notice-success is-dismissible" data-key="<?php esc_attr_e( $key ); ?>">
77
  <p>
78
  <?php _e( 'Fields saved.', 'strong-testimonials' ); ?>
79
  </p>
@@ -85,7 +85,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
85
  case 'changes-cancelled' :
86
  ob_start();
87
  ?>
88
- <div class="wpmtst notice notice-success is-dismissible" data-key="<?php esc_attr_e( $key ); ?>">
89
  <p>
90
  <?php _e( 'Changes cancelled.', 'strong-testimonials' ); ?>
91
  </p>
@@ -102,7 +102,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
102
 
103
  ob_start();
104
  ?>
105
- <div class="wpmtst notice notice-warning is-dismissible" data-key="<?php esc_attr_e( $key ); ?>">
106
  <p>
107
  <?php _e( 'Captcha options have changed in <strong>Strong Testimonials</strong>.', 'strong-testimonials' ); ?>
108
  <?php echo $settings_link; ?>
@@ -176,20 +176,3 @@ function wpmtst_auto_dismiss_notices( $option, $old_value, $value ) {
176
  }
177
  add_action( 'update_option', 'wpmtst_auto_dismiss_notices', 10, 3 );
178
 
179
-
180
- function wpmtst_admin_feedback_notice() {
181
- $screen = get_current_screen();
182
- if ( $screen->id !== 'edit-wpm-testimonial' ) {
183
- return;
184
- }
185
-
186
- ?>
187
- <div class="notice wpmtst-notice is-dismissible" data-key="feedback-notice" data-nonce="<?php echo esc_attr( wp_create_nonce( "wpmtst-admin" ) ); ?>">
188
- <img class="wpmst-mascot" src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/mascot.png" />
189
- <img src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/logo-long.svg" width="400"/>
190
- <p><?php esc_html_e( 'Do you enjoy using Strong Testimonials? Please take a minute to suggest a feature or tell us what you think.', 'strong-testimonials' ); ?></p>
191
- <a class="button" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScch0AchtnzxJsSrjUcW9ypcr1fZ9r-vyk3emEp8Sv47brb2g/viewform"><?php esc_html_e( 'Submit Feedback', 'strong-testimonials' ); ?></a>
192
- </div>
193
- <?php
194
- }
195
- add_action( 'admin_notices', 'wpmtst_admin_feedback_notice' );
61
  case 'defaults-restored' :
62
  ob_start();
63
  ?>
64
+ <div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
65
  <p>
66
  <?php _e( 'Defaults restored.', 'strong-testimonials' ); ?>
67
  </p>
73
  case 'fields-saved' :
74
  ob_start();
75
  ?>
76
+ <div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
77
  <p>
78
  <?php _e( 'Fields saved.', 'strong-testimonials' ); ?>
79
  </p>
85
  case 'changes-cancelled' :
86
  ob_start();
87
  ?>
88
+ <div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
89
  <p>
90
  <?php _e( 'Changes cancelled.', 'strong-testimonials' ); ?>
91
  </p>
102
 
103
  ob_start();
104
  ?>
105
+ <div class="wpmtst notice notice-warning is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
106
  <p>
107
  <?php _e( 'Captcha options have changed in <strong>Strong Testimonials</strong>.', 'strong-testimonials' ); ?>
108
  <?php echo $settings_link; ?>
176
  }
177
  add_action( 'update_option', 'wpmtst_auto_dismiss_notices', 10, 3 );
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/admin.php CHANGED
@@ -290,3 +290,33 @@ function wpmtst_get_field_by_name( $field_name = '' ) {
290
  return '';
291
  }
292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  return '';
291
  }
292
 
293
+ /**
294
+ * Returns true if at least one extension is installed
295
+ */
296
+ function wpmtst_extensions_installed() {
297
+
298
+ if ( defined( 'WPMTST_CUSTOM_FIELDS_VERSION' ) ) {
299
+ return true;
300
+ }
301
+ if ( defined( 'WPMTST_ASSIGNMENT_VERSION' ) ) {
302
+ return true;
303
+ }
304
+ if ( defined( 'WPMTST_MULTIPLE_FORMS_VERSION' ) ) {
305
+ return true;
306
+ }
307
+ if ( defined( 'WPMTST_PROPERTIES_VERSION' ) ) {
308
+ return true;
309
+ }
310
+ if ( defined( 'WPMTST_COUNTRY_SELECTOR_VERSION' ) ) {
311
+ return true;
312
+ }
313
+ if ( defined( 'WPMTST_REVIEW_MARKUP_VERSION' ) ) {
314
+ return true;
315
+ }
316
+ if ( defined( 'WPMTST_ADVANCED_VIEWS_VERSION' ) ) {
317
+ return true;
318
+ }
319
+
320
+ return false;
321
+ }
322
+
admin/class-strong-testimonials-addons.php ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Strong_Testimonials_Addons
4
+ *
5
+ * @since 2.38
6
+ */
7
+ class Strong_Testimonials_Addons {
8
+
9
+ private $addons = array();
10
+
11
+ public function __construct() {
12
+ add_filter( 'wpmtst_submenu_pages', array( $this, 'add_submenu' ) );
13
+
14
+ // Add ajax action to reload extensions
15
+ add_action( 'wp_ajax_wpmtst_reload_extensions', array( $this, 'reload_extensions' ), 20 );
16
+ }
17
+
18
+ private function check_for_addons() {
19
+
20
+ if ( false !== ( $data = get_transient( 'strong_testimonials_all_extensions' ) ) ) {
21
+ return $data;
22
+ }
23
+
24
+ $addons = array();
25
+
26
+ $url = apply_filters( 'strong_testimonials_addon_server_url', WPMTST_STORE_URL . '/wp-json/mt/v1/get-all-extensions' );
27
+
28
+ // Get data from the remote URL.
29
+ $response = wp_remote_get( $url );
30
+
31
+ if ( ! is_wp_error( $response ) ) {
32
+
33
+ // Decode the data that we got.
34
+ $data = json_decode( wp_remote_retrieve_body( $response ), true );
35
+
36
+ if ( ! empty( $data ) && is_array( $data ) ) {
37
+ $addons = $data;
38
+ // Store the data for a week.
39
+ set_transient( 'strong_testimonials_all_extensions', $data, 7 * DAY_IN_SECONDS );
40
+ }
41
+ }
42
+
43
+ return apply_filters( 'wpmtst_addons', $addons );
44
+ }
45
+
46
+ public function render_addons() {
47
+
48
+ wp_enqueue_style( 'wpmtst-admin-style' );
49
+ wp_enqueue_script( 'wpmtst-admin-script' );
50
+
51
+ if ( ! empty( $this->addons ) ) {
52
+ foreach ( $this->addons as $addon ) {
53
+ $image = ( '' != $addon['image'] ) ? $addon['image'] : WPMTST_ASSETS_IMG . '/logo.png';
54
+ echo '<div class="wpmtst-addon">';
55
+ echo '<div class="wpmtst-addon-box">';
56
+ echo '<img src="' . esc_attr( $image ) . '">';
57
+ echo '<div class="wpmtst-addon-content">';
58
+ echo '<h3>' . esc_html( $addon['name'] ) . '</h3>';
59
+ echo '<div class="wpmtst-addon-description">' . wp_kses_post( $addon['description'] ) . '</div>';
60
+ echo '</div>';
61
+ echo '</div>';
62
+ echo '<div class="wpmtst-addon-actions">';
63
+ echo apply_filters( 'wpmtst_addon_button_action', '<a href="' . esc_url( WPMTST_STORE_UPGRADE_URL . '?utm_source=st-lite&utm_campaign=upsell&utm_medium=' . esc_attr( $addon['slug'] ) ) . '" target="_blank" class="button primary-button">' . esc_html__( 'Upgrade to PRO', 'strong-testimonials' ) . '</a>', $addon );
64
+ echo '</div>';
65
+ echo '</div>';
66
+ }
67
+ }
68
+
69
+ }
70
+
71
+ /**
72
+ * Add submenu page.
73
+ *
74
+ * @param $pages
75
+ *
76
+ * @return mixed
77
+ */
78
+ public function add_submenu( $pages ) {
79
+ $pages[91] = $this->get_submenu();
80
+ return $pages;
81
+ }
82
+
83
+ /**
84
+ * Return submenu page parameters.
85
+ *
86
+ * @return array
87
+ */
88
+ public function get_submenu() {
89
+ return array(
90
+ 'page_title' => __( 'Extensions', 'strong-testimonials' ),
91
+ 'menu_title' => __( 'Extensions', 'strong-testimonials' ),
92
+ 'capability' => 'strong_testimonials_options',
93
+ 'menu_slug' => 'strong-testimonials-addons',
94
+ 'function' => array( $this, 'addons_page' ),
95
+ );
96
+ }
97
+
98
+
99
+ /**
100
+ * Print the Addons page.
101
+ */
102
+ public function addons_page() {
103
+
104
+ $this->addons = $this->check_for_addons();
105
+ ?>
106
+
107
+ <div class="wrap">
108
+ <h1 style="margin-bottom: 20px; display: inline-block;"><?php esc_html_e( 'Extensions', 'strong-testimonials' ); ?></h1>
109
+
110
+ <a id="wpmtst-reload-extensions" class="button button-primary" style="margin: 10px 0 0 30px;" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wpmtst-reload-extensions' ) ); ?>"><?php esc_html_e( 'Reload Extensions', 'strong-testimonials' ); ?></a>
111
+
112
+ <div class="wpmtst-addons-container">
113
+ <?php $this->render_addons(); ?>
114
+ </div>
115
+ </div>
116
+ <?php
117
+ }
118
+
119
+ public function reload_extensions() {
120
+ // Run a security check first.
121
+ check_admin_referer( 'wpmtst-reload-extensions', 'nonce' );
122
+
123
+ delete_transient( 'strong_testimonials_all_extensions' );
124
+
125
+ die;
126
+ }
127
+
128
+
129
+
130
+ }
131
+
132
+ new Strong_Testimonials_Addons();
admin/class-strong-testimonials-admin-scripts.php CHANGED
@@ -64,6 +64,11 @@ class Strong_Testimonials_Admin_Scripts {
64
  $plugin_version,
65
  true );
66
 
 
 
 
 
 
67
 
68
  wp_register_style(
69
  'wpmtst-admin-style',
@@ -232,6 +237,8 @@ class Strong_Testimonials_Admin_Scripts {
232
  public static function admin_enqueue_scripts() {
233
  $plugin_version = get_option( 'wpmtst_plugin_version' );
234
 
 
 
235
  wp_enqueue_script( 'wpmtst-admin-global',
236
  WPMTST_ADMIN_URL . 'js/admin-global.js',
237
  array( 'jquery' ),
64
  $plugin_version,
65
  true );
66
 
67
+ wp_register_style(
68
+ 'wpmtst-admin-global-style',
69
+ WPMTST_ASSETS_CSS . 'admin-global.css',
70
+ array(),
71
+ $plugin_version );
72
 
73
  wp_register_style(
74
  'wpmtst-admin-style',
237
  public static function admin_enqueue_scripts() {
238
  $plugin_version = get_option( 'wpmtst_plugin_version' );
239
 
240
+ wp_enqueue_style( 'wpmtst-admin-global-style' );
241
+
242
  wp_enqueue_script( 'wpmtst-admin-global',
243
  WPMTST_ADMIN_URL . 'js/admin-global.js',
244
  array( 'jquery' ),
admin/class-strong-testimonials-post-editor.php CHANGED
@@ -71,12 +71,12 @@ class Strong_Testimonials_Post_Editor {
71
  ?>
72
  <tr>
73
  <th>
74
- <label for="<?php esc_attr_e( $field['name'] ); ?>">
75
  <?php echo apply_filters( 'wpmtst_l10n', $field['label'], 'strong-testimonials-form-fields', $field['name'] . ' : label' ); ?>
76
  </label>
77
  </th>
78
  <td>
79
- <div class="<?php esc_attr_e( $field['input_type'] ); ?>">
80
  <?php self::meta_option( $field, $post, $is_new ); ?>
81
  </div>
82
  </td>
71
  ?>
72
  <tr>
73
  <th>
74
+ <label for="<?php echo esc_attr( $field['name'] ); ?>">
75
  <?php echo apply_filters( 'wpmtst_l10n', $field['label'], 'strong-testimonials-form-fields', $field['name'] . ' : label' ); ?>
76
  </label>
77
  </th>
78
  <td>
79
+ <div class="<?php echo esc_attr( $field['input_type'] ); ?>">
80
  <?php self::meta_option( $field, $post, $is_new ); ?>
81
  </div>
82
  </td>
admin/class-strong-testimonials-updater.php CHANGED
@@ -232,6 +232,7 @@ class Strong_Testimonials_Updater {
232
 
233
  public function update_admin_notices() {
234
  wpmtst_add_admin_notice( 'feedback-notice', true );
 
235
  }
236
 
237
  /**
232
 
233
  public function update_admin_notices() {
234
  wpmtst_add_admin_notice( 'feedback-notice', true );
235
+ wpmtst_add_admin_notice( 'upsell-notice', true );
236
  }
237
 
238
  /**
admin/class-strong-testimonials-upsell.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Strong_Testimonials_Upsell
4
+ *
5
+ * @since 2.38
6
+ */
7
+ class Strong_Testimonials_Upsell {
8
+
9
+ public function __construct() {
10
+ add_action( 'admin_notices', array( $this, 'add_general_upsell_notice' ), 11 );
11
+ add_action( 'wpmtst_after_form_type_selection', array( $this, 'add_upsells_1' ) );
12
+ add_action( 'wpmtst_before_fields_settings', array( $this, 'add_upsells_2' ) );
13
+ add_action( 'wpmtst_view_editor_after_groups', array( $this, 'add_upsells_3' ) );
14
+ add_action( 'wpmtst_view_editor_after_group_select', array( $this, 'add_upsells_4' ) );
15
+ }
16
+
17
+ public function add_general_upsell_notice() {
18
+ $screen = get_current_screen();
19
+ if ( $screen->id !== 'edit-wpm-testimonial' && $screen->id !== 'wpm-testimonial_page_testimonial-views' ) {
20
+ return;
21
+ }
22
+
23
+ $notices = get_option( 'wpmtst_admin_notices', array() );
24
+ ?>
25
+
26
+ <div class="notice wpmtst-notice-wrap">
27
+
28
+ <?php if ( array_key_exists( 'feedback-notice', $notices ) ) : ?>
29
+ <div class="wpmtst-notice wpmtst-notice--feedback" data-key="feedback-notice" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wpmtst-admin' ) ); ?>">
30
+ <div class="wpmtst-notice--feedback__bg"></div>
31
+ <h2><?php esc_html_e( 'Feature Request', 'strong-testimonials' ); ?></h2>
32
+ <p><?php esc_html_e( 'Do you enjoy using Strong Testimonials? Please take a minute to suggest a feature or tell us what you think.', 'strong-testimonials' ); ?></p>
33
+ <a class="button" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScch0AchtnzxJsSrjUcW9ypcr1fZ9r-vyk3emEp8Sv47brb2g/viewform"><?php esc_html_e( 'Submit Feedback', 'strong-testimonials' ); ?></a>
34
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'strong-testimonials' ); ?></span></button>
35
+ </div><!-- wpmtst-notice--feedback -->
36
+ <?php endif; ?>
37
+
38
+ <?php if ( array_key_exists( 'upsell-notice', $notices ) && ! wpmtst_extensions_installed() ) : ?>
39
+ <div class="wpmtst-notice wpmtst-notice--upsell" data-key="upsell-notice" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wpmtst-admin' ) ); ?>">
40
+ <div class="wpmtst-notice--upsell__bg"></div>
41
+ <h2><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></h2>
42
+ <p>
43
+ <?php esc_html_e( 'Build trust and credibility with your products.', 'strong-testimonials' ); ?><br/>
44
+ <?php esc_html_e( 'Do more with Strong Testimonials extensions.', 'strong-testimonials' ); ?>
45
+ </p>
46
+ <a class="button button-primary" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'View pricing', 'strong-testimonials' ); ?></a>
47
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'strong-testimonials' ); ?></span></button>
48
+ </div><!-- wpmtst-notice--upsell -->
49
+ <?php endif; ?>
50
+
51
+ </div><!-- wpmtst-notice-wrap -->
52
+ <?php
53
+ }
54
+
55
+ public function add_upsells_1() {
56
+
57
+ if ( ! defined( 'WPMTST_COUNTRY_SELECTOR_VERSION' ) ) :
58
+ ?>
59
+ <div class="wpmtst-alert" style="margin-top: 10px">
60
+ <?php esc_html_e( 'Want to know where are your customers located?', 'strong-testimonials' ); ?>
61
+ <br/>
62
+ <?php esc_html_e( 'Install the Strong Testimonials Country Selector extension.', 'strong-testimonials' ); ?>
63
+ <a class="button button-primary wpmtst-alert__upgrade-btn" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></a>
64
+ </div>
65
+ <?php
66
+ endif;
67
+
68
+ if ( ! defined( 'WPMTST_CUSTOM_FIELDS_VERSION' ) ) :
69
+ ?>
70
+ <div class="wpmtst-alert" style="margin-top: 10px">
71
+ <?php esc_html_e( 'Know your customers by having access to more advanced custom fields.', 'strong-testimonials' ); ?>
72
+ <br/>
73
+ <?php esc_html_e( 'Install the Strong Testimonials Custom Fields extension.', 'strong-testimonials' ); ?>
74
+ <a class="button button-primary wpmtst-alert__upgrade-btn" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></a>
75
+ </div>
76
+ <?php
77
+ endif;
78
+ }
79
+
80
+ public function add_upsells_2() {
81
+ if ( ! defined( 'WPMTST_MULTIPLE_FORMS_VERSION' ) ) :
82
+ ?>
83
+ <div class="wpmtst-alert" style="margin-top: 10px">
84
+ <?php esc_html_e( 'Create multiple submission forms by installing the Strong Testimonials Multiple Forms extension.', 'strong-testimonials' ); ?>
85
+ <a class="button button-primary wpmtst-alert__upgrade-btn" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></a>
86
+ </div>
87
+ <?php
88
+ endif;
89
+ }
90
+
91
+ public function add_upsells_3() {
92
+ if ( ! defined( 'WPMTST_REVIEW_MARKUP_VERSION' ) ) :
93
+ ?>
94
+ <div class="wpmtst-alert" style="margin-top: 10px">
95
+ <?php esc_html_e( 'Add SEO-friendly Testimonials with our Schema.org Review Markup extension.', 'strong-testimonials' ); ?>
96
+ <a class="button button-primary wpmtst-alert__upgrade-btn" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></a>
97
+ </div>
98
+ <?php
99
+ endif;
100
+ }
101
+
102
+ public function add_upsells_4() {
103
+ if ( ! defined( 'WPMTST_ADVANCED_VIEWS_VERSION' ) ) :
104
+ ?>
105
+ <div class="wpmtst-alert" style="margin-top: 1.5rem">
106
+ <?php esc_html_e( 'Display testimonials based on their rating by installing the Strong Testimonials Advanced Views extension.', 'strong-testimonials' ); ?>
107
+ <a class="button button-primary wpmtst-alert__upgrade-btn" target="_blank" href="https://strongtestimonials.com/pricing"><?php esc_html_e( 'Upgrade to PRO', 'strong-testimonials' ); ?></a>
108
+ </div>
109
+ <?php
110
+ endif;
111
+ }
112
+
113
+
114
+
115
+ }
116
+
117
+ new Strong_Testimonials_Upsell();
admin/css/views.css CHANGED
@@ -367,7 +367,7 @@ option:disabled {
367
  border-bottom: 0;
368
  padding: 10px 15px;
369
  margin-bottom: 0;
370
- margin-top: 1.5em; }
371
 
372
  .form-table td p.description {
373
  margin-top: 0;
367
  border-bottom: 0;
368
  padding: 10px 15px;
369
  margin-bottom: 0;
370
+ margin-top: 1.5rem; }
371
 
372
  .form-table td p.description {
373
  margin-top: 0;
admin/custom-fields.php CHANGED
@@ -97,8 +97,8 @@ function wpmtst_update_custom_fields() {
97
  if ( isset( $field['text'] ) ) {
98
  $field['text'] = wp_filter_post_kses( $field['text'] );
99
  }
100
- $field['before'] = wp_filter_post_kses( $field['before'] );
101
- $field['after'] = wp_filter_post_kses( $field['after'] );
102
 
103
  $field['shortcode_on_form'] = sanitize_text_field( $field['shortcode_on_form'] );
104
  $field['shortcode_on_display'] = sanitize_text_field( $field['shortcode_on_display'] );
@@ -190,6 +190,8 @@ function wpmtst_settings_custom_fields( $form_id = 1 ) {
190
  <input id="add-field" type="button" class="button" name="add-field" value="<?php esc_attr_e( 'Add New Field', 'strong-testimonials' ); ?>">
191
  </div>
192
 
 
 
193
  <div id="field-group-actions">
194
  <div><?php submit_button( '', 'primary', 'submit-form', false ); ?></div>
195
  <div><?php submit_button( esc_html__( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?></div>
97
  if ( isset( $field['text'] ) ) {
98
  $field['text'] = wp_filter_post_kses( $field['text'] );
99
  }
100
+ $field['before'] = sanitize_text_field( $field['before'] );
101
+ $field['after'] = sanitize_text_field( $field['after'] );
102
 
103
  $field['shortcode_on_form'] = sanitize_text_field( $field['shortcode_on_form'] );
104
  $field['shortcode_on_display'] = sanitize_text_field( $field['shortcode_on_display'] );
190
  <input id="add-field" type="button" class="button" name="add-field" value="<?php esc_attr_e( 'Add New Field', 'strong-testimonials' ); ?>">
191
  </div>
192
 
193
+ <?php do_action( 'wpmtst_admin_after_form_fields' ); ?>
194
+
195
  <div id="field-group-actions">
196
  <div><?php submit_button( '', 'primary', 'submit-form', false ); ?></div>
197
  <div><?php submit_button( esc_html__( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?></div>
admin/partials/fields/field-type.php CHANGED
@@ -42,6 +42,8 @@
42
 
43
  <span class="help form-error-text" style="display: none;"><?php _e( 'Select a field type or delete this field.', 'strong-testimonials' ); ?></span>
44
 
 
 
45
  <?php else : ?>
46
 
47
  <?php
42
 
43
  <span class="help form-error-text" style="display: none;"><?php _e( 'Select a field type or delete this field.', 'strong-testimonials' ); ?></span>
44
 
45
+ <?php do_action( 'wpmtst_after_form_type_selection' ); ?>
46
+
47
  <?php else : ?>
48
 
49
  <?php
admin/partials/views/template-input.php CHANGED
@@ -1,8 +1,8 @@
1
  <div>
2
- <input type="radio" id="template-<?php esc_attr_e( $key ); ?>"
3
- name="view[data][<?php esc_attr_e( $current_mode ); ?>]"
4
- value="<?php esc_attr_e( $key ); ?>" <?php checked( $key, $view['template'] ); ?>>
5
- <label for="template-<?php esc_attr_e( $key ); ?>">
6
  <?php echo $template['config']['name']; ?>
7
  </label>
8
  </div>
1
  <div>
2
+ <input type="radio" id="template-<?php echo esc_attr( $key ); ?>"
3
+ name="view[data][<?php echo esc_attr( $current_mode ); ?>]"
4
+ value="<?php echo esc_attr( $key ); ?>" <?php checked( $key, $view['template'] ); ?>>
5
+ <label for="template-<?php echo esc_attr( $key ); ?>">
6
  <?php echo $template['config']['name']; ?>
7
  </label>
8
  </div>
admin/partials/views/template-not-found.php CHANGED
@@ -6,10 +6,10 @@
6
  <ul class="radio-list template-list">
7
  <li>
8
  <div>
9
- <input class="error" type="radio" id="<?php esc_attr_e( $view['template'] ); ?>"
10
- name="view[data][<?php esc_attr_e( $current_mode ); ?>]"
11
- value="<?php esc_attr_e( $view['template'] ); ?>" checked>
12
- <label for="<?php esc_attr_e( $view['template'] ); ?>">
13
  <?php echo $view['template']; ?>
14
  </label>
15
  </div>
6
  <ul class="radio-list template-list">
7
  <li>
8
  <div>
9
+ <input class="error" type="radio" id="<?php echo esc_attr( $view['template'] ); ?>"
10
+ name="view[data][<?php echo esc_attr( $current_mode ); ?>]"
11
+ value="<?php echo esc_attr( $view['template'] ); ?>" checked>
12
+ <label for="<?php echo esc_attr( $view['template'] ); ?>">
13
  <?php echo $view['template']; ?>
14
  </label>
15
  </div>
admin/scss/_partials/_elements.scss CHANGED
@@ -19,7 +19,7 @@
19
  border-bottom: 0;
20
  padding: 10px 15px;
21
  margin-bottom: 0;
22
- margin-top: 1.5em;
23
  }
24
  }
25
 
19
  border-bottom: 0;
20
  padding: 10px 15px;
21
  margin-bottom: 0;
22
+ margin-top: 1.5rem;
23
  }
24
  }
25
 
admin/settings/class-strong-testimonials-settings-licenses.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
- /**
3
- * Class Strong_Testimonials_Settings_Licenses
4
- */
5
- class Strong_Testimonials_Settings_Licenses {
6
-
7
- const TAB_NAME = 'licenses';
8
-
9
- const OPTION_NAME = 'wpmtst_addons';
10
-
11
- const GROUP_NAME = 'wpmtst-license-group';
12
-
13
- /**
14
- * Strong_Testimonials_Settings_Licenses constructor.
15
- */
16
- public function __construct() {}
17
-
18
- /**
19
- * Initialize.
20
- */
21
- public static function init() {
22
- self::add_actions();
23
- }
24
-
25
- /**
26
- * Add actions and filters.
27
- */
28
- public static function add_actions() {
29
- add_action( 'wpmtst_register_settings', array( __CLASS__, 'register_settings' ) );
30
- add_action( 'wpmtst_settings_tabs', array( __CLASS__, 'register_tab' ), 90, 2 );
31
- add_filter( 'wpmtst_settings_callbacks', array( __CLASS__, 'register_settings_page' ) );
32
- }
33
-
34
- /**
35
- * Check for active add-ons.
36
- *
37
- * @since 2.1
38
- */
39
- public static function has_active_addons() {
40
- return has_action( 'wpmtst_licenses' );
41
- }
42
-
43
- /**
44
- * Register settings tab.
45
- *
46
- * @param $active_tab
47
- * @param $url
48
- */
49
- public static function register_tab( $active_tab, $url ) {
50
- if ( self::has_active_addons() ) {
51
- printf( '<a href="%s" class="nav-tab %s">%s</a>',
52
- esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
53
- esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
54
- __( 'Licenses', 'strong-testimonials' )
55
- );
56
- }
57
- }
58
-
59
- /**
60
- * Register settings.
61
- */
62
- public static function register_settings() {
63
- register_setting( self::GROUP_NAME, self::OPTION_NAME, array( __CLASS__, 'sanitize_options' ) );
64
- }
65
-
66
- /**
67
- * Register settings page.
68
- *
69
- * @param $pages
70
- *
71
- * @return mixed
72
- */
73
- public static function register_settings_page( $pages ) {
74
- $pages[ self::TAB_NAME ] = array( __CLASS__, 'settings_page' );
75
- return $pages;
76
- }
77
-
78
- /**
79
- * Print settings page.
80
- */
81
- public static function settings_page() {
82
- settings_fields( self::GROUP_NAME );
83
- include( WPMTST_ADMIN . 'settings/partials/licenses.php' );
84
- }
85
-
86
- /**
87
- * Sanitize settings.
88
- *
89
- * @param $new_licenses
90
- *
91
- * @return array
92
- */
93
- public static function sanitize_options( $new_licenses ) {
94
- $old_licenses = get_option( 'wpmtst_addons' );
95
- // Check existence. May have been erased by Reset plugin.
96
- if ( $old_licenses ) {
97
- foreach ( $new_licenses as $addon => $new_info ) {
98
- $old_license = isset( $old_licenses[ $addon ]['license'] ) ? $old_licenses[ $addon ]['license'] : '';
99
- if ( isset( $old_license['key'] ) && $old_license['key'] != $new_info['license']['key'] ) {
100
- // new license has been entered, so must reactivate
101
- unset( $new_licenses[ $addon ]['license']['status'] );
102
- }
103
- }
104
- }
105
-
106
- return $new_licenses;
107
- }
108
-
109
- }
110
-
111
- Strong_Testimonials_Settings_Licenses::init();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/settings/class-strong-testimonials-settings.php CHANGED
@@ -60,7 +60,7 @@ class Strong_Testimonials_Settings {
60
  <?php do_action( 'wpmtst_settings_tabs', $tab, $url ); ?>
61
  </h2>
62
 
63
- <form id="<?php esc_attr_e( $tab ); ?>-form" method="post" action="options.php">
64
  <?php
65
  if ( isset( self::$callbacks[ $tab ] ) && wpmtst_callback_exists( self::$callbacks[ $tab ] ) ) {
66
  call_user_func( self::$callbacks[ $tab ] );
60
  <?php do_action( 'wpmtst_settings_tabs', $tab, $url ); ?>
61
  </h2>
62
 
63
+ <form id="<?php echo esc_attr( $tab ); ?>-form" method="post" action="options.php">
64
  <?php
65
  if ( isset( self::$callbacks[ $tab ] ) && wpmtst_callback_exists( self::$callbacks[ $tab ] ) ) {
66
  call_user_func( self::$callbacks[ $tab ] );
admin/settings/partials/form.php CHANGED
@@ -66,8 +66,8 @@ foreach ( $plugins as $key => $plugin ) {
66
  <label for="<?php echo $elid; ?>">
67
  <?php _ex( $message['description'], 'description', 'strong-testimonials' ); ?>
68
  </label>
69
- <input type="hidden" name="wpmtst_form_options[messages][<?php echo $key; ?>][description]"
70
- value="<?php esc_attr_e( $message['description'] ); ?>"/>
71
  </th>
72
  <td>
73
  <?php if ( 'submission_success' == $elid ): ?>
@@ -83,22 +83,22 @@ foreach ( $plugins as $key => $plugin ) {
83
  <fieldset>
84
  <label>
85
  <input type="checkbox"
86
- name="wpmtst_form_options[messages][<?php echo $key; ?>][enabled]"
87
- <?php checked( $message['enabled'] ); ?>">
88
- <?php _e( 'Display required notice at top of form', 'strong-testimonials' ); ?>
89
  </label
90
  </fieldset>
91
  <?php endif; ?>
92
- <input type="text" id="<?php echo $elid; ?>"
93
- name="wpmtst_form_options[messages][<?php echo $key; ?>][text]"
94
- value="<?php esc_attr_e( $content ); ?>"
95
  <?php echo $required ? 'required' : '' ?>/>
96
  <?php endif; ?>
97
  </td>
98
  <td class="actions">
99
  <input type="button" class="button secondary restore-default-message"
100
  value="<?php _ex( 'restore default', 'singular', 'strong-testimonials' ); ?>"
101
- data-target-id="<?php esc_attr_e( $elid ); ?>"/>
102
  </td>
103
  </tr>
104
 
@@ -108,7 +108,7 @@ foreach ( $plugins as $key => $plugin ) {
108
  <td colspan="3">
109
  <input type="button" id="restore-default-messages" class="button"
110
  name="restore-default-messages"
111
- value="<?php _e( 'Restore Default Messages', 'strong-testimonials' ); ?>"/>
112
  </td>
113
  </tr>
114
  </table>
@@ -116,7 +116,7 @@ foreach ( $plugins as $key => $plugin ) {
116
  <table class="form-table" cellpadding="0" cellspacing="0">
117
  <tr>
118
  <th scope="row" class="tall">
119
- <?php _e( 'Scroll', 'strong-testimonials' ); ?>
120
  </th>
121
  <td>
122
  <fieldset>
66
  <label for="<?php echo $elid; ?>">
67
  <?php _ex( $message['description'], 'description', 'strong-testimonials' ); ?>
68
  </label>
69
+ <input type="hidden" name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][description]"
70
+ value="<?php echo esc_attr( $message['description'] ); ?>"/>
71
  </th>
72
  <td>
73
  <?php if ( 'submission_success' == $elid ): ?>
83
  <fieldset>
84
  <label>
85
  <input type="checkbox"
86
+ name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][enabled]"
87
+ <?php checked( $message['enabled'] ); ?>>
88
+ <?php esc_html_e( 'Display required notice at top of form', 'strong-testimonials' ); ?>
89
  </label
90
  </fieldset>
91
  <?php endif; ?>
92
+ <input type="text" id="<?php echo esc_attr( $elid ); ?>"
93
+ name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][text]"
94
+ value="<?php echo esc_attr( $content ); ?>"
95
  <?php echo $required ? 'required' : '' ?>/>
96
  <?php endif; ?>
97
  </td>
98
  <td class="actions">
99
  <input type="button" class="button secondary restore-default-message"
100
  value="<?php _ex( 'restore default', 'singular', 'strong-testimonials' ); ?>"
101
+ data-target-id="<?php echo esc_attr( $elid ); ?>"/>
102
  </td>
103
  </tr>
104
 
108
  <td colspan="3">
109
  <input type="button" id="restore-default-messages" class="button"
110
  name="restore-default-messages"
111
+ value="<?php esc_html_e( 'Restore Default Messages', 'strong-testimonials' ); ?>"/>
112
  </td>
113
  </tr>
114
  </table>
116
  <table class="form-table" cellpadding="0" cellspacing="0">
117
  <tr>
118
  <th scope="row" class="tall">
119
+ <?php esc_html_e( 'Scroll', 'strong-testimonials' ); ?>
120
  </th>
121
  <td>
122
  <fieldset>
admin/settings/partials/licenses.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- /**
3
- * Licenses
4
- *
5
- * @since 2.1
6
- * @since 2.18 As a partial file. Using action hook for add-ons to append their info.
7
- *
8
- * TODO Add link to member account on website.
9
- */
10
- ?>
11
- <h2><?php _e( 'Add-on Licenses', 'strong-testimonials' ); ?></h2>
12
- <div class="tab-header">
13
- <p><?php _e( 'Valid license keys allow you to receive automatic updates and priority support.', 'strong-testimonials' ); ?></p>
14
- <p><?php _e( 'To transfer a license to another site or to uninstall the add-on, please deactivate the license here first.', 'strong-testimonials' ); ?></p>
15
- </div>
16
- <table class="form-table">
17
- <thead>
18
- <tr>
19
- <th><?php _e( 'Add-on', 'strong-testimonials' ); ?></th>
20
- <th class="for-license-key"><?php _e( 'License Key', 'strong-testimonials' ); ?></th>
21
- <th class="for-license-status"><?php _e( 'Status', 'strong-testimonials' ); ?></th>
22
- </tr>
23
- </thead>
24
- <tbody>
25
- <?php do_action( 'wpmtst_licenses' ); ?>
26
- </tbody>
27
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views.php CHANGED
@@ -232,6 +232,7 @@ function wpmtst_view_settings( $action = '', $view_id = null ) {
232
  // TODO Generify both hook and include
233
  do_action( 'wpmtst_view_editor_before_group_select' );
234
  include( 'partials/views/group-query.php' );
 
235
 
236
  do_action( 'wpmtst_view_editor_before_group_slideshow' );
237
  include( 'partials/views/group-slideshow.php' );
232
  // TODO Generify both hook and include
233
  do_action( 'wpmtst_view_editor_before_group_select' );
234
  include( 'partials/views/group-query.php' );
235
+ do_action( 'wpmtst_view_editor_after_group_select' );
236
 
237
  do_action( 'wpmtst_view_editor_before_group_slideshow' );
238
  include( 'partials/views/group-slideshow.php' );
assets/css/admin-global.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ #menu-posts-wpm-testimonial .wp-submenu-wrap > li:last-child a {
2
+ color: #FBC556;
3
+ }
assets/css/admin.css CHANGED
@@ -647,14 +647,185 @@ ul.standard {
647
  margin-left: 1rem;
648
  float: right; }
649
 
650
- .edit-php.post-type-wpm-testimonial .wpmtst-notice {
651
- padding: 2.5rem 2rem;
652
- border: 2px solid #7F22DE; }
653
-
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;
660
- float: left; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
647
  margin-left: 1rem;
648
  float: right; }
649
 
650
+ /* notices */
651
+ .wpmtst-notice-wrap {
652
+ border: none;
653
+ padding: 0;
654
+ box-shadow: none;
655
+ background: transparent;
656
+ }
657
+
658
+ .wpmtst-notice {
659
+ padding: 2rem;
660
+ }
661
+
662
+ .wpmtst-notice--feedback {
663
+ background: #fff;
664
+ border-radius: 10px;
665
+ border: 3px solid transparent;
666
+ box-shadow: -3px 2px 70px 0px rgba(128, 144, 174, 0.16);
667
+ padding-right: 140px !important;
668
+ box-sizing: border-box;
669
+ position: relative;
670
+ overflow: hidden;
671
+ margin-bottom: 20px;
672
+ }
673
+
674
+ .wpmtst-notice--feedback p {
675
+ color: #888;
676
+ }
677
+
678
+ .wpmtst-notice--feedback__bg {
679
+ background: url(../img/notice-bg-1.png) no-repeat 50% 50%;
680
+ width: 400px;
681
+ height: 400px;
682
+ position: absolute;
683
+ right: -225px;
684
+ top: -100px;
685
+ background-size: 100%;
686
+ }
687
+
688
+ .wpmtst-notice--upsell {
689
+ background: #fbc556;
690
+ border-radius: 10px;
691
+ border: 3px solid transparent;
692
+ box-shadow: none;
693
+ padding-right: 140px !important;
694
+ box-sizing: border-box;
695
+ position: relative;
696
+ overflow: hidden;
697
+ margin-bottom: 20px;
698
+ }
699
+
700
+ .wpm-testimonial_page_about-strong-testimonials .wpmtst-notice--upsell .button {
701
+ padding: 0 1.5rem;
702
+ height: 2.5rem;
703
+ line-height: 2.5rem;
704
+ }
705
+
706
+ .wpmtst-notice--upsell p {
707
+ color: #8d6e30;
708
+ }
709
+
710
+ .wpmtst-notice--upsell__bg {
711
+ background: url(../img/notice-bg-2.png) no-repeat 50% 50%;
712
+ width: 380px;
713
+ height: 400px;
714
+ position: absolute;
715
+ right: -260px;
716
+ top: -80px;
717
+ background-size: 100%;
718
+ }
719
+
720
+ @media screen and (min-width: 1100px) {
721
+ .wpmtst-notice-wrap {
722
+ display: flex;
723
+ justify-content: space-between;
724
+ }
725
+
726
+ .edit-php.post-type-wpm-testimonial .wpmtst-notice--feedback,
727
+ .wpm-testimonial_page_testimonial-views .wpmtst-notice--feedback {
728
+ width: calc(50% - 15px);
729
+ }
730
+ .edit-php.post-type-wpm-testimonial .wpmtst-notice--upsell,
731
+ .wpm-testimonial_page_testimonial-views .wpmtst-notice--upsell {
732
+ width: calc(50% - 15px);
733
+ }
734
+ }
735
+
736
+ @media screen and (min-width: 1400px) {
737
+ .wpmtst-notice--feedback {
738
+ padding-right: 320px !important;
739
+ }
740
+ .wpmtst-notice--feedback p {
741
+ font-size: 14px;
742
+ font-weight: 600;
743
+ }
744
+ .wpmtst-notice--feedback__bg {
745
+ right: -60px;
746
+ }
747
+ .wpmtst-notice--upsell {
748
+ padding-right: 320px !important;
749
+ }
750
+ .wpmtst-notice--upsell p {
751
+ font-size: 14px;
752
+ font-weight: 600;
753
+ }
754
+ .wpmtst-notice--upsell__bg {
755
+ right: -60px;
756
+ }
757
+ }
758
+
759
+
760
+ /* addons box */
761
+ .wpmtst-addons-container {
762
+ display: flex;
763
+ justify-content: space-between;
764
+ flex-wrap: wrap;
765
+ }
766
+
767
+ .wpmtst-addon {
768
+ width: 100%;
769
+ margin-bottom: 1rem;
770
+ background-color: #fff;
771
+ border: 1px solid #ddd;
772
+ box-sizing: border-box;
773
+ }
774
+
775
+ @media screen and (min-width: 1100px) {
776
+ .wpmtst-addons-container {
777
+ margin-right: -20px;
778
+ }
779
+ .wpmtst-addon {
780
+ width: calc( 50% - 20px );
781
+ margin-right: 20px;
782
+ }
783
+ }
784
+
785
+ @media screen and (min-width: 1400px) {
786
+ .wpmtst-addon {
787
+ width: calc( 33% - 20px );
788
+ }
789
+ }
790
+
791
+
792
+ .wpmtst-addon .wpmtst-addon-box {
793
+ display: flex;
794
+ padding: 20px 20px 10px;
795
+ text-align: left;
796
+ }
797
+ .wpmtst-addon .wpmtst-addon-box .wpmtst-addon-content {
798
+ padding-left: 20px;
799
+ }
800
+ .wpmtst-addon .wpmtst-addon-box img {
801
+ display: block;
802
+ max-width: 128px;
803
+ max-height: 128px;
804
+ }
805
+ .wpmtst-addon .wpmtst-addon-box h3 {
806
+ margin-top: 0;
807
+ text-align: left;
808
+ }
809
+ .wpmtst-addon .wpmtst-addon-actions {
810
+ padding: 12px 20px;
811
+ background-color: #fafafa;
812
+ border-top: 1px solid #ddd;
813
+ overflow: hidden;
814
+ text-align: center;
815
+ }
816
+
817
+ /* alerts */
818
+ .wpmtst-alert {
819
+ background: #f4daa4;
820
+ border-radius: 5px;
821
+ color: #8d6e30;
822
+ padding: 1rem 8rem 1rem 1rem;
823
+ position: relative;
824
+ }
825
+
826
+ .wpmtst-alert__upgrade-btn {
827
+ position: absolute;
828
+ right: 0.5rem;
829
+ top: 50%;
830
+ transform: translateY(-50%) !important;
831
+ }
assets/img/logo.png ADDED
Binary file
assets/img/notice-bg-1.png ADDED
Binary file
assets/img/notice-bg-2.png ADDED
Binary file
assets/js/admin-js.js CHANGED
@@ -63,7 +63,7 @@
63
  /******/ __webpack_require__.p = "";
64
  /******/
65
  /******/ // Load entry module and return exports
66
- /******/ return __webpack_require__(__webpack_require__.s = 1);
67
  /******/ })
68
  /************************************************************************/
69
  /******/ ([
@@ -91,7 +91,7 @@ var Notice = function () {
91
  this.key = $element.data('key');
92
  this.nonce = $element.data('nonce');
93
 
94
- jQuery(document).on('click', '.wpmtst-notice .notice-dismiss', function () {
95
  return _this.onDismissClick();
96
  });
97
  }
@@ -99,6 +99,9 @@ var Notice = function () {
99
  _createClass(Notice, [{
100
  key: 'onDismissClick',
101
  value: function onDismissClick() {
 
 
 
102
  jQuery.ajax({
103
  type: "POST",
104
  data: { action: "wpmtst_dismiss_notice", nonce: this.nonce, key: this.key },
@@ -113,7 +116,8 @@ var Notice = function () {
113
  exports.default = Notice;
114
 
115
  /***/ }),
116
- /* 1 */
 
117
  /***/ (function(module, exports, __webpack_require__) {
118
 
119
  "use strict";
@@ -125,6 +129,10 @@ var _notice = __webpack_require__(0);
125
 
126
  var _notice2 = _interopRequireDefault(_notice);
127
 
 
 
 
 
128
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
129
 
130
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -239,6 +247,7 @@ var WPMTST_Admin = function () {
239
  _classCallCheck(this, WPMTST_Admin);
240
 
241
  this.initNotices();
 
242
  }
243
 
244
  _createClass(WPMTST_Admin, [{
@@ -250,6 +259,11 @@ var WPMTST_Admin = function () {
250
  new _notice2.default(jQuery(this));
251
  });
252
  }
 
 
 
 
 
253
  }]);
254
 
255
  return WPMTST_Admin;
@@ -257,5 +271,62 @@ var WPMTST_Admin = function () {
257
 
258
  window.WPMTST_Admin = new WPMTST_Admin();
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  /***/ })
261
  /******/ ]);
63
  /******/ __webpack_require__.p = "";
64
  /******/
65
  /******/ // Load entry module and return exports
66
+ /******/ return __webpack_require__(__webpack_require__.s = 2);
67
  /******/ })
68
  /************************************************************************/
69
  /******/ ([
91
  this.key = $element.data('key');
92
  this.nonce = $element.data('nonce');
93
 
94
+ this.$element.on('click', '.notice-dismiss', function () {
95
  return _this.onDismissClick();
96
  });
97
  }
99
  _createClass(Notice, [{
100
  key: 'onDismissClick',
101
  value: function onDismissClick() {
102
+
103
+ this.$element.remove();
104
+
105
  jQuery.ajax({
106
  type: "POST",
107
  data: { action: "wpmtst_dismiss_notice", nonce: this.nonce, key: this.key },
116
  exports.default = Notice;
117
 
118
  /***/ }),
119
+ /* 1 */,
120
+ /* 2 */
121
  /***/ (function(module, exports, __webpack_require__) {
122
 
123
  "use strict";
129
 
130
  var _notice2 = _interopRequireDefault(_notice);
131
 
132
+ var _AddonsPage = __webpack_require__(4);
133
+
134
+ var _AddonsPage2 = _interopRequireDefault(_AddonsPage);
135
+
136
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
137
 
138
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
247
  _classCallCheck(this, WPMTST_Admin);
248
 
249
  this.initNotices();
250
+ this.initAddonsPage();
251
  }
252
 
253
  _createClass(WPMTST_Admin, [{
259
  new _notice2.default(jQuery(this));
260
  });
261
  }
262
+ }, {
263
+ key: 'initAddonsPage',
264
+ value: function initAddonsPage() {
265
+ new _AddonsPage2.default(jQuery(this));
266
+ }
267
  }]);
268
 
269
  return WPMTST_Admin;
271
 
272
  window.WPMTST_Admin = new WPMTST_Admin();
273
 
274
+ /***/ }),
275
+ /* 3 */,
276
+ /* 4 */
277
+ /***/ (function(module, exports, __webpack_require__) {
278
+
279
+ "use strict";
280
+
281
+
282
+ Object.defineProperty(exports, "__esModule", {
283
+ value: true
284
+ });
285
+
286
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
287
+
288
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
289
+
290
+ var AddonsPage = function () {
291
+ function AddonsPage() {
292
+ var _this = this;
293
+
294
+ _classCallCheck(this, AddonsPage);
295
+
296
+ if (!jQuery('body').hasClass('wpm-testimonial_page_strong-testimonials-addons')) {
297
+ return;
298
+ }
299
+
300
+ this.reloadButton = jQuery('#wpmtst-reload-extensions');
301
+
302
+ //events
303
+ this.reloadButton.on('click', function (e) {
304
+ return _this.onReloadExtensionsClick(e);
305
+ });
306
+ }
307
+
308
+ _createClass(AddonsPage, [{
309
+ key: 'onReloadExtensionsClick',
310
+ value: function onReloadExtensionsClick(e) {
311
+ e.preventDefault();
312
+
313
+ this.reloadButton.addClass('updating-message');
314
+
315
+ jQuery.ajax({
316
+ type: "POST",
317
+ data: { action: "wpmtst_reload_extensions", nonce: this.reloadButton.data('nonce') },
318
+ url: ajaxurl,
319
+ success: function success(response) {
320
+ location.reload();
321
+ }
322
+ });
323
+ }
324
+ }]);
325
+
326
+ return AddonsPage;
327
+ }();
328
+
329
+ exports.default = AddonsPage;
330
+
331
  /***/ })
332
  /******/ ]);
assets/src/js/admin.js CHANGED
@@ -107,11 +107,13 @@ jQuery(document).ready(function ($) {
107
 
108
 
109
  import Notice from './modules/notice';
 
110
 
111
  class WPMTST_Admin {
112
 
113
  constructor(){
114
  this.initNotices();
 
115
  }
116
 
117
  initNotices( $div = jQuery("body") ) {
@@ -120,6 +122,10 @@ class WPMTST_Admin {
120
  });
121
  }
122
 
 
 
 
 
123
  }
124
 
125
  window.WPMTST_Admin = new WPMTST_Admin();
107
 
108
 
109
  import Notice from './modules/notice';
110
+ import AddonsPage from './modules/AddonsPage';
111
 
112
  class WPMTST_Admin {
113
 
114
  constructor(){
115
  this.initNotices();
116
+ this.initAddonsPage();
117
  }
118
 
119
  initNotices( $div = jQuery("body") ) {
122
  });
123
  }
124
 
125
+ initAddonsPage() {
126
+ new AddonsPage( jQuery(this) );
127
+ }
128
+
129
  }
130
 
131
  window.WPMTST_Admin = new WPMTST_Admin();
assets/src/js/modules/addonspage.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default class AddonsPage {
2
+
3
+ constructor(){
4
+
5
+ if( ! jQuery( 'body' ).hasClass( 'wpm-testimonial_page_strong-testimonials-addons' ) ) {
6
+ return;
7
+ }
8
+
9
+ this.reloadButton = jQuery('#wpmtst-reload-extensions');
10
+
11
+ //events
12
+ this.reloadButton.on('click', (e) => this.onReloadExtensionsClick(e) );
13
+ }
14
+
15
+ onReloadExtensionsClick(e) {
16
+ e.preventDefault();
17
+
18
+ this.reloadButton.addClass( 'updating-message' );
19
+
20
+ jQuery.ajax({
21
+ type: "POST",
22
+ data : { action: "wpmtst_reload_extensions", nonce: this.reloadButton.data('nonce') },
23
+ url : ajaxurl,
24
+ success: function( response ) {
25
+ location.reload();
26
+ }
27
+ });
28
+ }
29
+
30
+
31
+ }
32
+
33
+
assets/src/js/modules/notice.js CHANGED
@@ -5,10 +5,13 @@ export default class Notice {
5
  this.key = $element.data('key');
6
  this.nonce = $element.data('nonce');
7
 
8
- jQuery(document).on( 'click', '.wpmtst-notice .notice-dismiss', () => this.onDismissClick() );
9
  }
10
 
11
  onDismissClick() {
 
 
 
12
  jQuery.ajax({
13
  type: "POST",
14
  data : { action: "wpmtst_dismiss_notice", nonce: this.nonce, key: this.key },
5
  this.key = $element.data('key');
6
  this.nonce = $element.data('nonce');
7
 
8
+ this.$element.on( 'click', '.notice-dismiss', () => this.onDismissClick() );
9
  }
10
 
11
  onDismissClick() {
12
+
13
+ this.$element.remove();
14
+
15
  jQuery.ajax({
16
  type: "POST",
17
  data : { action: "wpmtst_dismiss_notice", nonce: this.nonce, key: this.key },
changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  = 2.37 - Mar. 18, 2019 =
2
  * added ability to export testimonials with featured images included.
3
  * added option to change single testimonial permalink slug.
1
+ = 2.38 - May. 05, 2019 =
2
+ * fixed multiple issues with the `read more` link not expanding the full content
3
+ * fixed an issue with the `read more` link not appearing in some cases
4
+ * fixed an issue with the forms fields not displaying quotation marks correctly
5
+ * fixed an issue with the form textarea not displaying the placeholder correctly
6
+ * fixed a bug where a testimonial view was throwing and error when displaying a url label
7
+
8
  = 2.37 - Mar. 18, 2019 =
9
  * added ability to export testimonials with featured images included.
10
  * added option to change single testimonial permalink slug.
includes/class-strong-testimonials-render.php CHANGED
@@ -146,7 +146,7 @@ class Strong_Testimonials_Render {
146
  // Array( [id] => 1, [name] => TEST, [value] => {serialized_array} )
147
  $view_data = maybe_unserialize( $view['value'] );
148
  if ( isset( $view_data['mode'] ) && 'single_template' != $view_data['mode'] ) {
149
- $atts = array( 'view' => $view['id'] );
150
  $this->prerender( $atts );
151
  }
152
  }
146
  // Array( [id] => 1, [name] => TEST, [value] => {serialized_array} )
147
  $view_data = maybe_unserialize( $view['value'] );
148
  if ( isset( $view_data['mode'] ) && 'single_template' != $view_data['mode'] ) {
149
+ $atts = array( 'id' => $view['id'], 'view' => $view['id'] );
150
  $this->prerender( $atts );
151
  }
152
  }
includes/class-strong-view.php CHANGED
@@ -171,7 +171,7 @@ class Strong_View {
171
  }
172
 
173
  if ( ! $this->get_att( 'use_default_more' ) ) {
174
- add_filter( 'excerpt_more', array( $this, 'excerpt_more' ) );
175
  }
176
  }
177
 
171
  }
172
 
173
  if ( ! $this->get_att( 'use_default_more' ) ) {
174
+ add_filter( 'excerpt_more', array( $this, 'excerpt_more' ), 999 );
175
  }
176
  }
177
 
includes/functions-template-form.php CHANGED
@@ -309,7 +309,7 @@ function wpmtst_field_value( $field, $form_values ) {
309
  */
310
  function wpmtst_field_placeholder( $field ) {
311
  if ( isset( $field['placeholder'] ) && $field['placeholder'] ) {
312
- return ' placeholder="' . esc_attr( wpmtst_form_field_meta_l10n( $field['placeholder'], $field, 'placeholder' ) ) . '"';
313
  }
314
 
315
  return '';
@@ -537,7 +537,7 @@ function wpmtst_form_captcha_invisible() {
537
  function wpmtst_form_submit_button( $preview = false ) {
538
  ?>
539
  <div class="form-field wpmtst-submit">
540
- <label><input type="<?php echo $preview ? 'button' : 'submit'; ?>" id="wpmtst_submit_testimonial" name="wpmtst_submit_testimonial" value="<?php esc_attr_e( wpmtst_get_form_message( 'form-submit-button' ) ); ?>" class="<?php echo esc_attr( apply_filters( 'wpmtst_submit_button_class', 'button' ) ); ?>" tabindex="0"></label>
541
  </div>
542
  <?php
543
  }
309
  */
310
  function wpmtst_field_placeholder( $field ) {
311
  if ( isset( $field['placeholder'] ) && $field['placeholder'] ) {
312
+ return esc_attr( wpmtst_form_field_meta_l10n( $field['placeholder'], $field, 'placeholder' ) );
313
  }
314
 
315
  return '';
537
  function wpmtst_form_submit_button( $preview = false ) {
538
  ?>
539
  <div class="form-field wpmtst-submit">
540
+ <label><input type="<?php echo $preview ? 'button' : 'submit'; ?>" id="wpmtst_submit_testimonial" name="wpmtst_submit_testimonial" value="<?php echo esc_attr( wpmtst_get_form_message( 'form-submit-button' ) ); ?>" class="<?php echo esc_attr( apply_filters( 'wpmtst_submit_button_class', 'button' ) ); ?>" tabindex="0"></label>
541
  </div>
542
  <?php
543
  }
includes/functions-template.php CHANGED
@@ -323,7 +323,7 @@ function wpmtst_client_section( $client_section ) {
323
  $output = '';
324
  break;
325
  case 'label' :
326
- $text = $field['prop']['field_label'];
327
  $output = '';
328
  break;
329
  default : // value
323
  $output = '';
324
  break;
325
  case 'label' :
326
+ $text = $field['prop']['label'];
327
  $output = '';
328
  break;
329
  default : // value
public/js/lib/readmore/readmore.js CHANGED
@@ -9,114 +9,109 @@
9
 
10
  (function () {
11
 
12
- /*
13
- * forEach method
14
- * thanks https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/
15
- */
16
- var forEach = function (array, callback, scope) {
17
- for (var i = 0; i < array.length; i++) {
18
- callback.call(scope, i, array[i]); // passes back stuff we need
19
- }
20
- };
21
 
22
- /*
23
- * Do stuff at the end of animation.
24
- */
25
- var onAnimationEnd = function (event) {
26
- if (event.type === 'animationend' && event.animationName === 'fadeOutUp') {
27
- // Add `hidden` attribute
28
- event.target.setAttribute('hidden', 'true');
29
 
30
- // Show read-more link
31
- event.target.parentElement.querySelector('.readmore-toggle').style.display = 'inline';
32
 
33
- // Show ellipsis
34
- var ellipsis = event.target.parentElement.querySelector('.ellipsis');
35
- if (ellipsis) {
36
- ellipsis.style.display = 'inline';
37
- }
38
 
39
- fireCustomEvent();
40
- }
41
- };
42
 
43
- var fireCustomEvent = function () {
44
- window.dispatchEvent(new Event('toggleFullContent'));
45
- };
46
 
47
- // Only in modern browsers.
48
- if ('querySelector' in document && 'addEventListener' in window) {
49
 
50
- // Listen for an animation.
51
- var fullTextWrappers = document.querySelectorAll('.readmore-content');
 
 
 
 
52
 
53
- forEach(fullTextWrappers, function (index, fullTextWrapper) {
54
- fullTextWrapper.addEventListener('transitionend', onAnimationEnd);
55
- fullTextWrapper.addEventListener('animationend', onAnimationEnd);
56
- });
 
57
 
58
- // Listen to each button.
59
- var toggleButtons = document.querySelectorAll('.readmore-toggle');
60
 
61
- forEach(toggleButtons, function (index, toggleButton) {
 
 
62
 
63
- toggleButton.addEventListener('click', function () {
 
 
 
64
 
65
- var fullTextWrapper = this.parentElement.querySelector('.readmore-content');
66
- if (!fullTextWrapper) {
67
- return;
68
- }
69
 
70
- var ellipsis = this.parentElement.querySelector('.ellipsis');
71
- var toggleButtonText = this.querySelector('.readmore-text');
72
 
73
- // change attributes and text if full text is shown/hidden
74
- if (fullTextWrapper.hasAttribute('hidden')) {
 
75
 
76
- // show
 
 
 
 
 
 
77
 
78
- // 1. remove hidden attribute so we can animate it
79
- fullTextWrapper.removeAttribute('hidden');
 
 
80
 
81
- // 2. update toggle link
82
- // change text (may be blank)
83
- toggleButtonText.innerText = toggleButtonText.dataset.lessText;
84
- toggleButton.setAttribute('aria-expanded', true);
85
- if( ellipsis ) {
86
- ellipsis.style.display = 'none';
87
- }
88
 
89
- // 3. animate it
90
- fullTextWrapper.classList.add('fadeInDown');
91
- fullTextWrapper.classList.remove('fadeOutUp');
92
- fullTextWrapper.classList.remove('faster');
93
 
94
- fireCustomEvent();
 
 
 
 
 
 
95
 
96
- } else {
 
 
 
97
 
98
- // hide
99
 
100
- // 1. update toggle link
101
- // hide link during transition
102
- toggleButton.style.display = 'none'
103
- toggleButton.setAttribute('aria-expanded', false);
104
- // change link text (may be blank)
105
- toggleButtonText.innerText = toggleButtonText.dataset.moreText;
106
 
107
- // 2. animate it
108
- fullTextWrapper.classList.add('fadeOutUp');
109
- fullTextWrapper.classList.add('faster');
110
- fullTextWrapper.classList.remove('fadeInDown');
111
 
112
- // 3. do stuff at end of animation (the event listener above)
113
 
114
- }
115
 
116
- });
117
-
118
- });
119
-
120
- }
121
 
122
  })();
9
 
10
  (function () {
11
 
12
+ /*
13
+ * Do stuff at the end of animation.
14
+ */
15
+ var onAnimationEnd = function (event) {
16
+ if (event.type === 'animationend' && event.animationName === 'fadeOutUp') {
 
 
 
 
17
 
18
+ // Add `hidden` attribute
19
+ event.target.setAttribute('hidden', 'true');
 
 
 
 
 
20
 
21
+ // Show read-more link
22
+ event.target.parentElement.querySelector('.readmore-toggle').style.display = 'inline';
23
 
24
+ // Show ellipsis
25
+ var ellipsis = event.target.parentElement.querySelector('.ellipsis');
26
+ if (ellipsis) {
27
+ ellipsis.style.display = 'inline';
28
+ }
29
 
30
+ fireCustomEvent();
31
+ }
32
+ };
33
 
34
+ var fireCustomEvent = function () {
35
+ window.dispatchEvent(new Event('toggleFullContent'));
36
+ };
37
 
38
+ // Only in modern browsers.
39
+ if ('querySelector' in document && 'addEventListener' in window) {
40
 
41
+ // Listen for an animation.
42
+ document.addEventListener('transitionend', function (event) {
43
+ if (event.target.matches('.readmore-content')) {
44
+ onAnimationEnd(event);
45
+ }
46
+ }, false);
47
 
48
+ document.addEventListener('animationend', function (event) {
49
+ if (event.target.matches('.readmore-content')) {
50
+ onAnimationEnd(event);
51
+ }
52
+ }, false);
53
 
54
+ // Listen to each readmore link.
55
+ document.addEventListener('click', function (event) {
56
 
57
+ if (!event.target.matches('.readmore-text')) {
58
+ return;
59
+ }
60
 
61
+ var toggleButtonText = event.target;
62
+ var toggleButton = toggleButtonText.parentElement;
63
+ var fullTextWrapper = toggleButtonText.parentElement.parentElement.querySelector('.readmore-content');
64
+ var ellipsis = toggleButtonText.parentElement.parentElement.querySelector('.ellipsis');
65
 
66
+ if (!fullTextWrapper) {
67
+ return;
68
+ }
 
69
 
70
+ // change attributes and text if full text is shown/hidden
71
+ if (fullTextWrapper.hasAttribute('hidden')) {
72
 
73
+ // show
74
+ // 1. remove hidden attribute so we can animate it
75
+ fullTextWrapper.removeAttribute('hidden');
76
 
77
+ // 2. update toggle link
78
+ // change text (may be blank)
79
+ toggleButtonText.innerText = toggleButtonText.dataset.lessText;
80
+ toggleButton.setAttribute('aria-expanded', true);
81
+ if (ellipsis) {
82
+ ellipsis.style.display = 'none';
83
+ }
84
 
85
+ // 3. animate it
86
+ fullTextWrapper.classList.add('fadeInDown');
87
+ fullTextWrapper.classList.remove('fadeOutUp');
88
+ fullTextWrapper.classList.remove('faster');
89
 
90
+ fireCustomEvent();
 
 
 
 
 
 
91
 
92
+ } else {
 
 
 
93
 
94
+ // hide
95
+ // 1. update toggle link
96
+ // hide link during transition
97
+ toggleButton.style.display = 'none';
98
+ toggleButton.setAttribute('aria-expanded', false);
99
+ // change link text (may be blank)
100
+ toggleButtonText.innerText = toggleButtonText.dataset.moreText;
101
 
102
+ // 2. animate it
103
+ fullTextWrapper.classList.add('fadeOutUp');
104
+ fullTextWrapper.classList.add('faster');
105
+ fullTextWrapper.classList.remove('fadeInDown');
106
 
107
+ // 3. do stuff at end of animation (the event listener above)
108
 
109
+ }
 
 
 
 
 
110
 
111
+ }, false);
 
 
 
112
 
 
113
 
 
114
 
115
+ }
 
 
 
 
116
 
117
  })();
public/js/lib/readmore/readmore.min.js CHANGED
@@ -1 +1 @@
1
- (function(){var forEach=function(array,callback,scope){for(var i=0;i<array.length;i++){callback.call(scope,i,array[i])}};var onAnimationEnd=function(event){if(event.type==="animationend"&&event.animationName==="fadeOutUp"){event.target.setAttribute("hidden","true");event.target.parentElement.querySelector(".readmore-toggle").style.display="inline";var ellipsis=event.target.parentElement.querySelector(".ellipsis");if(ellipsis){ellipsis.style.display="inline"}fireCustomEvent()}};var fireCustomEvent=function(){window.dispatchEvent(new Event("toggleFullContent"))};if("querySelector"in document&&"addEventListener"in window){var fullTextWrappers=document.querySelectorAll(".readmore-content");forEach(fullTextWrappers,function(index,fullTextWrapper){fullTextWrapper.addEventListener("transitionend",onAnimationEnd);fullTextWrapper.addEventListener("animationend",onAnimationEnd)});var toggleButtons=document.querySelectorAll(".readmore-toggle");forEach(toggleButtons,function(index,toggleButton){toggleButton.addEventListener("click",function(){var fullTextWrapper=this.parentElement.querySelector(".readmore-content");if(!fullTextWrapper){return}var ellipsis=this.parentElement.querySelector(".ellipsis");var toggleButtonText=this.querySelector(".readmore-text");if(fullTextWrapper.hasAttribute("hidden")){fullTextWrapper.removeAttribute("hidden");toggleButtonText.innerText=toggleButtonText.dataset.lessText;toggleButton.setAttribute("aria-expanded",true);if(ellipsis){ellipsis.style.display="none"}fullTextWrapper.classList.add("fadeInDown");fullTextWrapper.classList.remove("fadeOutUp");fullTextWrapper.classList.remove("faster");fireCustomEvent()}else{toggleButton.style.display="none";toggleButton.setAttribute("aria-expanded",false);toggleButtonText.innerText=toggleButtonText.dataset.moreText;fullTextWrapper.classList.add("fadeOutUp");fullTextWrapper.classList.add("faster");fullTextWrapper.classList.remove("fadeInDown")}})})}})();
1
+ !function(){var e=function(e){if("animationend"===e.type&&"fadeOutUp"===e.animationName){e.target.setAttribute("hidden","true"),e.target.parentElement.querySelector(".readmore-toggle").style.display="inline";var n=e.target.parentElement.querySelector(".ellipsis");n&&(n.style.display="inline"),t()}},t=function(){window.dispatchEvent(new Event("toggleFullContent"))};"querySelector"in document&&"addEventListener"in window&&(document.addEventListener("transitionend",function(t){t.target.matches(".readmore-content")&&e(t)},!1),document.addEventListener("animationend",function(t){t.target.matches(".readmore-content")&&e(t)},!1),document.addEventListener("click",function(e){if(e.target.matches(".readmore-text")){var n=e.target,a=n.parentElement,r=n.parentElement.parentElement.querySelector(".readmore-content"),i=n.parentElement.parentElement.querySelector(".ellipsis");r&&(r.hasAttribute("hidden")?(r.removeAttribute("hidden"),n.innerText=n.dataset.lessText,a.setAttribute("aria-expanded",!0),i&&(i.style.display="none"),r.classList.add("fadeInDown"),r.classList.remove("fadeOutUp"),r.classList.remove("faster"),t()):(a.style.display="none",a.setAttribute("aria-expanded",!1),n.innerText=n.dataset.moreText,r.classList.add("fadeOutUp"),r.classList.add("faster"),r.classList.remove("fadeInDown")))}},!1))}();
public/js/lib/strongslider/jquery.strongslider.js CHANGED
@@ -1865,7 +1865,7 @@
1865
 
1866
  // adjust the height
1867
  unsetSlideHeight();
1868
- setViewportHeight();
1869
 
1870
  // if stretch, set t-slide height to 100%
1871
  if (slider.settings.stretch) {
1865
 
1866
  // adjust the height
1867
  unsetSlideHeight();
1868
+ //setViewportHeight();
1869
 
1870
  // if stretch, set t-slide height to 100%
1871
  if (slider.settings.stretch) {
public/js/lib/strongslider/jquery.strongslider.min.js CHANGED
@@ -1 +1 @@
1
- !function(G){var J={debug:!1,logAs:"strongSlider",compat:{lazyload:{active:!1,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:!0,hideControlOnEnd:!1,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}};G.fn.strongSlider=function(i){if(0===this.length)return this;var g={},o=this,p=this.find(".wpmslider-content");if(!G(p).data("strongSlider")){var t=function(){if(!G(p).data("strongSlider")){g.visibilityInterval=0,g.hidden=!1;var e=o.data("slider-var"),t={};void 0!==window[e]&&(t=window[e].config),g.settings=G.extend({},J,t,i),g.debug=g.settings.debug,g.logAs=g.settings.logAs,g.debug&&console.log(g.logAs,"slider.settings",g.settings),g.children=p.children(g.settings.slideSelector),g.children.length<g.settings.minSlides&&(g.settings.minSlides=g.children.length),g.children.length<g.settings.maxSlides&&(g.settings.maxSlides=g.children.length),g.settings.randomStart&&(g.settings.startSlide=Math.floor(Math.random()*g.children.length)),g.active={index:g.settings.startSlide},r(),g.carousel&&(g.settings.preloadImages="all"),g.working=!1,g.controls={},g.interval=null,g.animProp="vertical"===g.settings.mode?"top":"left",g.usingCSS=g.settings.useCSS&&"fade"!==g.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 g.cssPrefix=t[i].replace("Perspective","").toLowerCase(),g.animProp="-"+g.cssPrefix+"-transform",!0;return!1}(),"vertical"===g.settings.mode&&(g.settings.maxSlides=g.settings.minSlides),p.data("origStyle",p.attr("style")),p.children(g.settings.slideSelector).each(function(){G(this).data("origStyle",G(this).attr("style"))}),p.getSlideCount()&&(g.settings.imagesLoaded?o.imagesLoaded(function(){n()}):n())}},e=function(){return o.is(":visible")&&"hidden"!==o.css("visibility")},n=function(){e()&&function(){if(g.settings.compat.lazyload){for(var e=!1,t=0,i=g.settings.compat.lazyload.classes.length;t<i;t++){var n=g.settings.compat.lazyload.classes[t].start,s=g.settings.compat.lazyload.classes[t].finish;n&&s?o.find("img."+n).length&&!o.find("img."+s).length&&(e=!0):n?o.find("img."+n).length&&(e=!0):s&&(o.find("img."+s).length||(e=!0))}if(e)return g.debug&&console.log(g.logAs,"lazy loading..."),!1}return g.debug&&console.log(g.logAs,"compat check complete"),!0}()?(clearInterval(g.visibilityInterval),s()):0===g.visibilityInterval&&(g.visibilityInterval=setInterval(n,4e3))},s=function(){var e=g.children.eq(g.settings.startSlide);p.wrap('<div class="'+g.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>'),g.viewport=p.parent(),g.settings.ariaLive&&g.viewport.attr("aria-live","polite"),g.loader=G('<div class="wpmslider-loading" />'),g.viewport.prepend(g.loader),p.css({width:"horizontal"===g.settings.mode?1e3*g.children.length+215+"%":"auto",position:"relative"}),g.usingCSS&&g.settings.easing?p.css("-"+g.cssPrefix+"-transition-timing-function",g.settings.easing):g.settings.easing||(g.settings.easing="swing"),g.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),g.viewport.parent().css({maxWidth:w()}),g.settings.pager||g.settings.controls||g.viewport.parent().css({margin:"0 auto"}),g.children.css({float:"horizontal"===g.settings.mode?"left":"none",listStyle:"none",position:"relative"}),a(),"horizontal"===g.settings.mode&&0<g.settings.slideMargin&&g.children.css("marginRight",g.settings.slideMargin),"vertical"===g.settings.mode&&0<g.settings.slideMargin&&g.children.css("marginBottom",g.settings.slideMargin),"fade"===g.settings.mode?(g.children.css({position:"absolute",zIndex:0,display:"none"}),g.children.eq(g.settings.startSlide).css({zIndex:g.settings.slideZIndex,display:"block"})):g.children.css({display:"block"}),g.controls.el=G('<div class="wpmslider-controls" />'),g.settings.captions&&A(),g.active.last=g.settings.startSlide===C()-1,g.settings.video&&p.fitVids(),"none"===g.settings.preloadImages?e=null:"all"===g.settings.preloadImages&&(e=g.children),g.settings.controls&&T(),g.settings.auto&&g.settings.autoControls&&M(),g.settings.pager&&k(),g.settings.controls&&I(),(g.settings.controls||g.settings.autoControls||g.settings.pager)&&g.viewport.after(g.controls.el),null===e?d():l(e,d)},r=function(){g.debug&&console.log(g.logAs,"setBreakpoint");var e=g.settings.breakpoints.single,t=g.settings.breakpoints.multiple;if("show_multiple"===g.settings.type)for(var i in t)if(t.hasOwnProperty(i)&&verge.viewportW()>=t[i].width){e=t[i];break}g.debug&&console.log("current breakpoint",e),g.settings.maxSlides=e.maxSlides,g.settings.moveSlides=e.moveSlides,g.settings.slideMargin=e.slideMargin,g.carousel=1<g.settings.minSlides||1<g.settings.maxSlides},a=function(){r(),g.children.css("width",x())},l=function(e,t){var i=e.find('img:not([src=""]), iframe').length,n=0;0!==i?e.find('img:not([src=""]), iframe').each(function(){G(this).one("load error",function(){++n===i&&t()}).each(function(){(this.complete||""===this.src)&&G(this).trigger("load")})}):t()},d=function(){if(g.settings.infiniteLoop&&"fade"!==g.settings.mode){var e="vertical"===g.settings.mode?g.settings.minSlides:g.settings.maxSlides,t=g.children.slice(0,e).clone(!0).addClass("wpmslider-clone"),i=g.children.slice(-e).clone(!0).addClass("wpmslider-clone");g.settings.ariaHidden&&(t.attr("aria-hidden",!0),i.attr("aria-hidden",!0)),p.append(t).prepend(i)}g.loader.remove(),"vertical"===g.settings.mode&&(g.settings.adaptiveHeight=!0),p.redrawSlider(),g.settings.onSliderLoad.call(p,g.active.index),g.initialized=!0,g.visibilityInterval=setInterval(v,500),g.settings.responsive&&c(),g.settings.auto&&g.settings.autoStart&&(1<C()||g.settings.autoSlideForOnePage)&&W(),g.settings.pager&&O(g.settings.startSlide),g.settings.controls&&N(),g.settings.touchEnabled&&X(),g.settings.keyboardEnabled&&G(document).keydown(Y)},c=function(){window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1),window.addEventListener("toggleFullContent",u,!1),window.addEventListener("blur",function(){h("blur")}),window.addEventListener("focus",function(){f("blur")})},u=_.debounce(function(){g.debug&&console.log(g.logAs,"updateLayout"),j()},250),v=function(){g.settings.auto&&(e()?f("hide"):h("hide"),verge.inViewport(p)?f("scroll"):h("scroll"))},h=function(e){g.interval&&(p.stopAuto(!0),g.autoPaused=e,g.debug&&console.log(g.logAs,"pause",e))},f=function(e){g.autoPaused===e&&(p.startAuto(!0),g.autoPaused=null,g.debug&&console.log(g.logAs,"play",e))},m=function(e){return Math.max.apply(Math,e)},S=function(){var t=0,e=G();if("vertical"===g.settings.mode||g.settings.adaptiveHeight)if(g.carousel){var i=1===g.settings.moveSlides?g.active.index:g.active.index*y();e=g.children.eq(i);for(var n=1;n<=g.settings.maxSlides-1;n++)e=i+n>=g.children.length?e.add(g.children.eq(n-1)):e.add(g.children.eq(i+n))}else e=g.children.eq(g.active.index);else e=g.children;return"vertical"===g.settings.mode?(e.each(function(e){t+=G(this).outerHeight()}),0<g.settings.slideMargin&&(t+=g.settings.slideMargin*(g.settings.minSlides-1))):t=Math.max.apply(Math,e.map(function(){return G(this).outerHeight(!1)}).get()),"border-box"===g.viewport.css("box-sizing")?t+=parseFloat(g.viewport.css("padding-top"))+parseFloat(g.viewport.css("padding-bottom"))+parseFloat(g.viewport.css("border-top-width"))+parseFloat(g.viewport.css("border-bottom-width")):"padding-box"===g.viewport.css("box-sizing")&&(t+=parseFloat(g.viewport.css("padding-top"))+parseFloat(g.viewport.css("padding-bottom"))),t},w=function(){return"100%"},x=function(){var e=g.viewport.width(),t=g.settings.slideMargin*(g.settings.maxSlides-1);return Math.floor((e-t)/g.settings.maxSlides)},b=function(){return g.settings.maxSlides},C=function(){var e=0,t=0,i=0;if(0<g.settings.moveSlides){if(!g.settings.infiniteLoop){for(;t<g.children.length;)++e,t=i+b(),i+=g.settings.moveSlides<=b()?g.settings.moveSlides:b();return i}e=Math.ceil(g.children.length/y())}else e=Math.ceil(g.children.length/b());return e},y=function(){return 0<g.settings.moveSlides&&g.settings.moveSlides<=b()?g.settings.moveSlides:b()},P=function(e,t,i,n){var s,o;g.usingCSS?("vertical"===g.settings.mode?o="translateY("+e+"px)":"horizontal"===g.settings.mode?o="translateX("+e+"px":"none"===g.settings.mode&&(o="translateY("+e+"px)",i=0),p.css("-"+g.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"===t?(p.css(g.animProp,o),0!==i?p.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){G(e.target).is(p)&&(p.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),F())}):F()):"reset"===t&&p.css(g.animProp,o)):((s={})[g.animProp]=e,"slide"===t?p.animate(s,i,g.settings.easing,function(){F()}):"reset"===t&&p.css(g.animProp,e))},E=function(){for(var e="",t="",i=C(),n=0;n<i;n++)t="",g.settings.buildPager?("icons"===g.settings.buildPager&&(t=""),(G.isFunction(g.settings.buildPager)||g.settings.pagerCustom)&&(t=g.settings.buildPager(n)),g.pagerEl.addClass("wpmslider-custom-pager")):(t=n+1,g.pagerEl.addClass("wpmslider-default-pager")),e+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+n+'" class="wpmslider-pager-link">'+t+"</a></div>";g.pagerEl.html(e)},k=function(){g.settings.pagerCustom?g.pagerEl=G(g.settings.pagerCustom):(g.pagerEl=G('<div class="wpmslider-pager" />'),g.settings.pagerSelector?G(g.settings.pagerSelector).html(g.pagerEl):g.controls.el.addClass("wpmslider-has-pager").append(g.pagerEl),E()),g.pagerEl.on("click touchend","a",H)},T=function(){g.controls.prev=G('<a class="wpmslider-prev" href="">'+g.settings.prevText+"</a>"),g.controls.prev.on("click touchend",L),g.settings.prevSelector&&G(g.settings.prevSelector).append(g.controls.prev),g.settings.prevSelector||(g.controls.directionEl=G('<div class="wpmslider-controls-direction" />'),g.controls.directionEl.append(g.controls.prev),g.controls.el.addClass("wpmslider-has-controls-direction").append(g.controls.directionEl))},I=function(){g.controls.next=G('<a class="wpmslider-next" href="">'+g.settings.nextText+"</a>"),g.controls.next.on("click touchend",z),g.settings.nextSelector&&G(g.settings.nextSelector).append(g.controls.next),g.settings.nextSelector||(g.controls.directionEl=G('<div class="wpmslider-controls-direction" />'),g.controls.directionEl.append(g.controls.next),g.controls.el.addClass("wpmslider-has-controls-direction").append(g.controls.directionEl))},M=function(){g.controls.start=G('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+g.settings.startText+"</a></div>"),g.controls.stop=G('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+g.settings.stopText+"</a></div>"),g.controls.autoEl=G('<div class="wpmslider-controls-auto" />'),g.controls.autoEl.on("click",".wpmslider-start",q),g.controls.autoEl.on("click",".wpmslider-stop",D),g.settings.autoControlsCombine?g.controls.autoEl.append(g.controls.start):g.controls.autoEl.append(g.controls.start).append(g.controls.stop),g.settings.autoControlsSelector?G(g.settings.autoControlsSelector).html(g.controls.autoEl):g.controls.el.addClass("wpmslider-has-controls-auto").append(g.controls.autoEl),B(g.settings.autoStart?"stop":"start")},A=function(){g.children.each(function(e){var t=G(this).find("img:first").attr("title");void 0!==t&&(""+t).length&&G(this).append('<div class="wpmslider-caption"><span>'+t+"</span></div>")})},z=function(e){e.preventDefault(),e.stopPropagation(),g.controls.el.hasClass("disabled")||(g.settings.auto&&g.settings.stopAutoOnClick&&(g.debug&&console.log(g.logAs,"stop on navigation"),p.stopAuto()),p.goToNextSlide())},L=function(e){e.preventDefault(),e.stopPropagation(),g.controls.el.hasClass("disabled")||(g.settings.auto&&g.settings.stopAutoOnClick&&(g.debug&&console.log(g.logAs,"stop on navigation"),p.stopAuto()),p.goToPrevSlide())},q=function(e){p.startAuto(),e.preventDefault(),e.stopPropagation()},D=function(e){p.stopAuto(),e.preventDefault(),e.stopPropagation()},H=function(e){var t,i;e.preventDefault(),e.stopPropagation(),g.controls.el.hasClass("disabled")||(g.settings.auto&&g.settings.stopAutoOnClick&&(g.debug&&console.log(g.logAs,"stop on navigation"),p.stopAuto()),void 0!==(t=G(e.currentTarget)).attr("data-slide-index")&&(i=parseInt(t.attr("data-slide-index")))!==g.active.index&&p.goToSlide(i))},O=function(i){var e=g.children.length;if("short"===g.settings.pagerType)return 1<g.settings.maxSlides&&(e=Math.ceil(g.children.length/g.settings.maxSlides)),void g.pagerEl.html(i+1+g.settings.pagerShortSeparator+e);g.pagerEl.find("a").removeClass("active"),g.pagerEl.each(function(e,t){G(t).find("a").eq(i).addClass("active")})},F=function(){if(g.settings.infiniteLoop){var e="";0===g.active.index?e=g.children.eq(0).position():g.active.index===C()-1&&g.carousel?e=g.children.eq((C()-1)*y()).position():g.active.index===g.children.length-1&&(e=g.children.eq(g.children.length-1).position()),e&&("horizontal"===g.settings.mode?P(-e.left,"reset",0):"vertical"===g.settings.mode&&P(-e.top,"reset",0))}g.working=!1,g.settings.onSlideAfter.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index)},B=function(e){g.settings.autoControlsCombine?g.controls.autoEl.html(g.controls[e]):(g.controls.autoEl.find("a").removeClass("active"),g.controls.autoEl.find("a:not(.wpmslider-"+e+")").addClass("active"))},N=function(){1===C()?(g.controls.prev.addClass("disabled"),g.controls.next.addClass("disabled")):!g.settings.infiniteLoop&&g.settings.hideControlOnEnd&&(0===g.active.index?(g.controls.prev.addClass("disabled"),g.controls.next.removeClass("disabled")):g.active.index===C()-1?(g.controls.next.addClass("disabled"),g.controls.prev.removeClass("disabled")):(g.controls.prev.removeClass("disabled"),g.controls.next.removeClass("disabled")))},W=function(){0<g.settings.autoDelay?setTimeout(p.startAuto,g.settings.autoDelay):p.startAuto(),g.settings.autoHover&&p.hover(function(){h("hover")},function(){f("hover")})},Y=function(e){var t=document.activeElement.tagName.toLowerCase();if(null===new RegExp(t,["i"]).exec("input|textarea")&&verge.inViewport(p)){if(39===e.keyCode)return z(e),!1;if(37===e.keyCode)return L(e),!1}},X=function(){g.touch={start:{x:0,y:0},end:{x:0,y:0}},g.viewport.on("touchstart MSPointerDown pointerdown",R),g.viewport.on("click",".wpmslider a",function(e){g.viewport.hasClass("click-disabled")&&(e.preventDefault(),e.stopPropagation(),g.viewport.removeClass("click-disabled"))})},R=function(e){if(("touchstart"===e.type||0===e.button)&&!e.originalEvent.target.classList.contains("readmore-text"))if(g.controls.el.addClass("disabled"),g.working)e.preventDefault(),e.stopPropagation(),g.controls.el.removeClass("disabled");else{g.touch.originalPos=p.position();var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t];if("function"==typeof PointerEvent&&void 0===t.pointerId)return;g.touch.start.x=i[0].pageX,g.touch.start.y=i[0].pageY,g.viewport.get(0).setPointerCapture&&(g.pointerId=t.pointerId,g.viewport.get(0).setPointerCapture(g.pointerId)),g.originalClickTarget=t.originalTarget||t.target,g.originalClickButton=t.button,g.originalClickButtons=t.buttons,g.originalEventType=t.type,g.hasMove=!1,g.viewport.on("touchmove MSPointerMove pointermove",U),g.viewport.on("touchend MSPointerUp pointerup",V),g.viewport.on("MSPointerCancel pointercancel",Z)}},Z=function(e){e.preventDefault(),P(g.touch.originalPos.left,"reset",0),g.controls.el.removeClass("disabled"),g.viewport.off("MSPointerCancel pointercancel",Z),g.viewport.off("touchmove MSPointerMove pointermove",U),g.viewport.off("touchend MSPointerUp pointerup",V),g.viewport.get(0).releasePointerCapture&&g.viewport.get(0).releasePointerCapture(g.pointerId)},U=function(e){var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t],n=Math.abs(i[0].pageX-g.touch.start.x),s=Math.abs(i[0].pageY-g.touch.start.y),o=0,r=0;g.hasMove=!0,s<3*n&&g.settings.preventDefaultSwipeX?(e.preventDefault(),e.stopPropagation()):n<3*s&&g.settings.preventDefaultSwipeY&&(e.preventDefault(),e.stopPropagation()),"touchmove"!==e.type&&e.preventDefault(),"fade"!==g.settings.mode&&g.settings.oneToOneTouch&&(o="horizontal"===g.settings.mode?(r=i[0].pageX-g.touch.start.x,g.touch.originalPos.left+r):(r=i[0].pageY-g.touch.start.y,g.touch.originalPos.top+r),P(o,"reset",0))},V=function(e){e.preventDefault(),g.viewport.off("touchmove MSPointerMove pointermove",U),g.controls.el.removeClass("disabled");var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t],n=0,s=0;g.touch.end.x=i[0].pageX,g.touch.end.y=i[0].pageY,"fade"===g.settings.mode?(s=Math.abs(g.touch.start.x-g.touch.end.x))>=g.settings.swipeThreshold&&(g.touch.start.x>g.touch.end.x?p.goToNextSlide():p.goToPrevSlide(),p.stopAuto()):(n="horizontal"===g.settings.mode?(s=g.touch.end.x-g.touch.start.x,g.touch.originalPos.left):(s=g.touch.end.y-g.touch.start.y,g.touch.originalPos.top),!g.settings.infiniteLoop&&(0===g.active.index&&0<s||g.active.last&&s<0)?P(n,"reset",200):Math.abs(s)>=g.settings.swipeThreshold?(s<0?p.goToNextSlide():p.goToPrevSlide(),p.stopAuto()):P(n,"reset",200)),g.viewport.off("touchend MSPointerUp pointerup",V),g.viewport.get(0).releasePointerCapture&&g.viewport.get(0).releasePointerCapture(g.pointerId),!1!==g.hasMove||0!==g.originalClickButton&&"touchstart"!==g.originalEventType||G(g.originalClickTarget).trigger({type:"click",button:g.originalClickButton,buttons:g.originalClickButtons})},j=function(e){g.initialized?g.working?(g.debug&&console.log(g.logAs,"slider working"),window.setTimeout(j,10)):(p.redrawSlider(),g.settings.onSliderResize.call(p,g.active.index)):g.debug&&console.log(g.logAs,"slider not initialized")},Q=function(e){var t=b();g.settings.ariaHidden&&(g.children.attr("aria-hidden","true"),g.children.slice(e,e+t).attr("aria-hidden","false"))};return p.goToSlide=function(e,t){var i,n,s,o,r,a=!0,l=0,d={left:0,top:0},c=null;if(g.oldIndex=g.active.index,g.active.index=(r=e)<0?g.settings.infiniteLoop?C()-1:g.active.index:r>=C()?g.settings.infiniteLoop?0:g.active.index:r,!g.working&&g.active.index!==g.oldIndex){if(g.working=!0,void 0!==(a=g.settings.onSlideBefore.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index))&&!a)return g.active.index=g.oldIndex,void(g.working=!1);"next"===t?g.settings.onSlideNext.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index)||(a=!1):"prev"===t&&(g.settings.onSlidePrev.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index)||(a=!1)),g.active.last=g.active.index>=C()-1,(g.settings.pager||g.settings.pagerCustom)&&O(g.active.index),g.settings.controls&&N(),"fade"===g.settings.mode?(g.settings.adaptiveHeight&&g.viewport.height()!==S()&&g.viewport.animate({height:S()},g.settings.adaptiveHeightSpeed),g.children.filter(":visible").fadeOut(g.settings.speed).css({zIndex:0}),g.children.eq(g.active.index).css("zIndex",g.settings.slideZIndex+1).fadeIn(g.settings.speed,function(){G(this).css("zIndex",g.settings.slideZIndex),F()})):(g.settings.adaptiveHeight&&g.viewport.height()!==S()&&g.viewport.animate({height:S()},g.settings.adaptiveHeightSpeed),!g.settings.infiniteLoop&&g.carousel&&g.active.last?"horizontal"===g.settings.mode?(d=(c=g.children.eq(g.children.length-1)).position(),l=g.viewport.width()-c.outerWidth()):(i=g.children.length-g.settings.minSlides,d=g.children.eq(i).position()):g.carousel&&g.active.last&&"prev"===t?(n=1===g.settings.moveSlides?g.settings.maxSlides-y():(C()-1)*y()-(g.children.length-g.settings.maxSlides),d=(c=p.children(".wpmslider-clone").eq(n)).position()):"next"===t&&0===g.active.index?(d=p.find("> .wpmslider-clone").eq(g.settings.maxSlides).position(),g.active.last=!1):0<=e&&(o=e*parseInt(y()),d=g.children.eq(o).position()),void 0!==d&&(s="horizontal"===g.settings.mode?-(d.left-l):-d.top,P(s,"slide",g.settings.speed))),g.settings.ariaHidden&&Q(g.active.index*y())}},p.goToNextSlide=function(){if((g.settings.infiniteLoop||!g.active.last)&&!0!==g.working){var e=parseInt(g.active.index)+1;p.goToSlide(e,"next")}},p.goToPrevSlide=function(){if((g.settings.infiniteLoop||0!==g.active.index)&&!0!==g.working){var e=parseInt(g.active.index)-1;p.goToSlide(e,"prev")}},p.startAuto=function(e){g.interval||(g.interval=setInterval(function(){"next"===g.settings.autoDirection?p.goToNextSlide():p.goToPrevSlide()},g.settings.pause),g.settings.onAutoChange.call(p,!0),g.settings.autoControls&&!0!==e&&B("stop"))},p.stopAuto=function(e){g.autoPaused&&(g.autoPaused=!1),g.interval&&(clearInterval(g.interval),g.interval=null,g.settings.onAutoChange.call(p,!1),g.settings.autoControls&&!0!==e&&B("start"))},p.getCurrentSlide=function(){return g.active.index},p.getCurrentSlideElement=function(){return g.children.eq(g.active.index)},p.getSlideElement=function(e){return g.children.eq(e)},p.getSlideCount=function(){return g.children.length},p.isWorking=function(){return g.working},p.redrawSlider=function(){var e,t,i,n,s;g.debug&&console.log(g.logAs,"redrawSlider"),a(),g.children.height("auto"),g.viewport.height(S()+2),g.settings.stretch&&(e=g.children.map(function(){return jQuery(this).actual("outerHeight")}).get(),t=m(e),g.children.height(t)),g.children.add(p.find(".wpmslider-clone")).outerWidth(x()),g.children.length>g.settings.maxSlides&&g.active.last&&!g.settings.infiniteLoop?"horizontal"===g.settings.mode?(i=(n=g.children.last()).position(),P(-(i.left-(g.viewport.width()-n.outerWidth())),"reset",0)):"vertical"===g.settings.mode&&(s=g.children.length-g.settings.minSlides,i=g.children.eq(s).position(),P(-i.top,"reset",0)):(i=g.children.eq(g.active.index*y()).position(),g.active.index===C()-1&&(g.active.last=!0),void 0!==i&&("horizontal"===g.settings.mode?P(-i.left,"reset",0):"vertical"===g.settings.mode?P(-i.top,"reset",0):"none"===g.settings.mode&&P(-i.top,"reset",0))),g.active.last&&(g.active.index=C()-1),g.active.index>=C()&&(g.active.last=!0),g.settings.pager&&!g.settings.pagerCustom&&(E(),O(g.active.index)),g.settings.ariaHidden&&Q(g.active.index*y())},p.destroySlider=function(){g.initialized&&(g.initialized=!1,G(".wpmslider-clone",this).remove(),g.children.each(function(){void 0!==G(this).data("origStyle")?G(this).attr("style",G(this).data("origStyle")):G(this).removeAttr("style")}),void 0!==G(this).data("origStyle")?this.attr("style",G(this).data("origStyle")):G(this).removeAttr("style"),G(this).unwrap().unwrap(),g.controls.el&&g.controls.el.remove(),g.controls.next&&g.controls.next.remove(),g.controls.prev&&g.controls.prev.remove(),g.pagerEl&&g.settings.controls&&!g.settings.pagerCustom&&g.pagerEl.remove(),G(".wpmslider-caption",this).remove(),g.controls.autoEl&&g.controls.autoEl.remove(),clearInterval(g.interval),clearInterval(g.visibilityInterval),g.settings.responsive&&G(window).off("resize",j),g.settings.keyboardEnabled&&G(document).off("keydown",Y),G(this).removeData("strongSlider"))},p.reloadSlider=function(e){void 0!==e&&(i=e),p.destroySlider(),t(),G(p).data("strongSlider",this)},t(),G(p).data("strongSlider",this),o.attr("data-state","init"),g.debug&&console.log(g.logAs,"viewport",verge.viewportW(),"x",verge.viewportH()),this}}}(jQuery);
1
+ !function(e){var t={debug:!1,logAs:"strongSlider",compat:{lazyload:{active:!1,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:!0,hideControlOnEnd:!1,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&&M(),n.settings.auto&&n.settings.autoControls&&z(),n.settings.pager&&I(),n.settings.controls&&A(),(n.settings.controls||n.settings.autoControls||n.settings.pager)&&n.viewport.after(n.controls.el),null===t?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&&B(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"),N())}):N()):"reset"===i&&o.css(n.animProp,l)):((a={})[n.animProp]=t,"slide"===i?o.animate(a,s,n.settings.easing,function(){N()}):"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)},M=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))},A=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))},B=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")})},N=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)&&!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)&&B(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),N()})):(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.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")).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(),B(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);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: machothemes,silkalns,cdillon27
3
  Tags: testimonials, testimonial slider, testimonial form, star ratings
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
- Tested up to: 5.1
7
- Stable tag: 2.37
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
3
  Tags: testimonials, testimonial slider, testimonial form, star ratings
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
+ Tested up to: 5.2
7
+ Stable tag: 2.38
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
strong-testimonials.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: MachoThemes
7
  * Author URI: https://www.machothemes.com/
8
- * Version: 2.37
9
  * Text Domain: strong-testimonials
10
  * Domain Path: /languages
11
  * Requires: 4.6 or higher
@@ -44,11 +44,11 @@ if ( ! defined( 'ABSPATH' ) ) {
44
  exit;
45
  }
46
 
47
- define( 'WPMTST_VERSION', '2.37' );
48
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
49
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
50
- define( 'STRONGPLUGINS_STORE_URL', '#' );
51
-
52
 
53
  if ( ! class_exists( 'Strong_Testimonials' ) ) :
54
 
@@ -198,6 +198,7 @@ final class Strong_Testimonials {
198
  defined( 'WPMTST_ASSETS_CSS' ) || define( 'WPMTST_ASSETS_CSS', WPMTST_URL . 'assets/css/' );
199
  defined( 'WPMTST_ASSETS_JS' ) || define( 'WPMTST_ASSETS_JS', WPMTST_URL . 'assets/js/' );
200
  defined( 'WPMTST_ASSETS_SRC' ) || define( 'WPMTST_ASSETS_SRC', WPMTST_URL . 'assets/src/' );
 
201
  }
202
 
203
  /**
@@ -269,10 +270,9 @@ final class Strong_Testimonials {
269
  require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-general.php';
270
  require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-form.php';
271
  require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-compat.php';
272
- require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-licenses.php';
273
 
274
  require_once WPMTST_ADMIN . 'about/class-strong-testimonials-about.php';
275
-
276
  require_once WPMTST_ADMIN . 'class-strong-testimonials-defaults.php';
277
  require_once WPMTST_ADMIN . 'class-strong-testimonials-list-table.php';
278
  require_once WPMTST_ADMIN . 'class-strong-views-list-table.php';
@@ -284,6 +284,7 @@ final class Strong_Testimonials {
284
  require_once WPMTST_ADMIN . 'class-strong-testimonials-admin-category-list.php';
285
  require_once WPMTST_ADMIN . 'class-strong-testimonials-post-editor.php';
286
  require_once WPMTST_ADMIN . 'class-strong-testimonials-exporter.php';
 
287
 
288
  require_once WPMTST_ADMIN . 'admin.php';
289
  require_once WPMTST_ADMIN . 'admin-notices.php';
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: MachoThemes
7
  * Author URI: https://www.machothemes.com/
8
+ * Version: 2.38
9
  * Text Domain: strong-testimonials
10
  * Domain Path: /languages
11
  * Requires: 4.6 or higher
44
  exit;
45
  }
46
 
47
+ define( 'WPMTST_VERSION', '2.38' );
48
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
49
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
50
+ defined( 'WPMTST_STORE_URL' ) || define( 'WPMTST_STORE_URL', 'https://strongtestimonials.com' );
51
+ defined( 'WPMTST_STORE_UPGRADE_URL' ) || define( 'WPMTST_STORE_UPGRADE_URL', 'https://strongtestimonials.com/pricing' );
52
 
53
  if ( ! class_exists( 'Strong_Testimonials' ) ) :
54
 
198
  defined( 'WPMTST_ASSETS_CSS' ) || define( 'WPMTST_ASSETS_CSS', WPMTST_URL . 'assets/css/' );
199
  defined( 'WPMTST_ASSETS_JS' ) || define( 'WPMTST_ASSETS_JS', WPMTST_URL . 'assets/js/' );
200
  defined( 'WPMTST_ASSETS_SRC' ) || define( 'WPMTST_ASSETS_SRC', WPMTST_URL . 'assets/src/' );
201
+ defined( 'WPMTST_ASSETS_IMG' ) || define( 'WPMTST_ASSETS_IMG', WPMTST_URL . 'assets/img/' );
202
  }
203
 
204
  /**
270
  require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-general.php';
271
  require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-form.php';
272
  require_once WPMTST_ADMIN . 'settings/class-strong-testimonials-settings-compat.php';
 
273
 
274
  require_once WPMTST_ADMIN . 'about/class-strong-testimonials-about.php';
275
+ require_once WPMTST_ADMIN . 'class-strong-testimonials-addons.php';
276
  require_once WPMTST_ADMIN . 'class-strong-testimonials-defaults.php';
277
  require_once WPMTST_ADMIN . 'class-strong-testimonials-list-table.php';
278
  require_once WPMTST_ADMIN . 'class-strong-views-list-table.php';
284
  require_once WPMTST_ADMIN . 'class-strong-testimonials-admin-category-list.php';
285
  require_once WPMTST_ADMIN . 'class-strong-testimonials-post-editor.php';
286
  require_once WPMTST_ADMIN . 'class-strong-testimonials-exporter.php';
287
+ require_once WPMTST_ADMIN . 'class-strong-testimonials-upsell.php';
288
 
289
  require_once WPMTST_ADMIN . 'admin.php';
290
  require_once WPMTST_ADMIN . 'admin-notices.php';