Version Description
Download this release
Release Info
Developer | giucu91 |
Plugin | Strong Testimonials |
Version | 2.51.4 |
Comparing to | |
See all releases |
Code changes from version 2.51.3 to 2.51.4
- admin/about/class-strong-testimonials-welcome.php +0 -1
- admin/admin-notices.php +10 -8
- admin/admin.php +6 -5
- admin/class-strong-testimonials-addons.php +2 -2
- admin/class-strong-testimonials-admin-category-list.php +4 -4
- admin/class-strong-testimonials-admin-list.php +9 -9
- admin/class-strong-testimonials-admin-scripts.php +22 -22
- admin/class-strong-testimonials-defaults.php +91 -91
- admin/class-strong-testimonials-help.php +28 -28
- admin/class-strong-testimonials-helper.php +2046 -0
- admin/class-strong-testimonials-list-table.php +22 -21
- admin/class-strong-testimonials-page-shortcodes.php +47 -47
- admin/class-strong-testimonials-post-editor.php +20 -23
- admin/class-strong-testimonials-review.php +6 -6
- admin/class-strong-testimonials-upsell.php +21 -19
- admin/class-strong-views-list-table.php +35 -30
- admin/custom-fields-ajax.php +8 -8
- admin/custom-fields.php +5 -5
- admin/menu/class-strong-testimonials-menu-fields.php +5 -5
- admin/menu/class-strong-testimonials-menu-settings.php +2 -2
- admin/menu/class-strong-testimonials-menu-shortcodes.php +2 -2
- admin/menu/class-strong-testimonials-menu-views.php +2 -2
- admin/partials/fields/field-controls.php +1 -1
- admin/partials/fields/field-header.php +3 -3
- admin/partials/fields/field-label.php +4 -4
- admin/partials/fields/field-name.php +6 -6
- admin/partials/fields/field-text.php +4 -4
- admin/partials/fields/field-type.php +12 -12
- admin/partials/templates/form-preview-template.php +2 -1
- admin/partials/views/group-compat.php +0 -17
- admin/partials/views/group-extra.php +0 -24
- admin/partials/views/group-fields.php +0 -75
- admin/partials/views/group-form.php +0 -24
- admin/partials/views/group-query.php +0 -44
- admin/partials/views/group-slideshow.php +0 -30
- admin/partials/views/group-style.php +0 -51
- admin/partials/views/option-background.php +0 -151
- admin/partials/views/option-boilerplate.php +0 -39
- admin/partials/views/option-category.php +0 -56
- admin/partials/views/option-classes.php +0 -14
- admin/partials/views/option-client-section.php +0 -30
- admin/partials/views/option-color.php +0 -57
- admin/partials/views/option-content.php +0 -232
- admin/partials/views/option-divi.php +0 -24
- admin/partials/views/option-form-ajax.php +0 -13
- admin/partials/views/option-form-category.php +0 -28
- admin/partials/views/option-id.php +0 -23
- admin/partials/views/option-layout.php +0 -147
- admin/partials/views/option-limit.php +0 -33
- admin/partials/views/option-order.php +0 -26
- admin/partials/views/option-pagination.php +0 -167
- admin/partials/views/option-read-more-page.php +0 -88
- admin/partials/views/option-select.php +0 -29
- admin/partials/views/option-slideshow-behavior.php +0 -103
- admin/partials/views/option-slideshow-breakpoints.php +0 -95
- admin/partials/views/option-slideshow-navigation.php +0 -104
- admin/partials/views/option-slideshow-num.php +0 -8
- admin/partials/views/option-slideshow-transition.php +0 -46
- admin/partials/views/option-slideshow-type.php +0 -19
- admin/partials/views/option-template-list.php +0 -28
- admin/partials/views/option-thumbnail.php +0 -93
- admin/partials/views/option-title.php +0 -54
- admin/partials/views/template-input.php +0 -8
- admin/partials/views/template-not-found.php +0 -25
- admin/partials/views/template-options.php +0 -80
- admin/partials/views/view-mode.php +0 -18
- admin/partials/views/view-name.php +0 -17
- admin/partials/views/view-shortcode.php +0 -32
- admin/settings/class-strong-testimonials-form.php +4 -4
- admin/settings/class-strong-testimonials-settings-compat.php +132 -132
- admin/settings/class-strong-testimonials-settings-form.php +3 -3
- admin/settings/class-strong-testimonials-settings-general.php +1 -1
- admin/settings/class-strong-testimonials-settings.php +1 -1
- admin/settings/partials/email-from.php +8 -8
- admin/settings/partials/email-to.php +3 -3
- admin/settings/partials/email.php +6 -6
- admin/settings/partials/form.php +16 -13
- admin/settings/partials/general.php +46 -46
- admin/settings/partials/recipient.php +11 -11
- admin/view-list-order.php +2 -2
- admin/views-ajax.php +17 -17
- admin/views.php +102 -277
- assets/js/blocks-js.js +476 -408
- assets/src/js/components/edit.js +82 -79
- assets/src/js/components/inspector.js +6 -15
- changelog.txt +12 -5
- includes/class-strong-form.php +1 -1
- includes/class-strong-templates.php +5 -5
- includes/class-strong-testimonials-order.php +1 -1
- includes/class-strong-testimonials-privacy.php +2 -2
- includes/class-strong-testimonials-shortcode-average.php +3 -3
- includes/class-strong-testimonials-shortcode.php +2 -2
- includes/class-strong-view-slideshow.php +4 -4
- includes/class-strong-view.php +2 -2
- includes/elementor/class-strong-elementor-check.php +4 -4
- includes/functions-activation.php +2 -2
- includes/functions-content.php +8 -4
- includes/functions-rating.php +20 -20
- includes/functions-template-form.php +26 -35
- includes/functions-template.php +3 -3
- includes/functions-views.php +2 -2
- includes/functions.php +7 -7
- includes/post-types.php +44 -44
- includes/widget2.php +10 -10
- readme.txt +1 -1
- strong-testimonials.php +5 -4
- templates/bold/content.css +1 -1
- templates/default-form/form.php +3 -3
- templates/modern/content.css +1 -1
- templates/simple-form/form.php +3 -3
- templates/simple/content.css +1 -1
- templates/small-widget/content.css +1 -1
- templates/unstyled-form/form.php +3 -3
- templates/unstyled/content.css +1 -1
admin/about/class-strong-testimonials-welcome.php
CHANGED
@@ -188,7 +188,6 @@ class Strong_Testimonials_Welcome {
|
|
188 |
|
189 |
</div><!-- features -->
|
190 |
|
191 |
-
|
192 |
<div class="upgrade">
|
193 |
<div class="block">
|
194 |
<a href="https://strongtestimonials.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner" target="_blank"
|
188 |
|
189 |
</div><!-- features -->
|
190 |
|
|
|
191 |
<div class="upgrade">
|
192 |
<div class="block">
|
193 |
<a href="https://strongtestimonials.com/pricing/?utm_source=welcome_banner&utm_medium=upgradenow&utm_campaign=welcome_banner" target="_blank"
|
admin/admin-notices.php
CHANGED
@@ -55,7 +55,7 @@ add_action( 'admin_notices', 'wpmtst_admin_notices' );
|
|
55 |
*
|
56 |
* @return string
|
57 |
*/
|
58 |
-
function wpmtst_admin_notice_text( $html
|
59 |
|
60 |
switch ( $key ) {
|
61 |
case 'defaults-restored' :
|
@@ -63,7 +63,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
|
|
63 |
?>
|
64 |
<div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
|
65 |
<p>
|
66 |
-
<?php
|
67 |
</p>
|
68 |
</div>
|
69 |
<?php
|
@@ -75,7 +75,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
|
|
75 |
?>
|
76 |
<div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
|
77 |
<p>
|
78 |
-
<?php
|
79 |
</p>
|
80 |
</div>
|
81 |
<?php
|
@@ -87,7 +87,7 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
|
|
87 |
?>
|
88 |
<div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
|
89 |
<p>
|
90 |
-
<?php
|
91 |
</p>
|
92 |
</div>
|
93 |
<?php
|
@@ -98,14 +98,14 @@ function wpmtst_admin_notice_text( $html = '', $key, $persist = false ) {
|
|
98 |
$tags = array( 'a' => array( 'class' => array(), 'href' => array() ) );
|
99 |
//$settings_url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-settings&tab=form#captcha-section' );
|
100 |
$settings_url = admin_url( '?action=captcha-options-changed' );
|
101 |
-
$settings_link = sprintf( wp_kses( __( 'Please check your <a href="%s">%s</a>.', 'strong-testimonials' ), $tags ), esc_url( $settings_url ),
|
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; ?>
|
109 |
</p>
|
110 |
</div>
|
111 |
<?php
|
@@ -145,8 +145,10 @@ function wpmtst_add_admin_notice( $key, $persist = false ) {
|
|
145 |
*/
|
146 |
function wpmtst_delete_admin_notice( $key ) {
|
147 |
$notices = get_option( 'wpmtst_admin_notices', array() );
|
148 |
-
|
149 |
-
|
|
|
|
|
150 |
}
|
151 |
|
152 |
|
55 |
*
|
56 |
* @return string
|
57 |
*/
|
58 |
+
function wpmtst_admin_notice_text( $html, $key, $persist = false ) {
|
59 |
|
60 |
switch ( $key ) {
|
61 |
case 'defaults-restored' :
|
63 |
?>
|
64 |
<div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
|
65 |
<p>
|
66 |
+
<?php esc_html_e( 'Defaults restored.', 'strong-testimonials' ); ?>
|
67 |
</p>
|
68 |
</div>
|
69 |
<?php
|
75 |
?>
|
76 |
<div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
|
77 |
<p>
|
78 |
+
<?php esc_html_e( 'Fields saved.', 'strong-testimonials' ); ?>
|
79 |
</p>
|
80 |
</div>
|
81 |
<?php
|
87 |
?>
|
88 |
<div class="wpmtst notice notice-success is-dismissible" data-key="<?php echo esc_attr( $key ); ?>">
|
89 |
<p>
|
90 |
+
<?php esc_html_e( 'Changes cancelled.', 'strong-testimonials' ); ?>
|
91 |
</p>
|
92 |
</div>
|
93 |
<?php
|
98 |
$tags = array( 'a' => array( 'class' => array(), 'href' => array() ) );
|
99 |
//$settings_url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-settings&tab=form#captcha-section' );
|
100 |
$settings_url = admin_url( '?action=captcha-options-changed' );
|
101 |
+
$settings_link = sprintf( wp_kses( __( 'Please check your <a href="%s">%s</a>.', 'strong-testimonials' ), $tags ), esc_url( $settings_url ), esc_html__( 'settings', 'strong-testimonials' ) );
|
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 esc_url( $settings_link ); ?>
|
109 |
</p>
|
110 |
</div>
|
111 |
<?php
|
145 |
*/
|
146 |
function wpmtst_delete_admin_notice( $key ) {
|
147 |
$notices = get_option( 'wpmtst_admin_notices', array() );
|
148 |
+
if ( isset( $notices[ $key ] ) ) {
|
149 |
+
unset( $notices[ $key ] );
|
150 |
+
update_option( 'wpmtst_admin_notices', $notices, 'no' );
|
151 |
+
}
|
152 |
}
|
153 |
|
154 |
|
admin/admin.php
CHANGED
@@ -17,10 +17,10 @@ function wpmtst_version_check() {
|
|
17 |
if ( version_compare( $wp_version, $require_wp_version ) == -1 ) {
|
18 |
deactivate_plugins( WPMTST_PLUGIN );
|
19 |
/* translators: %s is the name of the plugin. */
|
20 |
-
$message = '<h2>' . sprintf(
|
21 |
/* translators: %s is a WordPress version number. */
|
22 |
$message .= '<p>' . sprintf( _x( 'This plugin requires <strong>WordPress %s</strong> or higher so it has been deactivated.', 'installation', 'strong-testimonials' ), $require_wp_version ) . '</p>';
|
23 |
-
$message .= '<p>' .
|
24 |
$message .= '<p>' . sprintf( _x( 'Back to the WordPress <a href="%s">Plugins page</a>', 'installation', 'strong-testimonials' ), get_admin_url( null, 'plugins.php' ) ) . '</p>';
|
25 |
wp_die( $message );
|
26 |
}
|
@@ -65,7 +65,8 @@ function wpmtst_admin_init() {
|
|
65 |
* @since 1.18.4
|
66 |
*/
|
67 |
if ( isset( $_REQUEST['action'] ) && '' != $_REQUEST['action'] ) {
|
68 |
-
|
|
|
69 |
}
|
70 |
}
|
71 |
|
@@ -160,9 +161,9 @@ function wpmtst_restore_default_icon( $for ) {
|
|
160 |
if ( !$for ) return;
|
161 |
?>
|
162 |
<input type="button" class="button secondary restore-default"
|
163 |
-
title="<?php
|
164 |
value=""
|
165 |
-
data-for="<?php echo $for; ?>"/>
|
166 |
<?php
|
167 |
}
|
168 |
|
17 |
if ( version_compare( $wp_version, $require_wp_version ) == -1 ) {
|
18 |
deactivate_plugins( WPMTST_PLUGIN );
|
19 |
/* translators: %s is the name of the plugin. */
|
20 |
+
$message = '<h2>' . sprintf( esc_html_x( 'Unable to load %s', 'installation', 'strong-testimonials' ), 'Strong Testimonials' ) . '</h2>';
|
21 |
/* translators: %s is a WordPress version number. */
|
22 |
$message .= '<p>' . sprintf( _x( 'This plugin requires <strong>WordPress %s</strong> or higher so it has been deactivated.', 'installation', 'strong-testimonials' ), $require_wp_version ) . '</p>';
|
23 |
+
$message .= '<p>' . esc_html_x( 'Please upgrade WordPress and try again.', 'installation', 'strong-testimonials' ) . '</p>';
|
24 |
$message .= '<p>' . sprintf( _x( 'Back to the WordPress <a href="%s">Plugins page</a>', 'installation', 'strong-testimonials' ), get_admin_url( null, 'plugins.php' ) ) . '</p>';
|
25 |
wp_die( $message );
|
26 |
}
|
65 |
* @since 1.18.4
|
66 |
*/
|
67 |
if ( isset( $_REQUEST['action'] ) && '' != $_REQUEST['action'] ) {
|
68 |
+
$action = sanitize_text_field( $_REQUEST['action'] );
|
69 |
+
do_action( 'wpmtst_' . $action );
|
70 |
}
|
71 |
}
|
72 |
|
161 |
if ( !$for ) return;
|
162 |
?>
|
163 |
<input type="button" class="button secondary restore-default"
|
164 |
+
title="<?php esc_html_e( 'restore default', 'strong-testimonials' ); ?>"
|
165 |
value=""
|
166 |
+
data-for="<?php echo esc_attr( $for ); ?>"/>
|
167 |
<?php
|
168 |
}
|
169 |
|
admin/class-strong-testimonials-addons.php
CHANGED
@@ -87,8 +87,8 @@ class Strong_Testimonials_Addons {
|
|
87 |
*/
|
88 |
public function get_submenu() {
|
89 |
return array(
|
90 |
-
'page_title' =>
|
91 |
-
'menu_title' =>
|
92 |
'capability' => 'strong_testimonials_options',
|
93 |
'menu_slug' => 'strong-testimonials-addons',
|
94 |
'function' => array( $this, 'addons_page' ),
|
87 |
*/
|
88 |
public function get_submenu() {
|
89 |
return array(
|
90 |
+
'page_title' => esc_html__( 'Extensions', 'strong-testimonials' ),
|
91 |
+
'menu_title' => esc_html__( 'Extensions', 'strong-testimonials' ),
|
92 |
'capability' => 'strong_testimonials_options',
|
93 |
'menu_slug' => 'strong-testimonials-addons',
|
94 |
'function' => array( $this, 'addons_page' ),
|
admin/class-strong-testimonials-admin-category-list.php
CHANGED
@@ -36,10 +36,10 @@ class Strong_Testimonials_Admin_Category_List {
|
|
36 |
public static function manage_categories( $columns ) {
|
37 |
$new_columns = array(
|
38 |
'cb' => '<input type="checkbox">',
|
39 |
-
'ID' =>
|
40 |
-
'name' =>
|
41 |
-
'slug' =>
|
42 |
-
'posts' =>
|
43 |
);
|
44 |
|
45 |
return $new_columns;
|
36 |
public static function manage_categories( $columns ) {
|
37 |
$new_columns = array(
|
38 |
'cb' => '<input type="checkbox">',
|
39 |
+
'ID' => esc_html__( 'ID', 'strong-testimonials' ),
|
40 |
+
'name' => esc_html__( 'Name', 'strong-testimonials' ),
|
41 |
+
'slug' => esc_html__( 'Slug', 'strong-testimonials' ),
|
42 |
+
'posts' => esc_html__( 'Posts', 'strong-testimonials' ),
|
43 |
);
|
44 |
|
45 |
return $new_columns;
|
admin/class-strong-testimonials-admin-list.php
CHANGED
@@ -93,7 +93,7 @@ class Strong_Testimonials_Admin_List {
|
|
93 |
// 3. insert [excerpt] after [title]
|
94 |
$key = 'title';
|
95 |
$offset = array_search( $key, array_keys( $columns ) ) + 1;
|
96 |
-
$fields_to_add = array( 'post_excerpt' =>
|
97 |
|
98 |
// 4. add custom fields
|
99 |
foreach ( $fields as $key => $field ) {
|
@@ -103,9 +103,9 @@ class Strong_Testimonials_Admin_List {
|
|
103 |
if ( 'post_title' == $field['name'] ) {
|
104 |
continue;
|
105 |
} elseif ( 'featured_image' == $field['name'] ) {
|
106 |
-
$fields_to_add['strong_thumbnail'] =
|
107 |
} elseif ( 'rating' == $field['input_type'] ) {
|
108 |
-
$fields_to_add[ $field['name'] ] =
|
109 |
} else {
|
110 |
$fields_to_add[ $field['name'] ] = apply_filters( 'wpmtst_l10n', $field['label'], 'strong-testimonials-form-fields', $field['name'] . ' : label' );
|
111 |
}
|
@@ -117,18 +117,18 @@ class Strong_Testimonials_Admin_List {
|
|
117 |
// 5. add [category], [comments] and [date]
|
118 |
// The slug "categories" slug is reserved by WordPress.
|
119 |
if ( wpmtst_get_cat_count() ) {
|
120 |
-
$fields_to_add['category'] =
|
121 |
}
|
122 |
|
123 |
if ( $comments ) {
|
124 |
$fields_to_add['comments'] = $comments;
|
125 |
}
|
126 |
|
127 |
-
$fields_to_add['date'] =
|
128 |
|
129 |
$options = get_option( 'wpmtst_options' );
|
130 |
if ( isset( $options['include_platform'] ) && $options['include_platform'] === true ) {
|
131 |
-
$fields_to_add['platform'] =
|
132 |
}
|
133 |
|
134 |
// Push other added columns like [search_exclude] to the end.
|
@@ -152,7 +152,7 @@ class Strong_Testimonials_Admin_List {
|
|
152 |
switch ( $column ) {
|
153 |
|
154 |
case 'post_id' :
|
155 |
-
echo $post->ID;
|
156 |
break;
|
157 |
|
158 |
case 'post_content' :
|
@@ -241,7 +241,7 @@ class Strong_Testimonials_Admin_List {
|
|
241 |
* @return array
|
242 |
*/
|
243 |
public static function add_thumbnail_column( $columns ) {
|
244 |
-
$columns['strong_thumbnail'] =
|
245 |
|
246 |
return $columns;
|
247 |
}
|
@@ -291,7 +291,7 @@ class Strong_Testimonials_Admin_List {
|
|
291 |
'child_of' => 0,
|
292 |
'exclude' => '',
|
293 |
'echo' => 1,
|
294 |
-
'selected' => isset( $_GET[ $tax ] ) ? $_GET[ $tax ] : '',
|
295 |
'hierarchical' => 1,
|
296 |
'name' => $tax,
|
297 |
'id' => $tax,
|
93 |
// 3. insert [excerpt] after [title]
|
94 |
$key = 'title';
|
95 |
$offset = array_search( $key, array_keys( $columns ) ) + 1;
|
96 |
+
$fields_to_add = array( 'post_excerpt' => esc_html__( 'Excerpt', 'strong-testimonials' ) );
|
97 |
|
98 |
// 4. add custom fields
|
99 |
foreach ( $fields as $key => $field ) {
|
103 |
if ( 'post_title' == $field['name'] ) {
|
104 |
continue;
|
105 |
} elseif ( 'featured_image' == $field['name'] ) {
|
106 |
+
$fields_to_add['strong_thumbnail'] = esc_html__( 'Thumbnail', 'strong-testimonials' );
|
107 |
} elseif ( 'rating' == $field['input_type'] ) {
|
108 |
+
$fields_to_add[ $field['name'] ] = esc_html__( 'Rating', 'strong-testimonials' );
|
109 |
} else {
|
110 |
$fields_to_add[ $field['name'] ] = apply_filters( 'wpmtst_l10n', $field['label'], 'strong-testimonials-form-fields', $field['name'] . ' : label' );
|
111 |
}
|
117 |
// 5. add [category], [comments] and [date]
|
118 |
// The slug "categories" slug is reserved by WordPress.
|
119 |
if ( wpmtst_get_cat_count() ) {
|
120 |
+
$fields_to_add['category'] = esc_html__( 'Categories', 'strong-testimonials' );
|
121 |
}
|
122 |
|
123 |
if ( $comments ) {
|
124 |
$fields_to_add['comments'] = $comments;
|
125 |
}
|
126 |
|
127 |
+
$fields_to_add['date'] = esc_html__( 'Date', 'strong-testimonials' );
|
128 |
|
129 |
$options = get_option( 'wpmtst_options' );
|
130 |
if ( isset( $options['include_platform'] ) && $options['include_platform'] === true ) {
|
131 |
+
$fields_to_add['platform'] = esc_html__( 'Platform', 'strong-testimonials' );
|
132 |
}
|
133 |
|
134 |
// Push other added columns like [search_exclude] to the end.
|
152 |
switch ( $column ) {
|
153 |
|
154 |
case 'post_id' :
|
155 |
+
echo absint( $post->ID );
|
156 |
break;
|
157 |
|
158 |
case 'post_content' :
|
241 |
* @return array
|
242 |
*/
|
243 |
public static function add_thumbnail_column( $columns ) {
|
244 |
+
$columns['strong_thumbnail'] = esc_html__( 'Thumbnail', 'strong-testimonials' );
|
245 |
|
246 |
return $columns;
|
247 |
}
|
291 |
'child_of' => 0,
|
292 |
'exclude' => '',
|
293 |
'echo' => 1,
|
294 |
+
'selected' => isset( $_GET[ $tax ] ) ? sanitize_text_field( $_GET[ $tax ] ) : '',
|
295 |
'hierarchical' => 1,
|
296 |
'name' => $tax,
|
297 |
'id' => $tax,
|
admin/class-strong-testimonials-admin-scripts.php
CHANGED
@@ -143,9 +143,9 @@ class Strong_Testimonials_Admin_Scripts {
|
|
143 |
|
144 |
$params = array(
|
145 |
'ajax_nonce' => wp_create_nonce( 'wpmtst-admin' ),
|
146 |
-
'newField' =>
|
147 |
-
'inUse' =>
|
148 |
-
'noneFound' =>
|
149 |
);
|
150 |
wp_localize_script( 'wpmtst-admin-fields-script', 'wpmtstAdmin', $params );
|
151 |
|
@@ -214,9 +214,9 @@ class Strong_Testimonials_Admin_Scripts {
|
|
214 |
|
215 |
$params = array(
|
216 |
'ajax_nonce' => wp_create_nonce( 'wpmtst-admin' ),
|
217 |
-
'requiredField' =>
|
218 |
-
'errorMessage' =>
|
219 |
-
'restoreDefault' =>
|
220 |
);
|
221 |
wp_localize_script( 'wpmtst-addons-script', 'strongAddonAdmin', $params );
|
222 |
|
@@ -252,7 +252,7 @@ class Strong_Testimonials_Admin_Scripts {
|
|
252 |
'wpmtst_admin',
|
253 |
array(
|
254 |
'nonce' => wp_create_nonce( 'wpmtst-admin' ),
|
255 |
-
'templateTagTitle' =>
|
256 |
)
|
257 |
);
|
258 |
|
@@ -287,28 +287,28 @@ class Strong_Testimonials_Admin_Scripts {
|
|
287 |
* Fields
|
288 |
*/
|
289 |
public static function admin_fields() {
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
case 'form':
|
296 |
wp_enqueue_style( 'wpmtst-admin-form-style' );
|
297 |
wp_enqueue_script( 'wpmtst-admin-form-script' );
|
298 |
break;
|
299 |
case 'fields':
|
300 |
-
|
301 |
-
|
302 |
|
303 |
-
|
304 |
-
|
305 |
break;
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
|
310 |
-
|
311 |
-
|
312 |
}
|
313 |
}
|
314 |
|
@@ -316,7 +316,7 @@ class Strong_Testimonials_Admin_Scripts {
|
|
316 |
* Settings
|
317 |
*/
|
318 |
public static function admin_settings() {
|
319 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
|
320 |
|
321 |
switch ( $tab ) {
|
322 |
case 'compat':
|
143 |
|
144 |
$params = array(
|
145 |
'ajax_nonce' => wp_create_nonce( 'wpmtst-admin' ),
|
146 |
+
'newField' => esc_html_x( 'New Field', 'Field editor: The default label for new fields', 'strong-testimonials' ),
|
147 |
+
'inUse' => esc_html_x( '(in use)', 'Fields editor: To indicate when a field type can only be used once.', 'strong-testimonials' ),
|
148 |
+
'noneFound' => esc_html_x( '(none found)', 'Fields editor: To indicate when no categories have been found.', 'strong-testimonials' ),
|
149 |
);
|
150 |
wp_localize_script( 'wpmtst-admin-fields-script', 'wpmtstAdmin', $params );
|
151 |
|
214 |
|
215 |
$params = array(
|
216 |
'ajax_nonce' => wp_create_nonce( 'wpmtst-admin' ),
|
217 |
+
'requiredField' => esc_html( 'This field is required.', 'strong-testimonials' ),
|
218 |
+
'errorMessage' => esc_html__( 'An error occurred, please try again.', 'strong-testimonials' ),
|
219 |
+
'restoreDefault' => esc_html__( 'Restore the default settings?', 'strong-testimonials' ),
|
220 |
);
|
221 |
wp_localize_script( 'wpmtst-addons-script', 'strongAddonAdmin', $params );
|
222 |
|
252 |
'wpmtst_admin',
|
253 |
array(
|
254 |
'nonce' => wp_create_nonce( 'wpmtst-admin' ),
|
255 |
+
'templateTagTitle' => esc_html__( 'click to insert into message at caret', 'strong-testimonials' ),
|
256 |
)
|
257 |
);
|
258 |
|
287 |
* Fields
|
288 |
*/
|
289 |
public static function admin_fields() {
|
290 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : '';
|
291 |
+
wp_enqueue_style( 'wpmtst-admin-style' );
|
292 |
+
wp_enqueue_script( 'wpmtst-admin-script' );
|
293 |
+
|
294 |
+
switch ( $tab ) {
|
295 |
case 'form':
|
296 |
wp_enqueue_style( 'wpmtst-admin-form-style' );
|
297 |
wp_enqueue_script( 'wpmtst-admin-form-script' );
|
298 |
break;
|
299 |
case 'fields':
|
300 |
+
wp_enqueue_style( 'wpmtst-admin-fields-style' );
|
301 |
+
wp_enqueue_script( 'wpmtst-admin-fields-script' );
|
302 |
|
303 |
+
wp_enqueue_style( 'wpmtst-admin-form-preview' );
|
304 |
+
wp_enqueue_style( 'wpmtst-rating-form' );
|
305 |
break;
|
306 |
+
default:
|
307 |
+
wp_enqueue_style( 'wpmtst-admin-fields-style' );
|
308 |
+
wp_enqueue_script( 'wpmtst-admin-fields-script' );
|
309 |
|
310 |
+
wp_enqueue_style( 'wpmtst-admin-form-preview' );
|
311 |
+
wp_enqueue_style( 'wpmtst-rating-form' );
|
312 |
}
|
313 |
}
|
314 |
|
316 |
* Settings
|
317 |
*/
|
318 |
public static function admin_settings() {
|
319 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : '';
|
320 |
|
321 |
switch ( $tab ) {
|
322 |
case 'compat':
|
admin/class-strong-testimonials-defaults.php
CHANGED
@@ -75,7 +75,7 @@ class Strong_Testimonials_Defaults {
|
|
75 |
'default_form_value' => '',
|
76 |
'default_display_value' => '',
|
77 |
'show_default_options' => 1,
|
78 |
-
'error' =>
|
79 |
'placeholder' => '',
|
80 |
'show_placeholder_option' => 1,
|
81 |
'before' => '',
|
@@ -106,7 +106,7 @@ class Strong_Testimonials_Defaults {
|
|
106 |
$field_types['post'] = array(
|
107 |
'post_title' => array(
|
108 |
'input_type' => 'text',
|
109 |
-
'option_label' =>
|
110 |
'map' => 'post_title',
|
111 |
'show_default_options' => 0,
|
112 |
'admin_table' => 1,
|
@@ -117,7 +117,7 @@ class Strong_Testimonials_Defaults {
|
|
117 |
),
|
118 |
'post_content' => array(
|
119 |
'input_type' => 'textarea',
|
120 |
-
'option_label' =>
|
121 |
'map' => 'post_content',
|
122 |
'required' => 1,
|
123 |
'show_default_options' => 0,
|
@@ -129,7 +129,7 @@ class Strong_Testimonials_Defaults {
|
|
129 |
),
|
130 |
'featured_image' => array(
|
131 |
'input_type' => 'file',
|
132 |
-
'option_label' =>
|
133 |
'map' => 'featured_image',
|
134 |
'show_default_options' => 0,
|
135 |
'show_placeholder_option' => 0,
|
@@ -147,21 +147,21 @@ class Strong_Testimonials_Defaults {
|
|
147 |
$field_types['custom'] = array(
|
148 |
'text' => array(
|
149 |
'input_type' => 'text',
|
150 |
-
'option_label' =>
|
151 |
),
|
152 |
'email' => array(
|
153 |
'input_type' => 'email',
|
154 |
-
'option_label' =>
|
155 |
'show_default_options' => 0,
|
156 |
),
|
157 |
'url' => array(
|
158 |
'input_type' => 'url',
|
159 |
-
'option_label' =>
|
160 |
'show_default_options' => 0,
|
161 |
),
|
162 |
'checkbox' => array(
|
163 |
'input_type' => 'checkbox',
|
164 |
-
'option_label' =>
|
165 |
'show_text_option' => 1,
|
166 |
'show_placeholder_option' => 0,
|
167 |
),
|
@@ -179,7 +179,7 @@ class Strong_Testimonials_Defaults {
|
|
179 |
$field_types['optional'] = array(
|
180 |
'category-selector' => array(
|
181 |
'input_type' => 'category-selector',
|
182 |
-
'option_label' =>
|
183 |
'show_default_options' => 0,
|
184 |
'show_placeholder_option' => 0,
|
185 |
'show_admin_table_option' => 0,
|
@@ -187,7 +187,7 @@ class Strong_Testimonials_Defaults {
|
|
187 |
),
|
188 |
'category-checklist' => array(
|
189 |
'input_type' => 'category-checklist',
|
190 |
-
'option_label' =>
|
191 |
'show_default_options' => 0,
|
192 |
'show_placeholder_option' => 0,
|
193 |
'show_admin_table_option' => 0,
|
@@ -195,7 +195,7 @@ class Strong_Testimonials_Defaults {
|
|
195 |
),
|
196 |
'shortcode' => array(
|
197 |
'input_type' => 'shortcode',
|
198 |
-
'option_label' =>
|
199 |
'show_label' => 0,
|
200 |
'required' => 0,
|
201 |
'show_required_option' => 0,
|
@@ -206,7 +206,7 @@ class Strong_Testimonials_Defaults {
|
|
206 |
),
|
207 |
'rating' => array(
|
208 |
'input_type' => 'rating',
|
209 |
-
'option_label' =>
|
210 |
'show_placeholder_option' => 0,
|
211 |
'admin_table' => 1,
|
212 |
'admin_table_option' => 1,
|
@@ -244,7 +244,7 @@ class Strong_Testimonials_Defaults {
|
|
244 |
$forms = array(
|
245 |
'default' => array(
|
246 |
'name' => 'default',
|
247 |
-
'label' =>
|
248 |
'readonly' => 1,
|
249 |
'fields' => array(
|
250 |
// ------
|
@@ -253,33 +253,33 @@ class Strong_Testimonials_Defaults {
|
|
253 |
0 => array(
|
254 |
'record_type' => 'custom',
|
255 |
'name' => 'client_name',
|
256 |
-
'label' =>
|
257 |
'input_type' => 'text',
|
258 |
'required' => 1,
|
259 |
-
'after' =>
|
260 |
'admin_table' => 1,
|
261 |
),
|
262 |
1 => array(
|
263 |
'record_type' => 'custom',
|
264 |
'name' => 'email',
|
265 |
-
'label' =>
|
266 |
'input_type' => 'email',
|
267 |
'required' => 1,
|
268 |
-
'after' =>
|
269 |
),
|
270 |
3 => array(
|
271 |
'record_type' => 'custom',
|
272 |
'name' => 'company_name',
|
273 |
-
'label' =>
|
274 |
'input_type' => 'text',
|
275 |
-
'after' =>
|
276 |
),
|
277 |
4 => array(
|
278 |
'record_type' => 'custom',
|
279 |
'name' => 'company_website',
|
280 |
-
'label' =>
|
281 |
'input_type' => 'url',
|
282 |
-
'after' =>
|
283 |
),
|
284 |
// ----
|
285 |
// POST
|
@@ -287,36 +287,36 @@ class Strong_Testimonials_Defaults {
|
|
287 |
5 => array(
|
288 |
'record_type' => 'post',
|
289 |
'name' => 'post_title',
|
290 |
-
'label' =>
|
291 |
'input_type' => 'text',
|
292 |
'required' => 0,
|
293 |
-
'after' =>
|
294 |
'max_length' => ''
|
295 |
),
|
296 |
6 => array(
|
297 |
'record_type' => 'post',
|
298 |
'name' => 'post_content',
|
299 |
-
'label' =>
|
300 |
'input_type' => 'textarea',
|
301 |
'required' => 1,
|
302 |
-
'after' =>
|
303 |
'max_length' => ''
|
304 |
),
|
305 |
7 => array(
|
306 |
'record_type' => 'post',
|
307 |
'name' => 'featured_image',
|
308 |
-
'label' =>
|
309 |
'input_type' => 'file',
|
310 |
-
'after' =>
|
311 |
'admin_table' => 1,
|
312 |
),
|
313 |
8 => array(
|
314 |
'record_type' => 'optional',
|
315 |
'name' => 'star_rating',
|
316 |
-
'label' =>
|
317 |
'input_type' => 'rating',
|
318 |
'required' => 0,
|
319 |
-
'after' =>
|
320 |
),
|
321 |
),
|
322 |
),
|
@@ -324,7 +324,7 @@ class Strong_Testimonials_Defaults {
|
|
324 |
|
325 |
$forms['minimal'] = array(
|
326 |
'name' => 'minimal',
|
327 |
-
'label' =>
|
328 |
'readonly' => 1,
|
329 |
'fields' => array(
|
330 |
// ------
|
@@ -333,7 +333,7 @@ class Strong_Testimonials_Defaults {
|
|
333 |
0 => array(
|
334 |
'record_type' => 'custom',
|
335 |
'name' => 'client_name',
|
336 |
-
'label' =>
|
337 |
'input_type' => 'text',
|
338 |
'required' => 1,
|
339 |
'after' => '',
|
@@ -342,7 +342,7 @@ class Strong_Testimonials_Defaults {
|
|
342 |
1 => array(
|
343 |
'record_type' => 'custom',
|
344 |
'name' => 'email',
|
345 |
-
'label' =>
|
346 |
'input_type' => 'email',
|
347 |
'required' => 1,
|
348 |
'after' => '',
|
@@ -353,7 +353,7 @@ class Strong_Testimonials_Defaults {
|
|
353 |
2 => array(
|
354 |
'record_type' => 'post',
|
355 |
'name' => 'post_content',
|
356 |
-
'label' =>
|
357 |
'input_type' => 'textarea',
|
358 |
'required' => 1,
|
359 |
'after' => '',
|
@@ -388,7 +388,7 @@ class Strong_Testimonials_Defaults {
|
|
388 |
// Copy default fields to custom fields.
|
389 |
$forms[1] = array(
|
390 |
'name' => 'custom',
|
391 |
-
'label' =>
|
392 |
'readonly' => 0,
|
393 |
'fields' => $base_forms['default']['fields'],
|
394 |
);
|
@@ -411,30 +411,30 @@ class Strong_Testimonials_Defaults {
|
|
411 |
'required-field' => array(
|
412 |
'order' => 1,
|
413 |
/* translators: Settings > Form > Messages tab */
|
414 |
-
'description' =>
|
415 |
-
'text' =>
|
416 |
'enabled' => 1,
|
417 |
),
|
418 |
'form-submit-button' => array(
|
419 |
'order' => 2,
|
420 |
/* translators: Settings > Form > Messages tab */
|
421 |
-
'description' =>
|
422 |
/* translators: Default label for the Submit button on testimonial form. */
|
423 |
-
'text' =>
|
424 |
),
|
425 |
'submission-error' => array(
|
426 |
'order' => 3,
|
427 |
/* translators: Settings > Form > Messages tab */
|
428 |
-
'description' =>
|
429 |
/* translators: Default message for submission form error. */
|
430 |
-
'text' =>
|
431 |
),
|
432 |
'submission-success' => array(
|
433 |
'order' => 4,
|
434 |
/* translators: Settings > Form > Messages tab */
|
435 |
-
'description' =>
|
436 |
/* translators: Default message for submission form success message. */
|
437 |
-
'text' =>
|
438 |
),
|
439 |
);
|
440 |
|
@@ -468,13 +468,13 @@ class Strong_Testimonials_Defaults {
|
|
468 |
'admin_email' => '',
|
469 |
),
|
470 |
/* translators: Default subject line for new testimonial notification email. */
|
471 |
-
'email_subject' =>
|
472 |
-
'customer_approval_email_subject' =>
|
473 |
-
'customer_email_subject' =>
|
474 |
/* translators: Default message for new testimonial notification email. */
|
475 |
-
'email_message' =>
|
476 |
-
'customer_approval_email_message' =>
|
477 |
-
'customer_email_message' =>
|
478 |
'messages' => $default_messages,
|
479 |
'scrolltop_success' => true,
|
480 |
'scrolltop_success_offset' => 80,
|
@@ -484,9 +484,9 @@ class Strong_Testimonials_Defaults {
|
|
484 |
'success_redirect_id' => '',
|
485 |
'success_redirect_url' => '',
|
486 |
'members_only' => false,
|
487 |
-
'members_only_message' =>
|
488 |
'mailchimp' => false,
|
489 |
-
'mailchimp_message' =>
|
490 |
'mailchimp_list' => ''
|
491 |
);
|
492 |
|
@@ -506,49 +506,49 @@ class Strong_Testimonials_Defaults {
|
|
506 |
'mode' => array(
|
507 |
'display' => array(
|
508 |
'name' => 'display',
|
509 |
-
'label' =>
|
510 |
-
'description' =>
|
511 |
),
|
512 |
'slideshow' => array(
|
513 |
'name' => 'slideshow',
|
514 |
-
'label' =>
|
515 |
-
'description' =>
|
516 |
),
|
517 |
'form' => array(
|
518 |
'name' => 'form',
|
519 |
-
'label' =>
|
520 |
-
'description' =>
|
521 |
),
|
522 |
'single_template' => array(
|
523 |
'name' => 'single_template',
|
524 |
-
'label' =>
|
525 |
-
'description' =>
|
526 |
),
|
527 |
),
|
528 |
|
529 |
'order' => array(
|
530 |
-
'random' =>
|
531 |
-
'menu_order' =>
|
532 |
-
'newest' =>
|
533 |
-
'oldest' =>
|
534 |
),
|
535 |
|
536 |
'slideshow_effect' => array(
|
537 |
-
'none' =>
|
538 |
-
'fade' =>
|
539 |
-
'horizontal' =>
|
540 |
-
'vertical' =>
|
541 |
),
|
542 |
|
543 |
'slideshow_height' => array(
|
544 |
-
'dynamic' =>
|
545 |
-
'static' =>
|
546 |
),
|
547 |
|
548 |
'slideshow_nav_method' => array(
|
549 |
'controls' => array(
|
550 |
'none' => array(
|
551 |
-
'label' =>
|
552 |
'args' => array( // base args; style will add more args
|
553 |
'controls' => 0,
|
554 |
'pager' => 0,
|
@@ -556,7 +556,7 @@ class Strong_Testimonials_Defaults {
|
|
556 |
),
|
557 |
),
|
558 |
'full' => array(
|
559 |
-
'label' =>
|
560 |
'class' => 'controls-type-full',
|
561 |
'add_position_class' => 1,
|
562 |
'args' => array(
|
@@ -568,7 +568,7 @@ class Strong_Testimonials_Defaults {
|
|
568 |
),
|
569 |
),
|
570 |
'simple' => array(
|
571 |
-
'label' =>
|
572 |
'class' => 'controls-type-simple',
|
573 |
'add_position_class' => 1,
|
574 |
'args' => array(
|
@@ -577,7 +577,7 @@ class Strong_Testimonials_Defaults {
|
|
577 |
),
|
578 |
),
|
579 |
'sides' => array(
|
580 |
-
'label' =>
|
581 |
'class' => 'controls-type-sides',
|
582 |
'add_position_class' => 0,
|
583 |
'args' => array(
|
@@ -590,11 +590,11 @@ class Strong_Testimonials_Defaults {
|
|
590 |
),
|
591 |
'pager' => array(
|
592 |
'none' => array(
|
593 |
-
'label' =>
|
594 |
'args' => array(),
|
595 |
),
|
596 |
'full' => array(
|
597 |
-
'label' =>
|
598 |
//'class' => 'controls-pager-full',
|
599 |
'class' => 'pager-type-full',
|
600 |
'args' => array(
|
@@ -607,7 +607,7 @@ class Strong_Testimonials_Defaults {
|
|
607 |
'slideshow_nav_style' => array(
|
608 |
'controls' => array(
|
609 |
'buttons' => array(
|
610 |
-
'label' =>
|
611 |
'class' => 'controls-style-buttons',
|
612 |
'args' => array(
|
613 |
'startText' => '',
|
@@ -617,7 +617,7 @@ class Strong_Testimonials_Defaults {
|
|
617 |
),
|
618 |
),
|
619 |
'buttons2' => array(
|
620 |
-
'label' =>
|
621 |
'class' => 'controls-style-buttons2',
|
622 |
'args' => array(
|
623 |
'startText' => '',
|
@@ -627,7 +627,7 @@ class Strong_Testimonials_Defaults {
|
|
627 |
),
|
628 |
),
|
629 |
'buttons3' => array(
|
630 |
-
'label' =>
|
631 |
'class' => 'controls-style-buttons3',
|
632 |
'args' => array(
|
633 |
'startText' => '',
|
@@ -637,19 +637,19 @@ class Strong_Testimonials_Defaults {
|
|
637 |
),
|
638 |
),
|
639 |
'text' => array(
|
640 |
-
'label' =>
|
641 |
'class' => 'controls-style-text',
|
642 |
'args' => array(
|
643 |
-
'startText' =>
|
644 |
-
'stopText' =>
|
645 |
-
'prevText' =>
|
646 |
-
'nextText' =>
|
647 |
),
|
648 |
),
|
649 |
),
|
650 |
'pager' => array(
|
651 |
'buttons' => array(
|
652 |
-
'label' =>
|
653 |
'class' => 'pager-style-buttons',
|
654 |
'args' => array(
|
655 |
'buildPager' => 'icons',
|
@@ -657,7 +657,7 @@ class Strong_Testimonials_Defaults {
|
|
657 |
),
|
658 |
),
|
659 |
'text' => array(
|
660 |
-
'label' =>
|
661 |
'class' => 'pager-style-text',
|
662 |
'args' => array(
|
663 |
'buildPager' => null,
|
@@ -669,8 +669,8 @@ class Strong_Testimonials_Defaults {
|
|
669 |
|
670 |
// Position is shared by Controls and Pagination.
|
671 |
'slideshow_nav_position' => array(
|
672 |
-
'inside' =>
|
673 |
-
'outside' =>
|
674 |
),
|
675 |
);
|
676 |
|
@@ -736,14 +736,14 @@ class Strong_Testimonials_Defaults {
|
|
736 |
'more_full_post' => false,
|
737 |
'more_post' => true,
|
738 |
'more_post_ellipsis' => true,
|
739 |
-
'more_post_text' =>
|
740 |
'more_post_in_place' => false,
|
741 |
'less_post' => false,
|
742 |
-
'less_post_text' =>
|
743 |
'more_page' => false,
|
744 |
'more_page_hook' => 'wpmtst_view_footer',
|
745 |
'more_page_id' => 0,
|
746 |
-
'more_page_text' =>
|
747 |
'note' => '',
|
748 |
'order' => 'oldest',
|
749 |
'page' => '',
|
@@ -756,8 +756,8 @@ class Strong_Testimonials_Defaults {
|
|
756 |
'end_size' => 1,
|
757 |
'mid_size' => 2,
|
758 |
'prev_next' => 1,
|
759 |
-
'prev_text' =>
|
760 |
-
'next_text' =>
|
761 |
'before_page_number' => '',
|
762 |
'after_page_number' => '',
|
763 |
),
|
75 |
'default_form_value' => '',
|
76 |
'default_display_value' => '',
|
77 |
'show_default_options' => 1,
|
78 |
+
'error' => esc_html__( 'This field is required.', 'strong-testimonials' ),
|
79 |
'placeholder' => '',
|
80 |
'show_placeholder_option' => 1,
|
81 |
'before' => '',
|
106 |
$field_types['post'] = array(
|
107 |
'post_title' => array(
|
108 |
'input_type' => 'text',
|
109 |
+
'option_label' => esc_html__( 'Testimonial Title', 'strong-testimonials' ),
|
110 |
'map' => 'post_title',
|
111 |
'show_default_options' => 0,
|
112 |
'admin_table' => 1,
|
117 |
),
|
118 |
'post_content' => array(
|
119 |
'input_type' => 'textarea',
|
120 |
+
'option_label' => esc_html__( 'Testimonial Content', 'strong-testimonials' ),
|
121 |
'map' => 'post_content',
|
122 |
'required' => 1,
|
123 |
'show_default_options' => 0,
|
129 |
),
|
130 |
'featured_image' => array(
|
131 |
'input_type' => 'file',
|
132 |
+
'option_label' => esc_html__( 'Featured Image', 'strong-testimonials' ),
|
133 |
'map' => 'featured_image',
|
134 |
'show_default_options' => 0,
|
135 |
'show_placeholder_option' => 0,
|
147 |
$field_types['custom'] = array(
|
148 |
'text' => array(
|
149 |
'input_type' => 'text',
|
150 |
+
'option_label' => esc_html__( 'text', 'strong-testimonials' ),
|
151 |
),
|
152 |
'email' => array(
|
153 |
'input_type' => 'email',
|
154 |
+
'option_label' => esc_html__( 'email', 'strong-testimonials' ),
|
155 |
'show_default_options' => 0,
|
156 |
),
|
157 |
'url' => array(
|
158 |
'input_type' => 'url',
|
159 |
+
'option_label' => esc_html__( 'URL', 'strong-testimonials' ),
|
160 |
'show_default_options' => 0,
|
161 |
),
|
162 |
'checkbox' => array(
|
163 |
'input_type' => 'checkbox',
|
164 |
+
'option_label' => esc_html__( 'checkbox', 'strong-testimonials' ),
|
165 |
'show_text_option' => 1,
|
166 |
'show_placeholder_option' => 0,
|
167 |
),
|
179 |
$field_types['optional'] = array(
|
180 |
'category-selector' => array(
|
181 |
'input_type' => 'category-selector',
|
182 |
+
'option_label' => esc_html__( 'category selector', 'strong-testimonials' ),
|
183 |
'show_default_options' => 0,
|
184 |
'show_placeholder_option' => 0,
|
185 |
'show_admin_table_option' => 0,
|
187 |
),
|
188 |
'category-checklist' => array(
|
189 |
'input_type' => 'category-checklist',
|
190 |
+
'option_label' => esc_html__( 'category checklist', 'strong-testimonials' ),
|
191 |
'show_default_options' => 0,
|
192 |
'show_placeholder_option' => 0,
|
193 |
'show_admin_table_option' => 0,
|
195 |
),
|
196 |
'shortcode' => array(
|
197 |
'input_type' => 'shortcode',
|
198 |
+
'option_label' => esc_html__( 'shortcode', 'strong-testimonials' ),
|
199 |
'show_label' => 0,
|
200 |
'required' => 0,
|
201 |
'show_required_option' => 0,
|
206 |
),
|
207 |
'rating' => array(
|
208 |
'input_type' => 'rating',
|
209 |
+
'option_label' => esc_html__( 'star rating', 'strong-testimonials' ),
|
210 |
'show_placeholder_option' => 0,
|
211 |
'admin_table' => 1,
|
212 |
'admin_table_option' => 1,
|
244 |
$forms = array(
|
245 |
'default' => array(
|
246 |
'name' => 'default',
|
247 |
+
'label' => esc_html__( 'Default Form', 'strong-testimonials' ),
|
248 |
'readonly' => 1,
|
249 |
'fields' => array(
|
250 |
// ------
|
253 |
0 => array(
|
254 |
'record_type' => 'custom',
|
255 |
'name' => 'client_name',
|
256 |
+
'label' => esc_html__( 'Full Name', 'strong-testimonials' ),
|
257 |
'input_type' => 'text',
|
258 |
'required' => 1,
|
259 |
+
'after' => esc_html__( 'What is your full name?', 'strong-testimonials' ),
|
260 |
'admin_table' => 1,
|
261 |
),
|
262 |
1 => array(
|
263 |
'record_type' => 'custom',
|
264 |
'name' => 'email',
|
265 |
+
'label' => esc_html__( 'Email', 'strong-testimonials' ),
|
266 |
'input_type' => 'email',
|
267 |
'required' => 1,
|
268 |
+
'after' => esc_html__( 'What is your email address?', 'strong-testimonials' ),
|
269 |
),
|
270 |
3 => array(
|
271 |
'record_type' => 'custom',
|
272 |
'name' => 'company_name',
|
273 |
+
'label' => esc_html__( 'Company Name', 'strong-testimonials' ),
|
274 |
'input_type' => 'text',
|
275 |
+
'after' => esc_html__( 'What is your company name?', 'strong-testimonials' ),
|
276 |
),
|
277 |
4 => array(
|
278 |
'record_type' => 'custom',
|
279 |
'name' => 'company_website',
|
280 |
+
'label' => esc_html__( 'Company Website', 'strong-testimonials' ),
|
281 |
'input_type' => 'url',
|
282 |
+
'after' => esc_html__( 'Does your company have a website?', 'strong-testimonials' ),
|
283 |
),
|
284 |
// ----
|
285 |
// POST
|
287 |
5 => array(
|
288 |
'record_type' => 'post',
|
289 |
'name' => 'post_title',
|
290 |
+
'label' => esc_html__( 'Heading', 'strong-testimonials' ),
|
291 |
'input_type' => 'text',
|
292 |
'required' => 0,
|
293 |
+
'after' => esc_html__( 'A headline for your testimonial.', 'strong-testimonials' ),
|
294 |
'max_length' => ''
|
295 |
),
|
296 |
6 => array(
|
297 |
'record_type' => 'post',
|
298 |
'name' => 'post_content',
|
299 |
+
'label' => esc_html__( 'Testimonial', 'strong-testimonials' ),
|
300 |
'input_type' => 'textarea',
|
301 |
'required' => 1,
|
302 |
+
'after' => esc_html__( 'What do you think about us?', 'strong-testimonials' ),
|
303 |
'max_length' => ''
|
304 |
),
|
305 |
7 => array(
|
306 |
'record_type' => 'post',
|
307 |
'name' => 'featured_image',
|
308 |
+
'label' => esc_html__( 'Photo', 'strong-testimonials' ),
|
309 |
'input_type' => 'file',
|
310 |
+
'after' => esc_html__( 'Would you like to include a photo?', 'strong-testimonials' ),
|
311 |
'admin_table' => 1,
|
312 |
),
|
313 |
8 => array(
|
314 |
'record_type' => 'optional',
|
315 |
'name' => 'star_rating',
|
316 |
+
'label' => esc_html__( 'Star rating', 'strong-testimonials' ),
|
317 |
'input_type' => 'rating',
|
318 |
'required' => 0,
|
319 |
+
'after' => esc_html__( 'Would you like to include star rating?', 'strong-testimonials' )
|
320 |
),
|
321 |
),
|
322 |
),
|
324 |
|
325 |
$forms['minimal'] = array(
|
326 |
'name' => 'minimal',
|
327 |
+
'label' => esc_html__( 'Minimal Form', 'strong-testimonials' ),
|
328 |
'readonly' => 1,
|
329 |
'fields' => array(
|
330 |
// ------
|
333 |
0 => array(
|
334 |
'record_type' => 'custom',
|
335 |
'name' => 'client_name',
|
336 |
+
'label' => esc_html__( 'Name', 'strong-testimonials' ),
|
337 |
'input_type' => 'text',
|
338 |
'required' => 1,
|
339 |
'after' => '',
|
342 |
1 => array(
|
343 |
'record_type' => 'custom',
|
344 |
'name' => 'email',
|
345 |
+
'label' => esc_html__( 'Email', 'strong-testimonials' ),
|
346 |
'input_type' => 'email',
|
347 |
'required' => 1,
|
348 |
'after' => '',
|
353 |
2 => array(
|
354 |
'record_type' => 'post',
|
355 |
'name' => 'post_content',
|
356 |
+
'label' => esc_html__( 'Testimonial', 'strong-testimonials' ),
|
357 |
'input_type' => 'textarea',
|
358 |
'required' => 1,
|
359 |
'after' => '',
|
388 |
// Copy default fields to custom fields.
|
389 |
$forms[1] = array(
|
390 |
'name' => 'custom',
|
391 |
+
'label' => esc_html__( 'Custom Form', 'strong-testimonials' ),
|
392 |
'readonly' => 0,
|
393 |
'fields' => $base_forms['default']['fields'],
|
394 |
);
|
411 |
'required-field' => array(
|
412 |
'order' => 1,
|
413 |
/* translators: Settings > Form > Messages tab */
|
414 |
+
'description' => esc_html_x( 'Required', 'setting description', 'strong-testimonials' ),
|
415 |
+
'text' => esc_html_x( 'Required', 'Default message for required notice at top of form.', 'strong-testimonials' ),
|
416 |
'enabled' => 1,
|
417 |
),
|
418 |
'form-submit-button' => array(
|
419 |
'order' => 2,
|
420 |
/* translators: Settings > Form > Messages tab */
|
421 |
+
'description' => esc_html_x( 'Submit Button', 'description', 'strong-testimonials' ),
|
422 |
/* translators: Default label for the Submit button on testimonial form. */
|
423 |
+
'text' => esc_html_x( 'Add Testimonial', 'the Submit button', 'strong-testimonials' ),
|
424 |
),
|
425 |
'submission-error' => array(
|
426 |
'order' => 3,
|
427 |
/* translators: Settings > Form > Messages tab */
|
428 |
+
'description' => esc_html_x( 'Submission Error', 'description', 'strong-testimonials' ),
|
429 |
/* translators: Default message for submission form error. */
|
430 |
+
'text' => esc_html_x( 'There was a problem processing your testimonial.', 'error message', 'strong-testimonials' ),
|
431 |
),
|
432 |
'submission-success' => array(
|
433 |
'order' => 4,
|
434 |
/* translators: Settings > Form > Messages tab */
|
435 |
+
'description' => esc_html_x( 'Submission Success', 'description', 'strong-testimonials' ),
|
436 |
/* translators: Default message for submission form success message. */
|
437 |
+
'text' => esc_html_x( 'Thank you! Your testimonial is waiting to be approved.', 'success message', 'strong-testimonials' ),
|
438 |
),
|
439 |
);
|
440 |
|
468 |
'admin_email' => '',
|
469 |
),
|
470 |
/* translators: Default subject line for new testimonial notification email. */
|
471 |
+
'email_subject' => esc_html__( 'New testimonial for %BLOGNAME%', 'strong-testimonials' ),
|
472 |
+
'customer_approval_email_subject' => esc_html__( 'Testimonial for %BLOGNAME%', 'strong-testimonials' ),
|
473 |
+
'customer_email_subject' => esc_html__( 'Testimonial for %BLOGNAME%', 'strong-testimonials' ),
|
474 |
/* translators: Default message for new testimonial notification email. */
|
475 |
+
'email_message' => esc_html__( 'New testimonial submission for %BLOGNAME%. This is awaiting action from the website administrator.', 'strong-testimonials' ),
|
476 |
+
'customer_approval_email_message' => esc_html__( 'Your testimonial was published for %BLOGNAME%. Thank you!', 'strong-testimonials' ),
|
477 |
+
'customer_email_message' => esc_html__( 'Your testimonial was received for %BLOGNAME% and awaiting approval from the website administrator. Thank you!', 'strong-testimonials' ),
|
478 |
'messages' => $default_messages,
|
479 |
'scrolltop_success' => true,
|
480 |
'scrolltop_success_offset' => 80,
|
484 |
'success_redirect_id' => '',
|
485 |
'success_redirect_url' => '',
|
486 |
'members_only' => false,
|
487 |
+
'members_only_message' => esc_html__( 'You need to be logged in to access this form.', 'strong-testimonials' ),
|
488 |
'mailchimp' => false,
|
489 |
+
'mailchimp_message' => esc_html__( 'Subscribe to our newsletter.', 'strong-testimonials' ),
|
490 |
'mailchimp_list' => ''
|
491 |
);
|
492 |
|
506 |
'mode' => array(
|
507 |
'display' => array(
|
508 |
'name' => 'display',
|
509 |
+
'label' => esc_html__( 'Display', 'strong-testimonials' ),
|
510 |
+
'description' => esc_html__( 'Display your testimonials in a list or a grid.', 'strong-testimonials' ),
|
511 |
),
|
512 |
'slideshow' => array(
|
513 |
'name' => 'slideshow',
|
514 |
+
'label' => esc_html__( 'Slideshow', 'strong-testimonials' ),
|
515 |
+
'description' => esc_html__( 'Create a slideshow of your testimonials.', 'strong-testimonials' ),
|
516 |
),
|
517 |
'form' => array(
|
518 |
'name' => 'form',
|
519 |
+
'label' => esc_html__( 'Form', 'strong-testimonials' ),
|
520 |
+
'description' => esc_html__( 'Display a testimonial submission form.', 'strong-testimonials' ),
|
521 |
),
|
522 |
'single_template' => array(
|
523 |
'name' => 'single_template',
|
524 |
+
'label' => esc_html__( 'Single Template', 'strong-testimonials' ),
|
525 |
+
'description' => esc_html__( 'When viewing the testimonial using a theme\'s single post template.', 'strong-testimonials' ),
|
526 |
),
|
527 |
),
|
528 |
|
529 |
'order' => array(
|
530 |
+
'random' => esc_html_x( 'random', 'display order', 'strong-testimonials' ),
|
531 |
+
'menu_order' => esc_html_x( 'menu order', 'display order', 'strong-testimonials' ),
|
532 |
+
'newest' => esc_html_x( 'newest first', 'display order', 'strong-testimonials' ),
|
533 |
+
'oldest' => esc_html_x( 'oldest first', 'display order', 'strong-testimonials' ),
|
534 |
),
|
535 |
|
536 |
'slideshow_effect' => array(
|
537 |
+
'none' => esc_html_x( 'no transition effect', 'slideshow transition option', 'strong-testimonials' ),
|
538 |
+
'fade' => esc_html_x( 'fade', 'slideshow transition option', 'strong-testimonials' ),
|
539 |
+
'horizontal' => esc_html_x( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ),
|
540 |
+
'vertical' => esc_html_x( 'scroll vertically', 'slideshow transition option', 'strong-testimonials' ),
|
541 |
),
|
542 |
|
543 |
'slideshow_height' => array(
|
544 |
+
'dynamic' => esc_html_x( 'Adjust height for each slide', 'slideshow option', 'strong-testimonials' ),
|
545 |
+
'static' => esc_html_x( 'Set height to match the tallest slide', 'slideshow option', 'strong-testimonials' ),
|
546 |
),
|
547 |
|
548 |
'slideshow_nav_method' => array(
|
549 |
'controls' => array(
|
550 |
'none' => array(
|
551 |
+
'label' => esc_html_x( 'none', 'slideshow controls option', 'strong-testimonials' ),
|
552 |
'args' => array( // base args; style will add more args
|
553 |
'controls' => 0,
|
554 |
'pager' => 0,
|
556 |
),
|
557 |
),
|
558 |
'full' => array(
|
559 |
+
'label' => esc_html_x( 'Bottom: previous / play-pause / next', 'slideshow controls option', 'strong-testimonials' ),
|
560 |
'class' => 'controls-type-full',
|
561 |
'add_position_class' => 1,
|
562 |
'args' => array(
|
568 |
),
|
569 |
),
|
570 |
'simple' => array(
|
571 |
+
'label' => esc_html_x( 'Bottom: previous / next', 'slideshow controls option', 'strong-testimonials' ),
|
572 |
'class' => 'controls-type-simple',
|
573 |
'add_position_class' => 1,
|
574 |
'args' => array(
|
577 |
),
|
578 |
),
|
579 |
'sides' => array(
|
580 |
+
'label' => esc_html_x( 'Sides: previous / next', 'slideshow controls option', 'strong-testimonials' ),
|
581 |
'class' => 'controls-type-sides',
|
582 |
'add_position_class' => 0,
|
583 |
'args' => array(
|
590 |
),
|
591 |
'pager' => array(
|
592 |
'none' => array(
|
593 |
+
'label' => esc_html_x( 'none', 'slideshow navigation option', 'strong-testimonials' ),
|
594 |
'args' => array(),
|
595 |
),
|
596 |
'full' => array(
|
597 |
+
'label' => esc_html_x( 'full', 'slideshow navigation option', 'strong-testimonials' ),
|
598 |
//'class' => 'controls-pager-full',
|
599 |
'class' => 'pager-type-full',
|
600 |
'args' => array(
|
607 |
'slideshow_nav_style' => array(
|
608 |
'controls' => array(
|
609 |
'buttons' => array(
|
610 |
+
'label' => esc_html_x( 'buttons 1', 'slideshow navigation option', 'strong-testimonials' ),
|
611 |
'class' => 'controls-style-buttons',
|
612 |
'args' => array(
|
613 |
'startText' => '',
|
617 |
),
|
618 |
),
|
619 |
'buttons2' => array(
|
620 |
+
'label' => esc_html_x( 'buttons 2', 'slideshow navigation option', 'strong-testimonials' ),
|
621 |
'class' => 'controls-style-buttons2',
|
622 |
'args' => array(
|
623 |
'startText' => '',
|
627 |
),
|
628 |
),
|
629 |
'buttons3' => array(
|
630 |
+
'label' => esc_html_x( 'buttons 3', 'slideshow navigation option', 'strong-testimonials' ),
|
631 |
'class' => 'controls-style-buttons3',
|
632 |
'args' => array(
|
633 |
'startText' => '',
|
637 |
),
|
638 |
),
|
639 |
'text' => array(
|
640 |
+
'label' => esc_html_x( 'text', 'slideshow navigation option', 'strong-testimonials' ),
|
641 |
'class' => 'controls-style-text',
|
642 |
'args' => array(
|
643 |
+
'startText' => esc_html_x( 'Play', 'slideshow control', 'strong-testimonials' ),
|
644 |
+
'stopText' => esc_html_x( 'Pause', 'slideshow control', 'strong-testimonials' ),
|
645 |
+
'prevText' => esc_html_x( 'Previous', 'slideshow_control', 'strong-testimonials' ),
|
646 |
+
'nextText' => esc_html_x( 'Next', 'slideshow_control', 'strong-testimonials' ),
|
647 |
),
|
648 |
),
|
649 |
),
|
650 |
'pager' => array(
|
651 |
'buttons' => array(
|
652 |
+
'label' => esc_html_x( 'buttons', 'slideshow navigation option', 'strong-testimonials' ),
|
653 |
'class' => 'pager-style-buttons',
|
654 |
'args' => array(
|
655 |
'buildPager' => 'icons',
|
657 |
),
|
658 |
),
|
659 |
'text' => array(
|
660 |
+
'label' => esc_html_x( 'text', 'slideshow navigation option', 'strong-testimonials' ),
|
661 |
'class' => 'pager-style-text',
|
662 |
'args' => array(
|
663 |
'buildPager' => null,
|
669 |
|
670 |
// Position is shared by Controls and Pagination.
|
671 |
'slideshow_nav_position' => array(
|
672 |
+
'inside' => esc_html_x( 'inside', 'slideshow navigation option', 'strong-testimonials' ),
|
673 |
+
'outside' => esc_html_x( 'outside', 'slideshow navigation option', 'strong-testimonials' ),
|
674 |
),
|
675 |
);
|
676 |
|
736 |
'more_full_post' => false,
|
737 |
'more_post' => true,
|
738 |
'more_post_ellipsis' => true,
|
739 |
+
'more_post_text' => esc_html_x( 'Read more', 'link', 'strong-testimonials' ),
|
740 |
'more_post_in_place' => false,
|
741 |
'less_post' => false,
|
742 |
+
'less_post_text' => esc_html__( 'Show less', 'strong-testimonials' ),
|
743 |
'more_page' => false,
|
744 |
'more_page_hook' => 'wpmtst_view_footer',
|
745 |
'more_page_id' => 0,
|
746 |
+
'more_page_text' => esc_html_x( 'Read more testimonials', 'link', 'strong-testimonials' ),
|
747 |
'note' => '',
|
748 |
'order' => 'oldest',
|
749 |
'page' => '',
|
756 |
'end_size' => 1,
|
757 |
'mid_size' => 2,
|
758 |
'prev_next' => 1,
|
759 |
+
'prev_text' => esc_html__( '« Previous', 'strong-testimonials' ),
|
760 |
+
'next_text' => esc_html__( 'Next »', 'strong-testimonials' ),
|
761 |
'before_page_number' => '',
|
762 |
'after_page_number' => '',
|
763 |
),
|
admin/class-strong-testimonials-help.php
CHANGED
@@ -9,10 +9,10 @@ class Strong_Testimonials_Help {
|
|
9 |
|
10 |
public static function init() {
|
11 |
add_action( 'load-wpm-testimonial_page_testimonial-fields', array( __CLASS__, 'fields_editor' ) );
|
12 |
-
add_action( 'load-wpm-testimonial_page_testimonial-views',
|
13 |
add_action( 'load-wpm-testimonial_page_testimonial-views', array( __CLASS__, 'shortcode_attributes' ) );
|
14 |
-
add_action( 'load-wpm-testimonial_page_testimonial-views',
|
15 |
-
add_action( 'load-wpm-testimonial_page_testimonial-views',
|
16 |
|
17 |
add_action( 'load-wpm-testimonial_page_testimonial-settings', array( __CLASS__, 'settings_compat' ) );
|
18 |
}
|
@@ -21,14 +21,14 @@ class Strong_Testimonials_Help {
|
|
21 |
* Compatibility settings.
|
22 |
*/
|
23 |
public static function settings_compat() {
|
24 |
-
if ( ! isset( $_GET['tab'] ) || 'compat' != $_GET['tab'] ) {
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
ob_start();
|
29 |
?>
|
30 |
-
<p><?php
|
31 |
-
<p><?php
|
32 |
<p>
|
33 |
<?php printf( wp_kses( __( '<a href="%s" target="_blank">Explained further here</a>', 'strong-testimonials' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( 'https://en.wikipedia.org/wiki/Flash_of_unstyled_content' ) ); ?>
|
34 |
|
|
@@ -36,14 +36,14 @@ class Strong_Testimonials_Help {
|
|
36 |
|
|
37 |
<?php printf( wp_kses( __( '<a href="%s" target="_blank">An expert\'s observations here</a>', 'strong-testimonials' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( 'https://css-tricks.com/fout-foit-foft/' ) ); ?>
|
38 |
</p>
|
39 |
-
<p><?php
|
40 |
-
<p><?php
|
41 |
<?php
|
42 |
$content = ob_get_clean();
|
43 |
|
44 |
get_current_screen()->add_help_tab( array(
|
45 |
'id' => 'wpmtst-help-prerender',
|
46 |
-
'title' =>
|
47 |
'content' => $content,
|
48 |
) );
|
49 |
}
|
@@ -54,11 +54,11 @@ class Strong_Testimonials_Help {
|
|
54 |
public static function fields_editor() {
|
55 |
ob_start();
|
56 |
?>
|
57 |
-
<p><?php
|
58 |
-
<p><?php
|
59 |
-
<p><?php
|
60 |
-
<p><?php
|
61 |
-
<p><?php
|
62 |
<?php
|
63 |
$content = ob_get_clean();
|
64 |
|
@@ -72,7 +72,7 @@ class Strong_Testimonials_Help {
|
|
72 |
|
73 |
get_current_screen()->add_help_tab( array(
|
74 |
'id' => 'wpmtst-help',
|
75 |
-
'title' =>
|
76 |
'content' => $content,
|
77 |
) );
|
78 |
}
|
@@ -84,23 +84,23 @@ class Strong_Testimonials_Help {
|
|
84 |
ob_start();
|
85 |
?>
|
86 |
<div>
|
87 |
-
<p><?php
|
88 |
<p><?php _e( 'You can create an <strong>unlimited</strong> number of views.', 'strong-testimonials' ); ?></p>
|
89 |
-
<p><?php
|
90 |
<ul class="standard">
|
91 |
-
<li><?php
|
92 |
-
<li><?php
|
93 |
-
<li><?php
|
94 |
<?php do_action( 'wpmtst_views_intro_list' ); ?>
|
95 |
</ul>
|
96 |
-
<p><?php
|
97 |
</div>
|
98 |
<?php
|
99 |
$content = ob_get_clean();
|
100 |
|
101 |
get_current_screen()->add_help_tab( array(
|
102 |
'id' => 'wpmtst-help-views',
|
103 |
-
'title' =>
|
104 |
'content' => $content,
|
105 |
) );
|
106 |
}
|
@@ -118,14 +118,14 @@ class Strong_Testimonials_Help {
|
|
118 |
<div>
|
119 |
<p><?php echo wp_kses_post( _e( 'Optional shortcode attributes will override the view settings. Use this to create reusable view <strong>patterns</strong>.', 'strong-testimonials' ) ); ?>
|
120 |
<p><?php echo wp_kses_post( _e( 'Overridable settings: <code>post_ids</code>, <code>category</code>, <code>order</code>, <code>count</code>.', 'strong-testimonials' ) ); ?>
|
121 |
-
<p><?php echo wp_kses_post(
|
122 |
<p><?php echo wp_kses_post( _e( 'Or you can configure one view as a pattern and add it to each service page with the <code>category</code> attribute.', 'strong-testimonials' ) ); ?>
|
123 |
<p>
|
124 |
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-1"]</code>' ); ?>,
|
125 |
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-2"]</code>' ); ?>, etc.
|
126 |
</p>
|
127 |
<p>
|
128 |
-
<?php echo wp_kses_post(
|
129 |
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-3" order="random" count="5"]</code>' ); ?>
|
130 |
</p>
|
131 |
<p><?php echo wp_kses_post( _e( 'Using <code>post_ids</code> is the most specific method and it will override category and count (whether settings or attributes).', 'strong-testimonials' ) ); ?></p>
|
@@ -135,7 +135,7 @@ class Strong_Testimonials_Help {
|
|
135 |
|
136 |
get_current_screen()->add_help_tab( array(
|
137 |
'id' => 'wpmtst-help-shortcode',
|
138 |
-
'title' =>
|
139 |
'content' => $content,
|
140 |
) );
|
141 |
}
|
@@ -193,7 +193,7 @@ class Strong_Testimonials_Help {
|
|
193 |
|
194 |
get_current_screen()->add_help_tab( array(
|
195 |
'id' => 'wpmtst-help-pagination',
|
196 |
-
'title' =>
|
197 |
'content' => $content,
|
198 |
) );
|
199 |
}
|
@@ -210,13 +210,13 @@ class Strong_Testimonials_Help {
|
|
210 |
?>
|
211 |
<p><?php _e( 'This will set the height of the <b>slideshow container</b> to match the tallest slide in order to keep elements below it from bouncing up and down during slide transitions. With testimonials of uneven length, the result is whitespace underneath the shorter testimonials.', 'strong-testimonials' ); ?></p>
|
212 |
<p><?php _e( 'Select the <b>Stretch</b> option to stretch the borders and background vertically to compensate.', 'strong-testimonials' ); ?></p>
|
213 |
-
<p><?php
|
214 |
<?php
|
215 |
$content = ob_get_clean();
|
216 |
|
217 |
get_current_screen()->add_help_tab( array(
|
218 |
'id' => 'wpmtst-help-stretch',
|
219 |
-
'title' =>
|
220 |
'content' => $content,
|
221 |
) );
|
222 |
}
|
9 |
|
10 |
public static function init() {
|
11 |
add_action( 'load-wpm-testimonial_page_testimonial-fields', array( __CLASS__, 'fields_editor' ) );
|
12 |
+
add_action( 'load-wpm-testimonial_page_testimonial-views', array( __CLASS__, 'views_list' ) );
|
13 |
add_action( 'load-wpm-testimonial_page_testimonial-views', array( __CLASS__, 'shortcode_attributes' ) );
|
14 |
+
add_action( 'load-wpm-testimonial_page_testimonial-views', array( __CLASS__, 'view_editor_pagination' ) );
|
15 |
+
add_action( 'load-wpm-testimonial_page_testimonial-views', array( __CLASS__, 'view_editor_stretch' ) );
|
16 |
|
17 |
add_action( 'load-wpm-testimonial_page_testimonial-settings', array( __CLASS__, 'settings_compat' ) );
|
18 |
}
|
21 |
* Compatibility settings.
|
22 |
*/
|
23 |
public static function settings_compat() {
|
24 |
+
if ( ! isset( $_GET['tab'] ) || 'compat' != sanitize_key( $_GET['tab'] ) ) {
|
25 |
return;
|
26 |
}
|
27 |
|
28 |
ob_start();
|
29 |
?>
|
30 |
+
<p><?php esc_html_e( 'Normally, a web page will load its stylesheets (font, color, size, etc.) before the content. When the content is displayed, the style is ready and the page appears as it was designed.', 'strong-testimonials' ); ?></p>
|
31 |
+
<p><?php esc_html_e( 'When a browser displays the content before all the stylesheets have been loaded, a flash of unstyled content can occur.', 'strong-testimonials' ); ?></p>
|
32 |
<p>
|
33 |
<?php printf( wp_kses( __( '<a href="%s" target="_blank">Explained further here</a>', 'strong-testimonials' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( 'https://en.wikipedia.org/wiki/Flash_of_unstyled_content' ) ); ?>
|
34 |
|
|
36 |
|
|
37 |
<?php printf( wp_kses( __( '<a href="%s" target="_blank">An expert\'s observations here</a>', 'strong-testimonials' ), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( 'https://css-tricks.com/fout-foit-foft/' ) ); ?>
|
38 |
</p>
|
39 |
+
<p><?php esc_html_e( 'When this occurs with plugins that use shortcodes, it means the plugin\'s stylesheet was enqueued when the shortcode was rendered so it gets loaded after the content instead of in the normal sequence.', 'strong-testimonials' ); ?></p>
|
40 |
+
<p><?php esc_html_e( 'The prerender option ensures this plugin\'s stylesheets are loaded before the content.', 'strong-testimonials' ); ?></p>
|
41 |
<?php
|
42 |
$content = ob_get_clean();
|
43 |
|
44 |
get_current_screen()->add_help_tab( array(
|
45 |
'id' => 'wpmtst-help-prerender',
|
46 |
+
'title' => esc_html__( 'Prerender', 'strong-testimonials' ),
|
47 |
'content' => $content,
|
48 |
) );
|
49 |
}
|
54 |
public static function fields_editor() {
|
55 |
ob_start();
|
56 |
?>
|
57 |
+
<p><?php esc_html_e( 'These fields let you customize your testimonials to gather the information you need.', 'strong-testimonials' ); ?></p>
|
58 |
+
<p><?php esc_html_e( 'This editor serves two purposes: (1) to modify the form as it appears on your site, and (2) to modify the custom fields added to each testimonial.', 'strong-testimonials' ); ?></p>
|
59 |
+
<p><?php esc_html_e( 'The default fields are designed to fit most situations. You can quickly add or remove fields and change several display properties.', 'strong-testimonials' ); ?></p>
|
60 |
+
<p><?php esc_html_e( 'Fields will appear in this order on the form.', 'strong-testimonials' ); ?> <?php printf( esc_html__( 'Reorder by grabbing the %s icon.', 'strong-testimonials' ), '<span class="dashicons dashicons-menu"></span>' ); ?></p>
|
61 |
+
<p><?php esc_html_e( 'To display this form, create a view and select Form mode.', 'strong-testimonials' ); ?></p>
|
62 |
<?php
|
63 |
$content = ob_get_clean();
|
64 |
|
72 |
|
73 |
get_current_screen()->add_help_tab( array(
|
74 |
'id' => 'wpmtst-help',
|
75 |
+
'title' => esc_html__( 'Form Fields', 'strong-testimonials' ),
|
76 |
'content' => $content,
|
77 |
) );
|
78 |
}
|
84 |
ob_start();
|
85 |
?>
|
86 |
<div>
|
87 |
+
<p><?php esc_html_e( 'A view is simply a group of settings with an easy-to-use editor.', 'strong-testimonials' ); ?>
|
88 |
<p><?php _e( 'You can create an <strong>unlimited</strong> number of views.', 'strong-testimonials' ); ?></p>
|
89 |
+
<p><?php esc_html_e( 'For example:', 'strong-testimonials' ); ?></p>
|
90 |
<ul class="standard">
|
91 |
+
<li><?php esc_html_e( 'Create a view to display your testimonials in a list, grid, or slideshow.', 'strong-testimonials' ); ?></li>
|
92 |
+
<li><?php esc_html_e( 'Create a view to show a testimonial submission form', 'strong-testimonials' ); ?></li>
|
93 |
+
<li><?php esc_html_e( 'Create a view to append your custom fields to the individual testimonial using your theme single post template.', 'strong-testimonials' ); ?></li>
|
94 |
<?php do_action( 'wpmtst_views_intro_list' ); ?>
|
95 |
</ul>
|
96 |
+
<p><?php esc_html_e( 'Add a view to a page with its unique shortcode or add it to a sidebar with the Strong Testimonials widget.', 'strong-testimonials' ); ?></p>
|
97 |
</div>
|
98 |
<?php
|
99 |
$content = ob_get_clean();
|
100 |
|
101 |
get_current_screen()->add_help_tab( array(
|
102 |
'id' => 'wpmtst-help-views',
|
103 |
+
'title' => esc_html__( 'About Views', 'strong-testimonials' ),
|
104 |
'content' => $content,
|
105 |
) );
|
106 |
}
|
118 |
<div>
|
119 |
<p><?php echo wp_kses_post( _e( 'Optional shortcode attributes will override the view settings. Use this to create reusable view <strong>patterns</strong>.', 'strong-testimonials' ) ); ?>
|
120 |
<p><?php echo wp_kses_post( _e( 'Overridable settings: <code>post_ids</code>, <code>category</code>, <code>order</code>, <code>count</code>.', 'strong-testimonials' ) ); ?>
|
121 |
+
<p><?php echo wp_kses_post( esc_html_e( 'For example, imagine you have five services, a sales page for each service, and a testimonial category for each service. To display the testimonials on each service page, you can create five duplicate views, one for each category.', 'strong-testimonials' ) ); ?>
|
122 |
<p><?php echo wp_kses_post( _e( 'Or you can configure one view as a pattern and add it to each service page with the <code>category</code> attribute.', 'strong-testimonials' ) ); ?>
|
123 |
<p>
|
124 |
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-1"]</code>' ); ?>,
|
125 |
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-2"]</code>' ); ?>, etc.
|
126 |
</p>
|
127 |
<p>
|
128 |
+
<?php echo wp_kses_post( esc_html_e( 'Attributes may be used in combination. For example:', 'strong-testimonials' ) ); ?>
|
129 |
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-3" order="random" count="5"]</code>' ); ?>
|
130 |
</p>
|
131 |
<p><?php echo wp_kses_post( _e( 'Using <code>post_ids</code> is the most specific method and it will override category and count (whether settings or attributes).', 'strong-testimonials' ) ); ?></p>
|
135 |
|
136 |
get_current_screen()->add_help_tab( array(
|
137 |
'id' => 'wpmtst-help-shortcode',
|
138 |
+
'title' => esc_html__( 'Shortcode Attributes', 'strong-testimonials' ),
|
139 |
'content' => $content,
|
140 |
) );
|
141 |
}
|
193 |
|
194 |
get_current_screen()->add_help_tab( array(
|
195 |
'id' => 'wpmtst-help-pagination',
|
196 |
+
'title' => esc_html__( 'Pagination', 'strong-testimonials' ),
|
197 |
'content' => $content,
|
198 |
) );
|
199 |
}
|
210 |
?>
|
211 |
<p><?php _e( 'This will set the height of the <b>slideshow container</b> to match the tallest slide in order to keep elements below it from bouncing up and down during slide transitions. With testimonials of uneven length, the result is whitespace underneath the shorter testimonials.', 'strong-testimonials' ); ?></p>
|
212 |
<p><?php _e( 'Select the <b>Stretch</b> option to stretch the borders and background vertically to compensate.', 'strong-testimonials' ); ?></p>
|
213 |
+
<p><?php esc_html_e( 'Use the excerpt or abbreviated content if you want to minimize the whitespace.', 'strong-testimonials' ); ?></p>
|
214 |
<?php
|
215 |
$content = ob_get_clean();
|
216 |
|
217 |
get_current_screen()->add_help_tab( array(
|
218 |
'id' => 'wpmtst-help-stretch',
|
219 |
+
'title' => esc_html__( 'Stretch', 'strong-testimonials' ),
|
220 |
'content' => $content,
|
221 |
) );
|
222 |
}
|
admin/class-strong-testimonials-helper.php
ADDED
@@ -0,0 +1,2046 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|