Testimonials Widget - Version 2.11.3

Version Description

  • Correct filter name testimonials_widget_next_posts_link to testimonials_widget_next_posts_link_text
Download this release

Release Info

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

Code changes from version 2.11.2 to 2.11.3

changelog.txt CHANGED
@@ -4,6 +4,18 @@
4
 
5
  = trunk =
6
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  = 2.11.2 =
8
  * Add `min1` and `nozero` validation
9
  * Always include settings class
4
 
5
  = trunk =
6
 
7
+ = 2.11.3 =
8
+ * BUGFIX [Can't set featured image](http://wordpress.org/support/topic/cant-set-featured-image-3)
9
+ * Begin WordPress coding standard cleanup
10
+ * Bold option headers
11
+ * Change `has_archive` default from `testimonials` to `testimonials-archive`
12
+ * Clean up static method calls to prevent PHP Strict notices
13
+ * Correct filter name `testimonials_widget_next_posts_link` to `testimonials_widget_next_posts_link_text`
14
+ * Correct static methods calling
15
+ * Secure activation, deactivation, uninstall operations
16
+ * Update POT
17
+ * Update profile
18
+
19
  = 2.11.2 =
20
  * Add `min1` and `nozero` validation
21
  * Always include settings class
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.11.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
7
- "POT-Creation-Date: 2013-04-09 04:09:20+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -44,8 +44,8 @@ msgstr ""
44
  msgid "Widget Title"
45
  msgstr ""
46
 
47
- #: lib/settings.testimonials-widget.php:66 testimonials-widget.php:419
48
- #: testimonials-widget.php:447
49
  msgid "Testimonials"
50
  msgstr ""
51
 
@@ -290,7 +290,7 @@ msgstr ""
290
  msgid "Author"
291
  msgstr ""
292
 
293
- #: lib/settings.testimonials-widget.php:310 testimonials-widget.php:405
294
  msgid "Date"
295
  msgstr ""
296
 
@@ -298,7 +298,7 @@ msgstr ""
298
  msgid "Menu Order"
299
  msgstr ""
300
 
301
- #: lib/settings.testimonials-widget.php:312 testimonials-widget.php:395
302
  msgid "Source"
303
  msgstr ""
304
 
@@ -320,28 +320,28 @@ msgstr ""
320
  msgid "None"
321
  msgstr ""
322
 
323
- #: lib/settings.testimonials-widget.php:326 testimonials-widget.php:397
324
- #: testimonials-widget.php:1328
325
  msgid "Title"
326
  msgstr ""
327
 
328
- #: lib/settings.testimonials-widget.php:327 testimonials-widget.php:399
329
- #: testimonials-widget.php:1340
330
  msgid "Email"
331
  msgstr ""
332
 
333
- #: lib/settings.testimonials-widget.php:328 testimonials-widget.php:398
334
- #: testimonials-widget.php:1334
335
  msgid "Location"
336
  msgstr ""
337
 
338
- #: lib/settings.testimonials-widget.php:329 testimonials-widget.php:400
339
- #: testimonials-widget.php:1346
340
  msgid "Company"
341
  msgstr ""
342
 
343
- #: lib/settings.testimonials-widget.php:330 testimonials-widget.php:401
344
- #: testimonials-widget.php:1352
345
  msgid "URL"
346
  msgstr ""
347
 
@@ -471,7 +471,7 @@ msgstr ""
471
  msgid "Testimonials Widget Settings"
472
  msgstr ""
473
 
474
- #: lib/settings.testimonials-widget.php:544 testimonials-widget.php:69
475
  msgid "Settings"
476
  msgstr ""
477
 
@@ -491,7 +491,7 @@ msgstr ""
491
  msgid "Display testimonials with multiple selection and display options"
492
  msgstr ""
493
 
494
- #. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.11.2) #-#-#-#-#
495
  #. Plugin Name of the plugin/theme
496
  #: lib/testimonials-widget-widget.php:19
497
  msgid "Testimonials Widget"
@@ -509,128 +509,128 @@ msgstr ""
509
  msgid "Expand/Collapse"
510
  msgstr ""
511
 
512
- #: testimonials-widget.php:172
513
  msgid "Deleting Testimonials Widget plugin will remove all data and settings."
514
  msgstr ""
515
 
516
- #: testimonials-widget.php:394
517
  msgid "Image"
518
  msgstr ""
519
 
520
- #: testimonials-widget.php:396
521
  msgid "Shortcodes"
522
  msgstr ""
523
 
524
- #: testimonials-widget.php:402
525
  msgid "Published by"
526
  msgstr ""
527
 
528
- #: testimonials-widget.php:403
529
  msgid "Category"
530
  msgstr ""
531
 
532
- #: testimonials-widget.php:404
533
  msgid "Tags"
534
  msgstr ""
535
 
536
- #: testimonials-widget.php:416
537
  msgid "Add New"
538
  msgstr ""
539
 
540
- #: testimonials-widget.php:417 testimonials-widget.php:420
541
  msgid "Add New Testimonial"
542
  msgstr ""
543
 
544
- #: testimonials-widget.php:418
545
  msgid "Edit Testimonial"
546
  msgstr ""
547
 
548
- #: testimonials-widget.php:421 testimonials-widget.php:687
549
  msgid "No testimonials found"
550
  msgstr ""
551
 
552
- #: testimonials-widget.php:422
553
  msgid "No testimonials found in Trash"
554
  msgstr ""
555
 
556
- #: testimonials-widget.php:424
557
  msgid "Search Testimonials"
558
  msgstr ""
559
 
560
- #: testimonials-widget.php:425
561
  msgid "Testimonial"
562
  msgstr ""
563
 
564
- #: testimonials-widget.php:426
565
  msgid "View Testimonial"
566
  msgstr ""
567
 
568
- #: testimonials-widget.php:720
569
  msgid "…"
570
  msgstr ""
571
 
572
- #: testimonials-widget.php:1098
573
  msgid "«"
574
  msgstr ""
575
 
576
- #: testimonials-widget.php:1107
577
  msgid "»"
578
  msgstr ""
579
 
580
- #: testimonials-widget.php:1364
581
  msgid "Testimonial Data"
582
  msgstr ""
583
 
584
- #: testimonials-widget.php:1389
585
  msgid "Enter title here"
586
  msgstr ""
587
 
588
- #: testimonials-widget.php:1390
589
  msgid "Enter testimonial source here"
590
  msgstr ""
591
 
592
- #: testimonials-widget.php:1414
593
  msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
594
  msgstr ""
595
 
596
- #: testimonials-widget.php:1415
597
  msgid "Custom field updated."
598
  msgstr ""
599
 
600
- #: testimonials-widget.php:1416
601
  msgid "Custom field deleted."
602
  msgstr ""
603
 
604
- #: testimonials-widget.php:1417
605
  msgid "Testimonial updated."
606
  msgstr ""
607
 
608
  #. translators: %s: date and time of the revision
609
- #: testimonials-widget.php:1419
610
  msgid "Testimonial restored to revision from %s"
611
  msgstr ""
612
 
613
- #: testimonials-widget.php:1420
614
  msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
615
  msgstr ""
616
 
617
- #: testimonials-widget.php:1421
618
  msgid "Testimonial saved."
619
  msgstr ""
620
 
621
- #: testimonials-widget.php:1422
622
  msgid ""
623
  "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
624
  "a>"
625
  msgstr ""
626
 
627
- #: testimonials-widget.php:1423
628
  msgid ""
629
  "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
630
  "\"%2$s\">Preview testimonial</a>"
631
  msgstr ""
632
 
633
- #: testimonials-widget.php:1424
634
  msgid ""
635
  "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
636
  "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.11.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
7
+ "POT-Creation-Date: 2013-04-15 21:25:06+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
44
  msgid "Widget Title"
45
  msgstr ""
46
 
47
+ #: lib/settings.testimonials-widget.php:66 testimonials-widget.php:434
48
+ #: testimonials-widget.php:462
49
  msgid "Testimonials"
50
  msgstr ""
51
 
290
  msgid "Author"
291
  msgstr ""
292
 
293
+ #: lib/settings.testimonials-widget.php:310 testimonials-widget.php:420
294
  msgid "Date"
295
  msgstr ""
296
 
298
  msgid "Menu Order"
299
  msgstr ""
300
 
301
+ #: lib/settings.testimonials-widget.php:312 testimonials-widget.php:410
302
  msgid "Source"
303
  msgstr ""
304
 
320
  msgid "None"
321
  msgstr ""
322
 
323
+ #: lib/settings.testimonials-widget.php:326 testimonials-widget.php:412
324
+ #: testimonials-widget.php:1343
325
  msgid "Title"
326
  msgstr ""
327
 
328
+ #: lib/settings.testimonials-widget.php:327 testimonials-widget.php:414
329
+ #: testimonials-widget.php:1355
330
  msgid "Email"
331
  msgstr ""
332
 
333
+ #: lib/settings.testimonials-widget.php:328 testimonials-widget.php:413
334
+ #: testimonials-widget.php:1349
335
  msgid "Location"
336
  msgstr ""
337
 
338
+ #: lib/settings.testimonials-widget.php:329 testimonials-widget.php:415
339
+ #: testimonials-widget.php:1361
340
  msgid "Company"
341
  msgstr ""
342
 
343
+ #: lib/settings.testimonials-widget.php:330 testimonials-widget.php:416
344
+ #: testimonials-widget.php:1367
345
  msgid "URL"
346
  msgstr ""
347
 
471
  msgid "Testimonials Widget Settings"
472
  msgstr ""
473
 
474
+ #: lib/settings.testimonials-widget.php:544 testimonials-widget.php:68
475
  msgid "Settings"
476
  msgstr ""
477
 
491
  msgid "Display testimonials with multiple selection and display options"
492
  msgstr ""
493
 
494
+ #. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.11.3) #-#-#-#-#
495
  #. Plugin Name of the plugin/theme
496
  #: lib/testimonials-widget-widget.php:19
497
  msgid "Testimonials Widget"
509
  msgid "Expand/Collapse"
510
  msgstr ""
511
 
512
+ #: testimonials-widget.php:179
513
  msgid "Deleting Testimonials Widget plugin will remove all data and settings."
514
  msgstr ""
515
 
516
+ #: testimonials-widget.php:409
517
  msgid "Image"
518
  msgstr ""
519
 
520
+ #: testimonials-widget.php:411
521
  msgid "Shortcodes"
522
  msgstr ""
523
 
524
+ #: testimonials-widget.php:417
525
  msgid "Published by"
526
  msgstr ""
527
 
528
+ #: testimonials-widget.php:418
529
  msgid "Category"
530
  msgstr ""
531
 
532
+ #: testimonials-widget.php:419
533
  msgid "Tags"
534
  msgstr ""
535
 
536
+ #: testimonials-widget.php:431
537
  msgid "Add New"
538
  msgstr ""
539
 
540
+ #: testimonials-widget.php:432 testimonials-widget.php:435
541
  msgid "Add New Testimonial"
542
  msgstr ""
543
 
544
+ #: testimonials-widget.php:433
545
  msgid "Edit Testimonial"
546
  msgstr ""
547
 
548
+ #: testimonials-widget.php:436 testimonials-widget.php:702
549
  msgid "No testimonials found"
550
  msgstr ""
551
 
552
+ #: testimonials-widget.php:437
553
  msgid "No testimonials found in Trash"
554
  msgstr ""
555
 
556
+ #: testimonials-widget.php:439
557
  msgid "Search Testimonials"
558
  msgstr ""
559
 
560
+ #: testimonials-widget.php:440
561
  msgid "Testimonial"
562
  msgstr ""
563
 
564
+ #: testimonials-widget.php:441
565
  msgid "View Testimonial"
566
  msgstr ""
567
 
568
+ #: testimonials-widget.php:735
569
  msgid "…"
570
  msgstr ""
571
 
572
+ #: testimonials-widget.php:1113
573
  msgid "&laquo;"
574
  msgstr ""
575
 
576
+ #: testimonials-widget.php:1122
577
  msgid "&raquo;"
578
  msgstr ""
579
 
580
+ #: testimonials-widget.php:1379
581
  msgid "Testimonial Data"
582
  msgstr ""
583
 
584
+ #: testimonials-widget.php:1404
585
  msgid "Enter title here"
586
  msgstr ""
587
 
588
+ #: testimonials-widget.php:1405
589
  msgid "Enter testimonial source here"
590
  msgstr ""
591
 
592
+ #: testimonials-widget.php:1429
593
  msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
594
  msgstr ""
595
 
596
+ #: testimonials-widget.php:1430
597
  msgid "Custom field updated."
598
  msgstr ""
599
 
600
+ #: testimonials-widget.php:1431
601
  msgid "Custom field deleted."
602
  msgstr ""
603
 
604
+ #: testimonials-widget.php:1432
605
  msgid "Testimonial updated."
606
  msgstr ""
607
 
608
  #. translators: %s: date and time of the revision
609
+ #: testimonials-widget.php:1434
610
  msgid "Testimonial restored to revision from %s"
611
  msgstr ""
612
 
613
+ #: testimonials-widget.php:1435
614
  msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
615
  msgstr ""
616
 
617
+ #: testimonials-widget.php:1436
618
  msgid "Testimonial saved."
619
  msgstr ""
620
 
621
+ #: testimonials-widget.php:1437
622
  msgid ""
623
  "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
624
  "a>"
625
  msgstr ""
626
 
627
+ #: testimonials-widget.php:1438
628
  msgid ""
629
  "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
630
  "\"%2$s\">Preview testimonial</a>"
631
  msgstr ""
632
 
633
+ #: testimonials-widget.php:1439
634
  msgid ""
635
  "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
636
  "testimonial</a>"
lib/settings.testimonials-widget.php CHANGED
@@ -375,7 +375,7 @@ class Testimonials_Widget_Settings {
375
  'section' => 'post_type',
376
  'title' => __( 'Archive Page URL', 'testimonials-widget' ),
377
  'desc' => sprintf( $desc, $site_url, $url ),
378
- 'std' => 'testimonials',
379
  'validate' => 'sanitize_title',
380
  'widget' => 0,
381
  );
@@ -570,7 +570,7 @@ class Testimonials_Widget_Settings {
570
  }
571
 
572
 
573
- public function display_page() {
574
  echo '<div class="wrap">
575
  <div class="icon32" id="icon-options-general"></div>
576
  <h2>' . __( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
@@ -680,7 +680,7 @@ class Testimonials_Widget_Settings {
680
 
681
  echo <<<EOD
682
  <div style="width: 70%;">
683
- <p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="/wp-content/plugins/testimonials-widget/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="http://wordpress.org/extend/plugins/testimonials-widget/">Testimonials Widget</a> is by <a href="http://aihr.us/about-aihrus/michael-cannon-resume/">Michael Cannon</a>. He's <a title="Lot's of stuff about Peichi Liu…" href="http://peimic.com/t/peichi-liu/">Peichi’s</a> smiling man, an&nbsp;adventurous <a title="Water rat" href="http://www.chinesehoroscope.org/chinese_zodiac/rat/" target="_blank">water-rat</a>,&nbsp;<a title="Aihrus –&nbsp;website support made easy since 1999" href="http://aihrus.localhost/">chief technology officer</a>,&nbsp;<a title="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>,&nbsp;<a title="Michael's poetic like literary ramblings" href="http://peimic.com/t/poetry/">poet</a>,&nbsp;<a title="World Wide Opportunities on Organic Farms" href="http://peimic.com/t/WWOOF/">WWOOF’er</a>&nbsp;and&nbsp;<a title="My traveled to country list, is more than my age." href="http://peimic.com/c/travel/">world traveler</a>.</p>
684
  </div>
685
  EOD;
686
 
375
  'section' => 'post_type',
376
  'title' => __( 'Archive Page URL', 'testimonials-widget' ),
377
  'desc' => sprintf( $desc, $site_url, $url ),
378
+ 'std' => 'testimonials-archive',
379
  'validate' => 'sanitize_title',
380
  'widget' => 0,
381
  );
570
  }
571
 
572
 
573
+ public static function display_page() {
574
  echo '<div class="wrap">
575
  <div class="icon32" id="icon-options-general"></div>
576
  <h2>' . __( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
680
 
681
  echo <<<EOD
682
  <div style="width: 70%;">
683
+ <p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="/wp-content/plugins/testimonials-widget/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="http://wordpress.org/extend/plugins/testimonials-widget/">Testimonials Widget</a> is by <a href="http://aihr.us/about-aihrus/michael-cannon-resume/">Michael Cannon</a>. He's <a title="Lot's of stuff about Peichi Liu…" href="http://peimic.com/t/peichi-liu/">Peichi’s</a> smiling man, an adventurous <a title="Water rat" href="http://www.chinesehoroscope.org/chinese_zodiac/rat/" target="_blank">water-rat</a>, <a title="Axelerant – Open Source. Engineered." href="http://axelerant.com/who-we-are">chief people officer</a>, <a title="Aihrus website support made easy since 1999" href="http://aihr.us/about-aihrus/">chief technology officer</a>, <a title="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>, <a title="Michael's poetic like literary ramblings" href="http://peimic.com/t/poetry/">poet</a>, <a title="World Wide Opportunities on Organic Farms" href="http://peimic.com/t/WWOOF/">WWOOF’er</a> and <a title="My traveled to country list, is more than my age." href="http://peimic.com/c/travel/">world traveler</a>.</p>
684
  </div>
685
  EOD;
686
 
project.ruleset.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <ruleset name="WPized Project">
3
+ <description>A custom set of rules to check for a WPized WordPress project</description>
4
+
5
+ <exclude-pattern>/docroot/wp-admin/*</exclude-pattern>
6
+ <exclude-pattern>/docroot/wp-includes/*</exclude-pattern>
7
+ <exclude-pattern>/docroot/wp-*.php</exclude-pattern>
8
+ <exclude-pattern>/docroot/index.php</exclude-pattern>
9
+ <exclude-pattern>/docroot/xmlrpc.php</exclude-pattern>
10
+ <exclude-pattern>/docroot/wp-content/plugins/*</exclude-pattern>
11
+
12
+ <rule ref="Squiz.PHP.CommentedOutCode"/>
13
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
14
+ <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
15
+ <rule ref="Generic.Commenting.Todo"/>
16
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
17
+
18
+ <!--
19
+ We may also want to to include all the rules in a standard
20
+ -->
21
+ <rule ref="WordPress">
22
+ <!--
23
+ We may want a middle ground though. The best way to do this is add the
24
+ entire ruleset, then rule by rule, remove ones that don't suit a project. We
25
+ can do this by running `phpc ` with the '-s' flag, to see the names of the
26
+ different Sniffs, as their rules are broken. From here, we can opt to
27
+ exclude problematic sniffs like so.
28
+ -->
29
+
30
+ <exclude name="WordPress.Formatting.MultipleStatementAlignment" />
31
+ <xexclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
32
+ <xexclude name="WordPress.Functions.FunctionCallSignature" />
33
+ <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
34
+ </rule>
35
+ </ruleset>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://aihr.us/about-aihrus/donate/
5
  Tags: client, customer, quotations, quote, quotes, random, review, quote, recommendation, reference, testimonial, testimonials, testimony, widget, wpml
6
  Requires at least: 3.4
7
  Tested up to: 3.6.0
8
- Stable tag: 2.11.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -113,7 +113,7 @@ In using Testimonials Widget Premium, you'll not be sorry.
113
 
114
  = Shortcode and Widget Options =
115
 
116
- General
117
 
118
  * Character Limit - Number of characters to limit testimonial views to
119
  * `char_limit` - default none; char_limit=200
@@ -153,7 +153,7 @@ General
153
  * `after` – display paging only after testimonial entries
154
  * Widget - Not functional
155
 
156
- Selection
157
 
158
  * Category Filter - Comma separated category slug-names
159
  * `category` - default none; category=product or category="category-a, another-category"
@@ -168,7 +168,7 @@ Selection
168
  * Limit - Number of testimonials to rotate through via widget or show at a time when listing
169
  * `limit` - default 10; limit=25
170
 
171
- Ordering
172
 
173
  * Random Order? - Unchecking this will rotate testimonials per ORDER BY and ORDER BY Order. Widgets are random by default automatically
174
  * `random` - default none; random=true (overrides `order` and `orderby`)
@@ -180,7 +180,7 @@ Ordering
180
  * ORDER BY Order - DESC or ASC
181
  * `order` - [default DESC](http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters); order=ASC
182
 
183
- Widget
184
 
185
  * Widget Title
186
  * `title` - default "Testimonials"
@@ -200,13 +200,13 @@ Widget
200
 
201
  = Other Options =
202
 
203
- Post Type
204
 
205
  * Allow Comments? – Only affects the Testimonials Widget post edit page. Your theme controls the front-end view.
206
  * Archive Page URL – URL slug-name for testimonials archive page. After changing, you must click "Save Changes" on Permalink Settings to update them.
207
  * Testimonial Page URL – URL slug-name for testimonial view pages. After changing, you must click "Save Changes" on Permalink Settings to update them.
208
 
209
- Compatibility & Reset
210
 
211
  * Remove `.hentry` CSS? – Some themes use class `.hentry` in a manner that breaks Testimonials Widgets CSS
212
  * `remove_hentry` - default none; remove_hentry=true
@@ -252,7 +252,7 @@ Compatibility & Reset
252
  * `testimonials_widget_gravatar_size` - Change the Gravatar size
253
  * `testimonials_widget_image_size` - Change the image size
254
  * `testimonials_widget_meta_box` - Modify Testimonial Data fields
255
- * `testimonials_widget_next_posts_link` - Configure Next page indicator
256
  * `testimonials_widget_posts_custom_column` - Customize testimonial posts column contents
257
  * `testimonials_widget_previous_posts_link_text` - Configure Previous page indicator
258
  * `testimonials_widget_query_args` - Alter WP_Query arguments for testimonial selection
@@ -360,6 +360,10 @@ See [Changelog](http://aihr.us/testimonials-widget/changelog/)
360
 
361
  == Upgrade Notice ==
362
 
 
 
 
 
363
  = 2.11.0 =
364
 
365
  * CSS class names are simplified. For the most part, other than `testimonialswidget_testimonial` remove `testimonialswidget_` from the CSS class name in your CSS customizations.
@@ -425,6 +429,7 @@ Is there something you want done? Write it up on the [support forums](http://wor
425
 
426
  * Add http protocol to URLs on validation
427
  * Add notice about deleting data and settings on uninstall
 
428
  * Settings export/import
429
  * Show changelog on update
430
  * Update to WordPress Coding standards
5
  Tags: client, customer, quotations, quote, quotes, random, review, quote, recommendation, reference, testimonial, testimonials, testimony, widget, wpml
6
  Requires at least: 3.4
7
  Tested up to: 3.6.0
8
+ Stable tag: 2.11.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
113
 
114
  = Shortcode and Widget Options =
115
 
116
+ **General**
117
 
118
  * Character Limit - Number of characters to limit testimonial views to
119
  * `char_limit` - default none; char_limit=200
153
  * `after` – display paging only after testimonial entries
154
  * Widget - Not functional
155
 
156
+ **Selection**
157
 
158
  * Category Filter - Comma separated category slug-names
159
  * `category` - default none; category=product or category="category-a, another-category"
168
  * Limit - Number of testimonials to rotate through via widget or show at a time when listing
169
  * `limit` - default 10; limit=25
170
 
171
+ **Ordering**
172
 
173
  * Random Order? - Unchecking this will rotate testimonials per ORDER BY and ORDER BY Order. Widgets are random by default automatically
174
  * `random` - default none; random=true (overrides `order` and `orderby`)
180
  * ORDER BY Order - DESC or ASC
181
  * `order` - [default DESC](http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters); order=ASC
182
 
183
+ **Widget**
184
 
185
  * Widget Title
186
  * `title` - default "Testimonials"
200
 
201
  = Other Options =
202
 
203
+ **Post Type**
204
 
205
  * Allow Comments? – Only affects the Testimonials Widget post edit page. Your theme controls the front-end view.
206
  * Archive Page URL – URL slug-name for testimonials archive page. After changing, you must click "Save Changes" on Permalink Settings to update them.
207
  * Testimonial Page URL – URL slug-name for testimonial view pages. After changing, you must click "Save Changes" on Permalink Settings to update them.
208
 
209
+ **Compatibility & Reset**
210
 
211
  * Remove `.hentry` CSS? – Some themes use class `.hentry` in a manner that breaks Testimonials Widgets CSS
212
  * `remove_hentry` - default none; remove_hentry=true
252
  * `testimonials_widget_gravatar_size` - Change the Gravatar size
253
  * `testimonials_widget_image_size` - Change the image size
254
  * `testimonials_widget_meta_box` - Modify Testimonial Data fields
255
+ * `testimonials_widget_next_posts_link_text` - Configure Next page indicator
256
  * `testimonials_widget_posts_custom_column` - Customize testimonial posts column contents
257
  * `testimonials_widget_previous_posts_link_text` - Configure Previous page indicator
258
  * `testimonials_widget_query_args` - Alter WP_Query arguments for testimonial selection
360
 
361
  == Upgrade Notice ==
362
 
363
+ = 2.11.3 =
364
+
365
+ * Correct filter name `testimonials_widget_next_posts_link` to `testimonials_widget_next_posts_link_text`
366
+
367
  = 2.11.0 =
368
 
369
  * CSS class names are simplified. For the most part, other than `testimonialswidget_testimonial` remove `testimonialswidget_` from the CSS class name in your CSS customizations.
429
 
430
  * Add http protocol to URLs on validation
431
  * Add notice about deleting data and settings on uninstall
432
+ * BUG Non-static method Testimonials_Widget::get_testimonials_html() should not be called statically on line 546 in file /Users/michael/Sites/wp/wp-content/plugins/testimonials-widget/testimonials-widget.php
433
  * Settings export/import
434
  * Show changelog on update
435
  * Update to WordPress Coding standards
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.11.2
7
  Author: Michael Cannon
8
  Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
9
  License: GPLv2 or later
@@ -33,13 +33,12 @@ class Testimonials_Widget {
33
  const id = 'testimonialswidget_testimonials';
34
  const old_name = 'testimonialswidget';
35
  const pt = 'testimonials-widget';
36
- const version = '2.11.2';
37
 
38
- private $max_num_pages = 0;
39
- private $post_count = 0;
40
- private $wp_query = null;
41
-
42
- private static $base = null;
43
 
44
  public static $css = array();
45
  public static $css_called = false;
@@ -82,10 +81,6 @@ class Testimonials_Widget {
82
 
83
 
84
  public function init() {
85
- if ( ( defined('DOING_AJAX') && DOING_AJAX ) || ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) ) {
86
- return;
87
- }
88
-
89
  add_filter( 'the_content', array( &$this, 'get_single' ) );
90
  self::$base = plugin_basename( __FILE__ );
91
  self::init_post_type();
@@ -102,17 +97,17 @@ class Testimonials_Widget {
102
  }
103
 
104
 
105
- public function get_instance() {
106
  return self::$instance_number;
107
  }
108
 
109
 
110
- public function add_instance() {
111
  self::$instance_number++;
112
  }
113
 
114
 
115
- public function support_thumbnails() {
116
  $feature = 'post-thumbnails';
117
  $feature_level = get_theme_support( $feature );
118
 
@@ -153,6 +148,12 @@ class Testimonials_Widget {
153
 
154
 
155
  public function activation() {
 
 
 
 
 
 
156
  // fixme
157
  // add_action( 'admin_notices', array( 'Testimonials_Widget', 'notice_uninstall' ) );
158
  self::init();
@@ -162,6 +163,12 @@ class Testimonials_Widget {
162
 
163
 
164
  public function deactivation() {
 
 
 
 
 
 
165
  flush_rewrite_rules();
166
  }
167
 
@@ -177,6 +184,14 @@ class Testimonials_Widget {
177
 
178
 
179
  public function uninstall() {
 
 
 
 
 
 
 
 
180
  global $wpdb;
181
 
182
  delete_option( Testimonials_Widget_Settings::id );
@@ -469,7 +484,7 @@ class Testimonials_Widget {
469
  }
470
 
471
 
472
- public function get_defaults( $single_view = false ) {
473
  if ( empty( $single_view ) ) {
474
  return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
475
  } else {
@@ -506,7 +521,7 @@ class Testimonials_Widget {
506
  }
507
 
508
 
509
- public function testimonialswidget_widget( $atts, $widget_number = null ) {
510
  self::add_instance();
511
  self::scripts();
512
 
@@ -543,7 +558,7 @@ class Testimonials_Widget {
543
 
544
  if ( ! empty( $css ) ) {
545
  self::$css = array_merge( $css, self::$css );
546
- add_action( 'wp_footer', array( &$this, 'get_testimonials_css' ), 20 );
547
  }
548
 
549
  // Generate JS
@@ -557,25 +572,25 @@ class Testimonials_Widget {
557
 
558
  if ( ! empty( $js ) ) {
559
  self::$scripts = array_merge( $js, self::$scripts );
560
- add_action( 'wp_footer', array( &$this, 'get_testimonials_scripts' ), 20 );
561
  }
562
 
563
  return $content;
564
  }
565
 
566
 
567
- public function scripts() {
568
  wp_enqueue_script( 'jquery' );
569
  }
570
 
571
 
572
- public function styles() {
573
  wp_register_style( 'testimonials-widget', plugins_url( 'testimonials-widget.css', __FILE__ ) );
574
  wp_enqueue_style( 'testimonials-widget' );
575
  }
576
 
577
 
578
- public function get_testimonials_html_css( $atts, $widget_number = null ) {
579
  // display attributes
580
  $height = $atts['height'];
581
  $max_height = $atts['max_height'];
@@ -615,7 +630,7 @@ EOF;
615
  }
616
 
617
 
618
- public function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
619
  // display attributes
620
  $refresh_interval = $atts['refresh_interval'];
621
 
@@ -905,7 +920,7 @@ EOF;
905
 
906
 
907
  // Original PHP code as myTruncate2 by Chirp Internet: www.chirp.com.au
908
- public function testimonials_truncate( $string, $char_limit = false, $break = ' ', $pad = '…', $force_pad = false ) {
909
  if ( empty( $force_pad ) ) {
910
  if ( empty( $char_limit ) )
911
  return $string;
@@ -1033,7 +1048,7 @@ EOF;
1033
  }
1034
 
1035
 
1036
- public function format_content( $content, $widget_number, $atts ) {
1037
  if ( empty ( $content ) )
1038
  return $content;
1039
 
@@ -1068,10 +1083,10 @@ EOF;
1068
  }
1069
 
1070
 
1071
- public function get_testimonials_paging( $testimonials, $atts, $prepend = true ) {
1072
  $html = '';
1073
 
1074
- if ( is_home() || 1 === $this->max_num_pages ) {
1075
  return $html;
1076
  }
1077
 
@@ -1103,16 +1118,16 @@ EOF;
1103
 
1104
  $html .= ' <div class="alignright">';
1105
 
1106
- if ( $paged != $this->max_num_pages ) {
1107
- $raquo = apply_filters( 'testimonials_widget_next_posts_link', __( '&raquo;', 'testimonials-widget' ) );
1108
- $html .= get_next_posts_link( $raquo, $this->max_num_pages );
1109
  }
1110
 
1111
  $html .= ' </div>';
1112
  } else {
1113
  $args = array(
1114
  'echo' => false,
1115
- 'query' => $this->wp_query,
1116
  );
1117
  $args = apply_filters( 'testimonials_widget_wp_pagenavi', $args );
1118
  $html .= wp_pagenavi( $args );
@@ -1124,7 +1139,7 @@ EOF;
1124
  }
1125
 
1126
 
1127
- public function get_testimonials_css() {
1128
  if ( empty( self::$css_called ) ) {
1129
  foreach( self::$css as $key => $css ) {
1130
  echo $css;
@@ -1135,7 +1150,7 @@ EOF;
1135
  }
1136
 
1137
 
1138
- public function get_testimonials_scripts() {
1139
  if ( empty( self::$scripts_called ) ) {
1140
  foreach( self::$scripts as $key => $script ) {
1141
  echo $script;
@@ -1146,7 +1161,7 @@ EOF;
1146
  }
1147
 
1148
 
1149
- public function get_query_args( $atts ) {
1150
  extract( $atts );
1151
 
1152
  if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) ) {
@@ -1222,7 +1237,7 @@ EOF;
1222
  }
1223
 
1224
 
1225
- public function get_testimonials( $atts ) {
1226
  $hide_gravatar = $atts['hide_gravatar'];
1227
 
1228
  $args = self::get_query_args( $atts );
@@ -1239,9 +1254,9 @@ EOF;
1239
  remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
1240
  }
1241
 
1242
- $this->max_num_pages = $testimonials->max_num_pages;
1243
- $this->post_count = $testimonials->post_count;
1244
- $this->wp_query = $testimonials;
1245
 
1246
  wp_reset_postdata();
1247
 
@@ -1250,7 +1265,7 @@ EOF;
1250
 
1251
  $testimonial_data = array();
1252
 
1253
- if ( empty( $this->post_count ) )
1254
  return $testimonial_data;
1255
 
1256
  foreach( $testimonials->posts as $row ) {
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.11.3
7
  Author: Michael Cannon
8
  Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
9
  License: GPLv2 or later
33
  const id = 'testimonialswidget_testimonials';
34
  const old_name = 'testimonialswidget';
35
  const pt = 'testimonials-widget';
36
+ const version = '2.11.3';
37
 
38
+ private static $base = null;
39
+ private static $max_num_pages = 0;
40
+ private static $post_count = 0;
41
+ private static $wp_query = null;
 
42
 
43
  public static $css = array();
44
  public static $css_called = false;
81
 
82
 
83
  public function init() {
 
 
 
 
84
  add_filter( 'the_content', array( &$this, 'get_single' ) );
85
  self::$base = plugin_basename( __FILE__ );
86
  self::init_post_type();
97
  }
98
 
99
 
100
+ public static function get_instance() {
101
  return self::$instance_number;
102
  }
103
 
104
 
105
+ public static function add_instance() {
106
  self::$instance_number++;
107
  }
108
 
109
 
110
+ public static function support_thumbnails() {
111
  $feature = 'post-thumbnails';
112
  $feature_level = get_theme_support( $feature );
113
 
148
 
149
 
150
  public function activation() {
151
+ if ( ! current_user_can( 'activate_plugins' ) )
152
+ return;
153
+
154
+ $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
155
+ check_admin_referer( "activate-plugin_{$plugin}" );
156
+
157
  // fixme
158
  // add_action( 'admin_notices', array( 'Testimonials_Widget', 'notice_uninstall' ) );
159
  self::init();
163
 
164
 
165
  public function deactivation() {
166
+ if ( ! current_user_can( 'activate_plugins' ) )
167
+ return;
168
+
169
+ $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
170
+ check_admin_referer( "deactivate-plugin_{$plugin}" );
171
+
172
  flush_rewrite_rules();
173
  }
174
 
184
 
185
 
186
  public function uninstall() {
187
+ if ( ! current_user_can( 'activate_plugins' ) )
188
+ return;
189
+
190
+ if ( __FILE__ != WP_UNINSTALL_PLUGIN )
191
+ return;
192
+
193
+ check_admin_referer( 'bulk-plugins' );
194
+
195
  global $wpdb;
196
 
197
  delete_option( Testimonials_Widget_Settings::id );
484
  }
485
 
486
 
487
+ public static function get_defaults( $single_view = false ) {
488
  if ( empty( $single_view ) ) {
489
  return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
490
  } else {
521
  }
522
 
523
 
524
+ public static function testimonialswidget_widget( $atts, $widget_number = null ) {
525
  self::add_instance();
526
  self::scripts();
527
 
558
 
559
  if ( ! empty( $css ) ) {
560
  self::$css = array_merge( $css, self::$css );
561
+ add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_css' ), 20 );
562
  }
563
 
564
  // Generate JS
572
 
573
  if ( ! empty( $js ) ) {
574
  self::$scripts = array_merge( $js, self::$scripts );
575
+ add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_scripts' ), 20 );
576
  }
577
 
578
  return $content;
579
  }
580
 
581
 
582
+ public static function scripts() {
583
  wp_enqueue_script( 'jquery' );
584
  }
585
 
586
 
587
+ public static function styles() {
588
  wp_register_style( 'testimonials-widget', plugins_url( 'testimonials-widget.css', __FILE__ ) );
589
  wp_enqueue_style( 'testimonials-widget' );
590
  }
591
 
592
 
593
+ public static function get_testimonials_html_css( $atts, $widget_number = null ) {
594
  // display attributes
595
  $height = $atts['height'];
596
  $max_height = $atts['max_height'];
630
  }
631
 
632
 
633
+ public static function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
634
  // display attributes
635
  $refresh_interval = $atts['refresh_interval'];
636
 
920
 
921
 
922
  // Original PHP code as myTruncate2 by Chirp Internet: www.chirp.com.au
923
+ public static function testimonials_truncate( $string, $char_limit = false, $break = ' ', $pad = '…', $force_pad = false ) {
924
  if ( empty( $force_pad ) ) {
925
  if ( empty( $char_limit ) )
926
  return $string;
1048
  }
1049
 
1050
 
1051
+ public static function format_content( $content, $widget_number, $atts ) {
1052
  if ( empty ( $content ) )
1053
  return $content;
1054
 
1083
  }
1084
 
1085
 
1086
+ public static function get_testimonials_paging( $testimonials, $atts, $prepend = true ) {
1087
  $html = '';
1088
 
1089
+ if ( is_home() || 1 === self::$max_num_pages ) {
1090
  return $html;
1091
  }
1092
 
1118
 
1119
  $html .= ' <div class="alignright">';
1120
 
1121
+ if ( $paged != self::$max_num_pages ) {
1122
+ $raquo = apply_filters( 'testimonials_widget_next_posts_link_text', __( '&raquo;', 'testimonials-widget' ) );
1123
+ $html .= get_next_posts_link( $raquo, self::$max_num_pages );
1124
  }
1125
 
1126
  $html .= ' </div>';
1127
  } else {
1128
  $args = array(
1129
  'echo' => false,
1130
+ 'query' => self::$wp_query,
1131
  );
1132
  $args = apply_filters( 'testimonials_widget_wp_pagenavi', $args );
1133
  $html .= wp_pagenavi( $args );
1139
  }
1140
 
1141
 
1142
+ public static function get_testimonials_css() {
1143
  if ( empty( self::$css_called ) ) {
1144
  foreach( self::$css as $key => $css ) {
1145
  echo $css;
1150
  }
1151
 
1152
 
1153
+ public static function get_testimonials_scripts() {
1154
  if ( empty( self::$scripts_called ) ) {
1155
  foreach( self::$scripts as $key => $script ) {
1156
  echo $script;
1161
  }
1162
 
1163
 
1164
+ public static function get_query_args( $atts ) {
1165
  extract( $atts );
1166
 
1167
  if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) ) {
1237
  }
1238
 
1239
 
1240
+ public static function get_testimonials( $atts ) {
1241
  $hide_gravatar = $atts['hide_gravatar'];
1242
 
1243
  $args = self::get_query_args( $atts );
1254
  remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
1255
  }
1256
 
1257
+ self::$max_num_pages = $testimonials->max_num_pages;
1258
+ self::$post_count = $testimonials->post_count;
1259
+ self::$wp_query = $testimonials;
1260
 
1261
  wp_reset_postdata();
1262
 
1265
 
1266
  $testimonial_data = array();
1267
 
1268
+ if ( empty( self::$post_count ) )
1269
  return $testimonial_data;
1270
 
1271
  foreach( $testimonials->posts as $row ) {