Version Description
= 2.12.0 =
- CSS and JavaScript renaming
-
bottom_text
renamed tobottom-text
-
close_quote
renamed toclose-quote
-
display_none
renamed todisplay-none
-
join_location
renamed tojoin-location
-
join_title
renamed tojoin-title
-
open_quote
renamed toopen-quote
-
testimonialswidget_testimonial
renamed totestimonials-widget-testimonial
-
testimonialswidget_testimonials
renamed totestimonials-widget-testimonials
-
= 2.11.3 =
- Correct filter name
testimonials_widget_next_posts_link
totestimonials_widget_next_posts_link_text
= 2.11.0 =
- CSS class names are simplified. For the most part, other than
testimonialswidget_testimonial
removetestimonialswidget_
from the CSS class name in your CSS customizations.- Ex:
.testimonialswidget_join
becomes.join
- Ex:
.testimonialswidget_author
becomes.author
- Ex:
- Testimonials are now formatted using
blockquote
thanq
for HTML5 compliance. If you needq
tag formatting, enable it at WP Admin > Testimonials > Settings, Compatibility & Reset tab-
cite
is nowdiv.credit
-
= 2.8.0 =
- Deprecated
-
hide_author
nowhide_source
-
- Removed filters
testimonials_widget_options_update
,testimonials_widget_options_form
- Use
testimonials_widget_validate_settings
andtestimonials_widget_settings
instead
- Use
- Renamed variable and related class
widget_text
tobottom_text
= 2.7.3 =
- Quotes are no longer handled via
q
,p:before
, orp:after
CSS. It's handled via.testimonialswidget_testimonial .testimonialswidget_open_quote:before
and.testimonialswidget_testimonial .testimonialswidget_close_quote:after
- This change was made to keep consistency in how quotes were managed and to reduce the number of exception cases. In the end, this is simpler.
= 2.7.0 =
- Quotes with
keep_whitespace=true
aren't applied via CSS.testimonialswidget_testimonial q
tag anymore, but.testimonialswidget_testimonial q p:first-child:before
and.testimonialswidget_testimonial q p:last-child:after
- Widget testimonial
p
tags are no longer CSSdisplay: inline
,display: block
as expected
= 2.4.1 =
- Paging is on by default, except for widgets
= 2.0.0 =
- CSS
- Class
testimonialswidget_company
replacestestimonialswidget_source
- Class
testimonialswidget_source
replacestestimonialswidget_author
- The tighten widget display up, p tags within q are displayed inline.
- Class
- JavaScript
- The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires
wp_footer()
in the footer.
- The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires
- Shortcode options
-
hide_source
replaced byhide_url
-
hide_author
replaced byhide_source
-
- Testimonials
- Migration from the old custom table to new custom post type is automatically done. Import might take a few moments to complete.
- Company, URL and email details are attempted to be identified and placed properly based upon the original author and source fields. The company is "guessed" from the
author
field when there's a ", " or " of " context. If thesource
is an email, it's saved as such. Otherwise, it's assumed to be a URL. - Public testimonials are saved as Published. Non-public testimonials are marked as Private.
- Widget options
- "Show author" and "Show source" options are replaced by "Hide source" and "Hide URL" respectively. There's no backwards compatibility for these changes.
- Default
min-height
is now 250px than 150px.
Download this release
Release Info
Developer | comprock |
Plugin | Testimonials Widget |
Version | 2.12.8 |
Comparing to | |
See all releases |
Code changes from version 2.12.7 to 2.12.8
- changelog.txt +6 -0
- languages/testimonials-widget.pot +25 -25
- lib/class-settings-testimonials-widget.php +120 -122
- phpcs.ruleset.xml +1 -1
- readme.txt +4 -2
- testimonials-widget.php +4 -4
changelog.txt
CHANGED
@@ -4,6 +4,12 @@
|
|
4 |
|
5 |
= trunk =
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
= 2.12.7 =
|
8 |
* BUGFIX Link targets affected page navigation
|
9 |
* Removed donate monthly show code
|
4 |
|
5 |
= trunk =
|
6 |
|
7 |
+
= 2.12.8 =
|
8 |
+
* Add filter `testimonials_widget_cite_html` to adjust cite contents - Thank you [Dimitrios](http://visualweb.gr/) for the suggestion
|
9 |
+
* BUGFIX Warning: Illegal string offset 'exclude'
|
10 |
+
* Replace __ with esc_html__
|
11 |
+
* Update Premium features
|
12 |
+
|
13 |
= 2.12.7 =
|
14 |
* BUGFIX Link targets affected page navigation
|
15 |
* Removed donate monthly show code
|
languages/testimonials-widget.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Testimonials Widget 2.12.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -321,27 +321,27 @@ msgid "None"
|
|
321 |
msgstr ""
|
322 |
|
323 |
#: lib/class-settings-testimonials-widget.php:346 testimonials-widget.php:466
|
324 |
-
#: testimonials-widget.php:
|
325 |
msgid "Title"
|
326 |
msgstr ""
|
327 |
|
328 |
#: lib/class-settings-testimonials-widget.php:347 testimonials-widget.php:468
|
329 |
-
#: testimonials-widget.php:
|
330 |
msgid "Email"
|
331 |
msgstr ""
|
332 |
|
333 |
#: lib/class-settings-testimonials-widget.php:348 testimonials-widget.php:467
|
334 |
-
#: testimonials-widget.php:
|
335 |
msgid "Location"
|
336 |
msgstr ""
|
337 |
|
338 |
#: lib/class-settings-testimonials-widget.php:349 testimonials-widget.php:469
|
339 |
-
#: testimonials-widget.php:
|
340 |
msgid "Company"
|
341 |
msgstr ""
|
342 |
|
343 |
#: lib/class-settings-testimonials-widget.php:350 testimonials-widget.php:470
|
344 |
-
#: testimonials-widget.php:
|
345 |
msgid "URL"
|
346 |
msgstr ""
|
347 |
|
@@ -479,7 +479,7 @@ msgstr ""
|
|
479 |
msgid "Copyright ©%1$s %2$s."
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: lib/class-settings-testimonials-widget.php:
|
483 |
msgid "Required"
|
484 |
msgstr ""
|
485 |
|
@@ -487,7 +487,7 @@ msgstr ""
|
|
487 |
msgid "Display testimonials with multiple selection and display options"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.12.
|
491 |
#. Plugin Name of the plugin/theme
|
492 |
#: lib/class-testimonials-widget-widget.php:37
|
493 |
msgid "Testimonials Widget"
|
@@ -561,7 +561,7 @@ msgstr ""
|
|
561 |
msgid "Search Testimonials"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: testimonials-widget.php:494 testimonials-widget.php:
|
565 |
msgid "Testimonial"
|
566 |
msgstr ""
|
567 |
|
@@ -573,68 +573,68 @@ msgstr ""
|
|
573 |
msgid "…"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: testimonials-widget.php:
|
577 |
msgid "«"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: testimonials-widget.php:
|
581 |
msgid "»"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: testimonials-widget.php:
|
585 |
msgid "Testimonial Data"
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: testimonials-widget.php:
|
589 |
msgid "Enter title here"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: testimonials-widget.php:
|
593 |
msgid "Enter testimonial source here"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: testimonials-widget.php:
|
597 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: testimonials-widget.php:
|
601 |
msgid "Custom field updated."
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: testimonials-widget.php:
|
605 |
msgid "Custom field deleted."
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: testimonials-widget.php:
|
609 |
msgid "Testimonial updated."
|
610 |
msgstr ""
|
611 |
|
612 |
#. translators: %s: date and time of the revision
|
613 |
-
#: testimonials-widget.php:
|
614 |
msgid "Testimonial restored to revision from %s"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: testimonials-widget.php:
|
618 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: testimonials-widget.php:
|
622 |
msgid "Testimonial saved."
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: testimonials-widget.php:
|
626 |
msgid ""
|
627 |
"Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
|
628 |
"a>"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: testimonials-widget.php:
|
632 |
msgid ""
|
633 |
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
634 |
"\"%2$s\">Preview testimonial</a>"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: testimonials-widget.php:
|
638 |
msgid ""
|
639 |
"Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
|
640 |
"testimonial</a>"
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Testimonials Widget 2.12.8\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2013-06-10 16:38:54+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
321 |
msgstr ""
|
322 |
|
323 |
#: lib/class-settings-testimonials-widget.php:346 testimonials-widget.php:466
|
324 |
+
#: testimonials-widget.php:1480
|
325 |
msgid "Title"
|
326 |
msgstr ""
|
327 |
|
328 |
#: lib/class-settings-testimonials-widget.php:347 testimonials-widget.php:468
|
329 |
+
#: testimonials-widget.php:1492
|
330 |
msgid "Email"
|
331 |
msgstr ""
|
332 |
|
333 |
#: lib/class-settings-testimonials-widget.php:348 testimonials-widget.php:467
|
334 |
+
#: testimonials-widget.php:1486
|
335 |
msgid "Location"
|
336 |
msgstr ""
|
337 |
|
338 |
#: lib/class-settings-testimonials-widget.php:349 testimonials-widget.php:469
|
339 |
+
#: testimonials-widget.php:1498
|
340 |
msgid "Company"
|
341 |
msgstr ""
|
342 |
|
343 |
#: lib/class-settings-testimonials-widget.php:350 testimonials-widget.php:470
|
344 |
+
#: testimonials-widget.php:1504
|
345 |
msgid "URL"
|
346 |
msgstr ""
|
347 |
|
479 |
msgid "Copyright ©%1$s %2$s."
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: lib/class-settings-testimonials-widget.php:966
|
483 |
msgid "Required"
|
484 |
msgstr ""
|
485 |
|
487 |
msgid "Display testimonials with multiple selection and display options"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.12.8) #-#-#-#-#
|
491 |
#. Plugin Name of the plugin/theme
|
492 |
#: lib/class-testimonials-widget-widget.php:37
|
493 |
msgid "Testimonials Widget"
|
561 |
msgid "Search Testimonials"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: testimonials-widget.php:494 testimonials-widget.php:1592
|
565 |
msgid "Testimonial"
|
566 |
msgstr ""
|
567 |
|
573 |
msgid "…"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: testimonials-widget.php:1218
|
577 |
msgid "«"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: testimonials-widget.php:1227
|
581 |
msgid "»"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: testimonials-widget.php:1516
|
585 |
msgid "Testimonial Data"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: testimonials-widget.php:1541
|
589 |
msgid "Enter title here"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: testimonials-widget.php:1542
|
593 |
msgid "Enter testimonial source here"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: testimonials-widget.php:1567
|
597 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: testimonials-widget.php:1568
|
601 |
msgid "Custom field updated."
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: testimonials-widget.php:1569
|
605 |
msgid "Custom field deleted."
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: testimonials-widget.php:1570
|
609 |
msgid "Testimonial updated."
|
610 |
msgstr ""
|
611 |
|
612 |
#. translators: %s: date and time of the revision
|
613 |
+
#: testimonials-widget.php:1572
|
614 |
msgid "Testimonial restored to revision from %s"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: testimonials-widget.php:1573
|
618 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: testimonials-widget.php:1574
|
622 |
msgid "Testimonial saved."
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: testimonials-widget.php:1575
|
626 |
msgid ""
|
627 |
"Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
|
628 |
"a>"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: testimonials-widget.php:1576
|
632 |
msgid ""
|
633 |
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
634 |
"\"%2$s\">Preview testimonial</a>"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: testimonials-widget.php:1577
|
638 |
msgid ""
|
639 |
"Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
|
640 |
"testimonial</a>"
|
lib/class-settings-testimonials-widget.php
CHANGED
@@ -61,13 +61,13 @@ class Testimonials_Widget_Settings {
|
|
61 |
|
62 |
|
63 |
public static function sections() {
|
64 |
-
self::$sections['general'] =
|
65 |
-
self::$sections['selection'] =
|
66 |
-
self::$sections['ordering'] =
|
67 |
-
self::$sections['widget'] =
|
68 |
-
self::$sections['post_type'] =
|
69 |
-
self::$sections['reset'] =
|
70 |
-
self::$sections['about'] =
|
71 |
|
72 |
self::$sections = apply_filters( 'testimonials_widget_sections', self::$sections );
|
73 |
}
|
@@ -82,71 +82,71 @@ class Testimonials_Widget_Settings {
|
|
82 |
// Widget
|
83 |
self::$settings['title'] = array(
|
84 |
'section' => 'widget',
|
85 |
-
'title' =>
|
86 |
-
'std' =>
|
87 |
'validate' => 'wp_kses_post',
|
88 |
);
|
89 |
|
90 |
self::$settings['title_link'] = array(
|
91 |
'section' => 'widget',
|
92 |
-
'title' =>
|
93 |
-
'desc' =>
|
94 |
'validate' => 'wp_kses_data',
|
95 |
);
|
96 |
|
97 |
self::$settings['char_limit'] = array(
|
98 |
'section' => 'widget',
|
99 |
-
'title' =>
|
100 |
-
'desc' =>
|
101 |
'validate' => 'absint',
|
102 |
);
|
103 |
|
104 |
self::$settings['height'] = array(
|
105 |
'section' => 'widget',
|
106 |
-
'title' =>
|
107 |
-
'desc' =>
|
108 |
'validate' => 'min1',
|
109 |
);
|
110 |
|
111 |
self::$settings['refresh_interval'] = array(
|
112 |
'section' => 'widget',
|
113 |
-
'title' =>
|
114 |
-
'desc' =>
|
115 |
'std' => 5,
|
116 |
'validate' => 'absint',
|
117 |
);
|
118 |
|
119 |
self::$settings['widget_expand_begin'] = array(
|
120 |
'section' => 'widget',
|
121 |
-
'desc' =>
|
122 |
'type' => 'expand_begin',
|
123 |
);
|
124 |
|
125 |
self::$settings['keep_whitespace'] = array(
|
126 |
'section' => 'widget',
|
127 |
-
'title' =>
|
128 |
-
'desc' =>
|
129 |
'type' => 'checkbox',
|
130 |
);
|
131 |
|
132 |
self::$settings['min_height'] = array(
|
133 |
'section' => 'widget',
|
134 |
-
'title' =>
|
135 |
-
'desc' =>
|
136 |
'validate' => 'min1',
|
137 |
);
|
138 |
|
139 |
self::$settings['max_height'] = array(
|
140 |
'section' => 'widget',
|
141 |
-
'title' =>
|
142 |
-
'desc' =>
|
143 |
'validate' => 'min1',
|
144 |
);
|
145 |
|
146 |
self::$settings['bottom_text'] = array(
|
147 |
'section' => 'widget',
|
148 |
-
'title' =>
|
149 |
-
'desc' =>
|
150 |
'type' => 'textarea',
|
151 |
'validate' => 'wp_kses_post',
|
152 |
);
|
@@ -158,89 +158,89 @@ class Testimonials_Widget_Settings {
|
|
158 |
|
159 |
// General
|
160 |
self::$settings['general_expand_begin'] = array(
|
161 |
-
'desc' =>
|
162 |
'type' => 'expand_begin',
|
163 |
);
|
164 |
|
165 |
self::$settings['disable_quotes'] = array(
|
166 |
-
'title' =>
|
167 |
-
'desc' =>
|
168 |
'type' => 'checkbox',
|
169 |
);
|
170 |
|
171 |
self::$settings['hide_not_found'] = array(
|
172 |
-
'title' =>
|
173 |
'type' => 'checkbox',
|
174 |
);
|
175 |
|
176 |
self::$settings['hide_gravatar'] = array(
|
177 |
-
'title' =>
|
178 |
'type' => 'checkbox',
|
179 |
);
|
180 |
|
181 |
self::$settings['hide_image'] = array(
|
182 |
-
'title' =>
|
183 |
'type' => 'checkbox',
|
184 |
);
|
185 |
|
186 |
self::$settings['hide_image_single'] = array(
|
187 |
-
'title' =>
|
188 |
'type' => 'checkbox',
|
189 |
'widget' => 0,
|
190 |
);
|
191 |
|
192 |
self::$settings['hide_content'] = array(
|
193 |
-
'title' =>
|
194 |
'type' => 'checkbox',
|
195 |
);
|
196 |
|
197 |
self::$settings['hide_source'] = array(
|
198 |
-
'title' =>
|
199 |
'type' => 'checkbox',
|
200 |
-
'desc' =>
|
201 |
);
|
202 |
|
203 |
self::$settings['hide_email'] = array(
|
204 |
-
'title' =>
|
205 |
'type' => 'checkbox',
|
206 |
'std' => 1,
|
207 |
);
|
208 |
|
209 |
self::$settings['hide_title'] = array(
|
210 |
-
'title' =>
|
211 |
'type' => 'checkbox',
|
212 |
);
|
213 |
|
214 |
self::$settings['hide_location'] = array(
|
215 |
-
'title' =>
|
216 |
'type' => 'checkbox',
|
217 |
);
|
218 |
|
219 |
self::$settings['hide_company'] = array(
|
220 |
-
'title' =>
|
221 |
'type' => 'checkbox',
|
222 |
);
|
223 |
|
224 |
self::$settings['hide_url'] = array(
|
225 |
-
'title' =>
|
226 |
'type' => 'checkbox',
|
227 |
);
|
228 |
|
229 |
self::$settings['target'] = array(
|
230 |
-
'title' =>
|
231 |
-
'desc' =>
|
232 |
'validate' => 'term',
|
233 |
);
|
234 |
|
235 |
self::$settings['paging'] = array(
|
236 |
-
'title' =>
|
237 |
-
'desc' =>
|
238 |
'type' => 'select',
|
239 |
'choices' => array(
|
240 |
-
'' =>
|
241 |
-
1 =>
|
242 |
-
'before' =>
|
243 |
-
'after' =>
|
244 |
),
|
245 |
'std' => 1,
|
246 |
'widget' => 0,
|
@@ -253,49 +253,49 @@ class Testimonials_Widget_Settings {
|
|
253 |
// Selection
|
254 |
self::$settings['selection_expand_begin'] = array(
|
255 |
'section' => 'selection',
|
256 |
-
'desc' =>
|
257 |
'type' => 'expand_begin',
|
258 |
);
|
259 |
|
260 |
self::$settings['category'] = array(
|
261 |
'section' => 'selection',
|
262 |
-
'title' =>
|
263 |
-
'desc' =>
|
264 |
'validate' => 'slugs',
|
265 |
);
|
266 |
|
267 |
self::$settings['tags'] = array(
|
268 |
'section' => 'selection',
|
269 |
-
'title' =>
|
270 |
-
'desc' =>
|
271 |
'validate' => 'slugs',
|
272 |
);
|
273 |
|
274 |
self::$settings['tags_all'] = array(
|
275 |
'section' => 'selection',
|
276 |
-
'title' =>
|
277 |
-
'desc' =>
|
278 |
'type' => 'checkbox',
|
279 |
);
|
280 |
|
281 |
self::$settings['ids'] = array(
|
282 |
'section' => 'selection',
|
283 |
-
'title' =>
|
284 |
-
'desc' =>
|
285 |
'validate' => 'ids',
|
286 |
);
|
287 |
|
288 |
self::$settings['exclude'] = array(
|
289 |
'section' => 'selection',
|
290 |
-
'title' =>
|
291 |
-
'desc' =>
|
292 |
'validate' => 'ids',
|
293 |
);
|
294 |
|
295 |
self::$settings['limit'] = array(
|
296 |
'section' => 'selection',
|
297 |
-
'title' =>
|
298 |
-
'desc' =>
|
299 |
'std' => 10,
|
300 |
'validate' => 'nozero',
|
301 |
);
|
@@ -308,29 +308,29 @@ class Testimonials_Widget_Settings {
|
|
308 |
// Ordering
|
309 |
self::$settings['ordering_expand_begin'] = array(
|
310 |
'section' => 'ordering',
|
311 |
-
'desc' =>
|
312 |
'type' => 'expand_begin',
|
313 |
);
|
314 |
|
315 |
self::$settings['random'] = array(
|
316 |
'section' => 'ordering',
|
317 |
-
'title' =>
|
318 |
-
'desc' =>
|
319 |
'type' => 'checkbox',
|
320 |
);
|
321 |
|
322 |
self::$settings['orderby'] = array(
|
323 |
'section' => 'ordering',
|
324 |
-
'title' =>
|
325 |
-
'desc' =>
|
326 |
'type' => 'select',
|
327 |
'choices' => array(
|
328 |
-
'ID' =>
|
329 |
-
'author' =>
|
330 |
-
'date' =>
|
331 |
-
'menu_order' =>
|
332 |
-
'title' =>
|
333 |
-
'none' =>
|
334 |
),
|
335 |
'std' => 'ID',
|
336 |
'validate' => 'term',
|
@@ -338,27 +338,27 @@ class Testimonials_Widget_Settings {
|
|
338 |
|
339 |
self::$settings['meta_key'] = array(
|
340 |
'section' => 'ordering',
|
341 |
-
'title' =>
|
342 |
-
'desc' =>
|
343 |
'type' => 'select',
|
344 |
'choices' => array(
|
345 |
-
'' =>
|
346 |
-
'testimonials-widget-title' =>
|
347 |
-
'testimonials-widget-email' =>
|
348 |
-
'testimonials-widget-location' =>
|
349 |
-
'testimonials-widget-company' =>
|
350 |
-
'testimonials-widget-url' =>
|
351 |
),
|
352 |
'validate' => 'slug',
|
353 |
);
|
354 |
|
355 |
self::$settings['order'] = array(
|
356 |
'section' => 'ordering',
|
357 |
-
'title' =>
|
358 |
'type' => 'select',
|
359 |
'choices' => array(
|
360 |
-
'DESC' =>
|
361 |
-
'ASC' =>
|
362 |
),
|
363 |
'std' => 'DESC',
|
364 |
'validate' => 'order',
|
@@ -372,30 +372,30 @@ class Testimonials_Widget_Settings {
|
|
372 |
// Post Type
|
373 |
self::$settings['allow_comments'] = array(
|
374 |
'section' => 'post_type',
|
375 |
-
'title' =>
|
376 |
-
'desc' =>
|
377 |
'type' => 'checkbox',
|
378 |
'widget' => 0,
|
379 |
);
|
380 |
|
381 |
-
$desc =
|
382 |
$has_archive = tw_get_option( 'has_archive', '' );
|
383 |
$site_url = site_url( '/' . $has_archive );
|
384 |
|
385 |
self::$settings['has_archive'] = array(
|
386 |
'section' => 'post_type',
|
387 |
-
'title' =>
|
388 |
'desc' => sprintf( $desc, $site_url ),
|
389 |
'std' => 'testimonials-archive',
|
390 |
'validate' => 'sanitize_title',
|
391 |
'widget' => 0,
|
392 |
);
|
393 |
|
394 |
-
$desc =
|
395 |
|
396 |
self::$settings['rewrite_slug'] = array(
|
397 |
'section' => 'post_type',
|
398 |
-
'title' =>
|
399 |
'desc' => $desc,
|
400 |
'std' => 'testimonial',
|
401 |
'validate' => 'sanitize_title',
|
@@ -405,14 +405,14 @@ class Testimonials_Widget_Settings {
|
|
405 |
// Reset
|
406 |
self::$settings['reset_expand_begin'] = array(
|
407 |
'section' => 'reset',
|
408 |
-
'desc' =>
|
409 |
'type' => 'expand_begin',
|
410 |
);
|
411 |
|
412 |
self::$settings['remove_hentry'] = array(
|
413 |
'section' => 'reset',
|
414 |
-
'title' =>
|
415 |
-
'desc' =>
|
416 |
'type' => 'checkbox',
|
417 |
'backwards' => array(
|
418 |
'version' => '2.6.4',
|
@@ -422,8 +422,8 @@ class Testimonials_Widget_Settings {
|
|
422 |
|
423 |
self::$settings['use_quote_tag'] = array(
|
424 |
'section' => 'reset',
|
425 |
-
'title' =>
|
426 |
-
'desc' =>
|
427 |
'type' => 'checkbox',
|
428 |
'backwards' => array(
|
429 |
'version' => '2.11.0',
|
@@ -433,9 +433,9 @@ class Testimonials_Widget_Settings {
|
|
433 |
|
434 |
self::$settings['use_cpt_taxonomy'] = array(
|
435 |
'section' => 'reset',
|
436 |
-
'title' =>
|
437 |
'type' => 'checkbox',
|
438 |
-
'desc' =>
|
439 |
'widget' => 0,
|
440 |
);
|
441 |
|
@@ -446,9 +446,9 @@ class Testimonials_Widget_Settings {
|
|
446 |
|
447 |
self::$settings['export'] = array(
|
448 |
'section' => 'reset',
|
449 |
-
'title' =>
|
450 |
'type' => 'readonly',
|
451 |
-
'desc' =>
|
452 |
'std' => $serialized_options,
|
453 |
'widget' => 0,
|
454 |
);
|
@@ -456,27 +456,27 @@ class Testimonials_Widget_Settings {
|
|
456 |
|
457 |
self::$settings['import'] = array(
|
458 |
'section' => 'reset',
|
459 |
-
'title' =>
|
460 |
'type' => 'textarea',
|
461 |
-
'desc' =>
|
462 |
'widget' => 0,
|
463 |
);
|
464 |
|
465 |
self::$settings['delete_data'] = array(
|
466 |
'section' => 'reset',
|
467 |
-
'title' =>
|
468 |
'type' => 'checkbox',
|
469 |
'class' => 'warning', // Custom class for CSS
|
470 |
-
'desc' =>
|
471 |
'widget' => 0,
|
472 |
);
|
473 |
|
474 |
self::$settings['reset_defaults'] = array(
|
475 |
'section' => 'reset',
|
476 |
-
'title' =>
|
477 |
'type' => 'checkbox',
|
478 |
'class' => 'warning', // Custom class for CSS
|
479 |
-
'desc' =>
|
480 |
'widget' => 0,
|
481 |
);
|
482 |
|
@@ -542,7 +542,7 @@ class Testimonials_Widget_Settings {
|
|
542 |
|
543 |
|
544 |
public function admin_menu() {
|
545 |
-
$admin_page = add_submenu_page( 'edit.php?post_type=' . Testimonials_Widget::PT,
|
546 |
|
547 |
add_action( 'admin_print_scripts-' . $admin_page, array( &$this, 'scripts' ) );
|
548 |
add_action( 'admin_print_styles-' . $admin_page, array( &$this, 'styles' ) );
|
@@ -579,9 +579,9 @@ class Testimonials_Widget_Settings {
|
|
579 |
public static function display_page() {
|
580 |
echo '<div class="wrap">
|
581 |
<div class="icon32" id="icon-options-general"></div>
|
582 |
-
<h2>' .
|
583 |
|
584 |
-
echo '<div class="updated"><p>' .
|
585 |
|
586 |
echo '<form action="options.php" method="post">';
|
587 |
|
@@ -598,7 +598,7 @@ class Testimonials_Widget_Settings {
|
|
598 |
self::do_settings_sections( self::ID );
|
599 |
|
600 |
echo '
|
601 |
-
<p class="submit"><input name="Submit" type="submit" class="button-primary" value="' .
|
602 |
</form>
|
603 |
</div>
|
604 |
';
|
@@ -610,10 +610,9 @@ class Testimonials_Widget_Settings {
|
|
610 |
<p>If you like this plugin, please <a href="http://aihr.us/about-aihrus/donate/" title="Donate for Good Karma"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="Donate for Good Karma" /></a> or <a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/" title="purchase Testimonials Widget Premium">purchase Testimonials Widget Premium</a> to help fund further development and <a href="http://wordpress.org/support/plugin/testimonials-widget" title="Support forums">support</a>.</p>
|
611 |
';
|
612 |
|
613 |
-
$text
|
614 |
-
$link
|
615 |
-
|
616 |
-
echo $copyright;
|
617 |
|
618 |
self::section_scripts();
|
619 |
|
@@ -663,12 +662,11 @@ class Testimonials_Widget_Settings {
|
|
663 |
|
664 |
|
665 |
public function display_about_section() {
|
666 |
-
echo
|
667 |
<div id="about" style="width: 70%; min-height: 225px;">
|
668 |
-
<p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="/wp-content/plugins/testimonials-widget/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="http://wordpress.org/extend/plugins/testimonials-widget/">Testimonials Widget</a> is by <a href="http://aihr.us/about-aihrus/michael-cannon-resume/">Michael Cannon</a>. He's <a title="Lot's of stuff about Peichi Liu…" href="http://peimic.com/t/peichi-liu/">Peichi’s</a> smiling man, an adventurous <a title="Water rat" href="http://www.chinesehoroscope.org/chinese_zodiac/rat/" target="_blank">water-rat</a>, <a title="Axelerant – Open Source. Engineered." href="http://axelerant.com/who-we-are">chief people officer</a>, <a title="Aihrus – website support made easy since 1999" href="http://aihr.us/about-aihrus/">chief technology officer</a>, <a title="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>, <a title="Michael's poetic like literary ramblings" href="http://peimic.com/t/poetry/">poet</a>, <a title="World Wide Opportunities on Organic Farms" href="http://peimic.com/t/WWOOF/">WWOOF’er</a> and <a title="My traveled to country list, is more than my age." href="http://peimic.com/c/travel/">world traveler</a>.</p>
|
669 |
</div>
|
670 |
-
|
671 |
-
|
672 |
}
|
673 |
|
674 |
|
@@ -786,10 +784,10 @@ EOD;
|
|
786 |
break;
|
787 |
}
|
788 |
|
789 |
-
if ( $do_echo )
|
790 |
-
echo $content;
|
791 |
-
else
|
792 |
return $content;
|
|
|
|
|
793 |
}
|
794 |
|
795 |
|
@@ -965,7 +963,7 @@ EOD;
|
|
965 |
|
966 |
case 'required':
|
967 |
if ( empty( $input[ $id ] ) )
|
968 |
-
$errors[ $id ] =
|
969 |
break;
|
970 |
|
971 |
case 'slug':
|
@@ -991,7 +989,7 @@ EOD;
|
|
991 |
|
992 |
|
993 |
public static function validate_ids( $input, $default ) {
|
994 |
-
if ( preg_match( '#^\d+(,\s?\d+)*$#', $input
|
995 |
return preg_replace( '#\s#', '', $input );
|
996 |
|
997 |
return $default;
|
61 |
|
62 |
|
63 |
public static function sections() {
|
64 |
+
self::$sections['general'] = esc_html__( 'General', 'testimonials-widget' );
|
65 |
+
self::$sections['selection'] = esc_html__( 'Selection', 'testimonials-widget' );
|
66 |
+
self::$sections['ordering'] = esc_html__( 'Ordering', 'testimonials-widget' );
|
67 |
+
self::$sections['widget'] = esc_html__( 'Widget', 'testimonials-widget' );
|
68 |
+
self::$sections['post_type'] = esc_html__( 'Post Type', 'testimonials-widget' );
|
69 |
+
self::$sections['reset'] = esc_html__( 'Compatibility & Reset', 'testimonials-widget' );
|
70 |
+
self::$sections['about'] = esc_html__( 'About Testimonials Widget', 'testimonials-widget' );
|
71 |
|
72 |
self::$sections = apply_filters( 'testimonials_widget_sections', self::$sections );
|
73 |
}
|
82 |
// Widget
|
83 |
self::$settings['title'] = array(
|
84 |
'section' => 'widget',
|
85 |
+
'title' => esc_html__( 'Widget Title', 'testimonials-widget' ),
|
86 |
+
'std' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
87 |
'validate' => 'wp_kses_post',
|
88 |
);
|
89 |
|
90 |
self::$settings['title_link'] = array(
|
91 |
'section' => 'widget',
|
92 |
+
'title' => esc_html__( 'Title Link', 'testimonials-widget' ),
|
93 |
+
'desc' => esc_html__( 'URL or Post ID to link widget title to. Ex: 123 or http://example.com', 'testimonials-widget' ),
|
94 |
'validate' => 'wp_kses_data',
|
95 |
);
|
96 |
|
97 |
self::$settings['char_limit'] = array(
|
98 |
'section' => 'widget',
|
99 |
+
'title' => esc_html__( 'Character Limit', 'testimonials-widget' ),
|
100 |
+
'desc' => esc_html__( 'Number of characters to limit non-single testimonial views to', 'testimonials-widget' ),
|
101 |
'validate' => 'absint',
|
102 |
);
|
103 |
|
104 |
self::$settings['height'] = array(
|
105 |
'section' => 'widget',
|
106 |
+
'title' => esc_html__( 'Height', 'testimonials-widget' ),
|
107 |
+
'desc' => esc_html__( 'Testimonials height, in pixels. Overrides minimum and maximum height', 'testimonials-widget' ),
|
108 |
'validate' => 'min1',
|
109 |
);
|
110 |
|
111 |
self::$settings['refresh_interval'] = array(
|
112 |
'section' => 'widget',
|
113 |
+
'title' => esc_html__( 'Rotation Speed', 'testimonials-widget' ),
|
114 |
+
'desc' => esc_html__( 'Number of seconds between testimonial rotations or 0 for no rotation at all refresh', 'testimonials-widget' ),
|
115 |
'std' => 5,
|
116 |
'validate' => 'absint',
|
117 |
);
|
118 |
|
119 |
self::$settings['widget_expand_begin'] = array(
|
120 |
'section' => 'widget',
|
121 |
+
'desc' => esc_html__( 'Additional Widget Options', 'testimonials-widget' ),
|
122 |
'type' => 'expand_begin',
|
123 |
);
|
124 |
|
125 |
self::$settings['keep_whitespace'] = array(
|
126 |
'section' => 'widget',
|
127 |
+
'title' => esc_html__( 'Keep Whitespace?', 'testimonials-widget' ),
|
128 |
+
'desc' => esc_html__( 'Keeps testimonials looking as entered than sans auto-formatting', 'testimonials-widget' ),
|
129 |
'type' => 'checkbox',
|
130 |
);
|
131 |
|
132 |
self::$settings['min_height'] = array(
|
133 |
'section' => 'widget',
|
134 |
+
'title' => esc_html__( 'Minimum Height', 'testimonials-widget' ),
|
135 |
+
'desc' => esc_html__( 'Set for minimum display height, in pixels', 'testimonials-widget' ),
|
136 |
'validate' => 'min1',
|
137 |
);
|
138 |
|
139 |
self::$settings['max_height'] = array(
|
140 |
'section' => 'widget',
|
141 |
+
'title' => esc_html__( 'Maximum Height', 'testimonials-widget' ),
|
142 |
+
'desc' => esc_html__( 'Set for maximum display height, in pixels', 'testimonials-widget' ),
|
143 |
'validate' => 'min1',
|
144 |
);
|
145 |
|
146 |
self::$settings['bottom_text'] = array(
|
147 |
'section' => 'widget',
|
148 |
+
'title' => esc_html__( 'Testimonial Bottom Text', 'testimonials-widget' ),
|
149 |
+
'desc' => esc_html__( 'Custom text or HTML for bottom of testimonials', 'testimonials-widget' ),
|
150 |
'type' => 'textarea',
|
151 |
'validate' => 'wp_kses_post',
|
152 |
);
|
158 |
|
159 |
// General
|
160 |
self::$settings['general_expand_begin'] = array(
|
161 |
+
'desc' => esc_html__( 'General Options', 'testimonials-widget' ),
|
162 |
'type' => 'expand_begin',
|
163 |
);
|
164 |
|
165 |
self::$settings['disable_quotes'] = array(
|
166 |
+
'title' => esc_html__( 'Hide built-in quotes?', 'testimonials-widget' ),
|
167 |
+
'desc' => esc_html__( 'Remove open and close quote span tags surrounding testimonial content', 'testimonials-widget' ),
|
168 |
'type' => 'checkbox',
|
169 |
);
|
170 |
|
171 |
self::$settings['hide_not_found'] = array(
|
172 |
+
'title' => esc_html__( 'Hide "Testimonials Not Found"?', 'testimonials-widget' ),
|
173 |
'type' => 'checkbox',
|
174 |
);
|
175 |
|
176 |
self::$settings['hide_gravatar'] = array(
|
177 |
+
'title' => esc_html__( 'Hide Gravatar Image?', 'testimonials-widget' ),
|
178 |
'type' => 'checkbox',
|
179 |
);
|
180 |
|
181 |
self::$settings['hide_image'] = array(
|
182 |
+
'title' => esc_html__( 'Hide Image?', 'testimonials-widget' ),
|
183 |
'type' => 'checkbox',
|
184 |
);
|
185 |
|
186 |
self::$settings['hide_image_single'] = array(
|
187 |
+
'title' => esc_html__( 'Hide Image in Single View?', 'testimonials-widget' ),
|
188 |
'type' => 'checkbox',
|
189 |
'widget' => 0,
|
190 |
);
|
191 |
|
192 |
self::$settings['hide_content'] = array(
|
193 |
+
'title' => esc_html__( 'Hide Testimonial Content?', 'testimonials-widget' ),
|
194 |
'type' => 'checkbox',
|
195 |
);
|
196 |
|
197 |
self::$settings['hide_source'] = array(
|
198 |
+
'title' => esc_html__( 'Hide Author/Source?', 'testimonials-widget' ),
|
199 |
'type' => 'checkbox',
|
200 |
+
'desc' => esc_html__( 'Don\'t display "Post Title" in cite', 'testimonials-widget' ),
|
201 |
);
|
202 |
|
203 |
self::$settings['hide_email'] = array(
|
204 |
+
'title' => esc_html__( 'Hide Email?', 'testimonials-widget' ),
|
205 |
'type' => 'checkbox',
|
206 |
'std' => 1,
|
207 |
);
|
208 |
|
209 |
self::$settings['hide_title'] = array(
|
210 |
+
'title' => esc_html__( 'Hide Title?', 'testimonials-widget' ),
|
211 |
'type' => 'checkbox',
|
212 |
);
|
213 |
|
214 |
self::$settings['hide_location'] = array(
|
215 |
+
'title' => esc_html__( 'Hide Location?', 'testimonials-widget' ),
|
216 |
'type' => 'checkbox',
|
217 |
);
|
218 |
|
219 |
self::$settings['hide_company'] = array(
|
220 |
+
'title' => esc_html__( 'Hide Company?', 'testimonials-widget' ),
|
221 |
'type' => 'checkbox',
|
222 |
);
|
223 |
|
224 |
self::$settings['hide_url'] = array(
|
225 |
+
'title' => esc_html__( 'Hide URL?', 'testimonials-widget' ),
|
226 |
'type' => 'checkbox',
|
227 |
);
|
228 |
|
229 |
self::$settings['target'] = array(
|
230 |
+
'title' => esc_html__( 'URL Target', 'testimonials-widget' ),
|
231 |
+
'desc' => esc_html__( 'Add target to all URLs; leave blank if none', 'testimonials-widget' ),
|
232 |
'validate' => 'term',
|
233 |
);
|
234 |
|
235 |
self::$settings['paging'] = array(
|
236 |
+
'title' => esc_html__( 'Enable Paging?', 'testimonials-widget' ),
|
237 |
+
'desc' => esc_html__( 'For `[testimonialswidget_list]`', 'testimonials-widget' ),
|
238 |
'type' => 'select',
|
239 |
'choices' => array(
|
240 |
+
'' => esc_html__( 'Disable', 'testimonials-widget' ),
|
241 |
+
1 => esc_html__( 'Enable', 'testimonials-widget' ),
|
242 |
+
'before' => esc_html__( 'Before testimonials', 'testimonials-widget' ),
|
243 |
+
'after' => esc_html__( 'After testimonials', 'testimonials-widget' ),
|
244 |
),
|
245 |
'std' => 1,
|
246 |
'widget' => 0,
|
253 |
// Selection
|
254 |
self::$settings['selection_expand_begin'] = array(
|
255 |
'section' => 'selection',
|
256 |
+
'desc' => esc_html__( 'Selection Options', 'testimonials-widget' ),
|
257 |
'type' => 'expand_begin',
|
258 |
);
|
259 |
|
260 |
self::$settings['category'] = array(
|
261 |
'section' => 'selection',
|
262 |
+
'title' => esc_html__( 'Category Filter', 'testimonials-widget' ),
|
263 |
+
'desc' => esc_html__( 'Comma separated category slug-names. Ex: category-a, another-category', 'testimonials-widget' ),
|
264 |
'validate' => 'slugs',
|
265 |
);
|
266 |
|
267 |
self::$settings['tags'] = array(
|
268 |
'section' => 'selection',
|
269 |
+
'title' => esc_html__( 'Tags Filter', 'testimonials-widget' ),
|
270 |
+
'desc' => esc_html__( 'Comma separated tag slug-names. Ex: tag-a, another-tag', 'testimonials-widget' ),
|
271 |
'validate' => 'slugs',
|
272 |
);
|
273 |
|
274 |
self::$settings['tags_all'] = array(
|
275 |
'section' => 'selection',
|
276 |
+
'title' => esc_html__( 'Require All Tags?', 'testimonials-widget' ),
|
277 |
+
'desc' => esc_html__( 'Select only testimonials with all of the given tags', 'testimonials-widget' ),
|
278 |
'type' => 'checkbox',
|
279 |
);
|
280 |
|
281 |
self::$settings['ids'] = array(
|
282 |
'section' => 'selection',
|
283 |
+
'title' => esc_html__( 'Include IDs Filter', 'testimonials-widget' ),
|
284 |
+
'desc' => esc_html__( 'Comma separated testimonial IDs. Ex: 3,1,2', 'testimonials-widget' ),
|
285 |
'validate' => 'ids',
|
286 |
);
|
287 |
|
288 |
self::$settings['exclude'] = array(
|
289 |
'section' => 'selection',
|
290 |
+
'title' => esc_html__( 'Exclude IDs Filter', 'testimonials-widget' ),
|
291 |
+
'desc' => esc_html__( 'Comma separated testimonial IDs. Ex: 3,1,2', 'testimonials-widget' ),
|
292 |
'validate' => 'ids',
|
293 |
);
|
294 |
|
295 |
self::$settings['limit'] = array(
|
296 |
'section' => 'selection',
|
297 |
+
'title' => esc_html__( 'Limit', 'testimonials-widget' ),
|
298 |
+
'desc' => esc_html__( 'Number of testimonials to select per instance', 'testimonials-widget' ),
|
299 |
'std' => 10,
|
300 |
'validate' => 'nozero',
|
301 |
);
|
308 |
// Ordering
|
309 |
self::$settings['ordering_expand_begin'] = array(
|
310 |
'section' => 'ordering',
|
311 |
+
'desc' => esc_html__( 'Ordering Options', 'testimonials-widget' ),
|
312 |
'type' => 'expand_begin',
|
313 |
);
|
314 |
|
315 |
self::$settings['random'] = array(
|
316 |
'section' => 'ordering',
|
317 |
+
'title' => esc_html__( 'Random Order?', 'testimonials-widget' ),
|
318 |
+
'desc' => esc_html__( 'If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically', 'testimonials-widget' ),
|
319 |
'type' => 'checkbox',
|
320 |
);
|
321 |
|
322 |
self::$settings['orderby'] = array(
|
323 |
'section' => 'ordering',
|
324 |
+
'title' => esc_html__( 'ORDER BY', 'testimonials-widget' ),
|
325 |
+
'desc' => esc_html__( 'Used when "Random Order" is disabled', 'testimonials-widget' ),
|
326 |
'type' => 'select',
|
327 |
'choices' => array(
|
328 |
+
'ID' => esc_html__( 'Testimonial ID', 'testimonials-widget' ),
|
329 |
+
'author' => esc_html__( 'Author', 'testimonials-widget' ),
|
330 |
+
'date' => esc_html__( 'Date', 'testimonials-widget' ),
|
331 |
+
'menu_order' => esc_html__( 'Menu Order', 'testimonials-widget' ),
|
332 |
+
'title' => esc_html__( 'Source', 'testimonials-widget' ),
|
333 |
+
'none' => esc_html__( 'No order', 'testimonials-widget' ),
|
334 |
),
|
335 |
'std' => 'ID',
|
336 |
'validate' => 'term',
|
338 |
|
339 |
self::$settings['meta_key'] = array(
|
340 |
'section' => 'ordering',
|
341 |
+
'title' => esc_html__( 'ORDER BY meta_key', 'testimonials-widget' ),
|
342 |
+
'desc' => esc_html__( 'Used when "Random Order" is disabled and sorting by a testimonials meta key is needed. Overrides ORDER BY', 'testimonials-widget' ),
|
343 |
'type' => 'select',
|
344 |
'choices' => array(
|
345 |
+
'' => esc_html__( 'None', 'testimonials-widget' ),
|
346 |
+
'testimonials-widget-title' => esc_html__( 'Title', 'testimonials-widget' ),
|
347 |
+
'testimonials-widget-email' => esc_html__( 'Email', 'testimonials-widget' ),
|
348 |
+
'testimonials-widget-location' => esc_html__( 'Location', 'testimonials-widget' ),
|
349 |
+
'testimonials-widget-company' => esc_html__( 'Company', 'testimonials-widget' ),
|
350 |
+
'testimonials-widget-url' => esc_html__( 'URL', 'testimonials-widget' ),
|
351 |
),
|
352 |
'validate' => 'slug',
|
353 |
);
|
354 |
|
355 |
self::$settings['order'] = array(
|
356 |
'section' => 'ordering',
|
357 |
+
'title' => esc_html__( 'ORDER BY Order', 'testimonials-widget' ),
|
358 |
'type' => 'select',
|
359 |
'choices' => array(
|
360 |
+
'DESC' => esc_html__( 'Descending', 'testimonials-widget' ),
|
361 |
+
'ASC' => esc_html__( 'Ascending', 'testimonials-widget' ),
|
362 |
),
|
363 |
'std' => 'DESC',
|
364 |
'validate' => 'order',
|
372 |
// Post Type
|
373 |
self::$settings['allow_comments'] = array(
|
374 |
'section' => 'post_type',
|
375 |
+
'title' => esc_html__( 'Allow Comments?', 'testimonials-widget' ),
|
376 |
+
'desc' => esc_html__( 'Only affects the Testimonials Widget post edit page. Your theme controls the front-end view.', 'testimonials-widget' ),
|
377 |
'type' => 'checkbox',
|
378 |
'widget' => 0,
|
379 |
);
|
380 |
|
381 |
+
$desc = esc_html__( 'URL slug-name for <a href="%1s">testimonials archive</a> page.', 'testimonials-widget' );
|
382 |
$has_archive = tw_get_option( 'has_archive', '' );
|
383 |
$site_url = site_url( '/' . $has_archive );
|
384 |
|
385 |
self::$settings['has_archive'] = array(
|
386 |
'section' => 'post_type',
|
387 |
+
'title' => esc_html__( 'Archive Page URL', 'testimonials-widget' ),
|
388 |
'desc' => sprintf( $desc, $site_url ),
|
389 |
'std' => 'testimonials-archive',
|
390 |
'validate' => 'sanitize_title',
|
391 |
'widget' => 0,
|
392 |
);
|
393 |
|
394 |
+
$desc = esc_html__( 'URL slug-name for testimonial view pages. Shouldn\'t be the same as Archive Page URL.', 'testimonials-widget' );
|
395 |
|
396 |
self::$settings['rewrite_slug'] = array(
|
397 |
'section' => 'post_type',
|
398 |
+
'title' => esc_html__( 'Testimonial Page URL', 'testimonials-widget' ),
|
399 |
'desc' => $desc,
|
400 |
'std' => 'testimonial',
|
401 |
'validate' => 'sanitize_title',
|
405 |
// Reset
|
406 |
self::$settings['reset_expand_begin'] = array(
|
407 |
'section' => 'reset',
|
408 |
+
'desc' => esc_html__( 'Compatiblity Options', 'testimonials-widget' ),
|
409 |
'type' => 'expand_begin',
|
410 |
);
|
411 |
|
412 |
self::$settings['remove_hentry'] = array(
|
413 |
'section' => 'reset',
|
414 |
+
'title' => esc_html__( 'Remove `.hentry` CSS?', 'testimonials-widget' ),
|
415 |
+
'desc' => esc_html__( 'Pre 2.6.4. Some themes use class `.hentry` in a manner that breaks Testimonials Widgets CSS', 'testimonials-widget' ),
|
416 |
'type' => 'checkbox',
|
417 |
'backwards' => array(
|
418 |
'version' => '2.6.4',
|
422 |
|
423 |
self::$settings['use_quote_tag'] = array(
|
424 |
'section' => 'reset',
|
425 |
+
'title' => esc_html__( 'Use `<q>` tag?', 'testimonials-widget' ),
|
426 |
+
'desc' => esc_html__( 'Pre 2.11.0. Not HTML5 compliant', 'testimonials-widget' ),
|
427 |
'type' => 'checkbox',
|
428 |
'backwards' => array(
|
429 |
'version' => '2.11.0',
|
433 |
|
434 |
self::$settings['use_cpt_taxonomy'] = array(
|
435 |
'section' => 'reset',
|
436 |
+
'title' => esc_html__( 'Don\'t Use Default Taxonomies?', 'testimonials-widget' ),
|
437 |
'type' => 'checkbox',
|
438 |
+
'desc' => esc_html__( 'If checked, use Testimonials Widget\'s own category and tag taxonomies instead', 'testimonials-widget' ),
|
439 |
'widget' => 0,
|
440 |
);
|
441 |
|
446 |
|
447 |
self::$settings['export'] = array(
|
448 |
'section' => 'reset',
|
449 |
+
'title' => esc_html__( 'Export Settings', 'testimonials-widget' ),
|
450 |
'type' => 'readonly',
|
451 |
+
'desc' => esc_html__( 'These are your current settings in a serialized format. Copy the contents to make a backup of your settings.', 'testimonials-widget' ),
|
452 |
'std' => $serialized_options,
|
453 |
'widget' => 0,
|
454 |
);
|
456 |
|
457 |
self::$settings['import'] = array(
|
458 |
'section' => 'reset',
|
459 |
+
'title' => esc_html__( 'Import Settings', 'testimonials-widget' ),
|
460 |
'type' => 'textarea',
|
461 |
+
'desc' => esc_html__( 'Paste new serialized settings here to overwrite your current configuration.', 'testimonials-widget' ),
|
462 |
'widget' => 0,
|
463 |
);
|
464 |
|
465 |
self::$settings['delete_data'] = array(
|
466 |
'section' => 'reset',
|
467 |
+
'title' => esc_html__( 'Remove Plugin Data on Deletion?', 'testimonials-widget' ),
|
468 |
'type' => 'checkbox',
|
469 |
'class' => 'warning', // Custom class for CSS
|
470 |
+
'desc' => esc_html__( 'Delete all Testimonials Widget data and options from database on plugin deletion', 'testimonials-widget' ),
|
471 |
'widget' => 0,
|
472 |
);
|
473 |
|
474 |
self::$settings['reset_defaults'] = array(
|
475 |
'section' => 'reset',
|
476 |
+
'title' => esc_html__( 'Reset to Defaults?', 'testimonials-widget' ),
|
477 |
'type' => 'checkbox',
|
478 |
'class' => 'warning', // Custom class for CSS
|
479 |
+
'desc' => esc_html__( 'Check this box to reset options to their defaults', 'testimonials-widget' ),
|
480 |
'widget' => 0,
|
481 |
);
|
482 |
|
542 |
|
543 |
|
544 |
public function admin_menu() {
|
545 |
+
$admin_page = add_submenu_page( 'edit.php?post_type=' . Testimonials_Widget::PT, esc_html__( 'Testimonials Widget Settings', 'testimonials-widget' ), esc_html__( 'Settings', 'testimonials-widget' ), 'manage_options', self::ID, array( 'Testimonials_Widget_Settings', 'display_page' ) );
|
546 |
|
547 |
add_action( 'admin_print_scripts-' . $admin_page, array( &$this, 'scripts' ) );
|
548 |
add_action( 'admin_print_styles-' . $admin_page, array( &$this, 'styles' ) );
|
579 |
public static function display_page() {
|
580 |
echo '<div class="wrap">
|
581 |
<div class="icon32" id="icon-options-general"></div>
|
582 |
+
<h2>' . esc_html__( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
|
583 |
|
584 |
+
echo '<div class="updated"><p>' . esc_html__( 'These Testimonials Widget Settings establish the default option values for shortcodes, theme functions, and widget instances. Widgets, once created no longer inherit these global settings. Therefore, you\'ll need to update each widget with the new settings. It might be easier to delete the widget and then recreate it.', 'testimonials-widget' ) . '</p></div>';
|
585 |
|
586 |
echo '<form action="options.php" method="post">';
|
587 |
|
598 |
self::do_settings_sections( self::ID );
|
599 |
|
600 |
echo '
|
601 |
+
<p class="submit"><input name="Submit" type="submit" class="button-primary" value="' . esc_html__( 'Save Changes', 'testimonials-widget' ) . '" /></p>
|
602 |
</form>
|
603 |
</div>
|
604 |
';
|
610 |
<p>If you like this plugin, please <a href="http://aihr.us/about-aihrus/donate/" title="Donate for Good Karma"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="Donate for Good Karma" /></a> or <a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/" title="purchase Testimonials Widget Premium">purchase Testimonials Widget Premium</a> to help fund further development and <a href="http://wordpress.org/support/plugin/testimonials-widget" title="Support forums">support</a>.</p>
|
611 |
';
|
612 |
|
613 |
+
$text = esc_html__( 'Copyright ©%1$s %2$s.', 'testimonials-widget' );
|
614 |
+
$link = '<a href="http://aihr.us">Aihrus</a>';
|
615 |
+
echo '<p class="copyright">' . sprintf( $text, date( 'Y' ), $link ) . '</p>';
|
|
|
616 |
|
617 |
self::section_scripts();
|
618 |
|
662 |
|
663 |
|
664 |
public function display_about_section() {
|
665 |
+
echo '
|
666 |
<div id="about" style="width: 70%; min-height: 225px;">
|
667 |
+
<p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="/wp-content/plugins/testimonials-widget/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="http://wordpress.org/extend/plugins/testimonials-widget/">Testimonials Widget</a> is by <a href="http://aihr.us/about-aihrus/michael-cannon-resume/">Michael Cannon</a>. He\'s <a title="Lot\'s of stuff about Peichi Liu…" href="http://peimic.com/t/peichi-liu/">Peichi’s</a> smiling man, an adventurous <a title="Water rat" href="http://www.chinesehoroscope.org/chinese_zodiac/rat/" target="_blank">water-rat</a>, <a title="Axelerant – Open Source. Engineered." href="http://axelerant.com/who-we-are">chief people officer</a>, <a title="Aihrus – website support made easy since 1999" href="http://aihr.us/about-aihrus/">chief technology officer</a>, <a title="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>, <a title="Michael\'s poetic like literary ramblings" href="http://peimic.com/t/poetry/">poet</a>, <a title="World Wide Opportunities on Organic Farms" href="http://peimic.com/t/WWOOF/">WWOOF’er</a> and <a title="My traveled to country list, is more than my age." href="http://peimic.com/c/travel/">world traveler</a>.</p>
|
668 |
</div>
|
669 |
+
';
|
|
|
670 |
}
|
671 |
|
672 |
|
784 |
break;
|
785 |
}
|
786 |
|
787 |
+
if ( ! $do_echo )
|
|
|
|
|
788 |
return $content;
|
789 |
+
|
790 |
+
echo $content;
|
791 |
}
|
792 |
|
793 |
|
963 |
|
964 |
case 'required':
|
965 |
if ( empty( $input[ $id ] ) )
|
966 |
+
$errors[ $id ] = esc_html__( 'Required', 'testimonials-widget' );
|
967 |
break;
|
968 |
|
969 |
case 'slug':
|
989 |
|
990 |
|
991 |
public static function validate_ids( $input, $default ) {
|
992 |
+
if ( preg_match( '#^\d+(,\s?\d+)*$#', $input ) )
|
993 |
return preg_replace( '#\s#', '', $input );
|
994 |
|
995 |
return $default;
|
phpcs.ruleset.xml
CHANGED
@@ -25,6 +25,6 @@
|
|
25 |
</rule>
|
26 |
|
27 |
<rule ref="WordPress">
|
28 |
-
<
|
29 |
</rule>
|
30 |
</ruleset>
|
25 |
</rule>
|
26 |
|
27 |
<rule ref="WordPress">
|
28 |
+
<xexclude name="WordPress.XSS.EscapeOutput" />
|
29 |
</rule>
|
30 |
</ruleset>
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://aihr.us/about-aihrus/donate/
|
|
5 |
Tags: client, customer, quotations, quote, quotes, random, review, quote, recommendation, reference, testimonial, testimonials, testimony, widget, wpml
|
6 |
Requires at least: 3.4
|
7 |
Tested up to: 3.6.0
|
8 |
-
Stable tag: 2.12.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -56,6 +56,7 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
|
|
56 |
* Excerpts for widget view, with read more link to complete testimonial
|
57 |
* Filters for caching and more link control, text replacement, and more
|
58 |
* Front-end entry form for user supplied testimonials. [Live demo](http://aihr.us/about-aihrus/testimonials/add-testimonial/)
|
|
|
59 |
* Multiple anti-spam traps
|
60 |
* Multiple user-entry forms on same page are allowed
|
61 |
* Plugin version tracking to ensure compatibility
|
@@ -64,7 +65,7 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
|
|
64 |
* Read more links for testimonials exceeding the character limit
|
65 |
* Right Now Dashboard widget displays "Pending Testimonials" counts
|
66 |
* Select only testimonials with excerpts, images or of arbitrary maximum and minimum length
|
67 |
-
* Select post, page and other custom post types for content rotations
|
68 |
* Settings and URL based cache clearing
|
69 |
* Shortcodes and theme functions for testimonials count and testimonial link list
|
70 |
* Shortcodes, theme functions, and widget user testimonial submission form
|
@@ -255,6 +256,7 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
255 |
|
256 |
* `testimonials_widget_cache_get` - Caching grabber
|
257 |
* `testimonials_widget_cache_set` - Caching setter
|
|
|
258 |
* `testimonials_widget_columns` - Customize testimonial posts column headers
|
259 |
* `testimonials_widget_content_more` - More content ellipsis
|
260 |
* `testimonials_widget_content` - Testimonial content parser helper
|
5 |
Tags: client, customer, quotations, quote, quotes, random, review, quote, recommendation, reference, testimonial, testimonials, testimony, widget, wpml
|
6 |
Requires at least: 3.4
|
7 |
Tested up to: 3.6.0
|
8 |
+
Stable tag: 2.12.8
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
56 |
* Excerpts for widget view, with read more link to complete testimonial
|
57 |
* Filters for caching and more link control, text replacement, and more
|
58 |
* Front-end entry form for user supplied testimonials. [Live demo](http://aihr.us/about-aihrus/testimonials/add-testimonial/)
|
59 |
+
* Math-based CAPTCHA
|
60 |
* Multiple anti-spam traps
|
61 |
* Multiple user-entry forms on same page are allowed
|
62 |
* Plugin version tracking to ensure compatibility
|
65 |
* Read more links for testimonials exceeding the character limit
|
66 |
* Right Now Dashboard widget displays "Pending Testimonials" counts
|
67 |
* Select only testimonials with excerpts, images or of arbitrary maximum and minimum length
|
68 |
+
* Select post, page and other custom post types for content rotations slider
|
69 |
* Settings and URL based cache clearing
|
70 |
* Shortcodes and theme functions for testimonials count and testimonial link list
|
71 |
* Shortcodes, theme functions, and widget user testimonial submission form
|
256 |
|
257 |
* `testimonials_widget_cache_get` - Caching grabber
|
258 |
* `testimonials_widget_cache_set` - Caching setter
|
259 |
+
* `testimonials_widget_cite_html` - Adjust cite contents
|
260 |
* `testimonials_widget_columns` - Customize testimonial posts column headers
|
261 |
* `testimonials_widget_content_more` - More content ellipsis
|
262 |
* `testimonials_widget_content` - Testimonial content parser helper
|
testimonials-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Testimonials Widget
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/testimonials-widget/
|
5 |
* Description: Testimonials Widget plugin allows you to display random or selected portfolio, quotes, reviews, showcases, or text with images on your WordPress blog.
|
6 |
-
* Version: 2.12.
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
|
9 |
* License: GPLv2 or later
|
@@ -31,7 +31,7 @@ class Testimonials_Widget {
|
|
31 |
const OLD_NAME = 'testimonialswidget';
|
32 |
const PLUGIN_FILE = 'testimonials-widget/testimonials-widget.php';
|
33 |
const PT = 'testimonials-widget';
|
34 |
-
const VERSION = '2.12.
|
35 |
|
36 |
private static $base = null;
|
37 |
private static $max_num_pages = 0;
|
@@ -1001,6 +1001,8 @@ EOF;
|
|
1001 |
$cite .= '</span>';
|
1002 |
}
|
1003 |
|
|
|
|
|
1004 |
if ( ! empty( $cite ) ) {
|
1005 |
if ( empty( $use_quote_tag ) ) {
|
1006 |
$temp = '<div class="credit">';
|
@@ -1111,7 +1113,6 @@ EOF;
|
|
1111 |
} else {
|
1112 |
// Handle HTML tag
|
1113 |
$tag_inner = $match[1][0];
|
1114 |
-
|
1115 |
if ( $tag[1] == '/' ) {
|
1116 |
// This is a closing tag.
|
1117 |
$output .= $tag;
|
@@ -1610,7 +1611,6 @@ if ( is_plugin_active( Testimonials_Widget::PLUGIN_FILE ) ) {
|
|
1610 |
}
|
1611 |
|
1612 |
|
1613 |
-
|
1614 |
function testimonialswidget_list( $atts = array() ) {
|
1615 |
global $Testimonials_Widget;
|
1616 |
|
3 |
* Plugin Name: Testimonials Widget
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/testimonials-widget/
|
5 |
* Description: Testimonials Widget plugin allows you to display random or selected portfolio, quotes, reviews, showcases, or text with images on your WordPress blog.
|
6 |
+
* Version: 2.12.8
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
|
9 |
* License: GPLv2 or later
|
31 |
const OLD_NAME = 'testimonialswidget';
|
32 |
const PLUGIN_FILE = 'testimonials-widget/testimonials-widget.php';
|
33 |
const PT = 'testimonials-widget';
|
34 |
+
const VERSION = '2.12.8';
|
35 |
|
36 |
private static $base = null;
|
37 |
private static $max_num_pages = 0;
|
1001 |
$cite .= '</span>';
|
1002 |
}
|
1003 |
|
1004 |
+
$cite = apply_filters( 'testimonials_widget_cite_html', $cite, $testimonial, $atts );
|
1005 |
+
|
1006 |
if ( ! empty( $cite ) ) {
|
1007 |
if ( empty( $use_quote_tag ) ) {
|
1008 |
$temp = '<div class="credit">';
|
1113 |
} else {
|
1114 |
// Handle HTML tag
|
1115 |
$tag_inner = $match[1][0];
|
|
|
1116 |
if ( $tag[1] == '/' ) {
|
1117 |
// This is a closing tag.
|
1118 |
$output .= $tag;
|
1611 |
}
|
1612 |
|
1613 |
|
|
|
1614 |
function testimonialswidget_list( $atts = array() ) {
|
1615 |
global $Testimonials_Widget;
|
1616 |
|