Testimonials Widget - Version 2.14.0

Version Description

  • 60 modifications See Changelog
  • CSS wp_register_style and wp_enqueue_style slug changed from 'testimonials-widget' to 'Testimonials_Widget'
  • Gravatar image size now based upon Thumbnail size in Media Settings
  • Scripts ksort removed. Use array_unshift in your testimonials_widget_testimonials_js filters instead.
  • Testimonials > Settings, General tab, option Enable Review Schema? is enabled by default.
Download this release

Release Info

Developer comprock
Plugin Icon wp plugin Testimonials Widget
Version 2.14.0
Comparing to
See all releases

Code changes from version 2.13.6 to 2.14.0

API.md CHANGED
@@ -10,7 +10,15 @@ The [Testimonials Widget plugin](http://wordpress.org/plugins/testimonials-widge
10
 
11
  * `testimonials_widget_scripts`
12
 
13
- Made additional `wp_register_script` and `wp_enqueue_script` calls as needed.
 
 
 
 
 
 
 
 
14
 
15
  ## Filters
16
 
@@ -76,6 +84,30 @@ The [Testimonials Widget plugin](http://wordpress.org/plugins/testimonials-widge
76
 
77
  Configure WP-PageNavi specifically for Testimonial Widgets. [example](https://aihrus.zendesk.com/entries/23679361-How-do-I-get-page-numbers-for-pagination-)
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  ### Backend
81
 
@@ -139,6 +171,9 @@ The [Testimonials Widget plugin](http://wordpress.org/plugins/testimonials-widge
139
 
140
  Alters displayed widget options. [example](https://gist.github.com/michael-cannon/5833782)
141
 
 
 
 
142
 
143
  ## Need More?
144
 
10
 
11
  * `testimonials_widget_scripts`
12
 
13
+ Make additional `wp_register_script` and `wp_enqueue_script` calls as needed.
14
+
15
+ * `testimonials_widget_styles`
16
+
17
+ Make additional `wp_register_style` and `wp_enqueue_style` calls as needed.
18
+
19
+ * `testimonials_widget_update`
20
+
21
+ Make additional update related calls as needed.
22
 
23
  ## Filters
24
 
84
 
85
  Configure WP-PageNavi specifically for Testimonial Widgets. [example](https://aihrus.zendesk.com/entries/23679361-How-do-I-get-page-numbers-for-pagination-)
86
 
87
+ * `testimonials_widget_review_name_length`
88
+
89
+ Maximium length of review schema's name. Default is 156 characters.
90
+
91
+ * `testimonials_widget_schema`
92
+
93
+ Customize schema contents.
94
+
95
+ * `testimonials_widget_schema_review`
96
+
97
+ Customize schema review meta contents.
98
+
99
+ * `testimonials_widget_schema_agg_rating`
100
+
101
+ Customize schema aggregate rating for item.
102
+
103
+ * `testimonials_widget_schema_author`
104
+
105
+ Customize schema author contents.
106
+
107
+ * `testimonials_widget_schema_item`
108
+
109
+ Customize schema reviewed item contents.
110
+
111
 
112
  ### Backend
113
 
171
 
172
  Alters displayed widget options. [example](https://gist.github.com/michael-cannon/5833782)
173
 
174
+ * `testimonials_widget_display_setting`
175
+
176
+ Alows for display of custom input types.
177
 
178
  ## Need More?
179
 
CHANGELOG.md CHANGED
@@ -2,6 +2,68 @@
2
 
3
  ## master
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ## 2.13.6
6
  * Add IDs column to edit testimonials listing page
7
  * Add filter `testimonials_widget_settings_add_help_tabs`
2
 
3
  ## master
4
 
5
+ ## 2.14.0
6
+ * Abstact schema generation
7
+ * Add API action testimonials_widget_styles
8
+ * Add API action testimonials_widget_update
9
+ * Add API filter testimonials_widget_display_setting
10
+ * Add API filter testimonials_widget_review_name_length
11
+ * Add API filter testimonials_widget_schema
12
+ * Add API filter testimonials_widget_schema_agg_rating
13
+ * Add API filter testimonials_widget_schema_author
14
+ * Add API filter testimonials_widget_schema_item
15
+ * Add API filter testimonials_widget_schema_review
16
+ * Add Review schema date modified
17
+ * Add aggregate review data
18
+ * Add item reviewed name and url to Review schema
19
+ * Add screenshot 19. Using Review and AggregateRating schema data structures
20
+ * Added shortcode option variable names on Settings screen
21
+ * Added validate case is_true
22
+ * Auto create Review schema name from post content - like excerpt
23
+ * BUGFIX Errors show when no testimonials
24
+ * BUGFIX Javascript and CSS not carried through when testimonials are cached
25
+ * BUGFIX PHP Notice `no_code`
26
+ * BUGFIX Schema properties contain HTML and entities
27
+ * BUGFIX Testimonials go blank during rotations (javacript var)
28
+ * BUGFIX aggregate data prevents testimonials from recycling
29
+ * BUGFIX animation transitions aren't smooth
30
+ * BUGFIX correct aggregate total
31
+ * BUGFIX gravatar size not based upon image size
32
+ * BUGFIX has_archive option network_site_url
33
+ * BUGFIX missing space after itemprop="image"
34
+ * BUGFIX paging arrows not positioned correctly
35
+ * BUGFIX schema meta method doesn't handle schema property wrapping
36
+ * BUGFIX single content not wrapped with review schema
37
+ * BUGFIX single view doesn't support caching
38
+ * BUGFIX styles not included for `get_single`
39
+ * CSS wp_register_style and wp_enqueue_style slug changed from 'testimonials-widget' to 'Testimonials_Widget'
40
+ * Clean up JavaScript
41
+ * Correct Review schema name usage
42
+ * Default `do_shortcode` on
43
+ * Default enable custom taxonomy 'show_admin_column'
44
+ * Enable [rich snippets/structured data](http://wordpress.org/support/topic/lots-of-options-4?replies=3#post-4754108) per [review schema](http://schema.org/Review)
45
+ * Gravatars saved as featured images to testimonials when no featured image exists
46
+ * Implement AggregateRating, Organization, Person, Place, Review, and Thing structured data
47
+ * Move Review schema image to `get_schema`
48
+ * Prevent `has_archive` and `rewrite_slug` matching existing slugs and same
49
+ * Refactor Review schema handling with easier API use
50
+ * Refactored CSS/JS generation and inclusion
51
+ * Refactored scripts and styles handling
52
+ * Remove `refresh_interval=0`'s automatic setting of `limit=1` - Thank you Phillip Gapp
53
+ * Remove default overrides for custom post type
54
+ * Scripts `ksort` removed. Use `array_unshift` in your `testimonials_widget_testimonials_js` filters instead.
55
+ * Travis ignore WordPress.WhiteSpace.ControlStructureSpacing - false positives
56
+ * Update FAQ
57
+ * Update TODO
58
+ * Update examples
59
+ * Update readme option ordering
60
+ * Update screenshots
61
+ * Update screenshots
62
+ * Update verbiage
63
+ * Validate reviewed_item_url as url
64
+ * [Load scripts and stylesheets only on Testimonials Page](http://wordpress.org/support/topic/load-scripts-and-stylesheets-only-on-testimonials-page)
65
+ * https jQuery transport
66
+
67
  ## 2.13.6
68
  * Add IDs column to edit testimonials listing page
69
  * Add filter `testimonials_widget_settings_add_help_tabs`
TODO.md CHANGED
@@ -2,4 +2,9 @@
2
 
3
  Is there something you want done? Write it up on the [support forums](http://wordpress.org/support/plugin/testimonials-widget) and then [donate](http://aihr.us/about-aihrus/donate/) or [write an awesome testimonial](http://aihr.us/about-aihrus/testimonials/add-testimonial/).
4
 
5
- * [Use jQuery cycle](http://wordpress.org/support/topic/animation-not-disabling?replies=12#post-4655776)
 
 
 
 
 
2
 
3
  Is there something you want done? Write it up on the [support forums](http://wordpress.org/support/plugin/testimonials-widget) and then [donate](http://aihr.us/about-aihrus/donate/) or [write an awesome testimonial](http://aihr.us/about-aihrus/testimonials/add-testimonial/).
4
 
5
+ * BUG saving settings doesn't show update notice
6
+ * Consolidate schema by testimonial item
7
+ * Show settings save errors as error notices
8
+ * [Auto-suggest category and tag options](http://wordpress.org/support/topic/feature-request-menus-in-the-widget)
9
+ * [CONFLICT](https://aihrus.zendesk.com/agent/#/tickets/562) Widgets Reloaded plugin - no longer allow me to exclude categories
10
+ * [Use bxSlider JavaScript slider](http://bxslider.com/examples/auto-show-start-stop-controls) to make the transitions and navigation more slider like with a [pause button on testimonials](http://wordpress.org/support/topic/play-pause-icon-on-testimonial)
ci/phpcs.ruleset.xml CHANGED
@@ -12,10 +12,12 @@
12
  <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
13
  <exclude name="Generic.Files.EndFileNoNewline.Found" />
14
  <exclude name="Generic.Files.LineLength.MaxExceeded" />
 
15
  <exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
16
  <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
17
  <exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
18
  <exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
 
19
  <exclude name="Generic.PHP.UpperCaseConstant.Found" />
20
  <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
21
  <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
@@ -27,6 +29,6 @@
27
  </rule>
28
 
29
  <rule ref="WordPress">
30
- <exclude name="WordPress.XSS.EscapeOutput" />
31
  </rule>
32
  </ruleset>
12
  <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
13
  <exclude name="Generic.Files.EndFileNoNewline.Found" />
14
  <exclude name="Generic.Files.LineLength.MaxExceeded" />
15
+ <exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
16
  <exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
17
  <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
18
  <exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
19
  <exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
20
+ <exclude name="Generic.PHP.CharacterBeforePHPOpeningTag.Found" />
21
  <exclude name="Generic.PHP.UpperCaseConstant.Found" />
22
  <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
23
  <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
29
  </rule>
30
 
31
  <rule ref="WordPress">
32
+ <xexclude name="WordPress.XSS.EscapeOutput" />
33
  </rule>
34
  </ruleset>
ci/phpcs.travis.ruleset.xml CHANGED
@@ -12,16 +12,21 @@
12
  <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
13
  <exclude name="Generic.Files.EndFileNoNewline.Found" />
14
  <exclude name="Generic.Files.LineLength.MaxExceeded" />
 
15
  <exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
16
  <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
17
  <exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
18
  <exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
 
19
  <exclude name="Generic.PHP.UpperCaseConstant.Found" />
20
  <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
21
  <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
22
  </rule>
23
 
24
- <rule ref="Squiz.PHP.CommentedOutCode"/>
 
 
 
25
  <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
26
  <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
27
  </rule>
@@ -30,5 +35,6 @@
30
  <exclude name="WordPress.XSS.EscapeOutput" />
31
  <!-- travis-ci.org is puking on switch/case indentation -->
32
  <exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
 
33
  </rule>
34
  </ruleset>
12
  <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
13
  <exclude name="Generic.Files.EndFileNoNewline.Found" />
14
  <exclude name="Generic.Files.LineLength.MaxExceeded" />
15
+ <exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
16
  <exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
17
  <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
18
  <exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
19
  <exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
20
+ <exclude name="Generic.PHP.CharacterBeforePHPOpeningTag.Found" />
21
  <exclude name="Generic.PHP.UpperCaseConstant.Found" />
22
  <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
23
  <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
24
  </rule>
25
 
26
+ <rule ref="Squiz.PHP.CommentedOutCode">
27
+ <exclude name="Squiz.PHP.CommentedOutCode.Found" />
28
+ </rule>
29
+
30
  <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
31
  <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
32
  </rule>
35
  <exclude name="WordPress.XSS.EscapeOutput" />
36
  <!-- travis-ci.org is puking on switch/case indentation -->
37
  <exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
38
+ <exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
39
  </rule>
40
  </ruleset>
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.13.6\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
7
- "POT-Creation-Date: 2013-09-23 17:14:02+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -13,41 +13,41 @@ msgstr ""
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: lib/class-testimonials-widget-settings.php:82
16
- #: lib/class-testimonials-widget-settings.php:652
17
  msgid "Testimonials Widget Settings"
18
  msgstr ""
19
 
20
- #: lib/class-testimonials-widget-settings.php:82 testimonials-widget.php:73
21
  msgid "Settings"
22
  msgstr ""
23
 
24
  #: lib/class-testimonials-widget-settings.php:112
25
- #: lib/class-testimonials-widget-settings.php:1211
26
  msgid "General"
27
  msgstr ""
28
 
29
  #: lib/class-testimonials-widget-settings.php:113
30
- #: lib/class-testimonials-widget-settings.php:1219
31
  msgid "Selection"
32
  msgstr ""
33
 
34
  #: lib/class-testimonials-widget-settings.php:114
35
- #: lib/class-testimonials-widget-settings.php:1227
36
  msgid "Ordering"
37
  msgstr ""
38
 
39
  #: lib/class-testimonials-widget-settings.php:115
40
- #: lib/class-testimonials-widget-settings.php:1235
41
  msgid "Widget"
42
  msgstr ""
43
 
44
  #: lib/class-testimonials-widget-settings.php:116
45
- #: lib/class-testimonials-widget-settings.php:1243
46
  msgid "Post Type"
47
  msgstr ""
48
 
49
  #: lib/class-testimonials-widget-settings.php:117
50
- #: lib/class-testimonials-widget-settings.php:1251
51
  msgid "Compatibility & Reset"
52
  msgstr ""
53
 
@@ -59,8 +59,8 @@ msgstr ""
59
  msgid "Widget Title"
60
  msgstr ""
61
 
62
- #: lib/class-testimonials-widget-settings.php:134 testimonials-widget.php:498
63
- #: testimonials-widget.php:543
64
  msgid "Testimonials"
65
  msgstr ""
66
 
@@ -112,416 +112,443 @@ msgstr ""
112
  msgid "Keeps testimonials looking as entered than sans auto-formatting"
113
  msgstr ""
114
 
115
- #: lib/class-testimonials-widget-settings.php:182
116
- msgid "Disable animation?"
117
  msgstr ""
118
 
119
- #: lib/class-testimonials-widget-settings.php:183
120
  msgid ""
121
  "Disable animation between testimonial transitions. Useful when stacking "
122
  "widgets."
123
  msgstr ""
124
 
125
- #: lib/class-testimonials-widget-settings.php:190
126
  msgid "Fade Out Speed"
127
  msgstr ""
128
 
129
- #: lib/class-testimonials-widget-settings.php:191
130
- #: lib/class-testimonials-widget-settings.php:199
131
  msgid ""
132
  "Transition duration in milliseconds; higher values indicate slower "
133
  "animations, not faster ones."
134
  msgstr ""
135
 
136
- #: lib/class-testimonials-widget-settings.php:198
137
  msgid "Fade In Speed"
138
  msgstr ""
139
 
140
- #: lib/class-testimonials-widget-settings.php:206
141
  msgid "Minimum Height"
142
  msgstr ""
143
 
144
- #: lib/class-testimonials-widget-settings.php:207
145
  msgid "Set for minimum display height, in pixels"
146
  msgstr ""
147
 
148
- #: lib/class-testimonials-widget-settings.php:213
149
  msgid "Maximum Height"
150
  msgstr ""
151
 
152
- #: lib/class-testimonials-widget-settings.php:214
153
  msgid "Set for maximum display height, in pixels"
154
  msgstr ""
155
 
156
- #: lib/class-testimonials-widget-settings.php:220
157
  msgid "Testimonial Bottom Text"
158
  msgstr ""
159
 
160
- #: lib/class-testimonials-widget-settings.php:221
161
  msgid "Custom text or HTML for bottom of testimonials"
162
  msgstr ""
163
 
164
- #: lib/class-testimonials-widget-settings.php:233
165
  msgid "General Options"
166
  msgstr ""
167
 
168
- #: lib/class-testimonials-widget-settings.php:238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  msgid "Hide built-in quotes?"
170
  msgstr ""
171
 
172
- #: lib/class-testimonials-widget-settings.php:239
173
  msgid "Remove open and close quote span tags surrounding testimonial content"
174
  msgstr ""
175
 
176
- #: lib/class-testimonials-widget-settings.php:244
177
  msgid "Hide \"Testimonials Not Found\"?"
178
  msgstr ""
179
 
180
- #: lib/class-testimonials-widget-settings.php:249
181
  msgid "Hide Gravatar Image?"
182
  msgstr ""
183
 
184
- #: lib/class-testimonials-widget-settings.php:254
185
  msgid "Hide Image?"
186
  msgstr ""
187
 
188
- #: lib/class-testimonials-widget-settings.php:259
189
  msgid "Hide Image in Single View?"
190
  msgstr ""
191
 
192
- #: lib/class-testimonials-widget-settings.php:265
193
  msgid "Hide Testimonial Content?"
194
  msgstr ""
195
 
196
- #: lib/class-testimonials-widget-settings.php:270
197
  msgid "Hide Author/Source?"
198
  msgstr ""
199
 
200
- #: lib/class-testimonials-widget-settings.php:272
201
  msgid "Don't display \"Post Title\" in cite"
202
  msgstr ""
203
 
204
- #: lib/class-testimonials-widget-settings.php:276
205
  msgid "Hide Email?"
206
  msgstr ""
207
 
208
- #: lib/class-testimonials-widget-settings.php:282
209
  msgid "Hide Job Title?"
210
  msgstr ""
211
 
212
- #: lib/class-testimonials-widget-settings.php:287
213
  msgid "Hide Location?"
214
  msgstr ""
215
 
216
- #: lib/class-testimonials-widget-settings.php:292
217
  msgid "Hide Company?"
218
  msgstr ""
219
 
220
- #: lib/class-testimonials-widget-settings.php:297
221
  msgid "Hide URL?"
222
  msgstr ""
223
 
224
- #: lib/class-testimonials-widget-settings.php:302
225
  msgid "URL Target"
226
  msgstr ""
227
 
228
- #: lib/class-testimonials-widget-settings.php:303
229
  msgid "Add target to all URLs; leave blank if none"
230
  msgstr ""
231
 
232
- #: lib/class-testimonials-widget-settings.php:308
233
  msgid "Enable Paging?"
234
  msgstr ""
235
 
236
- #: lib/class-testimonials-widget-settings.php:309
237
  msgid "For `[testimonialswidget_list]`"
238
  msgstr ""
239
 
240
- #: lib/class-testimonials-widget-settings.php:312
241
  msgid "Disable"
242
  msgstr ""
243
 
244
- #: lib/class-testimonials-widget-settings.php:313
245
  msgid "Enable"
246
  msgstr ""
247
 
248
- #: lib/class-testimonials-widget-settings.php:314
249
  msgid "Before testimonials"
250
  msgstr ""
251
 
252
- #: lib/class-testimonials-widget-settings.php:315
253
  msgid "After testimonials"
254
  msgstr ""
255
 
256
- #: lib/class-testimonials-widget-settings.php:322
257
  msgid "Do [shortcodes]?"
258
  msgstr ""
259
 
260
- #: lib/class-testimonials-widget-settings.php:323
261
  msgid "If unchecked, shortcodes are stripped."
262
  msgstr ""
263
 
264
- #: lib/class-testimonials-widget-settings.php:334
265
  msgid "Selection Options"
266
  msgstr ""
267
 
268
- #: lib/class-testimonials-widget-settings.php:340
269
  msgid "Category Filter"
270
  msgstr ""
271
 
272
- #: lib/class-testimonials-widget-settings.php:341
273
  msgid "Comma separated category slug-names. Ex: category-a, another-category"
274
  msgstr ""
275
 
276
- #: lib/class-testimonials-widget-settings.php:347
277
  msgid "Tags Filter"
278
  msgstr ""
279
 
280
- #: lib/class-testimonials-widget-settings.php:348
281
  msgid "Comma separated tag slug-names. Ex: tag-a, another-tag"
282
  msgstr ""
283
 
284
- #: lib/class-testimonials-widget-settings.php:354
285
  msgid "Require All Tags?"
286
  msgstr ""
287
 
288
- #: lib/class-testimonials-widget-settings.php:355
289
  msgid "Select only testimonials with all of the given tags"
290
  msgstr ""
291
 
292
- #: lib/class-testimonials-widget-settings.php:361
293
  msgid "Include IDs Filter"
294
  msgstr ""
295
 
296
- #: lib/class-testimonials-widget-settings.php:362
297
- #: lib/class-testimonials-widget-settings.php:369
298
  msgid "Comma separated testimonial IDs. Ex: 3,1,2"
299
  msgstr ""
300
 
301
- #: lib/class-testimonials-widget-settings.php:368
302
  msgid "Exclude IDs Filter"
303
  msgstr ""
304
 
305
- #: lib/class-testimonials-widget-settings.php:375
306
  msgid "Limit"
307
  msgstr ""
308
 
309
- #: lib/class-testimonials-widget-settings.php:376
310
  msgid "Number of testimonials to select per instance"
311
  msgstr ""
312
 
313
- #: lib/class-testimonials-widget-settings.php:389
314
  msgid "Ordering Options"
315
  msgstr ""
316
 
317
- #: lib/class-testimonials-widget-settings.php:395
318
  msgid "Random Order?"
319
  msgstr ""
320
 
321
- #: lib/class-testimonials-widget-settings.php:396
322
  msgid ""
323
  "If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets "
324
  "are random by default automatically"
325
  msgstr ""
326
 
327
- #: lib/class-testimonials-widget-settings.php:402
328
  msgid "ORDER BY"
329
  msgstr ""
330
 
331
- #: lib/class-testimonials-widget-settings.php:403
332
  msgid "Used when \"Random Order\" is disabled"
333
  msgstr ""
334
 
335
- #: lib/class-testimonials-widget-settings.php:406
336
  msgid "Testimonial ID"
337
  msgstr ""
338
 
339
- #: lib/class-testimonials-widget-settings.php:407
340
  msgid "Author"
341
  msgstr ""
342
 
343
- #: lib/class-testimonials-widget-settings.php:408 testimonials-widget.php:475
344
  msgid "Date"
345
  msgstr ""
346
 
347
- #: lib/class-testimonials-widget-settings.php:409
348
  msgid "Menu Order"
349
  msgstr ""
350
 
351
- #: lib/class-testimonials-widget-settings.php:410 testimonials-widget.php:467
352
  msgid "Source"
353
  msgstr ""
354
 
355
- #: lib/class-testimonials-widget-settings.php:411
356
  msgid "No order"
357
  msgstr ""
358
 
359
- #: lib/class-testimonials-widget-settings.php:419
360
  msgid "ORDER BY meta_key"
361
  msgstr ""
362
 
363
- #: lib/class-testimonials-widget-settings.php:420
364
  msgid ""
365
  "Used when \"Random Order\" is disabled and sorting by a testimonials meta "
366
  "key is needed. Overrides ORDER BY"
367
  msgstr ""
368
 
369
- #: lib/class-testimonials-widget-settings.php:423
370
  msgid "None"
371
  msgstr ""
372
 
373
- #: lib/class-testimonials-widget-settings.php:424 testimonials-widget.php:469
374
- #: testimonials-widget.php:1535
375
  msgid "Job Title"
376
  msgstr ""
377
 
378
- #: lib/class-testimonials-widget-settings.php:425 testimonials-widget.php:471
379
- #: testimonials-widget.php:1547
380
  msgid "Email"
381
  msgstr ""
382
 
383
- #: lib/class-testimonials-widget-settings.php:426 testimonials-widget.php:470
384
- #: testimonials-widget.php:1541
385
  msgid "Location"
386
  msgstr ""
387
 
388
- #: lib/class-testimonials-widget-settings.php:427 testimonials-widget.php:472
389
- #: testimonials-widget.php:1553
390
  msgid "Company"
391
  msgstr ""
392
 
393
- #: lib/class-testimonials-widget-settings.php:428 testimonials-widget.php:473
394
- #: testimonials-widget.php:1559
395
  msgid "URL"
396
  msgstr ""
397
 
398
- #: lib/class-testimonials-widget-settings.php:435
399
  msgid "ORDER BY Order"
400
  msgstr ""
401
 
402
- #: lib/class-testimonials-widget-settings.php:438
403
  msgid "Descending"
404
  msgstr ""
405
 
406
- #: lib/class-testimonials-widget-settings.php:439
407
  msgid "Ascending"
408
  msgstr ""
409
 
410
- #: lib/class-testimonials-widget-settings.php:453
411
  msgid "Allow Comments?"
412
  msgstr ""
413
 
414
- #: lib/class-testimonials-widget-settings.php:454
415
  msgid ""
416
  "Only affects the Testimonials Widget post edit page. Your theme controls the "
417
  "front-end view."
418
  msgstr ""
419
 
420
- #: lib/class-testimonials-widget-settings.php:459
421
  msgid "URL slug-name for <a href=\"%1s\">testimonials archive</a> page."
422
  msgstr ""
423
 
424
- #: lib/class-testimonials-widget-settings.php:465
425
  msgid "Archive Page URL"
426
  msgstr ""
427
 
428
- #: lib/class-testimonials-widget-settings.php:472
429
  msgid ""
430
- "URL slug-name for testimonial view pages. Shouldn't be the same as Archive "
431
- "Page URL."
432
  msgstr ""
433
 
434
- #: lib/class-testimonials-widget-settings.php:476
435
  msgid "Testimonial Page URL"
436
  msgstr ""
437
 
438
- #: lib/class-testimonials-widget-settings.php:486
439
  msgid "Compatiblity Options"
440
  msgstr ""
441
 
442
- #: lib/class-testimonials-widget-settings.php:492
443
  msgid "Include IE7 CSS?"
444
  msgstr ""
445
 
446
- #: lib/class-testimonials-widget-settings.php:493
447
  msgid "IE7 specific CSS moved to separate CSS file in version 2.13.6."
448
  msgstr ""
449
 
450
- #: lib/class-testimonials-widget-settings.php:504
451
  msgid "Remove `.hentry` CSS?"
452
  msgstr ""
453
 
454
- #: lib/class-testimonials-widget-settings.php:505
455
  msgid ""
456
  "Pre 2.6.4. Some themes use class `.hentry` in a manner that breaks "
457
  "Testimonials Widgets CSS"
458
  msgstr ""
459
 
460
- #: lib/class-testimonials-widget-settings.php:515
461
  msgid "Use `&lt;q&gt;` tag?"
462
  msgstr ""
463
 
464
- #: lib/class-testimonials-widget-settings.php:516
465
  msgid "Pre 2.11.0. Not HTML5 compliant"
466
  msgstr ""
467
 
468
- #: lib/class-testimonials-widget-settings.php:526
469
  msgid "Don't Use Default Taxonomies?"
470
  msgstr ""
471
 
472
- #: lib/class-testimonials-widget-settings.php:528
473
  msgid ""
474
  "If checked, use Testimonials Widget's own category and tag taxonomies instead"
475
  msgstr ""
476
 
477
- #: lib/class-testimonials-widget-settings.php:539
478
  msgid "Export Settings"
479
  msgstr ""
480
 
481
- #: lib/class-testimonials-widget-settings.php:541
482
  msgid ""
483
  "These are your current settings in a serialized format. Copy the contents to "
484
  "make a backup of your settings."
485
  msgstr ""
486
 
487
- #: lib/class-testimonials-widget-settings.php:549
488
  msgid "Import Settings"
489
  msgstr ""
490
 
491
- #: lib/class-testimonials-widget-settings.php:551
492
  msgid ""
493
  "Paste new serialized settings here to overwrite your current configuration."
494
  msgstr ""
495
 
496
- #: lib/class-testimonials-widget-settings.php:557
497
  msgid "Remove Plugin Data on Deletion?"
498
  msgstr ""
499
 
500
- #: lib/class-testimonials-widget-settings.php:560
501
  msgid ""
502
  "Delete all Testimonials Widget data and options from database on plugin "
503
  "deletion"
504
  msgstr ""
505
 
506
- #: lib/class-testimonials-widget-settings.php:566
507
  msgid "Reset to Defaults?"
508
  msgstr ""
509
 
510
- #: lib/class-testimonials-widget-settings.php:569
511
  msgid "Check this box to reset options to their defaults"
512
  msgstr ""
513
 
514
- #: lib/class-testimonials-widget-settings.php:669
515
  msgid "Save Changes"
516
  msgstr ""
517
 
518
- #: lib/class-testimonials-widget-settings.php:676
519
  msgid ""
520
  "When ready, <a href=\"%1$s\">view</a> or <a href=\"%2$s\">add</a> "
521
  "testimonials."
522
  msgstr ""
523
 
524
- #: lib/class-testimonials-widget-settings.php:686
525
  msgid ""
526
  "If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good "
527
  "Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> "
@@ -530,19 +557,15 @@ msgid ""
530
  "\"%4$s\" title=\"Support forums\">support</a>."
531
  msgstr ""
532
 
533
- #: lib/class-testimonials-widget-settings.php:697
534
  msgid "Copyright &copy;%1$s <a href=\"%2$s\">Aihrus</a>."
535
  msgstr ""
536
 
537
- #: lib/class-testimonials-widget-settings.php:1097
538
  msgid "Required"
539
  msgstr ""
540
 
541
- #: lib/class-testimonials-widget-settings.php:1198
542
- msgid "For more information:"
543
- msgstr ""
544
-
545
- #: lib/class-testimonials-widget-settings.php:1199
546
  msgid ""
547
  "These Testimonials Widget Settings establish the default option values for "
548
  "shortcodes, theme functions, and widget instances. Widgets, once created no "
@@ -551,31 +574,35 @@ msgid ""
551
  "then recreate it."
552
  msgstr ""
553
 
554
- #: lib/class-testimonials-widget-settings.php:1202
 
 
 
 
555
  msgid "View the <a href=\"%s\">Testimonials Widget documentation</a>."
556
  msgstr ""
557
 
558
- #: lib/class-testimonials-widget-settings.php:1212
559
  msgid "Show or hide optional fields."
560
  msgstr ""
561
 
562
- #: lib/class-testimonials-widget-settings.php:1220
563
  msgid "Options used to select testimonials."
564
  msgstr ""
565
 
566
- #: lib/class-testimonials-widget-settings.php:1228
567
  msgid "Options used to determine displayed testimonials ordering."
568
  msgstr ""
569
 
570
- #: lib/class-testimonials-widget-settings.php:1236
571
  msgid "Options related to showing testimonials in widgets."
572
  msgstr ""
573
 
574
- #: lib/class-testimonials-widget-settings.php:1244
575
  msgid "Archive and singular page URL related testimonials options."
576
  msgstr ""
577
 
578
- #: lib/class-testimonials-widget-settings.php:1252
579
  msgid "Backwards compatibility, import/export options, and reset options."
580
  msgstr ""
581
 
@@ -583,7 +610,7 @@ msgstr ""
583
  msgid "Display testimonials with multiple selection and display options"
584
  msgstr ""
585
 
586
- #. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.13.6) #-#-#-#-#
587
  #. Plugin Name of the plugin/theme
588
  #: lib/class-testimonials-widget-widget.php:37
589
  msgid "Testimonials Widget"
@@ -601,140 +628,140 @@ msgstr ""
601
  msgid "Expand/Collapse"
602
  msgstr ""
603
 
604
- #: testimonials-widget.php:256
605
  msgid ""
606
  "If your Testimonials Widget display has gone to funky town, please <a href="
607
  "\"%s\">read the FAQ</a> about possible CSS fixes."
608
  msgstr ""
609
 
610
- #: testimonials-widget.php:265
611
  msgid ""
612
  "Please donate $2 towards development and support of this Testimonials Widget "
613
  "plugin. %s"
614
  msgstr ""
615
 
616
- #: testimonials-widget.php:465
617
  msgid "ID"
618
  msgstr ""
619
 
620
- #: testimonials-widget.php:466
621
  msgid "Image"
622
  msgstr ""
623
 
624
- #: testimonials-widget.php:468
625
  msgid "Shortcodes"
626
  msgstr ""
627
 
628
- #: testimonials-widget.php:474
629
  msgid "Published by"
630
  msgstr ""
631
 
632
- #: testimonials-widget.php:480 testimonials-widget.php:483
633
  msgid "Category"
634
  msgstr ""
635
 
636
- #: testimonials-widget.php:481 testimonials-widget.php:484
637
  msgid "Tags"
638
  msgstr ""
639
 
640
- #: testimonials-widget.php:495
641
  msgid "Add New"
642
  msgstr ""
643
 
644
- #: testimonials-widget.php:496 testimonials-widget.php:499
645
  msgid "Add New Testimonial"
646
  msgstr ""
647
 
648
- #: testimonials-widget.php:497
649
  msgid "Edit Testimonial"
650
  msgstr ""
651
 
652
- #: testimonials-widget.php:500 testimonials-widget.php:846
653
  msgid "No testimonials found"
654
  msgstr ""
655
 
656
- #: testimonials-widget.php:501
657
  msgid "No testimonials found in Trash"
658
  msgstr ""
659
 
660
- #: testimonials-widget.php:503
661
  msgid "Search Testimonials"
662
  msgstr ""
663
 
664
- #: testimonials-widget.php:504 testimonials-widget.php:1647
665
  msgid "Testimonial"
666
  msgstr ""
667
 
668
- #: testimonials-widget.php:505
669
  msgid "View Testimonial"
670
  msgstr ""
671
 
672
- #: testimonials-widget.php:957
673
  msgid "…"
674
  msgstr ""
675
 
676
- #: testimonials-widget.php:1277
677
  msgid "&laquo;"
678
  msgstr ""
679
 
680
- #: testimonials-widget.php:1286
681
  msgid "&raquo;"
682
  msgstr ""
683
 
684
- #: testimonials-widget.php:1571
685
  msgid "Testimonial Data"
686
  msgstr ""
687
 
688
- #: testimonials-widget.php:1596
689
  msgid "Enter title here"
690
  msgstr ""
691
 
692
- #: testimonials-widget.php:1597
693
  msgid "Enter testimonial source here"
694
  msgstr ""
695
 
696
- #: testimonials-widget.php:1622
697
  msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
698
  msgstr ""
699
 
700
- #: testimonials-widget.php:1623
701
  msgid "Custom field updated."
702
  msgstr ""
703
 
704
- #: testimonials-widget.php:1624
705
  msgid "Custom field deleted."
706
  msgstr ""
707
 
708
- #: testimonials-widget.php:1625
709
  msgid "Testimonial updated."
710
  msgstr ""
711
 
712
  #. translators: %s: date and time of the revision
713
- #: testimonials-widget.php:1627
714
  msgid "Testimonial restored to revision from %s"
715
  msgstr ""
716
 
717
- #: testimonials-widget.php:1628
718
  msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
719
  msgstr ""
720
 
721
- #: testimonials-widget.php:1629
722
  msgid "Testimonial saved."
723
  msgstr ""
724
 
725
- #: testimonials-widget.php:1630
726
  msgid ""
727
  "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
728
  "a>"
729
  msgstr ""
730
 
731
- #: testimonials-widget.php:1631
732
  msgid ""
733
  "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
734
  "\"%2$s\">Preview testimonial</a>"
735
  msgstr ""
736
 
737
- #: testimonials-widget.php:1632
738
  msgid ""
739
  "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
740
  "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.14.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
7
+ "POT-Creation-Date: 2013-10-21 19:02:47+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: lib/class-testimonials-widget-settings.php:82
16
+ #: lib/class-testimonials-widget-settings.php:700
17
  msgid "Testimonials Widget Settings"
18
  msgstr ""
19
 
20
+ #: lib/class-testimonials-widget-settings.php:82 testimonials-widget.php:110
21
  msgid "Settings"
22
  msgstr ""
23
 
24
  #: lib/class-testimonials-widget-settings.php:112
25
+ #: lib/class-testimonials-widget-settings.php:1319
26
  msgid "General"
27
  msgstr ""
28
 
29
  #: lib/class-testimonials-widget-settings.php:113
30
+ #: lib/class-testimonials-widget-settings.php:1327
31
  msgid "Selection"
32
  msgstr ""
33
 
34
  #: lib/class-testimonials-widget-settings.php:114
35
+ #: lib/class-testimonials-widget-settings.php:1335
36
  msgid "Ordering"
37
  msgstr ""
38
 
39
  #: lib/class-testimonials-widget-settings.php:115
40
+ #: lib/class-testimonials-widget-settings.php:1343
41
  msgid "Widget"
42
  msgstr ""
43
 
44
  #: lib/class-testimonials-widget-settings.php:116
45
+ #: lib/class-testimonials-widget-settings.php:1351
46
  msgid "Post Type"
47
  msgstr ""
48
 
49
  #: lib/class-testimonials-widget-settings.php:117
50
+ #: lib/class-testimonials-widget-settings.php:1359
51
  msgid "Compatibility & Reset"
52
  msgstr ""
53
 
59
  msgid "Widget Title"
60
  msgstr ""
61
 
62
+ #: lib/class-testimonials-widget-settings.php:134 testimonials-widget.php:560
63
+ #: testimonials-widget.php:605
64
  msgid "Testimonials"
65
  msgstr ""
66
 
112
  msgid "Keeps testimonials looking as entered than sans auto-formatting"
113
  msgstr ""
114
 
115
+ #: lib/class-testimonials-widget-settings.php:183
116
+ msgid "Disable Animation?"
117
  msgstr ""
118
 
119
+ #: lib/class-testimonials-widget-settings.php:184
120
  msgid ""
121
  "Disable animation between testimonial transitions. Useful when stacking "
122
  "widgets."
123
  msgstr ""
124
 
125
+ #: lib/class-testimonials-widget-settings.php:192
126
  msgid "Fade Out Speed"
127
  msgstr ""
128
 
129
+ #: lib/class-testimonials-widget-settings.php:193
130
+ #: lib/class-testimonials-widget-settings.php:201
131
  msgid ""
132
  "Transition duration in milliseconds; higher values indicate slower "
133
  "animations, not faster ones."
134
  msgstr ""
135
 
136
+ #: lib/class-testimonials-widget-settings.php:200
137
  msgid "Fade In Speed"
138
  msgstr ""
139
 
140
+ #: lib/class-testimonials-widget-settings.php:208
141
  msgid "Minimum Height"
142
  msgstr ""
143
 
144
+ #: lib/class-testimonials-widget-settings.php:209
145
  msgid "Set for minimum display height, in pixels"
146
  msgstr ""
147
 
148
+ #: lib/class-testimonials-widget-settings.php:215
149
  msgid "Maximum Height"
150
  msgstr ""
151
 
152
+ #: lib/class-testimonials-widget-settings.php:216
153
  msgid "Set for maximum display height, in pixels"
154
  msgstr ""
155
 
156
+ #: lib/class-testimonials-widget-settings.php:222
157
  msgid "Testimonial Bottom Text"
158
  msgstr ""
159
 
160
+ #: lib/class-testimonials-widget-settings.php:223
161
  msgid "Custom text or HTML for bottom of testimonials"
162
  msgstr ""
163
 
164
+ #: lib/class-testimonials-widget-settings.php:235
165
  msgid "General Options"
166
  msgstr ""
167
 
168
+ #: lib/class-testimonials-widget-settings.php:239
169
+ msgid ""
170
+ "Adds HTML tag markup per the <a href=\"%s\">Review schema</a> to "
171
+ "testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely "
172
+ "on this markup to improve the display of search results."
173
+ msgstr ""
174
+
175
+ #: lib/class-testimonials-widget-settings.php:242
176
+ msgid "Enable Review Schema?"
177
+ msgstr ""
178
+
179
+ #: lib/class-testimonials-widget-settings.php:250
180
+ msgid "Reviewed Item?"
181
+ msgstr ""
182
+
183
+ #: lib/class-testimonials-widget-settings.php:251
184
+ msgid "Name of thing being referenced in testimonials"
185
+ msgstr ""
186
+
187
+ #: lib/class-testimonials-widget-settings.php:256
188
+ msgid "Reviewed Item URL?"
189
+ msgstr ""
190
+
191
+ #: lib/class-testimonials-widget-settings.php:257
192
+ msgid "URL of thing being referenced in testimonials"
193
+ msgstr ""
194
+
195
+ #: lib/class-testimonials-widget-settings.php:263
196
  msgid "Hide built-in quotes?"
197
  msgstr ""
198
 
199
+ #: lib/class-testimonials-widget-settings.php:264
200
  msgid "Remove open and close quote span tags surrounding testimonial content"
201
  msgstr ""
202
 
203
+ #: lib/class-testimonials-widget-settings.php:270
204
  msgid "Hide \"Testimonials Not Found\"?"
205
  msgstr ""
206
 
207
+ #: lib/class-testimonials-widget-settings.php:276
208
  msgid "Hide Gravatar Image?"
209
  msgstr ""
210
 
211
+ #: lib/class-testimonials-widget-settings.php:282
212
  msgid "Hide Image?"
213
  msgstr ""
214
 
215
+ #: lib/class-testimonials-widget-settings.php:288
216
  msgid "Hide Image in Single View?"
217
  msgstr ""
218
 
219
+ #: lib/class-testimonials-widget-settings.php:295
220
  msgid "Hide Testimonial Content?"
221
  msgstr ""
222
 
223
+ #: lib/class-testimonials-widget-settings.php:301
224
  msgid "Hide Author/Source?"
225
  msgstr ""
226
 
227
+ #: lib/class-testimonials-widget-settings.php:304
228
  msgid "Don't display \"Post Title\" in cite"
229
  msgstr ""
230
 
231
+ #: lib/class-testimonials-widget-settings.php:308
232
  msgid "Hide Email?"
233
  msgstr ""
234
 
235
+ #: lib/class-testimonials-widget-settings.php:315
236
  msgid "Hide Job Title?"
237
  msgstr ""
238
 
239
+ #: lib/class-testimonials-widget-settings.php:321
240
  msgid "Hide Location?"
241
  msgstr ""
242
 
243
+ #: lib/class-testimonials-widget-settings.php:327
244
  msgid "Hide Company?"
245
  msgstr ""
246
 
247
+ #: lib/class-testimonials-widget-settings.php:333
248
  msgid "Hide URL?"
249
  msgstr ""
250
 
251
+ #: lib/class-testimonials-widget-settings.php:339
252
  msgid "URL Target"
253
  msgstr ""
254
 
255
+ #: lib/class-testimonials-widget-settings.php:340
256
  msgid "Add target to all URLs; leave blank if none"
257
  msgstr ""
258
 
259
+ #: lib/class-testimonials-widget-settings.php:345
260
  msgid "Enable Paging?"
261
  msgstr ""
262
 
263
+ #: lib/class-testimonials-widget-settings.php:346
264
  msgid "For `[testimonialswidget_list]`"
265
  msgstr ""
266
 
267
+ #: lib/class-testimonials-widget-settings.php:349
268
  msgid "Disable"
269
  msgstr ""
270
 
271
+ #: lib/class-testimonials-widget-settings.php:350
272
  msgid "Enable"
273
  msgstr ""
274
 
275
+ #: lib/class-testimonials-widget-settings.php:351
276
  msgid "Before testimonials"
277
  msgstr ""
278
 
279
+ #: lib/class-testimonials-widget-settings.php:352
280
  msgid "After testimonials"
281
  msgstr ""
282
 
283
+ #: lib/class-testimonials-widget-settings.php:359
284
  msgid "Do [shortcodes]?"
285
  msgstr ""
286
 
287
+ #: lib/class-testimonials-widget-settings.php:360
288
  msgid "If unchecked, shortcodes are stripped."
289
  msgstr ""
290
 
291
+ #: lib/class-testimonials-widget-settings.php:373
292
  msgid "Selection Options"
293
  msgstr ""
294
 
295
+ #: lib/class-testimonials-widget-settings.php:379
296
  msgid "Category Filter"
297
  msgstr ""
298
 
299
+ #: lib/class-testimonials-widget-settings.php:380
300
  msgid "Comma separated category slug-names. Ex: category-a, another-category"
301
  msgstr ""
302
 
303
+ #: lib/class-testimonials-widget-settings.php:386
304
  msgid "Tags Filter"
305
  msgstr ""
306
 
307
+ #: lib/class-testimonials-widget-settings.php:387
308
  msgid "Comma separated tag slug-names. Ex: tag-a, another-tag"
309
  msgstr ""
310
 
311
+ #: lib/class-testimonials-widget-settings.php:393
312
  msgid "Require All Tags?"
313
  msgstr ""
314
 
315
+ #: lib/class-testimonials-widget-settings.php:394
316
  msgid "Select only testimonials with all of the given tags"
317
  msgstr ""
318
 
319
+ #: lib/class-testimonials-widget-settings.php:401
320
  msgid "Include IDs Filter"
321
  msgstr ""
322
 
323
+ #: lib/class-testimonials-widget-settings.php:402
324
+ #: lib/class-testimonials-widget-settings.php:409
325
  msgid "Comma separated testimonial IDs. Ex: 3,1,2"
326
  msgstr ""
327
 
328
+ #: lib/class-testimonials-widget-settings.php:408
329
  msgid "Exclude IDs Filter"
330
  msgstr ""
331
 
332
+ #: lib/class-testimonials-widget-settings.php:415
333
  msgid "Limit"
334
  msgstr ""
335
 
336
+ #: lib/class-testimonials-widget-settings.php:416
337
  msgid "Number of testimonials to select per instance"
338
  msgstr ""
339
 
340
+ #: lib/class-testimonials-widget-settings.php:429
341
  msgid "Ordering Options"
342
  msgstr ""
343
 
344
+ #: lib/class-testimonials-widget-settings.php:435
345
  msgid "Random Order?"
346
  msgstr ""
347
 
348
+ #: lib/class-testimonials-widget-settings.php:436
349
  msgid ""
350
  "If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets "
351
  "are random by default automatically"
352
  msgstr ""
353
 
354
+ #: lib/class-testimonials-widget-settings.php:443
355
  msgid "ORDER BY"
356
  msgstr ""
357
 
358
+ #: lib/class-testimonials-widget-settings.php:444
359
  msgid "Used when \"Random Order\" is disabled"
360
  msgstr ""
361
 
362
+ #: lib/class-testimonials-widget-settings.php:447
363
  msgid "Testimonial ID"
364
  msgstr ""
365
 
366
+ #: lib/class-testimonials-widget-settings.php:448
367
  msgid "Author"
368
  msgstr ""
369
 
370
+ #: lib/class-testimonials-widget-settings.php:449 testimonials-widget.php:537
371
  msgid "Date"
372
  msgstr ""
373
 
374
+ #: lib/class-testimonials-widget-settings.php:450
375
  msgid "Menu Order"
376
  msgstr ""
377
 
378
+ #: lib/class-testimonials-widget-settings.php:451 testimonials-widget.php:529
379
  msgid "Source"
380
  msgstr ""
381
 
382
+ #: lib/class-testimonials-widget-settings.php:452
383
  msgid "No order"
384
  msgstr ""
385
 
386
+ #: lib/class-testimonials-widget-settings.php:460
387
  msgid "ORDER BY meta_key"
388
  msgstr ""
389
 
390
+ #: lib/class-testimonials-widget-settings.php:461
391
  msgid ""
392
  "Used when \"Random Order\" is disabled and sorting by a testimonials meta "
393
  "key is needed. Overrides ORDER BY"
394
  msgstr ""
395
 
396
+ #: lib/class-testimonials-widget-settings.php:464
397
  msgid "None"
398
  msgstr ""
399
 
400
+ #: lib/class-testimonials-widget-settings.php:465 testimonials-widget.php:531
401
+ #: testimonials-widget.php:1637
402
  msgid "Job Title"
403
  msgstr ""
404
 
405
+ #: lib/class-testimonials-widget-settings.php:466 testimonials-widget.php:533
406
+ #: testimonials-widget.php:1649
407
  msgid "Email"
408
  msgstr ""
409
 
410
+ #: lib/class-testimonials-widget-settings.php:467 testimonials-widget.php:532
411
+ #: testimonials-widget.php:1643
412
  msgid "Location"
413
  msgstr ""
414
 
415
+ #: lib/class-testimonials-widget-settings.php:468 testimonials-widget.php:534
416
+ #: testimonials-widget.php:1655
417
  msgid "Company"
418
  msgstr ""
419
 
420
+ #: lib/class-testimonials-widget-settings.php:469 testimonials-widget.php:535
421
+ #: testimonials-widget.php:1661
422
  msgid "URL"
423
  msgstr ""
424
 
425
+ #: lib/class-testimonials-widget-settings.php:476
426
  msgid "ORDER BY Order"
427
  msgstr ""
428
 
429
+ #: lib/class-testimonials-widget-settings.php:479
430
  msgid "Descending"
431
  msgstr ""
432
 
433
+ #: lib/class-testimonials-widget-settings.php:480
434
  msgid "Ascending"
435
  msgstr ""
436
 
437
+ #: lib/class-testimonials-widget-settings.php:494
438
  msgid "Allow Comments?"
439
  msgstr ""
440
 
441
+ #: lib/class-testimonials-widget-settings.php:495
442
  msgid ""
443
  "Only affects the Testimonials Widget post edit page. Your theme controls the "
444
  "front-end view."
445
  msgstr ""
446
 
447
+ #: lib/class-testimonials-widget-settings.php:501
448
  msgid "URL slug-name for <a href=\"%1s\">testimonials archive</a> page."
449
  msgstr ""
450
 
451
+ #: lib/class-testimonials-widget-settings.php:507
452
  msgid "Archive Page URL"
453
  msgstr ""
454
 
455
+ #: lib/class-testimonials-widget-settings.php:514
456
  msgid ""
457
+ "URL slug-name for testimonial view pages. Shouldn't be the same as the "
458
+ "Archive Page URL nor should it match a page URL slug."
459
  msgstr ""
460
 
461
+ #: lib/class-testimonials-widget-settings.php:518
462
  msgid "Testimonial Page URL"
463
  msgstr ""
464
 
465
+ #: lib/class-testimonials-widget-settings.php:528
466
  msgid "Compatiblity Options"
467
  msgstr ""
468
 
469
+ #: lib/class-testimonials-widget-settings.php:534
470
  msgid "Include IE7 CSS?"
471
  msgstr ""
472
 
473
+ #: lib/class-testimonials-widget-settings.php:535
474
  msgid "IE7 specific CSS moved to separate CSS file in version 2.13.6."
475
  msgstr ""
476
 
477
+ #: lib/class-testimonials-widget-settings.php:547
478
  msgid "Remove `.hentry` CSS?"
479
  msgstr ""
480
 
481
+ #: lib/class-testimonials-widget-settings.php:548
482
  msgid ""
483
  "Pre 2.6.4. Some themes use class `.hentry` in a manner that breaks "
484
  "Testimonials Widgets CSS"
485
  msgstr ""
486
 
487
+ #: lib/class-testimonials-widget-settings.php:559
488
  msgid "Use `&lt;q&gt;` tag?"
489
  msgstr ""
490
 
491
+ #: lib/class-testimonials-widget-settings.php:560
492
  msgid "Pre 2.11.0. Not HTML5 compliant"
493
  msgstr ""
494
 
495
+ #: lib/class-testimonials-widget-settings.php:571
496
  msgid "Don't Use Default Taxonomies?"
497
  msgstr ""
498
 
499
+ #: lib/class-testimonials-widget-settings.php:574
500
  msgid ""
501
  "If checked, use Testimonials Widget's own category and tag taxonomies instead"
502
  msgstr ""
503
 
504
+ #: lib/class-testimonials-widget-settings.php:585
505
  msgid "Export Settings"
506
  msgstr ""
507
 
508
+ #: lib/class-testimonials-widget-settings.php:587
509
  msgid ""
510
  "These are your current settings in a serialized format. Copy the contents to "
511
  "make a backup of your settings."
512
  msgstr ""
513
 
514
+ #: lib/class-testimonials-widget-settings.php:595
515
  msgid "Import Settings"
516
  msgstr ""
517
 
518
+ #: lib/class-testimonials-widget-settings.php:597
519
  msgid ""
520
  "Paste new serialized settings here to overwrite your current configuration."
521
  msgstr ""
522
 
523
+ #: lib/class-testimonials-widget-settings.php:603
524
  msgid "Remove Plugin Data on Deletion?"
525
  msgstr ""
526
 
527
+ #: lib/class-testimonials-widget-settings.php:607
528
  msgid ""
529
  "Delete all Testimonials Widget data and options from database on plugin "
530
  "deletion"
531
  msgstr ""
532
 
533
+ #: lib/class-testimonials-widget-settings.php:613
534
  msgid "Reset to Defaults?"
535
  msgstr ""
536
 
537
+ #: lib/class-testimonials-widget-settings.php:617
538
  msgid "Check this box to reset options to their defaults"
539
  msgstr ""
540
 
541
+ #: lib/class-testimonials-widget-settings.php:717
542
  msgid "Save Changes"
543
  msgstr ""
544
 
545
+ #: lib/class-testimonials-widget-settings.php:724
546
  msgid ""
547
  "When ready, <a href=\"%1$s\">view</a> or <a href=\"%2$s\">add</a> "
548
  "testimonials."
549
  msgstr ""
550
 
551
+ #: lib/class-testimonials-widget-settings.php:734
552
  msgid ""
553
  "If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good "
554
  "Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> "
557
  "\"%4$s\" title=\"Support forums\">support</a>."
558
  msgstr ""
559
 
560
+ #: lib/class-testimonials-widget-settings.php:745
561
  msgid "Copyright &copy;%1$s <a href=\"%2$s\">Aihrus</a>."
562
  msgstr ""
563
 
564
+ #: lib/class-testimonials-widget-settings.php:1199
565
  msgid "Required"
566
  msgstr ""
567
 
568
+ #: lib/class-testimonials-widget-settings.php:1305
 
 
 
 
569
  msgid ""
570
  "These Testimonials Widget Settings establish the default option values for "
571
  "shortcodes, theme functions, and widget instances. Widgets, once created no "
574
  "then recreate it."
575
  msgstr ""
576
 
577
+ #: lib/class-testimonials-widget-settings.php:1307
578
+ msgid "Shortcode option names are listed below each entry."
579
+ msgstr ""
580
+
581
+ #: lib/class-testimonials-widget-settings.php:1310
582
  msgid "View the <a href=\"%s\">Testimonials Widget documentation</a>."
583
  msgstr ""
584
 
585
+ #: lib/class-testimonials-widget-settings.php:1320
586
  msgid "Show or hide optional fields."
587
  msgstr ""
588
 
589
+ #: lib/class-testimonials-widget-settings.php:1328
590
  msgid "Options used to select testimonials."
591
  msgstr ""
592
 
593
+ #: lib/class-testimonials-widget-settings.php:1336
594
  msgid "Options used to determine displayed testimonials ordering."
595
  msgstr ""
596
 
597
+ #: lib/class-testimonials-widget-settings.php:1344
598
  msgid "Options related to showing testimonials in widgets."
599
  msgstr ""
600
 
601
+ #: lib/class-testimonials-widget-settings.php:1352
602
  msgid "Archive and singular page URL related testimonials options."
603
  msgstr ""
604
 
605
+ #: lib/class-testimonials-widget-settings.php:1360
606
  msgid "Backwards compatibility, import/export options, and reset options."
607
  msgstr ""
608
 
610
  msgid "Display testimonials with multiple selection and display options"
611
  msgstr ""
612
 
613
+ #. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.14.0) #-#-#-#-#
614
  #. Plugin Name of the plugin/theme
615
  #: lib/class-testimonials-widget-widget.php:37
616
  msgid "Testimonials Widget"
628
  msgid "Expand/Collapse"
629
  msgstr ""
630
 
631
+ #: testimonials-widget.php:315
632
  msgid ""
633
  "If your Testimonials Widget display has gone to funky town, please <a href="
634
  "\"%s\">read the FAQ</a> about possible CSS fixes."
635
  msgstr ""
636
 
637
+ #: testimonials-widget.php:324
638
  msgid ""
639
  "Please donate $2 towards development and support of this Testimonials Widget "
640
  "plugin. %s"
641
  msgstr ""
642
 
643
+ #: testimonials-widget.php:527
644
  msgid "ID"
645
  msgstr ""
646
 
647
+ #: testimonials-widget.php:528
648
  msgid "Image"
649
  msgstr ""
650
 
651
+ #: testimonials-widget.php:530
652
  msgid "Shortcodes"
653
  msgstr ""
654
 
655
+ #: testimonials-widget.php:536
656
  msgid "Published by"
657
  msgstr ""
658
 
659
+ #: testimonials-widget.php:542 testimonials-widget.php:545
660
  msgid "Category"
661
  msgstr ""
662
 
663
+ #: testimonials-widget.php:543 testimonials-widget.php:546
664
  msgid "Tags"
665
  msgstr ""
666
 
667
+ #: testimonials-widget.php:557
668
  msgid "Add New"
669
  msgstr ""
670
 
671
+ #: testimonials-widget.php:558 testimonials-widget.php:561
672
  msgid "Add New Testimonial"
673
  msgstr ""
674
 
675
+ #: testimonials-widget.php:559
676
  msgid "Edit Testimonial"
677
  msgstr ""
678
 
679
+ #: testimonials-widget.php:562 testimonials-widget.php:909
680
  msgid "No testimonials found"
681
  msgstr ""
682
 
683
+ #: testimonials-widget.php:563
684
  msgid "No testimonials found in Trash"
685
  msgstr ""
686
 
687
+ #: testimonials-widget.php:565
688
  msgid "Search Testimonials"
689
  msgstr ""
690
 
691
+ #: testimonials-widget.php:566 testimonials-widget.php:1749
692
  msgid "Testimonial"
693
  msgstr ""
694
 
695
+ #: testimonials-widget.php:567
696
  msgid "View Testimonial"
697
  msgstr ""
698
 
699
+ #: testimonials-widget.php:1038
700
  msgid "…"
701
  msgstr ""
702
 
703
+ #: testimonials-widget.php:1370
704
  msgid "&laquo;"
705
  msgstr ""
706
 
707
+ #: testimonials-widget.php:1379
708
  msgid "&raquo;"
709
  msgstr ""
710
 
711
+ #: testimonials-widget.php:1673
712
  msgid "Testimonial Data"
713
  msgstr ""
714
 
715
+ #: testimonials-widget.php:1698
716
  msgid "Enter title here"
717
  msgstr ""
718
 
719
+ #: testimonials-widget.php:1699
720
  msgid "Enter testimonial source here"
721
  msgstr ""
722
 
723
+ #: testimonials-widget.php:1724
724
  msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
725
  msgstr ""
726
 
727
+ #: testimonials-widget.php:1725
728
  msgid "Custom field updated."
729
  msgstr ""
730
 
731
+ #: testimonials-widget.php:1726
732
  msgid "Custom field deleted."
733
  msgstr ""
734
 
735
+ #: testimonials-widget.php:1727
736
  msgid "Testimonial updated."
737
  msgstr ""
738
 
739
  #. translators: %s: date and time of the revision
740
+ #: testimonials-widget.php:1729
741
  msgid "Testimonial restored to revision from %s"
742
  msgstr ""
743
 
744
+ #: testimonials-widget.php:1730
745
  msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
746
  msgstr ""
747
 
748
+ #: testimonials-widget.php:1731
749
  msgid "Testimonial saved."
750
  msgstr ""
751
 
752
+ #: testimonials-widget.php:1732
753
  msgid ""
754
  "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
755
  "a>"
756
  msgstr ""
757
 
758
+ #: testimonials-widget.php:1733
759
  msgid ""
760
  "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
761
  "\"%2$s\">Preview testimonial</a>"
762
  msgstr ""
763
 
764
+ #: testimonials-widget.php:1734
765
  msgid ""
766
  "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
767
  "testimonial</a>"
lib/class-testimonials-widget-settings.php CHANGED
@@ -175,13 +175,15 @@ class Testimonials_Widget_Settings {
175
  'title' => esc_html__( 'Keep Whitespace?', 'testimonials-widget' ),
176
  'desc' => esc_html__( 'Keeps testimonials looking as entered than sans auto-formatting', 'testimonials-widget' ),
177
  'type' => 'checkbox',
 
178
  );
179
 
180
  self::$settings['disable_animation'] = array(
181
  'section' => 'widget',
182
- 'title' => esc_html__( 'Disable animation?', 'testimonials-widget' ),
183
  'desc' => esc_html__( 'Disable animation between testimonial transitions. Useful when stacking widgets.', 'testimonials-widget' ),
184
  'type' => 'checkbox',
 
185
  'std' => 1,
186
  );
187
 
@@ -234,68 +236,103 @@ class Testimonials_Widget_Settings {
234
  'type' => 'expand_begin',
235
  );
236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  self::$settings['disable_quotes'] = array(
238
  'title' => esc_html__( 'Hide built-in quotes?', 'testimonials-widget' ),
239
  'desc' => esc_html__( 'Remove open and close quote span tags surrounding testimonial content', 'testimonials-widget' ),
240
  'type' => 'checkbox',
 
241
  );
242
 
243
  self::$settings['hide_not_found'] = array(
244
  'title' => esc_html__( 'Hide "Testimonials Not Found"?', 'testimonials-widget' ),
245
  'type' => 'checkbox',
 
246
  );
247
 
248
  self::$settings['hide_gravatar'] = array(
249
  'title' => esc_html__( 'Hide Gravatar Image?', 'testimonials-widget' ),
250
  'type' => 'checkbox',
 
251
  );
252
 
253
  self::$settings['hide_image'] = array(
254
  'title' => esc_html__( 'Hide Image?', 'testimonials-widget' ),
255
  'type' => 'checkbox',
 
256
  );
257
 
258
  self::$settings['hide_image_single'] = array(
259
  'title' => esc_html__( 'Hide Image in Single View?', 'testimonials-widget' ),
260
  'type' => 'checkbox',
 
261
  'widget' => 0,
262
  );
263
 
264
  self::$settings['hide_content'] = array(
265
  'title' => esc_html__( 'Hide Testimonial Content?', 'testimonials-widget' ),
266
  'type' => 'checkbox',
 
267
  );
268
 
269
  self::$settings['hide_source'] = array(
270
  'title' => esc_html__( 'Hide Author/Source?', 'testimonials-widget' ),
271
  'type' => 'checkbox',
 
272
  'desc' => esc_html__( 'Don\'t display "Post Title" in cite', 'testimonials-widget' ),
273
  );
274
 
275
  self::$settings['hide_email'] = array(
276
  'title' => esc_html__( 'Hide Email?', 'testimonials-widget' ),
277
  'type' => 'checkbox',
 
278
  'std' => 1,
279
  );
280
 
281
  self::$settings['hide_title'] = array(
282
  'title' => esc_html__( 'Hide Job Title?', 'testimonials-widget' ),
283
  'type' => 'checkbox',
 
284
  );
285
 
286
  self::$settings['hide_location'] = array(
287
  'title' => esc_html__( 'Hide Location?', 'testimonials-widget' ),
288
  'type' => 'checkbox',
 
289
  );
290
 
291
  self::$settings['hide_company'] = array(
292
  'title' => esc_html__( 'Hide Company?', 'testimonials-widget' ),
293
  'type' => 'checkbox',
 
294
  );
295
 
296
  self::$settings['hide_url'] = array(
297
  'title' => esc_html__( 'Hide URL?', 'testimonials-widget' ),
298
  'type' => 'checkbox',
 
299
  );
300
 
301
  self::$settings['target'] = array(
@@ -322,6 +359,8 @@ class Testimonials_Widget_Settings {
322
  'title' => esc_html__( 'Do [shortcodes]?', 'testimonials-widget' ),
323
  'desc' => esc_html__( 'If unchecked, shortcodes are stripped.', 'testimonials-widget' ),
324
  'type' => 'checkbox',
 
 
325
  );
326
 
327
  self::$settings['general_expand_end'] = array(
@@ -354,6 +393,7 @@ class Testimonials_Widget_Settings {
354
  'title' => esc_html__( 'Require All Tags?', 'testimonials-widget' ),
355
  'desc' => esc_html__( 'Select only testimonials with all of the given tags', 'testimonials-widget' ),
356
  'type' => 'checkbox',
 
357
  );
358
 
359
  self::$settings['ids'] = array(
@@ -395,6 +435,7 @@ class Testimonials_Widget_Settings {
395
  'title' => esc_html__( 'Random Order?', 'testimonials-widget' ),
396
  'desc' => esc_html__( 'If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically', 'testimonials-widget' ),
397
  'type' => 'checkbox',
 
398
  );
399
 
400
  self::$settings['orderby'] = array(
@@ -453,12 +494,13 @@ class Testimonials_Widget_Settings {
453
  'title' => esc_html__( 'Allow Comments?', 'testimonials-widget' ),
454
  'desc' => esc_html__( 'Only affects the Testimonials Widget post edit page. Your theme controls the front-end view.', 'testimonials-widget' ),
455
  'type' => 'checkbox',
 
456
  'widget' => 0,
457
  );
458
 
459
  $desc = __( 'URL slug-name for <a href="%1s">testimonials archive</a> page.', 'testimonials-widget' );
460
  $has_archive = tw_get_option( 'has_archive', '' );
461
- $site_url = site_url( '/' . $has_archive . '/' );
462
 
463
  self::$settings['has_archive'] = array(
464
  'section' => 'post_type',
@@ -469,7 +511,7 @@ class Testimonials_Widget_Settings {
469
  'widget' => 0,
470
  );
471
 
472
- $desc = esc_html__( 'URL slug-name for testimonial view pages. Shouldn\'t be the same as Archive Page URL.', 'testimonials-widget' );
473
 
474
  self::$settings['rewrite_slug'] = array(
475
  'section' => 'post_type',
@@ -492,6 +534,7 @@ class Testimonials_Widget_Settings {
492
  'title' => esc_html__( 'Include IE7 CSS?', 'testimonials-widget' ),
493
  'desc' => esc_html__( 'IE7 specific CSS moved to separate CSS file in version 2.13.6.', 'testimonials-widget' ),
494
  'type' => 'checkbox',
 
495
  'backwards' => array(
496
  'version' => '2.13.6',
497
  'std' => 1,
@@ -504,6 +547,7 @@ class Testimonials_Widget_Settings {
504
  'title' => esc_html__( 'Remove `.hentry` CSS?', 'testimonials-widget' ),
505
  'desc' => esc_html__( 'Pre 2.6.4. Some themes use class `.hentry` in a manner that breaks Testimonials Widgets CSS', 'testimonials-widget' ),
506
  'type' => 'checkbox',
 
507
  'backwards' => array(
508
  'version' => '2.6.4',
509
  'std' => 1,
@@ -515,6 +559,7 @@ class Testimonials_Widget_Settings {
515
  'title' => esc_html__( 'Use `&lt;q&gt;` tag?', 'testimonials-widget' ),
516
  'desc' => esc_html__( 'Pre 2.11.0. Not HTML5 compliant', 'testimonials-widget' ),
517
  'type' => 'checkbox',
 
518
  'backwards' => array(
519
  'version' => '2.11.0',
520
  'std' => 1,
@@ -525,6 +570,7 @@ class Testimonials_Widget_Settings {
525
  'section' => 'reset',
526
  'title' => esc_html__( 'Don\'t Use Default Taxonomies?', 'testimonials-widget' ),
527
  'type' => 'checkbox',
 
528
  'desc' => esc_html__( 'If checked, use Testimonials Widget\'s own category and tag taxonomies instead', 'testimonials-widget' ),
529
  'widget' => 0,
530
  );
@@ -556,6 +602,7 @@ class Testimonials_Widget_Settings {
556
  'section' => 'reset',
557
  'title' => esc_html__( 'Remove Plugin Data on Deletion?', 'testimonials-widget' ),
558
  'type' => 'checkbox',
 
559
  'class' => 'warning', // Custom class for CSS
560
  'desc' => esc_html__( 'Delete all Testimonials Widget data and options from database on plugin deletion', 'testimonials-widget' ),
561
  'widget' => 0,
@@ -565,6 +612,7 @@ class Testimonials_Widget_Settings {
565
  'section' => 'reset',
566
  'title' => esc_html__( 'Reset to Defaults?', 'testimonials-widget' ),
567
  'type' => 'checkbox',
 
568
  'class' => 'warning', // Custom class for CSS
569
  'desc' => esc_html__( 'Check this box to reset options to their defaults', 'testimonials-widget' ),
570
  'widget' => 0,
@@ -750,7 +798,7 @@ class Testimonials_Widget_Settings {
750
  public function display_about_section() {
751
  echo '
752
  <div id="about" style="width: 70%; min-height: 225px;">
753
- <p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="' . WP_PLUGIN_URL . '/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>
754
  </div>
755
  ';
756
  }
@@ -761,6 +809,9 @@ class Testimonials_Widget_Settings {
761
 
762
  extract( $args );
763
 
 
 
 
764
  if ( is_null( $input ) ) {
765
  $options = get_option( self::ID );
766
  } else {
@@ -768,11 +819,10 @@ class Testimonials_Widget_Settings {
768
  $options[$id] = $input;
769
  }
770
 
771
- if ( ! isset( $options[$id] ) && $type != 'checkbox' ) {
772
  $options[$id] = $std;
773
- } elseif ( ! isset( $options[$id] ) ) {
774
  $options[$id] = 0;
775
- }
776
 
777
  $field_class = '';
778
  if ( ! empty( $class ) )
@@ -792,6 +842,8 @@ class Testimonials_Widget_Settings {
792
  if ( ! empty( $desc ) )
793
  $content .= '<label for="' . $id . '"><span class="description">' . $desc . '</span></label>';
794
 
 
 
795
  break;
796
 
797
  case 'file':
@@ -834,6 +886,8 @@ class Testimonials_Widget_Settings {
834
  if ( ! empty( $desc ) )
835
  $content .= '<br /><span class="description">' . $desc . '</span>';
836
 
 
 
837
  break;
838
 
839
  case 'readonly':
@@ -855,6 +909,8 @@ class Testimonials_Widget_Settings {
855
  if ( ! empty( $desc ) )
856
  $content .= '<br /><span class="description">' . $desc . '</span>';
857
 
 
 
858
  break;
859
 
860
  case 'text':
@@ -863,6 +919,8 @@ class Testimonials_Widget_Settings {
863
  if ( ! empty( $desc ) )
864
  $content .= '<br /><span class="description">' . $desc . '</span>';
865
 
 
 
866
  break;
867
 
868
  case 'textarea':
@@ -871,9 +929,12 @@ class Testimonials_Widget_Settings {
871
  if ( ! empty( $desc ) )
872
  $content .= '<br /><span class="description">' . $desc . '</span>';
873
 
 
 
874
  break;
875
 
876
  default:
 
877
  break;
878
  }
879
 
@@ -918,7 +979,10 @@ class Testimonials_Widget_Settings {
918
 
919
 
920
  public function styles() {
921
- wp_enqueue_style( 'jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
 
 
 
922
  }
923
 
924
 
@@ -994,18 +1058,34 @@ class Testimonials_Widget_Settings {
994
  }
995
  }
996
 
997
- if ( isset( $input['has_archive'] ) && isset( $input['rewrite_slug'] ) ) {
998
- // same has_archive and rewrite_slug causes problems
999
- if ( $input['has_archive'] == $input['rewrite_slug'] )
1000
- $input['rewrite_slug'] = $defaults['rewrite_slug'];
1001
 
1002
- // did URL slugs change?
1003
- $has_archive = tw_get_option( 'has_archive' );
1004
- $rewrite_slug = tw_get_option( 'rewrite_slug' );
1005
- if ( $has_archive != $input['has_archive'] || $rewrite_slug != $input['rewrite_slug'] )
1006
- flush_rewrite_rules();
 
 
 
 
 
 
 
1007
  }
1008
 
 
 
 
 
 
 
 
 
 
1009
  $input['version'] = self::$version;
1010
  $input['donate_version'] = Testimonials_Widget::VERSION;
1011
  $input = apply_filters( 'testimonials_widget_validate_settings', $input, $errors );
@@ -1026,6 +1106,28 @@ class Testimonials_Widget_Settings {
1026
  }
1027
 
1028
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1029
  /**
1030
  *
1031
  *
@@ -1116,6 +1218,10 @@ class Testimonials_Widget_Settings {
1116
  $input[ $id ] = self::validate_url( $input[ $id ], $default );
1117
  break;
1118
 
 
 
 
 
1119
  default:
1120
  $input[ $id ] = $validate( $input[ $id ] );
1121
  break;
@@ -1195,9 +1301,11 @@ class Testimonials_Widget_Settings {
1195
  return;
1196
 
1197
  $screen->set_help_sidebar(
1198
- '<p><strong>' . esc_html__( 'For more information:', 'testimonials-widget' ) . '</strong></p><p>' .
1199
  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' ) .
1200
  '</p><p>' .
 
 
1201
  sprintf(
1202
  __( 'View the <a href="%s">Testimonials Widget documentation</a>.', 'testimonials-widget' ),
1203
  esc_url( 'http://wordpress.org/plugins/testimonials-widget/' )
175
  'title' => esc_html__( 'Keep Whitespace?', 'testimonials-widget' ),
176
  'desc' => esc_html__( 'Keeps testimonials looking as entered than sans auto-formatting', 'testimonials-widget' ),
177
  'type' => 'checkbox',
178
+ 'validate' => 'is_true',
179
  );
180
 
181
  self::$settings['disable_animation'] = array(
182
  'section' => 'widget',
183
+ 'title' => esc_html__( 'Disable Animation?', 'testimonials-widget' ),
184
  'desc' => esc_html__( 'Disable animation between testimonial transitions. Useful when stacking widgets.', 'testimonials-widget' ),
185
  'type' => 'checkbox',
186
+ 'validate' => 'is_true',
187
  'std' => 1,
188
  );
189
 
236
  'type' => 'expand_begin',
237
  );
238
 
239
+ $desc = __( 'Adds HTML tag markup per the <a href="%s">Review schema</a> to testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results.', 'testimonials-widget' );
240
+
241
+ self::$settings['enable_schema'] = array(
242
+ 'title' => esc_html__( 'Enable Review Schema?', 'testimonials-widget' ),
243
+ 'desc' => sprintf( $desc, 'http://schema.org/Review' ),
244
+ 'type' => 'checkbox',
245
+ 'validate' => 'is_true',
246
+ 'std' => 1,
247
+ );
248
+
249
+ self::$settings['item_reviewed'] = array(
250
+ 'title' => esc_html__( 'Reviewed Item?', 'testimonials-widget' ),
251
+ 'desc' => esc_html__( 'Name of thing being referenced in testimonials', 'testimonials-widget' ),
252
+ 'std' => get_option( 'blogname' ),
253
+ );
254
+
255
+ self::$settings['item_reviewed_url'] = array(
256
+ 'title' => esc_html__( 'Reviewed Item URL?', 'testimonials-widget' ),
257
+ 'desc' => esc_html__( 'URL of thing being referenced in testimonials', 'testimonials-widget' ),
258
+ 'std' => network_site_url(),
259
+ 'validate' => 'url',
260
+ );
261
+
262
  self::$settings['disable_quotes'] = array(
263
  'title' => esc_html__( 'Hide built-in quotes?', 'testimonials-widget' ),
264
  'desc' => esc_html__( 'Remove open and close quote span tags surrounding testimonial content', 'testimonials-widget' ),
265
  'type' => 'checkbox',
266
+ 'validate' => 'is_true',
267
  );
268
 
269
  self::$settings['hide_not_found'] = array(
270
  'title' => esc_html__( 'Hide "Testimonials Not Found"?', 'testimonials-widget' ),
271
  'type' => 'checkbox',
272
+ 'validate' => 'is_true',
273
  );
274
 
275
  self::$settings['hide_gravatar'] = array(
276
  'title' => esc_html__( 'Hide Gravatar Image?', 'testimonials-widget' ),
277
  'type' => 'checkbox',
278
+ 'validate' => 'is_true',
279
  );
280
 
281
  self::$settings['hide_image'] = array(
282
  'title' => esc_html__( 'Hide Image?', 'testimonials-widget' ),
283
  'type' => 'checkbox',
284
+ 'validate' => 'is_true',
285
  );
286
 
287
  self::$settings['hide_image_single'] = array(
288
  'title' => esc_html__( 'Hide Image in Single View?', 'testimonials-widget' ),
289
  'type' => 'checkbox',
290
+ 'validate' => 'is_true',
291
  'widget' => 0,
292
  );
293
 
294
  self::$settings['hide_content'] = array(
295
  'title' => esc_html__( 'Hide Testimonial Content?', 'testimonials-widget' ),
296
  'type' => 'checkbox',
297
+ 'validate' => 'is_true',
298
  );
299
 
300
  self::$settings['hide_source'] = array(
301
  'title' => esc_html__( 'Hide Author/Source?', 'testimonials-widget' ),
302
  'type' => 'checkbox',
303
+ 'validate' => 'is_true',
304
  'desc' => esc_html__( 'Don\'t display "Post Title" in cite', 'testimonials-widget' ),
305
  );
306
 
307
  self::$settings['hide_email'] = array(
308
  'title' => esc_html__( 'Hide Email?', 'testimonials-widget' ),
309
  'type' => 'checkbox',
310
+ 'validate' => 'is_true',
311
  'std' => 1,
312
  );
313
 
314
  self::$settings['hide_title'] = array(
315
  'title' => esc_html__( 'Hide Job Title?', 'testimonials-widget' ),
316
  'type' => 'checkbox',
317
+ 'validate' => 'is_true',
318
  );
319
 
320
  self::$settings['hide_location'] = array(
321
  'title' => esc_html__( 'Hide Location?', 'testimonials-widget' ),
322
  'type' => 'checkbox',
323
+ 'validate' => 'is_true',
324
  );
325
 
326
  self::$settings['hide_company'] = array(
327
  'title' => esc_html__( 'Hide Company?', 'testimonials-widget' ),
328
  'type' => 'checkbox',
329
+ 'validate' => 'is_true',
330
  );
331
 
332
  self::$settings['hide_url'] = array(
333
  'title' => esc_html__( 'Hide URL?', 'testimonials-widget' ),
334
  'type' => 'checkbox',
335
+ 'validate' => 'is_true',
336
  );
337
 
338
  self::$settings['target'] = array(
359
  'title' => esc_html__( 'Do [shortcodes]?', 'testimonials-widget' ),
360
  'desc' => esc_html__( 'If unchecked, shortcodes are stripped.', 'testimonials-widget' ),
361
  'type' => 'checkbox',
362
+ 'validate' => 'is_true',
363
+ 'std' => 1,
364
  );
365
 
366
  self::$settings['general_expand_end'] = array(
393
  'title' => esc_html__( 'Require All Tags?', 'testimonials-widget' ),
394
  'desc' => esc_html__( 'Select only testimonials with all of the given tags', 'testimonials-widget' ),
395
  'type' => 'checkbox',
396
+ 'validate' => 'is_true',
397
  );
398
 
399
  self::$settings['ids'] = array(
435
  'title' => esc_html__( 'Random Order?', 'testimonials-widget' ),
436
  'desc' => esc_html__( 'If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically', 'testimonials-widget' ),
437
  'type' => 'checkbox',
438
+ 'validate' => 'is_true',
439
  );
440
 
441
  self::$settings['orderby'] = array(
494
  'title' => esc_html__( 'Allow Comments?', 'testimonials-widget' ),
495
  'desc' => esc_html__( 'Only affects the Testimonials Widget post edit page. Your theme controls the front-end view.', 'testimonials-widget' ),
496
  'type' => 'checkbox',
497
+ 'validate' => 'is_true',
498
  'widget' => 0,
499
  );
500
 
501
  $desc = __( 'URL slug-name for <a href="%1s">testimonials archive</a> page.', 'testimonials-widget' );
502
  $has_archive = tw_get_option( 'has_archive', '' );
503
+ $site_url = network_site_url( '/' . $has_archive . '/' );
504
 
505
  self::$settings['has_archive'] = array(
506
  'section' => 'post_type',
511
  'widget' => 0,
512
  );
513
 
514
+ $desc = esc_html__( 'URL slug-name for testimonial view pages. Shouldn\'t be the same as the Archive Page URL nor should it match a page URL slug.', 'testimonials-widget' );
515
 
516
  self::$settings['rewrite_slug'] = array(
517
  'section' => 'post_type',
534
  'title' => esc_html__( 'Include IE7 CSS?', 'testimonials-widget' ),
535
  'desc' => esc_html__( 'IE7 specific CSS moved to separate CSS file in version 2.13.6.', 'testimonials-widget' ),
536
  'type' => 'checkbox',
537
+ 'validate' => 'is_true',
538
  'backwards' => array(
539
  'version' => '2.13.6',
540
  'std' => 1,
547
  'title' => esc_html__( 'Remove `.hentry` CSS?', 'testimonials-widget' ),
548
  'desc' => esc_html__( 'Pre 2.6.4. Some themes use class `.hentry` in a manner that breaks Testimonials Widgets CSS', 'testimonials-widget' ),
549
  'type' => 'checkbox',
550
+ 'validate' => 'is_true',
551
  'backwards' => array(
552
  'version' => '2.6.4',
553
  'std' => 1,
559
  'title' => esc_html__( 'Use `&lt;q&gt;` tag?', 'testimonials-widget' ),
560
  'desc' => esc_html__( 'Pre 2.11.0. Not HTML5 compliant', 'testimonials-widget' ),
561
  'type' => 'checkbox',
562
+ 'validate' => 'is_true',
563
  'backwards' => array(
564
  'version' => '2.11.0',
565
  'std' => 1,
570
  'section' => 'reset',
571
  'title' => esc_html__( 'Don\'t Use Default Taxonomies?', 'testimonials-widget' ),
572
  'type' => 'checkbox',
573
+ 'validate' => 'is_true',
574
  'desc' => esc_html__( 'If checked, use Testimonials Widget\'s own category and tag taxonomies instead', 'testimonials-widget' ),
575
  'widget' => 0,
576
  );
602
  'section' => 'reset',
603
  'title' => esc_html__( 'Remove Plugin Data on Deletion?', 'testimonials-widget' ),
604
  'type' => 'checkbox',
605
+ 'validate' => 'is_true',
606
  'class' => 'warning', // Custom class for CSS
607
  'desc' => esc_html__( 'Delete all Testimonials Widget data and options from database on plugin deletion', 'testimonials-widget' ),
608
  'widget' => 0,
612
  'section' => 'reset',
613
  'title' => esc_html__( 'Reset to Defaults?', 'testimonials-widget' ),
614
  'type' => 'checkbox',
615
+ 'validate' => 'is_true',
616
  'class' => 'warning', // Custom class for CSS
617
  'desc' => esc_html__( 'Check this box to reset options to their defaults', 'testimonials-widget' ),
618
  'widget' => 0,
798
  public function display_about_section() {
799
  echo '
800
  <div id="about" style="width: 70%; min-height: 225px;">
801
+ <p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="' . WP_PLUGIN_URL . '/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="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>, <a title="Aihrus website support made easy since 1999" href="http://aihr.us/about-aihrus/">full stack developer</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>
802
  </div>
803
  ';
804
  }
809
 
810
  extract( $args );
811
 
812
+ if ( ! isset( $no_code ) )
813
+ $no_code = false;
814
+
815
  if ( is_null( $input ) ) {
816
  $options = get_option( self::ID );
817
  } else {
819
  $options[$id] = $input;
820
  }
821
 
822
+ if ( ! isset( $options[$id] ) && $type != 'checkbox' )
823
  $options[$id] = $std;
824
+ elseif ( ! isset( $options[$id] ) )
825
  $options[$id] = 0;
 
826
 
827
  $field_class = '';
828
  if ( ! empty( $class ) )
842
  if ( ! empty( $desc ) )
843
  $content .= '<label for="' . $id . '"><span class="description">' . $desc . '</span></label>';
844
 
845
+ if ( ! $no_code )
846
+ $content .= '<br /><code>' . $id . '</code>';
847
  break;
848
 
849
  case 'file':
886
  if ( ! empty( $desc ) )
887
  $content .= '<br /><span class="description">' . $desc . '</span>';
888
 
889
+ if ( ! $no_code )
890
+ $content .= '<br /><code>' . $id . '</code>';
891
  break;
892
 
893
  case 'readonly':
909
  if ( ! empty( $desc ) )
910
  $content .= '<br /><span class="description">' . $desc . '</span>';
911
 
912
+ if ( ! $no_code )
913
+ $content .= '<br /><code>' . $id . '</code>';
914
  break;
915
 
916
  case 'text':
919
  if ( ! empty( $desc ) )
920
  $content .= '<br /><span class="description">' . $desc . '</span>';
921
 
922
+ if ( ! $no_code )
923
+ $content .= '<br /><code>' . $id . '</code>';
924
  break;
925
 
926
  case 'textarea':
929
  if ( ! empty( $desc ) )
930
  $content .= '<br /><span class="description">' . $desc . '</span>';
931
 
932
+ if ( ! $no_code )
933
+ $content .= '<br /><code>' . $id . '</code>';
934
  break;
935
 
936
  default:
937
+ $content = apply_filters( 'testimonials_widget_display_setting', '', $args, $input );
938
  break;
939
  }
940
 
979
 
980
 
981
  public function styles() {
982
+ if ( ! is_ssl() )
983
+ wp_enqueue_style( 'jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
984
+ else
985
+ wp_enqueue_style( 'jquery-style', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
986
  }
987
 
988
 
1058
  }
1059
  }
1060
 
1061
+ if ( ! empty( $input['has_archive'] ) )
1062
+ $input['has_archive'] = self::prevent_slug_conflict( $input['has_archive'] );
1063
+ else
1064
+ $input['has_archive'] = $defaults['has_archive'];
1065
 
1066
+ if ( ! empty( $input['rewrite_slug'] ) )
1067
+ $input['rewrite_slug'] = self::prevent_slug_conflict( $input['rewrite_slug'] );
1068
+ else
1069
+ $input['rewrite_slug'] = $defaults['rewrite_slug'];
1070
+
1071
+ $flush_rewrite_rules = false;
1072
+ // same has_archive and rewrite_slug causes problems
1073
+ if ( $input['has_archive'] == $input['rewrite_slug'] ) {
1074
+ $input['has_archive'] = $defaults['has_archive'];
1075
+ $input['rewrite_slug'] = $defaults['rewrite_slug'];
1076
+
1077
+ $flush_rewrite_rules = true;
1078
  }
1079
 
1080
+ // did URL slugs change?
1081
+ $has_archive = tw_get_option( 'has_archive' );
1082
+ $rewrite_slug = tw_get_option( 'rewrite_slug' );
1083
+ if ( $has_archive != $input['has_archive'] || $rewrite_slug != $input['rewrite_slug'] )
1084
+ $flush_rewrite_rules = true;
1085
+
1086
+ if ( $flush_rewrite_rules )
1087
+ flush_rewrite_rules();
1088
+
1089
  $input['version'] = self::$version;
1090
  $input['donate_version'] = Testimonials_Widget::VERSION;
1091
  $input = apply_filters( 'testimonials_widget_validate_settings', $input, $errors );
1106
  }
1107
 
1108
 
1109
+ public static function prevent_slug_conflict( $slug ) {
1110
+ global $wpdb;
1111
+
1112
+ // slugs must be unique within their own trees
1113
+ $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_parent = 0 LIMIT 1";
1114
+ $slug_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug ) );
1115
+
1116
+ if ( $slug_check ) {
1117
+ $suffix = 2;
1118
+ do {
1119
+ $alt_slug = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
1120
+ $slug_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_slug ) );
1121
+ $suffix++;
1122
+ } while ( $slug_check );
1123
+
1124
+ $slug = $alt_slug;
1125
+ }
1126
+
1127
+ return $slug;
1128
+ }
1129
+
1130
+
1131
  /**
1132
  *
1133
  *
1218
  $input[ $id ] = self::validate_url( $input[ $id ], $default );
1219
  break;
1220
 
1221
+ case 'is_true':
1222
+ $input[ $id ] = self::is_true( $input[ $id ] );
1223
+ break;
1224
+
1225
  default:
1226
  $input[ $id ] = $validate( $input[ $id ] );
1227
  break;
1301
  return;
1302
 
1303
  $screen->set_help_sidebar(
1304
+ '<p>' .
1305
  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' ) .
1306
  '</p><p>' .
1307
+ esc_html__( 'Shortcode option names are listed below each entry.', 'testimonials-widget' ) .
1308
+ '</p><p>' .
1309
  sprintf(
1310
  __( 'View the <a href="%s">Testimonials Widget documentation</a>.', 'testimonials-widget' ),
1311
  esc_url( 'http://wordpress.org/plugins/testimonials-widget/' )
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
 
3
  Contributors: comprock
4
  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.1
8
- Stable tag: 2.13.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -14,7 +14,7 @@ Testimonials Widget plugin allows you to display random or selected portfolio, q
14
 
15
  == Description ==
16
 
17
- Testimonials Widget plugin allows you to display random or selected portfolio, quotes, reviews, showcases, or text with images on your WordPress blog. You can insert Testimonials Widget content via shortcode, theme functions, or widgets with category and tag selections and having multiple display options such as random or specific ordering.
18
 
19
  [youtube http://www.youtube.com/watch?v=bhUhuQ-2m8s]
20
  **[Video introduction](http://youtu.be/bhUhuQ-2m8s)**
@@ -36,6 +36,7 @@ The single testimonial view supports image, source, title, location, email, comp
36
  * Capable of handling multiple widgets per page or post
37
  * Fields for source, testimonial, image, title, location, email, company and URL details
38
  * Multiple paging options for testimonials listings
 
39
  * Settings export/import
40
  * Settings screen for site-wide option defaults
41
  * Shortcodes and theme functions for listings and rotation
@@ -45,7 +46,7 @@ The single testimonial view supports image, source, title, location, email, comp
45
 
46
  = Testimonials Widget Premium Plugin Features =
47
 
48
- Testimonials Widget Premium plugin extends the best [Testimonials Widget](http://wordpress.org/extend/plugins/testimonials-widget/) plugin for WordPress with [caching, excerpts, filters, read more links](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/), more selection options, and advanced capabilities like selecting posts, pages and other custom post types as testimonials. Additionally, users can add testimonials via a front-end form shortcode or widget.
49
 
50
  * "Read more" link column on testimonial posts admin page
51
  * Admin mode only anti-spam debug help text
@@ -54,27 +55,32 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
54
  * Alternating `.even` and `.odd` CSS classes for styling testimonial list entries
55
  * Automatically change to the next testimonial, per the sort order, whenever a user navigates to another page.
56
  * Built-in update notification
 
57
  * Cache per page when you use custom testimonials instance per page
58
  * Caching of testimonials queries and content to decrease server load time improve page loading speed by 1/10 to 1/2 a second
59
  * Clear cache when WP Super Cache, FlexiCache, Hyper Cache, DB Cache Reloaded Fix does
60
- * CSS or HTML table based testimonials submissions form layout
61
  * Deactivates self if no active or incorrect version of Testimonials Widget plugin
62
  * Default post author, category, and status options for user testimonial submissions
63
  * Deletes old and related testimonial cache entries automatically
64
  * Disable caching for widget, shortcode or theme functions
65
  * Disable donate and purchase related text and links
 
66
  * Email notification for user submitted testimonials
67
  * Excerpts for widget view, with read more link to complete testimonial
 
68
  * Filters for caching and more link control, text replacement, and more
69
  * Form "Testimonial" header text is customizable to "Specials" or other terms
70
  * Front-end entry form for user supplied testimonials. **[Live form demo](http://aihr.us/about-aihrus/testimonials/add-testimonial/)**
71
  * Math-based CAPTCHA
72
  * Multiple anti-spam traps
73
  * Multiple user-entry forms on same page are allowed
 
74
  * Plugin version tracking to ensure compatibility
75
  * Premium tab on settings screen for site-wide option defaults
76
  * Prevent duplicate testimonials when using multiple testimonial instances
77
  * Read more links for testimonials exceeding the character limit
 
 
78
  * Right Now Dashboard widget displays "Pending Testimonials" counts
79
  * Select only testimonials with excerpts, images or of arbitrary maximum and minimum length
80
  * Select post, page and other custom post types for content rotations slider
@@ -83,6 +89,7 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
83
  * Shortcodes, theme functions, and widget user testimonial submission form
84
  * Show excerpts with list and single views
85
  * Show unique testimonials on page with multiple testimonial instances
 
86
  * Testimonial links listing with image, source, title, location, company, and URL fields
87
  * Upload images by browsing or URL
88
  * WP Admin > Testmonials > Clear Cache menu link
@@ -99,6 +106,7 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
99
  = Additional Testimonials Widget Features =
100
 
101
  * Adjustable animation speed
 
102
  * Auto-migration from pre-2.0.0 custom table to new Testimonials Widget custom post type
103
  * Automatic linking of email and URL fields via source or company fields
104
  * Clickable widget titles
@@ -111,11 +119,13 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
111
  * Custom widget bottom text
112
  * Customizable archive and testimonial URLs
113
  * Customizable testimonial data field `testimonial_extra`
114
- * Deletes testimonials-widget custom post type entries and settings on uninstall
115
  * Disable self-generated quotation marks
 
116
  * Easy to configure Next and Previous page indicators
117
  * Editors and admins can edit testimonial publisher
118
  * Flush URLs on deactivation
 
119
  * IDs column shown in testimonials edit page
120
  * IE7 CSS hacks for quotes and join parts
121
  * Image, email based Gravatar, category and tag enabled
@@ -150,9 +160,12 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
150
 
151
  **General**
152
 
153
- * Character Limit - Number of characters to limit testimonial views to
154
- * `char_limit` - default none; char_limit=200
155
- * Widget - default 500
 
 
 
156
  * Hide built-in quotes? - Remove open and close quote span tags surrounding testimonial content
157
  * `disable_quotes` - default false; disable_quotes=true
158
  * Hide "Testimonials Not Found"?
@@ -163,7 +176,7 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
163
  * `hide_image` - default show; hide_image=true
164
  * Hide Image in Single View?
165
  * `hide_image_single` - default show; hide_image_single=true
166
- * Hide Content?
167
  * `hide_content` - default show; hide_content=true
168
  * Hide Author/Source? - Don't display "Post Title" in cite
169
  * `hide_source` - default show; hide_source=true
@@ -179,8 +192,6 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
179
  * `hide_url` - default show; hide_url=true
180
  * URL Target - Add target to all URLs; leave blank if none
181
  * `target` - default none; target=_new
182
- * Testimonial Bottom Text - Custom text or HTML for bottom of testimonials
183
- * `bottom_text` - default none; bottom_text="`&lt;h3&gt;&lt;a href="http://example.com"&gt;All testimonials&lt;/a&gt;&lt;/h3&gt;`"
184
  * Enable Paging - for [testimonialswidget_list]
185
  * `paging` - default true [true|before|after|false]; paging=false
186
  * `true` – display paging before and after testimonial entries
@@ -194,10 +205,10 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
194
 
195
  * Category Filter - Comma separated category slug-names
196
  * `category` - default none; category=product or category="category-a, another-category"
197
- * Require All Tags - Select only testimonials with all of the given tags
198
- * `tags_all` - default OR; tags_all=true
199
  * Tags Filter - Comma separated tag slug-names
200
  * `tags` - default none; tags=fire or tags="tag-a, another-tag"
 
 
201
  * Include IDs Filter - Comma separated IDs
202
  * `ids` - default none; ids=2 or ids="2,4,6"
203
  * Exclude IDs Filter - Comma separated IDs
@@ -223,12 +234,17 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
223
  * `title` - default "Testimonials"
224
  * Title Link - URL or Post ID to link widget title to
225
  * `title_link` - default none; title_link=123, title_link=http://example.com
 
 
 
 
 
 
 
226
  * Keep Whitespace? - Keeps testimonials looking as entered than sans auto-formatting
227
  * `keep_whitespace` - default none; keep_whitespace=true
228
  * The citation has no whitespace adaptations. It's straight text, except for email or URL links. The presentation is handled strictly by CSS.
229
- * Height - Testimonials height, in pixels. Overrides minimum and maximum height
230
- * `height` - default none; height=300
231
- * Disable animation? - Disable animation between testimonial transitions. Useful when stacking.
232
  * `disable_animation` - default false; disable_animation=true
233
  * Fade Out Speed - Transition duration in milliseconds; higher values indicate slower animations, not faster ones.
234
  * `fade_out_speed` - default 1250; fade_out_speed=400
@@ -238,8 +254,8 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
238
  * `min_height` - default none; min_height=100
239
  * Maximum Height - Set for maximum display height, in pixels
240
  * `max_height` - default none; max_height=250
241
- * Rotation speed - Seconds between testimonial rotations or 0 for no rotation at all
242
- * `refresh_interval` - default 5; refresh_interval=0
243
 
244
  = Other Options =
245
 
@@ -282,6 +298,8 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
282
  * [testimonialswidget_list order=ASC orderby=title]
283
  * Select testimonials tagged with either "test" or "fun", in random order, but ignore those of the excluded ids
284
  * [testimonialswidget_list tags="test,fun" random=true exclude="2,22,333"]
 
 
285
 
286
  **[testimonialswidget_widget]**
287
 
@@ -303,12 +321,12 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
303
 
304
  = Notes =
305
 
 
306
  * Auto-migration from pre-2.0.0 custom table to new custom post type
307
  * Company, URL and email details are attempted to be identified and placed properly
308
  * Public testimonials are saved as Published. Non-public, are marked as Private.
309
  * Ignores already imported
310
- * Default image size is based upon Thumbnail size in Media Settings
311
- * Gravatar image is configured in the Avatar section of Discussion Settings
312
  * When plugin is uninstalled, all data and settings are deleted
313
 
314
  = Languages =
@@ -360,9 +378,11 @@ If you want to contribute and I hope you do, visit the [Testimonials Widget Gith
360
 
361
  = Most Common Resolutions =
362
 
 
363
  1. [Debug common theme and plugin conflicts](https://aihrus.zendesk.com/entries/25119302-How-do-you-debug-common-issues-)
364
- 1. [Alter CSS](https://aihrus.zendesk.com/entries/24910733-How-to-Correct-Testimonials-Widget-CSS-Issues)
365
  1. [Pagination is broken](https://aihrus.zendesk.com/entries/23693513-My-testimonials-list-paging-doesn-t-work)
 
366
 
367
  = Still Stuck? =
368
 
@@ -389,6 +409,7 @@ Please visit the [Testimonials Widget Knowledge Base](https://aihrus.zendesk.com
389
  16. Testimonials Widget Settings > Widget tab
390
  17. Testimonials Widget Settings > Compatibility & Reset tab
391
  18. Dashboard > Right Now "Testimonials" count
 
392
 
393
 
394
  == Changelog ==
@@ -398,6 +419,14 @@ See [Changelog](https://github.com/michael-cannon/testimonials-widget/blob/maste
398
 
399
  == Upgrade Notice ==
400
 
 
 
 
 
 
 
 
 
401
  = 2.13.6 =
402
 
403
  * IE 7 CSS moved to separate file. Include via Testimonials > Settings if needed
2
 
3
  Contributors: comprock
4
  Donate link: http://aihr.us/about-aihrus/donate/
5
+ Tags: client, customer, portfolio, quotations, quote, quotes, random, recommendation, reference, review, reviews, testimonial, testimonials, testimony, wpml
6
  Requires at least: 3.4
7
  Tested up to: 3.6.1
8
+ Stable tag: 2.14.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
14
 
15
  == Description ==
16
 
17
+ Testimonials Widget plugin allows you to display random or selected portfolio, quotes, reviews, showcases, or text with images on your WordPress blog. You can insert Testimonials Widget content via shortcode, theme functions, or widgets with category and tag selections and having multiple display options such as random or specific ordering. Further, the [Review schema](http://schema.org/Review) for improved search engine results is built-in.
18
 
19
  [youtube http://www.youtube.com/watch?v=bhUhuQ-2m8s]
20
  **[Video introduction](http://youtu.be/bhUhuQ-2m8s)**
36
  * Capable of handling multiple widgets per page or post
37
  * Fields for source, testimonial, image, title, location, email, company and URL details
38
  * Multiple paging options for testimonials listings
39
+ * Schema.org microdata format for improved search engine results
40
  * Settings export/import
41
  * Settings screen for site-wide option defaults
42
  * Shortcodes and theme functions for listings and rotation
46
 
47
  = Testimonials Widget Premium Plugin Features =
48
 
49
+ Testimonials Widget Premium adds onto the best WordPress testimonials plugin there is, [Testimonials Widget](http://wordpress.org/extend/plugins/testimonials-widget/). Testimonials Widget Premium offers [caching, excerpts, filters, read more links](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/), more selection options, and advanced capabilities like using custom post types as testimonials. Additionally, testimonials can be rated and users can submit their own testimonials via a front-end form shortcode or widget.
50
 
51
  * "Read more" link column on testimonial posts admin page
52
  * Admin mode only anti-spam debug help text
55
  * Alternating `.even` and `.odd` CSS classes for styling testimonial list entries
56
  * Automatically change to the next testimonial, per the sort order, whenever a user navigates to another page.
57
  * Built-in update notification
58
+ * CSS or HTML table based testimonials submissions form layout
59
  * Cache per page when you use custom testimonials instance per page
60
  * Caching of testimonials queries and content to decrease server load time improve page loading speed by 1/10 to 1/2 a second
61
  * Clear cache when WP Super Cache, FlexiCache, Hyper Cache, DB Cache Reloaded Fix does
 
62
  * Deactivates self if no active or incorrect version of Testimonials Widget plugin
63
  * Default post author, category, and status options for user testimonial submissions
64
  * Deletes old and related testimonial cache entries automatically
65
  * Disable caching for widget, shortcode or theme functions
66
  * Disable donate and purchase related text and links
67
+ * Displays ratings to grant testimonials more power!
68
  * Email notification for user submitted testimonials
69
  * Excerpts for widget view, with read more link to complete testimonial
70
+ * Fields for rating, item reviewed, and item URL per testimonial
71
  * Filters for caching and more link control, text replacement, and more
72
  * Form "Testimonial" header text is customizable to "Specials" or other terms
73
  * Front-end entry form for user supplied testimonials. **[Live form demo](http://aihr.us/about-aihrus/testimonials/add-testimonial/)**
74
  * Math-based CAPTCHA
75
  * Multiple anti-spam traps
76
  * Multiple user-entry forms on same page are allowed
77
+ * Override Review schema author name
78
  * Plugin version tracking to ensure compatibility
79
  * Premium tab on settings screen for site-wide option defaults
80
  * Prevent duplicate testimonials when using multiple testimonial instances
81
  * Read more links for testimonials exceeding the character limit
82
+ * Require minimumal testimonial rating for display
83
+ * Review microdata format per schema.org
84
  * Right Now Dashboard widget displays "Pending Testimonials" counts
85
  * Select only testimonials with excerpts, images or of arbitrary maximum and minimum length
86
  * Select post, page and other custom post types for content rotations slider
89
  * Shortcodes, theme functions, and widget user testimonial submission form
90
  * Show excerpts with list and single views
91
  * Show unique testimonials on page with multiple testimonial instances
92
+ * Simple, single rating per testimonials (more capabilities to come in future releases)
93
  * Testimonial links listing with image, source, title, location, company, and URL fields
94
  * Upload images by browsing or URL
95
  * WP Admin > Testmonials > Clear Cache menu link
106
  = Additional Testimonials Widget Features =
107
 
108
  * Adjustable animation speed
109
+ * Archive Page URL and Testimonial Page URL are prevented from being the same or matching existing pages.
110
  * Auto-migration from pre-2.0.0 custom table to new Testimonials Widget custom post type
111
  * Automatic linking of email and URL fields via source or company fields
112
  * Clickable widget titles
119
  * Custom widget bottom text
120
  * Customizable archive and testimonial URLs
121
  * Customizable testimonial data field `testimonial_extra`
122
+ * Deletes testimonials-widget custom post type entries and settings on uninstall
123
  * Disable self-generated quotation marks
124
+ * Easily label and link to reviewed item for Review schema
125
  * Easy to configure Next and Previous page indicators
126
  * Editors and admins can edit testimonial publisher
127
  * Flush URLs on deactivation
128
+ * Gravatars saved as featured images
129
  * IDs column shown in testimonials edit page
130
  * IE7 CSS hacks for quotes and join parts
131
  * Image, email based Gravatar, category and tag enabled
160
 
161
  **General**
162
 
163
+ * Enable Review Schema? Adds HTML tag markup per the [Review schema](http://schema.org/Review) to testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results.
164
+ * `enable_schema` - default true; enable_schema=false
165
+ * Reviewed Item? - Name of thing being referenced in testimonials
166
+ * `item_reviewed` - default "Site Title"
167
+ * Reviewed Item URL? - URL of thing being referenced in testimonials
168
+ * `item_reviewed_url` - default `network_site_url();`
169
  * Hide built-in quotes? - Remove open and close quote span tags surrounding testimonial content
170
  * `disable_quotes` - default false; disable_quotes=true
171
  * Hide "Testimonials Not Found"?
176
  * `hide_image` - default show; hide_image=true
177
  * Hide Image in Single View?
178
  * `hide_image_single` - default show; hide_image_single=true
179
+ * Hide Testimonial Content?
180
  * `hide_content` - default show; hide_content=true
181
  * Hide Author/Source? - Don't display "Post Title" in cite
182
  * `hide_source` - default show; hide_source=true
192
  * `hide_url` - default show; hide_url=true
193
  * URL Target - Add target to all URLs; leave blank if none
194
  * `target` - default none; target=_new
 
 
195
  * Enable Paging - for [testimonialswidget_list]
196
  * `paging` - default true [true|before|after|false]; paging=false
197
  * `true` – display paging before and after testimonial entries
205
 
206
  * Category Filter - Comma separated category slug-names
207
  * `category` - default none; category=product or category="category-a, another-category"
 
 
208
  * Tags Filter - Comma separated tag slug-names
209
  * `tags` - default none; tags=fire or tags="tag-a, another-tag"
210
+ * Require All Tags - Select only testimonials with all of the given tags
211
+ * `tags_all` - default OR; tags_all=true
212
  * Include IDs Filter - Comma separated IDs
213
  * `ids` - default none; ids=2 or ids="2,4,6"
214
  * Exclude IDs Filter - Comma separated IDs
234
  * `title` - default "Testimonials"
235
  * Title Link - URL or Post ID to link widget title to
236
  * `title_link` - default none; title_link=123, title_link=http://example.com
237
+ * Character Limit - Number of characters to limit testimonial views to
238
+ * `char_limit` - default none; char_limit=200
239
+ * Widget - default 500
240
+ * Height - Testimonials height, in pixels. Overrides minimum and maximum height
241
+ * `height` - default none; height=300
242
+ * Rotation speed - Seconds between testimonial rotations or 0 for no rotation at all
243
+ * `refresh_interval` - default 5; refresh_interval=0
244
  * Keep Whitespace? - Keeps testimonials looking as entered than sans auto-formatting
245
  * `keep_whitespace` - default none; keep_whitespace=true
246
  * The citation has no whitespace adaptations. It's straight text, except for email or URL links. The presentation is handled strictly by CSS.
247
+ * Disable Animation? - Disable animation between testimonial transitions. Useful when stacking.
 
 
248
  * `disable_animation` - default false; disable_animation=true
249
  * Fade Out Speed - Transition duration in milliseconds; higher values indicate slower animations, not faster ones.
250
  * `fade_out_speed` - default 1250; fade_out_speed=400
254
  * `min_height` - default none; min_height=100
255
  * Maximum Height - Set for maximum display height, in pixels
256
  * `max_height` - default none; max_height=250
257
+ * Testimonial Bottom Text - Custom text or HTML for bottom of testimonials
258
+ * `bottom_text` - default none; bottom_text="`&lt;h3&gt;&lt;a href="http://example.com"&gt;All testimonials&lt;/a&gt;&lt;/h3&gt;`"
259
 
260
  = Other Options =
261
 
298
  * [testimonialswidget_list order=ASC orderby=title]
299
  * Select testimonials tagged with either "test" or "fun", in random order, but ignore those of the excluded ids
300
  * [testimonialswidget_list tags="test,fun" random=true exclude="2,22,333"]
301
+ * Show all testimonials on one page
302
+ * [testimonialswidget_list char_limit=0 limit=-1]
303
 
304
  **[testimonialswidget_widget]**
305
 
321
 
322
  = Notes =
323
 
324
+ * Review schema [structured data testing tool](http://www.google.com/webmasters/tools/richsnippets)
325
  * Auto-migration from pre-2.0.0 custom table to new custom post type
326
  * Company, URL and email details are attempted to be identified and placed properly
327
  * Public testimonials are saved as Published. Non-public, are marked as Private.
328
  * Ignores already imported
329
+ * Default and Gravatar image size is based upon Thumbnail size in Media Settings
 
330
  * When plugin is uninstalled, all data and settings are deleted
331
 
332
  = Languages =
378
 
379
  = Most Common Resolutions =
380
 
381
+ 1. [How do I change my widget's rotation speed or other options?](https://aihrus.zendesk.com/entries/27714083-How-do-I-change-my-widget-s-rotation-speed-or-other-options-)
382
  1. [Debug common theme and plugin conflicts](https://aihrus.zendesk.com/entries/25119302-How-do-you-debug-common-issues-)
383
+ 1. [Change or debug CSS](https://aihrus.zendesk.com/entries/24910733-How-to-Correct-Testimonials-Widget-CSS-Issues)
384
  1. [Pagination is broken](https://aihrus.zendesk.com/entries/23693513-My-testimonials-list-paging-doesn-t-work)
385
+ 1. [Test Review schema output](http://www.google.com/webmasters/tools/richsnippets)
386
 
387
  = Still Stuck? =
388
 
409
  16. Testimonials Widget Settings > Widget tab
410
  17. Testimonials Widget Settings > Compatibility & Reset tab
411
  18. Dashboard > Right Now "Testimonials" count
412
+ 19. Using Review and AggregateRating schema data structures
413
 
414
 
415
  == Changelog ==
419
 
420
  == Upgrade Notice ==
421
 
422
+ = 2.14.0 =
423
+
424
+ * **60 modifications** See [Changelog](https://github.com/michael-cannon/testimonials-widget/blob/master/CHANGELOG.md)
425
+ * CSS wp_register_style and wp_enqueue_style slug changed from 'testimonials-widget' to 'Testimonials_Widget'
426
+ * Gravatar image size now based upon Thumbnail size in Media Settings
427
+ * Scripts `ksort` removed. Use `array_unshift` in your `testimonials_widget_testimonials_js` filters instead.
428
+ * Testimonials > Settings, General tab, option Enable Review Schema? is enabled by default.
429
+
430
  = 2.13.6 =
431
 
432
  * IE 7 CSS moved to separate file. Include via Testimonials > Settings if needed
testimonials-widget.css CHANGED
@@ -24,6 +24,22 @@
24
  height: 1.4em;
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  .testimonials-widget-testimonial.list,
28
  .testimonials-widget-testimonial.single {
29
  display: block;
24
  height: 1.4em;
25
  }
26
 
27
+ .testimonials-widget-testimonials .paging.prepend {
28
+ margin-bottom: 1em;
29
+ }
30
+
31
+ .testimonials-widget-testimonials .paging.append {
32
+ margin-top: 1em;
33
+ }
34
+
35
+ .testimonials-widget-testimonials .alignleft {
36
+ float: left;
37
+ }
38
+
39
+ .testimonials-widget-testimonials .alignright {
40
+ float: right;
41
+ }
42
+
43
  .testimonials-widget-testimonial.list,
44
  .testimonials-widget-testimonial.single {
45
  display: block;
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.13.6
7
  * Author: Michael Cannon
8
  * Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
9
  * License: GPLv2 or later
@@ -28,9 +28,10 @@ class Testimonials_Widget {
28
  const OLD_NAME = 'testimonialswidget';
29
  const PLUGIN_FILE = 'testimonials-widget/testimonials-widget.php';
30
  const PT = 'testimonials-widget';
31
- const VERSION = '2.13.6';
32
 
33
  private static $base = null;
 
34
  private static $max_num_pages = 0;
35
  private static $post_count = 0;
36
  private static $wp_query = null;
@@ -50,6 +51,42 @@ class Testimonials_Widget {
50
  public static $use_instance = false;
51
  public static $widget_number = 100000;
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  public function __construct() {
55
  add_action( 'admin_init', array( $this, 'admin_init' ) );
@@ -93,7 +130,6 @@ EOD;
93
  self::$cpt_category = self::PT . '-category';
94
  self::$cpt_tags = self::PT . '-post_tag';
95
  self::init_post_type();
96
- self::styles();
97
  }
98
 
99
 
@@ -108,6 +144,8 @@ EOD;
108
  public static function add_instance() {
109
  self::$use_instance = false;
110
  self::$instance_number++;
 
 
111
  }
112
 
113
 
@@ -151,14 +189,35 @@ EOD;
151
  $atts['ids'] = $post->ID;
152
  $atts['type'] = 'get_single';
153
 
154
- $testimonials = self::get_testimonials( $atts );
155
- $testimonial = $testimonials[0];
 
 
 
 
 
 
 
 
 
 
156
 
157
- $details = self::get_testimonial_html( $testimonial, $atts );
158
- $details = apply_filters( 'testimonials_widget_testimonial_html_single', $details, $testimonial, $atts );
159
- $content = apply_filters( 'testimonials_widget_testimonial_html_single_content', $content, $testimonial, $atts );
160
 
161
- return $content . $details;
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
 
164
 
@@ -253,7 +312,7 @@ EOD;
253
 
254
  public function admin_notices_2_12_0() {
255
  $content = '<div class="updated fade"><p>';
256
- $content .= sprintf( __( 'If your Testimonials Widget display has gone to funky town, please <a href="%s">read the FAQ</a> about possible CSS fixes.', 'testimonials-widget' ), 'https://aihrus.zendesk.com/entries/23722573-Major-Changes-Since-2-10-0' );
257
  $content .= '</p></div>';
258
 
259
  echo $content;
@@ -275,6 +334,9 @@ EOD;
275
  if ( $prior_version < '2.12.0' )
276
  add_action( 'admin_notices', array( $this, 'admin_notices_2_12_0' ) );
277
 
 
 
 
278
  tw_set_option( 'admin_notices' );
279
  }
280
 
@@ -552,8 +614,6 @@ EOD;
552
  'slug' => $rewrite_slug,
553
  'with_front' => false,
554
  ),
555
- 'show_in_menu' => true,
556
- 'show_ui' => true,
557
  'supports' => $supports,
558
  'taxonomies' => $taxonomies,
559
  );
@@ -570,10 +630,12 @@ EOD;
570
  public static function register_taxonomies() {
571
  $args = array(
572
  'hierarchical' => true,
 
573
  );
574
  register_taxonomy( self::$cpt_category, self::PT, $args );
575
 
576
  $args = array(
 
577
  'update_count_callback' => '_update_post_term_count',
578
  );
579
  register_taxonomy( self::$cpt_tags, self::PT, $args );
@@ -589,8 +651,6 @@ EOD;
589
 
590
 
591
  public function testimonialswidget_list( $atts ) {
592
- self::add_instance();
593
-
594
  $atts = wp_parse_args( $atts, self::get_defaults() );
595
  $atts = Testimonials_Widget_Settings::validate_settings( $atts );
596
 
@@ -604,14 +664,20 @@ EOD;
604
 
605
  $atts['type'] = 'testimonialswidget_list';
606
 
607
- $content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
 
 
 
608
 
 
609
  if ( false === $content ) {
610
  $testimonials = self::get_testimonials( $atts );
611
  $content = self::get_testimonials_html( $testimonials, $atts );
612
  $content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
613
  }
614
 
 
 
615
  return $content;
616
  }
617
 
@@ -624,53 +690,25 @@ EOD;
624
  $atts['random'] = 1;
625
  }
626
 
627
- self::set_instance( $widget_number );
628
-
629
  $atts = wp_parse_args( $atts, self::get_defaults() );
630
  $atts = Testimonials_Widget_Settings::validate_settings( $atts );
631
 
632
- $atts['paging'] = false;
633
- $atts['type'] = 'testimonialswidget_widget';
634
- $atts['widget_number'] = $widget_number;
635
 
636
- self::scripts( $atts );
 
637
 
638
- $testimonials = self::get_testimonials( $atts );
639
 
640
  $content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
641
-
642
  if ( false === $content ) {
643
- $content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
644
- $content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
645
- }
646
-
647
- // Generate CSS
648
- $atts['type'] = 'testimonialswidget_widget_css';
649
- $css = apply_filters( 'testimonials_widget_cache_get', false, $atts );
650
-
651
- if ( false === $css ) {
652
- $css = self::get_testimonials_html_css( $atts, $widget_number );
653
- $css = apply_filters( 'testimonials_widget_cache_set', $css, $atts );
654
- }
655
-
656
- if ( ! empty( $css ) ) {
657
- self::$css = array_merge( $css, self::$css );
658
- add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_css' ), 20 );
659
- }
660
-
661
- // Generate JS
662
- $atts['type'] = 'testimonialswidget_widget_js';
663
- $js = apply_filters( 'testimonials_widget_cache_get', false, $atts );
664
-
665
- if ( false === $js ) {
666
- $js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
667
- $js = apply_filters( 'testimonials_widget_cache_set', $js, $atts );
668
  }
669
 
670
- if ( ! empty( $js ) ) {
671
- self::$scripts = array_merge( $js, self::$scripts );
672
- add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_scripts' ), 20 );
673
- }
674
 
675
  return $content;
676
  }
@@ -690,49 +728,57 @@ EOD;
690
  if ( is_admin() )
691
  return;
692
 
693
- wp_register_style( 'testimonials-widget', plugins_url( 'testimonials-widget.css', __FILE__ ) );
694
- wp_enqueue_style( 'testimonials-widget' );
695
 
696
  $include_ie7_css = tw_get_option( 'include_ie7_css' );
697
  if ( $include_ie7_css ) {
698
- wp_register_style( 'testimonials-widget-ie7', plugins_url( 'testimonials-widget-ie7.css', __FILE__ ) );
699
- wp_enqueue_style( 'testimonials-widget-ie7' );
700
  }
 
 
701
  }
702
 
703
 
704
  public static function get_testimonials_html_css( $atts, $widget_number = null ) {
705
- // display attributes
706
- $height = $atts['height'];
707
- $max_height = $atts['max_height'];
708
- $min_height = $atts['min_height'];
709
-
710
- if ( $height ) {
711
- $max_height = $height;
712
- $min_height = $height;
713
- }
 
 
 
 
714
 
715
- $css = array();
716
- $id_base = self::ID . $widget_number;
717
 
718
- if ( $min_height ) {
719
- $css[] = <<<EOF
720
  <style>
721
  .$id_base {
722
  min-height: {$min_height}px;
723
  }
724
  </style>
725
  EOF;
726
- }
727
 
728
- if ( $max_height ) {
729
- $css[] = <<<EOF
730
  <style>
731
  .$id_base {
732
  max-height: {$max_height}px;
733
  }
734
  </style>
735
  EOF;
 
 
736
  }
737
 
738
  $css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
@@ -742,42 +788,42 @@ EOF;
742
 
743
 
744
  public static function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
745
- // display attributes
746
- $refresh_interval = $atts['refresh_interval'];
747
-
748
- $id_base = self::ID . $widget_number;
749
- $scripts = array();
750
- $tw_padding = 'tw_padding' . $widget_number;
751
- $tw_wrapper = 'tw_wrapper' . $widget_number;
752
-
753
- $disable_animation = $atts['disable_animation'];
754
- $fade_in_speed = $atts['fade_in_speed'];
755
- $fade_out_speed = $atts['fade_out_speed'];
756
- $height = $atts['height'];
757
- $max_height = $atts['max_height'];
758
- $min_height = $atts['min_height'];
759
-
760
- $enable_animation = 1;
761
- if ( $disable_animation || $height || $max_height || $min_height )
762
- $enable_animation = 0;
763
-
764
- if ( $refresh_interval && 1 < count( $testimonials ) ) {
765
- $javascript = <<<EOF
766
- <script type="text/javascript">
767
- if ( {$enable_animation} ) {
768
- var {$tw_wrapper} = jQuery('.{$id_base}');
769
- // tw_padding is the difference in height to take into account all styling options
770
- var {$tw_padding} = {$tw_wrapper}.height() - jQuery('.{$id_base} .testimonials-widget').height();
771
- // fixes first animation by defining height to adjust to
772
- {$tw_wrapper}.height( {$tw_wrapper}.height() );
773
- }
774
-
775
  function nextTestimonial{$widget_number}() {
776
  if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
777
  var active = jQuery('.{$id_base} .active');
778
  var next = (jQuery('.{$id_base} .active').next().length > 0) ? jQuery('.{$id_base} .active').next() : jQuery('.{$id_base} .testimonials-widget-testimonial:first-child');
779
 
780
- active.fadeOut({$fade_out_speed}, function(){
781
  active.removeClass('active');
782
  next.fadeIn({$fade_in_speed});
783
  next.removeClass('display-none');
@@ -785,35 +831,52 @@ function nextTestimonial{$widget_number}() {
785
 
786
  {INTERNAL_SCRIPTS}
787
 
788
- if ( {$enable_animation} ) {
789
- // added padding
790
  {$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
791
- }
792
  });
793
  }
794
  }
795
 
796
- jQuery(document).ready(function(){
797
  jQuery('.{$id_base}').hover(function() {
798
  jQuery(this).addClass('hovered')
799
  }, function() {
800
  jQuery(this).removeClass('hovered')
801
  });
 
802
  nextTestimonial{$widget_number}interval = setInterval('nextTestimonial{$widget_number}()', {$refresh_interval} * 1000);
803
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
804
  </script>
805
  EOF;
806
 
807
- $scripts[ $id_base ] = $javascript;
 
 
808
  }
809
 
810
  $scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
811
- $scripts_internal = apply_filters( 'testimonials_widget_testimonials_js_internal', array(), $testimonials, $atts, $widget_number );
812
  $internal_scripts = implode( "\n", $scripts_internal );
813
  $scripts = str_replace( '{INTERNAL_SCRIPTS}', $internal_scripts, $scripts );
814
 
815
- ksort( $scripts );
816
-
817
  return $scripts;
818
  }
819
 
@@ -875,6 +938,8 @@ EOF;
875
  $disable_quotes = $atts['disable_quotes'];
876
  $do_image = ! $atts['hide_image'] && ! empty( $testimonial['testimonial_image'] );
877
  $do_image_single = ! $atts['hide_image_single'];
 
 
878
  $keep_whitespace = $atts['keep_whitespace'];
879
  $remove_hentry = $atts['remove_hentry'];
880
 
@@ -900,13 +965,18 @@ EOF;
900
  $class = apply_filters( 'testimonials_widget_get_testimonial_html_class', $class, $testimonial, $atts, $is_list, $is_first, $widget_number );
901
  $div_open = '<div class="' . $class . '">';
902
 
 
 
 
903
  if ( $remove_hentry )
904
  $div_open = str_replace( ' hentry', '', $div_open );
905
 
906
  $image = '';
907
  if ( $do_image ) {
 
 
908
  $image .= '<span class="image">';
909
- $image .= $testimonial['testimonial_image'];
910
  $image .= '</span>';
911
  }
912
 
@@ -914,7 +984,16 @@ EOF;
914
  $image = '';
915
 
916
  $quote = self::get_quote( $testimonial, $atts, $widget_number );
917
- $cite = self::get_cite( $testimonial, $atts );
 
 
 
 
 
 
 
 
 
918
 
919
  $extra = '';
920
  if ( ! empty( $testimonial['testimonial_extra'] ) ) {
@@ -931,6 +1010,8 @@ EOF;
931
  }
932
 
933
  $div_close = '</div>';
 
 
934
 
935
  $html = $div_open
936
  . $image
@@ -957,11 +1038,15 @@ EOF;
957
  $content_more = apply_filters( 'testimonials_widget_content_more', esc_html__( '…', 'testimonials-widget' ) );
958
  $content_more .= self::$tag_close_quote;
959
  $do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
 
960
  $use_quote_tag = $atts['use_quote_tag'];
961
 
962
  $quote = '';
963
  if ( $do_content ) {
964
  $content = $testimonial['testimonial_content'];
 
 
 
965
  $content = self::format_content( $content, $widget_number, $atts );
966
 
967
  if ( $char_limit ) {
@@ -996,29 +1081,37 @@ EOF;
996
  $do_url = ! $atts['hide_url'] && ! empty( $testimonial['testimonial_url'] );
997
  $use_quote_tag = $atts['use_quote_tag'];
998
 
999
- $cite = '';
 
 
 
 
 
 
 
 
1000
  $done_url = false;
1001
  if ( $do_source && $do_email ) {
1002
  $cite .= '<span class="author">';
1003
- $cite .= '<a href="mailto:' . $testimonial['testimonial_email'] . '">';
1004
- $cite .= $testimonial['testimonial_source'];
1005
  $cite .= '</a>';
1006
  $cite .= '</span>';
1007
  } elseif ( $do_source && ! $do_company && $do_url ) {
1008
  $done_url = true;
1009
 
1010
  $cite .= '<span class="author">';
1011
- $cite .= '<a href="' . $testimonial['testimonial_url'] . '" rel="nofollow">';
1012
- $cite .= $testimonial['testimonial_source'];
1013
  $cite .= '</a>';
1014
  $cite .= '</span>';
1015
  } elseif ( $do_source ) {
1016
  $cite .= '<span class="author">';
1017
- $cite .= $testimonial['testimonial_source'];
1018
  $cite .= '</span>';
1019
  } elseif ( $do_email ) {
1020
  $cite .= '<span class="email">';
1021
- $cite .= make_clickable( $testimonial['testimonial_email'] );
1022
  $cite .= '</span>';
1023
  }
1024
 
@@ -1027,7 +1120,7 @@ EOF;
1027
 
1028
  if ( $do_title ) {
1029
  $cite .= '<span class="title">';
1030
- $cite .= $testimonial['testimonial_title'];
1031
  $cite .= '</span>';
1032
  }
1033
 
@@ -1036,7 +1129,7 @@ EOF;
1036
 
1037
  if ( $do_location ) {
1038
  $cite .= '<span class="location">';
1039
- $cite .= $testimonial['testimonial_location'];
1040
  $cite .= '</span>';
1041
  }
1042
 
@@ -1045,17 +1138,17 @@ EOF;
1045
 
1046
  if ( $do_company && $do_url ) {
1047
  $cite .= '<span class="company">';
1048
- $cite .= '<a href="' . $testimonial['testimonial_url'] . '" rel="nofollow">';
1049
- $cite .= $testimonial['testimonial_company'];
1050
  $cite .= '</a>';
1051
  $cite .= '</span>';
1052
  } elseif ( $do_company ) {
1053
  $cite .= '<span class="company">';
1054
- $cite .= $testimonial['testimonial_company'];
1055
  $cite .= '</span>';
1056
  } elseif ( $do_url && ! $done_url ) {
1057
  $cite .= '<span class="url">';
1058
- $cite .= make_clickable( $testimonial['testimonial_url'] );
1059
  $cite .= '</span>';
1060
  }
1061
 
@@ -1340,9 +1433,6 @@ EOF;
1340
  $order = false;
1341
  }
1342
 
1343
- if ( ! empty( $type ) && 'testimonialswidget_widget' == $type && empty( $refresh_interval ) )
1344
- $limit = 1;
1345
-
1346
  $args = array(
1347
  'orderby' => $orderby,
1348
  'post_status' => array(
@@ -1426,6 +1516,11 @@ EOF;
1426
  }
1427
 
1428
 
 
 
 
 
 
1429
  public static function get_testimonials( $atts ) {
1430
  $hide_gravatar = $atts['hide_gravatar'];
1431
 
@@ -1433,7 +1528,6 @@ EOF;
1433
  $args['query'] = true;
1434
 
1435
  $testimonials = apply_filters( 'testimonials_widget_cache_get', false, $args );
1436
-
1437
  if ( false === $testimonials ) {
1438
  $testimonials = new WP_Query( $args );
1439
  $testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
@@ -1443,13 +1537,21 @@ EOF;
1443
  remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
1444
 
1445
  self::$max_num_pages = $testimonials->max_num_pages;
 
1446
  self::$post_count = $testimonials->post_count;
1447
  self::$wp_query = $testimonials;
1448
 
1449
  wp_reset_postdata();
1450
 
1451
- $image_size = apply_filters( 'testimonials_widget_image_size', 'thumbnail' );
1452
- $gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', 96 );
 
 
 
 
 
 
 
1453
 
1454
  $testimonial_data = array();
1455
 
@@ -1458,16 +1560,16 @@ EOF;
1458
 
1459
  foreach ( $testimonials->posts as $row ) {
1460
  $post_id = $row->ID;
 
1461
 
1462
- $email = get_post_meta( $post_id, 'testimonials-widget-email', true );
1463
-
1464
- if ( has_post_thumbnail( $post_id ) ) {
1465
  $image = get_the_post_thumbnail( $post_id, $image_size );
1466
- } elseif ( ! $hide_gravatar && is_email( $email ) ) {
1467
  $image = get_avatar( $email, $gravatar_size );
1468
- } else {
 
 
1469
  $image = false;
1470
- }
1471
 
1472
  $url = get_post_meta( $post_id, 'testimonials-widget-url', true );
1473
  if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
@@ -1658,6 +1760,281 @@ EOF;
1658
  }
1659
 
1660
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1661
  }
1662
 
1663
 
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.14.0
7
  * Author: Michael Cannon
8
  * Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
9
  * License: GPLv2 or later
28
  const OLD_NAME = 'testimonialswidget';
29
  const PLUGIN_FILE = 'testimonials-widget/testimonials-widget.php';
30
  const PT = 'testimonials-widget';
31
+ const VERSION = '2.14.0';
32
 
33
  private static $base = null;
34
+ private static $found_posts = 0;
35
  private static $max_num_pages = 0;
36
  private static $post_count = 0;
37
  private static $wp_query = null;
51
  public static $use_instance = false;
52
  public static $widget_number = 100000;
53
 
54
+ public static $agg_count = 'reviewCount';
55
+ public static $agg_schema = 'http://schema.org/AggregateRating';
56
+
57
+ public static $cw_author = 'author';
58
+ public static $cw_date = 'datePublished';
59
+ public static $cw_date_mod = 'dateModified';
60
+ public static $cw_aggregate = 'aggregateRating';
61
+ public static $cw_review = 'review';
62
+ public static $cw_source_org = 'sourceOrganization';
63
+
64
+ public static $org_location = 'location';
65
+ public static $org_schema = 'http://schema.org/Organization';
66
+
67
+ public static $person_email = 'email';
68
+ public static $person_home = 'homeLocation';
69
+ public static $person_job_title = 'jobTitle';
70
+ public static $person_schema = 'http://schema.org/Person';
71
+ public static $person_member = 'memberOf';
72
+
73
+ public static $place_schema = 'http://schema.org/Place';
74
+
75
+ public static $review_body = 'reviewBody';
76
+ public static $review_item = 'itemReviewed';
77
+ public static $review_schema = 'http://schema.org/Review';
78
+
79
+ public static $schema_div_open = '<div itemscope itemtype="%1$s">';
80
+ public static $schema_div_prop = '<div itemprop="%1$s" itemscope itemtype="%2$s">%3$s</div>';
81
+ public static $schema_item_prop = 'itemprop="%1$s"';
82
+ public static $schema_meta = '<meta itemprop="%1$s" content="%2$s" />';
83
+ public static $schema_span = '<span itemprop="%1$s">%2$s</span>';
84
+
85
+ public static $thing_image = 'image';
86
+ public static $thing_name = 'name';
87
+ public static $thing_schema = 'http://schema.org/Thing';
88
+ public static $thing_url = 'url';
89
+
90
 
91
  public function __construct() {
92
  add_action( 'admin_init', array( $this, 'admin_init' ) );
130
  self::$cpt_category = self::PT . '-category';
131
  self::$cpt_tags = self::PT . '-post_tag';
132
  self::init_post_type();
 
133
  }
134
 
135
 
144
  public static function add_instance() {
145
  self::$use_instance = false;
146
  self::$instance_number++;
147
+
148
+ return self::$instance_number;
149
  }
150
 
151
 
189
  $atts['ids'] = $post->ID;
190
  $atts['type'] = 'get_single';
191
 
192
+ $instance = self::add_instance();
193
+ $atts['widget_number'] = $instance;
194
+
195
+ $testimonials = array();
196
+
197
+ $text = apply_filters( 'testimonials_widget_cache_get', false, $atts );
198
+ if ( false === $text ) {
199
+ $testimonials = self::get_testimonials( $atts );
200
+ $testimonial = $testimonials[0];
201
+
202
+ $details = self::get_testimonial_html( $testimonial, $atts );
203
+ $details = apply_filters( 'testimonials_widget_testimonial_html_single', $details, $testimonial, $atts );
204
 
205
+ $do_schema = $atts['enable_schema'];
206
+ if ( $do_schema )
207
+ $content = self::create_schema_span( self::$review_body, $content );
208
 
209
+ $content = apply_filters( 'testimonials_widget_testimonial_html_single_content', $content, $testimonial, $atts );
210
+
211
+ $text = $content . $details;
212
+ if ( $do_schema )
213
+ $text = self::create_schema_div_prop( self::$cw_review, self::$review_schema, $text );
214
+
215
+ $text = apply_filters( 'testimonials_widget_cache_set', $text, $atts );
216
+ }
217
+
218
+ self::call_scripts_styles( $testimonials, $atts, $instance );
219
+
220
+ return $text;
221
  }
222
 
223
 
312
 
313
  public function admin_notices_2_12_0() {
314
  $content = '<div class="updated fade"><p>';
315
+ $content .= sprintf( __( 'If your Testimonials Widget display has gone to funky town, please <a href="%s">read the FAQ</a> about possible CSS fixes.', 'testimonials-widget' ), esc_url( 'https://aihrus.zendesk.com/entries/23722573-Major-Changes-Since-2-10-0' ) );
316
  $content .= '</p></div>';
317
 
318
  echo $content;
334
  if ( $prior_version < '2.12.0' )
335
  add_action( 'admin_notices', array( $this, 'admin_notices_2_12_0' ) );
336
 
337
+ if ( $prior_version < self::VERSION )
338
+ do_action( 'testimonials_widget_update' );
339
+
340
  tw_set_option( 'admin_notices' );
341
  }
342
 
614
  'slug' => $rewrite_slug,
615
  'with_front' => false,
616
  ),
 
 
617
  'supports' => $supports,
618
  'taxonomies' => $taxonomies,
619
  );
630
  public static function register_taxonomies() {
631
  $args = array(
632
  'hierarchical' => true,
633
+ 'show_admin_column' => true,
634
  );
635
  register_taxonomy( self::$cpt_category, self::PT, $args );
636
 
637
  $args = array(
638
+ 'show_admin_column' => true,
639
  'update_count_callback' => '_update_post_term_count',
640
  );
641
  register_taxonomy( self::$cpt_tags, self::PT, $args );
651
 
652
 
653
  public function testimonialswidget_list( $atts ) {
 
 
654
  $atts = wp_parse_args( $atts, self::get_defaults() );
655
  $atts = Testimonials_Widget_Settings::validate_settings( $atts );
656
 
664
 
665
  $atts['type'] = 'testimonialswidget_list';
666
 
667
+ $instance = self::add_instance();
668
+ $atts['widget_number'] = $instance;
669
+
670
+ $testimonials = array();
671
 
672
+ $content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
673
  if ( false === $content ) {
674
  $testimonials = self::get_testimonials( $atts );
675
  $content = self::get_testimonials_html( $testimonials, $atts );
676
  $content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
677
  }
678
 
679
+ self::call_scripts_styles( $testimonials, $atts, $instance );
680
+
681
  return $content;
682
  }
683
 
690
  $atts['random'] = 1;
691
  }
692
 
 
 
693
  $atts = wp_parse_args( $atts, self::get_defaults() );
694
  $atts = Testimonials_Widget_Settings::validate_settings( $atts );
695
 
696
+ $atts['paging'] = false;
697
+ $atts['type'] = 'testimonialswidget_widget';
 
698
 
699
+ self::set_instance( $widget_number );
700
+ $atts['widget_number'] = $widget_number;
701
 
702
+ $testimonials = array();
703
 
704
  $content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
 
705
  if ( false === $content ) {
706
+ $testimonials = self::get_testimonials( $atts );
707
+ $content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
708
+ $content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
709
  }
710
 
711
+ self::call_scripts_styles( $testimonials, $atts, $widget_number );
 
 
 
712
 
713
  return $content;
714
  }
728
  if ( is_admin() )
729
  return;
730
 
731
+ wp_register_style( __CLASS__, plugins_url( 'testimonials-widget.css', __FILE__ ) );
732
+ wp_enqueue_style( __CLASS__ );
733
 
734
  $include_ie7_css = tw_get_option( 'include_ie7_css' );
735
  if ( $include_ie7_css ) {
736
+ wp_register_style( __CLASS__ . '-ie7', plugins_url( 'testimonials-widget-ie7.css', __FILE__ ) );
737
+ wp_enqueue_style( __CLASS__ . '-ie7' );
738
  }
739
+
740
+ do_action( 'testimonials_widget_styles' );
741
  }
742
 
743
 
744
  public static function get_testimonials_html_css( $atts, $widget_number = null ) {
745
+ $css = array();
746
+
747
+ switch ( $atts['type'] ) {
748
+ case 'testimonialswidget_widget':
749
+ // display attributes
750
+ $height = $atts['height'];
751
+ $max_height = $atts['max_height'];
752
+ $min_height = $atts['min_height'];
753
+
754
+ if ( $height ) {
755
+ $max_height = $height;
756
+ $min_height = $height;
757
+ }
758
 
759
+ $css = array();
760
+ $id_base = self::ID . $widget_number;
761
 
762
+ if ( $min_height ) {
763
+ $css[] = <<<EOF
764
  <style>
765
  .$id_base {
766
  min-height: {$min_height}px;
767
  }
768
  </style>
769
  EOF;
770
+ }
771
 
772
+ if ( $max_height ) {
773
+ $css[] = <<<EOF
774
  <style>
775
  .$id_base {
776
  max-height: {$max_height}px;
777
  }
778
  </style>
779
  EOF;
780
+ }
781
+ break;
782
  }
783
 
784
  $css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
788
 
789
 
790
  public static function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
791
+ $scripts = array();
792
+ $scripts_internal = array();
793
+
794
+ switch ( $atts['type'] ) {
795
+ case 'testimonialswidget_widget':
796
+ // display attributes
797
+ $refresh_interval = $atts['refresh_interval'];
798
+
799
+ $id_base = self::ID . $widget_number;
800
+ $scripts = array();
801
+ $tw_padding = 'tw_padding' . $widget_number;
802
+ $tw_wrapper = 'tw_wrapper' . $widget_number;
803
+
804
+ $disable_animation = $atts['disable_animation'];
805
+ $fade_in_speed = $atts['fade_in_speed'];
806
+ $fade_out_speed = $atts['fade_out_speed'];
807
+ $height = $atts['height'];
808
+ $max_height = $atts['max_height'];
809
+ $min_height = $atts['min_height'];
810
+
811
+ $enable_animation = 1;
812
+ if ( $disable_animation || $height || $max_height || $min_height )
813
+ $enable_animation = 0;
814
+
815
+ $javascript = '';
816
+ if ( 1 < count( $testimonials ) ) {
817
+ $javascript .= '<script type="text/javascript">' . "\n";
818
+
819
+ if ( $refresh_interval ) {
820
+ $javascript .= <<<EOF
821
  function nextTestimonial{$widget_number}() {
822
  if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
823
  var active = jQuery('.{$id_base} .active');
824
  var next = (jQuery('.{$id_base} .active').next().length > 0) ? jQuery('.{$id_base} .active').next() : jQuery('.{$id_base} .testimonials-widget-testimonial:first-child');
825
 
826
+ active.fadeOut({$fade_out_speed}, function() {
827
  active.removeClass('active');
828
  next.fadeIn({$fade_in_speed});
829
  next.removeClass('display-none');
831
 
832
  {INTERNAL_SCRIPTS}
833
 
834
+ // added padding
835
+ if ( {$enable_animation} )
836
  {$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
 
837
  });
838
  }
839
  }
840
 
841
+ jQuery(document).ready(function() {
842
  jQuery('.{$id_base}').hover(function() {
843
  jQuery(this).addClass('hovered')
844
  }, function() {
845
  jQuery(this).removeClass('hovered')
846
  });
847
+
848
  nextTestimonial{$widget_number}interval = setInterval('nextTestimonial{$widget_number}()', {$refresh_interval} * 1000);
849
  });
850
+
851
+ EOF;
852
+ }
853
+
854
+ $javascript .= <<<EOF
855
+ if ( {$enable_animation} ) {
856
+ var {$tw_wrapper} = jQuery('.{$id_base}');
857
+ var {$tw_padding} = 0;
858
+
859
+ jQuery(document).ready(function() {
860
+ // tw_padding is the difference in height to take into account all styling options
861
+ {$tw_padding} = {$tw_wrapper}.height() - jQuery('.{$id_base} .testimonials-widget-testimonial').height();
862
+
863
+ // fixes first animation by defining height to adjust to
864
+ {$tw_wrapper}.height( {$tw_wrapper}.height() );
865
+ });
866
+ }
867
  </script>
868
  EOF;
869
 
870
+ $scripts[ $id_base ] = $javascript;
871
+ }
872
+ break;
873
  }
874
 
875
  $scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
876
+ $scripts_internal = apply_filters( 'testimonials_widget_testimonials_js_internal', $scripts_internal, $testimonials, $atts, $widget_number );
877
  $internal_scripts = implode( "\n", $scripts_internal );
878
  $scripts = str_replace( '{INTERNAL_SCRIPTS}', $internal_scripts, $scripts );
879
 
 
 
880
  return $scripts;
881
  }
882
 
938
  $disable_quotes = $atts['disable_quotes'];
939
  $do_image = ! $atts['hide_image'] && ! empty( $testimonial['testimonial_image'] );
940
  $do_image_single = ! $atts['hide_image_single'];
941
+ $do_content = ! $atts['hide_content'];
942
+ $do_schema = $atts['enable_schema'];
943
  $keep_whitespace = $atts['keep_whitespace'];
944
  $remove_hentry = $atts['remove_hentry'];
945
 
965
  $class = apply_filters( 'testimonials_widget_get_testimonial_html_class', $class, $testimonial, $atts, $is_list, $is_first, $widget_number );
966
  $div_open = '<div class="' . $class . '">';
967
 
968
+ if ( $do_schema && $do_content )
969
+ $div_open .= sprintf( self::$schema_div_open, self::$review_schema );
970
+
971
  if ( $remove_hentry )
972
  $div_open = str_replace( ' hentry', '', $div_open );
973
 
974
  $image = '';
975
  if ( $do_image ) {
976
+ $pic = $testimonial['testimonial_image'];
977
+
978
  $image .= '<span class="image">';
979
+ $image .= $pic;
980
  $image .= '</span>';
981
  }
982
 
984
  $image = '';
985
 
986
  $quote = self::get_quote( $testimonial, $atts, $widget_number );
987
+
988
+ $cite = '';
989
+ if ( 1 < count( $testimonial ) ) {
990
+ $cite = self::get_cite( $testimonial, $atts );
991
+
992
+ if ( $do_schema ) {
993
+ $schema = self::get_schema( $testimonial, $atts );
994
+ $cite .= $schema;
995
+ }
996
+ }
997
 
998
  $extra = '';
999
  if ( ! empty( $testimonial['testimonial_extra'] ) ) {
1010
  }
1011
 
1012
  $div_close = '</div>';
1013
+ if ( $do_schema && $do_content )
1014
+ $div_close .= '</div>';
1015
 
1016
  $html = $div_open
1017
  . $image
1038
  $content_more = apply_filters( 'testimonials_widget_content_more', esc_html__( '…', 'testimonials-widget' ) );
1039
  $content_more .= self::$tag_close_quote;
1040
  $do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
1041
+ $do_schema = $atts['enable_schema'];
1042
  $use_quote_tag = $atts['use_quote_tag'];
1043
 
1044
  $quote = '';
1045
  if ( $do_content ) {
1046
  $content = $testimonial['testimonial_content'];
1047
+ if ( $do_schema )
1048
+ $content = self::create_schema_span( self::$review_body, $content );
1049
+
1050
  $content = self::format_content( $content, $widget_number, $atts );
1051
 
1052
  if ( $char_limit ) {
1081
  $do_url = ! $atts['hide_url'] && ! empty( $testimonial['testimonial_url'] );
1082
  $use_quote_tag = $atts['use_quote_tag'];
1083
 
1084
+ $testimonial_company = $testimonial['testimonial_company'];
1085
+ $testimonial_email = $testimonial['testimonial_email'];
1086
+ $testimonial_location = $testimonial['testimonial_location'];
1087
+ $testimonial_source = $testimonial['testimonial_source'];
1088
+ $testimonial_title = $testimonial['testimonial_title'];
1089
+ $testimonial_url = $testimonial['testimonial_url'];
1090
+
1091
+ $cite = '';
1092
+
1093
  $done_url = false;
1094
  if ( $do_source && $do_email ) {
1095
  $cite .= '<span class="author">';
1096
+ $cite .= '<a href="mailto:' . $testimonial_email . '">';
1097
+ $cite .= $testimonial_source;
1098
  $cite .= '</a>';
1099
  $cite .= '</span>';
1100
  } elseif ( $do_source && ! $do_company && $do_url ) {
1101
  $done_url = true;
1102
 
1103
  $cite .= '<span class="author">';
1104
+ $cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
1105
+ $cite .= $testimonial_source;
1106
  $cite .= '</a>';
1107
  $cite .= '</span>';
1108
  } elseif ( $do_source ) {
1109
  $cite .= '<span class="author">';
1110
+ $cite .= $testimonial_source;
1111
  $cite .= '</span>';
1112
  } elseif ( $do_email ) {
1113
  $cite .= '<span class="email">';
1114
+ $cite .= make_clickable( $testimonial_email );
1115
  $cite .= '</span>';
1116
  }
1117
 
1120
 
1121
  if ( $do_title ) {
1122
  $cite .= '<span class="title">';
1123
+ $cite .= $testimonial_title;
1124
  $cite .= '</span>';
1125
  }
1126
 
1129
 
1130
  if ( $do_location ) {
1131
  $cite .= '<span class="location">';
1132
+ $cite .= $testimonial_location;
1133
  $cite .= '</span>';
1134
  }
1135
 
1138
 
1139
  if ( $do_company && $do_url ) {
1140
  $cite .= '<span class="company">';
1141
+ $cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
1142
+ $cite .= $testimonial_company;
1143
  $cite .= '</a>';
1144
  $cite .= '</span>';
1145
  } elseif ( $do_company ) {
1146
  $cite .= '<span class="company">';
1147
+ $cite .= $testimonial_company;
1148
  $cite .= '</span>';
1149
  } elseif ( $do_url && ! $done_url ) {
1150
  $cite .= '<span class="url">';
1151
+ $cite .= make_clickable( $testimonial_url );
1152
  $cite .= '</span>';
1153
  }
1154
 
1433
  $order = false;
1434
  }
1435
 
 
 
 
1436
  $args = array(
1437
  'orderby' => $orderby,
1438
  'post_status' => array(
1516
  }
1517
 
1518
 
1519
+ /**
1520
+ *
1521
+ *
1522
+ * @SuppressWarnings(PHPMD.LongVariable)
1523
+ */
1524
  public static function get_testimonials( $atts ) {
1525
  $hide_gravatar = $atts['hide_gravatar'];
1526
 
1528
  $args['query'] = true;
1529
 
1530
  $testimonials = apply_filters( 'testimonials_widget_cache_get', false, $args );
 
1531
  if ( false === $testimonials ) {
1532
  $testimonials = new WP_Query( $args );
1533
  $testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
1537
  remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
1538
 
1539
  self::$max_num_pages = $testimonials->max_num_pages;
1540
+ self::$found_posts = $testimonials->found_posts;
1541
  self::$post_count = $testimonials->post_count;
1542
  self::$wp_query = $testimonials;
1543
 
1544
  wp_reset_postdata();
1545
 
1546
+ $image_size = apply_filters( 'testimonials_widget_image_size', 'thumbnail' );
1547
+
1548
+ global $_wp_additional_image_sizes;
1549
+ if ( ! empty( $_wp_additional_image_sizes[ $image_size ] ) )
1550
+ $gravatar_size = $_wp_additional_image_sizes[ $image_size ]['width'];
1551
+ else
1552
+ $gravatar_size = get_option( $image_size . '_size_w' );
1553
+
1554
+ $gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $gravatar_size );
1555
 
1556
  $testimonial_data = array();
1557
 
1560
 
1561
  foreach ( $testimonials->posts as $row ) {
1562
  $post_id = $row->ID;
1563
+ $email = get_post_meta( $post_id, 'testimonials-widget-email', true );
1564
 
1565
+ if ( has_post_thumbnail( $post_id ) )
 
 
1566
  $image = get_the_post_thumbnail( $post_id, $image_size );
1567
+ elseif ( ! $hide_gravatar && is_email( $email ) ) {
1568
  $image = get_avatar( $email, $gravatar_size );
1569
+
1570
+ self::make_gravatar_featured( $post_id, $email );
1571
+ } else
1572
  $image = false;
 
1573
 
1574
  $url = get_post_meta( $post_id, 'testimonials-widget-url', true );
1575
  if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
1760
  }
1761
 
1762
 
1763
+ public static function clean_string( $string ) {
1764
+ if ( ! is_string( $string ) )
1765
+ return $string;
1766
+
1767
+ return trim( strip_tags( $string ) );
1768
+ }
1769
+
1770
+
1771
+ public static function get_schema( $testimonial, $atts ) {
1772
+ foreach ( $testimonial as $key => $value ) {
1773
+ if ( 'testimonial_image' != $key )
1774
+ $testimonial[ $key ] = self::clean_string( $value );
1775
+ }
1776
+
1777
+ $do_company = ! $atts['hide_company'] && ! empty( $testimonial['testimonial_company'] );
1778
+ $do_email = ! $atts['hide_email'] && ! empty( $testimonial['testimonial_email'] ) && is_email( $testimonial['testimonial_email'] );
1779
+ $do_image = ! $atts['hide_image'] && ! empty( $testimonial['testimonial_image'] );
1780
+ $do_location = ! $atts['hide_location'] && ! empty( $testimonial['testimonial_location'] );
1781
+ $do_source = ! $atts['hide_source'] && ! empty( $testimonial['testimonial_source'] );
1782
+ $do_title = ! $atts['hide_title'] && ! empty( $testimonial['testimonial_title'] );
1783
+ $do_url = ! $atts['hide_url'] && ! empty( $testimonial['testimonial_url'] );
1784
+
1785
+ $testimonial_company = $testimonial['testimonial_company'];
1786
+ $testimonial_content = $testimonial['testimonial_content'];
1787
+ $testimonial_email = $testimonial['testimonial_email'];
1788
+ $testimonial_image = $testimonial['testimonial_image'];
1789
+ $testimonial_location = $testimonial['testimonial_location'];
1790
+ $testimonial_source = $testimonial['testimonial_source'];
1791
+ $testimonial_title = $testimonial['testimonial_title'];
1792
+ $testimonial_url = $testimonial['testimonial_url'];
1793
+
1794
+ $item_reviewed = self::clean_string( $atts['item_reviewed'] );
1795
+ $item_reviewed_url = self::clean_string( $atts['item_reviewed_url'] );
1796
+
1797
+ $schema = '';
1798
+
1799
+ $agg_meta = array();
1800
+ $author_meta = array();
1801
+ $item_meta = array();
1802
+ $location_meta = array();
1803
+ $org_meta = array();
1804
+ $review_meta = array();
1805
+
1806
+ if ( $do_source )
1807
+ $author_meta[ self::$thing_name ] = $testimonial_source;
1808
+
1809
+ if ( $do_title )
1810
+ $author_meta[ self::$person_job_title ] = $testimonial_title;
1811
+
1812
+ if ( $do_email )
1813
+ $author_meta[ self::$person_email ] = $testimonial_email;
1814
+
1815
+ if ( ! $do_company ) {
1816
+ if ( $do_url )
1817
+ $author_meta[ self::$thing_url ] = $testimonial_url;
1818
+ } else {
1819
+ if ( $do_url )
1820
+ $org_meta[ self::$thing_url ] = $testimonial_url;
1821
+
1822
+ $org_meta[ self::$thing_name ] = $testimonial_company;
1823
+ }
1824
+
1825
+ if ( $do_location ) {
1826
+ $location_meta[ self::$thing_name ] = $testimonial_location;
1827
+
1828
+ if ( ! $do_company )
1829
+ $author_meta[ self::$person_home ] = array( self::$place_schema, $location_meta );
1830
+ else
1831
+ $org_meta[ self::$org_location ] = array( self::$place_schema, $location_meta );
1832
+ }
1833
+
1834
+ if ( ! empty( $author_meta ) && ! empty( $org_meta ) )
1835
+ $author_meta[ self::$person_member ] = array( self::$org_schema, $org_meta );
1836
+ elseif ( ! empty( $org_meta ) )
1837
+ $author_meta[ self::$cw_source_org ] = array( self::$org_schema, $org_meta );
1838
+
1839
+ $author_meta = apply_filters( 'testimonials_widget_schema_author', $author_meta, $testimonial, $atts );
1840
+ $author = self::create_schema_div_prop( self::$cw_author, self::$person_schema, $author_meta );
1841
+ $schema .= $author;
1842
+
1843
+ $post = get_post( $testimonial['post_id'] );
1844
+ $the_date = mysql2date( 'Y-m-d', $post->post_date );
1845
+ $the_date_mod = mysql2date( 'Y-m-d', $post->post_modified );
1846
+
1847
+ $review_name_length = apply_filters( 'testimonials_widget_review_name_length', 156 );
1848
+
1849
+ $review_meta[ self::$cw_date ] = $the_date;
1850
+ $review_meta[ self::$cw_date_mod ] = $the_date_mod;
1851
+ $review_meta[ self::$thing_name ] = self::testimonials_truncate( $testimonial_content, $review_name_length );
1852
+ $review_meta[ self::$thing_url ] = post_permalink( $post->ID );
1853
+
1854
+ if ( $do_image ) {
1855
+ $src = self::get_image_src( $testimonial_image );
1856
+
1857
+ $review_meta[ self::$thing_image ] = $src;
1858
+ }
1859
+
1860
+ $review_meta = apply_filters( 'testimonials_widget_schema_review', $review_meta, $testimonial, $atts );
1861
+ $review = self::create_schema_meta( $review_meta );
1862
+ $schema .= $review;
1863
+
1864
+ $agg_meta[ self::$agg_count ] = self::$found_posts;
1865
+
1866
+ $agg_meta = apply_filters( 'testimonials_widget_schema_aggregate', $agg_meta, $testimonial, $atts );
1867
+ $aggregate = self::create_schema_div_prop( self::$cw_aggregate, self::$agg_schema, $agg_meta );
1868
+ $schema .= $aggregate;
1869
+
1870
+ $item_meta[ self::$thing_name ] = $item_reviewed;
1871
+ $item_meta[ self::$thing_url ] = $item_reviewed_url;
1872
+
1873
+ $item_meta = apply_filters( 'testimonials_widget_schema_item', $item_meta, $testimonial, $atts );
1874
+ $item = self::create_schema_div_prop( self::$review_item, self::$thing_schema, $item_meta );
1875
+ $schema .= $item;
1876
+
1877
+ $schema = apply_filters( 'testimonials_widget_schema', $schema, $testimonial, $atts );
1878
+
1879
+ return $schema;
1880
+ }
1881
+
1882
+
1883
+ public static function create_schema_meta( $meta_data ) {
1884
+ $meta = '';
1885
+
1886
+ if ( empty( $meta_data ) )
1887
+ return $meta;
1888
+
1889
+ foreach ( $meta_data as $key => $value ) {
1890
+ if ( is_array( $value ) )
1891
+ $meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
1892
+ else
1893
+ $meta .= sprintf( self::$schema_meta, $key, $value );
1894
+ }
1895
+
1896
+ return $meta;
1897
+ }
1898
+
1899
+
1900
+ public static function create_schema_span( $property_name, $span_data ) {
1901
+ $span = '';
1902
+
1903
+ if ( empty( $span_data ) )
1904
+ return $span;
1905
+
1906
+ $span = sprintf( self::$schema_span, $property_name, $span_data );
1907
+
1908
+ return $span;
1909
+ }
1910
+
1911
+
1912
+ public static function create_schema_div_prop( $property_name, $schema_name, $meta_data ) {
1913
+ $meta = '';
1914
+ $schema = '';
1915
+
1916
+ if ( empty( $meta_data ) )
1917
+ return $schema;
1918
+
1919
+ if ( is_array( $meta_data ) ) {
1920
+ foreach ( $meta_data as $key => $value ) {
1921
+ if ( is_array( $value ) )
1922
+ $meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
1923
+ else
1924
+ $meta .= sprintf( self::$schema_meta, $key, $value );
1925
+ }
1926
+
1927
+ $schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta );
1928
+ } else
1929
+ $schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta_data );
1930
+
1931
+ return $schema;
1932
+ }
1933
+
1934
+
1935
+ public static function generate_css( $atts, $widget_number = null ) {
1936
+ $atts['subtype'] = 'css';
1937
+
1938
+ $css = apply_filters( 'testimonials_widget_cache_get', false, $atts );
1939
+ if ( false === $css ) {
1940
+ $css = self::get_testimonials_html_css( $atts, $widget_number );
1941
+ $css = apply_filters( 'testimonials_widget_cache_set', $css, $atts );
1942
+ }
1943
+
1944
+ if ( ! empty( $css ) ) {
1945
+ self::$css = array_merge( $css, self::$css );
1946
+ add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_css' ), 20 );
1947
+ }
1948
+ }
1949
+
1950
+
1951
+ public static function generate_js( $testimonials, $atts, $widget_number = null ) {
1952
+ $atts['subtype'] = 'js';
1953
+
1954
+ $js = apply_filters( 'testimonials_widget_cache_get', false, $atts );
1955
+ if ( false === $js ) {
1956
+ $js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
1957
+ $js = apply_filters( 'testimonials_widget_cache_set', $js, $atts );
1958
+ }
1959
+
1960
+ if ( ! empty( $js ) ) {
1961
+ self::$scripts = array_merge( $js, self::$scripts );
1962
+ add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_scripts' ), 20 );
1963
+ }
1964
+ }
1965
+
1966
+
1967
+ public static function call_scripts_styles( $testimonials, $atts, $widget_number = null ) {
1968
+ if ( is_null( $widget_number ) )
1969
+ $widget_number = Testimonials_Widget::get_instance();
1970
+
1971
+ self::scripts( $atts );
1972
+ self::styles();
1973
+
1974
+ self::generate_css( $atts );
1975
+ self::generate_js( $testimonials, $atts, $widget_number );
1976
+ }
1977
+
1978
+
1979
+ public static function make_gravatar_featured( $post_id, $email ) {
1980
+ $size = get_option( 'large_size_w' );
1981
+ $image = get_avatar( $email, $size );
1982
+ $src = self::get_image_src( $image );
1983
+ $file = sanitize_title( $email ) . '.jpeg';
1984
+
1985
+ $file_move = wp_upload_bits( $file, null, self::file_get_contents_curl( $src ) );
1986
+ $filename = $file_move['file'];
1987
+
1988
+ $wp_filetype = wp_check_filetype( $file, null );
1989
+ $attachment = array(
1990
+ 'post_mime_type' => $wp_filetype['type'],
1991
+ 'post_status' => 'inherit',
1992
+ 'post_title' => $file,
1993
+ );
1994
+
1995
+ require_once ABSPATH . 'wp-admin/includes/image.php';
1996
+
1997
+ $image_id = wp_insert_attachment( $attachment, $filename, $post_id );
1998
+ $metadata = wp_generate_attachment_metadata( $image_id, $filename );
1999
+
2000
+ wp_update_attachment_metadata( $image_id, $metadata );
2001
+ update_post_meta( $post_id, '_thumbnail_id', $image_id );
2002
+ }
2003
+
2004
+
2005
+ public static function get_image_src( $image ) {
2006
+ $doc = new DOMDocument();
2007
+ $doc->loadHTML( $image );
2008
+ $xpath = new DOMXPath( $doc );
2009
+ $src = $xpath->evaluate( 'string(//img/@src)' );
2010
+
2011
+ return $src;
2012
+ }
2013
+
2014
+
2015
+ /**
2016
+ * Thank you Tobylewis
2017
+ *
2018
+ * file_get_contents support on some shared systems is turned off
2019
+ *
2020
+ * @ref http://wordpress.org/support/topic/plugin-flickr-shortcode-importer-file_get_contents-with-url-isp-does-not-support?replies=2#post-2878241
2021
+ */
2022
+ public static function file_get_contents_curl( $url ) {
2023
+ $ch = curl_init();
2024
+
2025
+ curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
2026
+ curl_setopt( $ch, CURLOPT_HEADER, 0 );
2027
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
2028
+ curl_setopt( $ch, CURLOPT_URL, $url );
2029
+ curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
2030
+
2031
+ $data = curl_exec( $ch );
2032
+ curl_close( $ch );
2033
+
2034
+ return $data;
2035
+ }
2036
+
2037
+
2038
  }
2039
 
2040