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 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class Strong_Testimonials_Helper
|
4 |
+
*
|
5 |
+
* @since 2.5
|
6 |
+
*/
|
7 |
+
class Strong_Testimonials_Helper {
|
8 |
+
private $field;
|
9 |
+
|
10 |
+
public function __construct() {
|
11 |
+
$this->action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
|
12 |
+
$this->view_id = abs( filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT ) );
|
13 |
+
$this->view_options = apply_filters( 'wpmtst_view_options', get_option( 'wpmtst_view_options' ) );
|
14 |
+
$this->cat_count = wpmtst_get_cat_count();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function set_view() {
|
18 |
+
$this->view = $this->get_view();
|
19 |
+
$this->show_section = apply_filters('wpmtst_show_section', $this->view['mode']);
|
20 |
+
if ( 'edit' == $this->action ) {
|
21 |
+
$view_array = wpmtst_get_view( $this->view_id );
|
22 |
+
$this->view = unserialize( $view_array['value'] );
|
23 |
+
$this->view_name = $view_array['name'];
|
24 |
+
} elseif ( 'duplicate' == $this->action ) {
|
25 |
+
$view_array = wpmtst_get_view( $this->view_id );
|
26 |
+
$this->view = unserialize( $view_array['value'] );
|
27 |
+
$this->view_id = 0;
|
28 |
+
$this->view_name = $view_array['name'] . ' - COPY';
|
29 |
+
} else {
|
30 |
+
$this->view_id = 1;
|
31 |
+
$this->view = wpmtst_get_view_default();
|
32 |
+
$this->view_name = 'new';
|
33 |
+
}
|
34 |
+
$this->view_cats_array = apply_filters( 'wpmtst_l10n_cats', explode( ',', $this->view['category'] ) );
|
35 |
+
$this->sections = $this->get_sections();
|
36 |
+
}
|
37 |
+
|
38 |
+
public static function get_view() {
|
39 |
+
$view_id = 1;
|
40 |
+
$view = wpmtst_get_view_default();
|
41 |
+
if (isset($_REQUEST['action'])) {
|
42 |
+
$action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
|
43 |
+
$id = abs( filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT ) );
|
44 |
+
if ( 'edit' == $action ) {
|
45 |
+
$view_array = wpmtst_get_view( $id );
|
46 |
+
$view = unserialize( $view_array['value'] );
|
47 |
+
} elseif ( 'duplicate' == $action ) {
|
48 |
+
$view_array = wpmtst_get_view( $id );
|
49 |
+
$view = unserialize( $view_array['value'] );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
return $view;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function get_sections() {
|
56 |
+
return apply_filters( 'wpmtst_view_sections', array(
|
57 |
+
'query' => array(
|
58 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_select',
|
59 |
+
'section_action_after' => 'wpmtst_view_editor_after_group_select',
|
60 |
+
'fields_action_before' => '',
|
61 |
+
'fields_action_after' => array(
|
62 |
+
'action' => 'wpmtst_views_group_query',
|
63 |
+
'param' => $this->view
|
64 |
+
),
|
65 |
+
'classes' => array('then', 'then_display', 'then_not_form', 'then_slideshow', 'then_not_single_template'),
|
66 |
+
'title' => esc_html__( 'Query', 'strong-testimonials' ),
|
67 |
+
'table_classes' => 'form-table multiple group-select',
|
68 |
+
'subheading' => array(
|
69 |
+
array(
|
70 |
+
'title' => esc_html__( 'Option', 'strong-testimonials' ),
|
71 |
+
'classes' => '',
|
72 |
+
'colspan' => 1,
|
73 |
+
'after' => ''
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'title' => esc_html__( 'Settings', 'strong-testimonials' ),
|
77 |
+
'classes' => '',
|
78 |
+
'colspan' => 1,
|
79 |
+
'after' => ''
|
80 |
+
),
|
81 |
+
array(
|
82 |
+
'title' => esc_html__( 'or Shortcode Attribute', 'strong-testimonials' ),
|
83 |
+
'classes' => 'divider',
|
84 |
+
'colspan' => 2,
|
85 |
+
'after' => '<span class="help-links"><span class="description"><a href="#tab-panel-wpmtst-help-shortcode" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a></span></span>'
|
86 |
+
),
|
87 |
+
array(
|
88 |
+
'title' => esc_html__( 'Example', 'strong-testimonials' ),
|
89 |
+
'classes' => '',
|
90 |
+
'colspan' => 1,
|
91 |
+
'after' => ''
|
92 |
+
)
|
93 |
+
),
|
94 |
+
'fields' => array(
|
95 |
+
'field_select' => array(
|
96 |
+
'label' => esc_html_x( 'Select', 'verb', 'strong-testimonials' ),
|
97 |
+
'type' => 'select',
|
98 |
+
'before' => '',
|
99 |
+
'after' => '',
|
100 |
+
'class' => 'view-single_or_multiple',
|
101 |
+
'container_classes' => 'then then_display then_slideshow then_not_form',
|
102 |
+
'id' => '',
|
103 |
+
'field_action_before' => '',
|
104 |
+
'field_action_after' => ''
|
105 |
+
),
|
106 |
+
'field_category' => array(
|
107 |
+
'label' => esc_html__( 'Categories', 'strong-testimonials' ),
|
108 |
+
'type' => 'category',
|
109 |
+
'before' => '',
|
110 |
+
'after' => '',
|
111 |
+
'class' => 'view-category-select',
|
112 |
+
'container_classes' => 'then then_display then_slideshow then_not_form',
|
113 |
+
'id' => '',
|
114 |
+
'field_action_before' => '',
|
115 |
+
'field_action_after' => ''
|
116 |
+
),
|
117 |
+
'field_order' => array(
|
118 |
+
'label' => esc_html_x( 'Order', 'noun', 'strong-testimonials' ),
|
119 |
+
'type' => 'order',
|
120 |
+
'before' => '',
|
121 |
+
'after' => '',
|
122 |
+
'class' => 'view-order',
|
123 |
+
'container_classes' => 'then then_display then_slideshow then_not_form',
|
124 |
+
'id' => '',
|
125 |
+
'field_action_before' => '',
|
126 |
+
'field_action_after' => ''
|
127 |
+
),
|
128 |
+
'field_limit' => array(
|
129 |
+
'label' => esc_html__( 'Quantity', 'strong-testimonials' ),
|
130 |
+
'type' => 'limit',
|
131 |
+
'before' => '',
|
132 |
+
'after' => '',
|
133 |
+
'class' => 'view-all',
|
134 |
+
'container_classes' => 'then then_display then_slideshow then_not_form',
|
135 |
+
'id' => '',
|
136 |
+
'field_action_before' => '',
|
137 |
+
'field_action_after' => ''
|
138 |
+
)
|
139 |
+
)
|
140 |
+
),
|
141 |
+
|
142 |
+
'fields' => array(
|
143 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_fields',
|
144 |
+
'section_action_after' => '',
|
145 |
+
'fields_action_before' => '',
|
146 |
+
'fields_action_after' => '',
|
147 |
+
'classes' => array('then', 'then_display', 'then_not_form', 'then_slideshow', 'then_single_template'),
|
148 |
+
'title' => esc_html__( 'Fields', 'strong-testimonials' ),
|
149 |
+
'table_classes' => 'form-table multiple group-show',
|
150 |
+
'fields' => array(
|
151 |
+
'field_title' => array(
|
152 |
+
'label' => esc_html__( ' Title', 'strong-testimonials' ),
|
153 |
+
'type' => 'title',
|
154 |
+
'before' => '<input type="checkbox" id="view-title" name="view[data][title]" value="1"' . checked( $this->view['title'], true, false ) . 'class="checkbox if toggle">',
|
155 |
+
'after' => '',
|
156 |
+
'class' => 'view-title',
|
157 |
+
'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
|
158 |
+
'id' => '',
|
159 |
+
'field_action_before' => '',
|
160 |
+
'field_action_after' => ''
|
161 |
+
),
|
162 |
+
'field_thumbnail' => array(
|
163 |
+
'label' => esc_html__( ' Featured Image', 'strong-testimonials' ),
|
164 |
+
'type' => 'thumbnail',
|
165 |
+
'before' => '<input type="checkbox" id="view-images" class="checkbox if toggle" name="view[data][thumbnail]" value="1"' . checked( $this->view['thumbnail'], true, false ) . '>',
|
166 |
+
'after' => '',
|
167 |
+
'class' => 'view-images',
|
168 |
+
'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
|
169 |
+
'id' => '',
|
170 |
+
'field_action_before' => '',
|
171 |
+
'field_action_after' => ''
|
172 |
+
),
|
173 |
+
'field_content' => array(
|
174 |
+
'label' => esc_html__( ' Content', 'strong-testimonials' ),
|
175 |
+
'type' => 'content',
|
176 |
+
'before' => '',
|
177 |
+
'after' => '',
|
178 |
+
'class' => 'view-content',
|
179 |
+
'container_classes' => 'then then_display then_not_form then_slideshow then_not_single_template',
|
180 |
+
'id' => '',
|
181 |
+
'field_action_before' => '',
|
182 |
+
'field_action_after' => ''
|
183 |
+
),
|
184 |
+
'field_client_section' => array(
|
185 |
+
'include' => 'option-client-section.php',
|
186 |
+
'label' => esc_html__( ' Custom Fields', 'strong-testimonials' ),
|
187 |
+
'type' => 'client-section',
|
188 |
+
'before' => '',
|
189 |
+
'after' => '',
|
190 |
+
'class' => '',
|
191 |
+
'container_classes' => 'then then_display then_not_form then_slideshow then_single_template',
|
192 |
+
'id' => '',
|
193 |
+
'field_action_before' => '',
|
194 |
+
'field_action_after' => ''
|
195 |
+
)
|
196 |
+
)
|
197 |
+
),
|
198 |
+
|
199 |
+
'extra' => array(
|
200 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_extra',
|
201 |
+
'section_action_after' => '',
|
202 |
+
'fields_action_before' => '',
|
203 |
+
'fields_action_after' => '',
|
204 |
+
'classes' => array('then', 'then_display', 'then_not_form', 'then_slideshow', 'then_not_single_template'),
|
205 |
+
'title' => esc_html__( 'Extra', 'strong-testimonials' ),
|
206 |
+
'table_classes' => 'form-table multiple group-layout',
|
207 |
+
'fields' => array(
|
208 |
+
'field_pagination' => array(
|
209 |
+
'label' => esc_html__( ' Pagination', 'strong-testimonials' ),
|
210 |
+
'type' => 'pagination',
|
211 |
+
'before' => '<input class="if toggle checkbox" id="view-pagination" name="view[data][pagination]" type="checkbox" value="1"' . checked( $this->view['pagination'], true, false ) . '/>',
|
212 |
+
'after' => '',
|
213 |
+
'class' => 'view-pagination',
|
214 |
+
'container_classes' => 'then then_display then_not_form then_not_slideshow then_not_single then_multiple',
|
215 |
+
'id' => '',
|
216 |
+
'field_action_before' => '',
|
217 |
+
'field_action_after' => ''
|
218 |
+
),
|
219 |
+
'field_read_more' => array(
|
220 |
+
'include' => 'option-read-more-page.php',
|
221 |
+
'label' => esc_html__( ' "Read more" link to a page or post', 'strong-testimonials' ),
|
222 |
+
'type' => 'read-more-page',
|
223 |
+
'before' => '<div class="checkbox"><input type="checkbox" id="view-more_page" class="if toggle" name="view[data][more_page]" value="1"' . checked( isset( $this->view['more_page'] ) && $this->view['more_page'], true, false ) . ' class="checkbox">',
|
224 |
+
'after' => '</div>',
|
225 |
+
'class' => 'view-more_page',
|
226 |
+
'container_classes' => 'then then_display then_not_form then_slideshow read-more',
|
227 |
+
'id' => '',
|
228 |
+
'field_action_before' => '',
|
229 |
+
'field_action_after' => ''
|
230 |
+
),
|
231 |
+
)
|
232 |
+
),
|
233 |
+
'slideshow' => array(
|
234 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_slideshow',
|
235 |
+
'section_action_after' => '',
|
236 |
+
'fields_action_before' => '',
|
237 |
+
'fields_action_after' => '',
|
238 |
+
'classes' => array('then', 'then_not_display', 'then_not_form', 'then_slideshow', 'then_not_single_template'),
|
239 |
+
'title' => esc_html__( 'Slideshow', 'strong-testimonials' ),
|
240 |
+
'table_classes' => 'form-table multiple group-select',
|
241 |
+
'fields' => array(
|
242 |
+
'field_slideshow_num' => array(
|
243 |
+
'label' => esc_html__( 'Show', 'strong-testimonials' ),
|
244 |
+
'type' => 'slideshow-num',
|
245 |
+
'before' => '',
|
246 |
+
'after' => '',
|
247 |
+
'class' => '',
|
248 |
+
'container_classes' => 'then then_slideshow',
|
249 |
+
'id' => '',
|
250 |
+
'field_action_before' => '',
|
251 |
+
'field_action_after' => ''
|
252 |
+
),
|
253 |
+
'field_slideshow_transition' => array(
|
254 |
+
'include' => 'option-slideshow-transition.php',
|
255 |
+
'label' => esc_html__( 'Transition', 'strong-testimonials' ),
|
256 |
+
'type' => 'slideshow-transition',
|
257 |
+
'before' => '',
|
258 |
+
'after' => '',
|
259 |
+
'class' => '',
|
260 |
+
'container_classes' => 'then then_slideshow',
|
261 |
+
'id' => '',
|
262 |
+
'field_action_before' => '',
|
263 |
+
'field_action_after' => ''
|
264 |
+
),
|
265 |
+
'field_slideshow_behavior' => array(
|
266 |
+
'label' => esc_html__( 'Behavior', 'strong-testimonials' ),
|
267 |
+
'type' => 'slideshow-behavior',
|
268 |
+
'before' => '',
|
269 |
+
'after' => '',
|
270 |
+
'class' => '',
|
271 |
+
'container_classes' => 'then then_slideshow',
|
272 |
+
'id' => '',
|
273 |
+
'field_action_before' => '',
|
274 |
+
'field_action_after' => ''
|
275 |
+
),
|
276 |
+
'field_slideshow_navigation' => array(
|
277 |
+
'label' => esc_html__( 'Navigation', 'strong-testimonials' ),
|
278 |
+
'type' => 'slideshow-navigation',
|
279 |
+
'before' => '',
|
280 |
+
'after' => '',
|
281 |
+
'class' => 'view-slideshow_nav',
|
282 |
+
'container_classes' => 'then then_slideshow',
|
283 |
+
'id' => '',
|
284 |
+
'field_action_before' => '',
|
285 |
+
'field_action_after' => ''
|
286 |
+
)
|
287 |
+
)
|
288 |
+
),
|
289 |
+
|
290 |
+
'form' => array(
|
291 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_form',
|
292 |
+
'section_action_after' => '',
|
293 |
+
'fields_action_before' => '',
|
294 |
+
'fields_action_after' => '',
|
295 |
+
'classes' => array('then', 'then_not_display', 'then_not_slideshow', 'then_form', 'then_not_single_template'),
|
296 |
+
'title' => esc_html__( 'Actions', 'strong-testimonials' ),
|
297 |
+
'table_classes' => 'form-table multiple group-select',
|
298 |
+
'fields' => array(
|
299 |
+
'field_form_category' => array(
|
300 |
+
'label' => esc_html__( 'Assign to a category', 'strong-testimonials' ),
|
301 |
+
'type' => 'form-category',
|
302 |
+
'before' => '',
|
303 |
+
'after' => '',
|
304 |
+
'class' => '',
|
305 |
+
'container_classes' => 'then then_form',
|
306 |
+
'id' => '',
|
307 |
+
'field_action_before' => '',
|
308 |
+
'field_action_after' => ''
|
309 |
+
),
|
310 |
+
'field_form_ajax' => array(
|
311 |
+
'label' => esc_html__( ' Submit form without reloading the page (Ajax)', 'strong-testimonials' ),
|
312 |
+
'type' => 'form-ajax',
|
313 |
+
'before' => '<input type="checkbox" id="view-form_ajax" class="checkbox if toggle" name="view[data][form_ajax]" value="1"' . checked( $this->view['form_ajax'], true, false ) . '>',
|
314 |
+
'after' => '',
|
315 |
+
'class' => 'view-form_ajax',
|
316 |
+
'container_classes' => 'then then_form',
|
317 |
+
'id' => '',
|
318 |
+
'field_action_before' => '',
|
319 |
+
'field_action_after' => ''
|
320 |
+
),
|
321 |
+
)
|
322 |
+
),
|
323 |
+
|
324 |
+
'style' => array(
|
325 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_style',
|
326 |
+
'section_action_after' => 'wpmtst_after_style_view_section',
|
327 |
+
'fields_action_before' => '',
|
328 |
+
'fields_action_after' => array(
|
329 |
+
'action' => 'wpmtst_view_editor_after_style_section',
|
330 |
+
'param' => ''
|
331 |
+
),
|
332 |
+
'classes' => array('then', 'then_display', 'then_form', 'then_slideshow', 'then_not_single_template'),
|
333 |
+
'title' => esc_html__( 'Style', 'strong-testimonials' ),
|
334 |
+
'table_classes' => 'form-table multiple group-style',
|
335 |
+
'fields' => array(
|
336 |
+
'field_template_list_display' => array(
|
337 |
+
'label' => esc_html__( 'Template', 'strong-testimonials' ),
|
338 |
+
'type' => 'template-list-display',
|
339 |
+
'before' => '',
|
340 |
+
'after' => '',
|
341 |
+
'class' => '',
|
342 |
+
'container_classes' => 'then then_display then_not_form then_slideshow',
|
343 |
+
'id' => '',
|
344 |
+
'field_action_before' => 'wpmtst_view_editor_before_template_list',
|
345 |
+
'field_action_after' => ''
|
346 |
+
),
|
347 |
+
'field_template_list_form' => array(
|
348 |
+
'label' => esc_html__( 'Template', 'strong-testimonials' ),
|
349 |
+
'type' => 'template-list-form',
|
350 |
+
'before' => '',
|
351 |
+
'after' => '',
|
352 |
+
'class' => '',
|
353 |
+
'container_classes' => 'then then_not_display then_form then_not_slideshow',
|
354 |
+
'id' => '',
|
355 |
+
'field_action_before' => '',
|
356 |
+
'field_action_after' => ''
|
357 |
+
),
|
358 |
+
'field_option_layout' => array(
|
359 |
+
'include' => 'option-layout.php',
|
360 |
+
'label' => esc_html__( 'Layout', 'strong-testimonials' ),
|
361 |
+
'type' => 'layout',
|
362 |
+
'before' => '',
|
363 |
+
'after' => '',
|
364 |
+
'class' => '',
|
365 |
+
'container_classes' => 'then then_display then_not_form then_not_slideshow',
|
366 |
+
'id' => '',
|
367 |
+
'field_action_before' => 'wpmtst_view_editor_before_layout',
|
368 |
+
'field_action_after' => ''
|
369 |
+
),
|
370 |
+
'field_background' => array(
|
371 |
+
'label' => esc_html__( 'Background', 'strong-testimonials' ),
|
372 |
+
'type' => 'background',
|
373 |
+
'before' => '',
|
374 |
+
'after' => '',
|
375 |
+
'class' => '',
|
376 |
+
'id' => 'group-style-option-background',
|
377 |
+
'container_classes' => 'then then_display then_form then_slideshow',
|
378 |
+
'field_action_before' => 'wpmtst_view_editor_before_background',
|
379 |
+
'field_action_after' => ''
|
380 |
+
),
|
381 |
+
'field_color' => array(
|
382 |
+
'label' => esc_html__( 'Font Color', 'strong-testimonials' ),
|
383 |
+
'type' => 'color',
|
384 |
+
'before' => '',
|
385 |
+
'after' => '',
|
386 |
+
'class' => '',
|
387 |
+
'id' => 'group-style-option-color',
|
388 |
+
'container_classes' => 'then then_display then_form then_slideshow',
|
389 |
+
'field_action_before' => '',
|
390 |
+
'field_action_after' => ''
|
391 |
+
),
|
392 |
+
'field_classes' => array(
|
393 |
+
'label' => esc_html__( 'CSS Classes', 'strong-testimonials' ),
|
394 |
+
'type' => 'classes',
|
395 |
+
'before' => '',
|
396 |
+
'after' => '',
|
397 |
+
'class' => 'view-class',
|
398 |
+
'id' => '',
|
399 |
+
'container_classes' => 'then then_display then_form then_slideshow',
|
400 |
+
'field_action_before' => 'wpmtst_view_editor_before_classes',
|
401 |
+
'field_action_after' => ''
|
402 |
+
),
|
403 |
+
)
|
404 |
+
),
|
405 |
+
|
406 |
+
'compat' => array(
|
407 |
+
'section_action_before' => 'wpmtst_view_editor_before_group_compat',
|
408 |
+
'section_action_after' => '',
|
409 |
+
'fields_action_before' => '',
|
410 |
+
'fields_action_after' => '',
|
411 |
+
'classes' => array('then'),
|
412 |
+
'title' => esc_html__( 'Compatibility', 'strong-testimonials' ),
|
413 |
+
'table_classes' => 'form-table multiple group-general',
|
414 |
+
'fields' => array(
|
415 |
+
'field_divi_builder' => array(
|
416 |
+
'label' => esc_html__( 'Divi Builder', 'strong-testimonials' ),
|
417 |
+
'type' => 'divi',
|
418 |
+
'before' => '',
|
419 |
+
'after' => '',
|
420 |
+
'class' => 'view-divi_builder',
|
421 |
+
'container_classes' => 'then then_display then_form then_slideshow then_not_single_template',
|
422 |
+
'id' => '',
|
423 |
+
'field_action_before' => '',
|
424 |
+
'field_action_after' => ''
|
425 |
+
),
|
426 |
+
)
|
427 |
+
),
|
428 |
+
) );
|
429 |
+
}
|
430 |
+
|
431 |
+
public function render_form() {
|
432 |
+
$actions = array( 'edit', 'duplicate', 'add' );
|
433 |
+
if ( ! in_array( $this->action, $actions ) ) {
|
434 |
+
wp_die( esc_html__( 'Invalid request. Please try again.', 'strong-testimonials' ) );
|
435 |
+
}
|
436 |
+
if ( ( 'edit' == $this->action || 'duplicate' == $this->action ) && ! $this->view_id ) return;
|
437 |
+
|
438 |
+
$this->set_view();
|
439 |
+
add_thickbox();
|
440 |
+
|
441 |
+
$fields = wpmtst_get_custom_fields();
|
442 |
+
$all_fields = wpmtst_get_all_fields();
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Show category filter if necessary.
|
446 |
+
*
|
447 |
+
* @since 2.2.0
|
448 |
+
*/
|
449 |
+
if ( $this->cat_count > 5 ) {
|
450 |
+
wp_enqueue_script( 'wpmtst-view-category-filter-script' );
|
451 |
+
}
|
452 |
+
|
453 |
+
// Select default template if necessary
|
454 |
+
if ( !$this->view['template'] ) {
|
455 |
+
if ( 'form' == $this->view['mode'] ) {
|
456 |
+
$this->view['template'] = 'default-form';
|
457 |
+
} else {
|
458 |
+
$this->view['template'] = 'default';
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
+
// Get urls
|
463 |
+
$url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' );
|
464 |
+
$url1 = $url . '&action=add';
|
465 |
+
$url2 = $url . '&action=duplicate&id=' . $this->view_id;
|
466 |
+
|
467 |
+
?>
|
468 |
+
<h1>
|
469 |
+
<?php 'edit' == $this->action ? esc_html_e( 'Edit View', 'strong-testimonials' ) : esc_html_e( 'Add View', 'strong-testimonials' ); ?>
|
470 |
+
<a href="<?php echo esc_url( $url1 ); ?>" class="add-new-h2"><?php esc_html_e( 'Add New', 'strong-testimonials' ); ?></a>
|
471 |
+
<a href="<?php echo esc_url( $url ); ?>" class="add-new-h2"><?php esc_html_e( 'Return To List', 'strong-testimonials' ); ?></a>
|
472 |
+
<?php if ( 'edit' == $this->action ) : ?>
|
473 |
+
<a href="<?php echo esc_url( $url2 ); ?>" class="add-new-h2"><?php esc_html_e( 'Duplicate This View', 'strong-testimonials' ); ?></a>
|
474 |
+
<?php endif; ?>
|
475 |
+
</h1>
|
476 |
+
|
477 |
+
<form id="wpmtst-views-form" method="post" action="<?php echo esc_url(admin_url( 'admin-post.php' )); ?>" autocomplete="off" enctype="multipart/form-data">
|
478 |
+
<?php wp_nonce_field( 'view_form_submit', 'view_form_nonce', true, true ); ?>
|
479 |
+
|
480 |
+
<input type="hidden" name="action" value="view_<?php echo esc_attr( $this->action ); ?>_form">
|
481 |
+
<input type="hidden" name="view[id]" value="<?php echo esc_attr( $this->view_id ); ?>">
|
482 |
+
<input type="hidden" name="view_original_mode" value="<?php echo esc_attr( $this->view['mode'] ); ?>">
|
483 |
+
<input type="hidden" name="view[data][_form_id]" value="<?php echo esc_attr( $this->view['form_id'] ); ?>">
|
484 |
+
|
485 |
+
<div class="table view-info">
|
486 |
+
<?php $this->render_info(); ?>
|
487 |
+
</div>
|
488 |
+
|
489 |
+
<?php $this->render_sections(); ?>
|
490 |
+
|
491 |
+
<p class="wpmtst-submit">
|
492 |
+
<?php submit_button( '', 'primary', 'submit-form', false ); ?>
|
493 |
+
<?php submit_button( esc_html__( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?>
|
494 |
+
<?php submit_button( esc_html__( 'Restore Defaults', 'strong-testimonials' ), 'secondary', 'restore-defaults', false ); ?>
|
495 |
+
</p>
|
496 |
+
</form><?php
|
497 |
+
}
|
498 |
+
|
499 |
+
private function render_info() {
|
500 |
+
if ( 'edit' == $this->action ) {
|
501 |
+
$shortcode = '<div class="saved">';
|
502 |
+
$shortcode .= '<input id="view-shortcode" type="text" value="[testimonial_view id="' . esc_attr( $this->view_id ) . '"]" readonly />';
|
503 |
+
$shortcode .= '<input id="copy-shortcode" class="button small" type="button" value="' . esc_attr__( 'copy to clipboard', 'strong-testimonials' ) . '" data-copytarget="#view-shortcode" />';
|
504 |
+
$shortcode .= '<span id="copy-message">'. esc_html__('copied', 'strong-testimonials').'</span>';
|
505 |
+
$shortcode .= '</div>';
|
506 |
+
} else {
|
507 |
+
$shortcode = '<div class="unsaved">' . esc_html_x( 'will be available after you save this', 'The shortcode for a new View.', 'strong-testimonials' ) . '</div>';
|
508 |
+
}
|
509 |
+
|
510 |
+
$classes = array(
|
511 |
+
'then',
|
512 |
+
'then_display',
|
513 |
+
'then_form',
|
514 |
+
'then_slideshow',
|
515 |
+
'then_not_single_template',
|
516 |
+
apply_filters( 'wpmtst_view_section', '', 'shortcode' ),
|
517 |
+
); ?>
|
518 |
+
|
519 |
+
<div class="table-row form-view-name">
|
520 |
+
<div class="table-cell">
|
521 |
+
<label for="view-name">
|
522 |
+
<?php esc_html_e( 'Name', 'strong-testimonials' ); ?>
|
523 |
+
</label>
|
524 |
+
</div>
|
525 |
+
<div class="table-cell">
|
526 |
+
<input type="text" id="view-name" class="view-name" name="view[name]" value="<?php echo esc_attr( htmlspecialchars( stripslashes( $this->view_name ) ) ); ?>" tabindex="1">
|
527 |
+
</div>
|
528 |
+
</div>
|
529 |
+
|
530 |
+
<div class="table-row form-view-shortcode <?php echo esc_attr( implode( ' ', array_filter( $classes ) ) ); ?>">
|
531 |
+
<div class="table-cell">
|
532 |
+
<label for="view-shortcode"><?php esc_html_e( 'Shortcode', 'strong-testimonials' ); ?></label>
|
533 |
+
</div>
|
534 |
+
<div class="table-cell">
|
535 |
+
<?php echo $shortcode; ?>
|
536 |
+
</div>
|
537 |
+
</div>
|
538 |
+
|
539 |
+
<div id="view-mode" class="table-row mode-select">
|
540 |
+
<div class="table-cell">
|
541 |
+
<?php esc_html_e( 'Mode', 'strong-testimonials' ); ?>
|
542 |
+
</div>
|
543 |
+
<div class="table-cell">
|
544 |
+
<div class="mode-list">
|
545 |
+
<?php foreach ( $this->view_options['mode'] as $mode ) : ?>
|
546 |
+
<label>
|
547 |
+
<input id="<?php echo esc_attr( $mode['name'] ); ?>" type="radio" name="view[data][mode]" value="<?php echo esc_attr( $mode['name'] ); ?>" <?php checked( $this->view['mode'], $mode['name'] ); ?>>
|
548 |
+
<?php echo esc_html( $mode['label'] ); ?>
|
549 |
+
<div class="mode-line"></div>
|
550 |
+
</label>
|
551 |
+
<?php endforeach; ?>
|
552 |
+
</div>
|
553 |
+
<div class="mode-description"></div>
|
554 |
+
</div>
|
555 |
+
</div><?php
|
556 |
+
}
|
557 |
+
|
558 |
+
private function render_sections() {
|
559 |
+
$show_section = apply_filters('wpmtst_show_section', $this->view['mode']);
|
560 |
+
foreach ($this->sections as $name => $section) {
|
561 |
+
if (!empty($section['section_action_before'])) {
|
562 |
+
do_action($section['section_action_before']);
|
563 |
+
}
|
564 |
+
|
565 |
+
$this->render_section($name, $section);
|
566 |
+
|
567 |
+
if (!empty($section['section_action_after'])) {
|
568 |
+
do_action($section['section_action_after']);
|
569 |
+
}
|
570 |
+
}
|
571 |
+
|
572 |
+
do_action( 'wpmtst_view_editor_before_group_general' );
|
573 |
+
do_action( 'wpmtst_view_editor_after_groups' );
|
574 |
+
}
|
575 |
+
|
576 |
+
public function render_section($name, $section) {
|
577 |
+
$section['classes'][] = apply_filters('wpmtst_view_section', '', $name ); ?>
|
578 |
+
<div class="<?php echo esc_attr(implode(' ', array_filter($section['classes']))); ?>" style="display:none">
|
579 |
+
<h3><?php echo esc_html( $section['title'] ) ?></h3>
|
580 |
+
<table class="<?php echo esc_attr( $section['table_classes'] )?>">
|
581 |
+
<?php if (!empty($section['subheading'])): ?>
|
582 |
+
<tr class="subheading">
|
583 |
+
<?php foreach ($section['subheading'] as $subheading): ?>
|
584 |
+
<td class="<?php echo esc_attr( $subheading['classes'] )?>" colspan="<?php echo esc_attr( $subheading['colspan'] ) ?>">
|
585 |
+
<?php echo esc_html( $subheading['title'] ) ?>
|
586 |
+
<?php echo wp_kses_post( $subheading['after'] ) ?>
|
587 |
+
</td>
|
588 |
+
<?php endforeach; ?>
|
589 |
+
</tr>
|
590 |
+
<?php endif;
|
591 |
+
if (!empty($section['fields'])) {
|
592 |
+
if (!empty($section['fields_action_before'])) {
|
593 |
+
do_action($section['fields_action_before']['action'], $section['fields_action_before']['param']);
|
594 |
+
}
|
595 |
+
foreach ($section['fields'] as $key => $field) {
|
596 |
+
$this->set_field($field);
|
597 |
+
if (!empty($this->field['field_action_before'])) {
|
598 |
+
do_action($field['field_action_before']);
|
599 |
+
} ?>
|
600 |
+
<tr id="<?php echo esc_attr( $this->field['id'] ) ?>" class="<?php echo esc_attr( $this->field['container_classes'] ) ?>" style="display:none">
|
601 |
+
<?php $this->render_field() ?>
|
602 |
+
</tr>
|
603 |
+
<?php
|
604 |
+
if (!empty($this->field['field_action_after'])) {
|
605 |
+
do_action($field['field_action_after']);
|
606 |
+
}
|
607 |
+
}
|
608 |
+
if (!empty($section['fields_action_after'])) {
|
609 |
+
do_action($section['fields_action_after']['action'], $section['fields_action_after']['param']);
|
610 |
+
}
|
611 |
+
} ?>
|
612 |
+
</table>
|
613 |
+
</div>
|
614 |
+
<?php
|
615 |
+
}
|
616 |
+
|
617 |
+
public function set_field($field) {
|
618 |
+
$this->field = $field;
|
619 |
+
}
|
620 |
+
|
621 |
+
public function set_settings_field($field) {
|
622 |
+
$this->field = $field;
|
623 |
+
$this->isSetting = TRUE;
|
624 |
+
}
|
625 |
+
|
626 |
+
public function render_field() { ?>
|
627 |
+
<th>
|
628 |
+
<?php echo wp_kses_post( $this->field['before'] ); ?>
|
629 |
+
<label for="<?php echo esc_attr( $this->field['class'] )?>"><?php echo esc_html($this->field['label']); ?></label>
|
630 |
+
<?php echo wp_kses_post( $this->field['after'] ); ?>
|
631 |
+
</th> <?php
|
632 |
+
switch ($this->field['type']) {
|
633 |
+
case 'select':
|
634 |
+
$this->render_field_select();
|
635 |
+
break;
|
636 |
+
case 'category':
|
637 |
+
$this->render_field_category();
|
638 |
+
break;
|
639 |
+
case 'order':
|
640 |
+
$this->render_field_order();
|
641 |
+
break;
|
642 |
+
case 'limit':
|
643 |
+
$this->render_field_limit();
|
644 |
+
break;
|
645 |
+
case 'title':
|
646 |
+
$this->render_field_title();
|
647 |
+
break;
|
648 |
+
case 'thumbnail':
|
649 |
+
$this->render_field_thumbnail();
|
650 |
+
break;
|
651 |
+
case 'content':
|
652 |
+
$this->render_field_content();
|
653 |
+
break;
|
654 |
+
case 'client-section':
|
655 |
+
$this->render_field_client_section();
|
656 |
+
break;
|
657 |
+
case 'pagination':
|
658 |
+
$this->render_field_pagination();
|
659 |
+
break;
|
660 |
+
case 'read-more-page':
|
661 |
+
$this->render_field_read_more_page();
|
662 |
+
break;
|
663 |
+
case 'slideshow-num':
|
664 |
+
$this->render_field_slideshow_num();
|
665 |
+
break;
|
666 |
+
case 'slideshow-transition':
|
667 |
+
$this->render_field_slideshow_transition();
|
668 |
+
break;
|
669 |
+
case 'slideshow-behavior':
|
670 |
+
$this->render_field_slideshow_behavior();
|
671 |
+
break;
|
672 |
+
case 'slideshow-navigation':
|
673 |
+
$this->render_field_slideshow_navigation();
|
674 |
+
break;
|
675 |
+
case 'form-category':
|
676 |
+
$this->render_field_form_category();
|
677 |
+
break;
|
678 |
+
case 'form-ajax':
|
679 |
+
$this->render_field_form_ajax();
|
680 |
+
break;
|
681 |
+
case 'template-list-display':
|
682 |
+
$this->current_mode = 'template';
|
683 |
+
$this->current_type = 'display';
|
684 |
+
$this->render_field_template_list();
|
685 |
+
break;
|
686 |
+
case 'template-list-form':
|
687 |
+
$this->current_mode = 'form-template';
|
688 |
+
$this->current_type = 'form';
|
689 |
+
$this->render_field_template_list();
|
690 |
+
break;
|
691 |
+
case 'layout':
|
692 |
+
$this->render_field_layout();
|
693 |
+
break;
|
694 |
+
case 'background':
|
695 |
+
$this->render_field_background();
|
696 |
+
break;
|
697 |
+
case 'color':
|
698 |
+
$this->render_field_color();
|
699 |
+
break;
|
700 |
+
case 'classes':
|
701 |
+
$this->render_field_classes();
|
702 |
+
break;
|
703 |
+
case 'divi':
|
704 |
+
$this->render_field_divi();
|
705 |
+
break;
|
706 |
+
default:
|
707 |
+
do_action('wpmtst_render_field', $this->field);
|
708 |
+
}
|
709 |
+
}
|
710 |
+
|
711 |
+
public function render_option_select($input_name, $recommended = FALSE, $title = '') {
|
712 |
+
$selected = $this->field['selected'];
|
713 |
+
if ($this->isSetting) {
|
714 |
+
$selected = $this->field['selected_settings'];
|
715 |
+
}
|
716 |
+
if (isset($this->field['options']) && !empty($this->field['options'])): ?>
|
717 |
+
<td>
|
718 |
+
<?php if (!empty($title)): ?>
|
719 |
+
<h4 class="title"><?php esc_html_e($title); ?><h4>
|
720 |
+
<?php endif; ?>
|
721 |
+
<select id="<?php echo esc_attr( $this->field['class'] ) ?>" name="<?php echo esc_attr($input_name); ?>">
|
722 |
+
<?php foreach ($this->field['options'] as $option): ?>
|
723 |
+
<option value="<?php echo esc_attr( $option ); ?>" <?php selected( $option, $selected ); ?>><?php esc_html_e( $option, 'strong-testimonials-review-markup' ); ?></option>
|
724 |
+
<?php endforeach; ?>
|
725 |
+
</select>
|
726 |
+
<?php if ($recommended): ?>
|
727 |
+
<p class="description"><strong style="color: #00805e; font-style: normal;"><?php esc_html_e('Recommended.', 'strong-testimonials-review-markup') ?></strong>
|
728 |
+
<?php if (is_string($recommended)) {
|
729 |
+
echo esc_html($recommended);
|
730 |
+
} ?>
|
731 |
+
</p>
|
732 |
+
<?php endif; ?>
|
733 |
+
</td>
|
734 |
+
<?php endif;
|
735 |
+
}
|
736 |
+
|
737 |
+
public function render_option_textfield($input_name, $recommended = FALSE, $description = '', $title = '', $placeholder = '') {
|
738 |
+
$value = $this->field['value'];
|
739 |
+
if ($this->isSetting) {
|
740 |
+
$value = $this->field['value_settings'];
|
741 |
+
} ?>
|
742 |
+
<td>
|
743 |
+
<?php if (!empty($title)): ?>
|
744 |
+
<h4 class="title"><?php esc_html_e($title); ?><h4>
|
745 |
+
<?php endif; ?>
|
746 |
+
<div>
|
747 |
+
<div class="has-input">
|
748 |
+
<input class="regular-text" type="text" id="<?php echo esc_attr($this->field['class']) ?>" name="<?php echo esc_attr($input_name) ?>" value="<?php echo esc_html($value) ?>" data-default="<?php echo esc_attr($this->field['default']) ?>" placeholder="<?php echo esc_attr($placeholder, 'strong-testimonials-review-markup' ) ?>">
|
749 |
+
</div>
|
750 |
+
<div class="error-message"></div>
|
751 |
+
</div>
|
752 |
+
<p class="description">
|
753 |
+
<?php if ($recommended): ?>
|
754 |
+
<strong style="color: #00805e; font-style: normal;"><?php esc_html_e('Recommended.', 'strong-testimonials-review-markup') ?></strong>
|
755 |
+
<?php endif; ?>
|
756 |
+
<?php if (!empty($description)): ?>
|
757 |
+
<?php esc_html_e($description, 'strong-testimonials-review-markup' ); ?>
|
758 |
+
<?php endif; ?>
|
759 |
+
</p>
|
760 |
+
</td>
|
761 |
+
<?php
|
762 |
+
}
|
763 |
+
|
764 |
+
private function render_field_select() {
|
765 |
+
$testimonials_list = get_posts( array(
|
766 |
+
'orderby' => 'post_date',
|
767 |
+
'order' => 'ASC',
|
768 |
+
'post_type' => 'wpm-testimonial',
|
769 |
+
'post_status' => 'publish',
|
770 |
+
'posts_per_page' => -1,
|
771 |
+
'suppress_filters' => true,
|
772 |
+
)); ?>
|
773 |
+
<td>
|
774 |
+
<div class="row">
|
775 |
+
<div class="row-inner">
|
776 |
+
<select id="view-single_or_multiple" class="if selectper" name="view[data][select]">
|
777 |
+
<option value="multiple" <?php echo (int) $this->view['id'] == 0 ? 'selected' : ''; ?>><?php esc_html_e( 'one or more testimonials', 'strong-testimonials' ); ?></option>
|
778 |
+
<option value="single" <?php echo (int) $this->view['id'] >= 1 ? 'selected' : ''; ?>><?php esc_html_e( 'a specific testimonial', 'strong-testimonials' ); ?></option>
|
779 |
+
</select>
|
780 |
+
</div>
|
781 |
+
</div>
|
782 |
+
|
783 |
+
<div class="row">
|
784 |
+
<div class="then then_not_slideshow then_single then_not_multiple" style="display: none;">
|
785 |
+
<div class="row-inner">
|
786 |
+
<label>
|
787 |
+
<select id="view-id" name="view[data][id]">
|
788 |
+
<option value="0"><?php esc_html_e( '— select —', 'strong-testimonials' ); ?></option>
|
789 |
+
<?php foreach ( $testimonials_list as $post ) : ?>
|
790 |
+
<option value="<?php echo esc_attr($post->ID); ?>" <?php selected( $this->view['id'], $post->ID ); ?>>
|
791 |
+
<?php echo $post->post_title ? esc_html($post->post_title) : __( '(untitled)', 'strong-testimonials' ); ?>
|
792 |
+
</option>
|
793 |
+
<?php endforeach; ?>
|
794 |
+
</select>
|
795 |
+
</label>
|
796 |
+
</div>
|
797 |
+
<div class="row-inner">
|
798 |
+
<label for="view-post_id">
|
799 |
+
<?php _ex( 'or enter its ID or slug', 'to select a testimonial', 'strong-testimonials' ); ?>
|
800 |
+
</label>
|
801 |
+
<input type="text" id="view-post_id" name="view[data][post_id]" size="30">
|
802 |
+
</div>
|
803 |
+
</div>
|
804 |
+
</div>
|
805 |
+
</td>
|
806 |
+
|
807 |
+
<td class="divider">
|
808 |
+
<p><?php echo wp_kses_post( '<code>post_ids</code>' ); ?></p>
|
809 |
+
</td>
|
810 |
+
|
811 |
+
<td>
|
812 |
+
<p><?php esc_html_e( 'a comma-separated list of post ID\'s' , 'strong-testimonials' ); ?></p>
|
813 |
+
</td>
|
814 |
+
|
815 |
+
<td>
|
816 |
+
<p><?php echo wp_kses_post( '<code>post_ids="123,456"</code>' ); ?></p>
|
817 |
+
</td>
|
818 |
+
<?php
|
819 |
+
}
|
820 |
+
|
821 |
+
private function render_field_category() {
|
822 |
+
if ( $this->cat_count ) : ?>
|
823 |
+
<td>
|
824 |
+
<div id="view-category" class="row">
|
825 |
+
<div class="table inline">
|
826 |
+
<div class="table-row">
|
827 |
+
<div class="table-cell select-cell then_display then_slideshow then_not_form">
|
828 |
+
<select id="view-category-select" class="if selectper" name="view[data][category_all]">
|
829 |
+
<option value="allcats" <?php selected( $this->view['category'], 'all' ); ?>><?php esc_html_e( 'all', 'strong-testimonials' ); ?></option>
|
830 |
+
<option value="somecats" <?php echo( 'all' != $this->view['category'] ? 'selected' : '' ); ?>><?php _ex( 'select', 'verb', 'strong-testimonials' ); ?></option>
|
831 |
+
</select>
|
832 |
+
</div>
|
833 |
+
<div class="table-cell then then_not_allcats then_somecats" style="display: none;">
|
834 |
+
<div class="table">
|
835 |
+
<?php if ( $this->cat_count > 5 ) : ?>
|
836 |
+
<div class="table-row">
|
837 |
+
<div class="table-cell">
|
838 |
+
<div class="row" style="text-align: right; padding-bottom: 5px;">
|
839 |
+
<input type="button" class="expand-cats button" value="expand list"/>
|
840 |
+
</div>
|
841 |
+
</div>
|
842 |
+
</div>
|
843 |
+
<?php endif; ?>
|
844 |
+
<div class="table-row">
|
845 |
+
<div class="table-cell"><?php wpmtst_category_checklist( $this->view_cats_array ); ?></div>
|
846 |
+
</div>
|
847 |
+
</div>
|
848 |
+
</div>
|
849 |
+
</div>
|
850 |
+
</div>
|
851 |
+
</div>
|
852 |
+
</td>
|
853 |
+
<?php else : ?>
|
854 |
+
<td>
|
855 |
+
<div id="view-category" class="row">
|
856 |
+
<input type="hidden" name="view[data][category_all]" value="all">
|
857 |
+
<p class="description tall"><?php esc_html_e( 'No categories found', 'strong-testimonials' ); ?></p>
|
858 |
+
</div>
|
859 |
+
</td>
|
860 |
+
<?php endif; ?>
|
861 |
+
|
862 |
+
<td class="divider">
|
863 |
+
<p><?php echo wp_kses_post( '<code>category</code>' ); ?></p>
|
864 |
+
</td>
|
865 |
+
<td>
|
866 |
+
<p><?php esc_html_e( 'a comma-separated list of category slugs or ID\'s', 'strong-testimonials' ); ?></p>
|
867 |
+
</td>
|
868 |
+
<td>
|
869 |
+
<p><?php echo wp_kses_post( '<code>category="accounting"</code>' ); ?></p>
|
870 |
+
</td><?php
|
871 |
+
}
|
872 |
+
|
873 |
+
private function render_field_order() {
|
874 |
+
?>
|
875 |
+
<td>
|
876 |
+
<div class="row">
|
877 |
+
<div class="inline">
|
878 |
+
<select id="view-order" name="view[data][order]">
|
879 |
+
<?php foreach ( $this->view_options['order'] as $order => $order_label ) : ?>
|
880 |
+
<option value="<?php echo esc_attr( $order ); ?>" <?php selected( $order, $this->view['order'] ); ?>><?php echo esc_attr( $order_label ); ?></option>
|
881 |
+
<?php endforeach; ?>
|
882 |
+
</select>
|
883 |
+
</div>
|
884 |
+
</div>
|
885 |
+
</td>
|
886 |
+
<td class="divider">
|
887 |
+
<p><?php echo wp_kses_post( '<code>order</code>' ); ?></p>
|
888 |
+
</td>
|
889 |
+
<td>
|
890 |
+
<p><?php echo wp_kses_post( 'oldest | newest | random | menu_order' ); ?></p>
|
891 |
+
</td>
|
892 |
+
<td>
|
893 |
+
<p><?php echo wp_kses_post( '<code>order="random"</code>' ); ?></p>
|
894 |
+
</td> <?php
|
895 |
+
}
|
896 |
+
|
897 |
+
private function render_field_limit() { ?>
|
898 |
+
<td>
|
899 |
+
<div class="row">
|
900 |
+
<div class="inline">
|
901 |
+
<select class="if select" id="view-all" name="view[data][all]">
|
902 |
+
<option value="1" <?php selected( -1, $this->view['count'] ); ?>>
|
903 |
+
<?php esc_html_e( 'all', 'strong-testimonials' ); ?>
|
904 |
+
</option>
|
905 |
+
<option class="trip" value="0" <?php selected( $this->view['count'] > 0 ); ?>>
|
906 |
+
<?php _ex( 'count', 'noun', 'strong-testimonials' ); ?>
|
907 |
+
</option>
|
908 |
+
</select>
|
909 |
+
|
910 |
+
<label><input class="input-incremental then_all" type="number" id="view-count" name="view[data][count]" value="<?php echo ( -1 == $this->view['count'] ) ? 1 : esc_attr($this->view['count']); ?>" min="1" size="5" style="display: none;"></label>
|
911 |
+
</div>
|
912 |
+
</div>
|
913 |
+
</td>
|
914 |
+
<td class="divider">
|
915 |
+
<p><?php echo wp_kses_post( '<code>count</code>' ); ?></p>
|
916 |
+
</td>
|
917 |
+
<td></td>
|
918 |
+
<td>
|
919 |
+
<p><?php echo wp_kses_post( '<code>count=5</code>' ); ?></p>
|
920 |
+
</td>
|
921 |
+
<?php }
|
922 |
+
|
923 |
+
private function render_field_title() {
|
924 |
+
$custom_fields = wpmtst_get_custom_fields();
|
925 |
+
$options = get_option( 'wpmtst_options' );
|
926 |
+
$url_fields = array();
|
927 |
+
foreach($custom_fields as $field){
|
928 |
+
if('url' == $field['input_type']){
|
929 |
+
$url_fields[] = $field;
|
930 |
+
}
|
931 |
+
}
|
932 |
+
// For older versions where title_link was checkbox
|
933 |
+
if ( '1' == $this->view['title_link'] ) {
|
934 |
+
$this->view['title_link'] = 'wpmtst_testimonial';
|
935 |
+
}
|
936 |
+
if ( '0' == $this->view['title_link'] ) {
|
937 |
+
$this->view['title_link'] = 'none';
|
938 |
+
} ?>
|
939 |
+
<td colspan="2">
|
940 |
+
<div class="row">
|
941 |
+
<div class="row-inner">
|
942 |
+
<div class="then then_title" style="display: none;">
|
943 |
+
<label for="view-title_link">
|
944 |
+
<?php printf( esc_html_x( 'Link to %s', 'The name of this post type. "Testimonial" by default.', 'strong-testimonials' ), strtolower( apply_filters( 'wpmtst_cpt_singular_name', __( 'Testimonial', 'strong-testimonials' ) ) ) ); ?>
|
945 |
+
</label>
|
946 |
+
<div class="wpmtst-tooltip"><span>[?]</span>
|
947 |
+
<div class="wpmtst-tooltip-content"><?php echo esc_html__('"Full testimonial" option doesn\'s work if "Disable permalinks for testimonials" from "Settings" page is enabled.','strong-testimonials'); ?></div>
|
948 |
+
</div>
|
949 |
+
|
950 |
+
<select name="view[data][title_link]">
|
951 |
+
<option value="none" <?php selected( 'none', $this->view['title_link'], true ); ?>><?php echo esc_html__( 'None', 'strong-testimonials' ); ?></option>
|
952 |
+
<?php if ( !isset( $options['disable_rewrite'] ) || '1' != $options['disable_rewrite'] ) { ?>
|
953 |
+
<option value="wpmtst_testimonial" <?php selected( 'wpmtst_testimonial', $this->view['title_link'], true ); ?>><?php echo esc_html__( 'Full testimonial', 'strong-testimonials' ); ?></option>
|
954 |
+
<?php } ?>
|
955 |
+
|
956 |
+
<?php foreach ( $url_fields as $url ) { ?>
|
957 |
+
<option value="<?php echo esc_url( $url['name'] ); ?>" <?php selected( $url['name'], $this->view['title_link'] ); ?>><?php echo esc_url($url['label']); ?></option>
|
958 |
+
<?php } ?>
|
959 |
+
</select>
|
960 |
+
<?php do_action('wpmtst_view_editor_after_group_fields_title') ?>
|
961 |
+
</div>
|
962 |
+
</div>
|
963 |
+
</div>
|
964 |
+
</td>
|
965 |
+
<?php
|
966 |
+
}
|
967 |
+
|
968 |
+
private function render_field_thumbnail() {
|
969 |
+
$image_sizes = wpmtst_get_image_sizes();
|
970 |
+
?>
|
971 |
+
<td colspan="2">
|
972 |
+
<div class="then then_images" style="display: none;">
|
973 |
+
<div class="row">
|
974 |
+
<div class="row-inner">
|
975 |
+
<div class="inline">
|
976 |
+
<label for="view-thumbnail_size">Size</label>
|
977 |
+
<select id="view-thumbnail_size" class="if select" name="view[data][thumbnail_size]">
|
978 |
+
<?php foreach ( $image_sizes as $key => $size ) : ?>
|
979 |
+
<option class="<?php echo ( 'custom' == $key ? 'trip' : '' ) ?>" value="<?php echo esc_attr($key); ?>"<?php selected( $key, $this->view['thumbnail_size'] ); ?>><?php echo esc_html($size['label']); ?></option>
|
980 |
+
<?php endforeach; ?>
|
981 |
+
</select>
|
982 |
+
</div>
|
983 |
+
<div class="inline then then_thumbnail_size" style="margin-left: 1em;">
|
984 |
+
<label for="thumbnail_width"><?php esc_html_e( 'width', 'strong-testimonials' ); ?></label>
|
985 |
+
<input id="thumbnail_width" class="input-number-px" type="text" name="view[data][thumbnail_width]" value="<?php echo esc_attr( $this->view['thumbnail_width'] ); ?>"> px
|
986 |
+
<span style="display: inline-block; color: #BBB; margin: 0 1em;">|</span>
|
987 |
+
<label for="thumbnail_height"><?php esc_html_e( 'height', 'strong-testimonials' ); ?></label>
|
988 |
+
<input id="thumbnail_height" class="input-number-px" type="text" name="view[data][thumbnail_height]" value="<?php echo esc_attr( $this->view['thumbnail_height'] ); ?>"> px
|
989 |
+
</div>
|
990 |
+
</div>
|
991 |
+
</div>
|
992 |
+
<div class="row">
|
993 |
+
<div class="row-inner">
|
994 |
+
<div class="inline">
|
995 |
+
<input type="checkbox" id="view-lightbox" class="if toggle" name="view[data][lightbox]"value="1" <?php checked( $this->view['lightbox'] ); ?> class="checkbox">
|
996 |
+
<label for="view-lightbox"><?php esc_html_e( 'Open full-size image in a lightbox', 'strong-testimonials' ); ?></label>
|
997 |
+
</div>
|
998 |
+
<div class="inline then then_lightbox">
|
999 |
+
<p class="description"><?php esc_html_e( 'Requires a lightbox provided by your theme or another plugin.', 'strong-testimonials' ); ?></p>
|
1000 |
+
</div>
|
1001 |
+
</div>
|
1002 |
+
</div>
|
1003 |
+
|
1004 |
+
<div class="row">
|
1005 |
+
<div class="row-inner">
|
1006 |
+
<div class="inline then then_lightbox input" style="display: none;">
|
1007 |
+
<label for="view-lightbox_class"><?php esc_html_e( 'CSS class', 'strong-testimonials' ); ?></label>
|
1008 |
+
<input type="text" id="view-lightbox_class" class="medium inline" name="view[data][lightbox_class]" value="<?php echo esc_attr($this->view['lightbox_class']); ?>">
|
1009 |
+
<p class="inline description tall"><?php esc_html_e( 'To add a class to the image link.', 'strong-testimonials' ); ?></p>
|
1010 |
+
</div>
|
1011 |
+
</div>
|
1012 |
+
</div>
|
1013 |
+
<div class="row">
|
1014 |
+
<div class="row-inner">
|
1015 |
+
<div class="inline">
|
1016 |
+
<label for="view-gravatar"><?php esc_html_e( 'If no Featured Image', 'strong-testimonials' ); ?></label>
|
1017 |
+
<select id="view-gravatar" class="if select selectper" name="view[data][gravatar]">
|
1018 |
+
<option value="no" <?php selected( $this->view['gravatar'], 'no' ); ?>><?php esc_html_e( 'show nothing', 'strong-testimonials' ); ?></option>
|
1019 |
+
<option value="yes" <?php selected( $this->view['gravatar'], 'yes' ); ?>><?php esc_html_e( 'show Gravatar', 'strong-testimonials' ); ?></option>
|
1020 |
+
<option value="if" <?php selected( $this->view['gravatar'], 'if' ); ?>><?php esc_html_e( 'show Gravatar only if found', 'strong-testimonials' ); ?></option>
|
1021 |
+
<?php do_action('wpmtst_avatar_options', $this->view) ?>
|
1022 |
+
</select>
|
1023 |
+
</div>
|
1024 |
+
<div class="inline">
|
1025 |
+
<div class="then fast then_not_no then_not_default then_not_initials then_not_wp_avatars then_yes then_if" style="display: none;">
|
1026 |
+
<p class="description tall"><a href="<?php echo esc_url( admin_url( 'options-discussion.php' ) ); ?>"><?php esc_html_e( 'Gravatar settings', 'strong-testimonials' ); ?></a></p>
|
1027 |
+
</div>
|
1028 |
+
</div>
|
1029 |
+
<?php do_action('after_no_featured_image', $this->view) ?>
|
1030 |
+
</div>
|
1031 |
+
</div>
|
1032 |
+
</div><!-- .then_images -->
|
1033 |
+
</td>
|
1034 |
+
<?php
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
private function render_field_content() { ?>
|
1038 |
+
<td colspan="2">
|
1039 |
+
<!-- Content type -->
|
1040 |
+
<div id="option-content" class="row">
|
1041 |
+
<div class="row-inner">
|
1042 |
+
<!-- select -->
|
1043 |
+
<div class="inline">
|
1044 |
+
<select id="view-content" class="if selectper min-width-1 label-not-adjacent" name="view[data][content]">
|
1045 |
+
<option value="entire" <?php selected( 'entire', $this->view['content'] ); ?>><?php _ex( 'entire content', 'display setting', 'strong-testimonials' ); ?></option>
|
1046 |
+
<option value="truncated" <?php selected( 'truncated', $this->view['content'] ); ?>><?php _ex( 'automatic excerpt', 'display setting', 'strong-testimonials' ); ?></option>
|
1047 |
+
<option value="excerpt" <?php selected( 'excerpt', $this->view['content'] ); ?>><?php _ex( 'manual excerpt', 'display setting', 'strong-testimonials' ); ?></option>
|
1048 |
+
</select>
|
1049 |
+
</div>
|
1050 |
+
<!-- info & screenshot -->
|
1051 |
+
<div class="inline then fast then_truncated then_not_entire then_not_excerpt" style="display: none;">
|
1052 |
+
<p class="description"><?php esc_html_e( 'This will strip tags like <em> and <strong>.', 'strong-testimonials' ); ?></p>
|
1053 |
+
</div>
|
1054 |
+
<div class="inline then fast then_not_truncated then_not_entire then_excerpt" style="display: none;">
|
1055 |
+
<p class="description">
|
1056 |
+
<?php printf( __( 'To create manual excerpts, you may need to enable them in the post editor like in this <a href="%s" class="thickbox">screenshot</a>.', 'strong-testimonials' ), esc_url( '#TB_inline?width=&height=210&inlineId=screenshot-screen-options' ) ); ?>
|
1057 |
+
<span class="screenshot" id="screenshot-screen-options" style="display: none;"><img src="<?php echo esc_url(WPMTST_ADMIN_URL); ?>img/screen-options.png" width="600"></span>
|
1058 |
+
</p>
|
1059 |
+
</div>
|
1060 |
+
</div>
|
1061 |
+
</div>
|
1062 |
+
<!-- Excerpt length -->
|
1063 |
+
<div id="option-content-length" class="row then then_not_entire then_excerpt then_truncated" style="display: none;">
|
1064 |
+
<div class="row-inner">
|
1065 |
+
<!-- info -->
|
1066 |
+
<div class="inline tight then then_excerpt then_not_truncated" style="display: none;">
|
1067 |
+
<span><?php esc_html_e( 'If no manual excerpt, create an excerpt using', 'strong-testimonials' ); ?></span>
|
1068 |
+
</div>
|
1069 |
+
<!-- default or custom? -->
|
1070 |
+
<div class="inline">
|
1071 |
+
<label>
|
1072 |
+
<select id="view-use_default_length" class="if selectgroup min-width-1" name="view[data][use_default_length]">
|
1073 |
+
<option value="1" <?php selected( $this->view['use_default_length'] ); ?>><?php _ex( 'default length', 'display setting', 'strong-testimonials' ); ?></option>
|
1074 |
+
<option value="0" <?php selected( !$this->view['use_default_length'] ); ?>><?php _ex( 'custom length', 'display setting', 'strong-testimonials' ); ?></option>
|
1075 |
+
</select>
|
1076 |
+
</label>
|
1077 |
+
</div>
|
1078 |
+
<!-- 1st option: default -->
|
1079 |
+
<div class="inline then fast then_use_default_length then_1 then_not_0" style="display: none;">
|
1080 |
+
<label for="view-use_default_length" class="inline-middle"><p class="description tall"><?php esc_html_e( 'The default length is 55 words but your theme may override that.', 'strong-testimonials' ); ?></p></label>
|
1081 |
+
</div>
|
1082 |
+
<!-- 2nd option: length -->
|
1083 |
+
<div class="inline then fast then_use_default_length then_0 then_not_1" style="display: none;">
|
1084 |
+
<label class="inline-middle"><?php printf( esc_html_x( 'the first %s words', 'the excerpt length', 'strong-testimonials' ), '<input id="view-excerpt_length" class="input-incremental" type="number" min="1" max="999" name="view[data][excerpt_length]" value="' . $this->view['excerpt_length'] . '">' ); ?></label>
|
1085 |
+
</div>
|
1086 |
+
</div>
|
1087 |
+
</div><!-- #option-content-length -->
|
1088 |
+
|
1089 |
+
<!-- Read-more link -->
|
1090 |
+
<div id="option-content-read-more" class="row then then_not_entire then_excerpt then_truncated" style="display: none;">
|
1091 |
+
<div class="row-inner subgroup">
|
1092 |
+
<!-- action: full post or in place -->
|
1093 |
+
<div class="row-inner">
|
1094 |
+
<div class="inline"><?php _e( 'Add a <strong>Read more</strong> link to', 'strong-testimonials' ); ?></div>
|
1095 |
+
<div class="inline tight">
|
1096 |
+
<label>
|
1097 |
+
<select id="view-more_post_in_place" class="if selectgroup" name="view[data][more_post_in_place]">
|
1098 |
+
<option value="0" <?php selected( !$this->view['more_post_in_place'] ); ?>><?php esc_html_e( 'the full testimonial', 'strong-testimonials' ); ?></option>
|
1099 |
+
<option value="1" <?php selected( $this->view['more_post_in_place'] ); ?>><?php esc_html_e( 'expand content in place', 'strong-testimonials' ); ?></option>
|
1100 |
+
</select>
|
1101 |
+
</label>
|
1102 |
+
</div>
|
1103 |
+
</div>
|
1104 |
+
<!-- ellipsis -->
|
1105 |
+
<div class="row-inner">
|
1106 |
+
<div class="then then_use_default_more then_0 then_not_1" style="display: none;">
|
1107 |
+
<div class="inline">
|
1108 |
+
<label>
|
1109 |
+
<select id="view-more_post_ellipsis" class="if selectgroup" name="view[data][more_post_ellipsis]">
|
1110 |
+
<option value="1" <?php selected( $this->view['more_post_ellipsis'] ); ?>><?php esc_html_e( 'with an ellipsis', 'strong-testimonials' ); ?></option>
|
1111 |
+
<option value="0" <?php selected( !$this->view['more_post_ellipsis'] ); ?>><?php esc_html_e( 'without an ellipsis', 'strong-testimonials' ); ?></option>
|
1112 |
+
</select>
|
1113 |
+
</label>
|
1114 |
+
</div>
|
1115 |
+
<div class="inline then then_excerpt then_not_truncated" style="display: none;">
|
1116 |
+
<p class="description"><?php esc_html_e( 'Automatic excerpt only.', 'strong-testimonials' ); ?></p>
|
1117 |
+
</div>
|
1118 |
+
</div>
|
1119 |
+
</div>
|
1120 |
+
<!-- default or custom -->
|
1121 |
+
<div class="row-inner">
|
1122 |
+
<div class="inline tight then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
|
1123 |
+
<?php esc_html_e( 'with link text to read more', 'strong-testimonials' ); ?>
|
1124 |
+
</div>
|
1125 |
+
<div class="inline then fast then_more_post_in_place then_0 then_not_1" style="display: none;">
|
1126 |
+
<label>
|
1127 |
+
<select id="view-use_default_more" class="if selectgroup min-width-1" name="view[data][use_default_more]">
|
1128 |
+
<option value="1" <?php selected( $this->view['use_default_more'] ); ?>><?php _ex( 'with default link text', 'display setting', 'strong-testimonials' ); ?></option>
|
1129 |
+
<option value="0" <?php selected( ! $this->view['use_default_more'] ); ?>><?php _ex( 'with custom link text', 'display setting', 'strong-testimonials' ); ?></option>
|
1130 |
+
</select>
|
1131 |
+
</label>
|
1132 |
+
</div>
|
1133 |
+
<div class="inline then fast then_use_default_more then_1 then_not_0" style="display: none;">
|
1134 |
+
<p class="description"><?php esc_html_e( 'If you only see […] without a link then use the custom link text instead.', 'strong-testimonials' ); ?></p>
|
1135 |
+
</div>
|
1136 |
+
<!-- read more -->
|
1137 |
+
<div class="inline then fast then_use_default_more then_0 then_not_1" style="display: none;">
|
1138 |
+
<span id="option-link-text" class="inline-span">
|
1139 |
+
<label for="view-more_post_text">
|
1140 |
+
<input type="text" id="view-more_post_text" name="view[data][more_post_text]" value="<?php echo esc_attr($this->view['more_post_text']); ?>" size="22" placeholder="<?php esc_html_e( 'enter a phrase', 'strong-testimonials' ); ?>">
|
1141 |
+
</label>
|
1142 |
+
</span>
|
1143 |
+
</div>
|
1144 |
+
</div>
|
1145 |
+
<!-- read less -->
|
1146 |
+
<div class="row-inner then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
|
1147 |
+
<div class="inline tight">
|
1148 |
+
<?php esc_html_e( 'and link text to read less', 'strong-testimonials' ); ?>
|
1149 |
+
</div>
|
1150 |
+
<div class="inline tight">
|
1151 |
+
<span id="option-link-text-less" class="inline-span">
|
1152 |
+
<label for="view-less_post_text">
|
1153 |
+
<input type="text" id="view-less_post_text" name="view[data][less_post_text]" value="<?php echo $this->view['less_post_text']; ?>" size="22" placeholder="<?php esc_html_e( 'enter a phrase', 'strong-testimonials' ); ?>">
|
1154 |
+
</label>
|
1155 |
+
</span>
|
1156 |
+
<p class="inline description"><?php esc_html_e( 'Leave blank to leave content expanded without a link.', 'strong-testimonials' ); ?></p>
|
1157 |
+
</div>
|
1158 |
+
<div class="html-content-checkbox">
|
1159 |
+
<input class="checkbox" id="view-html-content" name="view[data][html_content]" value="1" type="checkbox" <?php checked( $this->view['html_content'] ); ?>/>
|
1160 |
+
<label for="view-html-content"><?php _e( 'Show <strong>html content</strong>.', 'strong-testimonials' ); ?></label>
|
1161 |
+
</div>
|
1162 |
+
</div>
|
1163 |
+
<!-- automatic or both -->
|
1164 |
+
<div class="row-inner then then_excerpt then_not_truncated" style="display: none;">
|
1165 |
+
<div class="inline">
|
1166 |
+
<label>
|
1167 |
+
<select id="view-more_full_post" class="if selectgroup" name="view[data][more_full_post]">
|
1168 |
+
<option value="0" <?php selected( $this->view['more_full_post'], 0 ); ?>><?php _ex( 'for automatic excerpt only', 'display setting', 'strong-testimonials' ); ?></option>
|
1169 |
+
<option value="1" <?php selected( $this->view['more_full_post'], 1 ); ?>><?php _ex( 'for both automatic and manual excerpts', 'display setting', 'strong-testimonials' ); ?></option>
|
1170 |
+
</select>
|
1171 |
+
</label>
|
1172 |
+
</div>
|
1173 |
+
</div>
|
1174 |
+
</div>
|
1175 |
+
</div>
|
1176 |
+
<div class="row links then then_not_entire then_truncated then_excerpt" style="display: none;">
|
1177 |
+
<p class="description tall solo"><?php printf(esc_html__( '%s about WordPress excerpts', 'strong-testimonials'), sprintf('<a href="%s" target="_blank">%s</a>', esc_url( 'http://buildwpyourself.com/wordpress-manual-excerpts-more-tag/' ), esc_html__( 'Learn more', 'strong-testimonials' )));?></p>
|
1178 |
+
</div>
|
1179 |
+
</td>
|
1180 |
+
<?php
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
private function render_field_client_section() { ?>
|
1184 |
+
<td colspan="2">
|
1185 |
+
<div id="client-section-table">
|
1186 |
+
<div id="custom-field-list2" class="fields">
|
1187 |
+
<?php
|
1188 |
+
if ( isset( $this->view['client_section'] ) ) {
|
1189 |
+
foreach ( $this->view['client_section'] as $key => $field ) {
|
1190 |
+
wpmtst_view_field_inputs( $key, $field );
|
1191 |
+
}
|
1192 |
+
}
|
1193 |
+
?>
|
1194 |
+
</div>
|
1195 |
+
</div>
|
1196 |
+
<div id="add-field-bar" class="is-below">
|
1197 |
+
<input id="add-field" type="button" name="add-field" source="view[data]" value="<?php esc_html_e( 'Add Field', 'strong-testimonials' ); ?>" class="button-secondary" />
|
1198 |
+
</div>
|
1199 |
+
</td>
|
1200 |
+
<?php
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
private function render_field_pagination() {
|
1204 |
+
/**
|
1205 |
+
* Attempt to repair bug from 2.28.2
|
1206 |
+
*/
|
1207 |
+
if ( !isset( $this->view['pagination_settings']['end_size'] ) || !$this->view['pagination_settings']['end_size'] ) {
|
1208 |
+
$this->view['pagination_settings']['end_size'] = 1;
|
1209 |
+
}
|
1210 |
+
if ( !isset( $this->view['pagination_settings']['mid_size'] ) || !$this->view['pagination_settings']['mid_size'] ) {
|
1211 |
+
$this->view['pagination_settings']['mid_size'] = 2;
|
1212 |
+
}
|
1213 |
+
if ( !isset( $this->view['pagination_settings']['per_page'] ) || !$this->view['pagination_settings']['per_page'] ) {
|
1214 |
+
$this->view['pagination_settings']['per_page'] = 5;
|
1215 |
+
}
|
1216 |
+
$links = '<span class="help-links">';
|
1217 |
+
$links .= '<a href="#tab-panel-wpmtst-help-pagination" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a>';
|
1218 |
+
$links .= '</span>';
|
1219 |
+
?>
|
1220 |
+
<td>
|
1221 |
+
<div class="row then then_pagination" style="display: none;">
|
1222 |
+
<div class="row-inner">
|
1223 |
+
<div class="inline">
|
1224 |
+
<label for="view-pagination_type">
|
1225 |
+
<select class="if selectper" id="view-pagination_type" name="view[data][pagination_settings][type]">
|
1226 |
+
<option value="simple" <?php selected( 'simple', $this->view['pagination_settings']['type'] ); ?>><?php esc_html_e( 'simple', 'strong-testimonials' ); ?></option>
|
1227 |
+
<option value="standard" <?php selected( 'standard', $this->view['pagination_settings']['type'] ); ?>><?php esc_html_e( 'WordPress standard', 'strong-testimonials' ); ?></option>
|
1228 |
+
<?php do_action( 'wpmtst_form_pagination_options_after', $this->view ) ?>
|
1229 |
+
</select>
|
1230 |
+
</label>
|
1231 |
+
</div>
|
1232 |
+
<div class="inline then fast then_simple then_not_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
1233 |
+
<p class="description">
|
1234 |
+
<?php esc_html_e( 'Using JavaScript. Intended for small scale.', 'strong-testimonials' ); ?>
|
1235 |
+
<?php echo wp_kses_post($links); ?>
|
1236 |
+
</p>
|
1237 |
+
</div>
|
1238 |
+
<div class="inline then fast then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
1239 |
+
<p class="description">
|
1240 |
+
<?php esc_html_e( 'Using paged URLs: /page/2, /page/3, etc. Best for large scale.', 'strong-testimonials' ); ?>
|
1241 |
+
<?php echo wp_kses_post($links); ?>
|
1242 |
+
</p>
|
1243 |
+
</div>
|
1244 |
+
</div>
|
1245 |
+
</div>
|
1246 |
+
<div class="row then then_pagination" style="display: none;">
|
1247 |
+
<div class="row-inner">
|
1248 |
+
<div class="inline">
|
1249 |
+
<label for="view-per_page"><?php _ex( 'Per page', 'quantity', 'strong-testimonials' ); ?></label>
|
1250 |
+
<input class="input-incremental" id="view-per_page" name="view[data][pagination_settings][per_page]" type="number" min="1" step="1" value="<?php echo esc_attr($this->view['pagination_settings']['per_page']); ?>"/>
|
1251 |
+
</div>
|
1252 |
+
<div class="inline then then_simple then_standard then_not_infinitescroll then_not_loadmore">
|
1253 |
+
<label for="view-nav"><?php esc_html_e( 'Navigation', 'strong-testimonials' ); ?></label>
|
1254 |
+
<select id="view-nav" name="view[data][pagination_settings][nav]">
|
1255 |
+
<option value="before" <?php selected( $this->view['pagination_settings']['nav'], 'before' ); ?>><?php esc_html_e( 'before', 'strong-testimonials' ); ?></option>
|
1256 |
+
<option value="after" <?php selected( $this->view['pagination_settings']['nav'], 'after' ); ?>><?php esc_html_e( 'after', 'strong-testimonials' ); ?></option>
|
1257 |
+
<option value="before,after" <?php selected( $this->view['pagination_settings']['nav'], 'before,after' ); ?>><?php esc_html_e( 'before & after', 'strong-testimonials' ); ?></option>
|
1258 |
+
</select>
|
1259 |
+
</div>
|
1260 |
+
</div>
|
1261 |
+
<div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
1262 |
+
<div class="row-inner">
|
1263 |
+
<div class="inline">
|
1264 |
+
<label for="view-pagination-show_all">
|
1265 |
+
<select class="if select" id="view-pagination-show_all" name="view[data][pagination_settings][show_all]">
|
1266 |
+
<option value="on" <?php selected( $this->view['pagination_settings']['show_all'] ); ?>><?php esc_html_e( 'Show all page numbers', 'strong-testimonials' ); ?></option>
|
1267 |
+
<option value="off" <?php selected( !$this->view['pagination_settings']['show_all'] ); ?>class="trip"><?php esc_html_e( 'Show condensed page numbers', 'strong-testimonials' ); ?></option>
|
1268 |
+
</select>
|
1269 |
+
</label>
|
1270 |
+
</div>
|
1271 |
+
<div class="inline then then_show_all" style="display: none;">
|
1272 |
+
<div class="inline">
|
1273 |
+
<label for="view-pagination-end_size"><?php _ex( 'End size', 'quantity', 'strong-testimonials' ); ?></label>
|
1274 |
+
<input class="input-incremental" id="view-pagination-end_size" name="view[data][pagination_settings][end_size]" type="number" min="1" step="1" value="<?php echo esc_attr($this->view['pagination_settings']['end_size']); ?>"/>
|
1275 |
+
</div>
|
1276 |
+
<div class="inline">
|
1277 |
+
<label for="view-pagination-mid_size"><?php _ex( 'Middle size', 'quantity', 'strong-testimonials' ); ?></label>
|
1278 |
+
<input class="input-incremental" id="view-pagination-mid_size" name="view[data][pagination_settings][mid_size]" type="number" min="1" step="1" value="<?php echo esc_attr($this->view['pagination_settings']['mid_size']); ?>"/>
|
1279 |
+
</div>
|
1280 |
+
</div>
|
1281 |
+
</div>
|
1282 |
+
</div>
|
1283 |
+
<div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
1284 |
+
<div class="row-inner">
|
1285 |
+
<div class="inline inline-middle">
|
1286 |
+
<input class="if toggle checkbox" id="view-pagination-prev_next" name="view[data][pagination_settings][prev_next]" type="checkbox" value="1" <?php checked( $this->view['pagination_settings']['prev_next'] ); ?>>
|
1287 |
+
<label for="view-pagination-prev_next"><?php esc_html_e( 'Show previous/next links', 'strong-testimonials' ); ?></label>
|
1288 |
+
</div>
|
1289 |
+
<div class="then then_prev_next inline inline-middle">
|
1290 |
+
<label for="view-pagination-prev_text"><?php esc_html_e( 'Previous text', 'strong-testimonials' ); ?></label>
|
1291 |
+
<input class="code" id="view-pagination-prev_text" name="view[data][pagination_settings][prev_text]" type="text" value="<?php echo htmlentities( $this->view['pagination_settings']['prev_text'] ); ?>">
|
1292 |
+
</div>
|
1293 |
+
<div class="then then_prev_next inline inline-middle">
|
1294 |
+
<label for="view-pagination-next_text"><?php esc_html_e( 'Next text', 'strong-testimonials' ); ?></label>
|
1295 |
+
<input class="code" id="view-pagination-next_text" name="view[data][pagination_settings][next_text]" type="text" value="<?php echo htmlentities( $this->view['pagination_settings']['next_text'] ); ?>">
|
1296 |
+
</div>
|
1297 |
+
</div>
|
1298 |
+
</div>
|
1299 |
+
<div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
1300 |
+
<div class="row-inner">
|
1301 |
+
<div class="inline">
|
1302 |
+
<label for="view-pagination-before_page_number"><?php esc_html_e( 'Before page number', 'strong-testimonials' ); ?></label>
|
1303 |
+
<input class="small-text" id="view-pagination-before_page_number" name="view[data][pagination_settings][before_page_number]" type="text" value="<?php echo esc_attr($this->view['pagination_settings']['before_page_number']); ?>">
|
1304 |
+
</div>
|
1305 |
+
<div class="inline">
|
1306 |
+
<label for="view-pagination-after_page_number"><?php esc_html_e( 'After page number', 'strong-testimonials' ); ?></label>
|
1307 |
+
<input class="small-text" id="view-pagination-after_page_number" name="view[data][pagination_settings][after_page_number]" type="text" value="<?php echo esc_attr($this->view['pagination_settings']['after_page_number']); ?>">
|
1308 |
+
</div>
|
1309 |
+
</div>
|
1310 |
+
</div>
|
1311 |
+
</div>
|
1312 |
+
<?php do_action( 'wpmtst_view_editor_pagination_row_end' ); ?>
|
1313 |
+
</td>
|
1314 |
+
<?php
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
private function render_field_read_more_page() {
|
1318 |
+
$custom_list = apply_filters( 'wpmtst_custom_pages_list', array(), $this->view );
|
1319 |
+
$pages_list = apply_filters( 'wpmtst_pages_list', wpmtst_get_pages() );
|
1320 |
+
$posts_list = apply_filters( 'wpmtst_posts_list', wpmtst_get_posts() );
|
1321 |
+
?>
|
1322 |
+
<td>
|
1323 |
+
<div class="row then then_more_page" style="display: none;">
|
1324 |
+
<!-- Select page -->
|
1325 |
+
<div class="row then then_more_page" style="display: none;">
|
1326 |
+
<div class="row-inner">
|
1327 |
+
<label>
|
1328 |
+
<select id="view-page" name="view[data][more_page_id]">
|
1329 |
+
<option value=""><?php esc_html_e( '— select —', 'strong-testimonials' ); ?></option>
|
1330 |
+
<?php
|
1331 |
+
do_action( 'wpmtst_readmore_page_list', $this->view );
|
1332 |
+
if ( $custom_list ) {
|
1333 |
+
?>
|
1334 |
+
<optgroup label="<?php esc_html_e( 'Custom', 'strong-testimonials' ); ?>">
|
1335 |
+
<?php
|
1336 |
+
foreach ( $custom_list as $page ) {
|
1337 |
+
echo wp_kses_post( $page );
|
1338 |
+
}
|
1339 |
+
?>
|
1340 |
+
</optgroup>
|
1341 |
+
<?php } ?>
|
1342 |
+
<optgroup label="<?php esc_attr_e( 'Pages', 'strong-testimonials' ); ?>">
|
1343 |
+
<?php foreach ( $pages_list as $pages ) : ?>
|
1344 |
+
<option value="<?php echo esc_attr($pages->ID); ?>" <?php selected( isset( $this->view['more_page_id'] ) ? $this->view['more_page_id'] : 0, $pages->ID ); ?>><?php echo esc_html($pages->post_title); ?></option>
|
1345 |
+
<?php endforeach; ?>
|
1346 |
+
</optgroup>
|
1347 |
+
<optgroup label="<?php esc_attr_e( 'Posts', 'strong-testimonials' ); ?>">
|
1348 |
+
<?php foreach ( $posts_list as $posts ) : ?>
|
1349 |
+
<option value="<?php echo esc_attr($posts->ID); ?>" <?php selected( isset( $this->view['more_page_id'] ) ? $this->view['more_page_id'] : 0, $posts->ID ); ?>><?php echo esc_html($posts->post_title); ?></option>
|
1350 |
+
<?php endforeach; ?>
|
1351 |
+
</optgroup>
|
1352 |
+
</select>
|
1353 |
+
</label>
|
1354 |
+
<label for="view-page_id2"><?php _ex( 'or enter its ID or slug', 'to select a target page', 'strong-testimonials' ); ?></label>
|
1355 |
+
<input type="text" id="view-page_id2" name="view[data][more_page_id2]" size="30">
|
1356 |
+
</div>
|
1357 |
+
</div>
|
1358 |
+
<!-- Link text -->
|
1359 |
+
<div class="row">
|
1360 |
+
<div class="row-inner">
|
1361 |
+
<div class="inline">
|
1362 |
+
<label for="view-more_page_text"><?php esc_html_e( 'with link text', 'strong-testimonials' ); ?></label>
|
1363 |
+
<input type="text" id="view-more_page_text" name="view[data][more_page_text]" value="<?php echo esc_attr($this->view['more_page_text']); ?>" size="50">
|
1364 |
+
</div>
|
1365 |
+
</div>
|
1366 |
+
</div>
|
1367 |
+
<!-- location -->
|
1368 |
+
<div class="row">
|
1369 |
+
<div class="row-inner">
|
1370 |
+
<label>
|
1371 |
+
<select id="view-more_page_hook" name="view[data][more_page_hook]">
|
1372 |
+
<option value="wpmtst_view_footer" <?php selected( 'wpmtst_view_footer', $this->view['more_page_hook'] ); ?>><?php _ex( 'after the last testimonial', 'display setting', 'strong-testimonials' ); ?></option>
|
1373 |
+
<option value="wpmtst_after_testimonial" <?php selected( 'wpmtst_after_testimonial', $this->view['more_page_hook'] ); ?>><?php _ex( 'in each testimonial', 'display setting', 'strong-testimonials' ); ?></option>
|
1374 |
+
</select>
|
1375 |
+
</label>
|
1376 |
+
</div>
|
1377 |
+
</div>
|
1378 |
+
</div>
|
1379 |
+
</td>
|
1380 |
+
<?php
|
1381 |
+
}
|
1382 |
+
|
1383 |
+
private function render_field_slideshow_num() { ?>
|
1384 |
+
<td>
|
1385 |
+
<div class="row">
|
1386 |
+
<div class="inline inline-middle">
|
1387 |
+
<label>
|
1388 |
+
<select id="view-slider_type" name="view[data][slideshow_settings][type]" class="if selectgroup">
|
1389 |
+
<option value="show_single" <?php selected( $this->view['slideshow_settings']['type'], 'show_single' ); ?>><?php esc_html_e( 'single', 'strong-testimonials' ); ?></option>
|
1390 |
+
<option value="show_multiple" <?php selected( $this->view['slideshow_settings']['type'], 'show_multiple' ); ?>><?php esc_html_e( 'multiple', 'strong-testimonials' ); ?></option>
|
1391 |
+
</select>
|
1392 |
+
</label>
|
1393 |
+
<div class="option-desc singular" style="display: none;">
|
1394 |
+
<?php esc_html_e( 'slide at a time', 'strong-testimonials' ); ?>
|
1395 |
+
</div>
|
1396 |
+
<div class="option-desc plural" style="display: none;">
|
1397 |
+
<?php esc_html_e( 'slides at a time with these responsive breakpoints:', 'strong-testimonials' ); ?>
|
1398 |
+
</div>
|
1399 |
+
</div>
|
1400 |
+
</div>
|
1401 |
+
</td>
|
1402 |
+
<td>
|
1403 |
+
<div class="inline then then_slider_type then_not_show_single then_show_multiple" style="display: none;">
|
1404 |
+
<div class="row">
|
1405 |
+
<div class="inner-table is-below">
|
1406 |
+
<div class="inner-table-row bordered header">
|
1407 |
+
<div class="inner-table-cell"><?php esc_html_e( 'minimum screen width', 'strong-testimonials' ); ?></div>
|
1408 |
+
<div class="inner-table-cell"><?php esc_html_e( 'show', 'strong-testimonials' ); ?></div>
|
1409 |
+
<div class="inner-table-cell"><?php esc_html_e( 'margin', 'strong-testimonials' ); ?></div>
|
1410 |
+
<div class="inner-table-cell"><?php esc_html_e( 'move', 'strong-testimonials' ); ?></div>
|
1411 |
+
</div>
|
1412 |
+
<?php foreach ( $this->view['slideshow_settings']['breakpoints'] as $key => $breakpoint ) : ?>
|
1413 |
+
<div class="inner-table-row bordered">
|
1414 |
+
<div class="inner-table-cell">
|
1415 |
+
<label>
|
1416 |
+
<input id="view-breakpoint_<?php echo esc_attr($key); ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][width]" value="<?php echo esc_attr($breakpoint['width']); ?>" type="number" class="input-incremental"> px
|
1417 |
+
</label>
|
1418 |
+
</div>
|
1419 |
+
<div class="inner-table-cell">
|
1420 |
+
<label>
|
1421 |
+
<select id="view-max_slides_<?php echo $key; ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][max_slides]" class="if selectgroup">
|
1422 |
+
<option value="1" <?php selected( $breakpoint['max_slides'], 1 ); ?>>1</option>
|
1423 |
+
<option value="2" <?php selected( $breakpoint['max_slides'], 2 ); ?>>2</option>
|
1424 |
+
<option value="3" <?php selected( $breakpoint['max_slides'], 3 ); ?>>3</option>
|
1425 |
+
<option value="4" <?php selected( $breakpoint['max_slides'], 4 ); ?>>4</option>
|
1426 |
+
</select>
|
1427 |
+
</label>
|
1428 |
+
<div class="option-desc singular" style="display: none;"><?php esc_html_e( 'slide', 'strong-testimonials' ); ?></div>
|
1429 |
+
<div class="option-desc plural" style="display: none;"><?php esc_html_e( 'slides', 'strong-testimonials' ); ?></div>
|
1430 |
+
</div>
|
1431 |
+
<div class="inner-table-cell">
|
1432 |
+
<input id="view-margin_<?php echo $key; ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][margin]" value="<?php echo esc_attr($breakpoint['margin']); ?>" type="number" min="1" step="1" size="3" class="input-incremental"/> px
|
1433 |
+
</div>
|
1434 |
+
<div class="inner-table-cell">
|
1435 |
+
<label>
|
1436 |
+
<select id="view-move_slides_<?php echo esc_attr($key); ?>" name="view[data][slideshow_settings][breakpoints][<?php echo esc_attr($key); ?>][move_slides]"class="if selectgroup">
|
1437 |
+
<option value="1" <?php selected( $breakpoint['move_slides'], 1 ); ?>>1</option>
|
1438 |
+
<option value="2" <?php selected( $breakpoint['move_slides'], 2 ); ?>>2</option>
|
1439 |
+
<option value="3" <?php selected( $breakpoint['move_slides'], 3 ); ?>>3</option>
|
1440 |
+
<option value="4" <?php selected( $breakpoint['move_slides'], 4 ); ?>>4</option>
|
1441 |
+
</select>
|
1442 |
+
</label>
|
1443 |
+
<div class="option-desc singular" style="display: none;"><?php esc_html_e( 'slide', 'strong-testimonials' ); ?></div>
|
1444 |
+
<div class="option-desc plural" style="display: none;"><?php esc_html_e( 'slides', 'strong-testimonials' ); ?></div>
|
1445 |
+
</div>
|
1446 |
+
</div>
|
1447 |
+
<?php endforeach; ?>
|
1448 |
+
</div>
|
1449 |
+
</div>
|
1450 |
+
<div class="is-below">
|
1451 |
+
<input id="restore-default-breakpoints"type="button" name="restore-default-breakpoints" value="<?php esc_html_e( 'Restore Default Breakpoints', 'strong-testimonials' ); ?>" class="button-secondary" />
|
1452 |
+
<span id="restored-message"><?php esc_html_e( 'defaults restored', 'strong-testimonials' ); ?></span>
|
1453 |
+
</div>
|
1454 |
+
</div>
|
1455 |
+
</td>
|
1456 |
+
<?php
|
1457 |
+
}
|
1458 |
+
|
1459 |
+
private function render_field_slideshow_transition() { ?>
|
1460 |
+
<td>
|
1461 |
+
<div class="row">
|
1462 |
+
<div class="inline inline-middle">
|
1463 |
+
<label for="view-pause"><?php _ex( 'Show slides for', 'slideshow setting', 'strong-testimonials' ); ?></label>
|
1464 |
+
<input type="number" id="view-pause" class="input-incremental" name="view[data][slideshow_settings][pause]" min=".1" step=".1" value="<?php echo esc_attr($this->view['slideshow_settings']['pause']); ?>" size="3"/>
|
1465 |
+
<?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
|
1466 |
+
</div>
|
1467 |
+
<div class="inline inline-middle then then_slider_type then_show_single then_not_show_multiple fast" style="display: none;">
|
1468 |
+
<label for="view-effect"><?php esc_html_e( 'then', 'strong-testimonials' ); ?></label>
|
1469 |
+
<select id="view-effect" name="view[data][slideshow_settings][effect]" class="if selectnot">
|
1470 |
+
<?php foreach ( $this->view_options['slideshow_effect'] as $key => $label ) : ?>
|
1471 |
+
<option value="<?php echo esC_attr($key); ?>"
|
1472 |
+
<?php selected( $this->view['slideshow_settings']['effect'], $key ); ?>
|
1473 |
+
<?php echo 'none' == $key ? 'class="trip"' : ''; ?>><?php echo esc_html($label); ?></option>
|
1474 |
+
<?php endforeach; ?>
|
1475 |
+
</select>
|
1476 |
+
</div>
|
1477 |
+
<div class="inline inline-middle then then_slider_type then_not_show_single then_show_multiple fast" style="display: none;">
|
1478 |
+
<?php esc_html_e( 'then', 'strong-testimonials' ); ?> <?php _ex( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ); ?>
|
1479 |
+
</div>
|
1480 |
+
<div class="inline inline-middle then then_effect then_none">
|
1481 |
+
<label for="view-speed"><?php esc_html_e( 'for', 'strong-testimonials' ); ?></label>
|
1482 |
+
<input type="number" id="view-speed" class="input-incremental" name="view[data][slideshow_settings][speed]" min=".1" step=".1" value="<?php echo esc_attr($this->view['slideshow_settings']['speed']); ?>" size="3"/>
|
1483 |
+
<?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
|
1484 |
+
</div>
|
1485 |
+
</div>
|
1486 |
+
</td>
|
1487 |
+
<?php
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
private function render_field_slideshow_behavior() { ?>
|
1491 |
+
<td>
|
1492 |
+
<div class="row">
|
1493 |
+
<div class="inline inline-middle">
|
1494 |
+
<input type="checkbox" id="view-auto_start" name="view[data][slideshow_settings][auto_start]" value="0" <?php checked( $this->view['slideshow_settings']['auto_start'] ); ?> class="checkbox">
|
1495 |
+
<label for="view-auto_start"><?php _ex( 'Start automatically', 'slideshow setting', 'strong-testimonials' ); ?></label>
|
1496 |
+
</div>
|
1497 |
+
</div>
|
1498 |
+
<div class="row">
|
1499 |
+
<div class="inline inline-middle">
|
1500 |
+
<input type="checkbox" id="view-continuous_sliding" name="view[data][slideshow_settings][continuous_sliding]" value="0" <?php checked( $this->view['slideshow_settings']['continuous_sliding'] ); ?> class="checkbox">
|
1501 |
+
<label for="view-continuous_sliding"><?php _ex( 'Continuous Sliding', 'slideshow setting', 'strong-testimonials' ); ?></label>
|
1502 |
+
</div>
|
1503 |
+
</div>
|
1504 |
+
<div class="row">
|
1505 |
+
<div class="inline inline-middle">
|
1506 |
+
<input type="checkbox" id="view-auto_hover" name="view[data][slideshow_settings][auto_hover]" value="0" <?php checked( $this->view['slideshow_settings']['auto_hover'] ); ?> class="checkbox">
|
1507 |
+
<label for="view-auto_hover"><?php _ex( 'Pause on hover', 'slideshow setting', 'strong-testimonials' ); ?></label>
|
1508 |
+
</div>
|
1509 |
+
</div>
|
1510 |
+
<div class="row">
|
1511 |
+
<div class="inline inline-middle">
|
1512 |
+
<input type="checkbox" id="view-stop_auto_on_click" name="view[data][slideshow_settings][stop_auto_on_click]" value="0" <?php checked( $this->view['slideshow_settings']['stop_auto_on_click'] ); ?> class="checkbox">
|
1513 |
+
<label for="view-stop_auto_on_click"><?php _ex( 'Stop on interaction', 'slideshow setting', 'strong-testimonials' ); ?></label>
|
1514 |
+
</div>
|
1515 |
+
<div class="inline inline-middle">
|
1516 |
+
<p class="description"><?php esc_html_e( 'Recommended if using navigation.', 'strong-testimonials' ); ?></p>
|
1517 |
+
</div>
|
1518 |
+
</div>
|
1519 |
+
<?php
|
1520 |
+
if ( $this->view['slideshow_settings']['adapt_height'] ) {
|
1521 |
+
$height = 'dynamic';
|
1522 |
+
} else {
|
1523 |
+
$height = 'static';
|
1524 |
+
}
|
1525 |
+
?>
|
1526 |
+
<div class="row">
|
1527 |
+
<div class="row-inner">
|
1528 |
+
<div class="inline">
|
1529 |
+
<label for="view-slideshow_height">
|
1530 |
+
<select id="view-slideshow_height" name="view[data][slideshow_settings][height]" class="if selectgroup">
|
1531 |
+
<?php foreach ( $this->view_options['slideshow_height'] as $key => $type ) : ?>
|
1532 |
+
<option value="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>"
|
1533 |
+
<?php selected( $height, $key ); ?>>
|
1534 |
+
<?php echo esc_html($type); ?>
|
1535 |
+
</option>
|
1536 |
+
<?php endforeach; ?>
|
1537 |
+
</select>
|
1538 |
+
</label>
|
1539 |
+
</div>
|
1540 |
+
<div class="inline then then_slideshow_height then_dynamic then_not_static" style="display: none;">
|
1541 |
+
<label for="view-adapt_height_speed"><?php esc_html_e( 'Duration', 'strong-testimonials' ); ?></label>
|
1542 |
+
<input type="number" id="view-adapt_height_speed" class="input-incremental" name="view[data][slideshow_settings][adapt_height_speed]" min="0" step="0.1" value="<?php echo esc_attr($this->view['slideshow_settings']['adapt_height_speed']); ?>" size="3"/>
|
1543 |
+
<?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
|
1544 |
+
</div>
|
1545 |
+
<div class="inline then then_slideshow_height then_not_dynamic then_static" style="display: none;">
|
1546 |
+
<input type="checkbox" id="view-stretch" name="view[data][slideshow_settings][stretch]" value="1" <?php checked( $this->view['slideshow_settings']['stretch'] ); ?> class="checkbox">
|
1547 |
+
<label for="view-stretch"><?php esc_html_e( 'Stretch slides vertically', 'strong-testimonials' ); ?></label>
|
1548 |
+
<div class="inline description">
|
1549 |
+
<a href="#tab-panel-wpmtst-help-stretch" class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
1550 |
+
</div>
|
1551 |
+
</div>
|
1552 |
+
</div>
|
1553 |
+
</div>
|
1554 |
+
<div class="row tall">
|
1555 |
+
<p class="description"><?php esc_html_e( 'The slideshow will pause if the browser window becomes inactive.', 'strong-testimonials' ); ?></p>
|
1556 |
+
</div>
|
1557 |
+
</td>
|
1558 |
+
<?php
|
1559 |
+
}
|
1560 |
+
|
1561 |
+
private function render_field_slideshow_navigation() { ?>
|
1562 |
+
<td>
|
1563 |
+
<div class="row">
|
1564 |
+
<div class="row-inner">
|
1565 |
+
<div class="inline">
|
1566 |
+
<label for="view-slideshow_controls_type"><?php esc_html_e( 'Controls', 'strong-testimonials' ); ?></label>
|
1567 |
+
<select id="view-slideshow_controls_type" name="view[data][slideshow_settings][controls_type]" class="if selectnot">
|
1568 |
+
<?php foreach ( $this->view_options['slideshow_nav_method']['controls'] as $key => $type ) : ?>
|
1569 |
+
<option value="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>"
|
1570 |
+
<?php selected( $this->view['slideshow_settings']['controls_type'], $key ); ?>
|
1571 |
+
<?php if ( 'none' == $key ) {
|
1572 |
+
echo ' class="trip"';
|
1573 |
+
} ?>>
|
1574 |
+
<?php echo esc_html($type['label']); ?>
|
1575 |
+
</option>
|
1576 |
+
<?php endforeach; ?>
|
1577 |
+
</select>
|
1578 |
+
</div>
|
1579 |
+
<div class="inline then then_slideshow_controls_type" style="display: none;">
|
1580 |
+
<label for="view-slideshow_controls_style"><?php esc_html_e( 'Style', 'strong-testimonials' ); ?></label>
|
1581 |
+
<select id="view-slideshow_controls_style" name="view[data][slideshow_settings][controls_style]">
|
1582 |
+
<?php foreach ( $this->view_options['slideshow_nav_style']['controls'] as $key => $style ) : ?>
|
1583 |
+
<option value="<?php echo esc_attr($key); ?>" <?php selected( $this->view['slideshow_settings']['controls_style'], $key ); ?>><?php echo esc_html($style['label']); ?></option>
|
1584 |
+
<?php endforeach; ?>
|
1585 |
+
</select>
|
1586 |
+
</div>
|
1587 |
+
</div>
|
1588 |
+
</div>
|
1589 |
+
<div class="row">
|
1590 |
+
<div class="row-inner then then_has-pager">
|
1591 |
+
<div class="inline">
|
1592 |
+
<label for="view-slideshow_pager_type"><?php esc_html_e( 'Pagination', 'strong-testimonials' ); ?></label>
|
1593 |
+
<select id="view-slideshow_pager_type" name="view[data][slideshow_settings][pager_type]" class="if selectnot">
|
1594 |
+
<?php foreach ( $this->view_options['slideshow_nav_method']['pager'] as $key => $type ) : ?>
|
1595 |
+
<option value="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>"
|
1596 |
+
<?php selected( $this->view['slideshow_settings']['pager_type'], $key ); ?>
|
1597 |
+
<?php if ( 'none' == $key ) {
|
1598 |
+
echo ' class="trip"';
|
1599 |
+
} ?>>
|
1600 |
+
<?php echo esc_html($type['label']); ?>
|
1601 |
+
</option>
|
1602 |
+
<?php endforeach; ?>
|
1603 |
+
</select>
|
1604 |
+
</div>
|
1605 |
+
<div class="inline then then_slideshow_pager_type" style="display: none;">
|
1606 |
+
<label for="view-slideshow_pager_style"><?php esc_html_e( 'Style', 'strong-testimonials' ); ?></label>
|
1607 |
+
<select id="view-slideshow_pager_style" name="view[data][slideshow_settings][pager_style]" class="if selectnot">
|
1608 |
+
<?php foreach ( $this->view_options['slideshow_nav_style']['pager'] as $key => $style ) : ?>
|
1609 |
+
<option value="<?php echo esc_attr($key); ?>" <?php selected( $this->view['slideshow_settings']['pager_style'], $key ); ?>><?php echo esc_html($style['label']); ?></option>
|
1610 |
+
<?php endforeach; ?>
|
1611 |
+
</select>
|
1612 |
+
</div>
|
1613 |
+
</div>
|
1614 |
+
</div>
|
1615 |
+
<div class="row">
|
1616 |
+
<div class="row-inner">
|
1617 |
+
<div class="then then_slider_type then_show_single then_not_show_multiple" style="display: none;">
|
1618 |
+
<div class="inline then then_has-position" style="display: none;">
|
1619 |
+
<label for="view-slideshow_nav_position"><?php esc_html_e( 'Position', 'strong-testimonials' ); ?></label>
|
1620 |
+
<select id="view-slideshow_nav_position" name="view[data][slideshow_settings][nav_position]">
|
1621 |
+
<?php foreach ( $this->view_options['slideshow_nav_position'] as $key => $label ) : ?>
|
1622 |
+
<option value="<?php echo esc_attr($key); ?>" <?php selected( $this->view['slideshow_settings']['nav_position'], $key ); ?>><?php echo esc_html($label); ?></option>
|
1623 |
+
<?php endforeach; ?>
|
1624 |
+
</select>
|
1625 |
+
<?php //esc_html_e( 'outside', 'strong-testimonials' ); ?>
|
1626 |
+
<?php esc_html_e( 'the testimonial frame', 'strong-testimonials' ); ?>
|
1627 |
+
</div>
|
1628 |
+
</div>
|
1629 |
+
</div>
|
1630 |
+
</div>
|
1631 |
+
</td>
|
1632 |
+
<?php
|
1633 |
+
}
|
1634 |
+
|
1635 |
+
private function render_field_form_category() {
|
1636 |
+
if ( $this->cat_count ) : ?>
|
1637 |
+
<td>
|
1638 |
+
<div class="table">
|
1639 |
+
<?php if ( $this->cat_count > 5 ) : ?>
|
1640 |
+
<div class="table-row">
|
1641 |
+
<div class="table-cell">
|
1642 |
+
<div class="row" style="text-align: right; padding-bottom: 5px;">
|
1643 |
+
<input type="button" class="expand-cats button" value="expand list"/>
|
1644 |
+
</div>
|
1645 |
+
</div>
|
1646 |
+
</div>
|
1647 |
+
<?php endif; ?>
|
1648 |
+
<div class="table-row">
|
1649 |
+
<div class="table-cell">
|
1650 |
+
<?php wpmtst_form_category_checklist( $this->view_cats_array ); ?>
|
1651 |
+
</div>
|
1652 |
+
</div>
|
1653 |
+
</div>
|
1654 |
+
</td>
|
1655 |
+
<?php else : ?>
|
1656 |
+
<td>
|
1657 |
+
<p class="description tall"><?php esc_html_e( 'No categories found', 'strong-testimonials' ); ?></p>
|
1658 |
+
</td>
|
1659 |
+
<?php endif;
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
private function render_field_form_ajax() {?>
|
1663 |
+
<td>
|
1664 |
+
<p class="description tall"><?php _e( 'This will override the <strong>Success Redirect</strong> setting.', 'strong-testimonials' ); ?></p>
|
1665 |
+
</td>
|
1666 |
+
<?php
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
private function render_field_template_list() {
|
1670 |
+
// Assemble list of templates
|
1671 |
+
$templates = array(
|
1672 |
+
'display' => WPMST()->templates->get_templates( 'display' ),
|
1673 |
+
'form' => WPMST()->templates->get_templates( 'form' ),
|
1674 |
+
);
|
1675 |
+
$template_found = in_array( $this->view['template'], WPMST()->templates->get_template_keys() );
|
1676 |
+
?>
|
1677 |
+
<td colspan="2">
|
1678 |
+
<div id="view-template-list">
|
1679 |
+
<div class="radio-buttons">
|
1680 |
+
<?php if ( ! $template_found ) : ?>
|
1681 |
+
<ul class="radio-list template-list">
|
1682 |
+
<li>
|
1683 |
+
<div>
|
1684 |
+
<input class="error" type="radio" id="<?php echo esc_attr( $this->view['template'] ); ?>" name="view[data][<?php echo esc_attr( $this->current_mode ); ?>]" value="<?php echo esc_attr( $this->view['template'] ); ?>" checked>
|
1685 |
+
<label for="<?php echo esc_attr( $this->view['template'] ); ?>"><?php echo esc_html($this->view['template']); ?></label>
|
1686 |
+
</div>
|
1687 |
+
<div class="template-description">
|
1688 |
+
<p>
|
1689 |
+
<span class="dashicons dashicons-warning error"></span>
|
1690 |
+
<span class="error"><?php esc_html_e( 'not found', 'strong-testimonials' ); ?></span>
|
1691 |
+
</p>
|
1692 |
+
</div>
|
1693 |
+
</li>
|
1694 |
+
</ul>
|
1695 |
+
<?php endif; ?>
|
1696 |
+
<ul class="radio-list template-list">
|
1697 |
+
<?php foreach ( $templates[ $this->current_type ] as $key => $template ) : ?>
|
1698 |
+
<li>
|
1699 |
+
<div>
|
1700 |
+
<input type="radio" id="template-<?php echo esc_attr( $key ); ?>" name="view[data][<?php echo esc_attr( $this->current_mode ); ?>]" value="<?php echo esc_attr( $key ); ?>" <?php checked( $key, $this->view['template'] ); ?>>
|
1701 |
+
<label for="template-<?php echo esc_attr( $key ); ?>"><?php echo esc_html($template['config']['name']); ?></label>
|
1702 |
+
</div>
|
1703 |
+
<div class="template-description">
|
1704 |
+
<p><?php echo ( isset( $template['config']['description'] ) && $template['config']['description'] ? esc_html($template['config']['description']) : __( 'no description', 'strong-testimonials' ) ) ?></p>
|
1705 |
+
<div class="options">
|
1706 |
+
<div>
|
1707 |
+
<?php if ( ! isset( $template['config']['options'] ) || ! is_array( $template['config']['options'] ) ) : ?>
|
1708 |
+
<span><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></span>
|
1709 |
+
<?php else : ?>
|
1710 |
+
<?php foreach ( $template['config']['options'] as $option ) : ?>
|
1711 |
+
<div style="margin-bottom: 10px;">
|
1712 |
+
<?php
|
1713 |
+
$name = sprintf( 'view[data][template_settings][%s][%s]', esc_attr($key), esc_attr($option->name) );
|
1714 |
+
$id = $key . '-' . $option->name;
|
1715 |
+
switch ( $option->type ) {
|
1716 |
+
case 'select':
|
1717 |
+
// Get default if not set
|
1718 |
+
if ( ! isset( $this->view['template_settings'][ $key ][ $option->name ] ) ) {
|
1719 |
+
$this->view['template_settings'][ $key ][ $option->name ] = $option->default;
|
1720 |
+
}
|
1721 |
+
if ( $option->label ) {
|
1722 |
+
printf( '<label for="%s">%s</label>', $id, $option->label );
|
1723 |
+
}
|
1724 |
+
printf( '<select id="%s" name="%s">', esc_attr($id), $name );
|
1725 |
+
foreach ( $option->values as $value ) {
|
1726 |
+
$selected = selected( $value->value, $this->view['template_settings'][ $key ][ $option->name ], false );
|
1727 |
+
printf( '<option value="%s" %s>%s</option>', esc_attr($value->value), $selected, esc_html($value->description) );
|
1728 |
+
}
|
1729 |
+
echo '</select>';
|
1730 |
+
break;
|
1731 |
+
case 'radio':
|
1732 |
+
if ( ! isset( $this->view['template_settings'][ $key ][ $option->name ] ) ) {
|
1733 |
+
$this->view['template_settings'][ $key ][ $option->name ] = $option->default;
|
1734 |
+
}
|
1735 |
+
foreach ( $option->values as $value ) {
|
1736 |
+
$checked = checked( $value->value, $this->view['template_settings'][ $key ][ $option->name ], false );
|
1737 |
+
printf( '<input type="radio" id="%s" name="%s" value="%s" %s>', esc_attr($id), $name, esc_attr($value->value), $checked );
|
1738 |
+
printf( '<label for="%s">%s</label>', esc_attr($id), esc_html($value->description) );
|
1739 |
+
}
|
1740 |
+
break;
|
1741 |
+
case 'colorpicker':
|
1742 |
+
if ( $option->label ) {
|
1743 |
+
printf( '<label for="%s">%s</label>', esc_attr($id), esc_html($option->label) );
|
1744 |
+
}
|
1745 |
+
$value = isset( $this->view['template_settings'][ $key ][ $option->name ] ) ? $this->view['template_settings'][ $key ][ $option->name ] : $option->default;
|
1746 |
+
printf( '<input type="text" class="wp-color-picker-field" data-alpha="true" id="%s" name="%s" value="%s">', esc_attr($id), $name, esc_attr($value) );
|
1747 |
+
break;
|
1748 |
+
default:
|
1749 |
+
do_action( 'wpmtst_views_render_template_option_' . $option->type, $this->view, $key, $option );
|
1750 |
+
break;
|
1751 |
+
}
|
1752 |
+
?>
|
1753 |
+
</div>
|
1754 |
+
<?php endforeach; ?>
|
1755 |
+
<?php endif; ?>
|
1756 |
+
</div>
|
1757 |
+
</div>
|
1758 |
+
<?php do_action('wpmtst_views_after_template_options', $this->view, $template, $key ); ?>
|
1759 |
+
</div>
|
1760 |
+
</li>
|
1761 |
+
<?php endforeach; ?>
|
1762 |
+
</ul>
|
1763 |
+
</div>
|
1764 |
+
</div>
|
1765 |
+
<?php do_action('wpmtst_views_after_template_list' ); ?>
|
1766 |
+
</td>
|
1767 |
+
<?php
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
private function render_field_layout() { ?>
|
1771 |
+
<td colspan="2">
|
1772 |
+
<div class="section-radios layout-section">
|
1773 |
+
<div class="radio-buttons">
|
1774 |
+
<ul class="radio-list layout-list">
|
1775 |
+
<li>
|
1776 |
+
<input type="radio" id="view-layout-normal" name="view[data][layout]" value="" <?php checked( false, $this->view['layout'] ); ?>>
|
1777 |
+
<label for="view-layout-normal"><?php esc_html_e( 'normal', 'strong-testimonials' ); ?></label>
|
1778 |
+
</li>
|
1779 |
+
<li>
|
1780 |
+
<input type="radio" id="view-layout-masonry" name="view[data][layout]" value="masonry" <?php checked( 'masonry', $this->view['layout'] ); ?>>
|
1781 |
+
<label for="view-layout-masonry"><?php esc_html_e( 'Masonry', 'strong-testimonials' ); ?> </label>
|
1782 |
+
</li>
|
1783 |
+
<li>
|
1784 |
+
<input type="radio"
|
1785 |
+
id="view-layout-columns"
|
1786 |
+
name="view[data][layout]"
|
1787 |
+
value="columns" <?php checked( 'columns', $this->view['layout'] ); ?>>
|
1788 |
+
<label for="view-layout-columns">
|
1789 |
+
<?php esc_html_e( 'columns', 'strong-testimonials' ); ?>
|
1790 |
+
</label>
|
1791 |
+
</li>
|
1792 |
+
<li>
|
1793 |
+
<input type="radio" id="view-layout-grid" name="view[data][layout]" value="grid" <?php checked( 'grid', $this->view['layout'] ); ?>>
|
1794 |
+
<label for="view-layout-grid"><?php esc_html_e( 'grid', 'strong-testimonials' ); ?></label>
|
1795 |
+
</li>
|
1796 |
+
</ul>
|
1797 |
+
</div>
|
1798 |
+
<div>
|
1799 |
+
<div class="radio-description" id="view-layout-info">
|
1800 |
+
<div class="layout-description view-layout-normal">
|
1801 |
+
<p><?php esc_html_e( 'A single column.', 'strong-testimonials' ); ?></p>
|
1802 |
+
</div>
|
1803 |
+
<div class="layout-description view-layout-masonry">
|
1804 |
+
<p><?php printf( __( 'A cascading, responsive grid using the jQuery plugin <a href="%s" target="_blank">Masonry</a>.', 'strong-testimonials' ), esc_url( 'http://masonry.desandro.com/' ) ); ?></p>
|
1805 |
+
<p><?php esc_html_e( 'The universal solution that works well regardless of testimonial lengths.', 'strong-testimonials' ); ?></p>
|
1806 |
+
<p><?php esc_html_e( 'Not compatible with pagination.', 'strong-testimonials' ); ?></p>
|
1807 |
+
</div>
|
1808 |
+
<div class="layout-description view-layout-columns">
|
1809 |
+
<p><?php printf( __( 'Using <a href="%s" target="_blank">CSS multi-column</a>. Fill from top to bottom, then over to next column.', 'strong-testimonials' ), esc_url( 'https://css-tricks.com/guide-responsive-friendly-css-columns/' ) ); ?></p>
|
1810 |
+
<p><?php esc_html_e( 'Works well with both long and short testimonials.', 'strong-testimonials' ); ?></p>
|
1811 |
+
<p><?php esc_html_e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
|
1812 |
+
</div>
|
1813 |
+
<div class="layout-description view-layout-grid">
|
1814 |
+
<p><?php
|
1815 |
+
$url = 'https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties';
|
1816 |
+
printf( __( 'Using <a href="%s" target="_blank">CSS flexbox</a>.', 'strong-testimonials' ), esc_url( $url ) );?>
|
1817 |
+
</p>
|
1818 |
+
<p><?php esc_html_e( 'Testimonials will be equal height so this works best when they are about the same length either naturally or using excerpts.', 'strong-testimonials' ); ?></p>
|
1819 |
+
<p><?php esc_html_e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
|
1820 |
+
</div>
|
1821 |
+
</div>
|
1822 |
+
<div class="radio-description options" id="column-count-wrapper">
|
1823 |
+
<div>
|
1824 |
+
<label for="view-column-count"><?php esc_html_e( 'Number of columns', 'strong-testimonials' ); ?></label>
|
1825 |
+
<select id="view-column-count" name="view[data][column_count]">
|
1826 |
+
<option value="2" <?php selected( $this->view['column_count'], 2 ); ?>>2</option>
|
1827 |
+
<option value="3" <?php selected( $this->view['column_count'], 3 ); ?>>3</option>
|
1828 |
+
<option value="4" <?php selected( $this->view['column_count'], 4 ); ?>>4</option>
|
1829 |
+
</select>
|
1830 |
+
</div>
|
1831 |
+
</div>
|
1832 |
+
</div>
|
1833 |
+
<div>
|
1834 |
+
<div class="layout-example view-layout-normal">
|
1835 |
+
<div class="example-container">
|
1836 |
+
<div class="box"><span>1</span></div>
|
1837 |
+
<div class="box size2"><span>2</span></div>
|
1838 |
+
<div class="box"><span>3</span></div>
|
1839 |
+
<div class="box size2"><span>4</span></div>
|
1840 |
+
<div class="box"><span>5</span></div>
|
1841 |
+
</div>
|
1842 |
+
</div>
|
1843 |
+
<div class="layout-example view-layout-masonry">
|
1844 |
+
<div class="example-container col-2">
|
1845 |
+
<div class="grid-sizer"></div>
|
1846 |
+
<div class="box"><span>1</span></div>
|
1847 |
+
<div class="box size2"><span>2</span></div>
|
1848 |
+
<div class="box"><span>3</span></div>
|
1849 |
+
<div class="box size3"><span>4</span></div>
|
1850 |
+
<div class="box"><span>5</span></div>
|
1851 |
+
<div class="box size2"><span>6</span></div>
|
1852 |
+
<div class="box"><span>7</span></div>
|
1853 |
+
<div class="box size3"><span>8</span></div>
|
1854 |
+
<div class="box"><span>9</span></div>
|
1855 |
+
</div>
|
1856 |
+
</div>
|
1857 |
+
<div class="layout-example view-layout-columns">
|
1858 |
+
<div class="example-container col-2">
|
1859 |
+
<div class="box"><span>1</span></div>
|
1860 |
+
<div class="box size2"><span>2</span></div>
|
1861 |
+
<div class="box"><span>3</span></div>
|
1862 |
+
<div class="box size3"><span>4</span></div>
|
1863 |
+
<div class="box"><span>5</span></div>
|
1864 |
+
<div class="box size2"><span>6</span></div>
|
1865 |
+
<div class="box"><span>7</span></div>
|
1866 |
+
<div class="box size3"><span>8</span></div>
|
1867 |
+
<div class="box"><span>9</span></div>
|
1868 |
+
</div>
|
1869 |
+
</div>
|
1870 |
+
<div class="layout-example view-layout-grid">
|
1871 |
+
<div class="example-container col-2">
|
1872 |
+
<div class="box"><span>1</span></div>
|
1873 |
+
<div class="box"><span>2</span></div>
|
1874 |
+
<div class="box"><span>3</span></div>
|
1875 |
+
<div class="box"><span>4</span></div>
|
1876 |
+
<div class="box"><span>5</span></div>
|
1877 |
+
<div class="box"><span>6</span></div>
|
1878 |
+
<div class="box"><span>7</span></div>
|
1879 |
+
<div class="box"><span>8</span></div>
|
1880 |
+
<div class="box"><span>9</span></div>
|
1881 |
+
</div>
|
1882 |
+
</div>
|
1883 |
+
</div>
|
1884 |
+
</div>
|
1885 |
+
</td>
|
1886 |
+
<?php
|
1887 |
+
}
|
1888 |
+
|
1889 |
+
private function render_field_background() { ?>
|
1890 |
+
<td>
|
1891 |
+
<div class="section-radios background-section">
|
1892 |
+
<div class="radio-buttons">
|
1893 |
+
<ul class="radio-list background-list">
|
1894 |
+
<li>
|
1895 |
+
<input type="radio" id="bg-none" name="view[data][background][type]" value="" <?php checked( $this->view['background']['type'], '' ); ?>>
|
1896 |
+
<label for="bg-none"><?php esc_html_e( 'inherit from theme', 'strong-testimonials' ); ?></label>
|
1897 |
+
</li>
|
1898 |
+
<li>
|
1899 |
+
<input type="radio" id="bg-single" name="view[data][background][type]" value="single" <?php checked( $this->view['background']['type'], 'single' ); ?>>
|
1900 |
+
<label for="bg-single"><?php esc_html_e( 'single color', 'strong-testimonials' ); ?></label>
|
1901 |
+
</li>
|
1902 |
+
<li>
|
1903 |
+
<input type="radio" id="bg-gradient" name="view[data][background][type]" value="gradient" <?php checked( $this->view['background']['type'], 'gradient' ); ?>>
|
1904 |
+
<label for="bg-gradient"><?php esc_html_e( 'gradient', 'strong-testimonials' ); ?></label>
|
1905 |
+
</li>
|
1906 |
+
<li>
|
1907 |
+
<input type="radio" id="bg-preset" name="view[data][background][type]" value="preset" <?php checked( $this->view['background']['type'], 'preset' ); ?>>
|
1908 |
+
<label for="bg-preset"><?php esc_html_e( 'preset', 'strong-testimonials' ); ?></label>
|
1909 |
+
</li>
|
1910 |
+
</ul>
|
1911 |
+
</div>
|
1912 |
+
<div class="radio-description" id="view-background-info">
|
1913 |
+
<div class="background-description bg-none">
|
1914 |
+
<div class="description-inner options">
|
1915 |
+
<div>
|
1916 |
+
<?php esc_html_e( 'No options', 'strong-testimonials' ); ?>
|
1917 |
+
</div>
|
1918 |
+
</div>
|
1919 |
+
</div>
|
1920 |
+
<div class="background-description bg-single">
|
1921 |
+
<div class="description-inner options">
|
1922 |
+
<div>
|
1923 |
+
<label>
|
1924 |
+
<input type="text" id="bg-color" name="view[data][background][color]" value="<?php echo esc_attr($this->view['background']['color']); ?>" class="wp-color-picker-field">
|
1925 |
+
</label>
|
1926 |
+
</div>
|
1927 |
+
</div>
|
1928 |
+
</div>
|
1929 |
+
<div class="background-description bg-gradient">
|
1930 |
+
<div class="description-inner options">
|
1931 |
+
<div>
|
1932 |
+
<div class="color-picker-wrap">
|
1933 |
+
<div><label for="bg-gradient1"><?php esc_html_e( 'From top', 'strong-testimonials' ); ?></label></div>
|
1934 |
+
<div><input type="text" id="bg-gradient1" name="view[data][background][gradient1]" value="<?php echo esc_attr($this->view['background']['gradient1']); ?>" class="wp-color-picker-field gradient"></div>
|
1935 |
+
</div>
|
1936 |
+
</div>
|
1937 |
+
</div>
|
1938 |
+
<div class="description-inner options">
|
1939 |
+
<div>
|
1940 |
+
<div class="color-picker-wrap">
|
1941 |
+
<div><label for ="bg-gradient2"><?php esc_html_e( 'To bottom', 'strong-testimonials' ); ?></label></div>
|
1942 |
+
<div><input type="text" id="bg-gradient2" name="view[data][background][gradient2]" value="<?php echo esc_attr($this->view['background']['gradient2']); ?>" class="wp-color-picker-field gradient"></div>
|
1943 |
+
</div>
|
1944 |
+
</div>
|
1945 |
+
</div>
|
1946 |
+
</div>
|
1947 |
+
|
1948 |
+
<div class="background-description bg-preset">
|
1949 |
+
<div class="description-inner options">
|
1950 |
+
<div>
|
1951 |
+
<label for="view-background-preset">
|
1952 |
+
<select id="view-background-preset" name="view[data][background][preset]">
|
1953 |
+
<?php
|
1954 |
+
$presets = wpmtst_get_background_presets();
|
1955 |
+
$current_preset = ( isset( $this->view['background']['preset'] ) && $this->view['background']['preset'] ) ? $this->view['background']['preset'] : '';
|
1956 |
+
echo '<option value="" ' . selected( $current_preset, '', false ) . '>—</option>';
|
1957 |
+
foreach ( $presets as $key => $preset ) {
|
1958 |
+
echo '<option value="' . esc_attr($key) . '" ' . selected( $current_preset, $key, false ) . '>' . esc_html($preset['label']) . '</option>';
|
1959 |
+
}
|
1960 |
+
?>
|
1961 |
+
</select>
|
1962 |
+
</label>
|
1963 |
+
</div>
|
1964 |
+
</div>
|
1965 |
+
</div>
|
1966 |
+
</div>
|
1967 |
+
</div>
|
1968 |
+
</td>
|
1969 |
+
|
1970 |
+
<td rowspan="2" class="rowspan">
|
1971 |
+
<div id="view-color-preview" class="table-cell">
|
1972 |
+
<div class="background-preview-wrap">
|
1973 |
+
<div id="background-preview">
|
1974 |
+
Lorem ipsum dolor sit amet, accusam complectitur an eos. No vix perpetua adolescens, vix vidisse maiorum
|
1975 |
+
in. No erat falli scripta qui, vis ubique scripta electram ad. Vix prompta adipisci no, ad vidisse
|
1976 |
+
expetendis.
|
1977 |
+
</div>
|
1978 |
+
</div>
|
1979 |
+
</div>
|
1980 |
+
</td>
|
1981 |
+
<?php
|
1982 |
+
}
|
1983 |
+
|
1984 |
+
private function render_field_color() { ?>
|
1985 |
+
<td>
|
1986 |
+
<div class="section-radios font-color-section">
|
1987 |
+
<div class="radio-buttons">
|
1988 |
+
<ul class="radio-list font-folor-list">
|
1989 |
+
<li>
|
1990 |
+
<input type="radio" id="fc-none" name="view[data][font-color][type]" value="" <?php checked( $this->view['font-color']['type'], '' ); ?>>
|
1991 |
+
<label for="fc-none"><?php esc_html_e( 'inherit from theme', 'strong-testimonials' ); ?></label>
|
1992 |
+
</li>
|
1993 |
+
<li>
|
1994 |
+
<input type="radio" id="fc-custom" name="view[data][font-color][type]" value="custom" <?php checked( $this->view['font-color']['type'], 'custom' ); ?>>
|
1995 |
+
<label for="fc-custom"><?php esc_html_e( 'custom', 'strong-testimonials' ); ?></label>
|
1996 |
+
</li>
|
1997 |
+
</ul>
|
1998 |
+
</div>
|
1999 |
+
<div class="radio-description" id="view-font-color-info">
|
2000 |
+
<div class="font-color-description fc-none">
|
2001 |
+
<div class="description-inner options">
|
2002 |
+
<div><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></div>
|
2003 |
+
</div>
|
2004 |
+
</div>
|
2005 |
+
<div class="font-color-description fc-custom">
|
2006 |
+
<div class="description-inner options">
|
2007 |
+
<div>
|
2008 |
+
<label>
|
2009 |
+
<input type="text" id="fc-color" name="view[data][font-color][color]" value="<?php echo esc_attr($this->view['font-color']['color']); ?>" class="wp-color-picker-field">
|
2010 |
+
</label>
|
2011 |
+
</div>
|
2012 |
+
</div>
|
2013 |
+
</div>
|
2014 |
+
</div>
|
2015 |
+
</div>
|
2016 |
+
</td>
|
2017 |
+
<?php
|
2018 |
+
}
|
2019 |
+
|
2020 |
+
private function render_field_classes() { ?>
|
2021 |
+
<td colspan="2">
|
2022 |
+
<div class="then then_display then_form then_slideshow input" style="display: none;">
|
2023 |
+
<input type="text" id="view-class" class="long inline" name="view[data][class]" value="<?php echo esc_attr($this->view['class']); ?>">
|
2024 |
+
<p class="inline description tall">
|
2025 |
+
<?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?>
|
2026 |
+
<?php esc_html_e( 'Separate class names by spaces.', 'strong-testimonials' ); ?>
|
2027 |
+
</p>
|
2028 |
+
</div>
|
2029 |
+
</td>
|
2030 |
+
<?php
|
2031 |
+
}
|
2032 |
+
|
2033 |
+
private function render_field_divi() { ?>
|
2034 |
+
<td>
|
2035 |
+
<div class="row">
|
2036 |
+
<div class="row-inner">
|
2037 |
+
<input type="checkbox" id="view-divi_builder" class="if toggle checkbox" name="view[data][divi_builder]" value="1" <?php checked( $this->view['divi_builder'] ); ?>/>
|
2038 |
+
<label for="view-divi_builder"><?php esc_html_e( 'Check this if adding this view (via shortcode or widget) using the Visual Builder in <b>Divi Builder version 2</b>.', 'strong-testimonials' ); ?></label>
|
2039 |
+
<p class="description short"><?php esc_html_e( 'Not required if simply adding this view in the default editor.', 'strong-testimonials' ); ?></p>
|
2040 |
+
<p class="description short"><?php esc_html_e( 'Not required if simply adding this view in the <b>Divi theme</b> using either the default editor or Divi Builder.', 'strong-testimonials' ); ?></p>
|
2041 |
+
</div>
|
2042 |
+
</div>
|
2043 |
+
</td>
|
2044 |
+
<?php
|
2045 |
+
}
|
2046 |
+
}
|
admin/class-strong-testimonials-list-table.php
CHANGED
@@ -161,8 +161,8 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
161 |
|
162 |
if ( empty( $this->modes ) ) {
|
163 |
$this->modes = array(
|
164 |
-
'list' =>
|
165 |
-
'excerpt' =>
|
166 |
);
|
167 |
}
|
168 |
}
|
@@ -367,11 +367,11 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
367 |
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '">';
|
368 |
}
|
369 |
?>
|
370 |
-
<p class="search-box">
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
</p>
|
375 |
<?php
|
376 |
}
|
377 |
|
@@ -473,14 +473,14 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
473 |
echo "<option value='-1' selected='selected'>" . esc_html__( 'Bulk Actions', 'strong-testimonials' ) . "</option>\n";
|
474 |
|
475 |
foreach ( $this->_actions as $name => $title ) {
|
476 |
-
$class = 'edit' == $name ? '
|
477 |
|
478 |
-
echo "\t<option value='$name'$class
|
479 |
}
|
480 |
|
481 |
echo "</select>\n";
|
482 |
|
483 |
-
submit_button(
|
484 |
echo "\n";
|
485 |
}
|
486 |
|
@@ -607,7 +607,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
607 |
selected( $m, $year . $month, false ),
|
608 |
esc_attr( $arc_row->year . $month ),
|
609 |
/* translators: 1: month name, 2: 4-digit year */
|
610 |
-
sprintf( '%1$s %2$d', $wp_locale->get_month( $month ), $year )
|
611 |
);
|
612 |
}
|
613 |
?>
|
@@ -634,10 +634,11 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
634 |
$classes[] = 'current';
|
635 |
}
|
636 |
printf(
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
|
|
641 |
);
|
642 |
}
|
643 |
?>
|
@@ -661,7 +662,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
661 |
echo '<strong>';
|
662 |
}
|
663 |
|
664 |
-
echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . '</span></a>';
|
665 |
|
666 |
if ( $pending_comments ) {
|
667 |
echo '</strong>';
|
@@ -925,7 +926,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
925 |
$current_url = remove_query_arg( 'paged', $current_url );
|
926 |
|
927 |
if ( isset( $_GET['orderby'] ) ) {
|
928 |
-
$current_orderby = $_GET['orderby'];
|
929 |
} else {
|
930 |
$current_orderby = '';
|
931 |
}
|
@@ -938,7 +939,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
938 |
|
939 |
if ( ! empty( $columns['cb'] ) ) {
|
940 |
static $cb_counter = 1;
|
941 |
-
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' .
|
942 |
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox">';
|
943 |
$cb_counter++;
|
944 |
}
|
@@ -997,7 +998,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
997 |
$this->display_tablenav( 'top' );
|
998 |
|
999 |
?>
|
1000 |
-
<table class="wp-list-table <?php echo implode(
|
1001 |
<thead>
|
1002 |
<tr>
|
1003 |
<?php $this->print_column_headers(); ?>
|
@@ -1007,7 +1008,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
1007 |
<tbody id="the-list"
|
1008 |
<?php
|
1009 |
if ( $singular ) {
|
1010 |
-
echo " data-wp-lists='list
|
1011 |
}
|
1012 |
?>
|
1013 |
>
|
@@ -1084,7 +1085,7 @@ if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
|
1084 |
if ( $this->has_items() ) {
|
1085 |
$this->display_rows();
|
1086 |
} else {
|
1087 |
-
echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
|
1088 |
$this->no_items();
|
1089 |
echo '</td></tr>';
|
1090 |
}
|
161 |
|
162 |
if ( empty( $this->modes ) ) {
|
163 |
$this->modes = array(
|
164 |
+
'list' => esc_html__( 'List View', 'strong-testimonials' ),
|
165 |
+
'excerpt' => esc_html__( 'Excerpt View', 'strong-testimonials' ),
|
166 |
);
|
167 |
}
|
168 |
}
|
367 |
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '">';
|
368 |
}
|
369 |
?>
|
370 |
+
<p class="search-box">
|
371 |
+
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $text ); ?>:</label>
|
372 |
+
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>">
|
373 |
+
<?php submit_button( esc_html( $text ), 'button', '', false, array( 'id' => 'search-submit' ) ); ?>
|
374 |
+
</p>
|
375 |
<?php
|
376 |
}
|
377 |
|
473 |
echo "<option value='-1' selected='selected'>" . esc_html__( 'Bulk Actions', 'strong-testimonials' ) . "</option>\n";
|
474 |
|
475 |
foreach ( $this->_actions as $name => $title ) {
|
476 |
+
$class = 'edit' == $name ? 'hide-if-no-js' : '';
|
477 |
|
478 |
+
echo "\t<option value='" . esc_attr( $name ) . "' class='" . esc_attr($class) . "'>" . esc_html( $title ) . "</option>\n";
|
479 |
}
|
480 |
|
481 |
echo "</select>\n";
|
482 |
|
483 |
+
submit_button( esc_html__( 'Apply', 'strong-testimonials' ), 'action', '', false, array( 'id' => "doaction$two" ) );
|
484 |
echo "\n";
|
485 |
}
|
486 |
|
607 |
selected( $m, $year . $month, false ),
|
608 |
esc_attr( $arc_row->year . $month ),
|
609 |
/* translators: 1: month name, 2: 4-digit year */
|
610 |
+
sprintf( '%1$s %2$d', esc_html( $wp_locale->get_month( $month ) ), esc_html( $year) )
|
611 |
);
|
612 |
}
|
613 |
?>
|
634 |
$classes[] = 'current';
|
635 |
}
|
636 |
printf(
|
637 |
+
"<a href='%s' class='%s' id='view-switch-%s'><span class='screen-reader-text'>%s</span></a>\n",
|
638 |
+
esc_url(add_query_arg('mode', $mode)),
|
639 |
+
esc_attr(implode(' ', $classes)),
|
640 |
+
esc_attr($mode),
|
641 |
+
esc_html($title)
|
642 |
);
|
643 |
}
|
644 |
?>
|
662 |
echo '<strong>';
|
663 |
}
|
664 |
|
665 |
+
echo "<a href='" . esc_url( add_query_arg( 'p', absint( $post_id ), admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . absint( number_format_i18n( get_comments_number() ) ) . '</span></a>';
|
666 |
|
667 |
if ( $pending_comments ) {
|
668 |
echo '</strong>';
|
926 |
$current_url = remove_query_arg( 'paged', $current_url );
|
927 |
|
928 |
if ( isset( $_GET['orderby'] ) ) {
|
929 |
+
$current_orderby = sanitize_text_field( $_GET['orderby'] );
|
930 |
} else {
|
931 |
$current_orderby = '';
|
932 |
}
|
939 |
|
940 |
if ( ! empty( $columns['cb'] ) ) {
|
941 |
static $cb_counter = 1;
|
942 |
+
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . esc_html__( 'Select All', 'strong-testimonials' ) . '</label>'
|
943 |
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox">';
|
944 |
$cb_counter++;
|
945 |
}
|
998 |
$this->display_tablenav( 'top' );
|
999 |
|
1000 |
?>
|
1001 |
+
<table class="wp-list-table <?php echo esc_attr(implode(' ', $this->get_table_classes())); ?>">
|
1002 |
<thead>
|
1003 |
<tr>
|
1004 |
<?php $this->print_column_headers(); ?>
|
1008 |
<tbody id="the-list"
|
1009 |
<?php
|
1010 |
if ( $singular ) {
|
1011 |
+
echo " data-wp-lists='list:" . esc_attr( $singular ) . "'";
|
1012 |
}
|
1013 |
?>
|
1014 |
>
|
1085 |
if ( $this->has_items() ) {
|
1086 |
$this->display_rows();
|
1087 |
} else {
|
1088 |
+
echo '<tr class="no-items"><td class="colspanchange" colspan="' . absint( $this->get_column_count() ) . '">';
|
1089 |
$this->no_items();
|
1090 |
echo '</td></tr>';
|
1091 |
}
|
admin/class-strong-testimonials-page-shortcodes.php
CHANGED
@@ -31,46 +31,46 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
31 |
?>
|
32 |
<div class="wrap wpmtst shortcodes has-stars">
|
33 |
|
34 |
-
<h1><?php
|
35 |
|
36 |
-
<h2><?php
|
37 |
|
38 |
<p>
|
39 |
-
<?php echo wp_kses_post(
|
40 |
<?php printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ), esc_html__( 'Go to views', 'strong-testimonials' ) ); ?>
|
41 |
</p>
|
42 |
|
43 |
-
<h2><?php
|
44 |
|
45 |
-
<p><?php printf(
|
46 |
|
47 |
<table class="form-table shortcodes" cellpadding="0" cellspacing="0">
|
48 |
<tr>
|
49 |
<td>
|
50 |
-
<p><?php
|
51 |
</td>
|
52 |
<td class="shortcode">
|
53 |
<?php /* translators: %s is a shortcode */ ?>
|
54 |
<p>
|
55 |
-
<?php printf(
|
56 |
</p>
|
57 |
</td>
|
58 |
</tr>
|
59 |
<tr>
|
60 |
<td>
|
61 |
<?php /* translators: %s is a shortcode attribute */ ?>
|
62 |
-
<p><?php printf(
|
63 |
</td>
|
64 |
<td class="shortcode">
|
65 |
<?php /* translators: %s is a shortcode */ ?>
|
66 |
<p>
|
67 |
-
<?php printf(
|
68 |
</p>
|
69 |
</td>
|
70 |
</tr>
|
71 |
</table>
|
72 |
|
73 |
-
<h2><?php
|
74 |
|
75 |
<p>
|
76 |
<?php /* translators: %s is a shortcode */ ?>
|
@@ -80,7 +80,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
80 |
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
81 |
<tr>
|
82 |
<td>
|
83 |
-
<p><?php
|
84 |
<p class="description"><?php _e( 'You must use the closing slash <code>/</code> if using the shortcode with content elsewhere on your page.', 'strong-testimonials' ); ?></p>
|
85 |
</td>
|
86 |
<td class="has-inner">
|
@@ -91,9 +91,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
91 |
<tr>
|
92 |
<td>
|
93 |
<div class="strong-rating-wrapper average">
|
94 |
-
<span class="strong-rating-title"
|
95 |
<?php echo $stars; ?>
|
96 |
-
<span class="strong-rating-summary"
|
97 |
</div>
|
98 |
</td>
|
99 |
</tr>
|
@@ -105,8 +105,8 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
105 |
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
106 |
<tr>
|
107 |
<td>
|
108 |
-
<p><?php
|
109 |
-
<p><?php
|
110 |
<p><code>{title}</code><br><code>{stars}</code><br><code>{summary}</code></p>
|
111 |
</td>
|
112 |
<td class="has-inner">
|
@@ -117,9 +117,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
117 |
<tr>
|
118 |
<td>
|
119 |
<div class="strong-rating-wrapper average">
|
120 |
-
<span class="strong-rating-title"
|
121 |
<?php echo $stars; ?>
|
122 |
-
<span class="strong-rating-summary"
|
123 |
</div>
|
124 |
</td>
|
125 |
</tr>
|
@@ -131,7 +131,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
131 |
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
132 |
<tr>
|
133 |
<td>
|
134 |
-
<p><?php
|
135 |
<p><code>{title2}</code><br><code>{summary2}</code></p>
|
136 |
</td>
|
137 |
<td class="has-inner">
|
@@ -142,9 +142,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
142 |
<tr>
|
143 |
<td>
|
144 |
<div class="strong-rating-wrapper average">
|
145 |
-
<span class="strong-rating-title"
|
146 |
<?php echo $stars; ?>
|
147 |
-
<span class="strong-rating-summary"
|
148 |
</div>
|
149 |
</td>
|
150 |
<tr>
|
@@ -156,18 +156,18 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
156 |
<table class="form-table shortcodes average">
|
157 |
<tr>
|
158 |
<td>
|
159 |
-
<p><?php
|
160 |
</td>
|
161 |
<td class="has-inner">
|
162 |
<table class="inner" cellpadding="0" cellspacing="0">
|
163 |
<tr>
|
164 |
-
<td class="shortcode">[testimonial_average_rating]{stars} Our average rating is <b>{summary2}</b>[/testimonial_average_rating]</td>
|
165 |
</tr>
|
166 |
<tr>
|
167 |
<td>
|
168 |
<div class="strong-rating-wrapper average">
|
169 |
<?php echo $stars; ?>
|
170 |
-
Our average rating is
|
171 |
</div>
|
172 |
</td>
|
173 |
</tr>
|
@@ -210,7 +210,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
210 |
</tr>
|
211 |
<tr>
|
212 |
<td>
|
213 |
-
<div class="strong-rating-wrapper average"><span class="strong-rating-average"
|
214 |
</td>
|
215 |
</tr>
|
216 |
</table>
|
@@ -218,11 +218,11 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
218 |
</tr>
|
219 |
</table>
|
220 |
|
221 |
-
|
222 |
<tr>
|
223 |
<td>
|
224 |
<p><code>decimals</code></p>
|
225 |
-
|
226 |
|
227 |
</td>
|
228 |
<td class="has-inner">
|
@@ -234,7 +234,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
234 |
<td>
|
235 |
<div class="strong-rating-wrapper average block"><span class="strong-rating-title">Average Rating:</span>
|
236 |
<?php echo $stars; ?>
|
237 |
-
<span class="strong-rating-summary"
|
238 |
</div>
|
239 |
</td>
|
240 |
</tr>
|
@@ -255,7 +255,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
255 |
</tr>
|
256 |
<tr>
|
257 |
<td>
|
258 |
-
<div class="strong-rating-wrapper average"><span class="strong-rating-count"
|
259 |
</td>
|
260 |
</tr>
|
261 |
</table>
|
@@ -263,26 +263,26 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
263 |
</tr>
|
264 |
</table>
|
265 |
|
266 |
-
|
267 |
<tr>
|
268 |
<td>
|
269 |
<p><code>field</code></p>
|
270 |
-
|
271 |
-
|
272 |
</td>
|
273 |
<td class="has-inner">
|
274 |
<table class="inner" cellpadding="0" cellspacing="0">
|
275 |
<tr>
|
276 |
<td class="shortcode">[testimonial_average_rating field="rating" /]</td>
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
</tr>
|
281 |
<tr>
|
282 |
<td>
|
283 |
-
<div class="strong-rating-wrapper average block"><span class="strong-rating-title"
|
284 |
<?php echo $stars; ?>
|
285 |
-
<span class="strong-rating-summary"
|
286 |
</div>
|
287 |
</td>
|
288 |
</tr>
|
@@ -303,9 +303,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
303 |
</tr>
|
304 |
<tr>
|
305 |
<td>
|
306 |
-
<div class="strong-rating-wrapper average block"><span class="strong-rating-title"
|
307 |
<?php echo $stars; ?>
|
308 |
-
<span class="strong-rating-summary"
|
309 |
</div>
|
310 |
</td>
|
311 |
</tr>
|
@@ -326,9 +326,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
326 |
</tr>
|
327 |
<tr>
|
328 |
<td>
|
329 |
-
<div class="strong-rating-wrapper average centered"><span class="strong-rating-title"
|
330 |
<?php echo $stars; ?>
|
331 |
-
<span class="strong-rating-summary"
|
332 |
</div>
|
333 |
</td>
|
334 |
</tr>
|
@@ -341,7 +341,7 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
341 |
<tr>
|
342 |
<td>
|
343 |
<p><code>rounded</code></p>
|
344 |
-
<p class="description"
|
345 |
</td>
|
346 |
<td class="has-inner">
|
347 |
<table class="inner" cellpadding="0" cellspacing="0">
|
@@ -350,9 +350,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
350 |
</tr>
|
351 |
<tr>
|
352 |
<td>
|
353 |
-
<div class="strong-rating-wrapper average"><span class="strong-rating-title"
|
354 |
<?php echo $stars_rounded; ?>
|
355 |
-
<span class="strong-rating-summary"
|
356 |
</div>
|
357 |
</td>
|
358 |
</tr>
|
@@ -373,9 +373,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
373 |
</tr>
|
374 |
<tr>
|
375 |
<td>
|
376 |
-
<div class="strong-rating-wrapper average block centered"><span class="strong-rating-title"
|
377 |
<?php echo $stars; ?>
|
378 |
-
<span class="strong-rating-summary"
|
379 |
</div>
|
380 |
</td>
|
381 |
</tr>
|
@@ -397,9 +397,9 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
397 |
<tr>
|
398 |
<td>
|
399 |
<span class="strong-rating-wrapper average">
|
400 |
-
<span class="strong-rating-title"
|
401 |
<?php echo $stars; ?>
|
402 |
-
<span class="strong-rating-summary"
|
403 |
</span>
|
404 |
</td>
|
405 |
</tr>
|
31 |
?>
|
32 |
<div class="wrap wpmtst shortcodes has-stars">
|
33 |
|
34 |
+
<h1><?php esc_html_e( 'Shortcodes', 'strong-testimonials' ); ?></h1>
|
35 |
|
36 |
+
<h2><?php esc_html_e( 'Testimonial Views', 'strong-testimonials' ); ?></h2>
|
37 |
|
38 |
<p>
|
39 |
+
<?php echo wp_kses_post( esc_html_e( 'Each view has a unique shortcode like ', 'strong-testimonials' ) ); ?><code>[testimonial_view id="1"]</code>.
|
40 |
<?php printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ), esc_html__( 'Go to views', 'strong-testimonials' ) ); ?>
|
41 |
</p>
|
42 |
|
43 |
+
<h2><?php esc_html_e( 'Testimonial Count', 'strong-testimonials' ); ?></h2>
|
44 |
|
45 |
+
<p><?php printf( esc_html__( 'Use %s to display the number of testimonials.', 'strong-testimonials' ), '<code>[testimonial_count]</code>' ); ?></p>
|
46 |
|
47 |
<table class="form-table shortcodes" cellpadding="0" cellspacing="0">
|
48 |
<tr>
|
49 |
<td>
|
50 |
+
<p><?php esc_html_e( 'Default', 'strong-testimonials' ); ?></p>
|
51 |
</td>
|
52 |
<td class="shortcode">
|
53 |
<?php /* translators: %s is a shortcode */ ?>
|
54 |
<p>
|
55 |
+
<?php printf( esc_html__( 'Read some of our %s testimonials!', 'strong-testimonials' ), '[testimonial_count]' ); ?>
|
56 |
</p>
|
57 |
</td>
|
58 |
</tr>
|
59 |
<tr>
|
60 |
<td>
|
61 |
<?php /* translators: %s is a shortcode attribute */ ?>
|
62 |
+
<p><?php printf( esc_html__( 'To count for a specific category, add the %s attribute with the category slug.', 'strong-testimonials' ), '<code>category</code>' ); ?>
|
63 |
</td>
|
64 |
<td class="shortcode">
|
65 |
<?php /* translators: %s is a shortcode */ ?>
|
66 |
<p>
|
67 |
+
<?php printf( esc_html__( 'Here\'s what %s local clients say', 'strong-testimonials' ), '[testimonial_count category="local"]' ); ?>
|
68 |
</p>
|
69 |
</td>
|
70 |
</tr>
|
71 |
</table>
|
72 |
|
73 |
+
<h2><?php esc_html_e( 'Average Rating', 'strong-testimonials' ); ?></h2>
|
74 |
|
75 |
<p>
|
76 |
<?php /* translators: %s is a shortcode */ ?>
|
80 |
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
81 |
<tr>
|
82 |
<td>
|
83 |
+
<p><?php esc_html_e( 'Default', 'strong-testimonials' ); ?></p>
|
84 |
<p class="description"><?php _e( 'You must use the closing slash <code>/</code> if using the shortcode with content elsewhere on your page.', 'strong-testimonials' ); ?></p>
|
85 |
</td>
|
86 |
<td class="has-inner">
|
91 |
<tr>
|
92 |
<td>
|
93 |
<div class="strong-rating-wrapper average">
|
94 |
+
<span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
95 |
<?php echo $stars; ?>
|
96 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)','strong-testimonials'); ?></span>
|
97 |
</div>
|
98 |
</td>
|
99 |
</tr>
|
105 |
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
106 |
<tr>
|
107 |
<td>
|
108 |
+
<p><?php esc_html_e( 'Customize using content tags.', 'strong-testimonials' ); ?></p>
|
109 |
+
<p><?php esc_html_e( 'Default:', 'strong-testimonials' ); ?></p>
|
110 |
<p><code>{title}</code><br><code>{stars}</code><br><code>{summary}</code></p>
|
111 |
</td>
|
112 |
<td class="has-inner">
|
117 |
<tr>
|
118 |
<td>
|
119 |
<div class="strong-rating-wrapper average">
|
120 |
+
<span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
121 |
<?php echo $stars; ?>
|
122 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)','strong-testimonials'); ?></span>
|
123 |
</div>
|
124 |
</td>
|
125 |
</tr>
|
131 |
<table class="form-table shortcodes average" cellpadding="0" cellspacing="0">
|
132 |
<tr>
|
133 |
<td>
|
134 |
+
<p><?php esc_html_e( 'Alternate content tags.', 'strong-testimonials' ); ?></p>
|
135 |
<p><code>{title2}</code><br><code>{summary2}</code></p>
|
136 |
</td>
|
137 |
<td class="has-inner">
|
142 |
<tr>
|
143 |
<td>
|
144 |
<div class="strong-rating-wrapper average">
|
145 |
+
<span class="strong-rating-title"><?php esc_html_e( 'Average of 9 Ratings:', 'strong-testimonials' ); ?></span>
|
146 |
<?php echo $stars; ?>
|
147 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars', 'strong-testimonials' ); ?></span>
|
148 |
</div>
|
149 |
</td>
|
150 |
<tr>
|
156 |
<table class="form-table shortcodes average">
|
157 |
<tr>
|
158 |
<td>
|
159 |
+
<p><?php esc_html_e( 'Insert tags into your custom content.', 'strong-testimonials' ); ?></p>
|
160 |
</td>
|
161 |
<td class="has-inner">
|
162 |
<table class="inner" cellpadding="0" cellspacing="0">
|
163 |
<tr>
|
164 |
+
<td class="shortcode">[testimonial_average_rating]{stars}<?php esc_html( 'Our average rating is ', 'strong-testimonials' ); ?> <b>{summary2}</b>[/testimonial_average_rating]</td>
|
165 |
</tr>
|
166 |
<tr>
|
167 |
<td>
|
168 |
<div class="strong-rating-wrapper average">
|
169 |
<?php echo $stars; ?>
|
170 |
+
<?php esc_html_e( 'Our average rating is ', 'strong-testimonials' ); ?><b><span class="strong-rating-summary"><?php esc_html_e( '4.3 stars', 'strong-testimonials' ); ?></span></b>
|
171 |
</div>
|
172 |
</td>
|
173 |
</tr>
|
210 |
</tr>
|
211 |
<tr>
|
212 |
<td>
|
213 |
+
<div class="strong-rating-wrapper average"><span class="strong-rating-average"><?php esc_html_e( '4.3', 'strong-testimonials' ); ?></span></div>
|
214 |
</td>
|
215 |
</tr>
|
216 |
</table>
|
218 |
</tr>
|
219 |
</table>
|
220 |
|
221 |
+
<table class="form-table shortcodes average">
|
222 |
<tr>
|
223 |
<td>
|
224 |
<p><code>decimals</code></p>
|
225 |
+
<p class="description"><?php esc_html_e( 'If you need to display multiple decimals for average rating you have to set a number to decimal.', 'strong-testimonials' ); ?></p>
|
226 |
|
227 |
</td>
|
228 |
<td class="has-inner">
|
234 |
<td>
|
235 |
<div class="strong-rating-wrapper average block"><span class="strong-rating-title">Average Rating:</span>
|
236 |
<?php echo $stars; ?>
|
237 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.333 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
238 |
</div>
|
239 |
</td>
|
240 |
</tr>
|
255 |
</tr>
|
256 |
<tr>
|
257 |
<td>
|
258 |
+
<div class="strong-rating-wrapper average"><span class="strong-rating-count"><?php esc_html_e( '9', 'strong-testimonials' ); ?></span></div>
|
259 |
</td>
|
260 |
</tr>
|
261 |
</table>
|
263 |
</tr>
|
264 |
</table>
|
265 |
|
266 |
+
<table class="form-table shortcodes average">
|
267 |
<tr>
|
268 |
<td>
|
269 |
<p><code>field</code></p>
|
270 |
+
<p class="description"><?php esc_html_e( 'If using multiple rating fields, you can specify the specific field you need.', 'strong-testimonials' ); ?></p>
|
271 |
+
<p class="description"><?php esc_html_e( 'If using multiple rating fields, you can use "all" to use all the rating fields.', 'strong-testimonials' ); ?></p>
|
272 |
</td>
|
273 |
<td class="has-inner">
|
274 |
<table class="inner" cellpadding="0" cellspacing="0">
|
275 |
<tr>
|
276 |
<td class="shortcode">[testimonial_average_rating field="rating" /]</td>
|
277 |
+
</tr>
|
278 |
+
<tr>
|
279 |
+
<td class="shortcode">[testimonial_average_rating field="all" /]</td>
|
280 |
</tr>
|
281 |
<tr>
|
282 |
<td>
|
283 |
+
<div class="strong-rating-wrapper average block"><span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
284 |
<?php echo $stars; ?>
|
285 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
286 |
</div>
|
287 |
</td>
|
288 |
</tr>
|
303 |
</tr>
|
304 |
<tr>
|
305 |
<td>
|
306 |
+
<div class="strong-rating-wrapper average block"><span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
307 |
<?php echo $stars; ?>
|
308 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
309 |
</div>
|
310 |
</td>
|
311 |
</tr>
|
326 |
</tr>
|
327 |
<tr>
|
328 |
<td>
|
329 |
+
<div class="strong-rating-wrapper average centered"><span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
330 |
<?php echo $stars; ?>
|
331 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
332 |
</div>
|
333 |
</td>
|
334 |
</tr>
|
341 |
<tr>
|
342 |
<td>
|
343 |
<p><code>rounded</code></p>
|
344 |
+
<p class="description"><?php esc_html_e( 'Round the rating(ex.: from 4.3 -> 4 or 4.7->5)', 'strong-testimonials' ); ?></p>
|
345 |
</td>
|
346 |
<td class="has-inner">
|
347 |
<table class="inner" cellpadding="0" cellspacing="0">
|
350 |
</tr>
|
351 |
<tr>
|
352 |
<td>
|
353 |
+
<div class="strong-rating-wrapper average"><span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
354 |
<?php echo $stars_rounded; ?>
|
355 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
356 |
</div>
|
357 |
</td>
|
358 |
</tr>
|
373 |
</tr>
|
374 |
<tr>
|
375 |
<td>
|
376 |
+
<div class="strong-rating-wrapper average block centered"><span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
377 |
<?php echo $stars; ?>
|
378 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
379 |
</div>
|
380 |
</td>
|
381 |
</tr>
|
397 |
<tr>
|
398 |
<td>
|
399 |
<span class="strong-rating-wrapper average">
|
400 |
+
<span class="strong-rating-title"><?php esc_html_e( 'Average Rating:', 'strong-testimonials' ); ?></span>
|
401 |
<?php echo $stars; ?>
|
402 |
+
<span class="strong-rating-summary"><?php esc_html_e( '4.3 stars (based on 9 ratings)', 'strong-testimonials' ); ?></span>
|
403 |
</span>
|
404 |
</td>
|
405 |
</tr>
|
admin/class-strong-testimonials-post-editor.php
CHANGED
@@ -36,7 +36,7 @@ class Strong_Testimonials_Post_Editor {
|
|
36 |
public static function add_meta_boxes() {
|
37 |
add_meta_box(
|
38 |
'details',
|
39 |
-
|
40 |
array( __CLASS__, 'meta_options' ),
|
41 |
'wpm-testimonial',
|
42 |
'normal',
|
@@ -58,7 +58,7 @@ class Strong_Testimonials_Post_Editor {
|
|
58 |
<table class="options">
|
59 |
<tr>
|
60 |
<td colspan="2">
|
61 |
-
<p><?php
|
62 |
</td>
|
63 |
</tr>
|
64 |
<?php
|
@@ -150,8 +150,7 @@ class Strong_Testimonials_Post_Editor {
|
|
150 |
* @param $is_new
|
151 |
*/
|
152 |
private static function meta_option__text( $field, $post, $is_new ) {
|
153 |
-
printf( '<input id="%2$s" type="%1$s" class="custom-input" name="custom[%2$s]" value="%3$s">',
|
154 |
-
$field['input_type'], $field['name'], esc_attr( $post->{$field['name']} ) );
|
155 |
}
|
156 |
|
157 |
/**
|
@@ -179,32 +178,31 @@ class Strong_Testimonials_Post_Editor {
|
|
179 |
private static function meta_option__url( $field, $post, $is_new ) {
|
180 |
?>
|
181 |
<div class="input-url">
|
182 |
-
<?php printf( '<input id="%2$s" type="%1$s" class="custom-input" name="custom[%2$s]" value="%3$s" size="">',
|
183 |
-
$field['input_type'], $field['name'], esc_attr( $post->{$field['name']} ) ); ?>
|
184 |
</div>
|
185 |
<div class="input-links">
|
186 |
<div class="input-nofollow">
|
187 |
<label for="custom_nofollow"><code>rel="nofollow"</code></label>
|
188 |
<select id="custom_nofollow" name="custom[nofollow]">
|
189 |
-
<option value="default" <?php selected( $post->nofollow, 'default' ); ?>><?php
|
190 |
-
<option value="yes" <?php selected( $post->nofollow, 'yes' ); ?>><?php
|
191 |
-
<option value="no" <?php selected( $post->nofollow, 'no' ); ?>><?php
|
192 |
</select>
|
193 |
</div>
|
194 |
<div class="input-noopener">
|
195 |
<label for="custom_noopener"><code>rel="noopener"</code></label>
|
196 |
<select id="custom_noopener" name="custom[noopener]">
|
197 |
-
<option value="default" <?php selected( $post->noopener, 'default' ); ?>><?php
|
198 |
-
<option value="yes" <?php selected( $post->noopener, 'yes' ); ?>><?php
|
199 |
-
<option value="no" <?php selected( $post->noopener, 'no' ); ?>><?php
|
200 |
</select>
|
201 |
</div>
|
202 |
<div class="input-noreferrer">
|
203 |
<label for="custom_noreferrer"><code>rel="noreferrer"</code></label>
|
204 |
<select id="custom_noopener" name="custom[noreferrer]">
|
205 |
-
<option value="default" <?php selected( $post->noreferrer, 'default' ); ?>><?php
|
206 |
-
<option value="yes" <?php selected( $post->noreferrer, 'yes' ); ?>><?php
|
207 |
-
<option value="no" <?php selected( $post->noreferrer, 'no' ); ?>><?php
|
208 |
</select>
|
209 |
</div>
|
210 |
<?php
|
@@ -218,8 +216,7 @@ class Strong_Testimonials_Post_Editor {
|
|
218 |
* @param $is_new
|
219 |
*/
|
220 |
private static function meta_option__checkbox( $field, $post, $is_new ) {
|
221 |
-
printf( '<input id="%2$s" type="%1$s" class="custom-input" name="custom[%2$s]" value="%3$s" %4$s>',
|
222 |
-
$field['input_type'], $field['name'], 1, checked( $post->{$field['name']}, 1, false ) );
|
223 |
}
|
224 |
|
225 |
/**
|
@@ -235,10 +232,10 @@ class Strong_Testimonials_Post_Editor {
|
|
235 |
$rating = 0;
|
236 |
}
|
237 |
?>
|
238 |
-
<div class="edit-rating-box hide-if-no-js" data-field="<?php echo $field['name']; ?>">
|
239 |
|
240 |
<?php wp_nonce_field( 'editrating', "edit-{$field['name']}-nonce", false ); ?>
|
241 |
-
<input type="hidden" class="current-rating" value="<?php echo $rating; ?>">
|
242 |
|
243 |
<!-- form -->
|
244 |
<div class="rating-form" style="<?php echo ( $is_new ) ? 'display: inline-block;' : 'display: none;'; ?>">
|
@@ -285,7 +282,7 @@ class Strong_Testimonials_Post_Editor {
|
|
285 |
if ( shortcode_exists( $shortcode ) ) {
|
286 |
echo do_shortcode( $field['shortcode_on_display'] );
|
287 |
} else {
|
288 |
-
echo '<div class="custom-input not-found">' . sprintf(
|
289 |
}
|
290 |
}
|
291 |
|
@@ -300,8 +297,7 @@ class Strong_Testimonials_Post_Editor {
|
|
300 |
}
|
301 |
|
302 |
$post_id = absint( $_POST['post_ID'] );
|
303 |
-
|
304 |
-
$custom = $_POST['custom'];
|
305 |
|
306 |
$custom_fields = wpmtst_get_custom_fields();
|
307 |
|
@@ -316,6 +312,7 @@ class Strong_Testimonials_Post_Editor {
|
|
316 |
$custom = array_merge( $checkboxes, $custom );
|
317 |
}
|
318 |
|
|
|
319 |
// Determine whether to update or delete.
|
320 |
// Similar to wpmtst_ajax_edit_rating() in admin-ajax.php.
|
321 |
$custom_fields['nofollow']['input_type'] = '';
|
@@ -338,7 +335,7 @@ class Strong_Testimonials_Post_Editor {
|
|
338 |
}elseif ( isset($custom_fields[ $key ]['input_type']) && 'email' == $custom_fields[ $key ]['input_type'] ) {
|
339 |
$sanitized_value = sanitize_email( $value );
|
340 |
}elseif ( isset($custom_fields[ $key ]['input_type']) && 'url' == $custom_fields[ $key ]['input_type'] ) {
|
341 |
-
$sanitized_value =
|
342 |
}else{
|
343 |
$sanitized_value = sanitize_text_field( $value );
|
344 |
}
|
36 |
public static function add_meta_boxes() {
|
37 |
add_meta_box(
|
38 |
'details',
|
39 |
+
esc_html_x( 'Client Details', 'post editor', 'strong-testimonials' ),
|
40 |
array( __CLASS__, 'meta_options' ),
|
41 |
'wpm-testimonial',
|
42 |
'normal',
|
58 |
<table class="options">
|
59 |
<tr>
|
60 |
<td colspan="2">
|
61 |
+
<p><?php esc_html_x( 'To add a photo or logo, use the Featured Image option.', 'post editor', 'strong-testimonials' ); ?></p>
|
62 |
</td>
|
63 |
</tr>
|
64 |
<?php
|
150 |
* @param $is_new
|
151 |
*/
|
152 |
private static function meta_option__text( $field, $post, $is_new ) {
|
153 |
+
printf( '<input id="%2$s" type="%1$s" class="custom-input" name="custom[%2$s]" value="%3$s">', esc_attr( $field['input_type'] ), esc_attr( $field['name'] ), esc_attr( $post->{$field['name']} ) );
|
|
|
154 |
}
|
155 |
|
156 |
/**
|
178 |
private static function meta_option__url( $field, $post, $is_new ) {
|
179 |
?>
|
180 |
<div class="input-url">
|
181 |
+
<?php printf( '<input id="%2$s" type="%1$s" class="custom-input" name="custom[%2$s]" value="%3$s" size="">', esc_attr( $field['input_type'] ), esc_html( $field['name'] ), esc_attr( $post->{$field['name']} ) ); ?>
|
|
|
182 |
</div>
|
183 |
<div class="input-links">
|
184 |
<div class="input-nofollow">
|
185 |
<label for="custom_nofollow"><code>rel="nofollow"</code></label>
|
186 |
<select id="custom_nofollow" name="custom[nofollow]">
|
187 |
+
<option value="default" <?php selected( $post->nofollow, 'default' ); ?>><?php esc_html_e( 'default', 'strong-testimonials' ); ?></option>
|
188 |
+
<option value="yes" <?php selected( $post->nofollow, 'yes' ); ?>><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></option>
|
189 |
+
<option value="no" <?php selected( $post->nofollow, 'no' ); ?>><?php esc_html_e( 'no', 'strong-testimonials' ); ?></option>
|
190 |
</select>
|
191 |
</div>
|
192 |
<div class="input-noopener">
|
193 |
<label for="custom_noopener"><code>rel="noopener"</code></label>
|
194 |
<select id="custom_noopener" name="custom[noopener]">
|
195 |
+
<option value="default" <?php selected( $post->noopener, 'default' ); ?>><?php esc_html_e( 'default', 'strong-testimonials' ); ?></option>
|
196 |
+
<option value="yes" <?php selected( $post->noopener, 'yes' ); ?>><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></option>
|
197 |
+
<option value="no" <?php selected( $post->noopener, 'no' ); ?>><?php esc_html_e( 'no', 'strong-testimonials' ); ?></option>
|
198 |
</select>
|
199 |
</div>
|
200 |
<div class="input-noreferrer">
|
201 |
<label for="custom_noreferrer"><code>rel="noreferrer"</code></label>
|
202 |
<select id="custom_noopener" name="custom[noreferrer]">
|
203 |
+
<option value="default" <?php selected( $post->noreferrer, 'default' ); ?>><?php esc_html_e( 'default', 'strong-testimonials' ); ?></option>
|
204 |
+
<option value="yes" <?php selected( $post->noreferrer, 'yes' ); ?>><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></option>
|
205 |
+
<option value="no" <?php selected( $post->noreferrer, 'no' ); ?>><?php esc_html_e( 'no', 'strong-testimonials' ); ?></option>
|
206 |
</select>
|
207 |
</div>
|
208 |
<?php
|
216 |
* @param $is_new
|
217 |
*/
|
218 |
private static function meta_option__checkbox( $field, $post, $is_new ) {
|
219 |
+
printf( '<input id="%2$s" type="%1$s" class="custom-input" name="custom[%2$s]" value="%3$s" %4$s>', esc_attr( $field['input_type'] ), esc_attr( $field['name'] ), 1, checked( $post->{$field['name']}, 1, false ) );
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
232 |
$rating = 0;
|
233 |
}
|
234 |
?>
|
235 |
+
<div class="edit-rating-box hide-if-no-js" data-field="<?php echo esc_attr( $field['name'] ); ?>">
|
236 |
|
237 |
<?php wp_nonce_field( 'editrating', "edit-{$field['name']}-nonce", false ); ?>
|
238 |
+
<input type="hidden" class="current-rating" value="<?php echo esc_attr( $rating ); ?>">
|
239 |
|
240 |
<!-- form -->
|
241 |
<div class="rating-form" style="<?php echo ( $is_new ) ? 'display: inline-block;' : 'display: none;'; ?>">
|
282 |
if ( shortcode_exists( $shortcode ) ) {
|
283 |
echo do_shortcode( $field['shortcode_on_display'] );
|
284 |
} else {
|
285 |
+
echo '<div class="custom-input not-found">' . sprintf( esc_html__( 'shortcode %s not found', 'strong-testimonials' ), '<code>' . esc_html($field['shortcode_on_display']) . '</code>' ) . '</div>';
|
286 |
}
|
287 |
}
|
288 |
|
297 |
}
|
298 |
|
299 |
$post_id = absint( $_POST['post_ID'] );
|
300 |
+
$custom = $_POST['custom'] ;
|
|
|
301 |
|
302 |
$custom_fields = wpmtst_get_custom_fields();
|
303 |
|
312 |
$custom = array_merge( $checkboxes, $custom );
|
313 |
}
|
314 |
|
315 |
+
|
316 |
// Determine whether to update or delete.
|
317 |
// Similar to wpmtst_ajax_edit_rating() in admin-ajax.php.
|
318 |
$custom_fields['nofollow']['input_type'] = '';
|
335 |
}elseif ( isset($custom_fields[ $key ]['input_type']) && 'email' == $custom_fields[ $key ]['input_type'] ) {
|
336 |
$sanitized_value = sanitize_email( $value );
|
337 |
}elseif ( isset($custom_fields[ $key ]['input_type']) && 'url' == $custom_fields[ $key ]['input_type'] ) {
|
338 |
+
$sanitized_value = esc_url_raw( $value );
|
339 |
}else{
|
340 |
$sanitized_value = sanitize_text_field( $value );
|
341 |
}
|
admin/class-strong-testimonials-review.php
CHANGED
@@ -10,9 +10,9 @@ class Strong_Review {
|
|
10 |
function __construct() {
|
11 |
|
12 |
$this->messages = array(
|
13 |
-
'notice' =>
|
14 |
-
'rate' =>
|
15 |
-
'rated' =>
|
16 |
'no_rate' => __( 'Don\'t show again', 'strong-testimonials' ),
|
17 |
);
|
18 |
|
@@ -69,8 +69,8 @@ class Strong_Review {
|
|
69 |
$url = sprintf( $this->link, $this->slug );
|
70 |
|
71 |
?>
|
72 |
-
<div id="<?php echo esc_attr($this->slug) ?>-strong-testimonials-review-notice" class="notice notice-success is-dismissible" style="margin-top:30px;">
|
73 |
-
<p><?php echo sprintf( esc_html( $this->messages['notice'] ), $this->value ) ; ?></p>
|
74 |
<p class="actions">
|
75 |
<a id="strong-testimonials-rate" href="<?php echo esc_url( $url ) ?>" target="_blank" class="button button-primary strong-testimonials-review-button">
|
76 |
<?php echo esc_html( $this->messages['rate'] ); ?>
|
@@ -94,7 +94,7 @@ class Strong_Review {
|
|
94 |
|
95 |
if ( 'strong-testimonials-rate' == $_POST['check'] ) {
|
96 |
$time = time() + YEAR_IN_SECONDS * 1;
|
97 |
-
}elseif ( 'strong-testimonials-later' ==
|
98 |
$time = time() + WEEK_IN_SECONDS;
|
99 |
}elseif ( 'strong-testimonials-no-rate' == $_POST['check'] ) {
|
100 |
$time = time() + YEAR_IN_SECONDS * 1;
|
10 |
function __construct() {
|
11 |
|
12 |
$this->messages = array(
|
13 |
+
'notice' => esc_html__( "Hi there! Stoked to see you're using Strong Testimonials for a few days now - hope you like it! And if you do, please consider rating it. It would mean the world to us. Keep on rocking!", 'strong-testimonials' ),
|
14 |
+
'rate' => esc_html__( 'Rate the plugin', 'strong-testimonials' ),
|
15 |
+
'rated' => esc_html__( 'Remind me later', 'strong-testimonials' ),
|
16 |
'no_rate' => __( 'Don\'t show again', 'strong-testimonials' ),
|
17 |
);
|
18 |
|
69 |
$url = sprintf( $this->link, $this->slug );
|
70 |
|
71 |
?>
|
72 |
+
<div id="<?php echo esc_attr( $this->slug ) ?>-strong-testimonials-review-notice" class="notice notice-success is-dismissible" style="margin-top:30px;">
|
73 |
+
<p><?php echo sprintf( esc_html( $this->messages['notice'] ), esc_attr( $this->value ) ) ; ?></p>
|
74 |
<p class="actions">
|
75 |
<a id="strong-testimonials-rate" href="<?php echo esc_url( $url ) ?>" target="_blank" class="button button-primary strong-testimonials-review-button">
|
76 |
<?php echo esc_html( $this->messages['rate'] ); ?>
|
94 |
|
95 |
if ( 'strong-testimonials-rate' == $_POST['check'] ) {
|
96 |
$time = time() + YEAR_IN_SECONDS * 1;
|
97 |
+
}elseif ( 'strong-testimonials-later' == ['check'] ) {
|
98 |
$time = time() + WEEK_IN_SECONDS;
|
99 |
}elseif ( 'strong-testimonials-no-rate' == $_POST['check'] ) {
|
100 |
$time = time() + YEAR_IN_SECONDS * 1;
|
admin/class-strong-testimonials-upsell.php
CHANGED
@@ -131,12 +131,12 @@ class Strong_Testimonials_Upsell {
|
|
131 |
<h2><?php esc_html_e( 'Automatically pull in & display new reviews as your customers leave their feedback on external platforms', 'strong-testimonials' ) ?></h2>
|
132 |
<p><?php esc_html_e( 'Upgrade today and get the ability to import testimonials from:', 'strong-testimonials' ) ?></p>
|
133 |
<ul>
|
134 |
-
<li
|
135 |
-
<li
|
136 |
-
<li
|
137 |
-
<li
|
138 |
-
<li
|
139 |
-
<li
|
140 |
</ul>
|
141 |
<p>
|
142 |
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=importer-metabox' ); ?>"><?php esc_html_e( 'Upgrade Now', 'strong-testimonials' ); ?></a>
|
@@ -155,19 +155,21 @@ class Strong_Testimonials_Upsell {
|
|
155 |
|
156 |
<div class="wpmtst-settings-upsell">
|
157 |
<div class="wpmtst-alert">
|
158 |
-
<h3
|
159 |
<ul>
|
160 |
<?php foreach ( $general_upsells as $general_upsell ) { ?>
|
161 |
<li>
|
162 |
<span class="dashicons dashicons-yes"></span>
|
163 |
<span>
|
164 |
-
<?php echo $general_upsell ?>
|
165 |
</span>
|
166 |
</li>
|
167 |
<?php } ?>
|
168 |
</ul>
|
169 |
|
170 |
-
<a href="<?php echo esc_url(
|
|
|
|
|
171 |
|
172 |
</div>
|
173 |
</div>
|
@@ -178,11 +180,11 @@ class Strong_Testimonials_Upsell {
|
|
178 |
|
179 |
// Role Manager upsell
|
180 |
public function register_role_manager( $active_tab, $url ) {
|
181 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
|
182 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
183 |
esc_url( add_query_arg( 'tab', 'access', $url ) ),
|
184 |
esc_attr( $tab == 'access' ? 'nav-tab-active' : '' ),
|
185 |
-
|
186 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
187 |
);
|
188 |
}
|
@@ -348,11 +350,11 @@ class Strong_Testimonials_Upsell {
|
|
348 |
* Review Markup
|
349 |
*/
|
350 |
public function register_review_markup( $active_tab, $url ) {
|
351 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
|
352 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
353 |
esc_url( add_query_arg( 'tab', 'review-markup', $url ) ),
|
354 |
esc_attr( $tab == 'review-markup' ? 'nav-tab-active' : '' ),
|
355 |
-
|
356 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
357 |
);
|
358 |
}
|
@@ -697,11 +699,11 @@ class Strong_Testimonials_Upsell {
|
|
697 |
Assigments
|
698 |
*/
|
699 |
public function register_assigment_tab( $active_tab, $url ) {
|
700 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
|
701 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
702 |
esc_url( add_query_arg( 'tab', 'assignment', $url ) ),
|
703 |
esc_attr( $tab == 'assignment' ? 'nav-tab-active' : '' ),
|
704 |
-
|
705 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
706 |
);
|
707 |
}
|
@@ -735,11 +737,11 @@ class Strong_Testimonials_Upsell {
|
|
735 |
Strong Testimonials PRO
|
736 |
*/
|
737 |
public function register_st_pro_tab( $active_tab, $url ) {
|
738 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
|
739 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
740 |
esc_url( add_query_arg( 'tab', 'single_testiomonial_template', $url ) ),
|
741 |
esc_attr( $tab == 'single_testiomonial_template' ? 'nav-tab-active' : '' ),
|
742 |
-
|
743 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
744 |
);
|
745 |
}
|
@@ -793,11 +795,11 @@ class Strong_Testimonials_Upsell {
|
|
793 |
Properties
|
794 |
*/
|
795 |
public function register_properties_tab( $active_tab, $url ) {
|
796 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
|
797 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
798 |
esc_url( add_query_arg( 'tab', 'properties', $url ) ),
|
799 |
esc_attr( $tab == 'properties' ? 'nav-tab-active' : '' ),
|
800 |
-
|
801 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
802 |
);
|
803 |
}
|
131 |
<h2><?php esc_html_e( 'Automatically pull in & display new reviews as your customers leave their feedback on external platforms', 'strong-testimonials' ) ?></h2>
|
132 |
<p><?php esc_html_e( 'Upgrade today and get the ability to import testimonials from:', 'strong-testimonials' ) ?></p>
|
133 |
<ul>
|
134 |
+
<li><?php esc_html_e( 'Facebook', 'strong-testimonials' ) ?></li>
|
135 |
+
<li><?php esc_html_e( 'Google', 'strong-testimonials' ) ?></li>
|
136 |
+
<li><?php esc_html_e( 'Yelp', 'strong-testimonials' ) ?></li>
|
137 |
+
<li><?php esc_html_e( 'Zomato', 'strong-testimonials' ) ?></li>
|
138 |
+
<li><?php esc_html_e( 'WooCommerce', 'strong-testimonials' ) ?></li>
|
139 |
+
<li><?php esc_html_e( 'and more...', 'strong-testimonials' ) ?></li>
|
140 |
</ul>
|
141 |
<p>
|
142 |
<a class="button button-primary" target="_blank" href="<?php echo esc_url( $this->store_upgrade_url . '&utm_medium=importer-metabox' ); ?>"><?php esc_html_e( 'Upgrade Now', 'strong-testimonials' ); ?></a>
|
155 |
|
156 |
<div class="wpmtst-settings-upsell">
|
157 |
<div class="wpmtst-alert">
|
158 |
+
<h3><?php esc_html_e( 'Upgrade now', 'strong-testimonials' ) ?></h3>
|
159 |
<ul>
|
160 |
<?php foreach ( $general_upsells as $general_upsell ) { ?>
|
161 |
<li>
|
162 |
<span class="dashicons dashicons-yes"></span>
|
163 |
<span>
|
164 |
+
<?php echo wp_kses_post($general_upsell); ?>
|
165 |
</span>
|
166 |
</li>
|
167 |
<?php } ?>
|
168 |
</ul>
|
169 |
|
170 |
+
<a href="<?php echo esc_url(WPMTST_STORE_URL . '/pricing?utm_source=st-lite&utm_campaign=upsell&utm_medium=general-settings-upsell'); ?>"
|
171 |
+
target="_blank" class="button button-primary button-hero"
|
172 |
+
style="width:100%;display:block;margin-top:20px;text-align:center;"><?php echo esc_html__('Upgrade now', 'strong-testimonials'); ?></a>
|
173 |
|
174 |
</div>
|
175 |
</div>
|
180 |
|
181 |
// Role Manager upsell
|
182 |
public function register_role_manager( $active_tab, $url ) {
|
183 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
|
184 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
185 |
esc_url( add_query_arg( 'tab', 'access', $url ) ),
|
186 |
esc_attr( $tab == 'access' ? 'nav-tab-active' : '' ),
|
187 |
+
esc_html_x( 'Role Management', 'adjective', 'strong-testimonials' ),
|
188 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
189 |
);
|
190 |
}
|
350 |
* Review Markup
|
351 |
*/
|
352 |
public function register_review_markup( $active_tab, $url ) {
|
353 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
|
354 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
355 |
esc_url( add_query_arg( 'tab', 'review-markup', $url ) ),
|
356 |
esc_attr( $tab == 'review-markup' ? 'nav-tab-active' : '' ),
|
357 |
+
esc_html_x( 'Review Markup', 'adjective', 'strong-testimonials' ),
|
358 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
359 |
);
|
360 |
}
|
699 |
Assigments
|
700 |
*/
|
701 |
public function register_assigment_tab( $active_tab, $url ) {
|
702 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
|
703 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
704 |
esc_url( add_query_arg( 'tab', 'assignment', $url ) ),
|
705 |
esc_attr( $tab == 'assignment' ? 'nav-tab-active' : '' ),
|
706 |
+
esc_html_x( 'Assignment', 'adjective', 'strong-testimonials' ),
|
707 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
708 |
);
|
709 |
}
|
737 |
Strong Testimonials PRO
|
738 |
*/
|
739 |
public function register_st_pro_tab( $active_tab, $url ) {
|
740 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
|
741 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
742 |
esc_url( add_query_arg( 'tab', 'single_testiomonial_template', $url ) ),
|
743 |
esc_attr( $tab == 'single_testiomonial_template' ? 'nav-tab-active' : '' ),
|
744 |
+
esc_html_x( 'Single Testimonial Template', 'adjective', 'strong-testimonials' ),
|
745 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
746 |
);
|
747 |
}
|
795 |
Properties
|
796 |
*/
|
797 |
public function register_properties_tab( $active_tab, $url ) {
|
798 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
|
799 |
printf( '<a href="%s" class="nav-tab %s">%s%s</a>',
|
800 |
esc_url( add_query_arg( 'tab', 'properties', $url ) ),
|
801 |
esc_attr( $tab == 'properties' ? 'nav-tab-active' : '' ),
|
802 |
+
esc_html_x( 'Properties', 'adjective', 'strong-testimonials' ),
|
803 |
'<span class="wpmtst-upsell-badge">PRO</span>'
|
804 |
);
|
805 |
}
|
admin/class-strong-views-list-table.php
CHANGED
@@ -16,7 +16,7 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
16 |
* @access public
|
17 |
*/
|
18 |
public function no_items() {
|
19 |
-
|
20 |
}
|
21 |
|
22 |
public function prepare_list( $data = array() ) {
|
@@ -33,13 +33,13 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
33 |
usort( $data, array( &$this, 'usort_reorder' ) );
|
34 |
}
|
35 |
$data = $this->move_sticky( $data );
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
$this->items = $data;
|
44 |
}
|
45 |
|
@@ -55,7 +55,7 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
55 |
public function filter_data( $mode, $data = array() ) {
|
56 |
$items = array();
|
57 |
foreach ($data as $item) {
|
58 |
-
if ($mode == $item['data']['mode']) {
|
59 |
$items[] = $item;
|
60 |
}
|
61 |
}
|
@@ -65,7 +65,7 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
65 |
public function search_data( $search, $data = array() ) {
|
66 |
$items = array();
|
67 |
foreach ($data as $item) {
|
68 |
-
if (strtolower($search) == strtolower($item['name'])) {
|
69 |
$items[] = $item;
|
70 |
}
|
71 |
}
|
@@ -94,13 +94,13 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
94 |
|
95 |
public function get_columns() {
|
96 |
$columns = array(
|
97 |
-
'id' =>
|
98 |
//'sticky' => __( 'Sticky', 'strong-testimonials' ),
|
99 |
'sticky' => '',
|
100 |
-
'name' =>
|
101 |
-
'mode' =>
|
102 |
-
'template' =>
|
103 |
-
'shortcode' =>
|
104 |
);
|
105 |
|
106 |
return $columns;
|
@@ -119,10 +119,10 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
119 |
|
120 |
public function usort_reorder( $a, $b ) {
|
121 |
// If no sort, default to name
|
122 |
-
$orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'name';
|
123 |
|
124 |
// If no order, default to asc
|
125 |
-
$order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'asc';
|
126 |
|
127 |
// Determine sort order
|
128 |
if ( 'id' == $orderby ) {
|
@@ -148,12 +148,12 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
148 |
$url = $screen->parent_file;
|
149 |
|
150 |
// Edit link
|
151 |
-
$edit_link = $url . '&page=testimonial-views&action=edit&id=' . $item['id'];
|
152 |
-
echo '<a class="row-title" href="' . $edit_link . '">' . $item['name'] . '</a>';
|
153 |
|
154 |
// Duplicate link
|
155 |
// @since 2.1.0
|
156 |
-
$duplicate_link = $url . '&page=testimonial-views&action=duplicate&id=' . $item['id'];
|
157 |
|
158 |
// Delete link
|
159 |
$delete_link = 'admin.php?action=delete-strong-view&id=' . $item['id'];
|
@@ -161,9 +161,9 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
161 |
// Assemble links
|
162 |
|
163 |
$actions = array();
|
164 |
-
$actions['edit'] = '<a href="' . $edit_link . '">' .
|
165 |
-
$actions['duplicate'] = '<a href="' . $duplicate_link . '">' .
|
166 |
-
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( $delete_link, 'delete-strong-view_' . $item['id'] ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( 'Delete "%s"?', 'strong-testimonials' ), $item['name'] ) ) . "' ) ) { return true;} return false;\">" .
|
167 |
|
168 |
$actions = apply_filters('wpmtst_views_actions',$actions,$item);
|
169 |
|
@@ -177,7 +177,7 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
177 |
break;
|
178 |
case 'sticky':
|
179 |
$stuck = $this->is_stuck( $item['id'] ) ? 'stuck' : '';
|
180 |
-
$text = '<a href="#" class="stickit ' . $stuck . '" title="' .
|
181 |
break;
|
182 |
case 'name':
|
183 |
$text = $item['name'];
|
@@ -192,7 +192,7 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
192 |
break;
|
193 |
case 'template':
|
194 |
if ( 'single_template' == $item['data']['mode'] ) {
|
195 |
-
$text =
|
196 |
} else {
|
197 |
$text = $this->find_template( array( 'template' => $item['data']['template'] ) );
|
198 |
}
|
@@ -218,7 +218,7 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
218 |
|
219 |
public function find_template( $atts = '' ) {
|
220 |
$name = WPMST()->templates->get_template_config( $atts, 'name', false );
|
221 |
-
return $name ? $name : '<span class="error"><span class="dashicons dashicons-warning"></span> ' .
|
222 |
}
|
223 |
|
224 |
/**
|
@@ -231,25 +231,30 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
231 |
$singular = $this->_args['singular'];
|
232 |
// Disabling the table nav options to regain some real estate.
|
233 |
//$this->display_tablenav( 'top' );
|
|
|
|
|
|
|
|
|
234 |
?>
|
235 |
<form id="posts-filter" method="get">
|
236 |
<p class="search-box">
|
237 |
<label class="screen-reader-text" for="post-search-input"><?php esc_html_e( 'Search', 'strong-testimonials' ); ?></label>
|
238 |
-
<input type="search" id="post-search-input" name="s" value="<?php echo (
|
239 |
<input type="submit" id="search-submit" class="button" value="<?php esc_html_e( 'Search', 'strong-testimonials' ); ?>">
|
240 |
<input type="hidden" name="post_type" class="post_type_page" value="wpm-testimonial">
|
241 |
<input type="hidden" name="page" value="testimonial-views">
|
242 |
</p>
|
243 |
-
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes()
|
244 |
<thead>
|
245 |
<tr>
|
246 |
<?php $this->print_column_headers(); ?>
|
247 |
</tr>
|
248 |
</thead>
|
249 |
|
250 |
-
<tbody id="the-list"
|
|
|
251 |
if ( $singular ) {
|
252 |
-
echo " data-wp-lists='list
|
253 |
} ?>>
|
254 |
<?php $this->display_rows_or_placeholder(); ?>
|
255 |
</tbody>
|
16 |
* @access public
|
17 |
*/
|
18 |
public function no_items() {
|
19 |
+
esc_html_e( 'No views found.', 'strong-testimonials' );
|
20 |
}
|
21 |
|
22 |
public function prepare_list( $data = array() ) {
|
33 |
usort( $data, array( &$this, 'usort_reorder' ) );
|
34 |
}
|
35 |
$data = $this->move_sticky( $data );
|
36 |
+
$data = apply_filters('wpmtst_list_views', $data);
|
37 |
+
if ( isset( $_GET['mode'] ) && ! empty( $_GET['mode'] ) && $_GET['mode'] !== 'all' ) {
|
38 |
+
$data = $this->filter_data( sanitize_text_field( $_GET['mode'] ), $data );
|
39 |
+
}
|
40 |
+
if ( isset( $_GET['s'] ) && ! empty( $_GET['s'] ) ) {
|
41 |
+
$data = $this->search_data( sanitize_text_field( $_GET['s'] ), $data );
|
42 |
+
}
|
43 |
$this->items = $data;
|
44 |
}
|
45 |
|
55 |
public function filter_data( $mode, $data = array() ) {
|
56 |
$items = array();
|
57 |
foreach ($data as $item) {
|
58 |
+
if ( $mode == $item['data']['mode'] ) {
|
59 |
$items[] = $item;
|
60 |
}
|
61 |
}
|
65 |
public function search_data( $search, $data = array() ) {
|
66 |
$items = array();
|
67 |
foreach ($data as $item) {
|
68 |
+
if ( strtolower($search) == strtolower($item['name']) ) {
|
69 |
$items[] = $item;
|
70 |
}
|
71 |
}
|
94 |
|
95 |
public function get_columns() {
|
96 |
$columns = array(
|
97 |
+
'id' => esc_html__( 'ID', 'strong-testimonials' ),
|
98 |
//'sticky' => __( 'Sticky', 'strong-testimonials' ),
|
99 |
'sticky' => '',
|
100 |
+
'name' => esc_html__( 'Name', 'strong-testimonials' ),
|
101 |
+
'mode' => esc_html__( 'Mode', 'strong-testimonials' ),
|
102 |
+
'template' => esc_html__( 'Template', 'strong-testimonials' ),
|
103 |
+
'shortcode' => esc_html__( 'Shortcode', 'strong-testimonials' ),
|
104 |
);
|
105 |
|
106 |
return $columns;
|
119 |
|
120 |
public function usort_reorder( $a, $b ) {
|
121 |
// If no sort, default to name
|
122 |
+
$orderby = ( ! empty( $_GET['orderby'] ) ) ? sanitize_text_field( $_GET['orderby'] ) : 'name';
|
123 |
|
124 |
// If no order, default to asc
|
125 |
+
$order = ( ! empty($_GET['order'] ) ) ? sanitize_text_field( $_GET['order'] ) : 'asc';
|
126 |
|
127 |
// Determine sort order
|
128 |
if ( 'id' == $orderby ) {
|
148 |
$url = $screen->parent_file;
|
149 |
|
150 |
// Edit link
|
151 |
+
$edit_link = esc_url( $url . '&page=testimonial-views&action=edit&id=' . $item['id'] );
|
152 |
+
echo '<a class="row-title" href="' . $edit_link . '">' . esc_html( $item['name'] ) . '</a>';
|
153 |
|
154 |
// Duplicate link
|
155 |
// @since 2.1.0
|
156 |
+
$duplicate_link = esc_url( $url . '&page=testimonial-views&action=duplicate&id=' . $item['id'] );
|
157 |
|
158 |
// Delete link
|
159 |
$delete_link = 'admin.php?action=delete-strong-view&id=' . $item['id'];
|
161 |
// Assemble links
|
162 |
|
163 |
$actions = array();
|
164 |
+
$actions['edit'] = '<a href="' . $edit_link . '">' . esc_html__( 'Edit', 'strong-testimonials' ) . '</a>';
|
165 |
+
$actions['duplicate'] = '<a href="' . $duplicate_link . '">' . esc_html__( 'Duplicate', 'strong-testimonials' ) . '</a>';
|
166 |
+
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( $delete_link, 'delete-strong-view_' . $item['id'] ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( 'Delete "%s"?', 'strong-testimonials' ), $item['name'] ) ) . "' ) ) { return true;} return false;\">" . esc_html__( 'Delete', 'strong-testimonials' ) . '</a>';
|
167 |
|
168 |
$actions = apply_filters('wpmtst_views_actions',$actions,$item);
|
169 |
|
177 |
break;
|
178 |
case 'sticky':
|
179 |
$stuck = $this->is_stuck( $item['id'] ) ? 'stuck' : '';
|
180 |
+
$text = '<a href="#" class="stickit ' . $stuck . '" title="' . esc_html__( 'stick to top of list', 'strong-testimonials' ) . '"></>';
|
181 |
break;
|
182 |
case 'name':
|
183 |
$text = $item['name'];
|
192 |
break;
|
193 |
case 'template':
|
194 |
if ( 'single_template' == $item['data']['mode'] ) {
|
195 |
+
$text = esc_html__( 'theme single post template', 'strong-testimonials' );
|
196 |
} else {
|
197 |
$text = $this->find_template( array( 'template' => $item['data']['template'] ) );
|
198 |
}
|
218 |
|
219 |
public function find_template( $atts = '' ) {
|
220 |
$name = WPMST()->templates->get_template_config( $atts, 'name', false );
|
221 |
+
return $name ? $name : '<span class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'not found', 'strong-testimonials' ) . '</span>';
|
222 |
}
|
223 |
|
224 |
/**
|
231 |
$singular = $this->_args['singular'];
|
232 |
// Disabling the table nav options to regain some real estate.
|
233 |
//$this->display_tablenav( 'top' );
|
234 |
+
$s = '';
|
235 |
+
if ( isset( $_GET['s'] ) ) {
|
236 |
+
$s = sanitize_text_field( $_GET['s'] );
|
237 |
+
}
|
238 |
?>
|
239 |
<form id="posts-filter" method="get">
|
240 |
<p class="search-box">
|
241 |
<label class="screen-reader-text" for="post-search-input"><?php esc_html_e( 'Search', 'strong-testimonials' ); ?></label>
|
242 |
+
<input type="search" id="post-search-input" name="s" value="<?php echo esc_attr( $s ) ?>">
|
243 |
<input type="submit" id="search-submit" class="button" value="<?php esc_html_e( 'Search', 'strong-testimonials' ); ?>">
|
244 |
<input type="hidden" name="post_type" class="post_type_page" value="wpm-testimonial">
|
245 |
<input type="hidden" name="page" value="testimonial-views">
|
246 |
</p>
|
247 |
+
<table class="wp-list-table <?php echo esc_attr(implode( ' ', $this->get_table_classes())); ?>">
|
248 |
<thead>
|
249 |
<tr>
|
250 |
<?php $this->print_column_headers(); ?>
|
251 |
</tr>
|
252 |
</thead>
|
253 |
|
254 |
+
<tbody id="the-list"
|
255 |
+
<?php
|
256 |
if ( $singular ) {
|
257 |
+
echo " data-wp-lists='list:" . esc_attr( $singular ) . "'";
|
258 |
} ?>>
|
259 |
<?php $this->display_rows_or_placeholder(); ?>
|
260 |
</tbody>
|
admin/custom-fields-ajax.php
CHANGED
@@ -21,7 +21,7 @@ function wpmtst_add_field_function() {
|
|
21 |
'name_mutable' => 1,
|
22 |
'record_type' => 'custom',
|
23 |
'input_type' => 'text',
|
24 |
-
'label' =>
|
25 |
'show_label' => 1,
|
26 |
);
|
27 |
echo wpmtst_show_field( intval( $_REQUEST['nextKey'] ), $empty_field, true );
|
@@ -41,8 +41,8 @@ function wpmtst_add_field_2_function() {
|
|
41 |
|
42 |
check_ajax_referer( 'wpmtst-admin', 'security' );
|
43 |
|
44 |
-
$new_field_type = $_REQUEST['fieldType'];
|
45 |
-
$new_field_class = $_REQUEST['fieldClass'];
|
46 |
$fields = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
47 |
|
48 |
$empty_field = array_merge(
|
@@ -66,8 +66,8 @@ function wpmtst_add_field_3_function() {
|
|
66 |
|
67 |
check_ajax_referer( 'wpmtst-admin', 'security' );
|
68 |
|
69 |
-
$new_field_type = $_REQUEST['fieldType'];
|
70 |
-
$new_field_class = $_REQUEST['fieldClass'];
|
71 |
$fields = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
72 |
|
73 |
$empty_field = array_merge(
|
@@ -91,8 +91,8 @@ function wpmtst_add_field_4_function() {
|
|
91 |
|
92 |
check_ajax_referer( 'wpmtst-admin', 'security' );
|
93 |
|
94 |
-
$new_field_type = $_REQUEST['fieldType'];
|
95 |
-
$new_field_class = $_REQUEST['fieldClass'];
|
96 |
$fields = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
97 |
$empty_field = array();
|
98 |
if ( isset( $fields['field_types'][$new_field_class][$new_field_type] ) ) {
|
@@ -121,4 +121,4 @@ function wpmtst_ajax_cat_count() {
|
|
121 |
echo wpmtst_get_cat_count();
|
122 |
wp_die();
|
123 |
}
|
124 |
-
add_action( 'wp_ajax_wpmtst_get_cat_count', 'wpmtst_ajax_cat_count' );
|
21 |
'name_mutable' => 1,
|
22 |
'record_type' => 'custom',
|
23 |
'input_type' => 'text',
|
24 |
+
'label' => esc_html__( 'New Field', 'strong-testimonials' ),
|
25 |
'show_label' => 1,
|
26 |
);
|
27 |
echo wpmtst_show_field( intval( $_REQUEST['nextKey'] ), $empty_field, true );
|
41 |
|
42 |
check_ajax_referer( 'wpmtst-admin', 'security' );
|
43 |
|
44 |
+
$new_field_type = sanitize_text_field( $_REQUEST['fieldType'] );
|
45 |
+
$new_field_class = sanitize_text_field( $_REQUEST['fieldClass'] );
|
46 |
$fields = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
47 |
|
48 |
$empty_field = array_merge(
|
66 |
|
67 |
check_ajax_referer( 'wpmtst-admin', 'security' );
|
68 |
|
69 |
+
$new_field_type = sanitize_text_field( $_REQUEST['fieldType'] );
|
70 |
+
$new_field_class = sanitize_text_field( $_REQUEST['fieldClass'] );
|
71 |
$fields = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
72 |
|
73 |
$empty_field = array_merge(
|
91 |
|
92 |
check_ajax_referer( 'wpmtst-admin', 'security' );
|
93 |
|
94 |
+
$new_field_type = sanitize_text_field( $_REQUEST['fieldType'] );
|
95 |
+
$new_field_class = sanitize_text_field( $_REQUEST['fieldClass'] );
|
96 |
$fields = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
97 |
$empty_field = array();
|
98 |
if ( isset( $fields['field_types'][$new_field_class][$new_field_type] ) ) {
|
121 |
echo wpmtst_get_cat_count();
|
122 |
wp_die();
|
123 |
}
|
124 |
+
add_action( 'wp_ajax_wpmtst_get_cat_count', 'wpmtst_ajax_cat_count' );
|
admin/custom-fields.php
CHANGED
@@ -20,7 +20,7 @@ add_action( 'wpmtst_form_admin', 'wpmtst_form_admin2' );
|
|
20 |
*/
|
21 |
function wpmtst_update_custom_fields() {
|
22 |
$goback = wp_get_referer();
|
23 |
-
|
24 |
|
25 |
if ( ! isset( $_POST['wpmtst_form_submitted'] ) ) {
|
26 |
wp_redirect( $goback );
|
@@ -32,7 +32,7 @@ function wpmtst_update_custom_fields() {
|
|
32 |
exit;
|
33 |
}
|
34 |
|
35 |
-
$form_id
|
36 |
$forms = get_option( 'wpmtst_custom_forms' );
|
37 |
$field_options = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
38 |
|
@@ -82,7 +82,7 @@ function wpmtst_update_custom_fields() {
|
|
82 |
|
83 |
$field['name'] = sanitize_text_field( $field['name'] );
|
84 |
$field['label'] = sanitize_text_field( $field['label'] );
|
85 |
-
$field['text']
|
86 |
|
87 |
// TODO Replace this special handling
|
88 |
if ( 'checkbox' == $field['input_type'] ) {
|
@@ -151,12 +151,12 @@ function wpmtst_settings_custom_fields( $form_id = 1 ) {
|
|
151 |
}
|
152 |
|
153 |
if ( ! $form_id ) {
|
154 |
-
echo '<div class="wrap wpmtst"><p>' .
|
155 |
return;
|
156 |
}
|
157 |
|
158 |
$forms = get_option( 'wpmtst_custom_forms' );
|
159 |
-
$fields = apply_filters( 'wpmtst_form_fields', $forms[$form_id]['fields']);
|
160 |
?>
|
161 |
|
162 |
<div class="wrap wpmtst">
|
20 |
*/
|
21 |
function wpmtst_update_custom_fields() {
|
22 |
$goback = wp_get_referer();
|
23 |
+
$goback = apply_filters( 'wpmtst_form_goback', $goback );
|
24 |
|
25 |
if ( ! isset( $_POST['wpmtst_form_submitted'] ) ) {
|
26 |
wp_redirect( $goback );
|
32 |
exit;
|
33 |
}
|
34 |
|
35 |
+
$form_id = absint ( $_POST['form_id'] );
|
36 |
$forms = get_option( 'wpmtst_custom_forms' );
|
37 |
$field_options = apply_filters( 'wpmtst_fields', get_option( 'wpmtst_fields' ) );
|
38 |
|
82 |
|
83 |
$field['name'] = sanitize_text_field( $field['name'] );
|
84 |
$field['label'] = sanitize_text_field( $field['label'] );
|
85 |
+
$field['text'] = sanitize_text_field( $field['text'] );
|
86 |
|
87 |
// TODO Replace this special handling
|
88 |
if ( 'checkbox' == $field['input_type'] ) {
|
151 |
}
|
152 |
|
153 |
if ( ! $form_id ) {
|
154 |
+
echo '<div class="wrap wpmtst"><p>' . esc_html__( 'No fields selected.', 'strong-testimonials' ) .'</p></div>';
|
155 |
return;
|
156 |
}
|
157 |
|
158 |
$forms = get_option( 'wpmtst_custom_forms' );
|
159 |
+
$fields = apply_filters( 'wpmtst_form_fields', $forms[$form_id]['fields'] );
|
160 |
?>
|
161 |
|
162 |
<div class="wrap wpmtst">
|
admin/menu/class-strong-testimonials-menu-fields.php
CHANGED
@@ -42,11 +42,11 @@ class Strong_Testimonials_Menu_Fields {
|
|
42 |
*/
|
43 |
public static function get_submenu() {
|
44 |
return array(
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
);
|
51 |
}
|
52 |
|
42 |
*/
|
43 |
public static function get_submenu() {
|
44 |
return array(
|
45 |
+
'page_title' => apply_filters( 'wpmtst_fields_page_title', esc_html__( 'Form', 'strong-testimonials' ) ),
|
46 |
+
'menu_title' => apply_filters( 'wpmtst_fields_menu_title', esc_html__( 'Form', 'strong-testimonials' ) ),
|
47 |
+
'capability' => 'strong_testimonials_fields',
|
48 |
+
'menu_slug' => 'testimonial-fields',
|
49 |
+
'function' => array( 'Strong_Testimonials_Forms', 'settings_page' ),
|
50 |
);
|
51 |
}
|
52 |
|
admin/menu/class-strong-testimonials-menu-settings.php
CHANGED
@@ -44,8 +44,8 @@ class Strong_Testimonials_Menu_Settings {
|
|
44 |
*/
|
45 |
public static function get_submenu() {
|
46 |
return array(
|
47 |
-
'page_title' =>
|
48 |
-
'menu_title' =>
|
49 |
'capability' => 'strong_testimonials_options',
|
50 |
'menu_slug' => 'testimonial-settings',
|
51 |
'function' => array( 'Strong_Testimonials_Settings', 'settings_page' ),
|
44 |
*/
|
45 |
public static function get_submenu() {
|
46 |
return array(
|
47 |
+
'page_title' => esc_html__( 'Settings', 'strong-testimonials' ),
|
48 |
+
'menu_title' => esc_html__( 'Settings', 'strong-testimonials' ),
|
49 |
'capability' => 'strong_testimonials_options',
|
50 |
'menu_slug' => 'testimonial-settings',
|
51 |
'function' => array( 'Strong_Testimonials_Settings', 'settings_page' ),
|
admin/menu/class-strong-testimonials-menu-shortcodes.php
CHANGED
@@ -42,8 +42,8 @@ class Strong_Testimonials_Menu_Shortcodes {
|
|
42 |
*/
|
43 |
public static function get_submenu() {
|
44 |
return array(
|
45 |
-
'page_title' => apply_filters( 'wpmtst_shortcodes_page_title',
|
46 |
-
'menu_title' => apply_filters( 'wpmtst_shortcodes_menu_title',
|
47 |
'capability' => 'strong_testimonials_options',
|
48 |
'menu_slug' => 'testimonial-shortcodes',
|
49 |
'function' => array( 'Strong_Testimonials_Page_Shortcodes', 'render_page' ),
|
42 |
*/
|
43 |
public static function get_submenu() {
|
44 |
return array(
|
45 |
+
'page_title' => apply_filters( 'wpmtst_shortcodes_page_title', esc_html__( 'Shortcodes', 'strong-testimonials' ) ),
|
46 |
+
'menu_title' => apply_filters( 'wpmtst_shortcodes_menu_title', esc_html__( 'Shortcodes', 'strong-testimonials' ) ),
|
47 |
'capability' => 'strong_testimonials_options',
|
48 |
'menu_slug' => 'testimonial-shortcodes',
|
49 |
'function' => array( 'Strong_Testimonials_Page_Shortcodes', 'render_page' ),
|
admin/menu/class-strong-testimonials-menu-views.php
CHANGED
@@ -42,8 +42,8 @@ class Strong_Testimonials_Menu_Views {
|
|
42 |
*/
|
43 |
public static function get_submenu() {
|
44 |
return array(
|
45 |
-
'page_title' =>
|
46 |
-
'menu_title' =>
|
47 |
'capability' => 'strong_testimonials_views',
|
48 |
'menu_slug' => 'testimonial-views',
|
49 |
'function' => 'wpmtst_views_admin',
|
42 |
*/
|
43 |
public static function get_submenu() {
|
44 |
return array(
|
45 |
+
'page_title' => esc_html__( 'Views', 'strong-testimonials' ),
|
46 |
+
'menu_title' => esc_html__( 'Views', 'strong-testimonials' ),
|
47 |
'capability' => 'strong_testimonials_views',
|
48 |
'menu_slug' => 'testimonial-views',
|
49 |
'function' => 'wpmtst_views_admin',
|
admin/partials/fields/field-controls.php
CHANGED
@@ -8,5 +8,5 @@ $is_core = ( isset( $field['core'] ) && $field['core'] );
|
|
8 |
<?php if ( $adding || ! $is_core ) : ?>
|
9 |
<span><a href="#" class="delete-field"><?php esc_html_e( 'Delete', 'strong-testimonials' ); ?></a></span>
|
10 |
<?php endif; ?>
|
11 |
-
<span class="close-field"><a href="#"><?php
|
12 |
</div>
|
8 |
<?php if ( $adding || ! $is_core ) : ?>
|
9 |
<span><a href="#" class="delete-field"><?php esc_html_e( 'Delete', 'strong-testimonials' ); ?></a></span>
|
10 |
<?php endif; ?>
|
11 |
+
<span class="close-field"><a href="#"><?php echo esc_html_x( 'Close', 'verb', 'strong-testimonials' ); ?></a></span>
|
12 |
</div>
|
admin/partials/fields/field-header.php
CHANGED
@@ -5,9 +5,9 @@
|
|
5 |
$field_link = $field['label'] ? $field['label'] : ucwords( $field['name'] );
|
6 |
?>
|
7 |
<div class="custom-field-header">
|
8 |
-
<span class="link" title="<?php
|
9 |
-
<a class="field" href="#"><?php echo $field_link; ?></a>
|
10 |
-
<span class="handle" title="<?php
|
11 |
<span class="toggle"></span>
|
12 |
</span>
|
13 |
</div>
|
5 |
$field_link = $field['label'] ? $field['label'] : ucwords( $field['name'] );
|
6 |
?>
|
7 |
<div class="custom-field-header">
|
8 |
+
<span class="link" title="<?php esc_html_e( 'click to open or close', 'strong-testimonials' ); ?>">
|
9 |
+
<a class="field" href="#"><?php echo esc_html( $field_link ); ?></a>
|
10 |
+
<span class="handle" title="<?php esc_html_e( 'drag and drop to reorder', 'strong-testimonials' ); ?>"></span>
|
11 |
<span class="toggle"></span>
|
12 |
</span>
|
13 |
</div>
|
admin/partials/fields/field-label.php
CHANGED
@@ -4,12 +4,12 @@
|
|
4 |
*/
|
5 |
?>
|
6 |
<tr class="field-label-row">
|
7 |
-
<th><?php
|
8 |
<td>
|
9 |
-
<input class="field-label" type="text" name="fields[<?php echo $key; ?>][label]" value="<?php echo esc_attr( $field['label'] ); ?>">
|
10 |
<label>
|
11 |
-
<input type="checkbox" name="fields[<?php echo $key; ?>][show_label]" <?php checked( $field['show_label'], true ); ?>>
|
12 |
-
<span class="help inline"><?php
|
13 |
</label>
|
14 |
</td>
|
15 |
</tr>
|
4 |
*/
|
5 |
?>
|
6 |
<tr class="field-label-row">
|
7 |
+
<th><?php echo esc_html_x( 'Label', 'noun', 'strong-testimonials' ); ?></th>
|
8 |
<td>
|
9 |
+
<input class="field-label" type="text" name="fields[<?php echo esc_attr( $key ); ?>][label]" value="<?php echo esc_attr( $field['label'] ); ?>">
|
10 |
<label>
|
11 |
+
<input type="checkbox" name="fields[<?php echo esc_attr( $key ); ?>][show_label]" <?php checked( $field['show_label'], true ); ?>>
|
12 |
+
<span class="help inline"><?php esc_html_e( 'Show this label on the form.', 'strong-testimonials' ); ?></span>
|
13 |
</label>
|
14 |
</td>
|
15 |
</tr>
|
admin/partials/fields/field-name.php
CHANGED
@@ -6,17 +6,17 @@
|
|
6 |
*/
|
7 |
?>
|
8 |
<tr class="field-name-row">
|
9 |
-
<th><?php
|
10 |
<td>
|
11 |
<?php
|
12 |
// Field names for certain types are read-only.
|
13 |
if ( $field['name_mutable'] ) : ?>
|
14 |
-
<input class="field-name" type="text" name="fields[<?php echo $key; ?>][name]" value="<?php echo isset( $field['name'] ) ? esc_attr( $field['name'] ) : ''; ?>">
|
15 |
-
<span class="help field-name-help"><?php
|
16 |
-
<span class="help field-name-help important"><?php
|
17 |
<?php else : ?>
|
18 |
-
<input class="field-name" type="text" value="<?php echo $field['name']; ?>" disabled="disabled">
|
19 |
-
<input type="hidden" name="fields[<?php echo $key; ?>][name]" value="<?php echo $field['name']; ?>">
|
20 |
<?php endif ?>
|
21 |
</td>
|
22 |
</tr>
|
6 |
*/
|
7 |
?>
|
8 |
<tr class="field-name-row">
|
9 |
+
<th><?php echo esc_html_x( 'Name', 'noun', 'strong-testimonials' ); ?></th>
|
10 |
<td>
|
11 |
<?php
|
12 |
// Field names for certain types are read-only.
|
13 |
if ( $field['name_mutable'] ) : ?>
|
14 |
+
<input class="field-name" type="text" name="fields[<?php echo esc_attr( $key ); ?>][name]" value="<?php echo isset( $field['name'] ) ? esc_attr( $field['name'] ) : ''; ?>">
|
15 |
+
<span class="help field-name-help"><?php esc_html_e( 'Use only lowercase letters, numbers, and underscores.', 'strong-testimonials' ); ?></span>
|
16 |
+
<span class="help field-name-help important"><?php esc_html_e( 'Cannot be "name" or "date".', 'strong-testimonials' ); ?></span>
|
17 |
<?php else : ?>
|
18 |
+
<input class="field-name" type="text" value="<?php echo esc_attr( $field['name'] ); ?>" disabled="disabled">
|
19 |
+
<input type="hidden" name="fields[<?php echo esc_attr( $key ); ?>][name]" value="<?php echo esc_attr( $field['name'] ); ?>">
|
20 |
<?php endif ?>
|
21 |
</td>
|
22 |
</tr>
|
admin/partials/fields/field-text.php
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
*/
|
5 |
?>
|
6 |
<tr class="field-label-row">
|
7 |
-
<th><?php
|
8 |
<td>
|
9 |
<input type="text" class="field-label"
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
</td>
|
14 |
</tr>
|
4 |
*/
|
5 |
?>
|
6 |
<tr class="field-label-row">
|
7 |
+
<th><?php echo esc_html_x( 'Text', 'noun', 'strong-testimonials' ); ?></th>
|
8 |
<td>
|
9 |
<input type="text" class="field-label"
|
10 |
+
name="fields[<?php echo esc_attr( $key ); ?>][text]"
|
11 |
+
value="<?php echo esc_attr( $field['text'] ); ?>"
|
12 |
+
placeholder="<?php esc_html_e( 'next to the checkbox', 'strong-testimonials' ); ?>">
|
13 |
</td>
|
14 |
</tr>
|
admin/partials/fields/field-type.php
CHANGED
@@ -6,41 +6,41 @@
|
|
6 |
*/
|
7 |
?>
|
8 |
<tr>
|
9 |
-
<th><?php
|
10 |
<td>
|
11 |
<?php
|
12 |
if ( $adding ) :
|
13 |
?>
|
14 |
-
<select class="first-field field-type new" name="fields[<?php echo $key; ?>][input_type]">
|
15 |
|
16 |
<?php /* Start with a blank option with event trigger to update optgroups */ ?>
|
17 |
<option class="no-selection" value="none" name="none">—</option>
|
18 |
|
19 |
<?php /* Post fields */ ?>
|
20 |
-
<optgroup class="post" label="<?php
|
21 |
<?php foreach ( $field_types['post'] as $field_key => $field_parts ) : ?>
|
22 |
-
<option value="<?php echo $field_key; ?>"><?php echo $field_parts['option_label']; ?></option>
|
23 |
<?php endforeach; ?>
|
24 |
</optgroup>
|
25 |
|
26 |
<?php /* Custom fields */ ?>
|
27 |
-
<optgroup class="custom" label="<?php
|
28 |
<?php foreach ( $field_types['custom'] as $field_key => $field_parts ) : ?>
|
29 |
-
<option value="<?php echo $field_key; ?>"><?php echo $field_parts['option_label']; ?></option>
|
30 |
<?php endforeach; ?>
|
31 |
</optgroup>
|
32 |
|
33 |
<?php /* Special fields */ ?>
|
34 |
-
<optgroup class="optional" label="<?php
|
35 |
<?php foreach ( $field_types['optional'] as $field_key => $field_parts ) : ?>
|
36 |
<?php $data = ( $field_parts['name'] ) ? ' data-force-name="'.$field_parts['name'].'"' : ''; ?>
|
37 |
-
<option value="<?php echo $field_key; ?>"<?php echo $data; ?>><?php echo $field_parts['option_label']; ?></option>
|
38 |
<?php endforeach; ?>
|
39 |
</optgroup>
|
40 |
|
41 |
</select>
|
42 |
|
43 |
-
<span class="help form-error-text" style="display: none;"><?php
|
44 |
|
45 |
<?php do_action( 'wpmtst_after_form_type_selection' ); ?>
|
46 |
|
@@ -51,14 +51,14 @@
|
|
51 |
foreach ( $field_types['post'] as $field_key => $field_parts ) {
|
52 |
// compare field *name*
|
53 |
if ( $field['name'] == $field_key )
|
54 |
-
echo $field_parts['option_label'];
|
55 |
}
|
56 |
}
|
57 |
elseif ( 'custom' == $field['record_type'] ) {
|
58 |
foreach ( $field_types['custom'] as $field_key => $field_parts ) {
|
59 |
// compare field *type*
|
60 |
if ( $field['input_type'] == $field_key ) {
|
61 |
-
echo $field_parts['option_label'];
|
62 |
}
|
63 |
}
|
64 |
}
|
@@ -66,7 +66,7 @@
|
|
66 |
foreach ( $field_types['optional'] as $field_key => $field_parts ) {
|
67 |
// compare field *type*
|
68 |
if ( $field['input_type'] == $field_key ) {
|
69 |
-
echo $field_parts['option_label'];
|
70 |
}
|
71 |
}
|
72 |
}
|
6 |
*/
|
7 |
?>
|
8 |
<tr>
|
9 |
+
<th><?php echo esc_html_x( 'Type', 'noun', 'strong-testimonials' ); ?></th>
|
10 |
<td>
|
11 |
<?php
|
12 |
if ( $adding ) :
|
13 |
?>
|
14 |
+
<select class="first-field field-type new" name="fields[<?php echo esc_attr( $key ); ?>][input_type]">
|
15 |
|
16 |
<?php /* Start with a blank option with event trigger to update optgroups */ ?>
|
17 |
<option class="no-selection" value="none" name="none">—</option>
|
18 |
|
19 |
<?php /* Post fields */ ?>
|
20 |
+
<optgroup class="post" label="<?php esc_html_e( 'Post Fields', 'strong-testimonials' ); ?>">
|
21 |
<?php foreach ( $field_types['post'] as $field_key => $field_parts ) : ?>
|
22 |
+
<option value="<?php echo esc_attr( $field_key ); ?>"><?php echo esc_html( $field_parts['option_label'] ); ?></option>
|
23 |
<?php endforeach; ?>
|
24 |
</optgroup>
|
25 |
|
26 |
<?php /* Custom fields */ ?>
|
27 |
+
<optgroup class="custom" label="<?php esc_html_e( 'Custom Fields', 'strong-testimonials' ); ?>">
|
28 |
<?php foreach ( $field_types['custom'] as $field_key => $field_parts ) : ?>
|
29 |
+
<option value="<?php echo esc_attr( $field_key ); ?>"><?php echo esc_html( $field_parts['option_label'] ); ?></option>
|
30 |
<?php endforeach; ?>
|
31 |
</optgroup>
|
32 |
|
33 |
<?php /* Special fields */ ?>
|
34 |
+
<optgroup class="optional" label="<?php esc_html_e( 'Special Fields', 'strong-testimonials' ); ?>">
|
35 |
<?php foreach ( $field_types['optional'] as $field_key => $field_parts ) : ?>
|
36 |
<?php $data = ( $field_parts['name'] ) ? ' data-force-name="'.$field_parts['name'].'"' : ''; ?>
|
37 |
+
<option value="<?php echo esc_attr( $field_key ); ?>"<?php echo esc_attr( $data ); ?>><?php echo esc_html( $field_parts['option_label'] ); ?></option>
|
38 |
<?php endforeach; ?>
|
39 |
</optgroup>
|
40 |
|
41 |
</select>
|
42 |
|
43 |
+
<span class="help form-error-text" style="display: none;"><?php esc_html_e( 'Select a field type or delete this field.', 'strong-testimonials' ); ?></span>
|
44 |
|
45 |
<?php do_action( 'wpmtst_after_form_type_selection' ); ?>
|
46 |
|
51 |
foreach ( $field_types['post'] as $field_key => $field_parts ) {
|
52 |
// compare field *name*
|
53 |
if ( $field['name'] == $field_key )
|
54 |
+
echo esc_html( $field_parts['option_label'] );
|
55 |
}
|
56 |
}
|
57 |
elseif ( 'custom' == $field['record_type'] ) {
|
58 |
foreach ( $field_types['custom'] as $field_key => $field_parts ) {
|
59 |
// compare field *type*
|
60 |
if ( $field['input_type'] == $field_key ) {
|
61 |
+
echo esc_html( $field_parts['option_label'] );
|
62 |
}
|
63 |
}
|
64 |
}
|
66 |
foreach ( $field_types['optional'] as $field_key => $field_parts ) {
|
67 |
// compare field *type*
|
68 |
if ( $field['input_type'] == $field_key ) {
|
69 |
+
echo esc_html( $field_parts['option_label'] );
|
70 |
}
|
71 |
}
|
72 |
}
|
admin/partials/templates/form-preview-template.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
* Template Name: Default Form
|
4 |
* Description: The default form template.
|
5 |
*/
|
|
|
6 |
?>
|
7 |
<div class="strong-view strong-form">
|
8 |
|
@@ -24,4 +25,4 @@
|
|
24 |
|
25 |
</div>
|
26 |
|
27 |
-
</div>
|
3 |
* Template Name: Default Form
|
4 |
* Description: The default form template.
|
5 |
*/
|
6 |
+
|
7 |
?>
|
8 |
<div class="strong-view strong-form">
|
9 |
|
25 |
|
26 |
</div>
|
27 |
|
28 |
+
</div>
|
admin/partials/views/group-compat.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
apply_filters( 'wpmtst_view_section', '', 'compat' ),
|
5 |
-
);
|
6 |
-
?>
|
7 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
8 |
-
<h3>
|
9 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
10 |
-
<?php _e( 'Compatibility', 'strong-testimonials' ); ?>
|
11 |
-
</h3>
|
12 |
-
<table class="form-table multiple group-general">
|
13 |
-
<tr class="then then_display then_form then_slideshow then_not_single_template" style="display: none;">
|
14 |
-
<?php include( 'option-divi.php' ); ?>
|
15 |
-
</tr>
|
16 |
-
</table>
|
17 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/group-extra.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
'then_display',
|
5 |
-
'then_not_form',
|
6 |
-
'then_slideshow',
|
7 |
-
'then_not_single_template',
|
8 |
-
apply_filters( 'wpmtst_view_section', '', 'extra' ),
|
9 |
-
);
|
10 |
-
?>
|
11 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
12 |
-
<h3>
|
13 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
14 |
-
<?php _e( 'Extra', 'strong-testimonials' ); ?>
|
15 |
-
</h3>
|
16 |
-
<table class="form-table multiple group-layout">
|
17 |
-
<tr class="then then_display then_not_form then_not_slideshow then_not_single then_multiple" style="display: none;">
|
18 |
-
<?php include( 'option-pagination.php' ); ?>
|
19 |
-
</tr>
|
20 |
-
<tr class="then then_display then_not_form then_slideshow read-more" style="display: none;">
|
21 |
-
<?php include( 'option-read-more-page.php' ); ?>
|
22 |
-
</tr>
|
23 |
-
</table>
|
24 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/group-fields.php
DELETED
@@ -1,75 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
'then_display',
|
5 |
-
'then_not_form',
|
6 |
-
'then_slideshow',
|
7 |
-
'then_single_template',
|
8 |
-
apply_filters( 'wpmtst_view_section', '', 'fields' ),
|
9 |
-
);
|
10 |
-
?>
|
11 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
12 |
-
<h3>
|
13 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
14 |
-
<?php _e( 'Fields', 'strong-testimonials' ); ?>
|
15 |
-
</h3>
|
16 |
-
<table class="form-table multiple group-show">
|
17 |
-
|
18 |
-
<?php
|
19 |
-
$then_classes = array(
|
20 |
-
'then',
|
21 |
-
'then_display',
|
22 |
-
'then_not_form',
|
23 |
-
'then_slideshow',
|
24 |
-
'then_not_single_template',
|
25 |
-
apply_filters( 'wpmtst_view_section', '', 'title' ),
|
26 |
-
);
|
27 |
-
?>
|
28 |
-
<tr class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
29 |
-
<?php include( 'option-title.php' ); ?>
|
30 |
-
</tr>
|
31 |
-
|
32 |
-
<?php
|
33 |
-
$then_classes = array(
|
34 |
-
'then',
|
35 |
-
'then_display',
|
36 |
-
'then_not_form',
|
37 |
-
'then_slideshow',
|
38 |
-
'then_not_single_template',
|
39 |
-
apply_filters( 'wpmtst_view_section', '', 'thumbnail' ),
|
40 |
-
);
|
41 |
-
?>
|
42 |
-
<tr class="<?php echo esc_attr( implode( ' ' ,array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
43 |
-
<?php include( 'option-thumbnail.php' ); ?>
|
44 |
-
</tr>
|
45 |
-
|
46 |
-
<?php
|
47 |
-
$then_classes = array(
|
48 |
-
'then',
|
49 |
-
'then_display',
|
50 |
-
'then_not_form',
|
51 |
-
'then_slideshow',
|
52 |
-
'then_not_single_template',
|
53 |
-
apply_filters( 'wpmtst_view_section', '', 'content' ),
|
54 |
-
);
|
55 |
-
?>
|
56 |
-
<tr class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
57 |
-
<?php include( 'option-content.php' ); ?>
|
58 |
-
</tr>
|
59 |
-
|
60 |
-
<?php
|
61 |
-
$then_classes = array(
|
62 |
-
'then',
|
63 |
-
'then_display',
|
64 |
-
'then_not_form',
|
65 |
-
'then_slideshow',
|
66 |
-
'then_single_template',
|
67 |
-
apply_filters( 'wpmtst_view_section', '', 'client-section' ),
|
68 |
-
);
|
69 |
-
?>
|
70 |
-
<tr class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
71 |
-
<?php include( 'option-client-section.php' ); ?>
|
72 |
-
</tr>
|
73 |
-
|
74 |
-
</table>
|
75 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/group-form.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
'then_not_display',
|
5 |
-
'then_not_slideshow',
|
6 |
-
'then_form',
|
7 |
-
'then_not_single_template',
|
8 |
-
apply_filters( 'wpmtst_view_section', '', 'form' ),
|
9 |
-
);
|
10 |
-
?>
|
11 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
12 |
-
<h3>
|
13 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
14 |
-
<?php _e( 'Actions', 'strong-testimonials' ); ?>
|
15 |
-
</h3>
|
16 |
-
<table class="form-table multiple group-select">
|
17 |
-
<tr>
|
18 |
-
<?php include('option-form-category.php'); ?>
|
19 |
-
</tr>
|
20 |
-
<tr>
|
21 |
-
<?php include('option-form-ajax.php'); ?>
|
22 |
-
</tr>
|
23 |
-
</table>
|
24 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/group-query.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
'then_display',
|
5 |
-
'then_not_form',
|
6 |
-
'then_slideshow',
|
7 |
-
'then_not_single_template',
|
8 |
-
apply_filters( 'wpmtst_view_section', '', 'select' ),
|
9 |
-
);
|
10 |
-
?>
|
11 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
12 |
-
<h3>
|
13 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
14 |
-
<?php _e( 'Query', 'strong-testimonials' ); ?>
|
15 |
-
</h3>
|
16 |
-
<table class="form-table multiple group-select">
|
17 |
-
<tr class="subheading">
|
18 |
-
<td><?php _e( 'Option', 'strong-testimonials' ); ?></td>
|
19 |
-
<td><?php _e( 'Setting', 'strong-testimonials' ); ?></td>
|
20 |
-
<td class="divider" colspan="2">
|
21 |
-
<?php _e( 'or Shortcode Attribute', 'strong-testimonials' ); ?>
|
22 |
-
<span class="help-links">
|
23 |
-
<span class="description">
|
24 |
-
<a href="#tab-panel-wpmtst-help-shortcode" class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
25 |
-
</span>
|
26 |
-
</span>
|
27 |
-
</td>
|
28 |
-
<td>Example</td>
|
29 |
-
</tr>
|
30 |
-
<tr class="then then_display then_not_slideshow then_not_form" style="display: none;">
|
31 |
-
<?php include( 'option-select.php' ); ?>
|
32 |
-
</tr>
|
33 |
-
<tr class="then then_slideshow then_not_single then_multiple" style="display: none;">
|
34 |
-
<?php include( 'option-category.php' ); ?>
|
35 |
-
</tr>
|
36 |
-
<tr class="then then_slideshow then_not_single then_multiple" style="display: none;">
|
37 |
-
<?php include( 'option-order.php' ); ?>
|
38 |
-
</tr>
|
39 |
-
<tr class="then then_slideshow then_not_single then_multiple" style="display: none;">
|
40 |
-
<?php include( 'option-limit.php' ); ?>
|
41 |
-
</tr>
|
42 |
-
<?php do_action( 'wpmtst_views_group_query', $view ); ?>
|
43 |
-
</table>
|
44 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/group-slideshow.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
'then_not_display',
|
5 |
-
'then_not_form',
|
6 |
-
'then_slideshow',
|
7 |
-
'then_not_single_template',
|
8 |
-
apply_filters( 'wpmtst_view_section', '', 'slideshow' ),
|
9 |
-
);
|
10 |
-
?>
|
11 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
12 |
-
<h3>
|
13 |
-
<?php /* translators: In the view editor. */ ?>
|
14 |
-
<?php _e( 'Slideshow', 'strong-testimonials' ); ?>
|
15 |
-
</h3>
|
16 |
-
<table class="form-table multiple group-select">
|
17 |
-
<tr>
|
18 |
-
<?php include( 'option-slideshow-num.php' ); ?>
|
19 |
-
</tr>
|
20 |
-
<tr>
|
21 |
-
<?php include( 'option-slideshow-transition.php' ); ?>
|
22 |
-
</tr>
|
23 |
-
<tr>
|
24 |
-
<?php include( 'option-slideshow-behavior.php' ); ?>
|
25 |
-
</tr>
|
26 |
-
<tr>
|
27 |
-
<?php include( 'option-slideshow-navigation.php' ); ?>
|
28 |
-
</tr>
|
29 |
-
</table>
|
30 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/group-style.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$then_classes = array(
|
3 |
-
'then',
|
4 |
-
'then_display',
|
5 |
-
'then_form',
|
6 |
-
'then_slideshow',
|
7 |
-
'then_not_single_template',
|
8 |
-
apply_filters( 'wpmtst_view_section', '', 'style' ),
|
9 |
-
);
|
10 |
-
?>
|
11 |
-
<div class="<?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>" style="display: none;">
|
12 |
-
<h3>
|
13 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
14 |
-
<?php _e( 'Style', 'strong-testimonials' ); ?>
|
15 |
-
</h3>
|
16 |
-
<table class="form-table multiple group-style">
|
17 |
-
<?php do_action( 'wpmtst_view_editor_before_template_list' ); ?>
|
18 |
-
<tr class="then then_display then_not_form then_slideshow" style="display: none;">
|
19 |
-
<?php
|
20 |
-
$current_mode = 'template';
|
21 |
-
$current_type = 'display';
|
22 |
-
include( 'option-template-list.php' );
|
23 |
-
?>
|
24 |
-
</tr>
|
25 |
-
<tr class="then then_not_display then_form then_not_slideshow" style="display: none;">
|
26 |
-
<?php
|
27 |
-
$current_mode = 'form-template';
|
28 |
-
$current_type = 'form';
|
29 |
-
include( 'option-template-list.php' );
|
30 |
-
?>
|
31 |
-
</tr>
|
32 |
-
<?php do_action( 'wpmtst_view_editor_before_layout' ); ?>
|
33 |
-
<tr class="then then_display then_not_form then_not_slideshow" style="display: none;">
|
34 |
-
<?php include( 'option-layout.php' ); ?>
|
35 |
-
</tr>
|
36 |
-
<?php do_action( 'wpmtst_view_editor_before_background' ); ?>
|
37 |
-
|
38 |
-
<tr id="group-style-option-background" class="then then_display then_form then_slideshow" style="display: none;">
|
39 |
-
<?php include( 'option-background.php' ); ?>
|
40 |
-
</tr>
|
41 |
-
<tr id="group-style-option-color" class="then then_display then_form then_slideshow" style="display: none;">
|
42 |
-
<?php include( 'option-color.php' ); ?>
|
43 |
-
</tr>
|
44 |
-
|
45 |
-
<?php do_action( 'wpmtst_view_editor_before_classes' ); ?>
|
46 |
-
<tr class="then then_display then_form then_slideshow" style="display: none;">
|
47 |
-
<?php include( 'option-classes.php' ); ?>
|
48 |
-
</tr>
|
49 |
-
<?php do_action( 'wpmtst_view_editor_after_style_section' ); ?>
|
50 |
-
</table>
|
51 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-background.php
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<th>
|
2 |
-
<?php _e( 'Background', 'strong-testimonials' ); ?>
|
3 |
-
</th>
|
4 |
-
<td>
|
5 |
-
<div class="section-radios background-section">
|
6 |
-
|
7 |
-
<!-- Inputs -->
|
8 |
-
<div class="radio-buttons">
|
9 |
-
<ul class="radio-list background-list">
|
10 |
-
<li>
|
11 |
-
<input type="radio"
|
12 |
-
id="bg-none"
|
13 |
-
name="view[data][background][type]"
|
14 |
-
value="" <?php checked( $view['background']['type'], '' ); ?>>
|
15 |
-
<label for="bg-none">
|
16 |
-
<?php _e( 'inherit from theme', 'strong-testimonials' ); ?>
|
17 |
-
</label>
|
18 |
-
</li>
|
19 |
-
<li>
|
20 |
-
<input type="radio"
|
21 |
-
id="bg-single"
|
22 |
-
name="view[data][background][type]"
|
23 |
-
value="single" <?php checked( $view['background']['type'], 'single' ); ?>>
|
24 |
-
<label for="bg-single">
|
25 |
-
<?php _e( 'single color', 'strong-testimonials' ); ?>
|
26 |
-
</label>
|
27 |
-
</li>
|
28 |
-
<li>
|
29 |
-
<input type="radio"
|
30 |
-
id="bg-gradient"
|
31 |
-
name="view[data][background][type]"
|
32 |
-
value="gradient" <?php checked( $view['background']['type'], 'gradient' ); ?>>
|
33 |
-
<label for="bg-gradient">
|
34 |
-
<?php _e( 'gradient', 'strong-testimonials' ); ?>
|
35 |
-
</label>
|
36 |
-
</li>
|
37 |
-
<li>
|
38 |
-
<input type="radio"
|
39 |
-
id="bg-preset"
|
40 |
-
name="view[data][background][type]"
|
41 |
-
value="preset" <?php checked( $view['background']['type'], 'preset' ); ?>>
|
42 |
-
<label for="bg-preset">
|
43 |
-
<?php _e( 'preset', 'strong-testimonials' ); ?>
|
44 |
-
</label>
|
45 |
-
</li>
|
46 |
-
</ul>
|
47 |
-
</div>
|
48 |
-
|
49 |
-
<!-- Background info -->
|
50 |
-
<div class="radio-description" id="view-background-info">
|
51 |
-
|
52 |
-
<div class="background-description bg-none">
|
53 |
-
<div class="description-inner options">
|
54 |
-
<div>
|
55 |
-
<?php _e( 'No options', 'strong-testimonials' ); ?>
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
|
60 |
-
<div class="background-description bg-single">
|
61 |
-
<div class="description-inner options">
|
62 |
-
<div>
|
63 |
-
<label>
|
64 |
-
<input type="text"
|
65 |
-
id="bg-color"
|
66 |
-
name="view[data][background][color]"
|
67 |
-
value="<?php echo $view['background']['color']; ?>"
|
68 |
-
class="wp-color-picker-field">
|
69 |
-
</label>
|
70 |
-
</div>
|
71 |
-
</div>
|
72 |
-
</div>
|
73 |
-
|
74 |
-
<div class="background-description bg-gradient">
|
75 |
-
<div class="description-inner options">
|
76 |
-
<div>
|
77 |
-
<div class="color-picker-wrap">
|
78 |
-
<div>
|
79 |
-
<label for="bg-gradient1"><?php _e( 'From top', 'strong-testimonials' ); ?></label>
|
80 |
-
</div>
|
81 |
-
<div>
|
82 |
-
<input type="text"
|
83 |
-
id="bg-gradient1"
|
84 |
-
name="view[data][background][gradient1]"
|
85 |
-
value="<?php echo $view['background']['gradient1']; ?>"
|
86 |
-
class="wp-color-picker-field gradient">
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
</div>
|
90 |
-
</div>
|
91 |
-
<div class="description-inner options">
|
92 |
-
<div>
|
93 |
-
<div class="color-picker-wrap">
|
94 |
-
<div>
|
95 |
-
<label for ="bg-gradient2"><?php _e( 'To bottom', 'strong-testimonials' ); ?></label>
|
96 |
-
</div>
|
97 |
-
<div>
|
98 |
-
<input type="text"
|
99 |
-
id="bg-gradient2"
|
100 |
-
name="view[data][background][gradient2]"
|
101 |
-
value="<?php echo $view['background']['gradient2']; ?>"
|
102 |
-
class="wp-color-picker-field gradient">
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
</div>
|
106 |
-
|
107 |
-
</div>
|
108 |
-
</div>
|
109 |
-
|
110 |
-
<div class="background-description bg-preset">
|
111 |
-
<div class="description-inner options">
|
112 |
-
<div>
|
113 |
-
<label for="view-background-preset">
|
114 |
-
<select id="view-background-preset" name="view[data][background][preset]">
|
115 |
-
<?php
|
116 |
-
$presets = wpmtst_get_background_presets();
|
117 |
-
$current_preset = ( isset( $view['background']['preset'] ) && $view['background']['preset'] ) ? $view['background']['preset'] : '';
|
118 |
-
echo '<option value="" ' . selected( $current_preset, '', false ) . '>—</option>';
|
119 |
-
foreach ( $presets as $key => $preset ) {
|
120 |
-
echo '<option value="' . $key . '" ' . selected( $current_preset, $key, false ) . '>' . $preset['label'] . '</option>';
|
121 |
-
}
|
122 |
-
?>
|
123 |
-
</select>
|
124 |
-
</label>
|
125 |
-
</div>
|
126 |
-
</div>
|
127 |
-
|
128 |
-
</div>
|
129 |
-
|
130 |
-
|
131 |
-
</div>
|
132 |
-
|
133 |
-
</div>
|
134 |
-
|
135 |
-
</td>
|
136 |
-
|
137 |
-
<td rowspan="2" class="rowspan">
|
138 |
-
<div id="view-color-preview" class="table-cell">
|
139 |
-
|
140 |
-
<div class="background-preview-wrap">
|
141 |
-
|
142 |
-
<div id="background-preview">
|
143 |
-
Lorem ipsum dolor sit amet, accusam complectitur an eos. No vix perpetua adolescens, vix vidisse maiorum
|
144 |
-
in. No erat falli scripta qui, vis ubique scripta electram ad. Vix prompta adipisci no, ad vidisse
|
145 |
-
expetendis.
|
146 |
-
</div>
|
147 |
-
|
148 |
-
</div>
|
149 |
-
|
150 |
-
</div>
|
151 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-boilerplate.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-option">
|
4 |
-
<?php _e( 'Option Name', 'strong-testimonials' ); ?>
|
5 |
-
</label>
|
6 |
-
</th>
|
7 |
-
<td>
|
8 |
-
<div class="inline">
|
9 |
-
<select id="view-option" class="if selectper" name="view[data][option]">
|
10 |
-
<option value="yes" <?php selected( 'yes', $view['option'] ); ?>>
|
11 |
-
<?php _e( 'yes', 'strong-testimonials' ); ?>
|
12 |
-
</option>
|
13 |
-
<option value="no" <?php selected( 'no', $view['option'] ); ?>>
|
14 |
-
<?php _e( 'no', 'strong-testimonials' ); ?>
|
15 |
-
</option>
|
16 |
-
<option value="maybe" <?php selected( 'maybe', $view['option'] ); ?>>
|
17 |
-
<?php _e( 'maybe', 'strong-testimonials' ); ?>
|
18 |
-
</option>
|
19 |
-
</select>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="inline then fast then_yes then_not_no then_not_maybe" style="display: none;">
|
23 |
-
<p class="description tall">
|
24 |
-
<?php _e( 'Yes', 'strong-testimonials' ); ?><br>
|
25 |
-
</p>
|
26 |
-
</div>
|
27 |
-
|
28 |
-
<div class="inline then fast then_not_yes then_no then_not_maybe" style="display: none;">
|
29 |
-
<p class="description tall">
|
30 |
-
<?php _e( 'No', 'strong-testimonials' ); ?><br>
|
31 |
-
</p>
|
32 |
-
</div>
|
33 |
-
|
34 |
-
<div class="inline then fast then_not_yes then_not_no then_maybe" style="display: none;">
|
35 |
-
<p class="description tall">
|
36 |
-
<?php _e( 'Maybe', 'strong-testimonials' ); ?><br>
|
37 |
-
</p>
|
38 |
-
</div>
|
39 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-category.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-category-select">
|
4 |
-
<?php _e( 'Categories', 'strong-testimonials' ); ?>
|
5 |
-
</label>
|
6 |
-
</th>
|
7 |
-
<?php if ( $cat_count ) : ?>
|
8 |
-
<td>
|
9 |
-
<div id="view-category" class="row">
|
10 |
-
<div class="table inline">
|
11 |
-
<div class="table-row">
|
12 |
-
<div class="table-cell select-cell then_display then_slideshow then_not_form">
|
13 |
-
<select id="view-category-select" class="if selectper" name="view[data][category_all]">
|
14 |
-
<option value="allcats" <?php selected( $view['category'], 'all' ); ?>><?php _e( 'all', 'strong-testimonials' ); ?></option>
|
15 |
-
<option value="somecats" <?php echo( 'all' != $view['category'] ? 'selected' : '' ); ?>><?php _ex( 'select', 'verb', 'strong-testimonials' ); ?></option>
|
16 |
-
</select>
|
17 |
-
</div>
|
18 |
-
<div class="table-cell then then_not_allcats then_somecats" style="display: none;">
|
19 |
-
<div class="table">
|
20 |
-
<?php if ( $cat_count > 5 ) : ?>
|
21 |
-
<div class="table-row">
|
22 |
-
<div class="table-cell">
|
23 |
-
<div class="row" style="text-align: right; padding-bottom: 5px;">
|
24 |
-
<input type="button" class="expand-cats button" value="expand list"/>
|
25 |
-
</div>
|
26 |
-
</div>
|
27 |
-
</div>
|
28 |
-
<?php endif; ?>
|
29 |
-
<div class="table-row">
|
30 |
-
<div class="table-cell">
|
31 |
-
<?php wpmtst_category_checklist( $view_cats_array ); ?>
|
32 |
-
</div>
|
33 |
-
</div>
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
</div>
|
38 |
-
</div>
|
39 |
-
</td>
|
40 |
-
<?php else : ?>
|
41 |
-
<td>
|
42 |
-
<div id="view-category" class="row">
|
43 |
-
<input type="hidden" name="view[data][category_all]" value="all">
|
44 |
-
<p class="description tall"><?php _e( 'No categories found', 'strong-testimonials' ); ?></p>
|
45 |
-
</div>
|
46 |
-
</td>
|
47 |
-
<?php endif; ?>
|
48 |
-
<td class="divider">
|
49 |
-
<p><?php echo wp_kses_post( '<code>category</code>' ); ?></p>
|
50 |
-
</td>
|
51 |
-
<td>
|
52 |
-
<p><?php _e( 'a comma-separated list of category slugs or ID\'s', 'strong-testimonials' ); ?></p>
|
53 |
-
</td>
|
54 |
-
<td>
|
55 |
-
<p><?php echo wp_kses_post( '<code>category="accounting"</code>' ); ?></p>
|
56 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-classes.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<th>
|
2 |
-
<label for="view-class">
|
3 |
-
<?php _e( 'CSS Classes', 'strong-testimonials' ); ?>
|
4 |
-
</label>
|
5 |
-
</th>
|
6 |
-
<td colspan="2">
|
7 |
-
<div class="then then_display then_form then_slideshow input" style="display: none;">
|
8 |
-
<input type="text" id="view-class" class="long inline" name="view[data][class]" value="<?php echo $view['class']; ?>">
|
9 |
-
<p class="inline description tall">
|
10 |
-
<?php _e( 'For advanced users.', 'strong-testimonials' ); ?>
|
11 |
-
<?php _e( 'Separate class names by spaces.', 'strong-testimonials' ); ?>
|
12 |
-
</p>
|
13 |
-
</div>
|
14 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-client-section.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<?php _e( 'Custom Fields', 'strong-testimonials' ); ?>
|
4 |
-
</th>
|
5 |
-
<td colspan="2">
|
6 |
-
|
7 |
-
<div id="client-section-table">
|
8 |
-
|
9 |
-
<div id="custom-field-list2" class="fields">
|
10 |
-
<?php
|
11 |
-
if ( isset( $view['client_section'] ) ) {
|
12 |
-
foreach ( $view['client_section'] as $key => $field ) {
|
13 |
-
wpmtst_view_field_inputs( $key, $field );
|
14 |
-
}
|
15 |
-
}
|
16 |
-
?>
|
17 |
-
</div>
|
18 |
-
|
19 |
-
</div>
|
20 |
-
|
21 |
-
<div id="add-field-bar" class="is-below">
|
22 |
-
<input id="add-field"
|
23 |
-
type="button"
|
24 |
-
name="add-field"
|
25 |
-
source="view[data]"
|
26 |
-
value="<?php _e( 'Add Field', 'strong-testimonials' ); ?>"
|
27 |
-
class="button-secondary" />
|
28 |
-
</div>
|
29 |
-
|
30 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-color.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<th>
|
2 |
-
<?php _e( 'Font Color', 'strong-testimonials' ); ?>
|
3 |
-
</th>
|
4 |
-
<td>
|
5 |
-
<div class="section-radios font-color-section">
|
6 |
-
|
7 |
-
<div class="radio-buttons">
|
8 |
-
<ul class="radio-list font-folor-list">
|
9 |
-
<li>
|
10 |
-
<input type="radio"
|
11 |
-
id="fc-none"
|
12 |
-
name="view[data][font-color][type]"
|
13 |
-
value="" <?php checked( $view['font-color']['type'], '' ); ?>>
|
14 |
-
<label for="fc-none">
|
15 |
-
<?php _e( 'inherit from theme', 'strong-testimonials' ); ?>
|
16 |
-
</label>
|
17 |
-
</li>
|
18 |
-
<li>
|
19 |
-
<input type="radio"
|
20 |
-
id="fc-custom"
|
21 |
-
name="view[data][font-color][type]"
|
22 |
-
value="custom" <?php checked( $view['font-color']['type'], 'custom' ); ?>>
|
23 |
-
<label for="fc-custom">
|
24 |
-
<?php _e( 'custom', 'strong-testimonials' ); ?>
|
25 |
-
</label>
|
26 |
-
</li>
|
27 |
-
</ul>
|
28 |
-
</div>
|
29 |
-
|
30 |
-
<div class="radio-description" id="view-font-color-info">
|
31 |
-
<div class="font-color-description fc-none">
|
32 |
-
<div class="description-inner options">
|
33 |
-
<div>
|
34 |
-
<?php _e( 'No options', 'strong-testimonials' ); ?>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
</div>
|
38 |
-
|
39 |
-
<div class="font-color-description fc-custom">
|
40 |
-
<div class="description-inner options">
|
41 |
-
<div>
|
42 |
-
<label>
|
43 |
-
<input type="text"
|
44 |
-
id="fc-color"
|
45 |
-
name="view[data][font-color][color]"
|
46 |
-
value="<?php echo $view['font-color']['color']; ?>"
|
47 |
-
class="wp-color-picker-field">
|
48 |
-
</label>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
|
52 |
-
</div>
|
53 |
-
|
54 |
-
</div>
|
55 |
-
|
56 |
-
</div>
|
57 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-content.php
DELETED
@@ -1,232 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-content">
|
4 |
-
<?php _e( 'Content', 'strong-testimonials' ); ?>
|
5 |
-
</label>
|
6 |
-
</th>
|
7 |
-
<td colspan="2">
|
8 |
-
|
9 |
-
<!-- Content type -->
|
10 |
-
<div id="option-content" class="row">
|
11 |
-
<div class="row-inner">
|
12 |
-
|
13 |
-
<!-- select -->
|
14 |
-
<div class="inline">
|
15 |
-
<select id="view-content" class="if selectper min-width-1 label-not-adjacent" name="view[data][content]">
|
16 |
-
<option value="entire" <?php selected( 'entire', $view['content'] ); ?>>
|
17 |
-
<?php _ex( 'entire content', 'display setting', 'strong-testimonials' ); ?>
|
18 |
-
</option>
|
19 |
-
<option value="truncated" <?php selected( 'truncated', $view['content'] ); ?>>
|
20 |
-
<?php _ex( 'automatic excerpt', 'display setting', 'strong-testimonials' ); ?>
|
21 |
-
</option>
|
22 |
-
<option value="excerpt" <?php selected( 'excerpt', $view['content'] ); ?>>
|
23 |
-
<?php _ex( 'manual excerpt', 'display setting', 'strong-testimonials' ); ?>
|
24 |
-
</option>
|
25 |
-
</select>
|
26 |
-
</div>
|
27 |
-
|
28 |
-
<!-- info & screenshot -->
|
29 |
-
<div class="inline then fast then_truncated then_not_entire then_not_excerpt" style="display: none;">
|
30 |
-
<p class="description">
|
31 |
-
<?php _e( 'This will strip tags like <em> and <strong>.', 'strong-testimonials' ); ?>
|
32 |
-
</p>
|
33 |
-
</div>
|
34 |
-
<div class="inline then fast then_not_truncated then_not_entire then_excerpt" style="display: none;">
|
35 |
-
<p class="description">
|
36 |
-
<?php printf( __( 'To create manual excerpts, you may need to enable them in the post editor like in this <a href="%s" class="thickbox">screenshot</a>.', 'strong-testimonials' ), esc_url( '#TB_inline?width=&height=210&inlineId=screenshot-screen-options' ) ); ?>
|
37 |
-
<span class="screenshot" id="screenshot-screen-options" style="display: none;">
|
38 |
-
<img src="<?php echo WPMTST_ADMIN_URL; ?>img/screen-options.png" width="600">
|
39 |
-
</span>
|
40 |
-
</p>
|
41 |
-
</div>
|
42 |
-
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<!-- Excerpt length -->
|
47 |
-
<div id="option-content-length" class="row then then_not_entire then_excerpt then_truncated" style="display: none;">
|
48 |
-
|
49 |
-
<div class="row-inner">
|
50 |
-
|
51 |
-
<!-- info -->
|
52 |
-
<div class="inline tight then then_excerpt then_not_truncated" style="display: none;">
|
53 |
-
<span>
|
54 |
-
<?php _e( 'If no manual excerpt, create an excerpt using', 'strong-testimonials' ); ?>
|
55 |
-
</span>
|
56 |
-
</div>
|
57 |
-
|
58 |
-
<!-- default or custom? -->
|
59 |
-
<div class="inline">
|
60 |
-
<label>
|
61 |
-
<select id="view-use_default_length" class="if selectgroup min-width-1" name="view[data][use_default_length]">
|
62 |
-
<option value="1" <?php selected( $view['use_default_length'] ); ?>>
|
63 |
-
<?php _ex( 'default length', 'display setting', 'strong-testimonials' ); ?>
|
64 |
-
</option>
|
65 |
-
<option value="0" <?php selected( ! $view['use_default_length'] ); ?>>
|
66 |
-
<?php _ex( 'custom length', 'display setting', 'strong-testimonials' ); ?>
|
67 |
-
</option>
|
68 |
-
</select>
|
69 |
-
</label>
|
70 |
-
</div>
|
71 |
-
|
72 |
-
<!-- 1st option: default -->
|
73 |
-
<div class="inline then fast then_use_default_length then_1 then_not_0" style="display: none;">
|
74 |
-
<label for="view-use_default_length" class="inline-middle"><?php // Because partner option has <label>, this prevents micro-bounce ?>
|
75 |
-
<p class="description tall"><?php _e( 'The default length is 55 words but your theme may override that.', 'strong-testimonials' ); ?></p>
|
76 |
-
</label>
|
77 |
-
</div>
|
78 |
-
|
79 |
-
<!-- 2nd option: length -->
|
80 |
-
<div class="inline then fast then_use_default_length then_0 then_not_1" style="display: none;">
|
81 |
-
<label class="inline-middle">
|
82 |
-
<?php printf( _x( 'the first %s words', 'the excerpt length', 'strong-testimonials' ), '<input id="view-excerpt_length" class="input-incremental" type="number" min="1" max="999" name="view[data][excerpt_length]" value="' . $view['excerpt_length'] . '">' ); ?>
|
83 |
-
</label>
|
84 |
-
</div>
|
85 |
-
|
86 |
-
</div>
|
87 |
-
|
88 |
-
</div><!-- #option-content-length -->
|
89 |
-
|
90 |
-
<!-- Read-more link -->
|
91 |
-
<div id="option-content-read-more" class="row then then_not_entire then_excerpt then_truncated" style="display: none;">
|
92 |
-
|
93 |
-
<div class="row-inner subgroup">
|
94 |
-
|
95 |
-
<!-- action: full post or in place -->
|
96 |
-
<div class="row-inner">
|
97 |
-
<div class="inline">
|
98 |
-
<?php _e( 'Add a <strong>Read more</strong> link to', 'strong-testimonials' ); ?>
|
99 |
-
</div>
|
100 |
-
<div class="inline tight">
|
101 |
-
<label>
|
102 |
-
<select id="view-more_post_in_place"
|
103 |
-
class="if selectgroup"
|
104 |
-
name="view[data][more_post_in_place]">
|
105 |
-
<option value="0" <?php selected( ! $view['more_post_in_place'] ); ?>>
|
106 |
-
<?php // TODO Get label from Properties ?>
|
107 |
-
<?php _e( 'the full testimonial', 'strong-testimonials' ); ?>
|
108 |
-
</option>
|
109 |
-
<option value="1" <?php selected( $view['more_post_in_place'] ); ?>>
|
110 |
-
<?php _e( 'expand content in place', 'strong-testimonials' ); ?>
|
111 |
-
</option>
|
112 |
-
</select>
|
113 |
-
</label>
|
114 |
-
</div>
|
115 |
-
</div>
|
116 |
-
|
117 |
-
<!-- ellipsis -->
|
118 |
-
<div class="row-inner">
|
119 |
-
<div class="then then_use_default_more then_0 then_not_1" style="display: none;">
|
120 |
-
<div class="inline">
|
121 |
-
<label>
|
122 |
-
<select id="view-more_post_ellipsis"
|
123 |
-
class="if selectgroup"
|
124 |
-
name="view[data][more_post_ellipsis]">
|
125 |
-
<option value="1" <?php selected( $view['more_post_ellipsis'] ); ?>>
|
126 |
-
<?php _e( 'with an ellipsis', 'strong-testimonials' ); ?>
|
127 |
-
</option>
|
128 |
-
<option value="0" <?php selected( ! $view['more_post_ellipsis'] ); ?>>
|
129 |
-
<?php _e( 'without an ellipsis', 'strong-testimonials' ); ?>
|
130 |
-
</option>
|
131 |
-
</select>
|
132 |
-
</label>
|
133 |
-
</div>
|
134 |
-
<div class="inline then then_excerpt then_not_truncated" style="display: none;">
|
135 |
-
<p class="description">
|
136 |
-
<?php _e( 'Automatic excerpt only.', 'strong-testimonials' ); ?>
|
137 |
-
</p>
|
138 |
-
</div>
|
139 |
-
</div>
|
140 |
-
</div>
|
141 |
-
|
142 |
-
<!-- default or custom -->
|
143 |
-
<div class="row-inner">
|
144 |
-
<div class="inline tight then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
|
145 |
-
<?php _e( 'with link text to read more', 'strong-testimonials' ); ?>
|
146 |
-
</div>
|
147 |
-
<div class="inline then fast then_more_post_in_place then_0 then_not_1" style="display: none;">
|
148 |
-
<label>
|
149 |
-
<select id="view-use_default_more"
|
150 |
-
class="if selectgroup min-width-1"
|
151 |
-
name="view[data][use_default_more]">
|
152 |
-
<option value="1" <?php selected( $view['use_default_more'] ); ?>>
|
153 |
-
<?php _ex( 'with default link text', 'display setting', 'strong-testimonials' ); ?>
|
154 |
-
</option>
|
155 |
-
<option value="0" <?php selected( ! $view['use_default_more'] ); ?>>
|
156 |
-
<?php _ex( 'with custom link text', 'display setting', 'strong-testimonials' ); ?>
|
157 |
-
</option>
|
158 |
-
</select>
|
159 |
-
</label>
|
160 |
-
</div>
|
161 |
-
<div class="inline then fast then_use_default_more then_1 then_not_0" style="display: none;">
|
162 |
-
<p class="description"><?php _e( 'If you only see […] without a link then use the custom link text instead.', 'strong-testimonials' ); ?></p>
|
163 |
-
</div>
|
164 |
-
<!-- read more -->
|
165 |
-
<div class="inline then fast then_use_default_more then_0 then_not_1" style="display: none;">
|
166 |
-
<span id="option-link-text" class="inline-span">
|
167 |
-
<label for="view-more_post_text">
|
168 |
-
<input type="text" id="view-more_post_text" name="view[data][more_post_text]"
|
169 |
-
value="<?php echo $view['more_post_text']; ?>" size="22"
|
170 |
-
placeholder="<?php _e( 'enter a phrase', 'strong-testimonials' ); ?>">
|
171 |
-
</label>
|
172 |
-
</span>
|
173 |
-
</div>
|
174 |
-
</div>
|
175 |
-
|
176 |
-
<!-- read less -->
|
177 |
-
<div class="row-inner then fast then_more_post_in_place then_1 then_not_0" style="display: none;">
|
178 |
-
<div class="inline tight">
|
179 |
-
<?php _e( 'and link text to read less', 'strong-testimonials' ); ?>
|
180 |
-
</div>
|
181 |
-
<div class="inline tight">
|
182 |
-
<span id="option-link-text-less" class="inline-span">
|
183 |
-
<label for="view-less_post_text">
|
184 |
-
<input type="text" id="view-less_post_text" name="view[data][less_post_text]"
|
185 |
-
value="<?php echo $view['less_post_text']; ?>" size="22"
|
186 |
-
placeholder="<?php _e( 'enter a phrase', 'strong-testimonials' ); ?>">
|
187 |
-
</label>
|
188 |
-
</span>
|
189 |
-
<p class="inline description"><?php _e( 'Leave blank to leave content expanded without a link.', 'strong-testimonials' ); ?></p>
|
190 |
-
</div>
|
191 |
-
<div class="html-content-checkbox">
|
192 |
-
<input class="checkbox" id="view-html-content" name="view[data][html_content]" value="1" type="checkbox" <?php checked( $view['html_content'] ); ?>/>
|
193 |
-
<label for="view-html-content">
|
194 |
-
<?php _e( 'Show <strong>html content</strong>.', 'strong-testimonials' ); ?>
|
195 |
-
</label>
|
196 |
-
</div>
|
197 |
-
</div>
|
198 |
-
|
199 |
-
<!-- automatic or both -->
|
200 |
-
<div class="row-inner then then_excerpt then_not_truncated" style="display: none;">
|
201 |
-
<div class="inline">
|
202 |
-
<label>
|
203 |
-
<select id="view-more_full_post" class="if selectgroup" name="view[data][more_full_post]">
|
204 |
-
<option value="0" <?php selected( $view['more_full_post'], 0 ); ?>>
|
205 |
-
<?php _ex( 'for automatic excerpt only', 'display setting', 'strong-testimonials' ); ?>
|
206 |
-
</option>
|
207 |
-
<option value="1" <?php selected( $view['more_full_post'], 1 ); ?>>
|
208 |
-
<?php _ex( 'for both automatic and manual excerpts', 'display setting', 'strong-testimonials' ); ?>
|
209 |
-
</option>
|
210 |
-
</select>
|
211 |
-
</label>
|
212 |
-
</div>
|
213 |
-
</div>
|
214 |
-
</div>
|
215 |
-
</div>
|
216 |
-
|
217 |
-
<div class="row links then then_not_entire then_truncated then_excerpt" style="display: none;">
|
218 |
-
<p class="description tall solo">
|
219 |
-
<?php
|
220 |
-
printf(
|
221 |
-
esc_html__( '%s about WordPress excerpts', 'strong-testimonials' ),
|
222 |
-
sprintf(
|
223 |
-
'<a href="%s" target="_blank">%s</a>',
|
224 |
-
esc_url( 'http://buildwpyourself.com/wordpress-manual-excerpts-more-tag/' ),
|
225 |
-
esc_html__( 'Learn more', 'strong-testimonials' )
|
226 |
-
)
|
227 |
-
);
|
228 |
-
?>
|
229 |
-
</p>
|
230 |
-
</div>
|
231 |
-
|
232 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-divi.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* translators: On the Views admin screen. */
|
3 |
-
global $view;
|
4 |
-
?>
|
5 |
-
<th>
|
6 |
-
<label for="view-divi_builder"><?php _e( 'Divi Builder', 'strong-testimonials' ); ?></label>
|
7 |
-
</th>
|
8 |
-
<td>
|
9 |
-
<div class="row">
|
10 |
-
<div class="row-inner">
|
11 |
-
<input type="checkbox" id="view-divi_builder" class="if toggle checkbox"
|
12 |
-
name="view[data][divi_builder]" value="1" <?php checked( $view['divi_builder'] ); ?>/>
|
13 |
-
<label for="view-divi_builder">
|
14 |
-
<?php _e( 'Check this if adding this view (via shortcode or widget) using the Visual Builder in <b>Divi Builder version 2</b>.', 'strong-testimonials' ); ?>
|
15 |
-
</label>
|
16 |
-
<p class="description short">
|
17 |
-
<?php _e( 'Not required if simply adding this view in the default editor.', 'strong-testimonials' ); ?>
|
18 |
-
</p>
|
19 |
-
<p class="description short">
|
20 |
-
<?php _e( 'Not required if simply adding this view in the <b>Divi theme</b> using either the default editor or Divi Builder.', 'strong-testimonials' ); ?>
|
21 |
-
</p>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-form-ajax.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<input type="checkbox" id="view-form_ajax" class="checkbox if toggle"
|
4 |
-
name="view[data][form_ajax]" value="1" <?php checked( $view['form_ajax'] ); ?>>
|
5 |
-
<label for="view-form_ajax">
|
6 |
-
<?php _e( 'Submit form without reloading the page (Ajax)', 'strong-testimonials' ); ?>
|
7 |
-
</label>
|
8 |
-
</th>
|
9 |
-
<td>
|
10 |
-
<p class="description tall">
|
11 |
-
<?php _e( 'This will override the <strong>Success Redirect</strong> setting.', 'strong-testimonials' ); ?>
|
12 |
-
</p>
|
13 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-form-category.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<?php _e( 'Assign to a category', 'strong-testimonials' ); ?>
|
4 |
-
</th>
|
5 |
-
<?php if ( $cat_count ) : ?>
|
6 |
-
<td>
|
7 |
-
<div class="table">
|
8 |
-
<?php if ( $cat_count > 5 ) : ?>
|
9 |
-
<div class="table-row">
|
10 |
-
<div class="table-cell">
|
11 |
-
<div class="row" style="text-align: right; padding-bottom: 5px;">
|
12 |
-
<input type="button" class="expand-cats button" value="expand list"/>
|
13 |
-
</div>
|
14 |
-
</div>
|
15 |
-
</div>
|
16 |
-
<?php endif; ?>
|
17 |
-
<div class="table-row">
|
18 |
-
<div class="table-cell">
|
19 |
-
<?php wpmtst_form_category_checklist( $view_cats_array ); ?>
|
20 |
-
</div>
|
21 |
-
</div>
|
22 |
-
</div>
|
23 |
-
</td>
|
24 |
-
<?php else : ?>
|
25 |
-
<td>
|
26 |
-
<p class="description tall"><?php _e( 'No categories found', 'strong-testimonials' ); ?></p>
|
27 |
-
</td>
|
28 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-id.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<div class="then then_not_slideshow then_single then_not_multiple" style="display: none;">
|
3 |
-
|
4 |
-
<div class="row-inner">
|
5 |
-
<label>
|
6 |
-
<select id="view-id" name="view[data][id]">
|
7 |
-
<option value="0"><?php _e( '— select —', 'strong-testimonials' ); ?></option>
|
8 |
-
<?php foreach ( $testimonials_list as $post ) : ?>
|
9 |
-
<option value="<?php echo $post->ID; ?>" <?php selected( $view['id'], $post->ID ); ?>>
|
10 |
-
<?php echo $post->post_title ? $post->post_title : __( '(untitled)', 'strong-testimonials' ); ?>
|
11 |
-
</option>
|
12 |
-
<?php endforeach; ?>
|
13 |
-
</select>
|
14 |
-
</label>
|
15 |
-
</div>
|
16 |
-
<div class="row-inner">
|
17 |
-
<label for="view-post_id">
|
18 |
-
<?php _ex( 'or enter its ID or slug', 'to select a testimonial', 'strong-testimonials' ); ?>
|
19 |
-
</label>
|
20 |
-
<input type="text" id="view-post_id" name="view[data][post_id]" size="30">
|
21 |
-
</div>
|
22 |
-
|
23 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-layout.php
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
<th>
|
2 |
-
<?php _e( 'Layout', 'strong-testimonials' ); ?>
|
3 |
-
</th>
|
4 |
-
<td colspan="2">
|
5 |
-
<div class="section-radios layout-section">
|
6 |
-
|
7 |
-
<!-- Inputs -->
|
8 |
-
<div class="radio-buttons">
|
9 |
-
<ul class="radio-list layout-list">
|
10 |
-
<li>
|
11 |
-
<input type="radio"
|
12 |
-
id="view-layout-normal"
|
13 |
-
name="view[data][layout]"
|
14 |
-
value="" <?php checked( false, $view['layout'] ); ?>>
|
15 |
-
<label for="view-layout-normal">
|
16 |
-
<?php _e( 'normal', 'strong-testimonials' ); ?>
|
17 |
-
</label>
|
18 |
-
</li>
|
19 |
-
<li>
|
20 |
-
<input type="radio"
|
21 |
-
id="view-layout-masonry"
|
22 |
-
name="view[data][layout]"
|
23 |
-
value="masonry" <?php checked( 'masonry', $view['layout'] ); ?>>
|
24 |
-
<label for="view-layout-masonry">
|
25 |
-
<?php _e( 'Masonry', 'strong-testimonials' ); ?>
|
26 |
-
</label>
|
27 |
-
</li>
|
28 |
-
<li>
|
29 |
-
<input type="radio"
|
30 |
-
id="view-layout-columns"
|
31 |
-
name="view[data][layout]"
|
32 |
-
value="columns" <?php checked( 'columns', $view['layout'] ); ?>>
|
33 |
-
<label for="view-layout-columns">
|
34 |
-
<?php _e( 'columns', 'strong-testimonials' ); ?>
|
35 |
-
</label>
|
36 |
-
</li>
|
37 |
-
<li>
|
38 |
-
<input type="radio"
|
39 |
-
id="view-layout-grid"
|
40 |
-
name="view[data][layout]"
|
41 |
-
value="grid" <?php checked( 'grid', $view['layout'] ); ?>>
|
42 |
-
<label for="view-layout-grid">
|
43 |
-
<?php _e( 'grid', 'strong-testimonials' ); ?>
|
44 |
-
</label>
|
45 |
-
</li>
|
46 |
-
</ul>
|
47 |
-
</div>
|
48 |
-
|
49 |
-
<!-- Layout Info -->
|
50 |
-
<div>
|
51 |
-
<div class="radio-description" id="view-layout-info">
|
52 |
-
|
53 |
-
<div class="layout-description view-layout-normal">
|
54 |
-
<p><?php _e( 'A single column.', 'strong-testimonials' ); ?></p>
|
55 |
-
</div>
|
56 |
-
|
57 |
-
<div class="layout-description view-layout-masonry">
|
58 |
-
<p><?php printf( __( 'A cascading, responsive grid using the jQuery plugin <a href="%s" target="_blank">Masonry</a>.', 'strong-testimonials' ), esc_url( 'http://masonry.desandro.com/' ) ); ?></p>
|
59 |
-
<p><?php _e( 'The universal solution that works well regardless of testimonial lengths.', 'strong-testimonials' ); ?></p>
|
60 |
-
<p><?php _e( 'Not compatible with pagination.', 'strong-testimonials' ); ?></p>
|
61 |
-
</div>
|
62 |
-
|
63 |
-
<div class="layout-description view-layout-columns">
|
64 |
-
<p><?php printf( __( 'Using <a href="%s" target="_blank">CSS multi-column</a>. Fill from top to bottom, then over to next column.', 'strong-testimonials' ), esc_url( 'https://css-tricks.com/guide-responsive-friendly-css-columns/' ) ); ?></p>
|
65 |
-
<p><?php _e( 'Works well with both long and short testimonials.', 'strong-testimonials' ); ?></p>
|
66 |
-
<p><?php _e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
|
67 |
-
</div>
|
68 |
-
|
69 |
-
<div class="layout-description view-layout-grid">
|
70 |
-
<p><?php
|
71 |
-
$url = 'https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties';
|
72 |
-
printf( __( 'Using <a href="%s" target="_blank">CSS flexbox</a>.', 'strong-testimonials' ), esc_url( $url ) );
|
73 |
-
?></p>
|
74 |
-
<p><?php _e( 'Testimonials will be equal height so this works best when they are about the same length either naturally or using excerpts.', 'strong-testimonials' ); ?></p>
|
75 |
-
<p><?php _e( 'Compatible with pagination.', 'strong-testimonials' ); ?></p>
|
76 |
-
</div>
|
77 |
-
|
78 |
-
</div>
|
79 |
-
|
80 |
-
<!-- Column selector -->
|
81 |
-
<div class="radio-description options" id="column-count-wrapper">
|
82 |
-
<div>
|
83 |
-
<label for="view-column-count"><?php _e( 'Number of columns', 'strong-testimonials' ); ?></label>
|
84 |
-
<select id="view-column-count" name="view[data][column_count]">
|
85 |
-
<option value="2" <?php selected( $view['column_count'], 2 ); ?>>2</option>
|
86 |
-
<option value="3" <?php selected( $view['column_count'], 3 ); ?>>3</option>
|
87 |
-
<option value="4" <?php selected( $view['column_count'], 4 ); ?>>4</option>
|
88 |
-
</select>
|
89 |
-
</div>
|
90 |
-
</div>
|
91 |
-
</div>
|
92 |
-
|
93 |
-
<!-- Examples -->
|
94 |
-
<div>
|
95 |
-
<div class="layout-example view-layout-normal">
|
96 |
-
<div class="example-container">
|
97 |
-
<div class="box"><span>1</span></div>
|
98 |
-
<div class="box size2"><span>2</span></div>
|
99 |
-
<div class="box"><span>3</span></div>
|
100 |
-
<div class="box size2"><span>4</span></div>
|
101 |
-
<div class="box"><span>5</span></div>
|
102 |
-
</div>
|
103 |
-
</div>
|
104 |
-
<div class="layout-example view-layout-masonry">
|
105 |
-
<div class="example-container col-2">
|
106 |
-
<div class="grid-sizer"></div>
|
107 |
-
<div class="box"><span>1</span></div>
|
108 |
-
<div class="box size2"><span>2</span></div>
|
109 |
-
<div class="box"><span>3</span></div>
|
110 |
-
<div class="box size3"><span>4</span></div>
|
111 |
-
<div class="box"><span>5</span></div>
|
112 |
-
<div class="box size2"><span>6</span></div>
|
113 |
-
<div class="box"><span>7</span></div>
|
114 |
-
<div class="box size3"><span>8</span></div>
|
115 |
-
<div class="box"><span>9</span></div>
|
116 |
-
</div>
|
117 |
-
</div>
|
118 |
-
<div class="layout-example view-layout-columns">
|
119 |
-
<div class="example-container col-2">
|
120 |
-
<div class="box"><span>1</span></div>
|
121 |
-
<div class="box size2"><span>2</span></div>
|
122 |
-
<div class="box"><span>3</span></div>
|
123 |
-
<div class="box size3"><span>4</span></div>
|
124 |
-
<div class="box"><span>5</span></div>
|
125 |
-
<div class="box size2"><span>6</span></div>
|
126 |
-
<div class="box"><span>7</span></div>
|
127 |
-
<div class="box size3"><span>8</span></div>
|
128 |
-
<div class="box"><span>9</span></div>
|
129 |
-
</div>
|
130 |
-
</div>
|
131 |
-
<div class="layout-example view-layout-grid">
|
132 |
-
<div class="example-container col-2">
|
133 |
-
<div class="box"><span>1</span></div>
|
134 |
-
<div class="box"><span>2</span></div>
|
135 |
-
<div class="box"><span>3</span></div>
|
136 |
-
<div class="box"><span>4</span></div>
|
137 |
-
<div class="box"><span>5</span></div>
|
138 |
-
<div class="box"><span>6</span></div>
|
139 |
-
<div class="box"><span>7</span></div>
|
140 |
-
<div class="box"><span>8</span></div>
|
141 |
-
<div class="box"><span>9</span></div>
|
142 |
-
</div>
|
143 |
-
</div>
|
144 |
-
</div>
|
145 |
-
|
146 |
-
</div>
|
147 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-limit.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-all">
|
4 |
-
<?php _e( 'Quantity', 'strong-testimonials' ); ?>
|
5 |
-
</label>
|
6 |
-
</th>
|
7 |
-
<td>
|
8 |
-
<div class="row">
|
9 |
-
<div class="inline">
|
10 |
-
<select class="if select" id="view-all" name="view[data][all]">
|
11 |
-
<option value="1" <?php selected( -1, $view['count'] ); ?>>
|
12 |
-
<?php _e( 'all', 'strong-testimonials' ); ?>
|
13 |
-
</option>
|
14 |
-
<option class="trip" value="0" <?php selected( $view['count'] > 0 ); ?>>
|
15 |
-
<?php _ex( 'count', 'noun', 'strong-testimonials' ); ?>
|
16 |
-
</option>
|
17 |
-
</select>
|
18 |
-
|
19 |
-
<label>
|
20 |
-
<input class="input-incremental then_all" type="number" id="view-count"
|
21 |
-
name="view[data][count]" value="<?php echo ( -1 == $view['count'] ) ? 1 : $view['count']; ?>"
|
22 |
-
min="1" size="5" style="display: none;">
|
23 |
-
</label>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
</td>
|
27 |
-
<td class="divider">
|
28 |
-
<p><?php echo wp_kses_post( '<code>count</code>' ); ?></p>
|
29 |
-
</td>
|
30 |
-
<td></td>
|
31 |
-
<td>
|
32 |
-
<p><?php echo wp_kses_post( '<code>count=5</code>' ); ?></p>
|
33 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-order.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-order">
|
4 |
-
<?php _ex( 'Order', 'noun', 'strong-testimonials' ); ?>
|
5 |
-
</label>
|
6 |
-
</th>
|
7 |
-
<td>
|
8 |
-
<div class="row">
|
9 |
-
<div class="inline">
|
10 |
-
<select id="view-order" name="view[data][order]">
|
11 |
-
<?php foreach ( $view_options['order'] as $order => $order_label ) : ?>
|
12 |
-
<option value="<?php echo $order; ?>" <?php selected( $order, $view['order'] ); ?>><?php echo $order_label; ?></option>
|
13 |
-
<?php endforeach; ?>
|
14 |
-
</select>
|
15 |
-
</div>
|
16 |
-
</div>
|
17 |
-
</td>
|
18 |
-
<td class="divider">
|
19 |
-
<p><?php echo wp_kses_post( '<code>order</code>' ); ?></p>
|
20 |
-
</td>
|
21 |
-
<td>
|
22 |
-
<p><?php echo wp_kses_post( 'oldest | newest | random | menu_order' ); ?></p>
|
23 |
-
</td>
|
24 |
-
<td>
|
25 |
-
<p><?php echo wp_kses_post( '<code>order="random"</code>' ); ?></p>
|
26 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-pagination.php
DELETED
@@ -1,167 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$links = '<span class="help-links">';
|
4 |
-
$links .= '<a href="#tab-panel-wpmtst-help-pagination" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a>';
|
5 |
-
$links .= '</span>';
|
6 |
-
?>
|
7 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
8 |
-
<th>
|
9 |
-
<input class="if toggle checkbox" id="view-pagination" name="view[data][pagination]"
|
10 |
-
type="checkbox" value="1" <?php checked( $view['pagination'] ); ?>/>
|
11 |
-
<label for="view-pagination">
|
12 |
-
<?php _e( 'Pagination', 'strong-testimonials' ); ?>
|
13 |
-
</label>
|
14 |
-
</th>
|
15 |
-
<td>
|
16 |
-
<div class="row then then_pagination" style="display: none;">
|
17 |
-
<div class="row-inner">
|
18 |
-
<div class="inline">
|
19 |
-
<label for="view-pagination_type">
|
20 |
-
<select class="if selectper" id="view-pagination_type" name="view[data][pagination_settings][type]">
|
21 |
-
<option value="simple" <?php selected( 'simple', $view['pagination_settings']['type'] ); ?>>
|
22 |
-
<?php _e( 'simple', 'strong-testimonials' ); ?>
|
23 |
-
</option>
|
24 |
-
<option value="standard" <?php selected( 'standard', $view['pagination_settings']['type'] ); ?>>
|
25 |
-
<?php _e( 'WordPress standard', 'strong-testimonials' ); ?>
|
26 |
-
</option>
|
27 |
-
<?php do_action( 'wpmtst_form_pagination_options_after', $view ) ?>
|
28 |
-
</select>
|
29 |
-
</label>
|
30 |
-
</div>
|
31 |
-
<div class="inline then fast then_simple then_not_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
32 |
-
<p class="description">
|
33 |
-
<?php _e( 'Using JavaScript. Intended for small scale.', 'strong-testimonials' ); ?>
|
34 |
-
<?php echo $links; ?>
|
35 |
-
</p>
|
36 |
-
</div>
|
37 |
-
<div class="inline then fast then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
38 |
-
<p class="description">
|
39 |
-
<?php _e( 'Using paged URLs: /page/2, /page/3, etc. Best for large scale.', 'strong-testimonials' ); ?>
|
40 |
-
<?php echo $links; ?>
|
41 |
-
</p>
|
42 |
-
</div>
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<div class="row then then_pagination" style="display: none;">
|
47 |
-
<div class="row-inner">
|
48 |
-
<div class="inline">
|
49 |
-
<label for="view-per_page">
|
50 |
-
<?php _ex( 'Per page', 'quantity', 'strong-testimonials' ); ?>
|
51 |
-
</label>
|
52 |
-
<input class="input-incremental" id="view-per_page"
|
53 |
-
name="view[data][pagination_settings][per_page]"
|
54 |
-
type="number" min="1" step="1"
|
55 |
-
value="<?php echo $view['pagination_settings']['per_page']; ?>"/>
|
56 |
-
</div>
|
57 |
-
|
58 |
-
<div class="inline then then_simple then_standard then_not_infinitescroll then_not_loadmore">
|
59 |
-
<label for="view-nav">
|
60 |
-
<?php _e( 'Navigation', 'strong-testimonials' ); ?>
|
61 |
-
</label>
|
62 |
-
<select id="view-nav" name="view[data][pagination_settings][nav]">
|
63 |
-
<option value="before" <?php selected( $view['pagination_settings']['nav'], 'before' ); ?>>
|
64 |
-
<?php _e( 'before', 'strong-testimonials' ); ?>
|
65 |
-
</option>
|
66 |
-
<option value="after" <?php selected( $view['pagination_settings']['nav'], 'after' ); ?>>
|
67 |
-
<?php _e( 'after', 'strong-testimonials' ); ?>
|
68 |
-
</option>
|
69 |
-
<option value="before,after" <?php selected( $view['pagination_settings']['nav'], 'before,after' ); ?>>
|
70 |
-
<?php _e( 'before & after', 'strong-testimonials' ); ?>
|
71 |
-
</option>
|
72 |
-
</select>
|
73 |
-
</div>
|
74 |
-
</div>
|
75 |
-
|
76 |
-
<div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
77 |
-
<div class="row-inner">
|
78 |
-
<div class="inline">
|
79 |
-
<label for="view-pagination-show_all">
|
80 |
-
<select class="if select" id="view-pagination-show_all"
|
81 |
-
name="view[data][pagination_settings][show_all]">
|
82 |
-
<option value="on" <?php selected( $view['pagination_settings']['show_all'] ); ?>>
|
83 |
-
<?php _e( 'Show all page numbers', 'strong-testimonials' ); ?>
|
84 |
-
</option>
|
85 |
-
<option value="off" <?php selected( ! $view['pagination_settings']['show_all'] ); ?>
|
86 |
-
class="trip">
|
87 |
-
<?php _e( 'Show condensed page numbers', 'strong-testimonials' ); ?>
|
88 |
-
</option>
|
89 |
-
</select>
|
90 |
-
</label>
|
91 |
-
</div>
|
92 |
-
<div class="inline then then_show_all" style="display: none;">
|
93 |
-
<div class="inline">
|
94 |
-
<label for="view-pagination-end_size">
|
95 |
-
<?php _ex( 'End size', 'quantity', 'strong-testimonials' ); ?>
|
96 |
-
</label>
|
97 |
-
<input class="input-incremental" id="view-pagination-end_size"
|
98 |
-
name="view[data][pagination_settings][end_size]"
|
99 |
-
type="number" min="1" step="1"
|
100 |
-
value="<?php echo $view['pagination_settings']['end_size']; ?>"/>
|
101 |
-
</div>
|
102 |
-
<div class="inline">
|
103 |
-
<label for="view-pagination-mid_size">
|
104 |
-
<?php _ex( 'Middle size', 'quantity', 'strong-testimonials' ); ?>
|
105 |
-
</label>
|
106 |
-
<input class="input-incremental" id="view-pagination-mid_size"
|
107 |
-
name="view[data][pagination_settings][mid_size]"
|
108 |
-
type="number" min="1" step="1"
|
109 |
-
value="<?php echo $view['pagination_settings']['mid_size']; ?>"/>
|
110 |
-
</div>
|
111 |
-
</div>
|
112 |
-
</div>
|
113 |
-
</div>
|
114 |
-
|
115 |
-
<div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
116 |
-
<div class="row-inner">
|
117 |
-
<div class="inline inline-middle">
|
118 |
-
<input class="if toggle checkbox" id="view-pagination-prev_next"
|
119 |
-
name="view[data][pagination_settings][prev_next]"
|
120 |
-
type="checkbox" value="1" <?php checked( $view['pagination_settings']['prev_next'] ); ?>>
|
121 |
-
<label for="view-pagination-prev_next">
|
122 |
-
<?php _e( 'Show previous/next links', 'strong-testimonials' ); ?>
|
123 |
-
</label>
|
124 |
-
</div>
|
125 |
-
<div class="then then_prev_next inline inline-middle">
|
126 |
-
<label for="view-pagination-prev_text">
|
127 |
-
<?php _e( 'Previous text', 'strong-testimonials' ); ?>
|
128 |
-
</label>
|
129 |
-
<input class="code" id="view-pagination-prev_text"
|
130 |
-
name="view[data][pagination_settings][prev_text]"
|
131 |
-
type="text" value="<?php echo htmlentities( $view['pagination_settings']['prev_text'] ); ?>">
|
132 |
-
</div>
|
133 |
-
<div class="then then_prev_next inline inline-middle">
|
134 |
-
<label for="view-pagination-next_text">
|
135 |
-
<?php _e( 'Next text', 'strong-testimonials' ); ?>
|
136 |
-
</label>
|
137 |
-
<input class="code" id="view-pagination-next_text"
|
138 |
-
name="view[data][pagination_settings][next_text]"
|
139 |
-
type="text" value="<?php echo htmlentities( $view['pagination_settings']['next_text'] ); ?>">
|
140 |
-
</div>
|
141 |
-
</div>
|
142 |
-
</div>
|
143 |
-
|
144 |
-
<div class="row then then_not_simple then_standard then_not_infinitescroll then_not_loadmore" style="display: none;">
|
145 |
-
<div class="row-inner">
|
146 |
-
<div class="inline">
|
147 |
-
<label for="view-pagination-before_page_number">
|
148 |
-
<?php _e( 'Before page number', 'strong-testimonials' ); ?>
|
149 |
-
</label>
|
150 |
-
<input class="small-text" id="view-pagination-before_page_number"
|
151 |
-
name="view[data][pagination_settings][before_page_number]"
|
152 |
-
type="text" value="<?php echo $view['pagination_settings']['before_page_number']; ?>">
|
153 |
-
</div>
|
154 |
-
<div class="inline">
|
155 |
-
<label for="view-pagination-after_page_number">
|
156 |
-
<?php _e( 'After page number', 'strong-testimonials' ); ?>
|
157 |
-
</label>
|
158 |
-
<input class="small-text" id="view-pagination-after_page_number"
|
159 |
-
name="view[data][pagination_settings][after_page_number]"
|
160 |
-
type="text" value="<?php echo $view['pagination_settings']['after_page_number']; ?>">
|
161 |
-
</div>
|
162 |
-
</div>
|
163 |
-
</div>
|
164 |
-
</div>
|
165 |
-
|
166 |
-
<?php do_action( 'wpmtst_view_editor_pagination_row_end' ); ?>
|
167 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-read-more-page.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* translators: On the Views admin screen. */
|
3 |
-
?>
|
4 |
-
<!-- Read more > page -->
|
5 |
-
<th>
|
6 |
-
<div class="checkbox">
|
7 |
-
<input type="checkbox" id="view-more_page" class="if toggle" name="view[data][more_page]" value="1"
|
8 |
-
<?php checked( isset( $view['more_page'] ) && $view['more_page'] );?> class="checkbox">
|
9 |
-
<label for="view-more_page">
|
10 |
-
<?php _e( '"Read more" link to a page or post', 'strong-testimonials' ); ?>
|
11 |
-
</label>
|
12 |
-
</div>
|
13 |
-
</th>
|
14 |
-
<td>
|
15 |
-
<div class="row then then_more_page" style="display: none;">
|
16 |
-
|
17 |
-
<!-- Select page -->
|
18 |
-
<div class="row then then_more_page" style="display: none;">
|
19 |
-
<div class="row-inner">
|
20 |
-
<label>
|
21 |
-
<select id="view-page" name="view[data][more_page_id]">
|
22 |
-
|
23 |
-
<option value=""><?php _e( '— select —', 'strong-testimonials' ); ?></option>
|
24 |
-
<?php
|
25 |
-
do_action( 'wpmtst_readmore_page_list', $view );
|
26 |
-
if ( $custom_list ) {
|
27 |
-
?>
|
28 |
-
<optgroup label="<?php esc_html_e( 'Custom', 'strong-testimonials' ); ?>">
|
29 |
-
<?php
|
30 |
-
foreach ( $custom_list as $page ) {
|
31 |
-
echo wp_kses_post( $page );
|
32 |
-
}
|
33 |
-
?>
|
34 |
-
</optgroup>
|
35 |
-
<?php
|
36 |
-
}
|
37 |
-
?>
|
38 |
-
<optgroup label="<?php esc_attr_e( 'Pages', 'strong-testimonials' ); ?>">
|
39 |
-
<?php foreach ( $pages_list as $pages ) : ?>
|
40 |
-
<option value="<?php echo $pages->ID; ?>" <?php selected( isset( $view['more_page_id'] ) ? $view['more_page_id'] : 0, $pages->ID ); ?>><?php echo $pages->post_title; ?></option>
|
41 |
-
<?php endforeach; ?>
|
42 |
-
</optgroup>
|
43 |
-
<optgroup label="<?php esc_attr_e( 'Posts', 'strong-testimonials' ); ?>">
|
44 |
-
<?php foreach ( $posts_list as $posts ) : ?>
|
45 |
-
<option value="<?php echo $posts->ID; ?>" <?php selected( isset( $view['more_page_id'] ) ? $view['more_page_id'] : 0, $posts->ID ); ?>><?php echo $posts->post_title; ?></option>
|
46 |
-
<?php endforeach; ?>
|
47 |
-
</optgroup>
|
48 |
-
</select>
|
49 |
-
</label>
|
50 |
-
<label for="view-page_id2">
|
51 |
-
<?php _ex( 'or enter its ID or slug', 'to select a target page', 'strong-testimonials' ); ?>
|
52 |
-
</label>
|
53 |
-
<input type="text" id="view-page_id2" name="view[data][more_page_id2]" size="30">
|
54 |
-
</div>
|
55 |
-
</div>
|
56 |
-
|
57 |
-
<!-- Link text -->
|
58 |
-
<div class="row">
|
59 |
-
<div class="row-inner">
|
60 |
-
<div class="inline">
|
61 |
-
<label for="view-more_page_text">
|
62 |
-
<?php _e( 'with link text', 'strong-testimonials' ); ?>
|
63 |
-
</label>
|
64 |
-
<input type="text" id="view-more_page_text" name="view[data][more_page_text]"
|
65 |
-
value="<?php echo $view['more_page_text']; ?>" size="50">
|
66 |
-
</div>
|
67 |
-
</div>
|
68 |
-
</div>
|
69 |
-
|
70 |
-
<!-- location -->
|
71 |
-
<div class="row">
|
72 |
-
<div class="row-inner">
|
73 |
-
<label>
|
74 |
-
<select id="view-more_page_hook" name="view[data][more_page_hook]">
|
75 |
-
<option value="wpmtst_view_footer" <?php selected( 'wpmtst_view_footer', $view['more_page_hook'] ); ?>>
|
76 |
-
<?php _ex( 'after the last testimonial', 'display setting', 'strong-testimonials' ); ?>
|
77 |
-
</option>
|
78 |
-
<option value="wpmtst_after_testimonial" <?php selected( 'wpmtst_after_testimonial', $view['more_page_hook'] ); ?>>
|
79 |
-
<?php _ex( 'in each testimonial', 'display setting', 'strong-testimonials' ); ?>
|
80 |
-
</option>
|
81 |
-
</select>
|
82 |
-
</label>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
|
86 |
-
</div>
|
87 |
-
|
88 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-select.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-single_or_multiple"><?php _ex( 'Select', 'verb', 'strong-testimonials' ); ?></label>
|
4 |
-
</th>
|
5 |
-
<td>
|
6 |
-
|
7 |
-
<div class="row">
|
8 |
-
<div class="row-inner">
|
9 |
-
<select id="view-single_or_multiple" class="if selectper" name="view[data][select]">
|
10 |
-
<option value="multiple" <?php echo (int) $view['id'] == 0 ? 'selected' : ''; ?>><?php _e( 'one or more testimonials', 'strong-testimonials' ); ?></option>
|
11 |
-
<option value="single" <?php echo (int) $view['id'] >= 1 ? 'selected' : ''; ?>><?php _e( 'a specific testimonial', 'strong-testimonials' ); ?></option>
|
12 |
-
</select>
|
13 |
-
</div>
|
14 |
-
</div>
|
15 |
-
|
16 |
-
<div class="row">
|
17 |
-
<?php include( 'option-id.php' ); ?>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
</td>
|
21 |
-
<td class="divider">
|
22 |
-
<p><?php echo wp_kses_post( '<code>post_ids</code>' ); ?></p>
|
23 |
-
</td>
|
24 |
-
<td>
|
25 |
-
<p><?php _e( 'a comma-separated list of post ID\'s' , 'strong-testimonials' ); ?></p>
|
26 |
-
</td>
|
27 |
-
<td>
|
28 |
-
<p><?php echo wp_kses_post( '<code>post_ids="123,456"</code>' ); ?></p>
|
29 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-slideshow-behavior.php
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<?php /* translators: In the view editor. */ ?>
|
2 |
-
<th>
|
3 |
-
<?php _e( 'Behavior', 'strong-testimonials' ); ?>
|
4 |
-
</th>
|
5 |
-
<td>
|
6 |
-
|
7 |
-
<div class="row">
|
8 |
-
<div class="inline inline-middle">
|
9 |
-
<input type="checkbox" id="view-auto_start" name="view[data][slideshow_settings][auto_start]" value="0"
|
10 |
-
<?php checked( $view['slideshow_settings']['auto_start'] ); ?> class="checkbox">
|
11 |
-
<label for="view-auto_start">
|
12 |
-
<?php _ex( 'Start automatically', 'slideshow setting', 'strong-testimonials' ); ?>
|
13 |
-
</label>
|
14 |
-
</div>
|
15 |
-
</div>
|
16 |
-
|
17 |
-
<div class="row">
|
18 |
-
<div class="inline inline-middle">
|
19 |
-
<input type="checkbox" id="view-continuous_sliding" name="view[data][slideshow_settings][continuous_sliding]" value="0"
|
20 |
-
<?php checked( $view['slideshow_settings']['continuous_sliding'] ); ?> class="checkbox">
|
21 |
-
<label for="view-continuous_sliding">
|
22 |
-
<?php _ex( 'Continuous Sliding', 'slideshow setting', 'strong-testimonials' ); ?>
|
23 |
-
</label>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
|
27 |
-
<div class="row">
|
28 |
-
<div class="inline inline-middle">
|
29 |
-
<input type="checkbox" id="view-auto_hover" name="view[data][slideshow_settings][auto_hover]" value="0"
|
30 |
-
<?php checked( $view['slideshow_settings']['auto_hover'] ); ?> class="checkbox">
|
31 |
-
<label for="view-auto_hover">
|
32 |
-
<?php _ex( 'Pause on hover', 'slideshow setting', 'strong-testimonials' ); ?>
|
33 |
-
</label>
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
|
37 |
-
<div class="row">
|
38 |
-
<div class="inline inline-middle">
|
39 |
-
<input type="checkbox" id="view-stop_auto_on_click"
|
40 |
-
name="view[data][slideshow_settings][stop_auto_on_click]" value="0"
|
41 |
-
<?php checked( $view['slideshow_settings']['stop_auto_on_click'] ); ?> class="checkbox">
|
42 |
-
<label for="view-stop_auto_on_click">
|
43 |
-
<?php _ex( 'Stop on interaction', 'slideshow setting', 'strong-testimonials' ); ?>
|
44 |
-
</label>
|
45 |
-
</div>
|
46 |
-
<div class="inline inline-middle">
|
47 |
-
<p class="description"><?php _e( 'Recommended if using navigation.', 'strong-testimonials' ); ?></p>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<?php
|
52 |
-
if ( $view['slideshow_settings']['adapt_height'] ) {
|
53 |
-
$height = 'dynamic';
|
54 |
-
} else {
|
55 |
-
$height = 'static';
|
56 |
-
}
|
57 |
-
?>
|
58 |
-
<div class="row">
|
59 |
-
<div class="row-inner">
|
60 |
-
|
61 |
-
<div class="inline">
|
62 |
-
<label for="view-slideshow_height">
|
63 |
-
<select id="view-slideshow_height" name="view[data][slideshow_settings][height]" class="if selectgroup">
|
64 |
-
<?php foreach ( $view_options['slideshow_height'] as $key => $type ) : ?>
|
65 |
-
<option value="<?php echo $key; ?>" id="<?php echo $key; ?>"
|
66 |
-
<?php selected( $height, $key ); ?>>
|
67 |
-
<?php echo $type; ?>
|
68 |
-
</option>
|
69 |
-
<?php endforeach; ?>
|
70 |
-
</select>
|
71 |
-
</label>
|
72 |
-
</div>
|
73 |
-
|
74 |
-
<div class="inline then then_slideshow_height then_dynamic then_not_static" style="display: none;">
|
75 |
-
<label for="view-adapt_height_speed">
|
76 |
-
<?php _e( 'Duration', 'strong-testimonials' ); ?>
|
77 |
-
</label>
|
78 |
-
<input type="number" id="view-adapt_height_speed" class="input-incremental"
|
79 |
-
name="view[data][slideshow_settings][adapt_height_speed]" min="0" step="0.1"
|
80 |
-
value="<?php echo $view['slideshow_settings']['adapt_height_speed']; ?>" size="3"/>
|
81 |
-
<?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
|
82 |
-
</div>
|
83 |
-
|
84 |
-
<div class="inline then then_slideshow_height then_not_dynamic then_static" style="display: none;">
|
85 |
-
<input type="checkbox" id="view-stretch" name="view[data][slideshow_settings][stretch]" value="1"
|
86 |
-
<?php checked( $view['slideshow_settings']['stretch'] ); ?> class="checkbox">
|
87 |
-
<label for="view-stretch">
|
88 |
-
<?php _e( 'Stretch slides vertically', 'strong-testimonials' ); ?>
|
89 |
-
</label>
|
90 |
-
|
91 |
-
<div class="inline description">
|
92 |
-
<a href="#tab-panel-wpmtst-help-stretch" class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
93 |
-
</div>
|
94 |
-
</div>
|
95 |
-
|
96 |
-
</div>
|
97 |
-
</div>
|
98 |
-
|
99 |
-
<div class="row tall">
|
100 |
-
<p class="description"><?php _e( 'The slideshow will pause if the browser window becomes inactive.', 'strong-testimonials' ); ?></p>
|
101 |
-
</div>
|
102 |
-
|
103 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-slideshow-breakpoints.php
DELETED
@@ -1,95 +0,0 @@
|
|
1 |
-
<?php /* translators: In the view editor. */ ?>
|
2 |
-
<div class="inline then then_slider_type then_not_show_single then_show_multiple" style="display: none;">
|
3 |
-
<div class="row">
|
4 |
-
|
5 |
-
<div class="inner-table is-below">
|
6 |
-
<div class="inner-table-row bordered header">
|
7 |
-
<div class="inner-table-cell">
|
8 |
-
<?php _e( 'minimum screen width', 'strong-testimonials' ); ?>
|
9 |
-
</div>
|
10 |
-
<div class="inner-table-cell">
|
11 |
-
<?php _e( 'show', 'strong-testimonials' ); ?>
|
12 |
-
</div>
|
13 |
-
<div class="inner-table-cell">
|
14 |
-
<?php _e( 'margin', 'strong-testimonials' ); ?>
|
15 |
-
</div>
|
16 |
-
<div class="inner-table-cell">
|
17 |
-
<?php _e( 'move', 'strong-testimonials' ); ?>
|
18 |
-
</div>
|
19 |
-
</div>
|
20 |
-
|
21 |
-
<?php foreach ( $view['slideshow_settings']['breakpoints'] as $key => $breakpoint ) : ?>
|
22 |
-
<div class="inner-table-row bordered">
|
23 |
-
|
24 |
-
<div class="inner-table-cell">
|
25 |
-
<label>
|
26 |
-
<input id="view-breakpoint_<?php echo $key; ?>"
|
27 |
-
name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][width]"
|
28 |
-
value="<?php echo $breakpoint['width']; ?>"
|
29 |
-
type="number"
|
30 |
-
class="input-incremental"> px
|
31 |
-
</label>
|
32 |
-
</div>
|
33 |
-
|
34 |
-
<div class="inner-table-cell">
|
35 |
-
<label>
|
36 |
-
<select id="view-max_slides_<?php echo $key; ?>"
|
37 |
-
name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][max_slides]"
|
38 |
-
class="if selectgroup">
|
39 |
-
<option value="1" <?php selected( $breakpoint['max_slides'], 1 ); ?>>1</option>
|
40 |
-
<option value="2" <?php selected( $breakpoint['max_slides'], 2 ); ?>>2</option>
|
41 |
-
<option value="3" <?php selected( $breakpoint['max_slides'], 3 ); ?>>3</option>
|
42 |
-
<option value="4" <?php selected( $breakpoint['max_slides'], 4 ); ?>>4</option>
|
43 |
-
</select>
|
44 |
-
</label>
|
45 |
-
<div class="option-desc singular" style="display: none;">
|
46 |
-
<?php _e( 'slide', 'strong-testimonials' ); ?>
|
47 |
-
</div>
|
48 |
-
<div class="option-desc plural" style="display: none;">
|
49 |
-
<?php _e( 'slides', 'strong-testimonials' ); ?>
|
50 |
-
</div>
|
51 |
-
</div>
|
52 |
-
|
53 |
-
<div class="inner-table-cell">
|
54 |
-
<input id="view-margin_<?php echo $key; ?>"
|
55 |
-
name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][margin]"
|
56 |
-
value="<?php echo $breakpoint['margin']; ?>"
|
57 |
-
type="number" min="1" step="1" size="3"
|
58 |
-
class="input-incremental"/> px
|
59 |
-
</div>
|
60 |
-
|
61 |
-
<div class="inner-table-cell">
|
62 |
-
<label>
|
63 |
-
<select id="view-move_slides_<?php echo $key; ?>"
|
64 |
-
name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][move_slides]"
|
65 |
-
class="if selectgroup">
|
66 |
-
<option value="1" <?php selected( $breakpoint['move_slides'], 1 ); ?>>1</option>
|
67 |
-
<option value="2" <?php selected( $breakpoint['move_slides'], 2 ); ?>>2</option>
|
68 |
-
<option value="3" <?php selected( $breakpoint['move_slides'], 3 ); ?>>3</option>
|
69 |
-
<option value="4" <?php selected( $breakpoint['move_slides'], 4 ); ?>>4</option>
|
70 |
-
</select>
|
71 |
-
</label>
|
72 |
-
<div class="option-desc singular" style="display: none;">
|
73 |
-
<?php _e( 'slide', 'strong-testimonials' ); ?>
|
74 |
-
</div>
|
75 |
-
<div class="option-desc plural" style="display: none;">
|
76 |
-
<?php _e( 'slides', 'strong-testimonials' ); ?>
|
77 |
-
</div>
|
78 |
-
</div>
|
79 |
-
|
80 |
-
</div>
|
81 |
-
|
82 |
-
<?php endforeach; ?>
|
83 |
-
</div>
|
84 |
-
|
85 |
-
</div>
|
86 |
-
|
87 |
-
<div class="is-below">
|
88 |
-
<input id="restore-default-breakpoints"
|
89 |
-
type="button"
|
90 |
-
name="restore-default-breakpoints"
|
91 |
-
value="<?php _e( 'Restore Default Breakpoints', 'strong-testimonials' ); ?>"
|
92 |
-
class="button-secondary" />
|
93 |
-
<span id="restored-message"><?php _e( 'defaults restored', 'strong-testimonials' ); ?></span>
|
94 |
-
</div>
|
95 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-slideshow-navigation.php
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php /* translators: In the view editor. */ ?>
|
2 |
-
<th>
|
3 |
-
<label for="view-slideshow_nav">
|
4 |
-
<?php _e( 'Navigation', 'strong-testimonials' ); ?>
|
5 |
-
</label>
|
6 |
-
</th>
|
7 |
-
<td>
|
8 |
-
|
9 |
-
<?php /* ----- CONTROLS ----- */ ?>
|
10 |
-
<div class="row">
|
11 |
-
<div class="row-inner">
|
12 |
-
|
13 |
-
<?php /* ----- TYPE ----- */ ?>
|
14 |
-
<div class="inline">
|
15 |
-
<label for="view-slideshow_controls_type"><?php _e( 'Controls', 'strong-testimonials' ); ?></label>
|
16 |
-
<select id="view-slideshow_controls_type"
|
17 |
-
name="view[data][slideshow_settings][controls_type]"
|
18 |
-
class="if selectnot">
|
19 |
-
<?php foreach ( $view_options['slideshow_nav_method']['controls'] as $key => $type ) : ?>
|
20 |
-
<option value="<?php echo $key; ?>" id="<?php echo $key; ?>"
|
21 |
-
<?php selected( $view['slideshow_settings']['controls_type'], $key ); ?>
|
22 |
-
<?php if ( 'none' == $key ) {
|
23 |
-
echo ' class="trip"';
|
24 |
-
} ?>>
|
25 |
-
<?php echo $type['label']; ?>
|
26 |
-
</option>
|
27 |
-
<?php endforeach; ?>
|
28 |
-
</select>
|
29 |
-
</div>
|
30 |
-
|
31 |
-
<?php /* ----- STYLE ----- */ ?>
|
32 |
-
<div class="inline then then_slideshow_controls_type" style="display: none;">
|
33 |
-
<label for="view-slideshow_controls_style"><?php _e( 'Style', 'strong-testimonials' ); ?></label>
|
34 |
-
<select id="view-slideshow_controls_style" name="view[data][slideshow_settings][controls_style]">
|
35 |
-
<?php foreach ( $view_options['slideshow_nav_style']['controls'] as $key => $style ) : ?>
|
36 |
-
<option value="<?php echo $key; ?>" <?php selected( $view['slideshow_settings']['controls_style'], $key ); ?>><?php echo $style['label']; ?></option>
|
37 |
-
<?php endforeach; ?>
|
38 |
-
</select>
|
39 |
-
</div>
|
40 |
-
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
|
44 |
-
<?php /* ----- PAGER ----- */ ?>
|
45 |
-
<div class="row">
|
46 |
-
<div class="row-inner then then_has-pager">
|
47 |
-
|
48 |
-
<?php /* ----- TYPE ----- */ ?>
|
49 |
-
<div class="inline">
|
50 |
-
<label for="view-slideshow_pager_type"><?php _e( 'Pagination', 'strong-testimonials' ); ?></label>
|
51 |
-
<select id="view-slideshow_pager_type"
|
52 |
-
name="view[data][slideshow_settings][pager_type]"
|
53 |
-
class="if selectnot">
|
54 |
-
<?php foreach ( $view_options['slideshow_nav_method']['pager'] as $key => $type ) : ?>
|
55 |
-
<option value="<?php echo $key; ?>" id="<?php echo $key; ?>"
|
56 |
-
<?php selected( $view['slideshow_settings']['pager_type'], $key ); ?>
|
57 |
-
<?php if ( 'none' == $key ) {
|
58 |
-
echo ' class="trip"';
|
59 |
-
} ?>>
|
60 |
-
<?php echo $type['label']; ?>
|
61 |
-
</option>
|
62 |
-
<?php endforeach; ?>
|
63 |
-
</select>
|
64 |
-
</div>
|
65 |
-
|
66 |
-
<?php /* ----- STYLE ----- */ ?>
|
67 |
-
<div class="inline then then_slideshow_pager_type" style="display: none;">
|
68 |
-
<label for="view-slideshow_pager_style"><?php _e( 'Style', 'strong-testimonials' ); ?></label>
|
69 |
-
<select id="view-slideshow_pager_style"
|
70 |
-
name="view[data][slideshow_settings][pager_style]"
|
71 |
-
class="if selectnot">
|
72 |
-
<?php foreach ( $view_options['slideshow_nav_style']['pager'] as $key => $style ) : ?>
|
73 |
-
<option value="<?php echo $key; ?>" <?php selected( $view['slideshow_settings']['pager_style'], $key ); ?>><?php echo $style['label']; ?></option>
|
74 |
-
<?php endforeach; ?>
|
75 |
-
</select>
|
76 |
-
</div>
|
77 |
-
|
78 |
-
</div>
|
79 |
-
</div>
|
80 |
-
|
81 |
-
<?php /* ----- POSITION ----- */ ?>
|
82 |
-
<div class="row">
|
83 |
-
<div class="row-inner">
|
84 |
-
|
85 |
-
<div class="then then_slider_type then_show_single then_not_show_multiple" style="display: none;">
|
86 |
-
<div class="inline then then_has-position" style="display: none;">
|
87 |
-
<label for="view-slideshow_nav_position"><?php _e( 'Position', 'strong-testimonials' ); ?></label>
|
88 |
-
|
89 |
-
<select id="view-slideshow_nav_position" name="view[data][slideshow_settings][nav_position]">
|
90 |
-
<?php foreach ( $view_options['slideshow_nav_position'] as $key => $label ) : ?>
|
91 |
-
<option value="<?php echo $key; ?>" <?php selected( $view['slideshow_settings']['nav_position'], $key ); ?>><?php echo $label; ?></option>
|
92 |
-
<?php endforeach; ?>
|
93 |
-
</select>
|
94 |
-
|
95 |
-
<?php //_e( 'outside', 'strong-testimonials' ); ?>
|
96 |
-
|
97 |
-
<?php _e( 'the testimonial frame', 'strong-testimonials' ); ?>
|
98 |
-
</div>
|
99 |
-
</div>
|
100 |
-
|
101 |
-
</div>
|
102 |
-
</div>
|
103 |
-
|
104 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-slideshow-num.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php /* translators: In the view editor. */ ?>
|
2 |
-
<th>
|
3 |
-
<?php _e( 'Show', 'strong-testimonials' ); ?>
|
4 |
-
</th>
|
5 |
-
<td>
|
6 |
-
<?php include( 'option-slideshow-type.php' ); ?>
|
7 |
-
<?php include( 'option-slideshow-breakpoints.php' ); ?>
|
8 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-slideshow-transition.php
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
<?php /* translators: In the view editor. */ ?>
|
2 |
-
<th>
|
3 |
-
<?php _e( 'Transition', 'strong-testimonials' ); ?>
|
4 |
-
</th>
|
5 |
-
<td>
|
6 |
-
<div class="row">
|
7 |
-
|
8 |
-
<div class="inline inline-middle">
|
9 |
-
<label for="view-pause">
|
10 |
-
<?php _ex( 'Show slides for', 'slideshow setting', 'strong-testimonials' ); ?>
|
11 |
-
</label>
|
12 |
-
<input type="number" id="view-pause" class="input-incremental"
|
13 |
-
name="view[data][slideshow_settings][pause]" min=".1" step=".1"
|
14 |
-
value="<?php echo $view['slideshow_settings']['pause']; ?>" size="3"/>
|
15 |
-
<?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
|
16 |
-
</div>
|
17 |
-
|
18 |
-
<div class="inline inline-middle then then_slider_type then_show_single then_not_show_multiple fast" style="display: none;">
|
19 |
-
<label for="view-effect">
|
20 |
-
<?php _e( 'then', 'strong-testimonials' ); ?>
|
21 |
-
</label>
|
22 |
-
<select id="view-effect" name="view[data][slideshow_settings][effect]" class="if selectnot">
|
23 |
-
<?php foreach ( $view_options['slideshow_effect'] as $key => $label ) : ?>
|
24 |
-
<option value="<?php echo $key; ?>"
|
25 |
-
<?php selected( $view['slideshow_settings']['effect'], $key ); ?>
|
26 |
-
<?php echo 'none' == $key ? 'class="trip"' : ''; ?>><?php echo $label; ?></option>
|
27 |
-
<?php endforeach; ?>
|
28 |
-
</select>
|
29 |
-
</div>
|
30 |
-
|
31 |
-
<div class="inline inline-middle then then_slider_type then_not_show_single then_show_multiple fast" style="display: none;">
|
32 |
-
<?php _e( 'then', 'strong-testimonials' ); ?> <?php _ex( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ); ?>
|
33 |
-
</div>
|
34 |
-
|
35 |
-
<div class="inline inline-middle then then_effect then_none">
|
36 |
-
<label for="view-speed">
|
37 |
-
<?php _e( 'for', 'strong-testimonials' ); ?>
|
38 |
-
</label>
|
39 |
-
<input type="number" id="view-speed" class="input-incremental"
|
40 |
-
name="view[data][slideshow_settings][speed]" min=".1" step=".1"
|
41 |
-
value="<?php echo $view['slideshow_settings']['speed']; ?>" size="3"/>
|
42 |
-
<?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
|
43 |
-
</div>
|
44 |
-
|
45 |
-
</div>
|
46 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-slideshow-type.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php /* translators: In the view editor. */ ?>
|
2 |
-
<div class="row">
|
3 |
-
|
4 |
-
<div class="inline inline-middle">
|
5 |
-
<label>
|
6 |
-
<select id="view-slider_type" name="view[data][slideshow_settings][type]" class="if selectgroup">
|
7 |
-
<option value="show_single" <?php selected( $view['slideshow_settings']['type'], 'show_single' ); ?>><?php _e( 'single', 'strong-testimonials' ); ?></option>
|
8 |
-
<option value="show_multiple" <?php selected( $view['slideshow_settings']['type'], 'show_multiple' ); ?>><?php _e( 'multiple', 'strong-testimonials' ); ?></option>
|
9 |
-
</select>
|
10 |
-
</label>
|
11 |
-
<div class="option-desc singular" style="display: none;">
|
12 |
-
<?php _e( 'slide at a time', 'strong-testimonials' ); ?>
|
13 |
-
</div>
|
14 |
-
<div class="option-desc plural" style="display: none;">
|
15 |
-
<?php _e( 'slides at a time with these responsive breakpoints:', 'strong-testimonials' ); ?>
|
16 |
-
</div>
|
17 |
-
</div>
|
18 |
-
|
19 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-template-list.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<?php _e( 'Template', 'strong-testimonials' ); ?>
|
4 |
-
</th>
|
5 |
-
<td colspan="2">
|
6 |
-
<div id="view-template-list">
|
7 |
-
<div class="radio-buttons">
|
8 |
-
|
9 |
-
<?php include 'template-not-found.php'; ?>
|
10 |
-
|
11 |
-
<ul class="radio-list template-list">
|
12 |
-
<?php foreach ( $templates[ $current_type ] as $key => $template ) : ?>
|
13 |
-
<li>
|
14 |
-
<?php include 'template-input.php'; ?>
|
15 |
-
<?php include 'template-options.php'; ?>
|
16 |
-
</li>
|
17 |
-
<?php endforeach; ?>
|
18 |
-
</ul>
|
19 |
-
|
20 |
-
</div>
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
</div>
|
25 |
-
|
26 |
-
<?php do_action('wpmtst_views_after_template_list' ); ?>
|
27 |
-
|
28 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-thumbnail.php
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<th>
|
3 |
-
<input type="checkbox" id="view-images" class="checkbox if toggle" name="view[data][thumbnail]" value="1" <?php checked( $view['thumbnail'] ); ?>>
|
4 |
-
<label for="view-images">
|
5 |
-
<?php _e( 'Featured Image', 'strong-testimonials' ); ?>
|
6 |
-
</label>
|
7 |
-
</th>
|
8 |
-
<td colspan="2">
|
9 |
-
|
10 |
-
<div class="then then_images" style="display: none;">
|
11 |
-
|
12 |
-
<div class="row">
|
13 |
-
<div class="row-inner">
|
14 |
-
<div class="inline">
|
15 |
-
<label for="view-thumbnail_size">
|
16 |
-
Size
|
17 |
-
</label>
|
18 |
-
<select id="view-thumbnail_size" class="if select" name="view[data][thumbnail_size]">
|
19 |
-
<?php foreach ( $image_sizes as $key => $size ) : ?>
|
20 |
-
<option<?php if ( 'custom' == $key ) echo ' class="trip"'; ?> value="<?php echo $key; ?>"<?php selected( $key, $view['thumbnail_size'] ); ?>><?php echo $size['label']; ?></option>
|
21 |
-
<?php endforeach; ?>
|
22 |
-
</select>
|
23 |
-
</div>
|
24 |
-
<div class="inline then then_thumbnail_size" style="margin-left: 1em;">
|
25 |
-
<label for="thumbnail_width">
|
26 |
-
<?php _e( 'width', 'strong-testimonials' ); ?>
|
27 |
-
</label>
|
28 |
-
<input id="thumbnail_width" class="input-number-px" type="text" name="view[data][thumbnail_width]" value="<?php echo $view['thumbnail_width']; ?>"> px
|
29 |
-
<span style="display: inline-block; color: #BBB; margin: 0 1em;">|</span>
|
30 |
-
<label for="thumbnail_height">
|
31 |
-
<?php _e( 'height', 'strong-testimonials' ); ?>
|
32 |
-
</label>
|
33 |
-
<input id="thumbnail_height" class="input-number-px" type="text" name="view[data][thumbnail_height]" value="<?php echo $view['thumbnail_height']; ?>"> px
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
|
38 |
-
<div class="row">
|
39 |
-
<div class="row-inner">
|
40 |
-
<div class="inline">
|
41 |
-
<input type="checkbox" id="view-lightbox" class="if toggle" name="view[data][lightbox]"
|
42 |
-
value="1" <?php checked( $view['lightbox'] ); ?> class="checkbox">
|
43 |
-
<label for="view-lightbox">
|
44 |
-
<?php _e( 'Open full-size image in a lightbox', 'strong-testimonials' ); ?>
|
45 |
-
</label>
|
46 |
-
</div>
|
47 |
-
<div class="inline then then_lightbox">
|
48 |
-
<p class="description"><?php _e( 'Requires a lightbox provided by your theme or another plugin.', 'strong-testimonials' ); ?></p>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
</div>
|
52 |
-
|
53 |
-
<div class="row">
|
54 |
-
<div class="row-inner">
|
55 |
-
<div class="inline then then_lightbox input" style="display: none;">
|
56 |
-
<label for="view-lightbox_class">
|
57 |
-
<?php _e( 'CSS class', 'strong-testimonials' ); ?>
|
58 |
-
</label>
|
59 |
-
<input type="text" id="view-lightbox_class" class="medium inline" name="view[data][lightbox_class]" value="<?php echo $view['lightbox_class']; ?>">
|
60 |
-
<p class="inline description tall">
|
61 |
-
<?php _e( 'To add a class to the image link.', 'strong-testimonials' ); ?>
|
62 |
-
</p>
|
63 |
-
</div>
|
64 |
-
</div>
|
65 |
-
</div>
|
66 |
-
|
67 |
-
<div class="row">
|
68 |
-
<div class="row-inner">
|
69 |
-
<div class="inline">
|
70 |
-
<label for="view-gravatar">
|
71 |
-
<?php _e( 'If no Featured Image', 'strong-testimonials' ); ?>
|
72 |
-
</label>
|
73 |
-
<select id="view-gravatar" class="if select selectper" name="view[data][gravatar]">
|
74 |
-
<option value="no" <?php selected( $view['gravatar'], 'no' ); ?>><?php _e( 'show nothing', 'strong-testimonials' ); ?></option>
|
75 |
-
<option value="yes" <?php selected( $view['gravatar'], 'yes' ); ?>><?php _e( 'show Gravatar', 'strong-testimonials' ); ?></option>
|
76 |
-
<option value="if" <?php selected( $view['gravatar'], 'if' ); ?>><?php _e( 'show Gravatar only if found', 'strong-testimonials' ); ?></option>
|
77 |
-
<?php do_action('wpmtst_avatar_options', $view) ?>
|
78 |
-
</select>
|
79 |
-
</div>
|
80 |
-
<div class="inline">
|
81 |
-
<div class="then fast then_not_no then_not_default then_not_initials then_not_wp_avatars then_yes then_if" style="display: none;">
|
82 |
-
<p class="description tall">
|
83 |
-
<a href="<?php echo admin_url( 'options-discussion.php' ); ?>"><?php _e( 'Gravatar settings', 'strong-testimonials' ); ?></a>
|
84 |
-
</p>
|
85 |
-
</div>
|
86 |
-
</div>
|
87 |
-
<?php do_action('after_no_featured_image', $view) ?>
|
88 |
-
</div>
|
89 |
-
</div>
|
90 |
-
|
91 |
-
</div><!-- .then_images -->
|
92 |
-
|
93 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/option-title.php
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$custom_fields = wpmtst_get_custom_fields();
|
3 |
-
$options = get_option( 'wpmtst_options' );
|
4 |
-
$url_fields = array();
|
5 |
-
foreach($custom_fields as $field){
|
6 |
-
if('url' == $field['input_type']){
|
7 |
-
$url_fields[] = $field;
|
8 |
-
}
|
9 |
-
}
|
10 |
-
|
11 |
-
// For older versions where title_link was checkbox
|
12 |
-
if ( '1' == $view['title_link'] ) {
|
13 |
-
$view['title_link'] = 'wpmtst_testimonial';
|
14 |
-
}
|
15 |
-
|
16 |
-
if ( '0' == $view['title_link'] ) {
|
17 |
-
$view['title_link'] = 'none';
|
18 |
-
}
|
19 |
-
?>
|
20 |
-
|
21 |
-
<th>
|
22 |
-
<input type="checkbox" id="view-title" name="view[data][title]" value="1" <?php checked( $view['title'] ); ?>
|
23 |
-
class="checkbox if toggle">
|
24 |
-
<label for="view-title">
|
25 |
-
<?php _e( 'Title', 'strong-testimonials' ); ?>
|
26 |
-
</label>
|
27 |
-
</th>
|
28 |
-
<td colspan="2">
|
29 |
-
<div class="row">
|
30 |
-
<div class="row-inner">
|
31 |
-
<div class="then then_title" style="display: none;">
|
32 |
-
<label for="view-title_link">
|
33 |
-
<?php printf( _x( 'Link to %s', 'The name of this post type. "Testimonial" by default.', 'strong-testimonials' ), strtolower( apply_filters( 'wpmtst_cpt_singular_name', __( 'Testimonial', 'strong-testimonials' ) ) ) ); ?>
|
34 |
-
</label>
|
35 |
-
<div class="wpmtst-tooltip"><span>[?]</span>
|
36 |
-
<div class="wpmtst-tooltip-content"><?php echo esc_html__('"Full testimonial" option doesn\'s work if "Disable permalinks for testimonials" from "Settings" page is enabled.','strong-testimonials'); ?></div>
|
37 |
-
</div>
|
38 |
-
|
39 |
-
<select name="view[data][title_link]">
|
40 |
-
<option value="none" <?php selected( 'none', $view['title_link'], true ); ?>><?php echo esc_html__( 'None', 'strong-testimonials' ); ?></option>
|
41 |
-
<?php if ( !isset( $options['disable_rewrite'] ) || '1' != $options['disable_rewrite'] ) { ?>
|
42 |
-
<option value="wpmtst_testimonial" <?php selected( 'wpmtst_testimonial', $view['title_link'], true ); ?>><?php echo esc_html__( 'Full testimonial', 'strong-testimonials' ); ?></option>
|
43 |
-
<?php } ?>
|
44 |
-
|
45 |
-
<?php foreach ( $url_fields as $url ) { ?>
|
46 |
-
<option value="<?php echo $url['name']; ?>" <?php selected( $url['name'], $view['title_link'] ); ?>><?php echo $url['label']; ?></option>
|
47 |
-
<?php } ?>
|
48 |
-
</select>
|
49 |
-
|
50 |
-
<?php do_action('wpmtst_view_editor_after_group_fields_title') ?>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/template-input.php
DELETED
@@ -1,8 +0,0 @@
|
|
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
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Indicate if template not found; for example, after switching themes or deactivating add-ons.
|
3 |
-
/* translators: On the Views admin screen. */
|
4 |
-
?>
|
5 |
-
<?php if ( ! $template_found ) : ?>
|
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>
|
16 |
-
<div class="template-description">
|
17 |
-
<p>
|
18 |
-
<span class="dashicons dashicons-warning error"></span>
|
19 |
-
<span class="error"><?php _e( 'not found', 'strong-testimonials' ); ?></span>
|
20 |
-
</p>
|
21 |
-
<?php // TODO Explain: Add template key and explain this could be due to switching themes or deactivating a template plugin. It's OK to leave this setting as is if testing or troubleshooting. ?>
|
22 |
-
</div>
|
23 |
-
</li>
|
24 |
-
</ul>
|
25 |
-
<?php endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/template-options.php
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php /* translators: On the Views admin screen. */ ?>
|
2 |
-
<div class="template-description">
|
3 |
-
<p>
|
4 |
-
<?php
|
5 |
-
if ( isset( $template['config']['description'] ) && $template['config']['description'] ) {
|
6 |
-
echo $template['config']['description'];
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
_e( 'no description', 'strong-testimonials' );
|
10 |
-
}
|
11 |
-
?>
|
12 |
-
</p>
|
13 |
-
<div class="options">
|
14 |
-
<div>
|
15 |
-
<?php if ( ! isset( $template['config']['options'] ) || ! is_array( $template['config']['options'] ) ) : ?>
|
16 |
-
<span><?php esc_html_e( 'No options', 'strong-testimonials' ); ?></span>
|
17 |
-
<?php else : ?>
|
18 |
-
<?php foreach ( $template['config']['options'] as $option ) : ?>
|
19 |
-
<div style="margin-bottom: 10px;">
|
20 |
-
<?php
|
21 |
-
$name = sprintf( 'view[data][template_settings][%s][%s]', $key, $option->name );
|
22 |
-
$id = $key . '-' . $option->name;
|
23 |
-
switch ( $option->type ) {
|
24 |
-
case 'select':
|
25 |
-
// Get default if not set
|
26 |
-
if ( ! isset( $view['template_settings'][ $key ][ $option->name ] ) ) {
|
27 |
-
$view['template_settings'][ $key ][ $option->name ] = $option->default;
|
28 |
-
}
|
29 |
-
|
30 |
-
if ( $option->label ) {
|
31 |
-
printf( '<label for="%s">%s</label>', $id, $option->label );
|
32 |
-
}
|
33 |
-
|
34 |
-
printf( '<select id="%s" name="%s">', $id, $name );
|
35 |
-
|
36 |
-
foreach ( $option->values as $value ) {
|
37 |
-
$selected = selected( $value->value, $view['template_settings'][ $key ][ $option->name ], false );
|
38 |
-
printf( '<option value="%s" %s>%s</option>', $value->value, $selected, $value->description );
|
39 |
-
}
|
40 |
-
|
41 |
-
echo '</select>';
|
42 |
-
break;
|
43 |
-
|
44 |
-
case 'radio':
|
45 |
-
if ( ! isset( $view['template_settings'][ $key ][ $option->name ] ) ) {
|
46 |
-
$view['template_settings'][ $key ][ $option->name ] = $option->default;
|
47 |
-
}
|
48 |
-
|
49 |
-
foreach ( $option->values as $value ) {
|
50 |
-
$checked = checked( $value->value, $view['template_settings'][ $key ][ $option->name ], false );
|
51 |
-
printf( '<input type="radio" id="%s" name="%s" value="%s" %s>', $id, $name, $value->value, $checked );
|
52 |
-
printf( '<label for="%s">%s</label>', $id, $value->description );
|
53 |
-
}
|
54 |
-
break;
|
55 |
-
|
56 |
-
case 'colorpicker':
|
57 |
-
if ( $option->label ) {
|
58 |
-
printf( '<label for="%s">%s</label>', $id, $option->label );
|
59 |
-
}
|
60 |
-
|
61 |
-
$value = isset( $view['template_settings'][ $key ][ $option->name ] ) ? $view['template_settings'][ $key ][ $option->name ] : $option->default;
|
62 |
-
|
63 |
-
printf( '<input type="text" class="wp-color-picker-field" data-alpha="true" id="%s" name="%s" value="%s">', $id, $name, $value );
|
64 |
-
break;
|
65 |
-
|
66 |
-
default:
|
67 |
-
do_action( 'wpmtst_views_render_template_option_' . $option->type, $view, $key, $option );
|
68 |
-
break;
|
69 |
-
}
|
70 |
-
?>
|
71 |
-
</div>
|
72 |
-
<?php endforeach; ?>
|
73 |
-
|
74 |
-
<?php endif; ?>
|
75 |
-
</div>
|
76 |
-
</div>
|
77 |
-
|
78 |
-
<?php do_action('wpmtst_views_after_template_options', $view, $template, $key ); ?>
|
79 |
-
|
80 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/view-mode.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<div id="view-mode" class="table-row mode-select">
|
2 |
-
<div class="table-cell">
|
3 |
-
<?php _e( 'Mode', 'strong-testimonials' ); ?>
|
4 |
-
</div>
|
5 |
-
<div class="table-cell">
|
6 |
-
<div class="mode-list">
|
7 |
-
<?php foreach ( $view_options['mode'] as $mode ) : ?>
|
8 |
-
<label>
|
9 |
-
<input id="<?php echo esc_attr( $mode['name'] ); ?>" type="radio" name="view[data][mode]"
|
10 |
-
value="<?php echo esc_attr( $mode['name'] ); ?>" <?php checked( $view['mode'], $mode['name'] ); ?>>
|
11 |
-
<?php echo $mode['label']; ?>
|
12 |
-
<div class="mode-line"></div>
|
13 |
-
</label>
|
14 |
-
<?php endforeach; ?>
|
15 |
-
</div>
|
16 |
-
<div class="mode-description"></div>
|
17 |
-
</div>
|
18 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/view-name.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<div class="table-row form-view-name">
|
2 |
-
<?php
|
3 |
-
/**
|
4 |
-
* Using htmlspecialchars and stripslashes on $view_name to handle quotes, etc. in database.
|
5 |
-
* @since 2.11.14
|
6 |
-
*/
|
7 |
-
?>
|
8 |
-
<div class="table-cell">
|
9 |
-
<label for="view-name">
|
10 |
-
<?php _e( 'Name', 'strong-testimonials' ); ?>
|
11 |
-
</label>
|
12 |
-
</div>
|
13 |
-
<div class="table-cell">
|
14 |
-
<input type="text" id="view-name" class="view-name" name="view[name]"
|
15 |
-
value="<?php echo htmlspecialchars( stripslashes( $view_name ) ); ?>" tabindex="1">
|
16 |
-
</div>
|
17 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/views/view-shortcode.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// avoiding the tab character before the shortcode for better copy-n-paste
|
3 |
-
if ( 'edit' == $action ) {
|
4 |
-
$shortcode = '<div class="saved">';
|
5 |
-
$shortcode .= '<input id="view-shortcode" type="text" value="[testimonial_view id="' . esc_attr( $view_id ) . '"]" readonly />';
|
6 |
-
$shortcode .= '<input id="copy-shortcode" class="button small" type="button" value="' . esc_attr__( 'copy to clipboard', 'strong-testimonials' ) . '" data-copytarget="#view-shortcode" />';
|
7 |
-
$shortcode .= '<span id="copy-message">copied</span>';
|
8 |
-
$shortcode .= '</div>';
|
9 |
-
} else {
|
10 |
-
$shortcode = '<div class="unsaved">' . _x( 'will be available after you save this', 'The shortcode for a new View.', 'strong-testimonials' ) . '</div>';
|
11 |
-
}
|
12 |
-
|
13 |
-
$then_classes = array(
|
14 |
-
'then',
|
15 |
-
'then_display',
|
16 |
-
'then_form',
|
17 |
-
'then_slideshow',
|
18 |
-
'then_not_single_template',
|
19 |
-
apply_filters( 'wpmtst_view_section', '', 'shortcode' ),
|
20 |
-
);
|
21 |
-
?>
|
22 |
-
|
23 |
-
<div class="table-row form-view-shortcode <?php echo esc_attr( implode( ' ', array_filter( $then_classes ) ) ); ?>">
|
24 |
-
<div class="table-cell">
|
25 |
-
<label for="view-shortcode">
|
26 |
-
<?php _e( 'Shortcode', 'strong-testimonials' ); ?>
|
27 |
-
</label>
|
28 |
-
</div>
|
29 |
-
<div class="table-cell">
|
30 |
-
<?php echo $shortcode; ?>
|
31 |
-
</div>
|
32 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/class-strong-testimonials-form.php
CHANGED
@@ -59,7 +59,7 @@ class Strong_Testimonials_Forms {
|
|
59 |
<h2 class="nav-tab-wrapper">
|
60 |
<?php do_action( 'wpmtst_form_tabs', $tab, $url ); ?>
|
61 |
</h2>
|
62 |
-
|
63 |
<div class="wpmts-settings-columns">
|
64 |
<form id="<?php echo esc_attr( $tab ); ?>-form" method="post" action="options.php" enctype="multipart/form-data">
|
65 |
<?php
|
@@ -73,8 +73,8 @@ class Strong_Testimonials_Forms {
|
|
73 |
echo '<p class="submit-buttons">';
|
74 |
do_action( 'wpmtst_settings_submit_row' );
|
75 |
echo '</p>';
|
76 |
-
|
77 |
-
|
78 |
</form>
|
79 |
<?php do_action( 'wpmtst_admin_after_settings_form' ) ?>
|
80 |
</div>
|
@@ -91,7 +91,7 @@ class Strong_Testimonials_Forms {
|
|
91 |
}
|
92 |
|
93 |
private static function get_tab() {
|
94 |
-
return ( isset( $_GET['tab'] ) && $_GET['tab'] ) ? $_GET['tab'] : self::DEFAULT_TAB;
|
95 |
}
|
96 |
|
97 |
}
|
59 |
<h2 class="nav-tab-wrapper">
|
60 |
<?php do_action( 'wpmtst_form_tabs', $tab, $url ); ?>
|
61 |
</h2>
|
62 |
+
<?php if ($tab != 'fields'): ?>
|
63 |
<div class="wpmts-settings-columns">
|
64 |
<form id="<?php echo esc_attr( $tab ); ?>-form" method="post" action="options.php" enctype="multipart/form-data">
|
65 |
<?php
|
73 |
echo '<p class="submit-buttons">';
|
74 |
do_action( 'wpmtst_settings_submit_row' );
|
75 |
echo '</p>';
|
76 |
+
}
|
77 |
+
?>
|
78 |
</form>
|
79 |
<?php do_action( 'wpmtst_admin_after_settings_form' ) ?>
|
80 |
</div>
|
91 |
}
|
92 |
|
93 |
private static function get_tab() {
|
94 |
+
return ( isset( $_GET['tab'] ) && $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : self::DEFAULT_TAB;
|
95 |
}
|
96 |
|
97 |
}
|
admin/settings/class-strong-testimonials-settings-compat.php
CHANGED
@@ -43,7 +43,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
43 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
44 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
45 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
46 |
-
|
47 |
);
|
48 |
}
|
49 |
|
@@ -162,7 +162,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
162 |
*/
|
163 |
public function settings_top() {
|
164 |
$this->settings_intro();
|
165 |
-
|
166 |
$this->settings_page_loading();
|
167 |
$this->settings_prerender();
|
168 |
$this->settings_monitor();
|
@@ -174,7 +174,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
174 |
*/
|
175 |
public function settings_intro() {
|
176 |
?>
|
177 |
-
<h2><?php
|
178 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
179 |
<tr valign="top">
|
180 |
<td>
|
@@ -182,31 +182,31 @@ class Strong_Testimonials_Settings_Compat {
|
|
182 |
|
183 |
<div class="row header">
|
184 |
<div>
|
185 |
-
<?php
|
186 |
</div>
|
187 |
<div>
|
188 |
-
<?php
|
189 |
</div>
|
190 |
<div>
|
191 |
-
<?php
|
192 |
</div>
|
193 |
</div>
|
194 |
|
195 |
<div class="row">
|
196 |
<div>
|
197 |
-
<p><strong><?php
|
198 |
<p><?php _e( 'A testimonial view does not appear correctly the <strong>first time</strong> you view the page but it does when you <strong>refresh</strong> the page.', 'strong-testimonials' ); ?></p>
|
199 |
-
<p><?php
|
200 |
</div>
|
201 |
<div>
|
202 |
<p><?php _e( 'Your site uses <strong>Ajax page loading</strong> – also known as page animations, transition effects or Pjax (pushState Ajax) – provided by your theme or another plugin.', 'strong-testimonials' ); ?></p>
|
203 |
-
<p><?php
|
204 |
</div>
|
205 |
<div>
|
206 |
-
<p><strong><?php
|
207 |
<p>
|
208 |
<a href="#" id="set-scenario-1">
|
209 |
-
<?php /* translators: link text on Settings > Compatibility tab */
|
210 |
</a>
|
211 |
</p>
|
212 |
</div>
|
@@ -214,27 +214,27 @@ class Strong_Testimonials_Settings_Compat {
|
|
214 |
|
215 |
<div class="row">
|
216 |
<div>
|
217 |
-
<p><strong><?php
|
218 |
-
<p><?php
|
219 |
</div>
|
220 |
<div>
|
221 |
-
<p><?php
|
222 |
</div>
|
223 |
<div>
|
224 |
-
<p><strong><?php
|
225 |
</div>
|
226 |
</div>
|
227 |
|
228 |
<div class="row">
|
229 |
<div>
|
230 |
-
<p><strong><?php
|
231 |
-
<p><?php
|
232 |
</div>
|
233 |
<div>
|
234 |
-
<p><?php
|
235 |
</div>
|
236 |
<div>
|
237 |
-
<p><strong><?php
|
238 |
</div>
|
239 |
</div>
|
240 |
|
@@ -243,26 +243,26 @@ class Strong_Testimonials_Settings_Compat {
|
|
243 |
</tr>
|
244 |
</table>
|
245 |
|
246 |
-
<h2><?php
|
247 |
-
|
248 |
<?php
|
249 |
}
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
<tr valign="top">
|
255 |
<th scope="row">
|
256 |
-
<?php
|
257 |
</th>
|
258 |
<td>
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
</td>
|
267 |
</tr>
|
268 |
</table> <?php
|
@@ -276,13 +276,13 @@ class Strong_Testimonials_Settings_Compat {
|
|
276 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
277 |
<tr valign="top">
|
278 |
<th scope="row">
|
279 |
-
<?php
|
280 |
</th>
|
281 |
<td>
|
282 |
<div class="row header">
|
283 |
<p>
|
284 |
-
<?php
|
285 |
-
<?php
|
286 |
</p>
|
287 |
</div>
|
288 |
<fieldset data-radio-group="prerender">
|
@@ -301,23 +301,23 @@ class Strong_Testimonials_Settings_Compat {
|
|
301 |
*/
|
302 |
public function settings_page_loading_none() {
|
303 |
$checked = checked( $this->options['page_loading'], '', false );
|
304 |
-
$class = $checked ? '
|
305 |
?>
|
306 |
<div class="row">
|
307 |
<div>
|
308 |
-
<label<?php echo $class; ?> for="page-loading-none">
|
309 |
<input id="page-loading-none"
|
310 |
name="wpmtst_compat_options[page_loading]"
|
311 |
type="radio"
|
312 |
value=""
|
313 |
-
<?php echo $checked; ?> />
|
314 |
-
<?php
|
315 |
-
<em><?php
|
316 |
</label>
|
317 |
</div>
|
318 |
<div>
|
319 |
-
<p class="about"><?php
|
320 |
-
<p class="about"><?php
|
321 |
</div>
|
322 |
</div>
|
323 |
<?php
|
@@ -328,22 +328,22 @@ class Strong_Testimonials_Settings_Compat {
|
|
328 |
*/
|
329 |
public function settings_page_loading_general() {
|
330 |
$checked = checked( $this->options['page_loading'], 'general', false );
|
331 |
-
$class = $checked ? '
|
332 |
?>
|
333 |
<div class="row">
|
334 |
<div>
|
335 |
-
<label<?php echo $class; ?> for="page-loading-general">
|
336 |
<input id="page-loading-general"
|
337 |
name="wpmtst_compat_options[page_loading]"
|
338 |
type="radio"
|
339 |
value="general"
|
340 |
-
<?php echo $checked; ?> />
|
341 |
-
<?php
|
342 |
</label>
|
343 |
</div>
|
344 |
<div>
|
345 |
-
<p class="about"><?php
|
346 |
-
<p class="about"><?php
|
347 |
</div>
|
348 |
</div>
|
349 |
<?php
|
@@ -354,22 +354,22 @@ class Strong_Testimonials_Settings_Compat {
|
|
354 |
*/
|
355 |
public function settings_page_loading_advanced() {
|
356 |
$checked = checked( $this->options['page_loading'], 'advanced', false );
|
357 |
-
$class = $checked ? '
|
358 |
?>
|
359 |
<div class="row">
|
360 |
<div>
|
361 |
-
<label<?php echo $class; ?> for="page-loading-advanced">
|
362 |
<input id="page-loading-advanced"
|
363 |
name="wpmtst_compat_options[page_loading]"
|
364 |
data-group="advanced"
|
365 |
type="radio"
|
366 |
value="advanced"
|
367 |
-
<?php echo $checked; ?> />
|
368 |
-
<?php
|
369 |
</label>
|
370 |
</div>
|
371 |
<div>
|
372 |
-
<p class="about"><?php
|
373 |
</div>
|
374 |
</div>
|
375 |
<?php
|
@@ -383,7 +383,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
383 |
<table class="form-table" cellpadding="0" cellspacing="0" data-sub="advanced">
|
384 |
<tr valign="top">
|
385 |
<th scope="row">
|
386 |
-
<?php
|
387 |
</th>
|
388 |
<td>
|
389 |
<div class="row header">
|
@@ -407,23 +407,23 @@ class Strong_Testimonials_Settings_Compat {
|
|
407 |
*/
|
408 |
public function settings_prerender_current() {
|
409 |
$checked = checked( $this->options['prerender'], 'current', false );
|
410 |
-
$class = $checked ? '
|
411 |
?>
|
412 |
<div class="row">
|
413 |
<div>
|
414 |
-
<label<?php echo $class; ?> for="prerender-current">
|
415 |
<input id="prerender-current"
|
416 |
name="wpmtst_compat_options[prerender]"
|
417 |
type="radio"
|
418 |
value="current"
|
419 |
-
<?php echo $checked; ?> />
|
420 |
-
<?php
|
421 |
-
<em><?php
|
422 |
</label>
|
423 |
</div>
|
424 |
<div>
|
425 |
-
<p class="about"><?php
|
426 |
-
<p class="about"><?php
|
427 |
</div>
|
428 |
</div>
|
429 |
<?php
|
@@ -434,22 +434,22 @@ class Strong_Testimonials_Settings_Compat {
|
|
434 |
*/
|
435 |
public function settings_prerender_all() {
|
436 |
$checked = checked( $this->options['prerender'], 'all', false );
|
437 |
-
$class = $checked ? '
|
438 |
?>
|
439 |
<div class="row">
|
440 |
<div>
|
441 |
-
<label<?php echo $class; ?> for="prerender-all">
|
442 |
<input id="prerender-all"
|
443 |
type="radio"
|
444 |
name="wpmtst_compat_options[prerender]"
|
445 |
value="all"
|
446 |
-
<?php echo $checked; ?> />
|
447 |
-
<?php
|
448 |
</label>
|
449 |
</div>
|
450 |
<div>
|
451 |
-
<p class="about"><?php
|
452 |
-
<p class="about"><?php
|
453 |
</div>
|
454 |
</div>
|
455 |
<?php
|
@@ -460,21 +460,21 @@ class Strong_Testimonials_Settings_Compat {
|
|
460 |
*/
|
461 |
public function settings_prerender_none() {
|
462 |
$checked = checked( $this->options['prerender'], 'none', false );
|
463 |
-
$class = $checked ? '
|
464 |
?>
|
465 |
<div class="row">
|
466 |
<div>
|
467 |
-
<label<?php echo $class; ?> for="prerender-none">
|
468 |
<input id="prerender-none"
|
469 |
type="radio"
|
470 |
name="wpmtst_compat_options[prerender]"
|
471 |
value="none"
|
472 |
-
<?php echo $checked; ?> />
|
473 |
-
<?php
|
474 |
</label>
|
475 |
</div>
|
476 |
<div>
|
477 |
-
<p class="about"><?php
|
478 |
</div>
|
479 |
</div>
|
480 |
<?php
|
@@ -488,11 +488,11 @@ class Strong_Testimonials_Settings_Compat {
|
|
488 |
<table class="form-table" cellpadding="0" cellspacing="0" data-sub="advanced">
|
489 |
<tr valign="top">
|
490 |
<th scope="row">
|
491 |
-
<?php
|
492 |
</th>
|
493 |
<td>
|
494 |
<div class="row header">
|
495 |
-
<p><?php
|
496 |
</div>
|
497 |
<fieldset data-radio-group="method">
|
498 |
<?php $this->settings_monitor_none(); ?>
|
@@ -512,22 +512,22 @@ class Strong_Testimonials_Settings_Compat {
|
|
512 |
*/
|
513 |
public function settings_monitor_none() {
|
514 |
$checked = checked( $this->options['ajax']['method'], '', false );
|
515 |
-
$class = $checked ? '
|
516 |
?>
|
517 |
<div class="row">
|
518 |
<div>
|
519 |
-
<label<?php echo $class; ?> for="method-none">
|
520 |
<input id="method-none"
|
521 |
type="radio"
|
522 |
name="wpmtst_compat_options[ajax][method]"
|
523 |
value=""
|
524 |
-
<?php echo $checked; ?> />
|
525 |
-
<?php
|
526 |
-
<em><?php
|
527 |
</label>
|
528 |
</div>
|
529 |
<div>
|
530 |
-
<p class="about"><?php
|
531 |
</div>
|
532 |
</div>
|
533 |
<?php
|
@@ -538,29 +538,29 @@ class Strong_Testimonials_Settings_Compat {
|
|
538 |
*/
|
539 |
public function settings_monitor_universal() {
|
540 |
$checked = checked( $this->options['ajax']['method'], 'universal', false );
|
541 |
-
$class = $checked ? '
|
542 |
?>
|
543 |
<div class="row">
|
544 |
<div>
|
545 |
-
<label<?php echo $class; ?> for="method-universal">
|
546 |
<input id="method-universal"
|
547 |
name="wpmtst_compat_options[ajax][method]"
|
548 |
type="radio"
|
549 |
value="universal"
|
550 |
data-group="universal"
|
551 |
-
<?php echo $checked; ?> />
|
552 |
-
<?php
|
553 |
</label>
|
554 |
</div>
|
555 |
<div>
|
556 |
-
<p class="about"><?php
|
557 |
</div>
|
558 |
</div>
|
559 |
|
560 |
<div class="row" data-sub="universal">
|
561 |
<div class="radio-sub">
|
562 |
<label for="universal-timer">
|
563 |
-
<?php
|
564 |
</label>
|
565 |
</div>
|
566 |
<div>
|
@@ -568,9 +568,9 @@ class Strong_Testimonials_Settings_Compat {
|
|
568 |
name="wpmtst_compat_options[ajax][universal_timer]"
|
569 |
type="number"
|
570 |
min=".1" max="5" step=".1"
|
571 |
-
value="<?php echo $this->options['ajax']['universal_timer']; ?>"
|
572 |
size="3" />
|
573 |
-
<?php
|
574 |
</div>
|
575 |
</div>
|
576 |
<?php
|
@@ -581,23 +581,23 @@ class Strong_Testimonials_Settings_Compat {
|
|
581 |
*/
|
582 |
public function settings_monitor_observer() {
|
583 |
$checked = checked( $this->options['ajax']['method'], 'observer', false );
|
584 |
-
$class = $checked ? '
|
585 |
?>
|
586 |
<div class="row">
|
587 |
<div>
|
588 |
-
<label<?php echo $class; ?> for="method-observer">
|
589 |
<input id="method-observer"
|
590 |
name="wpmtst_compat_options[ajax][method]"
|
591 |
data-group="observer"
|
592 |
type="radio"
|
593 |
value="observer"
|
594 |
-
<?php echo $checked; ?> />
|
595 |
-
<?php
|
596 |
</label>
|
597 |
</div>
|
598 |
<div>
|
599 |
-
<p class="about"><?php
|
600 |
-
<p class="description"><?php
|
601 |
</div>
|
602 |
</div>
|
603 |
|
@@ -609,7 +609,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
609 |
<div class="row" data-sub="observer">
|
610 |
<div class="radio-sub">
|
611 |
<label for="observer-timer">
|
612 |
-
<?php
|
613 |
</label>
|
614 |
</div>
|
615 |
<div>
|
@@ -617,9 +617,9 @@ class Strong_Testimonials_Settings_Compat {
|
|
617 |
name="wpmtst_compat_options[ajax][observer_timer]"
|
618 |
type="number"
|
619 |
min=".1" max="5" step=".1"
|
620 |
-
value="<?php echo $this->options['ajax']['observer_timer']; ?>"
|
621 |
size="3" />
|
622 |
-
<?php
|
623 |
</div>
|
624 |
</div>
|
625 |
|
@@ -631,7 +631,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
631 |
<div class="row" data-sub="observer">
|
632 |
<div class="radio-sub">
|
633 |
<label for="container-id">
|
634 |
-
<?php
|
635 |
</label>
|
636 |
</div>
|
637 |
<div>
|
@@ -640,8 +640,8 @@ class Strong_Testimonials_Settings_Compat {
|
|
640 |
id="container-id"
|
641 |
name="wpmtst_compat_options[ajax][container_id]"
|
642 |
type="text"
|
643 |
-
value="<?php echo $this->options['ajax']['container_id']; ?>" />
|
644 |
-
<p class="about adjacent"><?php
|
645 |
</div>
|
646 |
</div>
|
647 |
|
@@ -653,7 +653,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
653 |
<div class="row" data-sub="observer">
|
654 |
<div class="radio-sub">
|
655 |
<label for="addednode-id">
|
656 |
-
<?php
|
657 |
</label>
|
658 |
</div>
|
659 |
<div>
|
@@ -662,8 +662,8 @@ class Strong_Testimonials_Settings_Compat {
|
|
662 |
id="addednode-id"
|
663 |
name="wpmtst_compat_options[ajax][addednode_id]"
|
664 |
type="text"
|
665 |
-
value="<?php echo $this->options['ajax']['addednode_id']; ?>" />
|
666 |
-
<p class="about adjacent"><?php
|
667 |
</div>
|
668 |
</div>
|
669 |
<?php
|
@@ -674,29 +674,29 @@ class Strong_Testimonials_Settings_Compat {
|
|
674 |
*/
|
675 |
public function settings_monitor_event() {
|
676 |
$checked = checked( $this->options['ajax']['method'], 'event', false );
|
677 |
-
$class = $checked ? '
|
678 |
<div class="row">
|
679 |
<div>
|
680 |
-
<label<?php echo $class; ?> for="method-event">
|
681 |
<input id="method-event"
|
682 |
name="wpmtst_compat_options[ajax][method]"
|
683 |
data-group="event"
|
684 |
type="radio"
|
685 |
value="event"
|
686 |
-
<?php echo $checked; ?> />
|
687 |
-
<?php
|
688 |
</label>
|
689 |
</div>
|
690 |
<div>
|
691 |
-
<p class="about"><?php
|
692 |
-
<p class="description"><?php
|
693 |
</div>
|
694 |
</div>
|
695 |
|
696 |
<div class="row" data-sub="event">
|
697 |
<div class="radio-sub">
|
698 |
<label for="event-name">
|
699 |
-
<?php
|
700 |
</label>
|
701 |
</div>
|
702 |
<div>
|
@@ -704,7 +704,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
704 |
id="event-name"
|
705 |
name="wpmtst_compat_options[ajax][event]"
|
706 |
type="text"
|
707 |
-
value="<?php echo $this->options['ajax']['event']; ?>"
|
708 |
size="30" />
|
709 |
</div>
|
710 |
</div>
|
@@ -716,30 +716,30 @@ class Strong_Testimonials_Settings_Compat {
|
|
716 |
*/
|
717 |
public function settings_monitor_script() {
|
718 |
$checked = checked( $this->options['ajax']['method'], 'script', false );
|
719 |
-
$class = $checked ? '
|
720 |
?>
|
721 |
<div class="row">
|
722 |
<div>
|
723 |
-
<label<?php echo $class; ?> for="method-script">
|
724 |
<input id="method-script"
|
725 |
name="wpmtst_compat_options[ajax][method]"
|
726 |
data-group="script"
|
727 |
type="radio"
|
728 |
value="script"
|
729 |
-
<?php echo $checked; ?> />
|
730 |
-
<?php
|
731 |
</label>
|
732 |
</div>
|
733 |
<div>
|
734 |
-
<p class="about"><?php
|
735 |
-
<p class="description"><?php
|
736 |
</div>
|
737 |
</div>
|
738 |
|
739 |
<div class="row" data-sub="script">
|
740 |
<div class="radio-sub">
|
741 |
<label for="script-name">
|
742 |
-
<?php
|
743 |
</label>
|
744 |
</div>
|
745 |
<div>
|
@@ -766,11 +766,11 @@ class Strong_Testimonials_Settings_Compat {
|
|
766 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
767 |
<tr valign="top">
|
768 |
<th scope="row">
|
769 |
-
<?php
|
770 |
</th>
|
771 |
<td>
|
772 |
<div class="row header">
|
773 |
-
<p><?php
|
774 |
</div>
|
775 |
<fieldset>
|
776 |
<?php $this->settings_page_controller_documentready(); ?>
|
@@ -787,22 +787,22 @@ class Strong_Testimonials_Settings_Compat {
|
|
787 |
*/
|
788 |
public function settings_page_controller_documentready() {
|
789 |
$checked = checked( $this->options['controller']['initialize_on'], 'documentReady', false );
|
790 |
-
$class = $checked ? '
|
791 |
?>
|
792 |
<div class="row">
|
793 |
<div>
|
794 |
-
<label<?php echo $class; ?> for="controller-documentready">
|
795 |
<input id="controller-documentready"
|
796 |
name="wpmtst_compat_options[controller][initialize_on]"
|
797 |
type="radio"
|
798 |
value="documentReady"
|
799 |
-
<?php echo $checked; ?> />
|
800 |
-
<?php
|
801 |
-
<em><?php
|
802 |
</label>
|
803 |
</div>
|
804 |
<div>
|
805 |
-
<p class="about"><?php
|
806 |
</div>
|
807 |
</div>
|
808 |
<?php
|
@@ -813,21 +813,21 @@ class Strong_Testimonials_Settings_Compat {
|
|
813 |
*/
|
814 |
public function settings_page_controller_windowload() {
|
815 |
$checked = checked( $this->options['controller']['initialize_on'], 'windowLoad', false );
|
816 |
-
$class = $checked ? '
|
817 |
?>
|
818 |
<div class="row">
|
819 |
<div>
|
820 |
-
<label<?php echo $class; ?> for="controller-windowload">
|
821 |
<input id="controller-windowload"
|
822 |
name="wpmtst_compat_options[controller][initialize_on]"
|
823 |
type="radio"
|
824 |
value="windowLoad"
|
825 |
-
<?php echo $checked; ?> />
|
826 |
-
<?php
|
827 |
</label>
|
828 |
</div>
|
829 |
<div>
|
830 |
-
<p class="about"><?php
|
831 |
</div>
|
832 |
</div>
|
833 |
<?php
|
43 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
44 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
45 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
46 |
+
esc_html__( 'Compatibility', 'strong-testimonials' )
|
47 |
);
|
48 |
}
|
49 |
|
162 |
*/
|
163 |
public function settings_top() {
|
164 |
$this->settings_intro();
|
165 |
+
$this->settings_random_js();
|
166 |
$this->settings_page_loading();
|
167 |
$this->settings_prerender();
|
168 |
$this->settings_monitor();
|
174 |
*/
|
175 |
public function settings_intro() {
|
176 |
?>
|
177 |
+
<h2><?php esc_html_e( 'Common Scenarios', 'strong-testimonials' ); ?></h2>
|
178 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
179 |
<tr valign="top">
|
180 |
<td>
|
182 |
|
183 |
<div class="row header">
|
184 |
<div>
|
185 |
+
<?php esc_html_e( 'Symptom', 'strong-testimonials' ); ?>
|
186 |
</div>
|
187 |
<div>
|
188 |
+
<?php esc_html_e( 'Possible Cause', 'strong-testimonials' ); ?>
|
189 |
</div>
|
190 |
<div>
|
191 |
+
<?php esc_html_e( 'Try', 'strong-testimonials' ); ?>
|
192 |
</div>
|
193 |
</div>
|
194 |
|
195 |
<div class="row">
|
196 |
<div>
|
197 |
+
<p><strong><?php esc_html_e( 'Views not working', 'strong-testimonials' ); ?></strong></p>
|
198 |
<p><?php _e( 'A testimonial view does not appear correctly the <strong>first time</strong> you view the page but it does when you <strong>refresh</strong> the page.', 'strong-testimonials' ); ?></p>
|
199 |
+
<p><?php esc_html_e( 'For example, it has no style, no pagination, or the slider has not started.', 'strong-testimonials' ); ?></p>
|
200 |
</div>
|
201 |
<div>
|
202 |
<p><?php _e( 'Your site uses <strong>Ajax page loading</strong> – also known as page animations, transition effects or Pjax (pushState Ajax) – provided by your theme or another plugin.', 'strong-testimonials' ); ?></p>
|
203 |
+
<p><?php esc_html_e( 'Instead of loading the entire page, this technique fetches only the new content.', 'strong-testimonials' ); ?></p>
|
204 |
</div>
|
205 |
<div>
|
206 |
+
<p><strong><?php esc_html_e( 'Ajax Page Loading', 'strong-testimonials' ); ?>:</strong> <?php esc_html_e( 'General', 'strong-testimonials' ); ?></p>
|
207 |
<p>
|
208 |
<a href="#" id="set-scenario-1">
|
209 |
+
<?php /* translators: link text on Settings > Compatibility tab */ esc_html_e( 'Set this now', 'strong-testimonials' ); ?>
|
210 |
</a>
|
211 |
</p>
|
212 |
</div>
|
214 |
|
215 |
<div class="row">
|
216 |
<div>
|
217 |
+
<p><strong><?php esc_html_e( 'Slider never starts', 'strong-testimonials' ); ?></strong></p>
|
218 |
+
<p><?php esc_html_e( 'A testimonial slider does not start or is missing navigation controls.', 'strong-testimonials' ); ?></p>
|
219 |
</div>
|
220 |
<div>
|
221 |
+
<p><?php esc_html_e( 'The page is very busy loading image galleries, other sliders or third-party resources like social media posts.', 'strong-testimonials' ); ?></p>
|
222 |
</div>
|
223 |
<div>
|
224 |
+
<p><strong><?php esc_html_e( 'Load Event', 'strong-testimonials' ); ?>:</strong> <?php esc_html_e( 'window load', 'strong-testimonials' ); ?></p>
|
225 |
</div>
|
226 |
</div>
|
227 |
|
228 |
<div class="row">
|
229 |
<div>
|
230 |
+
<p><strong><?php esc_html_e( 'Masonry layout not working', 'strong-testimonials' ); ?></strong></p>
|
231 |
+
<p><?php esc_html_e( 'A testimonial view with the Masonry layout has only one column or works inconsistently in different browsers or devices.', 'strong-testimonials' ); ?></p>
|
232 |
</div>
|
233 |
<div>
|
234 |
+
<p><?php esc_html_e( 'The page is very busy loading image galleries, other sliders or third-party resources like social media posts.', 'strong-testimonials' ); ?></p>
|
235 |
</div>
|
236 |
<div>
|
237 |
+
<p><strong><?php esc_html_e( 'Load Event', 'strong-testimonials' ); ?>:</strong> <?php esc_html_e( 'window load', 'strong-testimonials' ); ?></p>
|
238 |
</div>
|
239 |
</div>
|
240 |
|
243 |
</tr>
|
244 |
</table>
|
245 |
|
246 |
+
<h2><?php esc_html_e( 'Compatibility Settings', 'strong-testimonials' ); ?></h2>
|
247 |
+
|
248 |
<?php
|
249 |
}
|
250 |
+
|
251 |
+
public function settings_random_js() {
|
252 |
+
?>
|
253 |
+
<table class="form-table" cellpadding="0" cellspacing="0">
|
254 |
<tr valign="top">
|
255 |
<th scope="row">
|
256 |
+
<?php esc_html_e( 'Random JS', 'strong-testimonials' ); ?>
|
257 |
</th>
|
258 |
<td>
|
259 |
+
<fieldset>
|
260 |
+
<label>
|
261 |
+
<input type="checkbox" name="wpmtst_compat_options[random_js]" <?php checked( $this->options['random_js'] ); ?> />
|
262 |
+
<?php esc_html_e( 'Randomize testimonials via javascript to ensure proper behaviour. Check this if using page caching plugins (WP Rocket, Super Cache, W3 Total Cache etc.)', 'strong-testimonials' ); ?>
|
263 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
264 |
+
</label>
|
265 |
+
</fieldset>
|
266 |
</td>
|
267 |
</tr>
|
268 |
</table> <?php
|
276 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
277 |
<tr valign="top">
|
278 |
<th scope="row">
|
279 |
+
<?php esc_html_e( 'Ajax Page Loading', 'strong-testimonials' ); ?>
|
280 |
</th>
|
281 |
<td>
|
282 |
<div class="row header">
|
283 |
<p>
|
284 |
+
<?php esc_html_e( 'This does not perform Ajax page loading.', 'strong-testimonials' ); ?>
|
285 |
+
<?php esc_html_e( 'It provides compatibility with themes and plugins that use Ajax to load pages, also known as page animation or transition effects.', 'strong-testimonials' ); ?>
|
286 |
</p>
|
287 |
</div>
|
288 |
<fieldset data-radio-group="prerender">
|
301 |
*/
|
302 |
public function settings_page_loading_none() {
|
303 |
$checked = checked( $this->options['page_loading'], '', false );
|
304 |
+
$class = $checked ? 'current' : '';
|
305 |
?>
|
306 |
<div class="row">
|
307 |
<div>
|
308 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="page-loading-none">
|
309 |
<input id="page-loading-none"
|
310 |
name="wpmtst_compat_options[page_loading]"
|
311 |
type="radio"
|
312 |
value=""
|
313 |
+
<?php echo esc_attr( $checked ); ?> />
|
314 |
+
<?php esc_html_e( 'None', 'strong-testimonials' ); ?>
|
315 |
+
<em><?php esc_html_e( '(default)', 'strong-testimonials' ); ?></em>
|
316 |
</label>
|
317 |
</div>
|
318 |
<div>
|
319 |
+
<p class="about"><?php esc_html_e( 'No compatibility needed.', 'strong-testimonials' ); ?></p>
|
320 |
+
<p class="about"><?php esc_html_e( 'This works well for most themes.', 'strong-testimonials' ); ?></p>
|
321 |
</div>
|
322 |
</div>
|
323 |
<?php
|
328 |
*/
|
329 |
public function settings_page_loading_general() {
|
330 |
$checked = checked( $this->options['page_loading'], 'general', false );
|
331 |
+
$class = $checked ? 'current' : '';
|
332 |
?>
|
333 |
<div class="row">
|
334 |
<div>
|
335 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="page-loading-general">
|
336 |
<input id="page-loading-general"
|
337 |
name="wpmtst_compat_options[page_loading]"
|
338 |
type="radio"
|
339 |
value="general"
|
340 |
+
<?php echo esc_attr( $checked ); ?> />
|
341 |
+
<?php esc_html_e( 'General', 'strong-testimonials' ); ?>
|
342 |
</label>
|
343 |
</div>
|
344 |
<div>
|
345 |
+
<p class="about"><?php esc_html_e( 'Be ready to render any view at any time.', 'strong-testimonials' ); ?></p>
|
346 |
+
<p class="about"><?php esc_html_e( 'This works well with common Ajax methods.', 'strong-testimonials' ); ?></p>
|
347 |
</div>
|
348 |
</div>
|
349 |
<?php
|
354 |
*/
|
355 |
public function settings_page_loading_advanced() {
|
356 |
$checked = checked( $this->options['page_loading'], 'advanced', false );
|
357 |
+
$class = $checked ? 'current' : '';
|
358 |
?>
|
359 |
<div class="row">
|
360 |
<div>
|
361 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="page-loading-advanced">
|
362 |
<input id="page-loading-advanced"
|
363 |
name="wpmtst_compat_options[page_loading]"
|
364 |
data-group="advanced"
|
365 |
type="radio"
|
366 |
value="advanced"
|
367 |
+
<?php echo esc_attr( $checked ); ?> />
|
368 |
+
<?php esc_html_e( 'Advanced', 'strong-testimonials' ); ?>
|
369 |
</label>
|
370 |
</div>
|
371 |
<div>
|
372 |
+
<p class="about"><?php esc_html_e( 'For specific configurations.', 'strong-testimonials' ); ?></p>
|
373 |
</div>
|
374 |
</div>
|
375 |
<?php
|
383 |
<table class="form-table" cellpadding="0" cellspacing="0" data-sub="advanced">
|
384 |
<tr valign="top">
|
385 |
<th scope="row">
|
386 |
+
<?php esc_html_e( 'Prerender', 'strong-testimonials' ); ?>
|
387 |
</th>
|
388 |
<td>
|
389 |
<div class="row header">
|
407 |
*/
|
408 |
public function settings_prerender_current() {
|
409 |
$checked = checked( $this->options['prerender'], 'current', false );
|
410 |
+
$class = $checked ? 'current' : '';
|
411 |
?>
|
412 |
<div class="row">
|
413 |
<div>
|
414 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="prerender-current">
|
415 |
<input id="prerender-current"
|
416 |
name="wpmtst_compat_options[prerender]"
|
417 |
type="radio"
|
418 |
value="current"
|
419 |
+
<?php echo esc_attr( $checked ); ?> />
|
420 |
+
<?php esc_html_e( 'Current page', 'strong-testimonials' ); ?>
|
421 |
+
<em><?php esc_html_e( '(default)', 'strong-testimonials' ); ?></em>
|
422 |
</label>
|
423 |
</div>
|
424 |
<div>
|
425 |
+
<p class="about"><?php esc_html_e( 'For the current page only.', 'strong-testimonials' ); ?></p>
|
426 |
+
<p class="about"><?php esc_html_e( 'This works well for most themes.', 'strong-testimonials' ); ?></p>
|
427 |
</div>
|
428 |
</div>
|
429 |
<?php
|
434 |
*/
|
435 |
public function settings_prerender_all() {
|
436 |
$checked = checked( $this->options['prerender'], 'all', false );
|
437 |
+
$class = $checked ? 'current' : '';
|
438 |
?>
|
439 |
<div class="row">
|
440 |
<div>
|
441 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="prerender-all">
|
442 |
<input id="prerender-all"
|
443 |
type="radio"
|
444 |
name="wpmtst_compat_options[prerender]"
|
445 |
value="all"
|
446 |
+
<?php echo esc_attr( $checked ); ?> />
|
447 |
+
<?php esc_html_e( 'All views', 'strong-testimonials' ); ?>
|
448 |
</label>
|
449 |
</div>
|
450 |
<div>
|
451 |
+
<p class="about"><?php esc_html_e( 'For all views. Required for Ajax page loading.', 'strong-testimonials' ); ?></p>
|
452 |
+
<p class="about"><?php esc_html_e( 'Then select an option for <strong>Monitor</strong> below.', 'strong-testimonials' ); ?></p>
|
453 |
</div>
|
454 |
</div>
|
455 |
<?php
|
460 |
*/
|
461 |
public function settings_prerender_none() {
|
462 |
$checked = checked( $this->options['prerender'], 'none', false );
|
463 |
+
$class = $checked ? 'current' : '';
|
464 |
?>
|
465 |
<div class="row">
|
466 |
<div>
|
467 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="prerender-none">
|
468 |
<input id="prerender-none"
|
469 |
type="radio"
|
470 |
name="wpmtst_compat_options[prerender]"
|
471 |
value="none"
|
472 |
+
<?php echo esc_attr( $checked ); ?> />
|
473 |
+
<?php esc_html_e( 'None', 'strong-testimonials' ); ?>
|
474 |
</label>
|
475 |
</div>
|
476 |
<div>
|
477 |
+
<p class="about"><?php esc_html_e( 'When the shortcode is rendered. May result in a flash of unstyled content.', 'strong-testimonials' ); ?></p>
|
478 |
</div>
|
479 |
</div>
|
480 |
<?php
|
488 |
<table class="form-table" cellpadding="0" cellspacing="0" data-sub="advanced">
|
489 |
<tr valign="top">
|
490 |
<th scope="row">
|
491 |
+
<?php esc_html_e( 'Monitor', 'strong-testimonials' ); ?>
|
492 |
</th>
|
493 |
<td>
|
494 |
<div class="row header">
|
495 |
+
<p><?php esc_html_e( 'Initialize sliders, pagination and form validation as pages change.', 'strong-testimonials' ); ?></p>
|
496 |
</div>
|
497 |
<fieldset data-radio-group="method">
|
498 |
<?php $this->settings_monitor_none(); ?>
|
512 |
*/
|
513 |
public function settings_monitor_none() {
|
514 |
$checked = checked( $this->options['ajax']['method'], '', false );
|
515 |
+
$class = $checked ? 'current' : '';
|
516 |
?>
|
517 |
<div class="row">
|
518 |
<div>
|
519 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="method-none">
|
520 |
<input id="method-none"
|
521 |
type="radio"
|
522 |
name="wpmtst_compat_options[ajax][method]"
|
523 |
value=""
|
524 |
+
<?php echo esc_attr( $checked ); ?> />
|
525 |
+
<?php esc_html_e( 'None', 'strong-testimonials' ); ?>
|
526 |
+
<em><?php esc_html_e( '(default)', 'strong-testimonials' ); ?></em>
|
527 |
</label>
|
528 |
</div>
|
529 |
<div>
|
530 |
+
<p class="about"><?php esc_html_e( 'No compatibility needed.', 'strong-testimonials' ); ?></p>
|
531 |
</div>
|
532 |
</div>
|
533 |
<?php
|
538 |
*/
|
539 |
public function settings_monitor_universal() {
|
540 |
$checked = checked( $this->options['ajax']['method'], 'universal', false );
|
541 |
+
$class = $checked ? 'current' : '';
|
542 |
?>
|
543 |
<div class="row">
|
544 |
<div>
|
545 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="method-universal">
|
546 |
<input id="method-universal"
|
547 |
name="wpmtst_compat_options[ajax][method]"
|
548 |
type="radio"
|
549 |
value="universal"
|
550 |
data-group="universal"
|
551 |
+
<?php echo esc_attr( $checked ); ?> />
|
552 |
+
<?php esc_html_e( 'Universal', 'strong-testimonials' ); ?>
|
553 |
</label>
|
554 |
</div>
|
555 |
<div>
|
556 |
+
<p class="about"><?php esc_html_e( 'Watch for page changes on a timer.', 'strong-testimonials' ); ?></p>
|
557 |
</div>
|
558 |
</div>
|
559 |
|
560 |
<div class="row" data-sub="universal">
|
561 |
<div class="radio-sub">
|
562 |
<label for="universal-timer">
|
563 |
+
<?php echo esc_html_x( 'Check every', 'timer setting', 'strong-testimonials' ); ?>
|
564 |
</label>
|
565 |
</div>
|
566 |
<div>
|
568 |
name="wpmtst_compat_options[ajax][universal_timer]"
|
569 |
type="number"
|
570 |
min=".1" max="5" step=".1"
|
571 |
+
value="<?php echo esc_attr( $this->options['ajax']['universal_timer'] ); ?>"
|
572 |
size="3" />
|
573 |
+
<?php echo esc_html_x( 'seconds', 'timer setting', 'strong-testimonials' ); ?>
|
574 |
</div>
|
575 |
</div>
|
576 |
<?php
|
581 |
*/
|
582 |
public function settings_monitor_observer() {
|
583 |
$checked = checked( $this->options['ajax']['method'], 'observer', false );
|
584 |
+
$class = $checked ? 'current' : '';
|
585 |
?>
|
586 |
<div class="row">
|
587 |
<div>
|
588 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="method-observer">
|
589 |
<input id="method-observer"
|
590 |
name="wpmtst_compat_options[ajax][method]"
|
591 |
data-group="observer"
|
592 |
type="radio"
|
593 |
value="observer"
|
594 |
+
<?php echo esc_attr( $checked ); ?> />
|
595 |
+
<?php esc_html_e( 'Observer', 'strong-testimonials' ); ?>
|
596 |
</label>
|
597 |
</div>
|
598 |
<div>
|
599 |
+
<p class="about"><?php esc_html_e( 'React to changes in specific page elements.', 'strong-testimonials' ); ?></p>
|
600 |
+
<p class="description"><?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?></p>
|
601 |
</div>
|
602 |
</div>
|
603 |
|
609 |
<div class="row" data-sub="observer">
|
610 |
<div class="radio-sub">
|
611 |
<label for="observer-timer">
|
612 |
+
<?php echo esc_html_x( 'Check once after', 'timer setting', 'strong-testimonials' ); ?>
|
613 |
</label>
|
614 |
</div>
|
615 |
<div>
|
617 |
name="wpmtst_compat_options[ajax][observer_timer]"
|
618 |
type="number"
|
619 |
min=".1" max="5" step=".1"
|
620 |
+
value="<?php echo esc_attr( $this->options['ajax']['observer_timer'] ); ?>"
|
621 |
size="3" />
|
622 |
+
<?php echo esc_html_x( 'seconds', 'timer setting', 'strong-testimonials' ); ?>
|
623 |
</div>
|
624 |
</div>
|
625 |
|
631 |
<div class="row" data-sub="observer">
|
632 |
<div class="radio-sub">
|
633 |
<label for="container-id">
|
634 |
+
<?php esc_html_e( 'Container ID', 'strong-testimonials' ); ?>
|
635 |
</label>
|
636 |
</div>
|
637 |
<div>
|
640 |
id="container-id"
|
641 |
name="wpmtst_compat_options[ajax][container_id]"
|
642 |
type="text"
|
643 |
+
value="<?php echo esc_attr( $this->options['ajax']['container_id'] ); ?>" />
|
644 |
+
<p class="about adjacent"><?php esc_html_e( 'the element to observe', 'strong-testimonials' ); ?></p>
|
645 |
</div>
|
646 |
</div>
|
647 |
|
653 |
<div class="row" data-sub="observer">
|
654 |
<div class="radio-sub">
|
655 |
<label for="addednode-id">
|
656 |
+
<?php esc_html_e( 'Added node ID', 'strong-testimonials' ); ?>
|
657 |
</label>
|
658 |
</div>
|
659 |
<div>
|
662 |
id="addednode-id"
|
663 |
name="wpmtst_compat_options[ajax][addednode_id]"
|
664 |
type="text"
|
665 |
+
value="<?php echo esc_attr( $this->options['ajax']['addednode_id'] ); ?>" />
|
666 |
+
<p class="about adjacent"><?php esc_html_e( 'the element being added', 'strong-testimonials' ); ?></p>
|
667 |
</div>
|
668 |
</div>
|
669 |
<?php
|
674 |
*/
|
675 |
public function settings_monitor_event() {
|
676 |
$checked = checked( $this->options['ajax']['method'], 'event', false );
|
677 |
+
$class = $checked ? 'current' : ''; ?>
|
678 |
<div class="row">
|
679 |
<div>
|
680 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="method-event">
|
681 |
<input id="method-event"
|
682 |
name="wpmtst_compat_options[ajax][method]"
|
683 |
data-group="event"
|
684 |
type="radio"
|
685 |
value="event"
|
686 |
+
<?php echo esc_attr( $checked ); ?> />
|
687 |
+
<?php esc_html_e( 'Custom event', 'strong-testimonials' ); ?>
|
688 |
</label>
|
689 |
</div>
|
690 |
<div>
|
691 |
+
<p class="about"><?php esc_html_e( 'Listen for specific events.', 'strong-testimonials' ); ?></p>
|
692 |
+
<p class="description"><?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?></p>
|
693 |
</div>
|
694 |
</div>
|
695 |
|
696 |
<div class="row" data-sub="event">
|
697 |
<div class="radio-sub">
|
698 |
<label for="event-name">
|
699 |
+
<?php esc_html_e( 'Event name', 'strong-testimonials' ); ?>
|
700 |
</label>
|
701 |
</div>
|
702 |
<div>
|
704 |
id="event-name"
|
705 |
name="wpmtst_compat_options[ajax][event]"
|
706 |
type="text"
|
707 |
+
value="<?php echo esc_attr( $this->options['ajax']['event'] ); ?>"
|
708 |
size="30" />
|
709 |
</div>
|
710 |
</div>
|
716 |
*/
|
717 |
public function settings_monitor_script() {
|
718 |
$checked = checked( $this->options['ajax']['method'], 'script', false );
|
719 |
+
$class = $checked ? 'current' : '';
|
720 |
?>
|
721 |
<div class="row">
|
722 |
<div>
|
723 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="method-script">
|
724 |
<input id="method-script"
|
725 |
name="wpmtst_compat_options[ajax][method]"
|
726 |
data-group="script"
|
727 |
type="radio"
|
728 |
value="script"
|
729 |
+
<?php echo esc_attr( $checked ); ?> />
|
730 |
+
<?php esc_html_e( 'Specific script', 'strong-testimonials' ); ?>
|
731 |
</label>
|
732 |
</div>
|
733 |
<div>
|
734 |
+
<p class="about"><?php esc_html_e( 'Register a callback for a specific Ajax script.', 'strong-testimonials' ); ?></p>
|
735 |
+
<p class="description"><?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?></p>
|
736 |
</div>
|
737 |
</div>
|
738 |
|
739 |
<div class="row" data-sub="script">
|
740 |
<div class="radio-sub">
|
741 |
<label for="script-name">
|
742 |
+
<?php esc_html_e( 'Script name', 'strong-testimonials' ); ?>
|
743 |
</label>
|
744 |
</div>
|
745 |
<div>
|
766 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
767 |
<tr valign="top">
|
768 |
<th scope="row">
|
769 |
+
<?php esc_html_e( 'Load Event', 'strong-testimonials' ); ?>
|
770 |
</th>
|
771 |
<td>
|
772 |
<div class="row header">
|
773 |
+
<p><?php esc_html_e( 'When to start sliders, Masonry, pagination and form validation.', 'strong-testimonials' ); ?></p>
|
774 |
</div>
|
775 |
<fieldset>
|
776 |
<?php $this->settings_page_controller_documentready(); ?>
|
787 |
*/
|
788 |
public function settings_page_controller_documentready() {
|
789 |
$checked = checked( $this->options['controller']['initialize_on'], 'documentReady', false );
|
790 |
+
$class = $checked ? 'current' : '';
|
791 |
?>
|
792 |
<div class="row">
|
793 |
<div>
|
794 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="controller-documentready">
|
795 |
<input id="controller-documentready"
|
796 |
name="wpmtst_compat_options[controller][initialize_on]"
|
797 |
type="radio"
|
798 |
value="documentReady"
|
799 |
+
<?php echo esc_attr( $checked ); ?> />
|
800 |
+
<?php esc_html_e( 'document ready', 'strong-testimonials' ); ?>
|
801 |
+
<em><?php esc_html_e( '(default)', 'strong-testimonials' ); ?></em>
|
802 |
</label>
|
803 |
</div>
|
804 |
<div>
|
805 |
+
<p class="about"><?php esc_html_e( 'This works well if your page load time is less than a few seconds.', 'strong-testimonials' ); ?></p>
|
806 |
</div>
|
807 |
</div>
|
808 |
<?php
|
813 |
*/
|
814 |
public function settings_page_controller_windowload() {
|
815 |
$checked = checked( $this->options['controller']['initialize_on'], 'windowLoad', false );
|
816 |
+
$class = $checked ? 'current' : '';
|
817 |
?>
|
818 |
<div class="row">
|
819 |
<div>
|
820 |
+
<label class="<?php echo esc_attr( $class ); ?>" for="controller-windowload">
|
821 |
<input id="controller-windowload"
|
822 |
name="wpmtst_compat_options[controller][initialize_on]"
|
823 |
type="radio"
|
824 |
value="windowLoad"
|
825 |
+
<?php echo esc_attr( $checked ); ?> />
|
826 |
+
<?php esc_html_e( 'window load', 'strong-testimonials' ); ?>
|
827 |
</label>
|
828 |
</div>
|
829 |
<div>
|
830 |
+
<p class="about"><?php esc_html_e( 'Try this if your page load time is more than a few seconds.', 'strong-testimonials' ); ?></p>
|
831 |
</div>
|
832 |
</div>
|
833 |
<?php
|
admin/settings/class-strong-testimonials-settings-form.php
CHANGED
@@ -46,7 +46,7 @@ class Strong_Testimonials_Settings_Form {
|
|
46 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
47 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
48 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
49 |
-
|
50 |
);
|
51 |
}
|
52 |
|
@@ -214,7 +214,7 @@ class Strong_Testimonials_Settings_Form {
|
|
214 |
* @since 1.13
|
215 |
*/
|
216 |
public static function restore_default_message_function() {
|
217 |
-
$input =
|
218 |
$default_form_options = Strong_Testimonials_Defaults::get_form_options();
|
219 |
$message = $default_form_options['messages'][$input];
|
220 |
echo json_encode( $message );
|
@@ -225,7 +225,7 @@ class Strong_Testimonials_Settings_Form {
|
|
225 |
* [Add Recipient] Ajax receiver
|
226 |
*/
|
227 |
public static function add_recipient() {
|
228 |
-
$key = $_REQUEST['key'];
|
229 |
$form_options = get_option( 'wpmtst_form_options' );
|
230 |
$recipient = $form_options['default_recipient'];
|
231 |
include WPMTST_ADMIN . 'settings/partials/recipient.php';
|
46 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
47 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
48 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
49 |
+
esc_html__( 'Settings', 'strong-testimonials' )
|
50 |
);
|
51 |
}
|
52 |
|
214 |
* @since 1.13
|
215 |
*/
|
216 |
public static function restore_default_message_function() {
|
217 |
+
$input = str_replace( '_', '-', sanitize_text_field( $_REQUEST['field'] ) );
|
218 |
$default_form_options = Strong_Testimonials_Defaults::get_form_options();
|
219 |
$message = $default_form_options['messages'][$input];
|
220 |
echo json_encode( $message );
|
225 |
* [Add Recipient] Ajax receiver
|
226 |
*/
|
227 |
public static function add_recipient() {
|
228 |
+
$key = sanitize_text_field( $_REQUEST['key'] );
|
229 |
$form_options = get_option( 'wpmtst_form_options' );
|
230 |
$recipient = $form_options['default_recipient'];
|
231 |
include WPMTST_ADMIN . 'settings/partials/recipient.php';
|
admin/settings/class-strong-testimonials-settings-general.php
CHANGED
@@ -41,7 +41,7 @@ class Strong_Testimonials_Settings_General {
|
|
41 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
42 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
43 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
44 |
-
|
45 |
);
|
46 |
}
|
47 |
|
41 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
42 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
43 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
44 |
+
esc_html_x( 'General', 'adjective', 'strong-testimonials' )
|
45 |
);
|
46 |
}
|
47 |
|
admin/settings/class-strong-testimonials-settings.php
CHANGED
@@ -93,7 +93,7 @@ class Strong_Testimonials_Settings {
|
|
93 |
}
|
94 |
|
95 |
private static function get_tab() {
|
96 |
-
return ( isset( $_GET['tab'] ) && $_GET['tab'] ) ? $_GET['tab'] : self::DEFAULT_TAB;
|
97 |
}
|
98 |
|
99 |
}
|
93 |
}
|
94 |
|
95 |
private static function get_tab() {
|
96 |
+
return ( isset( $_GET['tab'] ) && $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : self::DEFAULT_TAB;
|
97 |
}
|
98 |
|
99 |
}
|
admin/settings/partials/email-from.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<input id="wpmtst-options-mail-queue"
|
5 |
type="checkbox"
|
6 |
name="wpmtst_form_options[mail_queue]" <?php checked( $form_options['mail_queue'] ); ?>>
|
7 |
-
<?php
|
8 |
</label>
|
9 |
</fieldset>
|
10 |
</div>
|
@@ -13,7 +13,7 @@
|
|
13 |
<div class="email-option-row">
|
14 |
|
15 |
<div class="email-option-desc">
|
16 |
-
<?php
|
17 |
</div>
|
18 |
|
19 |
<div class="email-option-inputs">
|
@@ -22,13 +22,13 @@
|
|
22 |
|
23 |
<div class="email-option-part">
|
24 |
<div class="email-option-label">
|
25 |
-
<?php
|
26 |
</div>
|
27 |
</div>
|
28 |
|
29 |
<div class="email-option-part">
|
30 |
<div class="email-option-label">
|
31 |
-
<?php
|
32 |
</div>
|
33 |
</div>
|
34 |
|
@@ -44,7 +44,7 @@
|
|
44 |
id="wpmtst-options-sender-name"
|
45 |
name="wpmtst_form_options[sender_name]"
|
46 |
value="<?php echo esc_attr( $form_options['sender_name'] ); ?>"
|
47 |
-
placeholder="<?php
|
48 |
</div>
|
49 |
</div>
|
50 |
</div>
|
@@ -60,8 +60,8 @@
|
|
60 |
value="1">
|
61 |
</div>
|
62 |
<div class="fields">
|
63 |
-
<?php
|
64 |
-
<?php
|
65 |
</div>
|
66 |
|
67 |
</div>
|
@@ -79,7 +79,7 @@
|
|
79 |
id="wpmtst-options-sender-email"
|
80 |
name="wpmtst_form_options[sender_email]"
|
81 |
value="<?php echo esc_attr( $form_options['sender_email'] ); ?>"
|
82 |
-
placeholder="<?php
|
83 |
</div>
|
84 |
|
85 |
</div>
|
4 |
<input id="wpmtst-options-mail-queue"
|
5 |
type="checkbox"
|
6 |
name="wpmtst_form_options[mail_queue]" <?php checked( $form_options['mail_queue'] ); ?>>
|
7 |
+
<?php esc_html_e( 'Use mail queue. For services like Mandrill. Off by default.', 'strong-testimonials' ); ?>
|
8 |
</label>
|
9 |
</fieldset>
|
10 |
</div>
|
13 |
<div class="email-option-row">
|
14 |
|
15 |
<div class="email-option-desc">
|
16 |
+
<?php esc_html_e( 'From', 'strong-testimonials' ); ?>
|
17 |
</div>
|
18 |
|
19 |
<div class="email-option-inputs">
|
22 |
|
23 |
<div class="email-option-part">
|
24 |
<div class="email-option-label">
|
25 |
+
<?php esc_html_e( 'Name', 'strong-testimonials' ); ?>
|
26 |
</div>
|
27 |
</div>
|
28 |
|
29 |
<div class="email-option-part">
|
30 |
<div class="email-option-label">
|
31 |
+
<?php esc_html_e( 'Email', 'strong-testimonials' ); ?>
|
32 |
</div>
|
33 |
</div>
|
34 |
|
44 |
id="wpmtst-options-sender-name"
|
45 |
name="wpmtst_form_options[sender_name]"
|
46 |
value="<?php echo esc_attr( $form_options['sender_name'] ); ?>"
|
47 |
+
placeholder="<?php esc_html_e( '(optional)', 'strong-testimonials' ); ?>">
|
48 |
</div>
|
49 |
</div>
|
50 |
</div>
|
60 |
value="1">
|
61 |
</div>
|
62 |
<div class="fields">
|
63 |
+
<?php esc_html_e( 'admin:', 'strong-testimonials' ); ?>
|
64 |
+
<?php esc_html_e( get_bloginfo( 'admin_email' ) ); ?>
|
65 |
</div>
|
66 |
|
67 |
</div>
|
79 |
id="wpmtst-options-sender-email"
|
80 |
name="wpmtst_form_options[sender_email]"
|
81 |
value="<?php echo esc_attr( $form_options['sender_email'] ); ?>"
|
82 |
+
placeholder="<?php esc_html_e( 'email address', 'strong-testimonials' ); ?>">
|
83 |
</div>
|
84 |
|
85 |
</div>
|
admin/settings/partials/email-to.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<div class="email-option-row">
|
3 |
|
4 |
<div class="email-option-desc">
|
5 |
-
<?php
|
6 |
</div>
|
7 |
|
8 |
<div class="email-option-inputs">
|
@@ -11,13 +11,13 @@
|
|
11 |
|
12 |
<div class="email-option-part">
|
13 |
<div class="email-option-label">
|
14 |
-
<?php
|
15 |
</div>
|
16 |
</div>
|
17 |
|
18 |
<div class="email-option-part">
|
19 |
<div class="email-option-label">
|
20 |
-
<?php
|
21 |
</div>
|
22 |
</div>
|
23 |
|
2 |
<div class="email-option-row">
|
3 |
|
4 |
<div class="email-option-desc">
|
5 |
+
<?php esc_html_e( 'To', 'strong-testimonials' ); ?>
|
6 |
</div>
|
7 |
|
8 |
<div class="email-option-inputs">
|
11 |
|
12 |
<div class="email-option-part">
|
13 |
<div class="email-option-label">
|
14 |
+
<?php esc_html_e( 'Name', 'strong-testimonials' ); ?>
|
15 |
</div>
|
16 |
</div>
|
17 |
|
18 |
<div class="email-option-part">
|
19 |
<div class="email-option-label">
|
20 |
+
<?php esc_html_e( 'Email', 'strong-testimonials' ); ?>
|
21 |
</div>
|
22 |
</div>
|
23 |
|
admin/settings/partials/email.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
<div class="email-option-desc">
|
4 |
<label for="wpmtst-option-email-subject">
|
5 |
-
<?php
|
6 |
</label>
|
7 |
</div>
|
8 |
|
@@ -13,7 +13,7 @@
|
|
13 |
id="wpmtst-option-email-subject"
|
14 |
name="wpmtst_form_options[email_subject]"
|
15 |
value="<?php echo esc_attr( $form_options['email_subject'] ); ?>"
|
16 |
-
placeholder="<?php
|
17 |
size="50">
|
18 |
</div>
|
19 |
</div>
|
@@ -24,7 +24,7 @@
|
|
24 |
|
25 |
<div class="email-option-desc">
|
26 |
<label for="wpmtst-option-email-message">
|
27 |
-
<?php
|
28 |
</label>
|
29 |
</div>
|
30 |
|
@@ -34,7 +34,7 @@
|
|
34 |
<textarea class="autosize"
|
35 |
id="wpmtst-option-email-message" name="wpmtst_form_options[email_message]"
|
36 |
rows="<?php echo esc_attr( $line_count ); ?>"
|
37 |
-
placeholder="<?php
|
38 |
</div>
|
39 |
</div>
|
40 |
|
@@ -43,7 +43,7 @@
|
|
43 |
<div class="email-option-row column no-padding">
|
44 |
|
45 |
<div class="template-tags-help">
|
46 |
-
<div class="title"><?php
|
47 |
<div class="content">
|
48 |
<ul id="wpmtst-tags-list">
|
49 |
<li>%BLOGNAME%</li>
|
@@ -54,7 +54,7 @@
|
|
54 |
<?php
|
55 |
$custom_fields = wpmtst_get_custom_fields();
|
56 |
foreach ( $custom_fields as $field ) {
|
57 |
-
echo '<li>%' . strtoupper( $field['name'] ) . '%</li>' . "\n";
|
58 |
}
|
59 |
?>
|
60 |
</ul>
|
2 |
|
3 |
<div class="email-option-desc">
|
4 |
<label for="wpmtst-option-email-subject">
|
5 |
+
<?php esc_html_e( "Subject", 'strong-testimonials' ); ?>
|
6 |
</label>
|
7 |
</div>
|
8 |
|
13 |
id="wpmtst-option-email-subject"
|
14 |
name="wpmtst_form_options[email_subject]"
|
15 |
value="<?php echo esc_attr( $form_options['email_subject'] ); ?>"
|
16 |
+
placeholder="<?php esc_html_e( 'subject line', 'strong-testimonials' ); ?>"
|
17 |
size="50">
|
18 |
</div>
|
19 |
</div>
|
24 |
|
25 |
<div class="email-option-desc">
|
26 |
<label for="wpmtst-option-email-message">
|
27 |
+
<?php esc_html_e( "Message", 'strong-testimonials' ); ?>
|
28 |
</label>
|
29 |
</div>
|
30 |
|
34 |
<textarea class="autosize"
|
35 |
id="wpmtst-option-email-message" name="wpmtst_form_options[email_message]"
|
36 |
rows="<?php echo esc_attr( $line_count ); ?>"
|
37 |
+
placeholder="<?php esc_html_e( 'message text', 'strong-testimonials' ); ?>"><?php echo esc_attr( $form_options['email_message'] ); ?></textarea>
|
38 |
</div>
|
39 |
</div>
|
40 |
|
43 |
<div class="email-option-row column no-padding">
|
44 |
|
45 |
<div class="template-tags-help">
|
46 |
+
<div class="title"><?php esc_html_e( "Tags for Subject and Message", 'strong-testimonials' ); ?></div>
|
47 |
<div class="content">
|
48 |
<ul id="wpmtst-tags-list">
|
49 |
<li>%BLOGNAME%</li>
|
54 |
<?php
|
55 |
$custom_fields = wpmtst_get_custom_fields();
|
56 |
foreach ( $custom_fields as $field ) {
|
57 |
+
echo '<li>%' . esc_html( strtoupper( $field['name'] ) ) . '%</li>' . "\n";
|
58 |
}
|
59 |
?>
|
60 |
</ul>
|
admin/settings/partials/form.php
CHANGED
@@ -4,13 +4,14 @@
|
|
4 |
*
|
5 |
* @since 1.13
|
6 |
*/
|
|
|
7 |
$pages_list = wpmtst_get_pages();
|
8 |
$form_options = get_option( 'wpmtst_form_options' );
|
9 |
|
10 |
?>
|
11 |
<input type="hidden"
|
12 |
name="wpmtst_form_options[default_recipient]"
|
13 |
-
value="<?php echo htmlentities( serialize( $form_options['default_recipient'] ) ); ?>">
|
14 |
|
15 |
<?php
|
16 |
/**
|
@@ -18,15 +19,16 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
18 |
* Labels & Messages
|
19 |
* ========================================
|
20 |
*/
|
|
|
21 |
?>
|
22 |
-
<h2><?php
|
23 |
|
24 |
<?php do_action( 'wpmtst_before_form_settings', 'form-messages' ); ?>
|
25 |
|
26 |
<table class="form-table compact" cellpadding="0" cellspacing="0">
|
27 |
<?php
|
28 |
$messages = $form_options['messages'];
|
29 |
-
foreach ( $messages as $key => $message ):
|
30 |
$required = isset( $message['required'] ) ? $message['required'] : true;
|
31 |
|
32 |
$elid = str_replace( '-', '_', $key );
|
@@ -36,8 +38,8 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
36 |
|
37 |
<tr>
|
38 |
<th scope="row">
|
39 |
-
<label for="<?php echo $elid; ?>">
|
40 |
-
<?php
|
41 |
</label>
|
42 |
<input type="hidden" name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][description]"
|
43 |
value="<?php echo esc_attr( $message['description'] ); ?>"/>
|
@@ -59,7 +61,7 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
59 |
name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][enabled]"
|
60 |
<?php checked( $message['enabled'] ); ?>>
|
61 |
<?php esc_html_e( 'Display required notice at top of form', 'strong-testimonials' ); ?>
|
62 |
-
|
63 |
</fieldset>
|
64 |
<?php endif; ?>
|
65 |
<input type="text" id="<?php echo esc_attr( $elid ); ?>"
|
@@ -70,7 +72,7 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
70 |
</td>
|
71 |
<td class="actions">
|
72 |
<input type="button" class="button secondary restore-default-message"
|
73 |
-
value="<?php
|
74 |
data-target-id="<?php echo esc_attr( $elid ); ?>"/>
|
75 |
</td>
|
76 |
</tr>
|
@@ -97,14 +99,14 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
97 |
<label>
|
98 |
<input type="checkbox"
|
99 |
name="wpmtst_form_options[scrolltop_error]" <?php checked( $form_options['scrolltop_error'] ); ?>/>
|
100 |
-
<?php printf(
|
101 |
</label>
|
102 |
</div>
|
103 |
<div>
|
104 |
<label class="block">
|
105 |
<input type="checkbox"
|
106 |
name="wpmtst_form_options[scrolltop_success]" <?php checked( $form_options['scrolltop_success'] ); ?>/>
|
107 |
-
<?php printf(
|
108 |
</label>
|
109 |
</div>
|
110 |
</fieldset>
|
@@ -118,9 +120,10 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
118 |
* Actions
|
119 |
* ========================================
|
120 |
*/
|
|
|
121 |
?>
|
122 |
<hr>
|
123 |
-
<h3><?php
|
124 |
|
125 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
126 |
|
@@ -131,7 +134,7 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
131 |
<label for="redirect-page">
|
132 |
<?php esc_html_e( 'Upon Successful Submission', 'strong-testimonials' ); ?>
|
133 |
<div class="wpmtst-tooltip"><span>[?]</span>
|
134 |
-
<div class="wpmtst-tooltip-content"><?php
|
135 |
</div>
|
136 |
</label>
|
137 |
</th>
|
@@ -152,8 +155,8 @@ $form_options = get_option( 'wpmtst_form_options' );
|
|
152 |
<option value=""><?php esc_html_e( '— select a page —', 'strong-testimonials' ); ?></option>
|
153 |
<?php foreach ( $pages_list as $pages ) : ?>
|
154 |
|
155 |
-
<option value="<?php echo $pages->ID; ?>" <?php selected( isset( $form_options['success_redirect_id'] ) ? $form_options['success_redirect_id'] : 0, $pages->ID ); ?>>
|
156 |
-
<?php echo $pages->post_title; ?>
|
157 |
</option>
|
158 |
|
159 |
<?php endforeach; ?>
|
4 |
*
|
5 |
* @since 1.13
|
6 |
*/
|
7 |
+
|
8 |
$pages_list = wpmtst_get_pages();
|
9 |
$form_options = get_option( 'wpmtst_form_options' );
|
10 |
|
11 |
?>
|
12 |
<input type="hidden"
|
13 |
name="wpmtst_form_options[default_recipient]"
|
14 |
+
value="<?php echo esc_attr( htmlentities( serialize( $form_options['default_recipient'] ) ) ); ?>">
|
15 |
|
16 |
<?php
|
17 |
/**
|
19 |
* Labels & Messages
|
20 |
* ========================================
|
21 |
*/
|
22 |
+
|
23 |
?>
|
24 |
+
<h2><?php esc_html_e( 'Form Labels & Messages', 'strong-testimonials' ); ?></h2>
|
25 |
|
26 |
<?php do_action( 'wpmtst_before_form_settings', 'form-messages' ); ?>
|
27 |
|
28 |
<table class="form-table compact" cellpadding="0" cellspacing="0">
|
29 |
<?php
|
30 |
$messages = $form_options['messages'];
|
31 |
+
foreach ( $messages as $key => $message ) :
|
32 |
$required = isset( $message['required'] ) ? $message['required'] : true;
|
33 |
|
34 |
$elid = str_replace( '-', '_', $key );
|
38 |
|
39 |
<tr>
|
40 |
<th scope="row">
|
41 |
+
<label for="<?php echo esc_attr( $elid ); ?>">
|
42 |
+
<?php echo esc_html_x( $message['description'], 'description', 'strong-testimonials' ); ?>
|
43 |
</label>
|
44 |
<input type="hidden" name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][description]"
|
45 |
value="<?php echo esc_attr( $message['description'] ); ?>"/>
|
61 |
name="wpmtst_form_options[messages][<?php echo esc_attr( $key ); ?>][enabled]"
|
62 |
<?php checked( $message['enabled'] ); ?>>
|
63 |
<?php esc_html_e( 'Display required notice at top of form', 'strong-testimonials' ); ?>
|
64 |
+
</label>
|
65 |
</fieldset>
|
66 |
<?php endif; ?>
|
67 |
<input type="text" id="<?php echo esc_attr( $elid ); ?>"
|
72 |
</td>
|
73 |
<td class="actions">
|
74 |
<input type="button" class="button secondary restore-default-message"
|
75 |
+
value="<?php echo esc_html_x( 'restore default', 'singular', 'strong-testimonials' ); ?>"
|
76 |
data-target-id="<?php echo esc_attr( $elid ); ?>"/>
|
77 |
</td>
|
78 |
</tr>
|
99 |
<label>
|
100 |
<input type="checkbox"
|
101 |
name="wpmtst_form_options[scrolltop_error]" <?php checked( $form_options['scrolltop_error'] ); ?>/>
|
102 |
+
<?php printf( esc_html__( 'If errors, scroll to the first error minus %s pixels. On by default.', 'strong-testimonials' ), '<input type="text" name="wpmtst_form_options[scrolltop_error_offset]" value="' . esc_attr( $form_options['scrolltop_error_offset'] ) . '" size="3">' ); ?>
|
103 |
</label>
|
104 |
</div>
|
105 |
<div>
|
106 |
<label class="block">
|
107 |
<input type="checkbox"
|
108 |
name="wpmtst_form_options[scrolltop_success]" <?php checked( $form_options['scrolltop_success'] ); ?>/>
|
109 |
+
<?php printf( esc_html__( 'If success, scroll to the success message minus %s pixels. On by default.', 'strong-testimonials' ), '<input type="text" name="wpmtst_form_options[scrolltop_success_offset]" value="' . esc_attr( $form_options['scrolltop_success_offset'] ) . '" size="3">' ); ?>
|
110 |
</label>
|
111 |
</div>
|
112 |
</fieldset>
|
120 |
* Actions
|
121 |
* ========================================
|
122 |
*/
|
123 |
+
|
124 |
?>
|
125 |
<hr>
|
126 |
+
<h3><?php esc_html_e( 'Form Actions', 'strong-testimonials' ); ?></h3>
|
127 |
|
128 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
129 |
|
134 |
<label for="redirect-page">
|
135 |
<?php esc_html_e( 'Upon Successful Submission', 'strong-testimonials' ); ?>
|
136 |
<div class="wpmtst-tooltip"><span>[?]</span>
|
137 |
+
<div class="wpmtst-tooltip-content"><?php esc_html_e('This setting is overwritten by "Submit form without reloading the page (Ajax)" setting found in Form view in the "Views" section.','strong-testimonials'); ?></div>
|
138 |
</div>
|
139 |
</label>
|
140 |
</th>
|
155 |
<option value=""><?php esc_html_e( '— select a page —', 'strong-testimonials' ); ?></option>
|
156 |
<?php foreach ( $pages_list as $pages ) : ?>
|
157 |
|
158 |
+
<option value="<?php echo esc_attr( $pages->ID ); ?>" <?php selected( isset( $form_options['success_redirect_id'] ) ? $form_options['success_redirect_id'] : 0, $pages->ID ); ?>>
|
159 |
+
<?php echo esc_html( $pages->post_title ); ?>
|
160 |
</option>
|
161 |
|
162 |
<?php endforeach; ?>
|
admin/settings/partials/general.php
CHANGED
@@ -7,20 +7,20 @@
|
|
7 |
|
8 |
$options = get_option( 'wpmtst_options' );
|
9 |
?>
|
10 |
-
<h2><?php
|
11 |
|
12 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
13 |
|
14 |
<tr valign="top">
|
15 |
<th scope="row">
|
16 |
-
<?php
|
17 |
</th>
|
18 |
<td>
|
19 |
<fieldset>
|
20 |
<label>
|
21 |
<input type="checkbox" name="wpmtst_options[pending_indicator]" <?php checked( $options['pending_indicator'] ); ?>>
|
22 |
-
<?php
|
23 |
-
<?php
|
24 |
</label>
|
25 |
</fieldset>
|
26 |
</td>
|
@@ -45,30 +45,30 @@ $options = get_option( 'wpmtst_options' );
|
|
45 |
|
46 |
<tr valign="top">
|
47 |
<th scope="row">
|
48 |
-
<?php
|
49 |
</th>
|
50 |
<td>
|
51 |
<fieldset>
|
52 |
<label>
|
53 |
<input type="checkbox" name="wpmtst_options[support_custom_fields]" <?php checked( $options['support_custom_fields'] ); ?>>
|
54 |
<?php _e( 'Show the <strong>Custom Fields</strong> meta box in the testimonial post editor. This does not affect the <strong>Client Details</strong> meta box.', 'strong-testimonials' ); ?>
|
55 |
-
<?php
|
56 |
</label>
|
57 |
-
<p class="description"><?php
|
58 |
</fieldset>
|
59 |
</td>
|
60 |
</tr>
|
61 |
<tr valign="top">
|
62 |
<th scope="row">
|
63 |
-
<?php
|
64 |
</th>
|
65 |
<td>
|
66 |
<fieldset>
|
67 |
<label>
|
68 |
<input type="checkbox"
|
69 |
name="wpmtst_options[disable_rewrite]" <?php isset( $options['disable_rewrite'] ) ? checked( $options['disable_rewrite'] ) : ''; ?>>
|
70 |
-
<?php
|
71 |
-
<?php
|
72 |
</label>
|
73 |
<p class="description">
|
74 |
<?php esc_html_e( 'Prevent indexing of testimonials. This will overwrite the "Link to testimonial" settings from the "Views" section', 'strong-testimonials' ); ?>
|
@@ -92,36 +92,36 @@ $options = get_option( 'wpmtst_options' );
|
|
92 |
</table>
|
93 |
|
94 |
<hr/>
|
95 |
-
<h2><?php
|
96 |
|
97 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
98 |
|
99 |
<tr valign="top">
|
100 |
<th scope="row">
|
101 |
-
<?php
|
102 |
</th>
|
103 |
<td>
|
104 |
<fieldset>
|
105 |
<label>
|
106 |
<input type="checkbox" name="wpmtst_options[touch_enabled]" <?php checked( $options['touch_enabled'] ); ?>>
|
107 |
-
<?php
|
108 |
-
<?php
|
109 |
</label>
|
110 |
-
<p class="description"><?php
|
111 |
</fieldset>
|
112 |
</td>
|
113 |
</tr>
|
114 |
|
115 |
<tr valign="top">
|
116 |
<th scope="row">
|
117 |
-
<?php
|
118 |
</th>
|
119 |
<td>
|
120 |
<fieldset>
|
121 |
<label>
|
122 |
<input type="checkbox" name="wpmtst_options[scrolltop]" <?php checked( $options['scrolltop'] ); ?>>
|
123 |
-
<?php printf(
|
124 |
-
<?php
|
125 |
</label>
|
126 |
</fieldset>
|
127 |
</td>
|
@@ -129,14 +129,14 @@ $options = get_option( 'wpmtst_options' );
|
|
129 |
|
130 |
<tr valign="top">
|
131 |
<th scope="row">
|
132 |
-
<?php
|
133 |
</th>
|
134 |
<td>
|
135 |
<fieldset>
|
136 |
<label>
|
137 |
<input type="checkbox" name="wpmtst_options[remove_whitespace]" <?php checked( $options['remove_whitespace'] ); ?>>
|
138 |
-
<?php
|
139 |
-
<?php
|
140 |
</label>
|
141 |
</fieldset>
|
142 |
</td>
|
@@ -144,17 +144,17 @@ $options = get_option( 'wpmtst_options' );
|
|
144 |
|
145 |
<tr valign="top">
|
146 |
<th scope="row">
|
147 |
-
<?php
|
148 |
</th>
|
149 |
<td>
|
150 |
<fieldset>
|
151 |
<label>
|
152 |
<input type="checkbox" name="wpmtst_options[support_comments]" <?php checked( $options['support_comments'] ); ?>>
|
153 |
-
<?php
|
154 |
-
<?php
|
155 |
</label>
|
156 |
</fieldset>
|
157 |
-
<p class="description"><?php
|
158 |
<ul class="description">
|
159 |
<li><?php _e( 'For individual testimonials, use the <strong>Discussion</strong> meta box in the post editor or <strong>Quick Edit</strong> in the testimonial list.', 'strong-testimonials' ); ?></li>
|
160 |
<li><?php _e( 'For multiple testimonials, use <strong>Bulk Edit</strong> in the testimonial list.', 'strong-testimonials' ); ?></li>
|
@@ -164,19 +164,19 @@ $options = get_option( 'wpmtst_options' );
|
|
164 |
|
165 |
<tr valign="top">
|
166 |
<th scope="row">
|
167 |
-
<?php
|
168 |
</th>
|
169 |
<td>
|
170 |
<fieldset>
|
171 |
<?php printf(
|
172 |
/* Translators: %s is an input field. */
|
173 |
-
|
174 |
-
'<input type="text" name="wpmtst_options[embed_width]" value="' . $options['embed_width'] . '" size="3">' ); ?>
|
175 |
-
<p class="description"><?php
|
176 |
<p class="description">
|
177 |
<?php printf( '<a href="%s" target="_blank">%s</a>',
|
178 |
esc_url( 'https://codex.wordpress.org/Embeds' ),
|
179 |
-
|
180 |
</p>
|
181 |
</fieldset>
|
182 |
</td>
|
@@ -184,33 +184,33 @@ $options = get_option( 'wpmtst_options' );
|
|
184 |
|
185 |
<tr valign="top">
|
186 |
<th scope="row">
|
187 |
-
<?php
|
188 |
</th>
|
189 |
<td>
|
190 |
<fieldset>
|
191 |
<label>
|
192 |
<input type="checkbox" name="wpmtst_options[nofollow]" <?php checked( $options['nofollow'] ); ?>>
|
193 |
<?php _e( 'Add <code>rel="nofollow"</code> to URL custom fields.', 'strong-testimonials' ); ?>
|
194 |
-
<?php
|
195 |
</label>
|
196 |
<p class="description">
|
197 |
<?php printf( 'To edit this value on your existing testimonials in bulk, try <a href="%s" target="_blank">%s</a> and set <code>nofollow</code> to <b>default</b>, <b>yes</b> or <b>no</b>.',
|
198 |
esc_url( 'https://wordpress.org/plugins/custom-field-bulk-editor/' ),
|
199 |
-
|
200 |
</p>
|
201 |
</fieldset>
|
202 |
</td>
|
203 |
</tr>
|
204 |
<tr valign="top">
|
205 |
<th scope="row">
|
206 |
-
<?php
|
207 |
</th>
|
208 |
<td>
|
209 |
<fieldset>
|
210 |
<label>
|
211 |
<input type="checkbox" name="wpmtst_options[noopener]" <?php checked( $options['noopener'] ); ?>>
|
212 |
<?php _e( 'Add <code>rel="noopener"</code> to URL custom fields.', 'strong-testimonials' ); ?>
|
213 |
-
<?php
|
214 |
</label>
|
215 |
</fieldset>
|
216 |
</td>
|
@@ -218,14 +218,14 @@ $options = get_option( 'wpmtst_options' );
|
|
218 |
|
219 |
<tr valign="top">
|
220 |
<th scope="row">
|
221 |
-
<?php
|
222 |
</th>
|
223 |
<td>
|
224 |
<fieldset>
|
225 |
<label>
|
226 |
<input type="checkbox" name="wpmtst_options[noreferrer]" <?php checked( $options['noreferrer'] ); ?>>
|
227 |
<?php _e( 'Add <code>rel="noreferrer"</code> to URL custom fields.', 'strong-testimonials' ); ?>
|
228 |
-
<?php
|
229 |
</label>
|
230 |
</fieldset>
|
231 |
</td>
|
@@ -234,14 +234,14 @@ $options = get_option( 'wpmtst_options' );
|
|
234 |
<?php if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true ) ) : ?>
|
235 |
<tr valign="top">
|
236 |
<th scope="row">
|
237 |
-
<?php
|
238 |
</th>
|
239 |
<td>
|
240 |
<fieldset>
|
241 |
<label>
|
242 |
<input type="checkbox" name="wpmtst_options[lazyload]" <?php checked( $options['lazyload'] ); ?>>
|
243 |
-
<?php printf(
|
244 |
-
<?php
|
245 |
</label>
|
246 |
</fieldset>
|
247 |
</td>
|
@@ -251,32 +251,32 @@ $options = get_option( 'wpmtst_options' );
|
|
251 |
<?php if ( wpmtst_is_plugin_active( 'lazy-loading-responsive-images' ) ) : ?>
|
252 |
<tr valign="top">
|
253 |
<th scope="row">
|
254 |
-
<?php
|
255 |
</th>
|
256 |
<td>
|
257 |
<fieldset>
|
258 |
<label>
|
259 |
<input type="checkbox" name="wpmtst_options[no_lazyload_plugin]" <?php checked( $options['no_lazyload_plugin'] ); ?>>
|
260 |
<?php printf( __( 'Exclude from <a href="%s" target="_blank">Lazy Loading Responsive Images</a> plugin.', 'strong-testimonials' ), esc_url( 'https://wordpress.org/plugins/lazy-loading-responsive-images/' ) ); ?>
|
261 |
-
<?php
|
262 |
</label>
|
263 |
</fieldset>
|
264 |
</td>
|
265 |
</tr>
|
266 |
<?php else : ?>
|
267 |
-
<input type="hidden" name="wpmtst_options[no_lazyload_plugin]" value="<?php echo $options['no_lazyload_plugin']; ?>">
|
268 |
<?php endif; ?>
|
269 |
|
270 |
<tr valign="top">
|
271 |
<th scope="row">
|
272 |
-
<?php
|
273 |
</th>
|
274 |
<td>
|
275 |
<fieldset>
|
276 |
<label>
|
277 |
<input type="checkbox" name="wpmtst_options[disable_upsells]" <?php checked( $options['disable_upsells'] ); ?>>
|
278 |
-
<?php printf(
|
279 |
-
<?php
|
280 |
</label>
|
281 |
</fieldset>
|
282 |
</td>
|
7 |
|
8 |
$options = get_option( 'wpmtst_options' );
|
9 |
?>
|
10 |
+
<h2><?php esc_html_e( 'Admin', 'strong-testimonials' ); ?></h2>
|
11 |
|
12 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
13 |
|
14 |
<tr valign="top">
|
15 |
<th scope="row">
|
16 |
+
<?php esc_html_e( 'Pending Indicator', 'strong-testimonials' ); ?>
|
17 |
</th>
|
18 |
<td>
|
19 |
<fieldset>
|
20 |
<label>
|
21 |
<input type="checkbox" name="wpmtst_options[pending_indicator]" <?php checked( $options['pending_indicator'] ); ?>>
|
22 |
+
<?php esc_html_e( 'Show indicator bubble when new submissions are awaiting moderation.', 'strong-testimonials' ); ?>
|
23 |
+
<?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
|
24 |
</label>
|
25 |
</fieldset>
|
26 |
</td>
|
45 |
|
46 |
<tr valign="top">
|
47 |
<th scope="row">
|
48 |
+
<?php esc_html_e( 'Custom Fields Meta Box', 'strong-testimonials' ); ?>
|
49 |
</th>
|
50 |
<td>
|
51 |
<fieldset>
|
52 |
<label>
|
53 |
<input type="checkbox" name="wpmtst_options[support_custom_fields]" <?php checked( $options['support_custom_fields'] ); ?>>
|
54 |
<?php _e( 'Show the <strong>Custom Fields</strong> meta box in the testimonial post editor. This does not affect the <strong>Client Details</strong> meta box.', 'strong-testimonials' ); ?>
|
55 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
56 |
</label>
|
57 |
+
<p class="description"><?php esc_html_e( 'For advanced users.', 'strong-testimonials' ); ?></p>
|
58 |
</fieldset>
|
59 |
</td>
|
60 |
</tr>
|
61 |
<tr valign="top">
|
62 |
<th scope="row">
|
63 |
+
<?php esc_html_e( 'Permalinks', 'strong-testimonials' ); ?>
|
64 |
</th>
|
65 |
<td>
|
66 |
<fieldset>
|
67 |
<label>
|
68 |
<input type="checkbox"
|
69 |
name="wpmtst_options[disable_rewrite]" <?php isset( $options['disable_rewrite'] ) ? checked( $options['disable_rewrite'] ) : ''; ?>>
|
70 |
+
<?php esc_html_e( 'Disable permalinks for testimonials.', 'strong-testimonials' ); ?>
|
71 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
72 |
</label>
|
73 |
<p class="description">
|
74 |
<?php esc_html_e( 'Prevent indexing of testimonials. This will overwrite the "Link to testimonial" settings from the "Views" section', 'strong-testimonials' ); ?>
|
92 |
</table>
|
93 |
|
94 |
<hr/>
|
95 |
+
<h2><?php esc_html_e( 'Output', 'strong-testimonials' ); ?></h2>
|
96 |
|
97 |
<table class="form-table" cellpadding="0" cellspacing="0">
|
98 |
|
99 |
<tr valign="top">
|
100 |
<th scope="row">
|
101 |
+
<?php esc_html_e( 'Enable Touch', 'strong-testimonials' ); ?>
|
102 |
</th>
|
103 |
<td>
|
104 |
<fieldset>
|
105 |
<label>
|
106 |
<input type="checkbox" name="wpmtst_options[touch_enabled]" <?php checked( $options['touch_enabled'] ); ?>>
|
107 |
+
<?php esc_html_e( 'Enable touch swipe navigation in slideshows.', 'strong-testimonials' ); ?>
|
108 |
+
<?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
|
109 |
</label>
|
110 |
+
<p class="description"><?php esc_html_e( 'If you are having trouble scrolling long testimonials on a small screen, try disabling this.', 'strong-testimonials' ); ?></p>
|
111 |
</fieldset>
|
112 |
</td>
|
113 |
</tr>
|
114 |
|
115 |
<tr valign="top">
|
116 |
<th scope="row">
|
117 |
+
<?php esc_html_e( 'Scroll Top', 'strong-testimonials' ); ?>
|
118 |
</th>
|
119 |
<td>
|
120 |
<fieldset>
|
121 |
<label>
|
122 |
<input type="checkbox" name="wpmtst_options[scrolltop]" <?php checked( $options['scrolltop'] ); ?>>
|
123 |
+
<?php printf( esc_html__( 'When a new page is selected in paginated Views, scroll to the top of the container minus %s pixels.', 'strong-testimonials' ), '<input type="text" name="wpmtst_options[scrolltop_offset]" value="' . esc_attr( $options['scrolltop_offset'] ) . '" size="3">' ); ?>
|
124 |
+
<?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
|
125 |
</label>
|
126 |
</fieldset>
|
127 |
</td>
|
129 |
|
130 |
<tr valign="top">
|
131 |
<th scope="row">
|
132 |
+
<?php esc_html_e( 'Remove Whitespace', 'strong-testimonials' ); ?>
|
133 |
</th>
|
134 |
<td>
|
135 |
<fieldset>
|
136 |
<label>
|
137 |
<input type="checkbox" name="wpmtst_options[remove_whitespace]" <?php checked( $options['remove_whitespace'] ); ?>>
|
138 |
+
<?php esc_html_e( 'Remove space between HTML tags in View output to prevent double paragraphs <em>(wpautop)</em>.', 'strong-testimonials' ); ?>
|
139 |
+
<?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
|
140 |
</label>
|
141 |
</fieldset>
|
142 |
</td>
|
144 |
|
145 |
<tr valign="top">
|
146 |
<th scope="row">
|
147 |
+
<?php esc_html_e( 'Comments', 'strong-testimonials' ); ?>
|
148 |
</th>
|
149 |
<td>
|
150 |
<fieldset>
|
151 |
<label>
|
152 |
<input type="checkbox" name="wpmtst_options[support_comments]" <?php checked( $options['support_comments'] ); ?>>
|
153 |
+
<?php esc_html_e( 'Allow comments on testimonials. Requires using your theme\'s single post template.', 'strong-testimonials' ); ?>
|
154 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
155 |
</label>
|
156 |
</fieldset>
|
157 |
+
<p class="description"><?php esc_html_e( 'To enable comments:', 'strong-testimonials' ); ?></p>
|
158 |
<ul class="description">
|
159 |
<li><?php _e( 'For individual testimonials, use the <strong>Discussion</strong> meta box in the post editor or <strong>Quick Edit</strong> in the testimonial list.', 'strong-testimonials' ); ?></li>
|
160 |
<li><?php _e( 'For multiple testimonials, use <strong>Bulk Edit</strong> in the testimonial list.', 'strong-testimonials' ); ?></li>
|
164 |
|
165 |
<tr valign="top">
|
166 |
<th scope="row">
|
167 |
+
<?php esc_html_e( 'Embed Width', 'strong-testimonials' ); ?>
|
168 |
</th>
|
169 |
<td>
|
170 |
<fieldset>
|
171 |
<?php printf(
|
172 |
/* Translators: %s is an input field. */
|
173 |
+
esc_html__( 'For embedded links (YouTube, Twitter, etc.) set the frame width to %s pixels.', 'strong-testimonials' ),
|
174 |
+
'<input type="text" name="wpmtst_options[embed_width]" value="' . esc_attr( $options['embed_width'] ) . '" size="3">' ); ?>
|
175 |
+
<p class="description"><?php esc_html_e( 'Leave empty for default width (usually 100% for videos). Height will be calculated automatically. This setting only applies to Views.', 'strong-testimonials' ); ?></p>
|
176 |
<p class="description">
|
177 |
<?php printf( '<a href="%s" target="_blank">%s</a>',
|
178 |
esc_url( 'https://codex.wordpress.org/Embeds' ),
|
179 |
+
esc_html__( 'More on embeds', 'strong-testimonials' ) ); ?>
|
180 |
</p>
|
181 |
</fieldset>
|
182 |
</td>
|
184 |
|
185 |
<tr valign="top">
|
186 |
<th scope="row">
|
187 |
+
<?php esc_html_e( 'Nofollow Links', 'strong-testimonials' ); ?>
|
188 |
</th>
|
189 |
<td>
|
190 |
<fieldset>
|
191 |
<label>
|
192 |
<input type="checkbox" name="wpmtst_options[nofollow]" <?php checked( $options['nofollow'] ); ?>>
|
193 |
<?php _e( 'Add <code>rel="nofollow"</code> to URL custom fields.', 'strong-testimonials' ); ?>
|
194 |
+
<?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
|
195 |
</label>
|
196 |
<p class="description">
|
197 |
<?php printf( 'To edit this value on your existing testimonials in bulk, try <a href="%s" target="_blank">%s</a> and set <code>nofollow</code> to <b>default</b>, <b>yes</b> or <b>no</b>.',
|
198 |
esc_url( 'https://wordpress.org/plugins/custom-field-bulk-editor/' ),
|
199 |
+
esc_html__( 'Custom Field Bulk Editor', 'strong-testimonials' ) ); ?>
|
200 |
</p>
|
201 |
</fieldset>
|
202 |
</td>
|
203 |
</tr>
|
204 |
<tr valign="top">
|
205 |
<th scope="row">
|
206 |
+
<?php esc_html_e( 'Noopener Links', 'strong-testimonials' ); ?>
|
207 |
</th>
|
208 |
<td>
|
209 |
<fieldset>
|
210 |
<label>
|
211 |
<input type="checkbox" name="wpmtst_options[noopener]" <?php checked( $options['noopener'] ); ?>>
|
212 |
<?php _e( 'Add <code>rel="noopener"</code> to URL custom fields.', 'strong-testimonials' ); ?>
|
213 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
214 |
</label>
|
215 |
</fieldset>
|
216 |
</td>
|
218 |
|
219 |
<tr valign="top">
|
220 |
<th scope="row">
|
221 |
+
<?php esc_html_e( 'Noreferrer Links', 'strong-testimonials' ); ?>
|
222 |
</th>
|
223 |
<td>
|
224 |
<fieldset>
|
225 |
<label>
|
226 |
<input type="checkbox" name="wpmtst_options[noreferrer]" <?php checked( $options['noreferrer'] ); ?>>
|
227 |
<?php _e( 'Add <code>rel="noreferrer"</code> to URL custom fields.', 'strong-testimonials' ); ?>
|
228 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
229 |
</label>
|
230 |
</fieldset>
|
231 |
</td>
|
234 |
<?php if( !function_exists( 'wp_lazy_loading_enabled' ) || !apply_filters( 'wp_lazy_loading_enabled', true ) ) : ?>
|
235 |
<tr valign="top">
|
236 |
<th scope="row">
|
237 |
+
<?php esc_html_e( 'Lazy Loading', 'strong-testimonials' ); ?>
|
238 |
</th>
|
239 |
<td>
|
240 |
<fieldset>
|
241 |
<label>
|
242 |
<input type="checkbox" name="wpmtst_options[lazyload]" <?php checked( $options['lazyload'] ); ?>>
|
243 |
+
<?php printf( esc_html__( 'Enable the Lazy Loading functionality.', 'strong-testimonials' ) ); ?>
|
244 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
245 |
</label>
|
246 |
</fieldset>
|
247 |
</td>
|
251 |
<?php if ( wpmtst_is_plugin_active( 'lazy-loading-responsive-images' ) ) : ?>
|
252 |
<tr valign="top">
|
253 |
<th scope="row">
|
254 |
+
<?php esc_html_e( 'No Lazy Loading Plugin', 'strong-testimonials' ); ?>
|
255 |
</th>
|
256 |
<td>
|
257 |
<fieldset>
|
258 |
<label>
|
259 |
<input type="checkbox" name="wpmtst_options[no_lazyload_plugin]" <?php checked( $options['no_lazyload_plugin'] ); ?>>
|
260 |
<?php printf( __( 'Exclude from <a href="%s" target="_blank">Lazy Loading Responsive Images</a> plugin.', 'strong-testimonials' ), esc_url( 'https://wordpress.org/plugins/lazy-loading-responsive-images/' ) ); ?>
|
261 |
+
<?php esc_html_e( 'On by default.', 'strong-testimonials' ); ?>
|
262 |
</label>
|
263 |
</fieldset>
|
264 |
</td>
|
265 |
</tr>
|
266 |
<?php else : ?>
|
267 |
+
<input type="hidden" name="wpmtst_options[no_lazyload_plugin]" value="<?php echo esc_attr( $options['no_lazyload_plugin'] ); ?>">
|
268 |
<?php endif; ?>
|
269 |
|
270 |
<tr valign="top">
|
271 |
<th scope="row">
|
272 |
+
<?php esc_html_e( 'Upsells', 'strong-testimonials' ); ?>
|
273 |
</th>
|
274 |
<td>
|
275 |
<fieldset>
|
276 |
<label>
|
277 |
<input type="checkbox" name="wpmtst_options[disable_upsells]" <?php checked( $options['disable_upsells'] ); ?>>
|
278 |
+
<?php printf( esc_html__( 'Disable all upsells.', 'strong-testimonials' ) ); ?>
|
279 |
+
<?php esc_html_e( 'Off by default.', 'strong-testimonials' ); ?>
|
280 |
</label>
|
281 |
</fieldset>
|
282 |
</td>
|
admin/settings/partials/recipient.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
<div class="fields">
|
11 |
<input class="admin_name"
|
12 |
type="text"
|
13 |
-
name="wpmtst_form_options[recipients][<?php echo $key; ?>][admin_name]"
|
14 |
value="<?php echo esc_attr( $recipient['admin_name'] ); ?>"
|
15 |
-
placeholder="<?php
|
16 |
</div>
|
17 |
</div>
|
18 |
</div>
|
@@ -22,15 +22,15 @@
|
|
22 |
|
23 |
<div class="email-option-fieldset primary-1">
|
24 |
<div class="controls">
|
25 |
-
<input type="hidden" name="wpmtst_form_options[recipients][<?php echo $key; ?>][primary]" value="1">
|
26 |
<input type="radio" id="wpmtst-options-admin-site-email-1"
|
27 |
-
name="wpmtst_form_options[recipients][<?php echo $key; ?>][admin_site_email]" <?php checked( $recipient['admin_site_email'], 1 ); ?>
|
28 |
value="1">
|
29 |
</div>
|
30 |
<div class="fields">
|
31 |
<label for="wpmtst-options-admin-site-email-1">
|
32 |
-
<?php
|
33 |
-
<?php
|
34 |
</label>
|
35 |
</div>
|
36 |
</div>
|
@@ -39,14 +39,14 @@
|
|
39 |
<div class="controls">
|
40 |
<input class="focus-next-field" type="radio"
|
41 |
id="wpmtst-options-admin-site-email-0"
|
42 |
-
name="wpmtst_form_options[recipients][<?php echo $key; ?>][admin_site_email]" <?php checked( $recipient['admin_site_email'], 0 ); ?>
|
43 |
value="0">
|
44 |
</div>
|
45 |
<div class="fields">
|
46 |
<input type="email" id="wpmtst-options-admin-email"
|
47 |
-
name="wpmtst_form_options[recipients][<?php echo $key; ?>][admin_email]"
|
48 |
value="<?php echo esc_attr( $recipient['admin_email'] ); ?>"
|
49 |
-
placeholder="<?php
|
50 |
</div>
|
51 |
</div>
|
52 |
|
@@ -56,9 +56,9 @@
|
|
56 |
<div class="controls"></div>
|
57 |
<div class="fields">
|
58 |
<input type="email"
|
59 |
-
name="wpmtst_form_options[recipients][<?php echo $key; ?>][admin_email]"
|
60 |
value="<?php echo esc_attr( $recipient['admin_email'] ); ?>"
|
61 |
-
placeholder="<?php
|
62 |
</div>
|
63 |
</div>
|
64 |
|
10 |
<div class="fields">
|
11 |
<input class="admin_name"
|
12 |
type="text"
|
13 |
+
name="wpmtst_form_options[recipients][<?php echo esc_attr( $key ); ?>][admin_name]"
|
14 |
value="<?php echo esc_attr( $recipient['admin_name'] ); ?>"
|
15 |
+
placeholder="<?php esc_html_e( '(optional)', 'strong-testimonials' ); ?>">
|
16 |
</div>
|
17 |
</div>
|
18 |
</div>
|
22 |
|
23 |
<div class="email-option-fieldset primary-1">
|
24 |
<div class="controls">
|
25 |
+
<input type="hidden" name="wpmtst_form_options[recipients][<?php echo esc_attr( $key ); ?>][primary]" value="1">
|
26 |
<input type="radio" id="wpmtst-options-admin-site-email-1"
|
27 |
+
name="wpmtst_form_options[recipients][<?php echo esc_attr( $key ); ?>][admin_site_email]" <?php checked( $recipient['admin_site_email'], 1 ); ?>
|
28 |
value="1">
|
29 |
</div>
|
30 |
<div class="fields">
|
31 |
<label for="wpmtst-options-admin-site-email-1">
|
32 |
+
<?php esc_html_e( 'admin:', 'strong-testimonials' ); ?>
|
33 |
+
<?php esc_html_e( get_bloginfo( 'admin_email' ) ); ?>
|
34 |
</label>
|
35 |
</div>
|
36 |
</div>
|
39 |
<div class="controls">
|
40 |
<input class="focus-next-field" type="radio"
|
41 |
id="wpmtst-options-admin-site-email-0"
|
42 |
+
name="wpmtst_form_options[recipients][<?php echo esc_attr( $key ); ?>][admin_site_email]" <?php checked( $recipient['admin_site_email'], 0 ); ?>
|
43 |
value="0">
|
44 |
</div>
|
45 |
<div class="fields">
|
46 |
<input type="email" id="wpmtst-options-admin-email"
|
47 |
+
name="wpmtst_form_options[recipients][<?php echo esc_attr( $key ); ?>][admin_email]"
|
48 |
value="<?php echo esc_attr( $recipient['admin_email'] ); ?>"
|
49 |
+
placeholder="<?php esc_html_e( 'email address', 'strong-testimonials' ); ?>">
|
50 |
</div>
|
51 |
</div>
|
52 |
|
56 |
<div class="controls"></div>
|
57 |
<div class="fields">
|
58 |
<input type="email"
|
59 |
+
name="wpmtst_form_options[recipients][<?php echo esc_attr( $key ); ?>][admin_email]"
|
60 |
value="<?php echo esc_attr( $recipient['admin_email'] ); ?>"
|
61 |
+
placeholder="<?php esc_html_e( 'email address', 'strong-testimonials' ); ?>">
|
62 |
</div>
|
63 |
</div>
|
64 |
|
admin/view-list-order.php
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
* Save
|
8 |
*/
|
9 |
function wpmtst_save_view_list_order() {
|
10 |
-
$name = $_REQUEST['name'];
|
11 |
-
$order = $_REQUEST['order'];
|
12 |
$success = '';
|
13 |
if ( in_array( $name, array( 'name', 'id' ) ) ) {
|
14 |
$success = update_user_meta( get_current_user_id(), 'strong_view_list_order', array( $name, $order ) );
|
7 |
* Save
|
8 |
*/
|
9 |
function wpmtst_save_view_list_order() {
|
10 |
+
$name = sanitize_text_field( $_REQUEST['name'] );
|
11 |
+
$order = sanitize_text_field( $_REQUEST['order'] );
|
12 |
$success = '';
|
13 |
if ( in_array( $name, array( 'name', 'id' ) ) ) {
|
14 |
$success = update_user_meta( get_current_user_id(), 'strong_view_list_order', array( $name, $order ) );
|
admin/views-ajax.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* @since 1.25.0
|
11 |
*/
|
12 |
function wpmtst_force_check() {
|
13 |
-
$atts = array( 'template' => $_REQUEST['template'] );
|
14 |
$force = WPMST()->templates->get_template_config( $atts, 'force', false );
|
15 |
if ( $force ) {
|
16 |
wp_send_json_success( (array) $force );
|
@@ -26,11 +26,11 @@ add_action( 'wp_ajax_wpmtst_force_check', 'wpmtst_force_check' );
|
|
26 |
* @since 1.21.0
|
27 |
*/
|
28 |
function wpmtst_view_add_field_function() {
|
29 |
-
$new_key = (int) $_REQUEST['key'];
|
30 |
$empty_field = array( 'field' => '', 'type' => 'text', 'class' => '' );
|
31 |
$source = 'view[data]';
|
32 |
-
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
33 |
-
$source = $_REQUEST['source'];
|
34 |
}
|
35 |
wpmtst_view_field_inputs( $new_key, $empty_field, true, $source );
|
36 |
wp_die();
|
@@ -44,13 +44,13 @@ add_action( 'wp_ajax_wpmtst_view_add_field', 'wpmtst_view_add_field_function' );
|
|
44 |
* @since 1.21.0
|
45 |
*/
|
46 |
function wpmtst_view_add_field_link_function() {
|
47 |
-
$key = (int) $_REQUEST['key'];
|
48 |
-
$field_name = $_REQUEST['fieldName'];
|
49 |
-
$type = $_REQUEST['fieldType'];
|
50 |
$empty_field = array( 'url' => '', 'link_text' => '', 'new_tab' => true );
|
51 |
$source = 'view[data]';
|
52 |
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
53 |
-
$source = $_REQUEST['source'];
|
54 |
}
|
55 |
wpmtst_view_field_link( $key, $field_name, $type, $empty_field, false, $source );
|
56 |
wp_die();
|
@@ -64,7 +64,7 @@ add_action( 'wp_ajax_wpmtst_view_add_field_link', 'wpmtst_view_add_field_link_fu
|
|
64 |
* @since 1.24.0
|
65 |
*/
|
66 |
function wpmtst_view_get_label_function() {
|
67 |
-
$field = array( 'field' => $_REQUEST['name'] );
|
68 |
$label = wpmtst_get_field_label( $field );
|
69 |
echo $label;
|
70 |
wp_die();
|
@@ -78,11 +78,11 @@ add_action( 'wp_ajax_wpmtst_view_get_label', 'wpmtst_view_get_label_function' );
|
|
78 |
* @since 1.21.0
|
79 |
*/
|
80 |
function wpmtst_view_add_field_date_function() {
|
81 |
-
$key = (int) $_REQUEST['key'];
|
82 |
$empty_field = array( 'format' => '' );
|
83 |
$source = 'view[data]';
|
84 |
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
85 |
-
$source = $_REQUEST['source'];
|
86 |
}
|
87 |
wpmtst_view_field_date( $key, $empty_field, false, $source );
|
88 |
wp_die();
|
@@ -95,15 +95,15 @@ add_action( 'wp_ajax_wpmtst_view_add_field_date', 'wpmtst_view_add_field_date_fu
|
|
95 |
* @since 2.40.4
|
96 |
*/
|
97 |
function wpmtst_view_add_field_checkbox_function() {
|
98 |
-
|
99 |
$field = array(
|
100 |
-
'field' => $_REQUEST['fieldName'],
|
101 |
-
'type' => $_REQUEST['fieldType']
|
102 |
);
|
103 |
$empty_field = array( 'custom_label' => '', 'checked_value' => '', 'unchecked_value' => '');
|
104 |
$source = 'view[data]';
|
105 |
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
106 |
-
$source = $_REQUEST['source'];
|
107 |
}
|
108 |
wpmtst_view_field_checkbox ( $key, $field, $empty_field, $source );
|
109 |
wp_die();
|
@@ -117,7 +117,7 @@ add_action( 'wp_ajax_wpmtst_view_add_field_checkbox', 'wpmtst_view_add_field_che
|
|
117 |
* @since 2.22.0
|
118 |
*/
|
119 |
function wpmtst_view_get_mode_description() {
|
120 |
-
$mode = $_REQUEST['mode'];
|
121 |
$options = get_option( 'wpmtst_view_options' );
|
122 |
if ( isset( $options['mode'][ $mode ]['description'] ) ) {
|
123 |
$description = $options['mode'][ $mode ]['description'];
|
@@ -133,7 +133,7 @@ add_action( 'wp_ajax_wpmtst_view_get_mode_description', 'wpmtst_view_get_mode_de
|
|
133 |
* Get background color presets in View editor.
|
134 |
*/
|
135 |
function wpmtst_get_background_preset_colors() {
|
136 |
-
$preset = wpmtst_get_background_presets( $_REQUEST['key'] );
|
137 |
echo json_encode( $preset );
|
138 |
wp_die();
|
139 |
}
|
10 |
* @since 1.25.0
|
11 |
*/
|
12 |
function wpmtst_force_check() {
|
13 |
+
$atts = array( 'template' => sanitize_text_field( $_REQUEST['template'] ) );
|
14 |
$force = WPMST()->templates->get_template_config( $atts, 'force', false );
|
15 |
if ( $force ) {
|
16 |
wp_send_json_success( (array) $force );
|
26 |
* @since 1.21.0
|
27 |
*/
|
28 |
function wpmtst_view_add_field_function() {
|
29 |
+
$new_key = (int) sanitize_text_field( $_REQUEST['key'] );
|
30 |
$empty_field = array( 'field' => '', 'type' => 'text', 'class' => '' );
|
31 |
$source = 'view[data]';
|
32 |
+
if (isset($_REQUEST['source']) && !empty( $_REQUEST['source'] )) {
|
33 |
+
$source = sanitize_text_field( $_REQUEST['source'] );
|
34 |
}
|
35 |
wpmtst_view_field_inputs( $new_key, $empty_field, true, $source );
|
36 |
wp_die();
|
44 |
* @since 1.21.0
|
45 |
*/
|
46 |
function wpmtst_view_add_field_link_function() {
|
47 |
+
$key = (int) sanitize_text_field( $_REQUEST['key'] );
|
48 |
+
$field_name = sanitize_text_field( $_REQUEST['fieldName'] );
|
49 |
+
$type = sanitize_text_field( $_REQUEST['fieldType'] );
|
50 |
$empty_field = array( 'url' => '', 'link_text' => '', 'new_tab' => true );
|
51 |
$source = 'view[data]';
|
52 |
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
53 |
+
$source = sanitize_text_field( $_REQUEST['source'] );
|
54 |
}
|
55 |
wpmtst_view_field_link( $key, $field_name, $type, $empty_field, false, $source );
|
56 |
wp_die();
|
64 |
* @since 1.24.0
|
65 |
*/
|
66 |
function wpmtst_view_get_label_function() {
|
67 |
+
$field = array( 'field' => sanitize_text_field( $_REQUEST['name'] ) );
|
68 |
$label = wpmtst_get_field_label( $field );
|
69 |
echo $label;
|
70 |
wp_die();
|
78 |
* @since 1.21.0
|
79 |
*/
|
80 |
function wpmtst_view_add_field_date_function() {
|
81 |
+
$key = (int) sanitize_text_field( $_REQUEST['key'] );
|
82 |
$empty_field = array( 'format' => '' );
|
83 |
$source = 'view[data]';
|
84 |
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
85 |
+
$source = sanitize_text_field( $_REQUEST['source'] );
|
86 |
}
|
87 |
wpmtst_view_field_date( $key, $empty_field, false, $source );
|
88 |
wp_die();
|
95 |
* @since 2.40.4
|
96 |
*/
|
97 |
function wpmtst_view_add_field_checkbox_function() {
|
98 |
+
$key = (int) sanitize_text_field( $_REQUEST['key'] );
|
99 |
$field = array(
|
100 |
+
'field' => sanitize_text_field( $_REQUEST['fieldName'] ),
|
101 |
+
'type' => sanitize_text_field( $_REQUEST['fieldType'] )
|
102 |
);
|
103 |
$empty_field = array( 'custom_label' => '', 'checked_value' => '', 'unchecked_value' => '');
|
104 |
$source = 'view[data]';
|
105 |
if (isset($_REQUEST['source']) && !empty($_REQUEST['source'])) {
|
106 |
+
$source = sanitize_text_field( $_REQUEST['source'] );
|
107 |
}
|
108 |
wpmtst_view_field_checkbox ( $key, $field, $empty_field, $source );
|
109 |
wp_die();
|
117 |
* @since 2.22.0
|
118 |
*/
|
119 |
function wpmtst_view_get_mode_description() {
|
120 |
+
$mode = sanitize_text_field( $_REQUEST['mode'] );
|
121 |
$options = get_option( 'wpmtst_view_options' );
|
122 |
if ( isset( $options['mode'][ $mode ]['description'] ) ) {
|
123 |
$description = $options['mode'][ $mode ]['description'];
|
133 |
* Get background color presets in View editor.
|
134 |
*/
|
135 |
function wpmtst_get_background_preset_colors() {
|
136 |
+
$preset = wpmtst_get_background_presets( sanitize_text_field( $_REQUEST['key'] ) );
|
137 |
echo json_encode( $preset );
|
138 |
wp_die();
|
139 |
}
|
admin/views.php
CHANGED
@@ -32,34 +32,33 @@ function wpmtst_views_admin() {
|
|
32 |
$result = filter_input( INPUT_GET, 'result', FILTER_SANITIZE_STRING );
|
33 |
|
34 |
$result_messages = array(
|
35 |
-
'cancelled' =>
|
36 |
-
'defaults-restored' =>
|
37 |
-
'view-saved' =>
|
38 |
-
'view-deleted' =>
|
39 |
);
|
40 |
|
41 |
if ( in_array( $result, array_keys( $result_messages ) ) ) {
|
42 |
-
printf( '<div class="notice notice-success is-dismissible"><p>%s</p></div>', $result_messages[ $result ] );
|
43 |
}
|
44 |
|
45 |
}
|
46 |
|
47 |
if ( isset( $_REQUEST['error'] ) ) {
|
48 |
|
49 |
-
echo '<h1>' .
|
50 |
|
51 |
-
$message =
|
52 |
|
53 |
wp_die( sprintf( '<div class="notice notice-error"><p>%s</p></div>', $message ) );
|
54 |
|
55 |
}
|
56 |
|
57 |
if ( isset( $_REQUEST['action'] ) ) {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
wpmtst_view_settings( $action, $id );
|
63 |
|
64 |
} else {
|
65 |
|
@@ -84,22 +83,22 @@ function wpmtst_views_admin() {
|
|
84 |
<ul class="subsubsub">
|
85 |
<li class="all"><a <?php echo (!isset($_GET['mode']) || $_GET['mode'] == 'all' ? 'class="current"' : '') ?> href="<?php echo add_query_arg( array('post_type' => 'wpm-testimonial', 'page' => 'testimonial-views', 'mode' => 'all' ), admin_url('edit.php') ) ?>"><?php esc_html_e( 'All', 'strong-testimonials' ); ?><?php printf( __( ' <span class="count">(%s)</span>', 'strong-testimonials' ), count($views) ); ?></a> |</li>
|
86 |
<?php foreach ($filters as $mode => $items): ?>
|
87 |
-
<li class="<?php echo $mode ?>"><a <?php echo (isset($_GET['mode']) && $_GET['mode'] == $mode ? 'class="current"' : '') ?> href="<?php echo add_query_arg( array('post_type' => 'wpm-testimonial', 'page' => 'testimonial-views', 'mode' => $mode ), admin_url('edit.php') ) ?>"><?php echo ucfirst($mode) ?><?php printf( __( ' <span class="count">(%s)</span>', 'strong-testimonials' ), count($items) ); ?></a> |</li>
|
88 |
<?php endforeach; ?>
|
89 |
</ul>
|
90 |
<?php
|
91 |
// Add button to clear sort value.
|
92 |
if ( isset( $_GET['orderby'] ) ) {
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
}
|
100 |
|
101 |
-
|
102 |
-
|
103 |
$views_table->display();
|
104 |
|
105 |
}
|
@@ -109,178 +108,6 @@ function wpmtst_views_admin() {
|
|
109 |
}
|
110 |
|
111 |
|
112 |
-
/**
|
113 |
-
* An individual view settings page.
|
114 |
-
*
|
115 |
-
* @since 1.21.0
|
116 |
-
*
|
117 |
-
* @param string $action
|
118 |
-
* @param null $view_id
|
119 |
-
*/
|
120 |
-
function wpmtst_view_settings( $action = '', $view_id = null ) {
|
121 |
-
|
122 |
-
$actions = array( 'edit', 'duplicate', 'add' );
|
123 |
-
if ( ! in_array( $action, $actions ) ) {
|
124 |
-
wp_die( __( 'Invalid request. Please try again.', 'strong-testimonials' ) );
|
125 |
-
}
|
126 |
-
|
127 |
-
if ( ( 'edit' == $action || 'duplicate' == $action ) && ! $view_id ) return;
|
128 |
-
|
129 |
-
global $view;
|
130 |
-
add_thickbox();
|
131 |
-
|
132 |
-
$fields = wpmtst_get_custom_fields();
|
133 |
-
$all_fields = wpmtst_get_all_fields();
|
134 |
-
|
135 |
-
$testimonials_list = get_posts( array(
|
136 |
-
'orderby' => 'post_date',
|
137 |
-
'order' => 'ASC',
|
138 |
-
'post_type' => 'wpm-testimonial',
|
139 |
-
'post_status' => 'publish',
|
140 |
-
'posts_per_page' => -1,
|
141 |
-
'suppress_filters' => true,
|
142 |
-
) );
|
143 |
-
|
144 |
-
$cat_count = wpmtst_get_cat_count();
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Show category filter if necessary.
|
148 |
-
*
|
149 |
-
* @since 2.2.0
|
150 |
-
*/
|
151 |
-
if ( $cat_count > 5 ) {
|
152 |
-
wp_enqueue_script( 'wpmtst-view-category-filter-script' );
|
153 |
-
}
|
154 |
-
|
155 |
-
$default_view = wpmtst_get_view_default();
|
156 |
-
|
157 |
-
if ( 'edit' == $action ) {
|
158 |
-
$view_array = wpmtst_get_view( $view_id );
|
159 |
-
$view = unserialize( $view_array['value'] );
|
160 |
-
$view_name = $view_array['name'];
|
161 |
-
} elseif ( 'duplicate' == $action ) {
|
162 |
-
$view_array = wpmtst_get_view( $view_id );
|
163 |
-
$view = unserialize( $view_array['value'] );
|
164 |
-
$view_id = 0;
|
165 |
-
$view_name = $view_array['name'] . ' - COPY';
|
166 |
-
} else {
|
167 |
-
$view_id = 1;
|
168 |
-
$view = $default_view;
|
169 |
-
$view_name = 'new';
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Attempt to repair bug from 2.28.2
|
174 |
-
*/
|
175 |
-
if ( ! isset( $view['pagination_settings']['end_size'] ) || ! $view['pagination_settings']['end_size'] ) {
|
176 |
-
$view['pagination_settings']['end_size'] = 1;
|
177 |
-
}
|
178 |
-
if ( ! isset( $view['pagination_settings']['mid_size'] ) || ! $view['pagination_settings']['mid_size'] ) {
|
179 |
-
$view['pagination_settings']['mid_size'] = 2;
|
180 |
-
}
|
181 |
-
if ( ! isset( $view['pagination_settings']['per_page'] ) || ! $view['pagination_settings']['per_page'] ) {
|
182 |
-
$view['pagination_settings']['per_page'] = 5;
|
183 |
-
}
|
184 |
-
|
185 |
-
$custom_list = apply_filters( 'wpmtst_custom_pages_list', array(), $view );
|
186 |
-
$pages_list = apply_filters( 'wpmtst_pages_list', wpmtst_get_pages() );
|
187 |
-
$posts_list = apply_filters( 'wpmtst_posts_list', wpmtst_get_posts() );
|
188 |
-
|
189 |
-
$view_options = apply_filters( 'wpmtst_view_options', get_option( 'wpmtst_view_options' ) );
|
190 |
-
|
191 |
-
// Select default template if necessary
|
192 |
-
if ( !$view['template'] ) {
|
193 |
-
if ( 'form' == $view['mode'] ) {
|
194 |
-
$view['template'] = 'default-form';
|
195 |
-
} else {
|
196 |
-
$view['template'] = 'default';
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
$view_cats_array = apply_filters( 'wpmtst_l10n_cats', explode( ',', $view['category'] ) );
|
201 |
-
|
202 |
-
// Assemble list of templates
|
203 |
-
$templates = array(
|
204 |
-
'display' => WPMST()->templates->get_templates( 'display' ),
|
205 |
-
'form' => WPMST()->templates->get_templates( 'form' ),
|
206 |
-
);
|
207 |
-
$template_keys = WPMST()->templates->get_template_keys();
|
208 |
-
$template_found = in_array( $view['template'], $template_keys );
|
209 |
-
|
210 |
-
// Get list of image sizes
|
211 |
-
$image_sizes = wpmtst_get_image_sizes();
|
212 |
-
|
213 |
-
$url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' );
|
214 |
-
$url1 = $url . '&action=add';
|
215 |
-
$url2 = $url . '&action=duplicate&id=' . $view_id;
|
216 |
-
?>
|
217 |
-
<h1>
|
218 |
-
<?php 'edit' == $action ? esc_html_e( 'Edit View', 'strong-testimonials' ) : esc_html_e( 'Add View', 'strong-testimonials' ); ?>
|
219 |
-
<a href="<?php echo esc_url( $url1 ); ?>" class="add-new-h2"><?php esc_html_e( 'Add New', 'strong-testimonials' ); ?></a>
|
220 |
-
<a href="<?php echo esc_url( $url ); ?>" class="add-new-h2"><?php esc_html_e( 'Return To List', 'strong-testimonials' ); ?></a>
|
221 |
-
<?php if ( 'edit' == $action ) : ?>
|
222 |
-
<a href="<?php echo esc_url( $url2 ); ?>" class="add-new-h2"><?php esc_html_e( 'Duplicate This View', 'strong-testimonials' ); ?></a>
|
223 |
-
<?php endif; ?>
|
224 |
-
</h1>
|
225 |
-
|
226 |
-
<form id="wpmtst-views-form" method="post" action="<?php echo admin_url( 'admin-post.php' ); ?>" autocomplete="off" enctype="multipart/form-data">
|
227 |
-
|
228 |
-
<?php wp_nonce_field( 'view_form_submit', 'view_form_nonce', true, true ); ?>
|
229 |
-
|
230 |
-
<input type="hidden" name="action" value="view_<?php echo esc_attr( $action ); ?>_form">
|
231 |
-
<input type="hidden" name="view[id]" value="<?php echo esc_attr( $view_id ); ?>">
|
232 |
-
<input type="hidden" name="view_original_mode" value="<?php echo esc_attr( $view['mode'] ); ?>">
|
233 |
-
<input type="hidden" name="view[data][_form_id]" value="<?php echo esc_attr( $view['form_id'] ); ?>">
|
234 |
-
|
235 |
-
<div class="table view-info">
|
236 |
-
<?php include( 'partials/views/view-name.php' ); ?>
|
237 |
-
<?php include( 'partials/views/view-shortcode.php' ); ?>
|
238 |
-
<?php include( 'partials/views/view-mode.php' ); ?>
|
239 |
-
</div>
|
240 |
-
|
241 |
-
<?php
|
242 |
-
$show_section = apply_filters('wpmtst_show_section', $view['mode']);
|
243 |
-
// TODO Generify both hook and include
|
244 |
-
do_action( 'wpmtst_view_editor_before_group_select' );
|
245 |
-
include( 'partials/views/group-query.php' );
|
246 |
-
do_action( 'wpmtst_view_editor_after_group_select' );
|
247 |
-
|
248 |
-
do_action( 'wpmtst_view_editor_before_group_slideshow' );
|
249 |
-
include( 'partials/views/group-slideshow.php' );
|
250 |
-
|
251 |
-
do_action( 'wpmtst_view_editor_before_group_fields' );
|
252 |
-
include( 'partials/views/group-fields.php' );
|
253 |
-
|
254 |
-
do_action( 'wpmtst_view_editor_before_group_form' );
|
255 |
-
include( 'partials/views/group-form.php' );
|
256 |
-
|
257 |
-
do_action( 'wpmtst_view_editor_before_group_extra' );
|
258 |
-
include( 'partials/views/group-extra.php' );
|
259 |
-
|
260 |
-
do_action( 'wpmtst_view_editor_before_group_style' );
|
261 |
-
include( 'partials/views/group-style.php' );
|
262 |
-
do_action( 'wpmtst_after_style_view_section' );
|
263 |
-
|
264 |
-
do_action( 'wpmtst_view_editor_before_group_compat' );
|
265 |
-
include( 'partials/views/group-compat.php' );
|
266 |
-
|
267 |
-
// For back-compat. General group no longer used.
|
268 |
-
do_action( 'wpmtst_view_editor_before_group_general' );
|
269 |
-
|
270 |
-
do_action( 'wpmtst_view_editor_after_groups' );
|
271 |
-
?>
|
272 |
-
|
273 |
-
<p class="wpmtst-submit">
|
274 |
-
<?php submit_button( '', 'primary', 'submit-form', false ); ?>
|
275 |
-
<?php submit_button( __( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?>
|
276 |
-
<?php submit_button( __( 'Restore Defaults', 'strong-testimonials' ), 'secondary', 'restore-defaults', false ); ?>
|
277 |
-
</p>
|
278 |
-
|
279 |
-
</form>
|
280 |
-
<?php
|
281 |
-
}
|
282 |
-
|
283 |
-
|
284 |
/**
|
285 |
* Process form POST after editing.
|
286 |
*
|
@@ -503,16 +330,16 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
|
|
503 |
|
504 |
// TODO Move this to view defaults option.
|
505 |
$types = array(
|
506 |
-
'text' =>
|
507 |
-
'link' =>
|
508 |
-
'link2' =>
|
509 |
-
'date' =>
|
510 |
-
'category' =>
|
511 |
-
'rating' =>
|
512 |
-
'platform' =>
|
513 |
-
'shortcode' =>
|
514 |
-
'checkbox' =>
|
515 |
-
'video' =>
|
516 |
);
|
517 |
|
518 |
if ( isset( $custom_fields[ $field['field'] ] ) ) {
|
@@ -533,24 +360,24 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
|
|
533 |
$label_class = 'error';
|
534 |
}
|
535 |
?>
|
536 |
-
<div id="field-<?php echo $key; ?>" class="field2">
|
537 |
|
538 |
-
<div class="field3" data-key="<?php echo $key; ?>">
|
539 |
|
540 |
-
<div class="link" title="<?php
|
541 |
|
542 |
-
<a href="#" class="field-description <?php echo $label_class; ?>"><?php echo $field_label; ?></a>
|
543 |
|
544 |
<div class="controls2 left">
|
545 |
<span class="handle ui-sortable-handle icon-wrap"
|
546 |
-
title="<?php
|
547 |
<span class="delete icon-wrap"
|
548 |
-
title="<?php
|
549 |
</div>
|
550 |
|
551 |
<div class="controls2 right">
|
552 |
<span class="toggle icon-wrap"
|
553 |
-
title="<?php
|
554 |
</div>
|
555 |
|
556 |
</div>
|
@@ -559,19 +386,19 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
|
|
559 |
|
560 |
<!-- FIELD NAME -->
|
561 |
<div class="field-property field-name">
|
562 |
-
<label for="client_section_<?php echo $key; ?>_field">
|
563 |
-
<?php
|
564 |
</label>
|
565 |
-
<select id="client_section_<?php echo $key; ?>_field" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][field]" class="first-field">
|
566 |
-
<option value="">— select a field —</option>
|
567 |
|
568 |
<?php foreach ( $all_fields as $group_name => $group ) : ?>
|
569 |
-
<optgroup label="<?php echo $group_name; ?>">
|
570 |
|
571 |
<?php foreach ( $group as $key2 => $field2 ) : ?>
|
572 |
<?php if ( in_array( $field2['record_type'], $allowed ) && 'email' != $field2['input_type'] ) : ?>
|
573 |
-
<option value="<?php echo $field2['name']; ?>" data-type="<?php echo $field2['input_type']; ?>"
|
574 |
-
<?php selected( $field2['name'], $field['field'] ); ?>><?php
|
575 |
<?php endif; ?>
|
576 |
<?php endforeach; ?>
|
577 |
|
@@ -582,12 +409,12 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
|
|
582 |
|
583 |
<!-- FIELD TYPE -->
|
584 |
<div class="field-property field-type field-dep" <?php if ( $adding || in_array($field['type'], array('checkbox', 'video') ) ) echo ' style="display: none;"'; ?>>
|
585 |
-
<label for="client_section_<?php echo $key; ?>_type">
|
586 |
-
<?php
|
587 |
</label>
|
588 |
-
<select id="client_section_<?php echo $key; ?>_type" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][type]" <?php echo ($field['type'] == 'checkbox' ? 'readonly' : '') ?>>
|
589 |
<?php foreach ( $types as $type => $type_label ) : ?>
|
590 |
-
<option value="<?php echo $type; ?>" <?php selected( $type, $field['type'] ); ?> <?php echo(in_array($type, array('checkbox', 'video')) ? 'style="display:none"' : '') ?>><?php
|
591 |
<?php endforeach; ?>
|
592 |
</select>
|
593 |
</div>
|
@@ -612,18 +439,18 @@ function wpmtst_view_field_inputs( $key, $field, $adding = false, $source = 'vie
|
|
612 |
|
613 |
<!-- FIELD BEFORE -->
|
614 |
<div class="field-property field-before field-dep" <?php if ( $adding ) echo ' style="display: none;"'; ?>>
|
615 |
-
<label for="client_section_<?php echo $key; ?>_before">
|
616 |
-
<?php
|
617 |
</label>
|
618 |
-
<input id="client_section_<?php echo $key; ?>_before" type="text" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][before]" value="<?php echo isset( $field['before'] ) ? $field['before'] : ''; ?>">
|
619 |
</div>
|
620 |
|
621 |
<!-- FIELD CSS CLASS -->
|
622 |
<div class="field-property field-css field-dep" <?php if ( $adding ) echo ' style="display: none;"'; ?>>
|
623 |
-
<label for="client_section_<?php echo $key; ?>_class">
|
624 |
-
<?php
|
625 |
</label>
|
626 |
-
<input id="client_section_<?php echo $key; ?>_class" type="text" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][class]" value="<?php echo $field['class']; ?>">
|
627 |
</div>
|
628 |
|
629 |
</div>
|
@@ -668,34 +495,34 @@ function wpmtst_view_field_link( $key, $field_name, $type, $field, $adding = fal
|
|
668 |
|
669 |
<?php // the link text ?>
|
670 |
<div class="flex">
|
671 |
-
<label for="view-fieldtext<?php echo $key; ?>"><?php
|
672 |
-
<select id="view-fieldtext<?php echo $key; ?>" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][link_text]" class="if selectgroup">
|
673 |
-
<option value="value" <?php selected( $field['link_text'], 'value' ); ?>><?php
|
674 |
-
<option value="label" <?php selected( $field['link_text'], 'label' ); ?>><?php
|
675 |
-
<option value="custom" <?php selected( $field['link_text'], 'custom' ); ?>><?php
|
676 |
</select>
|
677 |
</div>
|
678 |
|
679 |
<?php // the link text options ?>
|
680 |
<?php // use the field label ?>
|
681 |
-
<div class="flex then_fieldtext<?php echo $key; ?> then_label then_not_value then_not_custom" style="display: none;">
|
682 |
<div class="nolabel"> </div>
|
683 |
-
<input type="text" id="view-fieldtext<?php echo $key; ?>-label" value="<?php echo $field['label']; ?>" readonly>
|
684 |
</div>
|
685 |
<?php // use custom text ?>
|
686 |
-
<div class="flex then_fieldtext<?php echo $key; ?> then_custom then_not_value then_not_label" style="display: none;">
|
687 |
<div class="nolabel"> </div>
|
688 |
-
<input type="text" id="view-fieldtext<?php echo $key; ?>-custom" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][link_text_custom]" value="<?php echo $field['link_text_custom']; ?>">
|
689 |
</div>
|
690 |
|
691 |
<?php // the URL ?>
|
692 |
<?php if ( 'link' == $type ) : // URL = another field ?>
|
693 |
<div class="flex">
|
694 |
-
<label for="view-fieldurl<?php echo $key; ?>"><?php
|
695 |
-
<select id="view-fieldurl<?php echo $key; ?>" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][url]" class="field-type-select">
|
696 |
<?php foreach ( $custom_fields as $key2 => $field2 ) : ?>
|
697 |
<?php if ( 'url' == $field2['input_type'] ) : ?>
|
698 |
-
<option value="<?php echo $field2['name']; ?>" <?php selected( $field2['name'], $field['url'] ); ?>><?php echo $field2['name']; ?></option>
|
699 |
<?php endif; ?>
|
700 |
<?php endforeach; ?>
|
701 |
</select>
|
@@ -704,17 +531,15 @@ function wpmtst_view_field_link( $key, $field_name, $type, $field, $adding = fal
|
|
704 |
<?php // the URL options ?>
|
705 |
<div class="nolabel"></div>
|
706 |
<div class="new_tab">
|
707 |
-
<input type="checkbox" id="view-fieldurl<?php echo $key; ?>-newtab"
|
708 |
-
|
709 |
-
|
710 |
-
<label for="view-fieldurl<?php echo $key; ?>-newtab">
|
711 |
-
<?php _e( 'new tab', 'strong-testimonials' ); ?>
|
712 |
</label>
|
713 |
</div>
|
714 |
|
715 |
</div>
|
716 |
<?php else : // URL = this field ?>
|
717 |
-
<input type="hidden" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][url]" value="<?php echo $field['name']; ?>">
|
718 |
<?php endif; ?>
|
719 |
|
720 |
<?php
|
@@ -733,15 +558,15 @@ function wpmtst_view_field_link( $key, $field_name, $type, $field, $adding = fal
|
|
733 |
function wpmtst_view_field_date( $key, $field, $adding = false, $source = 'view[data]' ) {
|
734 |
?>
|
735 |
<div class="flex">
|
736 |
-
<label for="view-<?php echo $key; ?>-client-date-format"><span><?php
|
737 |
-
<input id="view-<?php echo $key; ?>-client-date-format" type="text" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][format]" class="field-type-date" value="<?php echo isset( $field['format'] ) ? $field['format'] : ''; ?>">
|
738 |
</div>
|
739 |
<div class="flex">
|
740 |
<div class="nolabel"> </div>
|
741 |
<div class="help minor">
|
742 |
<?php printf( '<a href="%s" target="_blank">%s</a>',
|
743 |
esc_url( 'https://codex.wordpress.org/Formatting_Date_and_Time' ),
|
744 |
-
|
745 |
</div>
|
746 |
</div>
|
747 |
<?php
|
@@ -785,35 +610,35 @@ function wpmtst_view_field_checkbox( $key, $field, $adding = false, $source = 'v
|
|
785 |
}
|
786 |
?>
|
787 |
<div class="flex">
|
788 |
-
<label for="client_section_<?php
|
789 |
-
<select id="client_section_<?php echo $key; ?>_label" name="<?php echo $source ?>[client_section][<?php echo $key; ?>][label]" class="field-label-select">
|
790 |
-
|
791 |
-
|
792 |
</select>
|
793 |
</div>
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
<?php
|
818 |
}
|
819 |
|
@@ -860,7 +685,7 @@ function wpmtst_category_checklist( $view_cats_array ) {
|
|
860 |
<div class="view-category-list-panel short-panel">
|
861 |
<div class="fc-search-wrap">
|
862 |
<input type="search" class="fc-search-field"
|
863 |
-
placeholder="<?php
|
864 |
</div>
|
865 |
<ul class="view-category-list">
|
866 |
<?php $args = array(
|
@@ -888,7 +713,7 @@ function wpmtst_form_category_checklist( $view_cats_array ) {
|
|
888 |
<div class="view-category-list-panel short-panel">
|
889 |
<div class="fc-search-wrap">
|
890 |
<input type="search" class="fc-search-field"
|
891 |
-
placeholder="<?php
|
892 |
</div>
|
893 |
<ul class="view-category-list">
|
894 |
<?php $args = array(
|
32 |
$result = filter_input( INPUT_GET, 'result', FILTER_SANITIZE_STRING );
|
33 |
|
34 |
$result_messages = array(
|
35 |
+
'cancelled' => esc_html__( 'Changes cancelled.', 'strong-testimonials' ),
|
36 |
+
'defaults-restored' => esc_html__( 'Defaults restored.', 'strong-testimonials' ),
|
37 |
+
'view-saved' => esc_html__( 'View saved.', 'strong-testimonials' ),
|
38 |
+
'view-deleted' => esc_html__( 'View deleted.', 'strong-testimonials' ),
|
39 |
);
|
40 |
|
41 |
if ( in_array( $result, array_keys( $result_messages ) ) ) {
|
42 |
+
printf( '<div class="notice notice-success is-dismissible"><p>%s</p></div>', esc_html( $result_messages[ $result ] ) );
|
43 |
}
|
44 |
|
45 |
}
|
46 |
|
47 |
if ( isset( $_REQUEST['error'] ) ) {
|
48 |
|
49 |
+
echo '<h1>' . esc_html__( 'Edit View', 'strong-testimonials' ) . '</h1>';
|
50 |
|
51 |
+
$message = esc_html__( 'An error occurred.', 'strong-testimonials' );
|
52 |
|
53 |
wp_die( sprintf( '<div class="notice notice-error"><p>%s</p></div>', $message ) );
|
54 |
|
55 |
}
|
56 |
|
57 |
if ( isset( $_REQUEST['action'] ) ) {
|
58 |
+
global $view;
|
59 |
+
$view = Strong_Testimonials_Helper::get_view();
|
60 |
+
$sections = new Strong_Testimonials_Helper();
|
61 |
+
$sections->render_form();
|
|
|
62 |
|
63 |
} else {
|
64 |
|
83 |
<ul class="subsubsub">
|
84 |
<li class="all"><a <?php echo (!isset($_GET['mode']) || $_GET['mode'] == 'all' ? 'class="current"' : '') ?> href="<?php echo add_query_arg( array('post_type' => 'wpm-testimonial', 'page' => 'testimonial-views', 'mode' => 'all' ), admin_url('edit.php') ) ?>"><?php esc_html_e( 'All', 'strong-testimonials' ); ?><?php printf( __( ' <span class="count">(%s)</span>', 'strong-testimonials' ), count($views) ); ?></a> |</li>
|
85 |
<?php foreach ($filters as $mode => $items): ?>
|
86 |
+
<li class="<?php echo esc_attr( $mode ) ?>"><a <?php echo (isset($_GET['mode']) && $_GET['mode'] == $mode ? 'class="current"' : '') ?> href="<?php echo add_query_arg( array('post_type' => 'wpm-testimonial', 'page' => 'testimonial-views', 'mode' => $mode ), admin_url('edit.php') ) ?>"><?php echo esc_html( ucfirst($mode) ) ?><?php printf( __( ' <span class="count">(%s)</span>', 'strong-testimonials' ), count($items) ); ?></a> |</li>
|
87 |
<?php endforeach; ?>
|
88 |
</ul>
|
89 |
<?php
|
90 |
// Add button to clear sort value.
|
91 |
if ( isset( $_GET['orderby'] ) ) {
|
92 |
+
?>
|
93 |
+
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post" style="margin-bottom: 4px;">
|
94 |
+
<input type="hidden" name="action" value="clear-view-sort">
|
95 |
+
<input type="submit" value="clear sort" class="button">
|
96 |
+
</form>
|
97 |
+
<?php
|
98 |
}
|
99 |
|
100 |
+
// Display the table
|
101 |
+
$views_table->prepare_list(wpmtst_unserialize_views( $views ) );
|
102 |
$views_table->display();
|
103 |
|
104 |
}
|
108 |
}
|
109 |
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
/**
|
112 |
* Process form POST after editing.
|
113 |
*
|
330 |
|
331 |
// TODO Move this to view defaults option.
|
332 |
$types = array(
|
333 |
+
'text' => esc_html__( 'text', 'strong-testimonials' ),
|
334 |
+
'link' => esc_html__( 'link with another field', 'strong-testimonials' ), // the original link type
|
335 |
+
'link2' => esc_html__( 'link (must be URL type)', 'strong-testimonials' ), // @since 1.24.0
|
336 |
+
'date' => esc_html__( 'date', 'strong-testimonials' ),
|
337 |
+
'category' => esc_html__( 'category', 'strong-testimonials' ),
|
338 |
+
'rating' => esc_html__( 'rating', 'strong-testimonials' ),
|
339 |
+
'platform' => esc_html__( 'platform', 'strong-testimonials' ),
|
340 |
+
'shortcode' => esc_html__( 'shortcode', 'strong-testimonials' ),
|
341 |
+
'checkbox' => esc_html__('checkbox', 'strong-testimonials'),
|
342 |
+
'video' => esc_html__('video', 'strong-testimonials')
|
343 |
);
|
344 |
|
345 |
if ( isset( $custom_fields[ $field['field'] ] ) ) {
|
360 |
$label_class = 'error';
|
361 |
}
|
362 |
?>
|
363 |
+
<div id="field-<?php echo esc_attr( $key ); ?>" class="field2">
|
364 |
|
365 |
+
<div class="field3" data-key="<?php echo esc_attr( $key ); ?>">
|
366 |
|
367 |
+
<div class="link" title="<?php esc_html_e( 'click to open or close', 'strong-testimonials' ); ?>">
|
368 |
|
369 |
+
<a href="#" class="field-description <?php echo esc_attr( $label_class ); ?>"><?php echo esc_html( $field_label ); ?></a>
|
370 |
|
371 |
<div class="controls2 left">
|
372 |
<span class="handle ui-sortable-handle icon-wrap"
|
373 |
+
title="<?php esc_html_e( 'drag and drop to reorder', 'strong-testimonials' ); ?>"></span>
|
374 |
<span class="delete icon-wrap"
|
375 |
+
title="<?php esc_html_e( 'remove this field', 'strong-testimonials' ); ?>"></span>
|
376 |
</div>
|
377 |
|
378 |
<div class="controls2 right">
|
379 |
<span class="toggle icon-wrap"
|
380 |
+
title="<?php esc_html_e( 'click to open or close', 'strong-testimonials' ); ?>"></span>
|
381 |
</div>
|
382 |
|
383 |
</div>
|
386 |
|
387 |
<!-- FIELD NAME -->
|
388 |
<div class="field-property field-name">
|
389 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_field">
|
390 |
+
<?php esc_html_e( 'Name', 'strong-testimonials' ); ?>
|
391 |
</label>
|
392 |
+
<select id="client_section_<?php echo esc_attr( $key ); ?>_field" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][field]" class="first-field">
|
393 |
+
<option value="">— <?php esc_html_e( 'select a field', 'strong-testimonials' ); ?> —</option>
|
394 |
|
395 |
<?php foreach ( $all_fields as $group_name => $group ) : ?>
|
396 |
+
<optgroup label="<?php echo esc_attr( $group_name ); ?>">
|
397 |
|
398 |
<?php foreach ( $group as $key2 => $field2 ) : ?>
|
399 |
<?php if ( in_array( $field2['record_type'], $allowed ) && 'email' != $field2['input_type'] ) : ?>
|
400 |
+
<option value="<?php echo esc_attr( $field2['name'] ); ?>" data-type="<?php echo esc_attr( $field2['input_type'] ); ?>"
|
401 |
+
<?php selected( $field2['name'], $field['field'] ); ?>><?php esc_html_e( $field2['name'] ); ?></option>
|
402 |
<?php endif; ?>
|
403 |
<?php endforeach; ?>
|
404 |
|
409 |
|
410 |
<!-- FIELD TYPE -->
|
411 |
<div class="field-property field-type field-dep" <?php if ( $adding || in_array($field['type'], array('checkbox', 'video') ) ) echo ' style="display: none;"'; ?>>
|
412 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_type">
|
413 |
+
<?php esc_html_e( 'Display Type', 'strong-testimonials' ); ?>
|
414 |
</label>
|
415 |
+
<select id="client_section_<?php echo esc_attr( $key ); ?>_type" name="<?php echo esc_attr( $source )?>[client_section][<?php echo esc_attr( $key ); ?>][type]" <?php echo ($field['type'] == 'checkbox' ? 'readonly' : '') ?>>
|
416 |
<?php foreach ( $types as $type => $type_label ) : ?>
|
417 |
+
<option value="<?php echo esc_attr( $type ); ?>" <?php selected( $type, $field['type'] ); ?> <?php echo(in_array($type, array('checkbox', 'video')) ? 'style="display:none"' : '') ?>><?php esc_html_e( $type_label ); ?></option>
|
418 |
<?php endforeach; ?>
|
419 |
</select>
|
420 |
</div>
|
439 |
|
440 |
<!-- FIELD BEFORE -->
|
441 |
<div class="field-property field-before field-dep" <?php if ( $adding ) echo ' style="display: none;"'; ?>>
|
442 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_before">
|
443 |
+
<?php esc_html_e( 'Before', 'strong-testimonials' ); ?>
|
444 |
</label>
|
445 |
+
<input id="client_section_<?php echo esc_attr( $key ); ?>_before" type="text" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][before]" value="<?php echo isset( $field['before'] ) ? esc_attr($field['before']) : ''; ?>">
|
446 |
</div>
|
447 |
|
448 |
<!-- FIELD CSS CLASS -->
|
449 |
<div class="field-property field-css field-dep" <?php if ( $adding ) echo ' style="display: none;"'; ?>>
|
450 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_class">
|
451 |
+
<?php esc_html_e( 'CSS Class', 'strong-testimonials' ); ?>
|
452 |
</label>
|
453 |
+
<input id="client_section_<?php echo esc_attr( $key ); ?>_class" type="text" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][class]" value="<?php echo esc_attr( $field['class' ] ); ?>">
|
454 |
</div>
|
455 |
|
456 |
</div>
|
495 |
|
496 |
<?php // the link text ?>
|
497 |
<div class="flex">
|
498 |
+
<label for="view-fieldtext<?php echo esc_attr( $key ); ?>"><?php esc_html_e( 'Link Text', 'strong-testimonials' ); ?></label>
|
499 |
+
<select id="view-fieldtext<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][link_text]" class="if selectgroup">
|
500 |
+
<option value="value" <?php selected( $field['link_text'], 'value' ); ?>><?php esc_html_e( "this field's value", 'strong-testimonials' ); ?></option>
|
501 |
+
<option value="label" <?php selected( $field['link_text'], 'label' ); ?>><?php esc_html_e( "this field's label", 'strong-testimonials' ); ?></option>
|
502 |
+
<option value="custom" <?php selected( $field['link_text'], 'custom' ); ?>><?php esc_html_e( 'custom text', 'strong-testimonials' ); ?></option>
|
503 |
</select>
|
504 |
</div>
|
505 |
|
506 |
<?php // the link text options ?>
|
507 |
<?php // use the field label ?>
|
508 |
+
<div class="flex then_fieldtext<?php echo esc_attr( $key ); ?> then_label then_not_value then_not_custom" style="display: none;">
|
509 |
<div class="nolabel"> </div>
|
510 |
+
<input type="text" id="view-fieldtext<?php echo esc_attr( $key ); ?>-label" value="<?php echo esc_attr( $field['label'] ); ?>" readonly>
|
511 |
</div>
|
512 |
<?php // use custom text ?>
|
513 |
+
<div class="flex then_fieldtext<?php echo esc_attr( $key ); ?> then_custom then_not_value then_not_label" style="display: none;">
|
514 |
<div class="nolabel"> </div>
|
515 |
+
<input type="text" id="view-fieldtext<?php echo esc_attr( $key ); ?>-custom" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][link_text_custom]" value="<?php echo esc_attr( $field['link_text_custom'] ); ?>">
|
516 |
</div>
|
517 |
|
518 |
<?php // the URL ?>
|
519 |
<?php if ( 'link' == $type ) : // URL = another field ?>
|
520 |
<div class="flex">
|
521 |
+
<label for="view-fieldurl<?php echo esc_attr( $key ); ?>"><?php esc_html_e( 'URL Field', 'strong-testimonials' ); ?></label>
|
522 |
+
<select id="view-fieldurl<?php echo esc_attr( $key ); ?>" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][url]" class="field-type-select">
|
523 |
<?php foreach ( $custom_fields as $key2 => $field2 ) : ?>
|
524 |
<?php if ( 'url' == $field2['input_type'] ) : ?>
|
525 |
+
<option value="<?php echo esc_attr( $field2['name'] ); ?>" <?php selected( $field2['name'], $field['url'] ); ?>><?php echo esc_html( $field2['name'] ); ?></option>
|
526 |
<?php endif; ?>
|
527 |
<?php endforeach; ?>
|
528 |
</select>
|
531 |
<?php // the URL options ?>
|
532 |
<div class="nolabel"></div>
|
533 |
<div class="new_tab">
|
534 |
+
<input type="checkbox" id="view-fieldurl<?php echo esc_attr( $key ); ?>-newtab" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][new_tab]" value="1" <?php checked( $field['new_tab'] ); ?>>
|
535 |
+
<label for="view-fieldurl<?php echo esc_attr( $key ); ?>-newtab">
|
536 |
+
<?php esc_html_e( 'new tab', 'strong-testimonials' ); ?>
|
|
|
|
|
537 |
</label>
|
538 |
</div>
|
539 |
|
540 |
</div>
|
541 |
<?php else : // URL = this field ?>
|
542 |
+
<input type="hidden" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][url]" value="<?php echo esc_attr( $field['name'] ); ?>">
|
543 |
<?php endif; ?>
|
544 |
|
545 |
<?php
|
558 |
function wpmtst_view_field_date( $key, $field, $adding = false, $source = 'view[data]' ) {
|
559 |
?>
|
560 |
<div class="flex">
|
561 |
+
<label for="view-<?php echo esc_attr( $key ); ?>-client-date-format"><span><?php esc_html_e( 'Format', 'strong-testimonials' ); ?></span></label>
|
562 |
+
<input id="view-<?php echo esc_attr( $key ); ?>-client-date-format" type="text" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][format]" class="field-type-date" value="<?php echo isset( $field['format'] ) ? esc_attr($field['format']) : ''; ?>">
|
563 |
</div>
|
564 |
<div class="flex">
|
565 |
<div class="nolabel"> </div>
|
566 |
<div class="help minor">
|
567 |
<?php printf( '<a href="%s" target="_blank">%s</a>',
|
568 |
esc_url( 'https://codex.wordpress.org/Formatting_Date_and_Time' ),
|
569 |
+
esc_html__( 'more about date formats', 'strong-testimonials' ) ); ?>
|
570 |
</div>
|
571 |
</div>
|
572 |
<?php
|
610 |
}
|
611 |
?>
|
612 |
<div class="flex">
|
613 |
+
<label for="client_section_<?php esc_attr( $key ); ?>_label"><?php esc_html_e( 'Label', 'strong-testimonials' ); ?></label>
|
614 |
+
<select id="client_section_<?php echo esc_attr( $key ); ?>_label" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][label]" class="field-label-select">
|
615 |
+
<option value="label" <?php selected( $field['label'], 'label' ); ?>><?php esc_html_e( 'Field label', 'strong-testimonials' ); ?></option>
|
616 |
+
<option value="custom" <?php selected( $field['label'], 'custom' ); ?>><?php esc_html_e( 'Custom label', 'strong-testimonials' ); ?></option>
|
617 |
</select>
|
618 |
</div>
|
619 |
+
<div class="field-property field-before field-dep">
|
620 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_custom_label"></label>
|
621 |
+
<input id="client_section_<?php echo esc_attr( $key ); ?>_custom_label" class="client_section_field_label" attr-defaultValue="<?php echo wpmtst_get_field_label( $field ) ?>" type="text" name="<?php echo esc_attr( $source ) ?>[client_section][<?php echo esc_attr( $key ); ?>][custom_label]" value="<?php echo esc_attr( $label ) ?>" <?php echo ($field['label'] == 'label' ? 'readonly' : '') ?>>
|
622 |
+
</div>
|
623 |
+
<div class="field-property field-before field-dep">
|
624 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_checked_value">
|
625 |
+
<?php esc_html_e( 'Checked Value', 'strong-testimonials' ); ?>
|
626 |
+
</label>
|
627 |
+
<select id="client_section_<?php echo esc_attr( $key ); ?>_checked_value" name="<?php echo esc_attr( $source ); ?>[client_section][<?php echo esc_attr( $key ); ?>][checked_value]" class="field-checked-select">
|
628 |
+
<option value="value" <?php selected( $field['checked_value'], 'value' ); ?>><?php esc_html_e( 'Checked value', 'strong-testimonials' ); ?></option>
|
629 |
+
<option value="custom" <?php selected( $field['checked_value'], 'custom' ); ?>><?php esc_html_e( 'Custom value', 'strong-testimonials' ); ?></option>
|
630 |
+
</select>
|
631 |
+
</div>
|
632 |
+
<div class="field-property field-before field-dep">
|
633 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_checked_value_custom"></label>
|
634 |
+
<input id="client_section_<?php echo esc_attr( $key ); ?>_checked_value_custom" class="client_section_field_checked_value" attr-defaultValue="<?php echo esc_attr(wpmtst_get_field_text( $field )); ?>" type="text" name="<?php echo esc_attr( $source ); ?>[client_section][<?php echo esc_attr( $key ); ?>][checked_value_custom]" value="<?php echo esc_attr( $checked_value ) ?>" <?php echo ($field['checked_value'] == 'value' ? 'readonly' : '') ?>>
|
635 |
+
</div>
|
636 |
+
<div class="field-property field-before field-dep">
|
637 |
+
<label for="client_section_<?php echo esc_attr( $key ); ?>_unchecked_value">
|
638 |
+
<?php esc_html_e( 'Unchecked Value', 'strong-testimonials' ); ?>
|
639 |
+
</label>
|
640 |
+
<input id="client_section_<?php echo esc_attr( $key ); ?>_unchecked_value" type="text" name="<?php echo esc_attr( $source ); ?>[client_section][<?php echo esc_attr( $key ); ?>][unchecked_value]" value="<?php echo isset( $field['unchecked_value'] ) ? esc_attr($field['unchecked_value']) : ''; ?>">
|
641 |
+
</div>
|
642 |
<?php
|
643 |
}
|
644 |
|
685 |
<div class="view-category-list-panel short-panel">
|
686 |
<div class="fc-search-wrap">
|
687 |
<input type="search" class="fc-search-field"
|
688 |
+
placeholder="<?php esc_attr_e( 'filter categories', 'strong-testimonials' ); ?>"/>
|
689 |
</div>
|
690 |
<ul class="view-category-list">
|
691 |
<?php $args = array(
|
713 |
<div class="view-category-list-panel short-panel">
|
714 |
<div class="fc-search-wrap">
|
715 |
<input type="search" class="fc-search-field"
|
716 |
+
placeholder="<?php esc_html_e( 'filter categories', 'strong-testimonials' ); ?>"/>
|
717 |
</div>
|
718 |
<ul class="view-category-list">
|
719 |
<?php $args = array(
|
assets/js/blocks-js.js
CHANGED
@@ -1,451 +1,519 @@
|
|
1 |
-
/******/ (function(modules) {
|
2 |
-
|
3 |
-
/******/
|
4 |
-
/******/
|
5 |
-
/******/
|
6 |
-
/******/
|
7 |
-
/******/
|
8 |
-
/******/
|
9 |
-
/******/
|
10 |
-
/******/
|
11 |
-
/******/
|
12 |
-
|
13 |
-
/******/
|
14 |
-
/******/
|
15 |
-
/******/
|
16 |
-
/******/
|
17 |
-
/******/
|
18 |
-
|
19 |
-
/******/
|
20 |
-
/******/
|
21 |
-
/******/
|
22 |
-
/******/
|
23 |
-
/******/
|
24 |
-
/******/
|
25 |
-
/******/
|
26 |
-
|
27 |
-
/******/
|
28 |
-
/******/
|
29 |
-
/******/
|
30 |
-
/******/
|
31 |
-
/******/
|
32 |
-
/******/
|
33 |
-
/******/
|
34 |
-
|
35 |
-
|
36 |
-
/******/
|
37 |
-
/******/
|
38 |
-
/******/
|
39 |
-
/******/
|
40 |
-
/******/
|
41 |
-
/******/
|
42 |
-
/******/
|
43 |
-
/******/
|
44 |
-
|
45 |
-
/******/
|
46 |
-
/******/ });
|
47 |
-
/******/ }
|
48 |
-
/******/ };
|
49 |
-
/******/
|
50 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
51 |
-
/******/ __webpack_require__.n = function(module) {
|
52 |
-
/******/ var getter = module && module.__esModule ?
|
53 |
-
/******/ function getDefault() { return module['default']; } :
|
54 |
-
/******/ function getModuleExports() { return module; };
|
55 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
56 |
-
/******/ return getter;
|
57 |
-
/******/ };
|
58 |
-
/******/
|
59 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
60 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61 |
-
/******/
|
62 |
-
/******/ // __webpack_public_path__
|
63 |
-
/******/ __webpack_require__.p = "";
|
64 |
-
/******/
|
65 |
-
/******/ // Load entry module and return exports
|
66 |
-
/******/ return __webpack_require__(__webpack_require__.s = 4);
|
67 |
-
/******/ })
|
68 |
-
/************************************************************************/
|
69 |
-
/******/ ([
|
70 |
-
/* 0 */
|
71 |
-
/***/ (function(module, exports, __webpack_require__) {
|
72 |
-
|
73 |
-
"use strict";
|
74 |
-
|
75 |
-
|
76 |
-
Object.defineProperty(exports, "__esModule", {
|
77 |
-
value: true
|
78 |
-
});
|
79 |
-
|
80 |
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
81 |
-
|
82 |
-
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; }; }();
|
83 |
-
|
84 |
-
var _inspector = __webpack_require__(5);
|
85 |
-
|
86 |
-
var _inspector2 = _interopRequireDefault(_inspector);
|
87 |
-
|
88 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
89 |
-
|
90 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
91 |
-
|
92 |
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
93 |
-
|
94 |
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Wordpress deps
|
98 |
-
*/
|
99 |
-
|
100 |
-
var __ = wp.i18n.__;
|
101 |
-
var _wp$element = wp.element,
|
102 |
-
Component = _wp$element.Component,
|
103 |
-
Fragment = _wp$element.Fragment;
|
104 |
-
var withSelect = wp.data.withSelect;
|
105 |
-
var _wp$components = wp.components,
|
106 |
-
SelectControl = _wp$components.SelectControl,
|
107 |
-
Spinner = _wp$components.Spinner,
|
108 |
-
Toolbar = _wp$components.Toolbar,
|
109 |
-
Button = _wp$components.Button;
|
110 |
-
var BlockControls = wp.blockEditor.BlockControls;
|
111 |
-
|
112 |
-
var StrongTestimonialViewEdit = function (_Component) {
|
113 |
-
_inherits(StrongTestimonialViewEdit, _Component);
|
114 |
-
|
115 |
-
function StrongTestimonialViewEdit(props) {
|
116 |
-
_classCallCheck(this, StrongTestimonialViewEdit);
|
117 |
-
|
118 |
-
var _this = _possibleConstructorReturn(this, (StrongTestimonialViewEdit.__proto__ || Object.getPrototypeOf(StrongTestimonialViewEdit)).apply(this, arguments));
|
119 |
-
|
120 |
-
_this.props.attributes.status = 'ready';
|
121 |
-
_this.props.attributes.views = st_views.views;
|
122 |
-
return _this;
|
123 |
-
}
|
124 |
-
|
125 |
-
_createClass(StrongTestimonialViewEdit, [{
|
126 |
-
key: 'onIdChange',
|
127 |
-
value: function onIdChange(id) {
|
128 |
-
this.props.setAttributes({ status: 'ready', id: id, views: st_views.views });
|
129 |
}
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
var
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
var
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
var
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
null,
|
168 |
-
|
169 |
-
'div',
|
170 |
-
{ className: 'st-block-preview' },
|
171 |
React.createElement(
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
React.createElement(
|
175 |
'div',
|
176 |
-
{ className: 'st-block-
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
180 |
)
|
181 |
-
|
182 |
-
|
183 |
-
}
|
184 |
|
185 |
-
|
186 |
-
Fragment,
|
187 |
-
null,
|
188 |
-
React.createElement(_inspector2.default, _extends({ onIdChange: function onIdChange(id) {
|
189 |
-
return _this2.onIdChange(id);
|
190 |
-
} }, this.props)),
|
191 |
-
React.createElement(
|
192 |
-
'div',
|
193 |
-
{ className: 'st-block-preview' },
|
194 |
React.createElement(
|
195 |
-
|
196 |
-
|
197 |
-
React.createElement(
|
198 |
-
|
199 |
-
|
200 |
-
null,
|
201 |
-
React.createElement(
|
202 |
-
'h6',
|
203 |
-
null,
|
204 |
-
__("You don't seem to have any views.")
|
205 |
-
),
|
206 |
-
React.createElement(
|
207 |
-
Button,
|
208 |
{
|
209 |
-
|
210 |
-
|
211 |
-
|
|
|
212 |
},
|
213 |
-
|
214 |
)
|
215 |
),
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
React.createElement(
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
)
|
237 |
)
|
238 |
)
|
239 |
-
|
240 |
-
)
|
241 |
-
}
|
242 |
-
}]);
|
243 |
-
|
244 |
-
return StrongTestimonialViewEdit;
|
245 |
-
}(Component);
|
246 |
-
|
247 |
-
exports.default = StrongTestimonialViewEdit;
|
248 |
-
|
249 |
-
/***/ }),
|
250 |
-
/* 1 */,
|
251 |
-
/* 2 */,
|
252 |
-
/* 3 */,
|
253 |
-
/* 4 */
|
254 |
-
/***/ (function(module, exports, __webpack_require__) {
|
255 |
-
|
256 |
-
"use strict";
|
257 |
-
|
258 |
-
|
259 |
-
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; }; }();
|
260 |
-
|
261 |
-
var _edit = __webpack_require__(0);
|
262 |
-
|
263 |
-
var _edit2 = _interopRequireDefault(_edit);
|
264 |
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
|
267 |
-
function _classCallCheck(instance, Constructor) {
|
|
|
|
|
|
|
|
|
268 |
|
269 |
-
/**
|
270 |
* Import wp deps
|
271 |
*/
|
272 |
|
273 |
-
var __ = wp.i18n.__;
|
274 |
-
var registerBlockType = wp.blocks.registerBlockType;
|
275 |
-
|
276 |
-
var StrongTestimonialView = function () {
|
277 |
-
function StrongTestimonialView() {
|
278 |
-
_classCallCheck(this, StrongTestimonialView);
|
279 |
-
|
280 |
-
this.registerBlock();
|
281 |
-
}
|
282 |
-
|
283 |
-
_createClass(StrongTestimonialView, [{
|
284 |
-
key: 'registerBlock',
|
285 |
-
value: function registerBlock() {
|
286 |
|
287 |
-
|
|
|
|
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
type: 'number',
|
292 |
-
default: 0
|
293 |
-
},
|
294 |
-
mode: {
|
295 |
-
type: 'string',
|
296 |
-
default: 'display'
|
297 |
-
}
|
298 |
-
};
|
299 |
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
supports: {
|
306 |
-
html: false,
|
307 |
-
customClassName: false
|
308 |
-
},
|
309 |
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
|
328 |
-
|
|
|
329 |
|
|
|
330 |
|
331 |
-
|
332 |
-
|
333 |
-
|
|
|
|
|
334 |
|
335 |
-
|
|
|
|
|
336 |
|
337 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
|
339 |
-
function _possibleConstructorReturn(self, call) {
|
|
|
|
|
|
|
|
|
|
|
340 |
|
341 |
-
function _inherits(subClass, superClass) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
|
343 |
-
/**
|
344 |
* WordPress dependencies
|
345 |
*/
|
346 |
-
var __ = wp.i18n.__;
|
347 |
-
var _wp$element = wp.element,
|
348 |
-
|
349 |
-
|
350 |
-
var InspectorControls = wp.blockEditor.InspectorControls;
|
351 |
-
var _wp$components = wp.components,
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
/**
|
358 |
* Inspector controls
|
359 |
*/
|
360 |
|
361 |
-
var Inspector = function
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
views = attributes.views,
|
389 |
-
testimonials = attributes.testimonials;
|
390 |
-
|
391 |
-
return React.createElement(
|
392 |
-
Fragment,
|
393 |
-
null,
|
394 |
-
React.createElement(
|
395 |
-
InspectorControls,
|
396 |
-
null,
|
397 |
-
React.createElement(
|
398 |
-
PanelBody,
|
399 |
-
{ title: __('View Settings'), initialOpen: true },
|
400 |
-
views.length === 0 && React.createElement(
|
401 |
-
Fragment,
|
402 |
-
null,
|
403 |
-
React.createElement(
|
404 |
-
'p',
|
405 |
null,
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
}
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
}(Component);
|
447 |
-
|
448 |
-
exports.default = Inspector;
|
449 |
-
|
450 |
-
/***/ })
|
451 |
-
/******/ ]);
|
1 |
+
/******/ (function(modules) {
|
2 |
+
// webpackBootstrap
|
3 |
+
/******/ // The module cache
|
4 |
+
/******/ var installedModules = {}; // The require function
|
5 |
+
/******/
|
6 |
+
/******/ /******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if (installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/
|
12 |
+
} // Create a new module (and put it into the cache)
|
13 |
+
/******/ /******/ var module = (installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/
|
18 |
+
}); // Execute the module function
|
19 |
+
/******/
|
20 |
+
/******/ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); // Flag the module as loaded
|
21 |
+
/******/
|
22 |
+
/******/ /******/ module.l = true; // Return the exports of the module
|
23 |
+
/******/
|
24 |
+
/******/ /******/ return module.exports;
|
25 |
+
/******/
|
26 |
+
} // expose the modules object (__webpack_modules__)
|
27 |
+
/******/
|
28 |
+
/******/
|
29 |
+
/******/ /******/ __webpack_require__.m = modules; // expose the module cache
|
30 |
+
/******/
|
31 |
+
/******/ /******/ __webpack_require__.c = installedModules; // identity function for calling harmony imports with the correct context
|
32 |
+
/******/
|
33 |
+
/******/ /******/ __webpack_require__.i = function(value) {
|
34 |
+
return value;
|
35 |
+
}; // define getter function for harmony exports
|
36 |
+
/******/
|
37 |
+
/******/ /******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if (!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/
|
44 |
+
});
|
45 |
+
/******/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
+
/******/
|
48 |
+
}; // getDefaultExport function for compatibility with non-harmony modules
|
49 |
+
/******/
|
50 |
+
/******/ /******/ __webpack_require__.n = function(module) {
|
51 |
+
/******/ var getter =
|
52 |
+
module && module.__esModule
|
53 |
+
? /******/ function getDefault() {
|
54 |
+
return module['default'];
|
55 |
+
}
|
56 |
+
: /******/ function getModuleExports() {
|
57 |
+
return module;
|
58 |
+
};
|
59 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
60 |
+
/******/ return getter;
|
61 |
+
/******/
|
62 |
+
}; // Object.prototype.hasOwnProperty.call
|
63 |
+
/******/
|
64 |
+
/******/ /******/ __webpack_require__.o = function(object, property) {
|
65 |
+
return Object.prototype.hasOwnProperty.call(object, property);
|
66 |
+
}; // __webpack_public_path__
|
67 |
+
/******/
|
68 |
+
/******/ /******/ __webpack_require__.p = ''; // Load entry module and return exports
|
69 |
+
/******/
|
70 |
+
/******/ /******/ return __webpack_require__((__webpack_require__.s = 4));
|
71 |
+
/******/
|
72 |
+
})(
|
73 |
+
/************************************************************************/
|
74 |
+
/******/ [
|
75 |
+
/* 0 */
|
76 |
+
/***/ function(module, exports, __webpack_require__) {
|
77 |
+
'use strict';
|
78 |
+
|
79 |
+
Object.defineProperty(exports, '__esModule', {
|
80 |
+
value: true
|
81 |
});
|
82 |
+
exports.StrongTestimonialViewEdit = undefined;
|
83 |
+
|
84 |
+
var _extends =
|
85 |
+
Object.assign ||
|
86 |
+
function(target) {
|
87 |
+
for (var i = 1; i < arguments.length; i++) {
|
88 |
+
var source = arguments[i];
|
89 |
+
for (var key in source) {
|
90 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
91 |
+
target[key] = source[key];
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
return target;
|
96 |
+
};
|
97 |
+
|
98 |
+
var _inspector = __webpack_require__(5);
|
99 |
+
|
100 |
+
var _inspector2 = _interopRequireDefault(_inspector);
|
101 |
+
|
102 |
+
function _interopRequireDefault(obj) {
|
103 |
+
return obj && obj.__esModule ? obj : { default: obj };
|
104 |
+
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Wordpress deps
|
108 |
+
*/
|
109 |
+
|
110 |
+
var __ = wp.i18n.__;
|
111 |
+
var _wp$element = wp.element,
|
112 |
+
Component = _wp$element.Component,
|
113 |
+
Fragment = _wp$element.Fragment,
|
114 |
+
useEffect = _wp$element.useEffect;
|
115 |
+
var withSelect = wp.data.withSelect;
|
116 |
+
var _wp$components = wp.components,
|
117 |
+
SelectControl = _wp$components.SelectControl,
|
118 |
+
Spinner = _wp$components.Spinner,
|
119 |
+
Toolbar = _wp$components.Toolbar,
|
120 |
+
Button = _wp$components.Button;
|
121 |
+
var BlockControls = wp.blockEditor.BlockControls;
|
122 |
+
var StrongTestimonialViewEdit = (exports.StrongTestimonialViewEdit = function StrongTestimonialViewEdit(
|
123 |
+
props
|
124 |
+
) {
|
125 |
+
var attributes = props.attributes,
|
126 |
+
setAttributes = props.setAttributes;
|
127 |
+
var id = attributes.id,
|
128 |
+
views = attributes.views,
|
129 |
+
status = attributes.status,
|
130 |
+
testimonials = attributes.testimonials,
|
131 |
+
mode = attributes.mode;
|
132 |
+
|
133 |
+
useEffect(function() {
|
134 |
+
setAttributes({ status: 'ready', views: st_views.views });
|
135 |
+
|
136 |
+
if (id != 0) {
|
137 |
+
_onIdChange(id);
|
138 |
+
}
|
139 |
+
}, []);
|
140 |
+
var _onIdChange = function _onIdChange(id) {
|
141 |
+
props.setAttributes({ status: 'ready', id: id });
|
142 |
+
};
|
143 |
+
|
144 |
+
var selectOptions = function selectOptions() {
|
145 |
+
var options = [ { value: 0, label: __('None') } ];
|
146 |
+
|
147 |
+
st_views.views.forEach(function(view) {
|
148 |
+
options.push({ value: view.id, label: view.name });
|
149 |
+
});
|
150 |
+
|
151 |
+
return options;
|
152 |
+
};
|
153 |
+
|
154 |
+
var blockControls = React.createElement(
|
155 |
+
BlockControls,
|
156 |
null,
|
157 |
+
st_views.views.length > 0 &&
|
|
|
|
|
158 |
React.createElement(
|
159 |
+
Toolbar,
|
160 |
+
null,
|
161 |
+
React.createElement(Button, { label: __('Edit View'), icon: 'edit', target: '_blank' })
|
162 |
+
)
|
163 |
+
);
|
164 |
+
if (status === 'loading') {
|
165 |
+
return [
|
166 |
+
React.createElement(
|
167 |
+
Fragment,
|
168 |
+
null,
|
169 |
React.createElement(
|
170 |
'div',
|
171 |
+
{ className: 'st-block-preview' },
|
172 |
+
React.createElement(
|
173 |
+
'div',
|
174 |
+
{ className: 'st-block-preview__content' },
|
175 |
+
React.createElement('div', { className: 'st-block-preview__logo' }, ' '),
|
176 |
+
React.createElement(Spinner, null)
|
177 |
+
)
|
178 |
+
)
|
179 |
)
|
180 |
+
];
|
181 |
+
}
|
|
|
182 |
|
183 |
+
return [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
React.createElement(
|
185 |
+
Fragment,
|
186 |
+
null,
|
187 |
+
React.createElement(
|
188 |
+
_inspector2.default,
|
189 |
+
_extends(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
{
|
191 |
+
onIdChange: function onIdChange(id) {
|
192 |
+
return _onIdChange(id);
|
193 |
+
},
|
194 |
+
selectOptions: selectOptions()
|
195 |
},
|
196 |
+
props
|
197 |
)
|
198 |
),
|
199 |
+
React.createElement(
|
200 |
+
'div',
|
201 |
+
{ className: 'st-block-preview' },
|
202 |
+
React.createElement(
|
203 |
+
'div',
|
204 |
+
{ class: 'st-block-preview__content' },
|
205 |
+
React.createElement('div', { className: 'st-block-preview__logo' }),
|
206 |
+
st_views.views.length === 0 &&
|
207 |
+
React.createElement(
|
208 |
+
Fragment,
|
209 |
+
null,
|
210 |
+
React.createElement('h6', null, __("You don't seem to have any views.")),
|
211 |
+
React.createElement(
|
212 |
+
Button,
|
213 |
+
{
|
214 |
+
href:
|
215 |
+
st_views.adminURL +
|
216 |
+
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=add',
|
217 |
+
target: '_blank',
|
218 |
+
isDefault: true
|
219 |
+
},
|
220 |
+
__('Add New View')
|
221 |
+
)
|
222 |
+
),
|
223 |
+
st_views.views.length > 0 &&
|
224 |
+
React.createElement(
|
225 |
+
Fragment,
|
226 |
+
null,
|
227 |
+
React.createElement(SelectControl, {
|
228 |
+
label: 'Select a view:',
|
229 |
+
className: 'st-view-select',
|
230 |
+
key: id,
|
231 |
+
value: id,
|
232 |
+
options: selectOptions(),
|
233 |
+
onChange: function onChange(value) {
|
234 |
+
return _onIdChange(parseInt(value));
|
235 |
+
}
|
236 |
+
}),
|
237 |
+
id != 0 &&
|
238 |
+
React.createElement(
|
239 |
+
Button,
|
240 |
+
{
|
241 |
+
target: '_blank',
|
242 |
+
href:
|
243 |
+
st_views.adminURL +
|
244 |
+
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=edit&id=' +
|
245 |
+
id,
|
246 |
+
isSecondary: true
|
247 |
+
},
|
248 |
+
__('Edit Settings')
|
249 |
+
)
|
250 |
+
)
|
251 |
)
|
252 |
)
|
253 |
)
|
254 |
+
];
|
255 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
|
257 |
+
exports.default = StrongTestimonialViewEdit;
|
258 |
+
|
259 |
+
/***/
|
260 |
+
} /* 4 */ /* 2 */ /* 3 */,
|
261 |
+
,
|
262 |
+
,
|
263 |
+
,
|
264 |
+
/* 1 */ /***/ function(module, exports, __webpack_require__) {
|
265 |
+
'use strict';
|
266 |
+
|
267 |
+
var _createClass = (function() {
|
268 |
+
function defineProperties(target, props) {
|
269 |
+
for (var i = 0; i < props.length; i++) {
|
270 |
+
var descriptor = props[i];
|
271 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
272 |
+
descriptor.configurable = true;
|
273 |
+
if ('value' in descriptor) descriptor.writable = true;
|
274 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
275 |
+
}
|
276 |
+
}
|
277 |
+
return function(Constructor, protoProps, staticProps) {
|
278 |
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
279 |
+
if (staticProps) defineProperties(Constructor, staticProps);
|
280 |
+
return Constructor;
|
281 |
+
};
|
282 |
+
})();
|
283 |
+
|
284 |
+
var _edit = __webpack_require__(0);
|
285 |
+
|
286 |
+
var _edit2 = _interopRequireDefault(_edit);
|
287 |
+
|
288 |
+
function _interopRequireDefault(obj) {
|
289 |
+
return obj && obj.__esModule ? obj : { default: obj };
|
290 |
+
}
|
291 |
|
292 |
+
function _classCallCheck(instance, Constructor) {
|
293 |
+
if (!(instance instanceof Constructor)) {
|
294 |
+
throw new TypeError('Cannot call a class as a function');
|
295 |
+
}
|
296 |
+
}
|
297 |
|
298 |
+
/**
|
299 |
* Import wp deps
|
300 |
*/
|
301 |
|
302 |
+
var __ = wp.i18n.__;
|
303 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
|
305 |
+
var StrongTestimonialView = (function() {
|
306 |
+
function StrongTestimonialView() {
|
307 |
+
_classCallCheck(this, StrongTestimonialView);
|
308 |
|
309 |
+
this.registerBlock();
|
310 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
|
312 |
+
_createClass(StrongTestimonialView, [
|
313 |
+
{
|
314 |
+
key: 'registerBlock',
|
315 |
+
value: function registerBlock() {
|
316 |
+
this.blockName = 'strongtestimonials/view';
|
|
|
|
|
|
|
|
|
317 |
|
318 |
+
this.blockAttributes = {
|
319 |
+
id: {
|
320 |
+
type: 'number',
|
321 |
+
default: 0
|
322 |
+
},
|
323 |
+
mode: {
|
324 |
+
type: 'string',
|
325 |
+
default: 'display'
|
326 |
+
}
|
327 |
+
};
|
328 |
+
|
329 |
+
registerBlockType(this.blockName, {
|
330 |
+
title: 'Strong Testimonial View',
|
331 |
+
description: __('Render ST View', 'strong-testimonials'),
|
332 |
+
icon: 'editor-quote',
|
333 |
+
category: 'common',
|
334 |
+
supports: {
|
335 |
+
html: false,
|
336 |
+
customClassName: false
|
337 |
+
},
|
338 |
|
339 |
+
attributes: this.blockAttributes,
|
340 |
+
edit: _edit2.default,
|
341 |
+
save: function save() {
|
342 |
+
return null;
|
343 |
+
}
|
344 |
+
});
|
345 |
+
}
|
346 |
+
}
|
347 |
+
]);
|
348 |
|
349 |
+
return StrongTestimonialView;
|
350 |
+
})();
|
351 |
|
352 |
+
var strongTestimonialsView = new StrongTestimonialView();
|
353 |
|
354 |
+
/***/
|
355 |
+
},
|
356 |
+
/* 5 */
|
357 |
+
/***/ function(module, exports, __webpack_require__) {
|
358 |
+
'use strict';
|
359 |
|
360 |
+
Object.defineProperty(exports, '__esModule', {
|
361 |
+
value: true
|
362 |
+
});
|
363 |
|
364 |
+
var _createClass = (function() {
|
365 |
+
function defineProperties(target, props) {
|
366 |
+
for (var i = 0; i < props.length; i++) {
|
367 |
+
var descriptor = props[i];
|
368 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
369 |
+
descriptor.configurable = true;
|
370 |
+
if ('value' in descriptor) descriptor.writable = true;
|
371 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
372 |
+
}
|
373 |
+
}
|
374 |
+
return function(Constructor, protoProps, staticProps) {
|
375 |
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
376 |
+
if (staticProps) defineProperties(Constructor, staticProps);
|
377 |
+
return Constructor;
|
378 |
+
};
|
379 |
+
})();
|
380 |
+
|
381 |
+
function _classCallCheck(instance, Constructor) {
|
382 |
+
if (!(instance instanceof Constructor)) {
|
383 |
+
throw new TypeError('Cannot call a class as a function');
|
384 |
+
}
|
385 |
+
}
|
386 |
|
387 |
+
function _possibleConstructorReturn(self, call) {
|
388 |
+
if (!self) {
|
389 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
390 |
+
}
|
391 |
+
return call && (typeof call === 'object' || typeof call === 'function') ? call : self;
|
392 |
+
}
|
393 |
|
394 |
+
function _inherits(subClass, superClass) {
|
395 |
+
if (typeof superClass !== 'function' && superClass !== null) {
|
396 |
+
throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
|
397 |
+
}
|
398 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
399 |
+
constructor: { value: subClass, enumerable: false, writable: true, configurable: true }
|
400 |
+
});
|
401 |
+
if (superClass)
|
402 |
+
Object.setPrototypeOf
|
403 |
+
? Object.setPrototypeOf(subClass, superClass)
|
404 |
+
: (subClass.__proto__ = superClass);
|
405 |
+
}
|
406 |
|
407 |
+
/**
|
408 |
* WordPress dependencies
|
409 |
*/
|
410 |
+
var __ = wp.i18n.__;
|
411 |
+
var _wp$element = wp.element,
|
412 |
+
Component = _wp$element.Component,
|
413 |
+
Fragment = _wp$element.Fragment;
|
414 |
+
var InspectorControls = wp.blockEditor.InspectorControls;
|
415 |
+
var _wp$components = wp.components,
|
416 |
+
SelectControl = _wp$components.SelectControl,
|
417 |
+
Button = _wp$components.Button,
|
418 |
+
PanelBody = _wp$components.PanelBody,
|
419 |
+
PanelRow = _wp$components.PanelRow;
|
420 |
+
|
421 |
+
/**
|
422 |
* Inspector controls
|
423 |
*/
|
424 |
|
425 |
+
var Inspector = (function(_Component) {
|
426 |
+
_inherits(Inspector, _Component);
|
427 |
+
|
428 |
+
function Inspector(props) {
|
429 |
+
_classCallCheck(this, Inspector);
|
430 |
+
|
431 |
+
return _possibleConstructorReturn(
|
432 |
+
this,
|
433 |
+
(Inspector.__proto__ || Object.getPrototypeOf(Inspector)).apply(this, arguments)
|
434 |
+
);
|
435 |
+
}
|
436 |
+
|
437 |
+
_createClass(Inspector, [
|
438 |
+
{
|
439 |
+
key: 'render',
|
440 |
+
value: function render() {
|
441 |
+
var _props = this.props,
|
442 |
+
attributes = _props.attributes,
|
443 |
+
setAttributes = _props.setAttributes,
|
444 |
+
onIdChange = _props.onIdChange,
|
445 |
+
selectOptions = _props.selectOptions;
|
446 |
+
var id = attributes.id,
|
447 |
+
views = attributes.views,
|
448 |
+
testimonials = attributes.testimonials;
|
449 |
+
|
450 |
+
return React.createElement(
|
451 |
+
Fragment,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
null,
|
453 |
+
React.createElement(
|
454 |
+
InspectorControls,
|
455 |
+
null,
|
456 |
+
React.createElement(
|
457 |
+
PanelBody,
|
458 |
+
{ title: __('View Settings'), initialOpen: true },
|
459 |
+
st_views.views.length === 0 &&
|
460 |
+
React.createElement(
|
461 |
+
Fragment,
|
462 |
+
null,
|
463 |
+
React.createElement('p', null, __("You don't seem to have any views.")),
|
464 |
+
React.createElement(
|
465 |
+
Button,
|
466 |
+
{
|
467 |
+
href:
|
468 |
+
st_views.adminURL +
|
469 |
+
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=add',
|
470 |
+
target: '_blank',
|
471 |
+
isDefault: true
|
472 |
+
},
|
473 |
+
__('Add New View')
|
474 |
+
)
|
475 |
+
),
|
476 |
+
st_views.views.length > 0 &&
|
477 |
+
React.createElement(
|
478 |
+
Fragment,
|
479 |
+
null,
|
480 |
+
React.createElement(SelectControl, {
|
481 |
+
label: __('Select View'),
|
482 |
+
key: id,
|
483 |
+
value: id,
|
484 |
+
options: selectOptions,
|
485 |
+
onChange: function onChange(value) {
|
486 |
+
return onIdChange(parseInt(value));
|
487 |
+
}
|
488 |
+
}),
|
489 |
+
id != 0 &&
|
490 |
+
React.createElement(
|
491 |
+
Button,
|
492 |
+
{
|
493 |
+
target: '_blank',
|
494 |
+
href:
|
495 |
+
st_views.adminURL +
|
496 |
+
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=edit&id=' +
|
497 |
+
id,
|
498 |
+
isSecondary: true
|
499 |
+
},
|
500 |
+
__('Edit View')
|
501 |
+
)
|
502 |
+
)
|
503 |
+
)
|
504 |
+
)
|
505 |
+
);
|
506 |
+
}
|
507 |
+
}
|
508 |
+
]);
|
509 |
+
|
510 |
+
return Inspector;
|
511 |
+
})(Component);
|
512 |
+
|
513 |
+
exports.default = Inspector;
|
514 |
+
|
515 |
+
/***/
|
516 |
}
|
517 |
+
/******/
|
518 |
+
]
|
519 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
assets/src/js/components/edit.js
CHANGED
@@ -5,105 +5,108 @@ import Inspector from './inspector';
|
|
5 |
*/
|
6 |
|
7 |
const { __ } = wp.i18n;
|
8 |
-
const { Component, Fragment } = wp.element;
|
9 |
const { withSelect } = wp.data;
|
10 |
const { SelectControl, Spinner, Toolbar, Button } = wp.components;
|
11 |
const { BlockControls } = wp.blockEditor;
|
12 |
|
13 |
-
export
|
14 |
-
|
15 |
-
|
16 |
-
this.props.attributes.status = 'ready';
|
17 |
-
this.props.attributes.views = st_views.views;
|
18 |
-
}
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
selectOptions() {
|
25 |
-
let options = [{ value: 0, label: __('None')}];
|
26 |
|
27 |
st_views.views.forEach(function(view) {
|
28 |
options.push({ value: view.id, label: view.name });
|
29 |
});
|
30 |
|
31 |
return options;
|
32 |
-
}
|
33 |
-
|
34 |
-
render() {
|
35 |
-
const { attributes, setAttributes } = this.props;
|
36 |
-
const { id, views, status, testimonials, mode } = attributes;
|
37 |
-
const blockControls = (
|
38 |
-
<BlockControls>
|
39 |
-
{views.length > 0 && (
|
40 |
-
<Toolbar>
|
41 |
-
<Button label={__('Edit View')} icon="edit" target="_blank" />
|
42 |
-
</Toolbar>
|
43 |
-
)}
|
44 |
-
</BlockControls>
|
45 |
-
);
|
46 |
-
if (status === 'loading') {
|
47 |
-
return [
|
48 |
-
<Fragment>
|
49 |
-
<div className="st-block-preview">
|
50 |
-
<div className="st-block-preview__content">
|
51 |
-
<div className="st-block-preview__logo"> </div>
|
52 |
-
<Spinner />
|
53 |
-
</div>
|
54 |
-
</div>
|
55 |
-
</Fragment>
|
56 |
-
];
|
57 |
-
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
return [
|
60 |
<Fragment>
|
61 |
-
<Inspector onIdChange={(id) => this.onIdChange(id)} {...this.props} />
|
62 |
<div className="st-block-preview">
|
63 |
-
<div
|
64 |
-
<div className="st-block-preview__logo"
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
<Button
|
|
|
69 |
href={
|
70 |
st_views.adminURL +
|
71 |
-
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=
|
|
|
72 |
}
|
73 |
-
|
74 |
-
isDefault
|
75 |
>
|
76 |
-
{__('
|
77 |
</Button>
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
<Fragment>
|
82 |
-
<SelectControl
|
83 |
-
label="Select a view:"
|
84 |
-
className="st-view-select"
|
85 |
-
value={id}
|
86 |
-
options={this.selectOptions()}
|
87 |
-
onChange={(id) => setAttributes({ id })}
|
88 |
-
/>
|
89 |
-
{id != 0 && (
|
90 |
-
<Button
|
91 |
-
target="_blank"
|
92 |
-
href={
|
93 |
-
st_views.adminURL +
|
94 |
-
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=edit&id=' +
|
95 |
-
id
|
96 |
-
}
|
97 |
-
isSecondary
|
98 |
-
>
|
99 |
-
{__('Edit Settings')}
|
100 |
-
</Button>
|
101 |
-
)}
|
102 |
-
</Fragment>
|
103 |
-
)}
|
104 |
-
</div>
|
105 |
</div>
|
106 |
-
</
|
107 |
-
|
108 |
-
|
109 |
-
}
|
|
|
|
5 |
*/
|
6 |
|
7 |
const { __ } = wp.i18n;
|
8 |
+
const { Component, Fragment, useEffect } = wp.element;
|
9 |
const { withSelect } = wp.data;
|
10 |
const { SelectControl, Spinner, Toolbar, Button } = wp.components;
|
11 |
const { BlockControls } = wp.blockEditor;
|
12 |
|
13 |
+
export const StrongTestimonialViewEdit = (props) => {
|
14 |
+
const { attributes, setAttributes } = props;
|
15 |
+
const { id, views, status, testimonials, mode } = attributes;
|
|
|
|
|
|
|
16 |
|
17 |
+
useEffect(() => {
|
18 |
+
setAttributes({ status: 'ready', views: st_views.views });
|
19 |
+
|
20 |
+
if (id != 0) {
|
21 |
+
onIdChange(id);
|
22 |
+
}
|
23 |
+
}, []);
|
24 |
+
const onIdChange = (id) => {
|
25 |
+
props.setAttributes({ status: 'ready', id: id });
|
26 |
+
};
|
27 |
|
28 |
+
const selectOptions = () => {
|
29 |
+
let options = [ { value: 0, label: __('None') } ];
|
30 |
|
31 |
st_views.views.forEach(function(view) {
|
32 |
options.push({ value: view.id, label: view.name });
|
33 |
});
|
34 |
|
35 |
return options;
|
36 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
const blockControls = (
|
39 |
+
<BlockControls>
|
40 |
+
{st_views.views.length > 0 && (
|
41 |
+
<Toolbar>
|
42 |
+
<Button label={__('Edit View')} icon="edit" target="_blank" />
|
43 |
+
</Toolbar>
|
44 |
+
)}
|
45 |
+
</BlockControls>
|
46 |
+
);
|
47 |
+
if (status === 'loading') {
|
48 |
return [
|
49 |
<Fragment>
|
|
|
50 |
<div className="st-block-preview">
|
51 |
+
<div className="st-block-preview__content">
|
52 |
+
<div className="st-block-preview__logo"> </div>
|
53 |
+
<Spinner />
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
</Fragment>
|
57 |
+
];
|
58 |
+
}
|
59 |
+
|
60 |
+
return [
|
61 |
+
<Fragment>
|
62 |
+
<Inspector onIdChange={(id) => onIdChange(id)} selectOptions={selectOptions()} {...props} />
|
63 |
+
<div className="st-block-preview">
|
64 |
+
<div class="st-block-preview__content">
|
65 |
+
<div className="st-block-preview__logo" />
|
66 |
+
{st_views.views.length === 0 && (
|
67 |
+
<Fragment>
|
68 |
+
<h6>{__("You don't seem to have any views.")}</h6>
|
69 |
+
<Button
|
70 |
+
href={
|
71 |
+
st_views.adminURL +
|
72 |
+
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=add'
|
73 |
+
}
|
74 |
+
target="_blank"
|
75 |
+
isDefault
|
76 |
+
>
|
77 |
+
{__('Add New View')}
|
78 |
+
</Button>
|
79 |
+
</Fragment>
|
80 |
+
)}
|
81 |
+
{st_views.views.length > 0 && (
|
82 |
+
<Fragment>
|
83 |
+
<SelectControl
|
84 |
+
label="Select a view:"
|
85 |
+
className="st-view-select"
|
86 |
+
key={id}
|
87 |
+
value={id}
|
88 |
+
options={selectOptions()}
|
89 |
+
onChange={(value) => onIdChange(parseInt(value))}
|
90 |
+
/>
|
91 |
+
{id != 0 && (
|
92 |
<Button
|
93 |
+
target="_blank"
|
94 |
href={
|
95 |
st_views.adminURL +
|
96 |
+
'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=edit&id=' +
|
97 |
+
id
|
98 |
}
|
99 |
+
isSecondary
|
|
|
100 |
>
|
101 |
+
{__('Edit Settings')}
|
102 |
</Button>
|
103 |
+
)}
|
104 |
+
</Fragment>
|
105 |
+
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</div>
|
107 |
+
</div>
|
108 |
+
</Fragment>
|
109 |
+
];
|
110 |
+
};
|
111 |
+
|
112 |
+
export default StrongTestimonialViewEdit;
|
assets/src/js/components/inspector.js
CHANGED
@@ -14,24 +14,14 @@ export default class Inspector extends Component {
|
|
14 |
super(...arguments);
|
15 |
}
|
16 |
|
17 |
-
selectOptions() {
|
18 |
-
let options = [ { value: 0, label: __('None') } ];
|
19 |
-
|
20 |
-
this.props.attributes.views.forEach(function(view) {
|
21 |
-
options.push({ value: view.id, label: view.name });
|
22 |
-
});
|
23 |
-
|
24 |
-
return options;
|
25 |
-
}
|
26 |
-
|
27 |
render() {
|
28 |
-
const { attributes, setAttributes } = this.props;
|
29 |
const { id, views, testimonials } = attributes;
|
30 |
return (
|
31 |
<Fragment>
|
32 |
<InspectorControls>
|
33 |
<PanelBody title={__('View Settings')} initialOpen={true}>
|
34 |
-
{views.length === 0 && (
|
35 |
<Fragment>
|
36 |
<p>{__("You don't seem to have any views.")}</p>
|
37 |
<Button
|
@@ -47,13 +37,14 @@ export default class Inspector extends Component {
|
|
47 |
</Fragment>
|
48 |
)}
|
49 |
|
50 |
-
{views.length > 0 && (
|
51 |
<Fragment>
|
52 |
<SelectControl
|
53 |
label={__('Select View')}
|
|
|
54 |
value={id}
|
55 |
-
options={
|
56 |
-
onChange={(
|
57 |
/>
|
58 |
{id != 0 && (
|
59 |
<Button
|
14 |
super(...arguments);
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
render() {
|
18 |
+
const { attributes, setAttributes, onIdChange, selectOptions } = this.props;
|
19 |
const { id, views, testimonials } = attributes;
|
20 |
return (
|
21 |
<Fragment>
|
22 |
<InspectorControls>
|
23 |
<PanelBody title={__('View Settings')} initialOpen={true}>
|
24 |
+
{st_views.views.length === 0 && (
|
25 |
<Fragment>
|
26 |
<p>{__("You don't seem to have any views.")}</p>
|
27 |
<Button
|
37 |
</Fragment>
|
38 |
)}
|
39 |
|
40 |
+
{st_views.views.length > 0 && (
|
41 |
<Fragment>
|
42 |
<SelectControl
|
43 |
label={__('Select View')}
|
44 |
+
key={id}
|
45 |
value={id}
|
46 |
+
options={selectOptions}
|
47 |
+
onChange={(value) => onIdChange(parseInt(value))}
|
48 |
/>
|
49 |
{id != 0 && (
|
50 |
<Button
|
changelog.txt
CHANGED
@@ -1,8 +1,15 @@
|
|
1 |
-
= v2.51.
|
2 |
-
- Fixed:
|
3 |
-
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
- Fixed: Manual excerpt ( https://github.com/WPChill/strong-testimonials/issues/220 )
|
7 |
|
8 |
= v2.51.1 - 18/02/2021 =
|
1 |
+
= v2.51.4 - 11/04/2021 =
|
2 |
+
- Fixed: Compatibility with PHP8
|
3 |
+
- Fixed: Gutenberg Block
|
4 |
+
- Fixed: Added more escapes and sanitization
|
5 |
+
|
6 |
+
= v2.51.3 - 16/03/2021 =
|
7 |
+
- Changed: View backend in order to be more customizable ( https://github.com/WPChill/strong-testimonials/issues/222 )
|
8 |
+
- Added: A class to disabled class for each template ( https://github.com/WPChill/strong-testimonials/issues/210 )
|
9 |
+
- Fixed: Incompatibility between DIVI builder and testimonials'excerpt display ( https://github.com/WPChill/strong-testimonials/issues/231 )
|
10 |
+
- Fixed: Sanitization issue ( https://github.com/WPChill/strong-testimonials/issues/236 )
|
11 |
+
|
12 |
+
= v2.51.2 - 24/02/2021 =
|
13 |
- Fixed: Manual excerpt ( https://github.com/WPChill/strong-testimonials/issues/220 )
|
14 |
|
15 |
= v2.51.1 - 18/02/2021 =
|
includes/class-strong-form.php
CHANGED
@@ -42,7 +42,7 @@ class Strong_Testimonials_Form {
|
|
42 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
43 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
44 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
45 |
-
|
46 |
);
|
47 |
}
|
48 |
|
42 |
printf( '<a href="%s" class="nav-tab %s">%s</a>',
|
43 |
esc_url( add_query_arg( 'tab', self::TAB_NAME, $url ) ),
|
44 |
esc_attr( $active_tab == self::TAB_NAME ? 'nav-tab-active' : '' ),
|
45 |
+
esc_html__( 'Fields', 'strong-testimonials' )
|
46 |
);
|
47 |
}
|
48 |
|
includes/class-strong-templates.php
CHANGED
@@ -29,19 +29,19 @@ class Strong_Templates {
|
|
29 |
public function find_templates( $type = null ) {
|
30 |
$search = array(
|
31 |
'child_theme' => array(
|
32 |
-
'source' =>
|
33 |
'path' => get_stylesheet_directory() . '/' . WPMTST,
|
34 |
'uri' => get_stylesheet_directory_uri() . '/' . WPMTST,
|
35 |
'order' => 2,
|
36 |
),
|
37 |
'parent_theme' => array(
|
38 |
-
'source' =>
|
39 |
'path' => get_template_directory() . '/' . WPMTST,
|
40 |
'uri' => get_template_directory_uri() . '/' . WPMTST,
|
41 |
'order' => 3,
|
42 |
),
|
43 |
'plugin' => array(
|
44 |
-
'source' =>
|
45 |
'path' => WPMTST_TPL,
|
46 |
'uri' => WPMTST_TPL_URI,
|
47 |
'order' => 4,
|
@@ -60,7 +60,7 @@ class Strong_Templates {
|
|
60 |
*/
|
61 |
foreach ( $search as $key => $where ) {
|
62 |
if ( ! isset( $where['source'] ) ) {
|
63 |
-
$search[ $key ]['source'] =
|
64 |
}
|
65 |
if ( ! isset( $where['order'] ) ) {
|
66 |
$search[ $key ]['order'] = 1;
|
@@ -318,7 +318,7 @@ class Strong_Templates {
|
|
318 |
*
|
319 |
* @return array|bool
|
320 |
*/
|
321 |
-
public function scandir( $template, $path, $uri, $extensions = null, $type ) {
|
322 |
if ( ! is_dir( $path . '/' . $template ) ) {
|
323 |
return false;
|
324 |
}
|
29 |
public function find_templates( $type = null ) {
|
30 |
$search = array(
|
31 |
'child_theme' => array(
|
32 |
+
'source' => esc_html__( 'Child Theme', 'strong-testimonials' ),
|
33 |
'path' => get_stylesheet_directory() . '/' . WPMTST,
|
34 |
'uri' => get_stylesheet_directory_uri() . '/' . WPMTST,
|
35 |
'order' => 2,
|
36 |
),
|
37 |
'parent_theme' => array(
|
38 |
+
'source' => esc_html__( 'Parent Theme', 'strong-testimonials' ),
|
39 |
'path' => get_template_directory() . '/' . WPMTST,
|
40 |
'uri' => get_template_directory_uri() . '/' . WPMTST,
|
41 |
'order' => 3,
|
42 |
),
|
43 |
'plugin' => array(
|
44 |
+
'source' => esc_html__( 'Plugin', 'strong-testimonials' ),
|
45 |
'path' => WPMTST_TPL,
|
46 |
'uri' => WPMTST_TPL_URI,
|
47 |
'order' => 4,
|
60 |
*/
|
61 |
foreach ( $search as $key => $where ) {
|
62 |
if ( ! isset( $where['source'] ) ) {
|
63 |
+
$search[ $key ]['source'] = esc_html__( 'Custom', 'strong-testimonials' );
|
64 |
}
|
65 |
if ( ! isset( $where['order'] ) ) {
|
66 |
$search[ $key ]['order'] = 1;
|
318 |
*
|
319 |
* @return array|bool
|
320 |
*/
|
321 |
+
public function scandir( $template, $path, $uri, $extensions = null, $type = null ) {
|
322 |
if ( ! is_dir( $path . '/' . $template ) ) {
|
323 |
return false;
|
324 |
}
|
includes/class-strong-testimonials-order.php
CHANGED
@@ -272,7 +272,7 @@ class Strong_Testimonials_Order {
|
|
272 |
$posts_per_page = 25;
|
273 |
if ( isset( $_POST['order'] ) ) {
|
274 |
if ( isset( $_POST['order']['page'] ) ) {
|
275 |
-
$paged = absint( $_POST['order']['page']
|
276 |
}
|
277 |
if ( isset( $_POST['order']['posts_per_page'] ) ) {
|
278 |
$posts_per_page = absint( $_POST['order']['posts_per_page'] );
|
272 |
$posts_per_page = 25;
|
273 |
if ( isset( $_POST['order'] ) ) {
|
274 |
if ( isset( $_POST['order']['page'] ) ) {
|
275 |
+
$paged = absint( $_POST['order']['page']);
|
276 |
}
|
277 |
if ( isset( $_POST['order']['posts_per_page'] ) ) {
|
278 |
$posts_per_page = absint( $_POST['order']['posts_per_page'] );
|
includes/class-strong-testimonials-privacy.php
CHANGED
@@ -28,7 +28,7 @@ class Strong_Testimonials_Privacy {
|
|
28 |
* @return string
|
29 |
*/
|
30 |
public function get_friendly_name() {
|
31 |
-
return
|
32 |
}
|
33 |
|
34 |
/**
|
@@ -59,7 +59,7 @@ class Strong_Testimonials_Privacy {
|
|
59 |
|
60 |
$item_id = "testimonial-{$testimonial->ID}";
|
61 |
$group_id = 'testimonials';
|
62 |
-
$group_label =
|
63 |
|
64 |
$data = array();
|
65 |
|
28 |
* @return string
|
29 |
*/
|
30 |
public function get_friendly_name() {
|
31 |
+
return esc_html__( 'Strong Testimonials Plugin', 'strong-testimonials' );
|
32 |
}
|
33 |
|
34 |
/**
|
59 |
|
60 |
$item_id = "testimonial-{$testimonial->ID}";
|
61 |
$group_id = 'testimonials';
|
62 |
+
$group_label = esc_html__( 'Testimonials', 'strong-testimonials' );
|
63 |
|
64 |
$data = array();
|
65 |
|
includes/class-strong-testimonials-shortcode-average.php
CHANGED
@@ -149,7 +149,7 @@ class Strong_Testimonials_Average_Shortcode {
|
|
149 |
|
150 |
// title
|
151 |
if ( isset( $parts['title'] ) ) {
|
152 |
-
$parts['title'] = sprintf( '<span class="strong-rating-title">%s</span>',
|
153 |
}
|
154 |
if ( isset( $parts['title2'] ) ) {
|
155 |
/* translators: %s is a number */
|
@@ -361,7 +361,7 @@ class Strong_Testimonials_Average_Shortcode {
|
|
361 |
ob_start();
|
362 |
?>
|
363 |
<span class="<?php echo esc_attr($class); ?>">
|
364 |
-
<span class="star0 star<?php echo $is_zero; ?>"></span>
|
365 |
<?php
|
366 |
if ($is_zero) {
|
367 |
echo str_repeat('<span class="star"></span>', 5);
|
@@ -375,7 +375,7 @@ class Strong_Testimonials_Average_Shortcode {
|
|
375 |
if ( (0.9 >= $i - $rating) && (0.1 <= $i - $rating)) {
|
376 |
$star_class .= ' half';
|
377 |
}
|
378 |
-
printf('<span class="%s"></span>', $star_class);
|
379 |
}
|
380 |
}
|
381 |
?>
|
149 |
|
150 |
// title
|
151 |
if ( isset( $parts['title'] ) ) {
|
152 |
+
$parts['title'] = sprintf( '<span class="strong-rating-title">%s</span>', esc_html__( 'Average Rating:', 'strong-testimonials' ) );
|
153 |
}
|
154 |
if ( isset( $parts['title2'] ) ) {
|
155 |
/* translators: %s is a number */
|
361 |
ob_start();
|
362 |
?>
|
363 |
<span class="<?php echo esc_attr($class); ?>">
|
364 |
+
<span class="star0 star<?php echo esc_attr( $is_zero ); ?>"></span>
|
365 |
<?php
|
366 |
if ($is_zero) {
|
367 |
echo str_repeat('<span class="star"></span>', 5);
|
375 |
if ( (0.9 >= $i - $rating) && (0.1 <= $i - $rating)) {
|
376 |
$star_class .= ' half';
|
377 |
}
|
378 |
+
printf('<span class="%s"></span>', esc_attr( $star_class ) );
|
379 |
}
|
380 |
}
|
381 |
?>
|
includes/class-strong-testimonials-shortcode.php
CHANGED
@@ -74,8 +74,8 @@ class Strong_Testimonials_View_Shortcode {
|
|
74 |
ob_start();
|
75 |
?>
|
76 |
<p style="color: #CD0000;">
|
77 |
-
<?php printf(
|
78 |
-
<span style="color: #777; font-size: 0.9em;"><?php
|
79 |
</p>
|
80 |
<?php
|
81 |
return ob_get_clean();
|
74 |
ob_start();
|
75 |
?>
|
76 |
<p style="color: #CD0000;">
|
77 |
+
<?php printf( esc_html__( 'Testimonial view %s not found.', 'strong-testimonials' ), esc_attr( $out['view'] ) ); ?><br>
|
78 |
+
<span style="color: #777; font-size: 0.9em;"><?php esc_html_e( '(Only administrators see this message.)', 'strong-testimonials' ); ?></span>
|
79 |
</p>
|
80 |
<?php
|
81 |
return ob_get_clean();
|
includes/class-strong-view-slideshow.php
CHANGED
@@ -439,10 +439,10 @@ class Strong_View_Slideshow extends Strong_View_Display {
|
|
439 |
*/
|
440 |
if ( 'text' == $setting ) {
|
441 |
$options['text']['args'] = array(
|
442 |
-
'startText' =>
|
443 |
-
'stopText' =>
|
444 |
-
'prevText' =>
|
445 |
-
'nextText' =>
|
446 |
);
|
447 |
}
|
448 |
|
439 |
*/
|
440 |
if ( 'text' == $setting ) {
|
441 |
$options['text']['args'] = array(
|
442 |
+
'startText' => esc_html_x( 'Play', 'slideshow control', 'strong-testimonials' ),
|
443 |
+
'stopText' => esc_html_x( 'Pause', 'slideshow control', 'strong-testimonials' ),
|
444 |
+
'prevText' => esc_html_x( 'Previous', 'slideshow_control', 'strong-testimonials' ),
|
445 |
+
'nextText' => esc_html_x( 'Next', 'slideshow_control', 'strong-testimonials' ),
|
446 |
);
|
447 |
}
|
448 |
|
includes/class-strong-view.php
CHANGED
@@ -91,8 +91,8 @@ class Strong_View {
|
|
91 |
ob_start();
|
92 |
?>
|
93 |
<p style="color: #CD0000;">
|
94 |
-
<?php
|
95 |
-
<span style="color: #777; font-size: 0.9em;"><?php
|
96 |
</p>
|
97 |
<?php
|
98 |
|
91 |
ob_start();
|
92 |
?>
|
93 |
<p style="color: #CD0000;">
|
94 |
+
<?php esc_html_e( 'No testimonials found. Check your view settings.', 'strong-testimonials' ); ?><br>
|
95 |
+
<span style="color: #777; font-size: 0.9em;"><?php esc_html_e( '(Only administrators see this message.)', 'strong-testimonials' ); ?></span>
|
96 |
</p>
|
97 |
<?php
|
98 |
|
includes/elementor/class-strong-elementor-check.php
CHANGED
@@ -74,8 +74,8 @@ final class Strong_Testimonials_Elementor_Check {
|
|
74 |
* @access public
|
75 |
*/
|
76 |
public function admin_notice_minimum_elementor_version() {
|
77 |
-
if (isset($_GET['activate'])) {
|
78 |
-
unset($_GET['activate']);
|
79 |
}
|
80 |
|
81 |
$message = sprintf(
|
@@ -97,8 +97,8 @@ final class Strong_Testimonials_Elementor_Check {
|
|
97 |
* @access public
|
98 |
*/
|
99 |
public function admin_notice_minimum_php_version() {
|
100 |
-
if (isset($_GET['activate'])) {
|
101 |
-
unset($_GET['activate']);
|
102 |
}
|
103 |
|
104 |
$message = sprintf(
|
74 |
* @access public
|
75 |
*/
|
76 |
public function admin_notice_minimum_elementor_version() {
|
77 |
+
if ( isset( $_GET['activate'] ) ) {
|
78 |
+
unset( $_GET['activate'] );
|
79 |
}
|
80 |
|
81 |
$message = sprintf(
|
97 |
* @access public
|
98 |
*/
|
99 |
public function admin_notice_minimum_php_version() {
|
100 |
+
if ( isset( $_GET['activate'] ) ) {
|
101 |
+
unset( $_GET['activate'] );
|
102 |
}
|
103 |
|
104 |
$message = sprintf(
|
includes/functions-activation.php
CHANGED
@@ -27,8 +27,8 @@ function wpmtst_update_tables() {
|
|
27 |
if ( $wpdb->last_error ) {
|
28 |
deactivate_plugins( 'strong-testimonials/strong-testimonials.php' );
|
29 |
$message = '<p><span style="color: #CD0000;">';
|
30 |
-
$message .=
|
31 |
-
$message .=
|
32 |
$message .= '</p>';
|
33 |
$message .= '<p><code>' . $wpdb->last_error . '</code></p>';
|
34 |
$message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
|
27 |
if ( $wpdb->last_error ) {
|
28 |
deactivate_plugins( 'strong-testimonials/strong-testimonials.php' );
|
29 |
$message = '<p><span style="color: #CD0000;">';
|
30 |
+
$message .= esc_html__( 'An error occurred:', 'strong-testimonials' ) . '</span> ';
|
31 |
+
$message .= esc_html__( 'The plugin has been deactivated.', 'strong-testimonials' );
|
32 |
$message .= '</p>';
|
33 |
$message .= '<p><code>' . $wpdb->last_error . '</code></p>';
|
34 |
$message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
|
includes/functions-content.php
CHANGED
@@ -42,7 +42,7 @@ function wpmtst_get_the_excerpt( $post = null ) {
|
|
42 |
}
|
43 |
|
44 |
if ( post_password_required( $post ) ) {
|
45 |
-
return
|
46 |
}
|
47 |
|
48 |
/**
|
@@ -113,9 +113,13 @@ function wpmtst_trim_excerpt( $excerpt = '' ) {
|
|
113 |
*/
|
114 |
function wpmtst_get_the_prepared_text( $hybrid = false ) {
|
115 |
$text = get_the_content( '' );
|
116 |
-
|
|
|
|
|
|
|
117 |
$text = strip_shortcodes( $text );
|
118 |
}
|
|
|
119 |
$text = apply_filters( 'wpmtst_the_content', $text );
|
120 |
$text = str_replace( ']]>', ']]>', $text );
|
121 |
|
@@ -168,7 +172,7 @@ function wpmtst_trim_words( $text, $num_words = 55, $more = null, $hybrid = fals
|
|
168 |
if ( null === $more ) {
|
169 |
$more = __( '…', 'strong-testimonials' );
|
170 |
}
|
171 |
-
|
172 |
$text = strip_tags( $text, '<br><br><img><b><strong><i><em><ul><ol><li><del><a><sup>' );
|
173 |
|
174 |
/*
|
@@ -176,7 +180,7 @@ function wpmtst_trim_words( $text, $num_words = 55, $more = null, $hybrid = fals
|
|
176 |
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
|
177 |
* Do not translate into your own language.
|
178 |
*/
|
179 |
-
if ( strpos(
|
180 |
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
|
181 |
preg_match_all( '/./u', $text, $words_array );
|
182 |
$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
|
42 |
}
|
43 |
|
44 |
if ( post_password_required( $post ) ) {
|
45 |
+
return esc_html__( 'There is no excerpt because this is a protected post.', 'strong-testimonials' );
|
46 |
}
|
47 |
|
48 |
/**
|
113 |
*/
|
114 |
function wpmtst_get_the_prepared_text( $hybrid = false ) {
|
115 |
$text = get_the_content( '' );
|
116 |
+
|
117 |
+
if(function_exists('et_core_is_builder_used_on_current_request') && et_core_is_builder_used_on_current_request()) {
|
118 |
+
$text = wp_strip_all_tags(et_strip_shortcodes($text), true);
|
119 |
+
} elseif ( ! $hybrid ) {
|
120 |
$text = strip_shortcodes( $text );
|
121 |
}
|
122 |
+
|
123 |
$text = apply_filters( 'wpmtst_the_content', $text );
|
124 |
$text = str_replace( ']]>', ']]>', $text );
|
125 |
|
172 |
if ( null === $more ) {
|
173 |
$more = __( '…', 'strong-testimonials' );
|
174 |
}
|
175 |
+
$full_text = strip_tags( $text, '<br><img><b><strong><i><em><ul><ol><li><del><a><sup>' );
|
176 |
$text = strip_tags( $text, '<br><br><img><b><strong><i><em><ul><ol><li><del><a><sup>' );
|
177 |
|
178 |
/*
|
180 |
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
|
181 |
* Do not translate into your own language.
|
182 |
*/
|
183 |
+
if ( strpos( esc_html_x( 'words', 'Word count type. Do not translate!', 'strong-testimonials' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
|
184 |
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
|
185 |
preg_match_all( '/./u', $text, $words_array );
|
186 |
$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
|
includes/functions-rating.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
*
|
15 |
* @return string
|
16 |
*/
|
17 |
-
function wpmtst_star_rating_form( $field, $value
|
18 |
$value = (int) $value;
|
19 |
if ( $field && is_array( $field ) && isset( $field['name'] ) ) {
|
20 |
$name = $field['name'];
|
@@ -25,32 +25,32 @@ function wpmtst_star_rating_form( $field, $value = 0, $class, $echo = true, $fie
|
|
25 |
$name = 'rating';
|
26 |
}
|
27 |
ob_start(); ?>
|
28 |
-
<div class="strong-rating-wrapper field-wrap <?php echo $class; ?>"><!-- cheap trick to collapse whitespace around inline-blocks
|
29 |
--><fieldset contenteditable=false
|
30 |
-
id="wpmtst_<?php echo $field['name']; ?>"
|
31 |
-
name="<?php echo $field['name']; ?>"
|
32 |
class="strong-rating"
|
33 |
data-field-type="rating"
|
34 |
tabindex="0">
|
35 |
-
<legend><?php
|
36 |
|
37 |
-
--><input type="radio" id="<?php echo $field['name']; ?>-star0" name="<?php echo $name; ?>" value="0" <?php checked( $value, 0 ); ?> /><!--
|
38 |
-
--><label for="<?php echo $field['name']; ?>-star0" title="No stars"></label><!--
|
39 |
|
40 |
-
--><input type="radio" id="<?php echo $field['name']; ?>-star1" name="<?php echo $name; ?>" value="1" <?php checked( $value, 1 ); ?> /><!--
|
41 |
-
--><label for="<?php echo $field['name']; ?>-star1" title="1 star"></label><!--
|
42 |
|
43 |
-
--><input type="radio" id="<?php echo $field['name']; ?>-star2" name="<?php echo $name; ?>" value="2" <?php checked( $value, 2 ); ?> /><!--
|
44 |
-
--><label for="<?php echo $field['name']; ?>-star2" title="2 stars"></label><!--
|
45 |
|
46 |
-
--><input type="radio" id="<?php echo $field['name']; ?>-star3" name="<?php echo $name; ?>" value="3" <?php checked( $value, 3 ); ?> /><!--
|
47 |
-
--><label for="<?php echo $field['name']; ?>-star3" title="3 stars"></label><!--
|
48 |
|
49 |
-
--><input type="radio" id="<?php echo $field['name']; ?>-star4" name="<?php echo $name; ?>" value="4" <?php checked( $value, 4 ); ?> /><!--
|
50 |
-
--><label for="<?php echo $field['name']; ?>-star4" title="4 stars"></label><!--
|
51 |
|
52 |
-
--><input type="radio" id="<?php echo $field['name']; ?>-star5" name="<?php echo $name; ?>" value="5" <?php checked( $value, 5 ); ?> /><!--
|
53 |
-
--><label for="<?php echo $field['name']; ?>-star5" title="5 stars"></label><!--
|
54 |
|
55 |
--></fieldset><!--
|
56 |
--></div>
|
@@ -60,8 +60,8 @@ function wpmtst_star_rating_form( $field, $value = 0, $class, $echo = true, $fie
|
|
60 |
$html = preg_replace( '/<!--(.|\s)*?-->/', '', $html );
|
61 |
|
62 |
if ( $echo ) {
|
63 |
-
|
64 |
-
|
65 |
}
|
66 |
|
67 |
return $html;
|
@@ -77,7 +77,7 @@ function wpmtst_star_rating_form( $field, $value = 0, $class, $echo = true, $fie
|
|
77 |
function wpmtst_star_rating_display( $value = 0, $class = 'in-view', $echo = true ) {
|
78 |
$value = (int) $value;
|
79 |
ob_start(); ?>
|
80 |
-
<span class="strong-rating-wrapper <?php echo $class; ?>">
|
81 |
<span class="strong-rating"><!-- cheap trick to collapse whitespace around inline-blocks
|
82 |
--><span class="star<?php echo ( 0 == $value ) ? ' current' : '' ; ?>" style="display: none;"></span><!--
|
83 |
--><span class="star<?php echo ( 1 == $value ) ? ' current' : '' ; ?>"></span><!--
|
14 |
*
|
15 |
* @return string
|
16 |
*/
|
17 |
+
function wpmtst_star_rating_form( $field, $value, $class, $echo = true, $field_array = '' ) {
|
18 |
$value = (int) $value;
|
19 |
if ( $field && is_array( $field ) && isset( $field['name'] ) ) {
|
20 |
$name = $field['name'];
|
25 |
$name = 'rating';
|
26 |
}
|
27 |
ob_start(); ?>
|
28 |
+
<div class="strong-rating-wrapper field-wrap <?php echo esc_attr( $class ); ?>"><!-- cheap trick to collapse whitespace around inline-blocks
|
29 |
--><fieldset contenteditable=false
|
30 |
+
id="wpmtst_<?php echo esc_attr( $field['name'] ); ?>"
|
31 |
+
name="<?php echo esc_attr( $field['name'] ); ?>"
|
32 |
class="strong-rating"
|
33 |
data-field-type="rating"
|
34 |
tabindex="0">
|
35 |
+
<legend><?php esc_html_e('rating fields', 'strong-testimonials' ) ?></legend><!--
|
36 |
|
37 |
+
--><input type="radio" id="<?php echo esc_attr( $field['name'] ); ?>-star0" name="<?php echo esc_attr( $name ); ?>" value="0" <?php checked( $value, 0 ); ?> /><!--
|
38 |
+
--><label for="<?php echo esc_attr( $field['name'] ); ?>-star0" title="No stars"></label><!--
|
39 |
|
40 |
+
--><input type="radio" id="<?php echo esc_attr( $field['name'] ); ?>-star1" name="<?php echo esc_attr( $name ); ?>" value="1" <?php checked( $value, 1 ); ?> /><!--
|
41 |
+
--><label for="<?php echo esc_attr( $field['name'] ); ?>-star1" title="1 star"></label><!--
|
42 |
|
43 |
+
--><input type="radio" id="<?php echo esc_attr( $field['name'] ); ?>-star2" name="<?php echo esc_attr( $name ); ?>" value="2" <?php checked( $value, 2 ); ?> /><!--
|
44 |
+
--><label for="<?php echo esc_attr( $field['name'] ); ?>-star2" title="2 stars"></label><!--
|
45 |
|
46 |
+
--><input type="radio" id="<?php echo esc_attr( $field['name'] ); ?>-star3" name="<?php echo esc_attr( $name ); ?>" value="3" <?php checked( $value, 3 ); ?> /><!--
|
47 |
+
--><label for="<?php echo esc_attr( $field['name'] ); ?>-star3" title="3 stars"></label><!--
|
48 |
|
49 |
+
--><input type="radio" id="<?php echo esc_attr( $field['name'] ); ?>-star4" name="<?php echo esc_attr( $name ); ?>" value="4" <?php checked( $value, 4 ); ?> /><!--
|
50 |
+
--><label for="<?php echo esc_attr( $field['name'] ); ?>-star4" title="4 stars"></label><!--
|
51 |
|
52 |
+
--><input type="radio" id="<?php echo esc_attr( $field['name'] ); ?>-star5" name="<?php echo esc_attr( $name ); ?>" value="5" <?php checked( $value, 5 ); ?> /><!--
|
53 |
+
--><label for="<?php echo esc_attr( $field['name'] ); ?>-star5" title="5 stars"></label><!--
|
54 |
|
55 |
--></fieldset><!--
|
56 |
--></div>
|
60 |
$html = preg_replace( '/<!--(.|\s)*?-->/', '', $html );
|
61 |
|
62 |
if ( $echo ) {
|
63 |
+
echo $html;
|
64 |
+
return true;
|
65 |
}
|
66 |
|
67 |
return $html;
|
77 |
function wpmtst_star_rating_display( $value = 0, $class = 'in-view', $echo = true ) {
|
78 |
$value = (int) $value;
|
79 |
ob_start(); ?>
|
80 |
+
<span class="strong-rating-wrapper <?php echo esc_attr( $class ) ; ?>">
|
81 |
<span class="strong-rating"><!-- cheap trick to collapse whitespace around inline-blocks
|
82 |
--><span class="star<?php echo ( 0 == $value ) ? ' current' : '' ; ?>" style="display: none;"></span><!--
|
83 |
--><span class="star<?php echo ( 1 == $value ) ? ' current' : '' ; ?>"></span><!--
|
includes/functions-template-form.php
CHANGED
@@ -14,9 +14,9 @@ function wpmtst_form_setup() {
|
|
14 |
echo '<div style="display: none;">';
|
15 |
wp_nonce_field( 'wpmtst_form_action', 'wpmtst_form_nonce', true, true );
|
16 |
echo '<input type="hidden" name="action" value="wpmtst_form">';
|
17 |
-
echo '<input type="hidden" name="form_id" value="'. WPMST()->atts( 'form_id' ) .'">';
|
18 |
-
echo '<input type="hidden" name="default_category" value="'. WPMST()->atts( 'category' ) .'">';
|
19 |
-
echo '<input type="hidden" name="category" value="'. implode( ',', $cats ) .'">';
|
20 |
echo '</div>';
|
21 |
}
|
22 |
|
@@ -71,10 +71,7 @@ function wpmtst_single_form_field( $field ) {
|
|
71 |
if ( 'checkbox' != $field['input_type'] ) {
|
72 |
|
73 |
if ( ! isset( $field['show_label'] ) || $field['show_label'] ) {
|
74 |
-
printf( '<label for="wpmtst_%s" class="%s">%s</label>',
|
75 |
-
$field['name'],
|
76 |
-
wpmtst_field_label_classes( $field['input_type'], $field['name'] ),
|
77 |
-
wpmtst_form_field_meta_l10n( $field['label'], $field, 'label' ) );
|
78 |
|
79 |
if ( isset( $field['required'] ) && $field['required'] ) {
|
80 |
wpmtst_field_required_symbol();
|
@@ -123,21 +120,18 @@ function wpmtst_single_form_field( $field ) {
|
|
123 |
case 'textarea':
|
124 |
$value = ( isset( $form_values[ $field['name'] ] ) && $form_values[ $field['name'] ] ) ? $form_values[ $field['name'] ] : '';
|
125 |
// textarea tags must be on same line for placeholder to work
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
$field['max_length']
|
131 |
-
);
|
132 |
-
}
|
133 |
printf(
|
134 |
'<textarea id="wpmtst_%s" name="%s" class="%s" %s placeholder="%s" %s tabindex="0">%s</textarea>',
|
135 |
-
|
136 |
-
|
137 |
esc_attr( wpmtst_field_classes( $field['input_type'], $field['name'], $max_length ) ),
|
138 |
esc_attr( wpmtst_field_required_tag( $field ) ),
|
139 |
esc_attr( wpmtst_field_placeholder( $field ) ),
|
140 |
-
|
141 |
esc_textarea( $value )
|
142 |
);
|
143 |
break;
|
@@ -200,25 +194,22 @@ function wpmtst_single_form_field( $field ) {
|
|
200 |
break;
|
201 |
|
202 |
default: // text, email, url
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
wpmtst_field_required_tag( $field ) );
|
219 |
-
|
220 |
}
|
221 |
-
|
222 |
}
|
223 |
|
224 |
wpmtst_field_after( $field );
|
14 |
echo '<div style="display: none;">';
|
15 |
wp_nonce_field( 'wpmtst_form_action', 'wpmtst_form_nonce', true, true );
|
16 |
echo '<input type="hidden" name="action" value="wpmtst_form">';
|
17 |
+
echo '<input type="hidden" name="form_id" value="' . esc_attr( WPMST()->atts( 'form_id' ) ) . '">';
|
18 |
+
echo '<input type="hidden" name="default_category" value="' . esc_attr( WPMST()->atts( 'category' ) ) . '">';
|
19 |
+
echo '<input type="hidden" name="category" value="' . implode( ',', $cats ) . '">';
|
20 |
echo '</div>';
|
21 |
}
|
22 |
|
71 |
if ( 'checkbox' != $field['input_type'] ) {
|
72 |
|
73 |
if ( ! isset( $field['show_label'] ) || $field['show_label'] ) {
|
74 |
+
printf( '<label for="wpmtst_%s" class="%s">%s</label>', esc_html( $field['name'] ), wpmtst_field_label_classes( $field['input_type'], $field['name'] ), wpmtst_form_field_meta_l10n( $field['label'], $field, 'label' ) );
|
|
|
|
|
|
|
75 |
|
76 |
if ( isset( $field['required'] ) && $field['required'] ) {
|
77 |
wpmtst_field_required_symbol();
|
120 |
case 'textarea':
|
121 |
$value = ( isset( $form_values[ $field['name'] ] ) && $form_values[ $field['name'] ] ) ? $form_values[ $field['name'] ] : '';
|
122 |
// textarea tags must be on same line for placeholder to work
|
123 |
+
$max_length = wpmtst_field_length( $field );
|
124 |
+
if ( isset( $max_length ) && ! empty( $max_length ) ) {
|
125 |
+
printf( '<span class="after max-length-counter" align="right">0 characters out of %s</span>', absint( $field['max_length'] ) );
|
126 |
+
}
|
|
|
|
|
|
|
127 |
printf(
|
128 |
'<textarea id="wpmtst_%s" name="%s" class="%s" %s placeholder="%s" %s tabindex="0">%s</textarea>',
|
129 |
+
esc_html( $field['name'] ),
|
130 |
+
esc_html( $field['name'] ),
|
131 |
esc_attr( wpmtst_field_classes( $field['input_type'], $field['name'], $max_length ) ),
|
132 |
esc_attr( wpmtst_field_required_tag( $field ) ),
|
133 |
esc_attr( wpmtst_field_placeholder( $field ) ),
|
134 |
+
wpmtst_field_length( $field ),
|
135 |
esc_textarea( $value )
|
136 |
);
|
137 |
break;
|
194 |
break;
|
195 |
|
196 |
default: // text, email, url
|
197 |
+
$max_length = wpmtst_field_length( $field );
|
198 |
+
if ( isset( $max_length ) && ! empty( $max_length ) ) {
|
199 |
+
printf( '<span class="after max-length-counter" align="right">0 characters out of %s</span>', absint( $field['max_length'] ) );
|
200 |
+
}
|
201 |
+
printf(
|
202 |
+
'<input id="wpmtst_%s" type="%s" class="%s" name="%s" %s placeholder="%s" %s %s tabindex="0">',
|
203 |
+
esc_html( $field['name'] ),
|
204 |
+
esc_attr( $field['input_type'] ),
|
205 |
+
esc_attr( wpmtst_field_classes( $field['input_type'], $field['name'], $max_length ) ),
|
206 |
+
esc_html( $field['name'] ),
|
207 |
+
wpmtst_field_value( $field, $form_values ),
|
208 |
+
esc_attr( wpmtst_field_placeholder( $field ) ),
|
209 |
+
absint( $max_length ),
|
210 |
+
esc_attr( wpmtst_field_required_tag( $field ) )
|
211 |
+
);
|
|
|
|
|
212 |
}
|
|
|
213 |
}
|
214 |
|
215 |
wpmtst_field_after( $field );
|
includes/functions-template.php
CHANGED
@@ -18,7 +18,7 @@ function strong_testimonials_view( $id = null ) {
|
|
18 |
$out = array();
|
19 |
$pairs = array();
|
20 |
$atts = array( 'id' => $id );
|
21 |
-
|
22 |
$out = WPMST()->render->parse_view( $out, $pairs, $atts );
|
23 |
|
24 |
echo WPMST()->shortcode->render_view( $out );
|
@@ -277,7 +277,7 @@ function wpmtst_the_date( $format = '', $class = '' ) {
|
|
277 |
}
|
278 |
|
279 |
$the_date = apply_filters( 'wpmtst_the_date', mysql2date( $format, $post->post_date ), $format, $post );
|
280 |
-
echo '<div class="' . $class . '">' . $the_date . '</div>';
|
281 |
}
|
282 |
|
283 |
/**
|
@@ -531,7 +531,7 @@ function wpmtst_container_data() {
|
|
531 |
foreach ( $data_array as $attr => $value ) {
|
532 |
$data .= " data-$attr=$value";
|
533 |
}
|
534 |
-
echo $data;
|
535 |
}
|
536 |
}
|
537 |
|
18 |
$out = array();
|
19 |
$pairs = array();
|
20 |
$atts = array( 'id' => $id );
|
21 |
+
$out = WPMST()->render->prerender( $atts );
|
22 |
$out = WPMST()->render->parse_view( $out, $pairs, $atts );
|
23 |
|
24 |
echo WPMST()->shortcode->render_view( $out );
|
277 |
}
|
278 |
|
279 |
$the_date = apply_filters( 'wpmtst_the_date', mysql2date( $format, $post->post_date ), $format, $post );
|
280 |
+
echo '<div class="' . esc_attr( $class ) . '">' . esc_attr( $the_date ) . '</div>';
|
281 |
}
|
282 |
|
283 |
/**
|
531 |
foreach ( $data_array as $attr => $value ) {
|
532 |
$data .= " data-$attr=$value";
|
533 |
}
|
534 |
+
echo esc_attr( $data );
|
535 |
}
|
536 |
}
|
537 |
|
includes/functions-views.php
CHANGED
@@ -33,8 +33,8 @@ function wpmtst_get_views() {
|
|
33 |
if ( $wpdb->last_error ) {
|
34 |
deactivate_plugins( 'strong-testimonials/strong-testimonials.php' );
|
35 |
$message = '<p><span style="color: #CD0000;">';
|
36 |
-
$message .=
|
37 |
-
$message .=
|
38 |
$message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
|
39 |
wp_die( sprintf( '<div class="error strong-view-error">%s</div>', $message ) );
|
40 |
}
|
33 |
if ( $wpdb->last_error ) {
|
34 |
deactivate_plugins( 'strong-testimonials/strong-testimonials.php' );
|
35 |
$message = '<p><span style="color: #CD0000;">';
|
36 |
+
$message .= esc_html__( 'An error occurred.', 'strong-testimonials' ) . '</span> ';
|
37 |
+
$message .= esc_html__( 'The plugin has been deactivated.', 'strong-testimonials' ) . ' ';
|
38 |
$message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
|
39 |
wp_die( sprintf( '<div class="error strong-view-error">%s</div>', $message ) );
|
40 |
}
|
includes/functions.php
CHANGED
@@ -569,7 +569,7 @@ function wpmtst_post_submitbox_misc_actions( $post ) {
|
|
569 |
if ( $submit_date ) {
|
570 |
echo 'Submitted on: <strong>' . wp_kses_post( date_i18n( 'M j, Y @ H:i', strtotime( $submit_date ) ) ) . '</strong>';
|
571 |
} else {
|
572 |
-
|
573 |
}
|
574 |
echo '</span>';
|
575 |
echo '</div>';
|
@@ -599,32 +599,32 @@ function wpmtst_get_background_defaults() {
|
|
599 |
function wpmtst_get_background_presets( $preset = null ) {
|
600 |
$presets = array(
|
601 |
'light-blue-gradient' => array(
|
602 |
-
'label' =>
|
603 |
'color' => '#E7EFFE',
|
604 |
'color2' => '#B8CFFB',
|
605 |
),
|
606 |
'light-gray-gradient' => array(
|
607 |
-
'label' =>
|
608 |
'color' => '#FBFBFB',
|
609 |
'color2' => '#EDEDED',
|
610 |
),
|
611 |
'light-green-mist-gradient' => array(
|
612 |
-
'label' =>
|
613 |
'color' => '#F2FBE9',
|
614 |
'color2' => '#E0F7CC',
|
615 |
),
|
616 |
'light-latte-gradient' => array(
|
617 |
-
'label' =>
|
618 |
'color' => '#F8F3EC',
|
619 |
'color2' => '#E0C8AB',
|
620 |
),
|
621 |
'light-plum-gradient' => array(
|
622 |
-
'label' =>
|
623 |
'color' => '#F7EEF7',
|
624 |
'color2' => '#E9D0E9',
|
625 |
),
|
626 |
'sky-blue-gradient' => array(
|
627 |
-
'label' =>
|
628 |
'color' => '#E9F6FB',
|
629 |
'color2' => '#C8E9F6',
|
630 |
),
|
569 |
if ( $submit_date ) {
|
570 |
echo 'Submitted on: <strong>' . wp_kses_post( date_i18n( 'M j, Y @ H:i', strtotime( $submit_date ) ) ) . '</strong>';
|
571 |
} else {
|
572 |
+
esc_html_e( 'No submit date', 'strong-testimonials' );
|
573 |
}
|
574 |
echo '</span>';
|
575 |
echo '</div>';
|
599 |
function wpmtst_get_background_presets( $preset = null ) {
|
600 |
$presets = array(
|
601 |
'light-blue-gradient' => array(
|
602 |
+
'label' => esc_html__( 'light blue gradient', 'strong-testimonials' ),
|
603 |
'color' => '#E7EFFE',
|
604 |
'color2' => '#B8CFFB',
|
605 |
),
|
606 |
'light-gray-gradient' => array(
|
607 |
+
'label' => esc_html__( 'light gray gradient', 'strong-testimonials' ),
|
608 |
'color' => '#FBFBFB',
|
609 |
'color2' => '#EDEDED',
|
610 |
),
|
611 |
'light-green-mist-gradient' => array(
|
612 |
+
'label' => esc_html__( 'light green mist gradient', 'strong-testimonials' ),
|
613 |
'color' => '#F2FBE9',
|
614 |
'color2' => '#E0F7CC',
|
615 |
),
|
616 |
'light-latte-gradient' => array(
|
617 |
+
'label' => esc_html__( 'light latte gradient', 'strong-testimonials' ),
|
618 |
'color' => '#F8F3EC',
|
619 |
'color2' => '#E0C8AB',
|
620 |
),
|
621 |
'light-plum-gradient' => array(
|
622 |
+
'label' => esc_html__( 'light plum gradient', 'strong-testimonials' ),
|
623 |
'color' => '#F7EEF7',
|
624 |
'color2' => '#E9D0E9',
|
625 |
),
|
626 |
'sky-blue-gradient' => array(
|
627 |
+
'label' => esc_html__( 'sky blue gradient', 'strong-testimonials' ),
|
628 |
'color' => '#E9F6FB',
|
629 |
'color2' => '#C8E9F6',
|
630 |
),
|
includes/post-types.php
CHANGED
@@ -51,31 +51,31 @@ add_action( 'init', 'wpmtst_register_cpt', 12 );
|
|
51 |
*/
|
52 |
function wpmtst_get_cpt_defaults() {
|
53 |
$labels = array(
|
54 |
-
'name' =>
|
55 |
-
'singular_name' =>
|
56 |
-
'add_new' =>
|
57 |
-
'add_new_item' =>
|
58 |
-
'edit_item' =>
|
59 |
-
'new_item' =>
|
60 |
-
'view_item' =>
|
61 |
-
'view_items' =>
|
62 |
-
'search_items' =>
|
63 |
-
'not_found' =>
|
64 |
-
'not_found_in_trash' =>
|
65 |
-
'all_items' =>
|
66 |
-
'archives' =>
|
67 |
-
'attributes' =>
|
68 |
-
'insert_into_item' =>
|
69 |
-
'uploaded_to_this_item' =>
|
70 |
-
'featured_image' =>
|
71 |
-
'set_featured_image' =>
|
72 |
-
'remove_featured_image' =>
|
73 |
-
'use_featured_image' =>
|
74 |
-
'filter_items_list' =>
|
75 |
-
'items_list_navigation' =>
|
76 |
-
'items_list' =>
|
77 |
-
'menu_name' =>
|
78 |
-
'name_admin_bar' =>
|
79 |
);
|
80 |
|
81 |
$supports = array(
|
@@ -103,7 +103,7 @@ function wpmtst_get_cpt_defaults() {
|
|
103 |
'taxonomies' => array( 'wpm-testimonial-category' ),
|
104 |
'has_archive' => false,
|
105 |
'rewrite' => array(
|
106 |
-
'slug' =>
|
107 |
'with_front' => true,
|
108 |
'feeds' => false,
|
109 |
'pages' => true,
|
@@ -124,16 +124,16 @@ function wpmtst_get_cpt_defaults() {
|
|
124 |
*/
|
125 |
function wpmtst_get_tax_defaults() {
|
126 |
$labels = array(
|
127 |
-
'name' =>
|
128 |
-
'singular_name' =>
|
129 |
-
'menu_name' =>
|
130 |
-
'all_items' =>
|
131 |
);
|
132 |
|
133 |
$args = array(
|
134 |
'labels' => $labels,
|
135 |
'hierarchical' => true,
|
136 |
-
'rewrite' => array( 'slug' =>
|
137 |
);
|
138 |
|
139 |
return $args;
|
@@ -184,19 +184,19 @@ function wpmtst_updated_messages( $messages ) {
|
|
184 |
// Preview post link.
|
185 |
$preview_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',
|
186 |
esc_url( $preview_url ),
|
187 |
-
|
188 |
);
|
189 |
|
190 |
// View post link.
|
191 |
$view_post_link_html = sprintf( ' <a href="%1$s">%2$s</a>',
|
192 |
esc_url( $permalink ),
|
193 |
-
|
194 |
);
|
195 |
|
196 |
// Scheduled post preview link.
|
197 |
$scheduled_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',
|
198 |
esc_url( $permalink ),
|
199 |
-
|
200 |
);
|
201 |
|
202 |
/* translators: Publish box date format, see https://secure.php.net/date */
|
@@ -204,17 +204,17 @@ function wpmtst_updated_messages( $messages ) {
|
|
204 |
|
205 |
$messages['wpm-testimonial'] = array(
|
206 |
0 => '', // Unused. Messages start at index 1.
|
207 |
-
1 =>
|
208 |
-
2 =>
|
209 |
-
3 =>
|
210 |
-
4 =>
|
211 |
/* translators: %s: date and time of the revision */
|
212 |
-
5 => isset($_GET['revision']) ? sprintf(
|
213 |
-
6 =>
|
214 |
-
7 =>
|
215 |
-
8 =>
|
216 |
-
9 => sprintf(
|
217 |
-
10 =>
|
218 |
);
|
219 |
|
220 |
return $messages;
|
51 |
*/
|
52 |
function wpmtst_get_cpt_defaults() {
|
53 |
$labels = array(
|
54 |
+
'name' => esc_html_x( 'Testimonials', 'post type general name', 'strong-testimonials' ),
|
55 |
+
'singular_name' => esc_html_x( 'Testimonial', 'post type singular name', 'strong-testimonials' ),
|
56 |
+
'add_new' => esc_html__( 'Add New', 'strong-testimonials' ),
|
57 |
+
'add_new_item' => esc_html__( 'Add New Testimonial', 'strong-testimonials' ),
|
58 |
+
'edit_item' => esc_html__( 'Edit Testimonial', 'strong-testimonials' ),
|
59 |
+
'new_item' => esc_html__( 'New Testimonial', 'strong-testimonials' ),
|
60 |
+
'view_item' => esc_html__( 'View Testimonial', 'strong-testimonials' ),
|
61 |
+
'view_items' => esc_html__( 'View Testimonials', 'strong-testimonials' ),
|
62 |
+
'search_items' => esc_html__( 'Search Testimonials', 'strong-testimonials' ),
|
63 |
+
'not_found' => esc_html__( 'Nothing Found', 'strong-testimonials' ),
|
64 |
+
'not_found_in_trash' => esc_html__( 'Nothing found in Trash', 'strong-testimonials' ),
|
65 |
+
'all_items' => esc_html__( 'All Testimonials', 'strong-testimonials' ),
|
66 |
+
'archives' => esc_html__( 'Testimonial Archives', 'strong-testimonials' ),
|
67 |
+
'attributes' => esc_html__( 'Attributes', 'strong-testimonials' ),
|
68 |
+
'insert_into_item' => esc_html__( 'Insert into testimonial', 'strong-testimonials' ),
|
69 |
+
'uploaded_to_this_item' => esc_html__( 'Uploaded to this testimonial', 'strong-testimonials' ),
|
70 |
+
'featured_image' => esc_html__( 'Featured Image', 'strong-testimonials' ),
|
71 |
+
'set_featured_image' => esc_html__( 'Set featured image', 'strong-testimonials' ),
|
72 |
+
'remove_featured_image' => esc_html__( 'Remove featured image', 'strong-testimonials' ),
|
73 |
+
'use_featured_image' => esc_html__( 'Use as featured image', 'strong-testimonials' ),
|
74 |
+
'filter_items_list' => esc_html__( 'Filter testimonials list', 'strong-testimonials' ),
|
75 |
+
'items_list_navigation' => esc_html__( 'Testimonials list navigation', 'strong-testimonials' ),
|
76 |
+
'items_list' => esc_html__( 'Testimonials list', 'strong-testimonials' ),
|
77 |
+
'menu_name' => esc_html_x( 'Testimonials', 'admin menu name', 'strong-testimonials' ),
|
78 |
+
'name_admin_bar' => esc_html_x( 'Testimonial', 'admin bar menu name', 'strong-testimonials' ),
|
79 |
);
|
80 |
|
81 |
$supports = array(
|
103 |
'taxonomies' => array( 'wpm-testimonial-category' ),
|
104 |
'has_archive' => false,
|
105 |
'rewrite' => array(
|
106 |
+
'slug' => esc_html_x( 'testimonial', 'slug', 'strong-testimonials' ),
|
107 |
'with_front' => true,
|
108 |
'feeds' => false,
|
109 |
'pages' => true,
|
124 |
*/
|
125 |
function wpmtst_get_tax_defaults() {
|
126 |
$labels = array(
|
127 |
+
'name' => esc_html__( 'Testimonial Categories', 'strong-testimonials' ),
|
128 |
+
'singular_name' => esc_html__( 'Testimonial Category', 'strong-testimonials' ),
|
129 |
+
'menu_name' => esc_html__( 'Categories', 'strong-testimonials' ),
|
130 |
+
'all_items' => esc_html__( 'All categories', 'strong-testimonials' ),
|
131 |
);
|
132 |
|
133 |
$args = array(
|
134 |
'labels' => $labels,
|
135 |
'hierarchical' => true,
|
136 |
+
'rewrite' => array( 'slug' => esc_html_x( 'testimonial-category', 'slug', 'strong-testimonials' ) ),
|
137 |
);
|
138 |
|
139 |
return $args;
|
184 |
// Preview post link.
|
185 |
$preview_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',
|
186 |
esc_url( $preview_url ),
|
187 |
+
esc_html__( 'Preview testimonial', 'strong-testimonials' )
|
188 |
);
|
189 |
|
190 |
// View post link.
|
191 |
$view_post_link_html = sprintf( ' <a href="%1$s">%2$s</a>',
|
192 |
esc_url( $permalink ),
|
193 |
+
esc_html__( 'View testimonial', 'strong-testimonials' )
|
194 |
);
|
195 |
|
196 |
// Scheduled post preview link.
|
197 |
$scheduled_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',
|
198 |
esc_url( $permalink ),
|
199 |
+
esc_html__( 'Preview testimonial', 'strong-testimonials' )
|
200 |
);
|
201 |
|
202 |
/* translators: Publish box date format, see https://secure.php.net/date */
|
204 |
|
205 |
$messages['wpm-testimonial'] = array(
|
206 |
0 => '', // Unused. Messages start at index 1.
|
207 |
+
1 => esc_html__( 'Testimonial updated.', 'strong-testimonials' ) . $view_post_link_html,
|
208 |
+
2 => esc_html__( 'Custom field updated.', 'strong-testimonials' ),
|
209 |
+
3 => esc_html__( 'Custom field deleted.', 'strong-testimonials' ),
|
210 |
+
4 => esc_html__( 'Testimonial updated.', 'strong-testimonials' ),
|
211 |
/* translators: %s: date and time of the revision */
|
212 |
+
5 => isset($_GET['revision']) ? sprintf( esc_html__( 'Testimonial restored to revision from %s.', 'strong-testimonials' ), wp_post_revision_title( absint( $_GET['revision'] ), false ) ) : false,
|
213 |
+
6 => esc_html__( 'Testimonial published.', 'strong-testimonials' ) . $view_post_link_html,
|
214 |
+
7 => esc_html__( 'Testimonial saved.', 'strong-testimonials' ),
|
215 |
+
8 => esc_html__( 'Testimonial submitted.', 'strong-testimonials' ) . $preview_post_link_html,
|
216 |
+
9 => sprintf( esc_html__( 'Testimonial scheduled for: %s.', 'strong-testimonials' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html,
|
217 |
+
10 => esc_html__( 'Testimonial draft updated.', 'strong-testimonials' ) . $preview_post_link_html,
|
218 |
);
|
219 |
|
220 |
return $messages;
|
includes/widget2.php
CHANGED
@@ -11,20 +11,20 @@ class Strong_Testimonials_View_Widget extends WP_Widget {
|
|
11 |
|
12 |
$widget_ops = array(
|
13 |
'classname' => 'strong-testimonials-view-widget',
|
14 |
-
'description' =>
|
15 |
);
|
16 |
$control_ops = array(
|
17 |
'id_base' => 'strong-testimonials-view-widget',
|
18 |
);
|
19 |
parent::__construct(
|
20 |
'strong-testimonials-view-widget',
|
21 |
-
|
22 |
$widget_ops,
|
23 |
$control_ops
|
24 |
);
|
25 |
|
26 |
$this->defaults = array(
|
27 |
-
'title' =>
|
28 |
'text' => '',
|
29 |
'filter' => 0,
|
30 |
'view' => '0',
|
@@ -42,7 +42,7 @@ class Strong_Testimonials_View_Widget extends WP_Widget {
|
|
42 |
echo $data['before_widget'];
|
43 |
|
44 |
if ( ! empty( $title ) )
|
45 |
-
echo $data['before_title'] . $title . $data['after_title'];
|
46 |
|
47 |
if ( ! empty( $text ) ) {
|
48 |
?>
|
@@ -77,25 +77,25 @@ class Strong_Testimonials_View_Widget extends WP_Widget {
|
|
77 |
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
|
78 |
<?php esc_html_e( 'Title:', 'strong-testimonials' ); ?>
|
79 |
</label>
|
80 |
-
<input class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
81 |
-
name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>">
|
82 |
</p>
|
83 |
<p>
|
84 |
<label for="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>"><?php esc_html_e( 'Content:', 'strong-testimonials' ); ?></label>
|
85 |
<textarea class="widefat" rows="8" id="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
|
86 |
</p>
|
87 |
<p>
|
88 |
-
<input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox"<?php checked( $filter ); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php
|
89 |
</p>
|
90 |
<p>
|
91 |
-
<label for="<?php echo $this->get_field_id( 'view' ); ?>">
|
92 |
-
<?php
|
93 |
</label>
|
94 |
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'view' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'view' ) ); ?>" autocomplete="off">
|
95 |
<option value=""><?php esc_html_e( '— Select —', 'strong-testimonials' ); ?></option>
|
96 |
<?php
|
97 |
foreach ( $views as $view ) {
|
98 |
-
printf( '<option value="%s" %s>%s</option>', $view['id'], selected( $view['id'], $instance['view'] ), $view['name'] );
|
99 |
}
|
100 |
?>
|
101 |
</select>
|
11 |
|
12 |
$widget_ops = array(
|
13 |
'classname' => 'strong-testimonials-view-widget',
|
14 |
+
'description' => esc_html_x( 'Add one of your testimonial views.', 'widget description', 'strong-testimonials' )
|
15 |
);
|
16 |
$control_ops = array(
|
17 |
'id_base' => 'strong-testimonials-view-widget',
|
18 |
);
|
19 |
parent::__construct(
|
20 |
'strong-testimonials-view-widget',
|
21 |
+
esc_html_x( 'Strong Testimonials View', 'widget label', 'strong-testimonials' ),
|
22 |
$widget_ops,
|
23 |
$control_ops
|
24 |
);
|
25 |
|
26 |
$this->defaults = array(
|
27 |
+
'title' => esc_html_x( 'Testimonials', 'widget title', 'strong-testimonials' ),
|
28 |
'text' => '',
|
29 |
'filter' => 0,
|
30 |
'view' => '0',
|
42 |
echo $data['before_widget'];
|
43 |
|
44 |
if ( ! empty( $title ) )
|
45 |
+
echo $data['before_title'] . esc_html( $title ) . $data['after_title'];
|
46 |
|
47 |
if ( ! empty( $text ) ) {
|
48 |
?>
|
77 |
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
|
78 |
<?php esc_html_e( 'Title:', 'strong-testimonials' ); ?>
|
79 |
</label>
|
80 |
+
<input class="widefat" type="text" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
|
81 |
+
name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( $title ); ?>">
|
82 |
</p>
|
83 |
<p>
|
84 |
<label for="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>"><?php esc_html_e( 'Content:', 'strong-testimonials' ); ?></label>
|
85 |
<textarea class="widefat" rows="8" id="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
|
86 |
</p>
|
87 |
<p>
|
88 |
+
<input id="<?php echo esc_attr( $this->get_field_id('filter') ); ?>" name="<?php echo esc_attr( $this->get_field_name('filter') ); ?>" type="checkbox"<?php checked( $filter ); ?> /> <label for="<?php echo esc_attr( $this->get_field_id('filter') ); ?>"><?php esc_html_e( 'Automatically add paragraphs to above Content only', 'strong-testimonials' ); ?></label>
|
89 |
</p>
|
90 |
<p>
|
91 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'view' ) ); ?>">
|
92 |
+
<?php echo esc_html_x( 'View:', 'widget setting', 'strong-testimonials' ); ?>
|
93 |
</label>
|
94 |
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'view' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'view' ) ); ?>" autocomplete="off">
|
95 |
<option value=""><?php esc_html_e( '— Select —', 'strong-testimonials' ); ?></option>
|
96 |
<?php
|
97 |
foreach ( $views as $view ) {
|
98 |
+
printf( '<option value="%s" %s>%s</option>', $view['id'], selected( absint( $view['id'] ), $instance['view'] ), esc_html( $view['name'] ) );
|
99 |
}
|
100 |
?>
|
101 |
</select>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: testimonials, testimonial slider, testimonial form, star ratings
|
|
4 |
Requires at least: 5.2
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.7
|
7 |
-
Stable tag: 2.51.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
4 |
Requires at least: 5.2
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.7
|
7 |
+
Stable tag: 2.51.4
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
strong-testimonials.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Collect and display your testimonials or reviews.
|
6 |
* Author: WPChill
|
7 |
* Author URI: https://wpchill.com/
|
8 |
-
* Version: 2.51.
|
9 |
* Text Domain: strong-testimonials
|
10 |
* Domain Path: /languages
|
11 |
* Requires: 4.6 or higher
|
@@ -45,7 +45,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
45 |
exit;
|
46 |
}
|
47 |
|
48 |
-
define( 'WPMTST_VERSION', '2.51.
|
49 |
define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
|
50 |
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
|
51 |
defined( 'WPMTST_STORE_URL' ) || define( 'WPMTST_STORE_URL', 'https://strongtestimonials.com' );
|
@@ -134,7 +134,7 @@ final class Strong_Testimonials {
|
|
134 |
*/
|
135 |
public function __clone() {
|
136 |
// Cloning instances of the class is forbidden
|
137 |
-
_doing_it_wrong( __FUNCTION__,
|
138 |
}
|
139 |
|
140 |
/**
|
@@ -146,7 +146,7 @@ final class Strong_Testimonials {
|
|
146 |
*/
|
147 |
public function __wakeup() {
|
148 |
// Unserializing instances of the class is forbidden
|
149 |
-
_doing_it_wrong( __FUNCTION__,
|
150 |
}
|
151 |
|
152 |
/**
|
@@ -292,6 +292,7 @@ final class Strong_Testimonials {
|
|
292 |
require_once WPMTST_ADMIN . 'class-strong-testimonials-upsell.php';
|
293 |
require_once WPMTST_ADMIN . 'class-strong-testimonials-updater.php';
|
294 |
require_once WPMTST_ADMIN . 'class-strong-testimonials-review.php';
|
|
|
295 |
|
296 |
require_once WPMTST_ADMIN . 'admin.php';
|
297 |
require_once WPMTST_ADMIN . 'admin-notices.php';
|
5 |
* Description: Collect and display your testimonials or reviews.
|
6 |
* Author: WPChill
|
7 |
* Author URI: https://wpchill.com/
|
8 |
+
* Version: 2.51.4
|
9 |
* Text Domain: strong-testimonials
|
10 |
* Domain Path: /languages
|
11 |
* Requires: 4.6 or higher
|
45 |
exit;
|
46 |
}
|
47 |
|
48 |
+
define( 'WPMTST_VERSION', '2.51.4' );
|
49 |
define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
|
50 |
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
|
51 |
defined( 'WPMTST_STORE_URL' ) || define( 'WPMTST_STORE_URL', 'https://strongtestimonials.com' );
|
134 |
*/
|
135 |
public function __clone() {
|
136 |
// Cloning instances of the class is forbidden
|
137 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'strong-testimonials' ), '1.21' );
|
138 |
}
|
139 |
|
140 |
/**
|
146 |
*/
|
147 |
public function __wakeup() {
|
148 |
// Unserializing instances of the class is forbidden
|
149 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'strong-testimonials' ), '1.21' );
|
150 |
}
|
151 |
|
152 |
/**
|
292 |
require_once WPMTST_ADMIN . 'class-strong-testimonials-upsell.php';
|
293 |
require_once WPMTST_ADMIN . 'class-strong-testimonials-updater.php';
|
294 |
require_once WPMTST_ADMIN . 'class-strong-testimonials-review.php';
|
295 |
+
require_once WPMTST_ADMIN . 'class-strong-testimonials-helper.php';
|
296 |
|
297 |
require_once WPMTST_ADMIN . 'admin.php';
|
298 |
require_once WPMTST_ADMIN . 'admin-notices.php';
|
templates/bold/content.css
CHANGED
@@ -252,7 +252,7 @@ Thanks https://css-tricks.com/minimum-paragraph-widths/
|
|
252 |
}
|
253 |
}
|
254 |
|
255 |
-
.disabled {
|
256 |
display: none!important;
|
257 |
}
|
258 |
|
252 |
}
|
253 |
}
|
254 |
|
255 |
+
.strong-view.wpmtst-bold .disabled {
|
256 |
display: none!important;
|
257 |
}
|
258 |
|
templates/default-form/form.php
CHANGED
@@ -13,9 +13,9 @@
|
|
13 |
<div class="strong-form-inner">
|
14 |
|
15 |
<?php if (isset($form_options['members_only']) && $form_options['members_only'] == true && isset($form_options['members_only_message']) && !is_user_logged_in()): ?>
|
16 |
-
<span class="error"><?php echo $form_options['members_only_message']; ?></span>
|
17 |
-
<a href="<?php echo esc_url( wp_login_url( get_permalink() ) ); ?>" alt="<?php esc_attr_e( 'Login', '
|
18 |
-
<?php
|
19 |
</a>
|
20 |
<?php else: ?>
|
21 |
<?php wpmtst_field_required_notice(); ?>
|
13 |
<div class="strong-form-inner">
|
14 |
|
15 |
<?php if (isset($form_options['members_only']) && $form_options['members_only'] == true && isset($form_options['members_only_message']) && !is_user_logged_in()): ?>
|
16 |
+
<span class="error"><?php echo esc_attr( $form_options['members_only_message'] ); ?></span>
|
17 |
+
<a href="<?php echo esc_url( wp_login_url( get_permalink() ) ); ?>" alt="<?php esc_attr_e( 'Login', 'strong-testimonials' ); ?>">
|
18 |
+
<?php esc_html_e( 'Login', 'strong-testimonials' ); ?>
|
19 |
</a>
|
20 |
<?php else: ?>
|
21 |
<?php wpmtst_field_required_notice(); ?>
|
templates/modern/content.css
CHANGED
@@ -336,7 +336,7 @@ Thanks https://css-tricks.com/minimum-paragraph-widths/
|
|
336 |
}
|
337 |
|
338 |
|
339 |
-
.disabled {
|
340 |
display: none!important;
|
341 |
}
|
342 |
|
336 |
}
|
337 |
|
338 |
|
339 |
+
.strong-view.wpmtst-modern .disabled {
|
340 |
display: none!important;
|
341 |
}
|
342 |
|
templates/simple-form/form.php
CHANGED
@@ -12,9 +12,9 @@
|
|
12 |
|
13 |
<div class="strong-form-inner">
|
14 |
<?php if (isset($form_options['members_only']) && $form_options['members_only'] == true && isset($form_options['members_only_message']) && !is_user_logged_in()): ?>
|
15 |
-
<span class="error"><?php echo $form_options['members_only_message']; ?></span>
|
16 |
-
<a href="<?php echo esc_url( wp_login_url( get_permalink() ) ); ?>" alt="<?php esc_attr_e( 'Login', '
|
17 |
-
<?php
|
18 |
</a>
|
19 |
<?php else: ?>
|
20 |
<?php wpmtst_field_required_notice(); ?>
|
12 |
|
13 |
<div class="strong-form-inner">
|
14 |
<?php if (isset($form_options['members_only']) && $form_options['members_only'] == true && isset($form_options['members_only_message']) && !is_user_logged_in()): ?>
|
15 |
+
<span class="error"><?php echo esc_attr( $form_options['members_only_message'] ); ?></span>
|
16 |
+
<a href="<?php echo esc_url( wp_login_url( get_permalink() ) ); ?>" alt="<?php esc_attr_e( 'Login', 'strong-testimonials' ); ?>">
|
17 |
+
<?php esc_html_e( 'Login', 'strong-testimonials' ); ?>
|
18 |
</a>
|
19 |
<?php else: ?>
|
20 |
<?php wpmtst_field_required_notice(); ?>
|
templates/simple/content.css
CHANGED
@@ -256,7 +256,7 @@ Thanks https://css-tricks.com/minimum-paragraph-widths/
|
|
256 |
.strong-view.wpmtst-simple.rtl .wpmtst-testimonial-field {
|
257 |
text-align: left;
|
258 |
}
|
259 |
-
.disabled {
|
260 |
display : none!important;
|
261 |
}
|
262 |
|
256 |
.strong-view.wpmtst-simple.rtl .wpmtst-testimonial-field {
|
257 |
text-align: left;
|
258 |
}
|
259 |
+
.strong-view.wpmtst-simple .disabled {
|
260 |
display : none!important;
|
261 |
}
|
262 |
|
templates/small-widget/content.css
CHANGED
@@ -196,7 +196,7 @@ Thanks https://css-tricks.com/minimum-paragraph-widths/
|
|
196 |
margin-left: 0;
|
197 |
margin-right: 1em;
|
198 |
}
|
199 |
-
.disabled {
|
200 |
display : none!important;
|
201 |
}
|
202 |
|
196 |
margin-left: 0;
|
197 |
margin-right: 1em;
|
198 |
}
|
199 |
+
.strong-view.wpmtst-small-widget .disabled {
|
200 |
display : none!important;
|
201 |
}
|
202 |
|
templates/unstyled-form/form.php
CHANGED
@@ -12,9 +12,9 @@
|
|
12 |
|
13 |
<div class="strong-form-inner">
|
14 |
<?php if (isset($form_options['members_only']) && $form_options['members_only'] == true && isset($form_options['members_only_message']) && !is_user_logged_in()): ?>
|
15 |
-
<span class="error"><?php echo $form_options['members_only_message']; ?></span>
|
16 |
-
<a href="<?php echo esc_url( wp_login_url( get_permalink() ) ); ?>" alt="<?php esc_attr_e( 'Login', '
|
17 |
-
<?php
|
18 |
</a>
|
19 |
<?php else: ?>
|
20 |
<?php wpmtst_field_required_notice(); ?>
|
12 |
|
13 |
<div class="strong-form-inner">
|
14 |
<?php if (isset($form_options['members_only']) && $form_options['members_only'] == true && isset($form_options['members_only_message']) && !is_user_logged_in()): ?>
|
15 |
+
<span class="error"><?php echo esc_attr( $form_options['members_only_message'] ); ?></span>
|
16 |
+
<a href="<?php echo esc_url( wp_login_url( get_permalink() ) ); ?>" alt="<?php esc_attr_e( 'Login', 'strong-testimonials' ); ?>">
|
17 |
+
<?php esc_html_e( 'Login', 'strong-testimonials' ); ?>
|
18 |
</a>
|
19 |
<?php else: ?>
|
20 |
<?php wpmtst_field_required_notice(); ?>
|
templates/unstyled/content.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.disabled {
|
2 |
display:none !important;
|
3 |
}
|
4 |
|
1 |
+
.strong-view.wpmtst-unstyled.disabled {
|
2 |
display:none !important;
|
3 |
}
|
4 |
|