Testimonials Widget - Version 2.13.4

Version Description

= 2.12.0 =

  • CSS and JavaScript renaming
    • bottom_text renamed to bottom-text
    • close_quote renamed to close-quote
    • display_none renamed to display-none
    • join_location renamed to join-location
    • join_title renamed to join-title
    • open_quote renamed to open-quote
    • testimonialswidget_testimonial renamed to testimonials-widget-testimonial
    • testimonialswidget_testimonials renamed to testimonials-widget-testimonials

= 2.11.3 =

  • Correct filter name testimonials_widget_next_posts_link to testimonials_widget_next_posts_link_text

= 2.11.0 =

  • CSS class names are simplified. For the most part, other than testimonialswidget_testimonial remove testimonialswidget_ from the CSS class name in your CSS customizations.
    • Ex: .testimonialswidget_join becomes .join
    • Ex: .testimonialswidget_author becomes .author
  • Testimonials are now formatted using blockquote than q for HTML5 compliance. If you need q tag formatting, enable it at WP Admin > Testimonials > Settings, Compatibility & Reset tab
    • cite is now div.credit

= 2.8.0 =

  • Deprecated
    • hide_author now hide_source
  • Removed filters testimonials_widget_options_update, testimonials_widget_options_form
    • Use testimonials_widget_validate_settings and testimonials_widget_settings instead
  • Renamed variable and related class widget_text to bottom_text

= 2.7.3 =

  • Quotes are no longer handled via q, p:before, or p:after CSS. It's handled via .testimonialswidget_testimonial .testimonialswidget_open_quote:before and .testimonialswidget_testimonial .testimonialswidget_close_quote:after
  • This change was made to keep consistency in how quotes were managed and to reduce the number of exception cases. In the end, this is simpler.

= 2.7.0 =

  • Quotes with keep_whitespace=true aren't applied via CSS .testimonialswidget_testimonial q tag anymore, but .testimonialswidget_testimonial q p:first-child:before and .testimonialswidget_testimonial q p:last-child:after
  • Widget testimonial p tags are no longer CSS display: inline, display: block as expected

= 2.4.1 =

  • Paging is on by default, except for widgets

= 2.0.0 =

  • CSS
    • Class testimonialswidget_company replaces testimonialswidget_source
    • Class testimonialswidget_source replaces testimonialswidget_author
    • The tighten widget display up, p tags within q are displayed inline.
  • JavaScript
    • The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires wp_footer() in the footer.
  • Shortcode options
    • hide_source replaced by hide_url
    • hide_author replaced by hide_source
  • Testimonials
    • Migration from the old custom table to new custom post type is automatically done. Import might take a few moments to complete.
    • Company, URL and email details are attempted to be identified and placed properly based upon the original author and source fields. The company is "guessed" from the author field when there's a ", " or " of " context. If the source is an email, it's saved as such. Otherwise, it's assumed to be a URL.
    • Public testimonials are saved as Published. Non-public testimonials are marked as Private.
  • Widget options
    • "Show author" and "Show source" options are replaced by "Hide source" and "Hide URL" respectively. There's no backwards compatibility for these changes.
    • Default min-height is now 250px than 150px.
Download this release

Release Info

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

Code changes from version 2.13.3 to 2.13.4

API.md CHANGED
@@ -4,7 +4,9 @@ The [Testimonials Widget plugin](http://wordpress.org/plugins/testimonials-widge
4
 
5
  ## Actions
6
 
7
- None at this time.
 
 
8
 
9
  ## Filters
10
 
@@ -50,6 +52,10 @@ None at this time.
50
 
51
  Customize testimonials list and widget output post `get_testimonial_html`. [example](https://aihrus.zendesk.com/entries/23693413-How-do-I-customize-my-testimonial-list-and-widget-output-)
52
 
 
 
 
 
53
  * `testimonials_widget_testimonials_css`
54
 
55
  Alter dynamically generated CSS
@@ -58,6 +64,10 @@ None at this time.
58
 
59
  Alter dynamically generated JavaScript. [example](https://gist.github.com/michael-cannon/5833678)
60
 
 
 
 
 
61
  * `testimonials_widget_wp_pagenavi`
62
 
63
  Configure WP-PageNavi specifically for Testimonial Widgets. [example](https://aihrus.zendesk.com/entries/23679361-How-do-I-get-page-numbers-for-pagination-)
4
 
5
  ## Actions
6
 
7
+ * `testimonials_widget_scripts`
8
+
9
+ Made additional `wp_register_script` and `wp_enqueue_script` calls as needed.
10
 
11
  ## Filters
12
 
52
 
53
  Customize testimonials list and widget output post `get_testimonial_html`. [example](https://aihrus.zendesk.com/entries/23693413-How-do-I-customize-my-testimonial-list-and-widget-output-)
54
 
55
+ * `testimonials_widget_get_testimonial_html_class`
56
+
57
+ Alter dynamically generated CSS per testimonial
58
+
59
  * `testimonials_widget_testimonials_css`
60
 
61
  Alter dynamically generated CSS
64
 
65
  Alter dynamically generated JavaScript. [example](https://gist.github.com/michael-cannon/5833678)
66
 
67
+ * `testimonials_widget_testimonials_js_internal`
68
+
69
+ Inject dynamically generated JavaScript to `active/next` functional area..
70
+
71
  * `testimonials_widget_wp_pagenavi`
72
 
73
  Configure WP-PageNavi specifically for Testimonial Widgets. [example](https://aihrus.zendesk.com/entries/23679361-How-do-I-get-page-numbers-for-pagination-)
CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
 
3
  ## master
4
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ## 2.13.3
6
  * [Add shortcode category example](http://wordpress.org/support/topic/category-shortcode-1?replies=2#post-4550244) - Thank you ashleynlinares
7
  * Add do shortcodes option inside of testimonials content
2
 
3
  ## master
4
 
5
+ ## 2.13.4
6
+ * Add $atts parameter to filter `testimonials_widget_data`
7
+ * Add action `testimonials_widget_scripts`
8
+ * Add filter `testimonials_widget_get_testimonial_html_class`
9
+ * Add filter `testimonials_widget_testimonials_js_internal`
10
+ * BUGFIX instance numbers breaking caching
11
+ * BUGFIX settings page missing page title
12
+ * Change &$this variable calls to $this
13
+ * Enabling sorting of scripts for precedence
14
+ * Remove unused first parameter from `testimonials_widget_cache_get` filter call
15
+ * Tie-in premium disable_donate option
16
+
17
  ## 2.13.3
18
  * [Add shortcode category example](http://wordpress.org/support/topic/category-shortcode-1?replies=2#post-4550244) - Thank you ashleynlinares
19
  * Add do shortcodes option inside of testimonials content
TODO.md CHANGED
@@ -3,8 +3,10 @@
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
  * Add helper tip windows
6
- * BUG bottom_text after update show up encoded
7
- * [Begin CSS testing](http://www.netmagazine.com/tutorials/4-tools-automatic-css-testing)
8
  * BUG [IE8 + Google Font Issue](http://wordpress.org/support/topic/ie8-google-font-issue)
 
9
  * Pass YSlow and Google PageSpeed testing
10
- * Prevent page slug naming conflicts
 
 
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
  * Add helper tip windows
6
+ * Adjust [fadeIn speed](http://wordpress.org/support/topic/animation-not-disabling)
 
7
  * BUG [IE8 + Google Font Issue](http://wordpress.org/support/topic/ie8-google-font-issue)
8
+ * Offer slideUp option
9
  * Pass YSlow and Google PageSpeed testing
10
+ * Prevent page slug naming conflicts
11
+ * Saved settings message
12
+ * [Begin CSS testing](http://www.netmagazine.com/tutorials/4-tools-automatic-css-testing)
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.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
7
- "POT-Creation-Date: 2013-08-28 02:26:21+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/class-testimonials-widget-settings.php:88 testimonials-widget.php:480
48
- #: testimonials-widget.php:525
49
  msgid "Testimonials"
50
  msgstr ""
51
 
@@ -310,7 +310,7 @@ msgstr ""
310
  msgid "Author"
311
  msgstr ""
312
 
313
- #: lib/class-testimonials-widget-settings.php:346 testimonials-widget.php:457
314
  msgid "Date"
315
  msgstr ""
316
 
@@ -318,7 +318,7 @@ msgstr ""
318
  msgid "Menu Order"
319
  msgstr ""
320
 
321
- #: lib/class-testimonials-widget-settings.php:348 testimonials-widget.php:449
322
  msgid "Source"
323
  msgstr ""
324
 
@@ -340,28 +340,28 @@ msgstr ""
340
  msgid "None"
341
  msgstr ""
342
 
343
- #: lib/class-testimonials-widget-settings.php:362 testimonials-widget.php:451
344
- #: testimonials-widget.php:1494
345
  msgid "Job Title"
346
  msgstr ""
347
 
348
- #: lib/class-testimonials-widget-settings.php:363 testimonials-widget.php:453
349
- #: testimonials-widget.php:1506
350
  msgid "Email"
351
  msgstr ""
352
 
353
- #: lib/class-testimonials-widget-settings.php:364 testimonials-widget.php:452
354
- #: testimonials-widget.php:1500
355
  msgid "Location"
356
  msgstr ""
357
 
358
- #: lib/class-testimonials-widget-settings.php:365 testimonials-widget.php:454
359
- #: testimonials-widget.php:1512
360
  msgid "Company"
361
  msgstr ""
362
 
363
- #: lib/class-testimonials-widget-settings.php:366 testimonials-widget.php:455
364
- #: testimonials-widget.php:1518
365
  msgid "URL"
366
  msgstr ""
367
 
@@ -473,14 +473,15 @@ msgstr ""
473
  msgid "Check this box to reset options to their defaults"
474
  msgstr ""
475
 
476
- #: lib/class-testimonials-widget-settings.php:561 testimonials-widget.php:62
477
- msgid "Settings"
478
- msgstr ""
479
-
480
  #: lib/class-testimonials-widget-settings.php:598
481
  msgid "Testimonials Widget Settings"
482
  msgstr ""
483
 
 
 
 
 
484
  #: lib/class-testimonials-widget-settings.php:600
485
  msgid ""
486
  "These Testimonials Widget Settings establish the default option values for "
@@ -494,11 +495,11 @@ msgstr ""
494
  msgid "Save Changes"
495
  msgstr ""
496
 
497
- #: lib/class-testimonials-widget-settings.php:629
498
  msgid "Copyright ©%1$s %2$s."
499
  msgstr ""
500
 
501
- #: lib/class-testimonials-widget-settings.php:989
502
  msgid "Required"
503
  msgstr ""
504
 
@@ -506,7 +507,7 @@ msgstr ""
506
  msgid "Display testimonials with multiple selection and display options"
507
  msgstr ""
508
 
509
- #. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.13.3) #-#-#-#-#
510
  #. Plugin Name of the plugin/theme
511
  #: lib/class-testimonials-widget-widget.php:37
512
  msgid "Testimonials Widget"
@@ -524,136 +525,136 @@ msgstr ""
524
  msgid "Expand/Collapse"
525
  msgstr ""
526
 
527
- #: testimonials-widget.php:243
528
  msgid ""
529
  "If your Testimonials Widget display has gone to funky town, please <a href="
530
  "\"%s\">read the FAQ</a> about possible CSS fixes."
531
  msgstr ""
532
 
533
- #: testimonials-widget.php:252
534
  msgid ""
535
  "Please donate $2 towards development and support of this Testimonials Widget "
536
  "plugin. %s"
537
  msgstr ""
538
 
539
- #: testimonials-widget.php:448
540
  msgid "Image"
541
  msgstr ""
542
 
543
- #: testimonials-widget.php:450
544
  msgid "Shortcodes"
545
  msgstr ""
546
 
547
- #: testimonials-widget.php:456
548
  msgid "Published by"
549
  msgstr ""
550
 
551
- #: testimonials-widget.php:462 testimonials-widget.php:465
552
  msgid "Category"
553
  msgstr ""
554
 
555
- #: testimonials-widget.php:463 testimonials-widget.php:466
556
  msgid "Tags"
557
  msgstr ""
558
 
559
- #: testimonials-widget.php:477
560
  msgid "Add New"
561
  msgstr ""
562
 
563
- #: testimonials-widget.php:478 testimonials-widget.php:481
564
  msgid "Add New Testimonial"
565
  msgstr ""
566
 
567
- #: testimonials-widget.php:479
568
  msgid "Edit Testimonial"
569
  msgstr ""
570
 
571
- #: testimonials-widget.php:482 testimonials-widget.php:804
572
  msgid "No testimonials found"
573
  msgstr ""
574
 
575
- #: testimonials-widget.php:483
576
  msgid "No testimonials found in Trash"
577
  msgstr ""
578
 
579
- #: testimonials-widget.php:485
580
  msgid "Search Testimonials"
581
  msgstr ""
582
 
583
- #: testimonials-widget.php:486 testimonials-widget.php:1606
584
  msgid "Testimonial"
585
  msgstr ""
586
 
587
- #: testimonials-widget.php:487
588
  msgid "View Testimonial"
589
  msgstr ""
590
 
591
- #: testimonials-widget.php:915
592
  msgid "…"
593
  msgstr ""
594
 
595
- #: testimonials-widget.php:1235
596
  msgid "&laquo;"
597
  msgstr ""
598
 
599
- #: testimonials-widget.php:1244
600
  msgid "&raquo;"
601
  msgstr ""
602
 
603
- #: testimonials-widget.php:1530
604
  msgid "Testimonial Data"
605
  msgstr ""
606
 
607
- #: testimonials-widget.php:1555
608
  msgid "Enter title here"
609
  msgstr ""
610
 
611
- #: testimonials-widget.php:1556
612
  msgid "Enter testimonial source here"
613
  msgstr ""
614
 
615
- #: testimonials-widget.php:1581
616
  msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
617
  msgstr ""
618
 
619
- #: testimonials-widget.php:1582
620
  msgid "Custom field updated."
621
  msgstr ""
622
 
623
- #: testimonials-widget.php:1583
624
  msgid "Custom field deleted."
625
  msgstr ""
626
 
627
- #: testimonials-widget.php:1584
628
  msgid "Testimonial updated."
629
  msgstr ""
630
 
631
  #. translators: %s: date and time of the revision
632
- #: testimonials-widget.php:1586
633
  msgid "Testimonial restored to revision from %s"
634
  msgstr ""
635
 
636
- #: testimonials-widget.php:1587
637
  msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
638
  msgstr ""
639
 
640
- #: testimonials-widget.php:1588
641
  msgid "Testimonial saved."
642
  msgstr ""
643
 
644
- #: testimonials-widget.php:1589
645
  msgid ""
646
  "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
647
  "a>"
648
  msgstr ""
649
 
650
- #: testimonials-widget.php:1590
651
  msgid ""
652
  "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
653
  "\"%2$s\">Preview testimonial</a>"
654
  msgstr ""
655
 
656
- #: testimonials-widget.php:1591
657
  msgid ""
658
  "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
659
  "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.13.4\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
7
+ "POT-Creation-Date: 2013-09-13 04:57:37+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/class-testimonials-widget-settings.php:88 testimonials-widget.php:493
48
+ #: testimonials-widget.php:538
49
  msgid "Testimonials"
50
  msgstr ""
51
 
310
  msgid "Author"
311
  msgstr ""
312
 
313
+ #: lib/class-testimonials-widget-settings.php:346 testimonials-widget.php:470
314
  msgid "Date"
315
  msgstr ""
316
 
318
  msgid "Menu Order"
319
  msgstr ""
320
 
321
+ #: lib/class-testimonials-widget-settings.php:348 testimonials-widget.php:462
322
  msgid "Source"
323
  msgstr ""
324
 
340
  msgid "None"
341
  msgstr ""
342
 
343
+ #: lib/class-testimonials-widget-settings.php:362 testimonials-widget.php:464
344
+ #: testimonials-widget.php:1517
345
  msgid "Job Title"
346
  msgstr ""
347
 
348
+ #: lib/class-testimonials-widget-settings.php:363 testimonials-widget.php:466
349
+ #: testimonials-widget.php:1529
350
  msgid "Email"
351
  msgstr ""
352
 
353
+ #: lib/class-testimonials-widget-settings.php:364 testimonials-widget.php:465
354
+ #: testimonials-widget.php:1523
355
  msgid "Location"
356
  msgstr ""
357
 
358
+ #: lib/class-testimonials-widget-settings.php:365 testimonials-widget.php:467
359
+ #: testimonials-widget.php:1535
360
  msgid "Company"
361
  msgstr ""
362
 
363
+ #: lib/class-testimonials-widget-settings.php:366 testimonials-widget.php:468
364
+ #: testimonials-widget.php:1541
365
  msgid "URL"
366
  msgstr ""
367
 
473
  msgid "Check this box to reset options to their defaults"
474
  msgstr ""
475
 
476
+ #: lib/class-testimonials-widget-settings.php:561
 
 
 
477
  #: lib/class-testimonials-widget-settings.php:598
478
  msgid "Testimonials Widget Settings"
479
  msgstr ""
480
 
481
+ #: lib/class-testimonials-widget-settings.php:561 testimonials-widget.php:64
482
+ msgid "Settings"
483
+ msgstr ""
484
+
485
  #: lib/class-testimonials-widget-settings.php:600
486
  msgid ""
487
  "These Testimonials Widget Settings establish the default option values for "
495
  msgid "Save Changes"
496
  msgstr ""
497
 
498
+ #: lib/class-testimonials-widget-settings.php:634
499
  msgid "Copyright &copy;%1$s %2$s."
500
  msgstr ""
501
 
502
+ #: lib/class-testimonials-widget-settings.php:994
503
  msgid "Required"
504
  msgstr ""
505
 
507
  msgid "Display testimonials with multiple selection and display options"
508
  msgstr ""
509
 
510
+ #. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.13.4) #-#-#-#-#
511
  #. Plugin Name of the plugin/theme
512
  #: lib/class-testimonials-widget-widget.php:37
513
  msgid "Testimonials Widget"
525
  msgid "Expand/Collapse"
526
  msgstr ""
527
 
528
+ #: testimonials-widget.php:256
529
  msgid ""
530
  "If your Testimonials Widget display has gone to funky town, please <a href="
531
  "\"%s\">read the FAQ</a> about possible CSS fixes."
532
  msgstr ""
533
 
534
+ #: testimonials-widget.php:265
535
  msgid ""
536
  "Please donate $2 towards development and support of this Testimonials Widget "
537
  "plugin. %s"
538
  msgstr ""
539
 
540
+ #: testimonials-widget.php:461
541
  msgid "Image"
542
  msgstr ""
543
 
544
+ #: testimonials-widget.php:463
545
  msgid "Shortcodes"
546
  msgstr ""
547
 
548
+ #: testimonials-widget.php:469
549
  msgid "Published by"
550
  msgstr ""
551
 
552
+ #: testimonials-widget.php:475 testimonials-widget.php:478
553
  msgid "Category"
554
  msgstr ""
555
 
556
+ #: testimonials-widget.php:476 testimonials-widget.php:479
557
  msgid "Tags"
558
  msgstr ""
559
 
560
+ #: testimonials-widget.php:490
561
  msgid "Add New"
562
  msgstr ""
563
 
564
+ #: testimonials-widget.php:491 testimonials-widget.php:494
565
  msgid "Add New Testimonial"
566
  msgstr ""
567
 
568
+ #: testimonials-widget.php:492
569
  msgid "Edit Testimonial"
570
  msgstr ""
571
 
572
+ #: testimonials-widget.php:495 testimonials-widget.php:827
573
  msgid "No testimonials found"
574
  msgstr ""
575
 
576
+ #: testimonials-widget.php:496
577
  msgid "No testimonials found in Trash"
578
  msgstr ""
579
 
580
+ #: testimonials-widget.php:498
581
  msgid "Search Testimonials"
582
  msgstr ""
583
 
584
+ #: testimonials-widget.php:499 testimonials-widget.php:1629
585
  msgid "Testimonial"
586
  msgstr ""
587
 
588
+ #: testimonials-widget.php:500
589
  msgid "View Testimonial"
590
  msgstr ""
591
 
592
+ #: testimonials-widget.php:938
593
  msgid "…"
594
  msgstr ""
595
 
596
+ #: testimonials-widget.php:1258
597
  msgid "&laquo;"
598
  msgstr ""
599
 
600
+ #: testimonials-widget.php:1267
601
  msgid "&raquo;"
602
  msgstr ""
603
 
604
+ #: testimonials-widget.php:1553
605
  msgid "Testimonial Data"
606
  msgstr ""
607
 
608
+ #: testimonials-widget.php:1578
609
  msgid "Enter title here"
610
  msgstr ""
611
 
612
+ #: testimonials-widget.php:1579
613
  msgid "Enter testimonial source here"
614
  msgstr ""
615
 
616
+ #: testimonials-widget.php:1604
617
  msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
618
  msgstr ""
619
 
620
+ #: testimonials-widget.php:1605
621
  msgid "Custom field updated."
622
  msgstr ""
623
 
624
+ #: testimonials-widget.php:1606
625
  msgid "Custom field deleted."
626
  msgstr ""
627
 
628
+ #: testimonials-widget.php:1607
629
  msgid "Testimonial updated."
630
  msgstr ""
631
 
632
  #. translators: %s: date and time of the revision
633
+ #: testimonials-widget.php:1609
634
  msgid "Testimonial restored to revision from %s"
635
  msgstr ""
636
 
637
+ #: testimonials-widget.php:1610
638
  msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
639
  msgstr ""
640
 
641
+ #: testimonials-widget.php:1611
642
  msgid "Testimonial saved."
643
  msgstr ""
644
 
645
+ #: testimonials-widget.php:1612
646
  msgid ""
647
  "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
648
  "a>"
649
  msgstr ""
650
 
651
+ #: testimonials-widget.php:1613
652
  msgid ""
653
  "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
654
  "\"%2$s\">Preview testimonial</a>"
655
  msgstr ""
656
 
657
+ #: testimonials-widget.php:1614
658
  msgid ""
659
  "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
660
  "testimonial</a>"
lib/class-testimonials-widget-settings.php CHANGED
@@ -49,9 +49,9 @@ class Testimonials_Widget_Settings {
49
 
50
 
51
  public function __construct() {
52
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
53
- add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
54
- add_action( 'init', array( &$this, 'init' ) );
55
  load_plugin_textdomain( 'testimonials-widget', false, '/testimonials-widget/languages/' );
56
  }
57
 
@@ -396,7 +396,7 @@ class Testimonials_Widget_Settings {
396
 
397
  $desc = __( 'URL slug-name for <a href="%1s">testimonials archive</a> page.', 'testimonials-widget' );
398
  $has_archive = tw_get_option( 'has_archive', '' );
399
- $site_url = site_url( '/' . $has_archive );
400
 
401
  self::$settings['has_archive'] = array(
402
  'section' => 'post_type',
@@ -558,10 +558,10 @@ class Testimonials_Widget_Settings {
558
 
559
 
560
  public function admin_menu() {
561
- $admin_page = add_submenu_page( 'edit.php?post_type=' . Testimonials_Widget::PT, '', esc_html__( 'Settings', 'testimonials-widget' ), 'manage_options', self::ID, array( 'Testimonials_Widget_Settings', 'display_page' ) );
562
 
563
- add_action( 'admin_print_scripts-' . $admin_page, array( &$this, 'scripts' ) );
564
- add_action( 'admin_print_styles-' . $admin_page, array( &$this, 'styles' ) );
565
  }
566
 
567
 
@@ -588,7 +588,7 @@ class Testimonials_Widget_Settings {
588
 
589
  self::$defaults[$id] = $std;
590
 
591
- add_settings_field( $id, $title, array( &$this, 'display_setting' ), self::ID, $section, $field_args );
592
  }
593
 
594
 
@@ -597,7 +597,7 @@ class Testimonials_Widget_Settings {
597
  <div class="icon32" id="icon-options-general"></div>
598
  <h2>' . esc_html__( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
599
 
600
- echo '<div class="updated"><p>' . esc_html__( 'These Testimonials Widget Settings establish the default option values for shortcodes, theme functions, and widget instances. Widgets, once created no longer inherit these global settings. Therefore, you\'ll need to update each widget with the new settings. It might be easier to delete the widget and then recreate it.', 'testimonials-widget' ) . '</p></div>';
601
 
602
  echo '<form action="options.php" method="post">';
603
 
@@ -622,10 +622,15 @@ class Testimonials_Widget_Settings {
622
  echo '
623
  <p>When ready, <a href="'.get_admin_url().'edit.php?post_type=testimonials-widget">view</a>
624
  or <a href="'.get_admin_url().'post-new.php?post_type=testimonials-widget">add</a> testimonials.</p>
625
-
626
- <p>If you like this plugin, please <a href="http://aihr.us/about-aihrus/donate/" title="Donate for Good Karma"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="Donate for Good Karma" /></a> or <a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/" title="purchase Testimonials Widget Premium">purchase Testimonials Widget Premium</a> to help fund further development and <a href="http://wordpress.org/support/plugin/testimonials-widget" title="Support forums">support</a>.</p>
627
  ';
628
 
 
 
 
 
 
 
 
629
  $text = esc_html__( 'Copyright &copy;%1$s %2$s.', 'testimonials-widget' );
630
  $link = '<a href="http://aihr.us">Aihrus</a>';
631
  echo '<p class="copyright">' . sprintf( $text, date( 'Y' ), $link ) . '</p>';
@@ -826,13 +831,13 @@ class Testimonials_Widget_Settings {
826
 
827
 
828
  public function register_settings() {
829
- register_setting( self::ID, self::ID, array( &$this, 'validate_settings' ) );
830
 
831
  foreach ( self::$sections as $slug => $title ) {
832
  if ( $slug == 'about' )
833
- add_settings_section( $slug, $title, array( &$this, 'display_about_section' ), self::ID );
834
  else
835
- add_settings_section( $slug, $title, array( &$this, 'display_section' ), self::ID );
836
  }
837
 
838
  foreach ( self::$settings as $id => $setting ) {
49
 
50
 
51
  public function __construct() {
52
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
53
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
54
+ add_action( 'init', array( $this, 'init' ) );
55
  load_plugin_textdomain( 'testimonials-widget', false, '/testimonials-widget/languages/' );
56
  }
57
 
396
 
397
  $desc = __( 'URL slug-name for <a href="%1s">testimonials archive</a> page.', 'testimonials-widget' );
398
  $has_archive = tw_get_option( 'has_archive', '' );
399
+ $site_url = site_url( '/' . $has_archive . '/' );
400
 
401
  self::$settings['has_archive'] = array(
402
  'section' => 'post_type',
558
 
559
 
560
  public function admin_menu() {
561
+ $admin_page = add_submenu_page( 'edit.php?post_type=' . Testimonials_Widget::PT, esc_html__( 'Testimonials Widget Settings', 'testimonials-widget' ), esc_html__( 'Settings', 'testimonials-widget' ), 'manage_options', self::ID, array( 'Testimonials_Widget_Settings', 'display_page' ) );
562
 
563
+ add_action( 'admin_print_scripts-' . $admin_page, array( $this, 'scripts' ) );
564
+ add_action( 'admin_print_styles-' . $admin_page, array( $this, 'styles' ) );
565
  }
566
 
567
 
588
 
589
  self::$defaults[$id] = $std;
590
 
591
+ add_settings_field( $id, $title, array( $this, 'display_setting' ), self::ID, $section, $field_args );
592
  }
593
 
594
 
597
  <div class="icon32" id="icon-options-general"></div>
598
  <h2>' . esc_html__( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
599
 
600
+ echo '<div class="notice"><p><b>' . 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' ) . '</b></p></div>';
601
 
602
  echo '<form action="options.php" method="post">';
603
 
622
  echo '
623
  <p>When ready, <a href="'.get_admin_url().'edit.php?post_type=testimonials-widget">view</a>
624
  or <a href="'.get_admin_url().'post-new.php?post_type=testimonials-widget">add</a> testimonials.</p>
 
 
625
  ';
626
 
627
+ $disable_donate = tw_get_option( 'disable_donate' );
628
+ if ( ! $disable_donate ) {
629
+ echo '
630
+ <p>If you like this plugin, please <a href="http://aihr.us/about-aihrus/donate/" title="Donate for Good Karma"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="Donate for Good Karma" /></a> or <a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/" title="purchase Testimonials Widget Premium">purchase Testimonials Widget Premium</a> to help fund further development and <a href="http://wordpress.org/support/plugin/testimonials-widget" title="Support forums">support</a>.</p>
631
+ ';
632
+ }
633
+
634
  $text = esc_html__( 'Copyright &copy;%1$s %2$s.', 'testimonials-widget' );
635
  $link = '<a href="http://aihr.us">Aihrus</a>';
636
  echo '<p class="copyright">' . sprintf( $text, date( 'Y' ), $link ) . '</p>';
831
 
832
 
833
  public function register_settings() {
834
+ register_setting( self::ID, self::ID, array( $this, 'validate_settings' ) );
835
 
836
  foreach ( self::$sections as $slug => $title ) {
837
  if ( $slug == 'about' )
838
+ add_settings_section( $slug, $title, array( $this, 'display_about_section' ), self::ID );
839
  else
840
+ add_settings_section( $slug, $title, array( $this, 'display_section' ), self::ID );
841
  }
842
 
843
  foreach ( self::$settings as $id => $setting ) {
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.13.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
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.13.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
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.3
7
  * Author: Michael Cannon
8
  * Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
9
  * License: GPLv2 or later
@@ -28,7 +28,7 @@ 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.3';
32
 
33
  private static $base = null;
34
  private static $max_num_pages = 0;
@@ -41,20 +41,22 @@ class Testimonials_Widget {
41
  public static $css_called = false;
42
  public static $donate_button = '';
43
  public static $instance_number = 0;
 
44
  public static $scripts = array();
45
  public static $scripts_called = false;
46
  public static $settings_link = '';
47
  public static $tag_close_quote = '<span class="close-quote"></span>';
48
  public static $tag_open_quote = '<span class="open-quote"></span>';
 
49
  public static $widget_number = 100000;
50
 
51
 
52
  public function __construct() {
53
- add_action( 'admin_init', array( &$this, 'admin_init' ) );
54
- add_action( 'init', array( &$this, 'init' ) );
55
- add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
56
- add_shortcode( 'testimonialswidget_list', array( &$this, 'testimonialswidget_list' ) );
57
- add_shortcode( 'testimonialswidget_widget', array( &$this, 'testimonialswidget_widget' ) );
58
  }
59
 
60
 
@@ -63,20 +65,20 @@ class Testimonials_Widget {
63
 
64
  $this->add_meta_box_testimonials_widget();
65
  $this->update();
66
- add_action( 'gettext', array( &$this, 'gettext_testimonials' ) );
67
- add_action( 'manage_' . self::PT . '_posts_custom_column', array( &$this, 'manage_posts_custom_column' ), 10, 2 );
68
- add_action( 'right_now_content_table_end', array( &$this, 'right_now_content_table_end' ) );
69
- add_filter( 'manage_' . self::PT . '_posts_columns', array( &$this, 'manage_posts_columns' ) );
70
- add_filter( 'plugin_action_links', array( &$this, 'plugin_action_links' ), 10, 2 );
71
- add_filter( 'plugin_row_meta', array( &$this, 'plugin_row_meta' ), 10, 2 );
72
- add_filter( 'post_updated_messages', array( &$this, 'post_updated_messages' ) );
73
- add_filter( 'pre_get_posts', array( &$this, 'pre_get_posts_author' ) );
74
  self::support_thumbnails();
75
  }
76
 
77
 
78
  public function init() {
79
- add_filter( 'the_content', array( &$this, 'get_single' ) );
80
  load_plugin_textdomain( self::PT, false, 'testimonials-widget/languages' );
81
  self::$base = plugin_basename( __FILE__ );
82
  self::$cpt_category = self::PT . '-category';
@@ -103,13 +105,20 @@ EOD;
103
  }
104
 
105
 
 
 
 
 
 
 
106
  public static function get_instance() {
107
- return self::$instance_number;
108
  }
109
 
110
 
111
- public static function add_instance() {
112
- self::$instance_number++;
 
113
  }
114
 
115
 
@@ -227,6 +236,10 @@ EOD;
227
  if ( $file != self::$base )
228
  return $input;
229
 
 
 
 
 
230
  $links = array(
231
  '<a href="http://aihr.us/about-aihrus/donate/"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="PayPal - The safer, easier way to pay online!" /></a>',
232
  '<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Purchase Testimonials Widget Premium</a>',
@@ -586,7 +599,7 @@ EOD;
586
 
587
  $atts['type'] = 'testimonialswidget_list';
588
 
589
- $content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
590
 
591
  if ( false === $content ) {
592
  $testimonials = self::get_testimonials( $atts );
@@ -599,16 +612,15 @@ EOD;
599
 
600
 
601
  public static function testimonialswidget_widget( $atts, $widget_number = null ) {
602
- self::add_instance();
603
- self::scripts();
604
-
605
  if ( empty( $widget_number ) ) {
606
  $widget_number = self::$widget_number++;
607
 
608
- if ( empty( $atts['random'] ) )
609
  $atts['random'] = 1;
610
  }
611
 
 
 
612
  $atts = wp_parse_args( $atts, self::get_defaults() );
613
  $atts = Testimonials_Widget_Settings::validate_settings( $atts );
614
 
@@ -616,9 +628,11 @@ EOD;
616
  $atts['type'] = 'testimonialswidget_widget';
617
  $atts['widget_number'] = $widget_number;
618
 
 
 
619
  $testimonials = self::get_testimonials( $atts );
620
 
621
- $content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
622
 
623
  if ( false === $content ) {
624
  $content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
@@ -627,7 +641,7 @@ EOD;
627
 
628
  // Generate CSS
629
  $atts['type'] = 'testimonialswidget_widget_css';
630
- $css = apply_filters( 'testimonials_widget_cache_get', false, $atts );
631
 
632
  if ( false === $css ) {
633
  $css = self::get_testimonials_html_css( $atts, $widget_number );
@@ -641,7 +655,7 @@ EOD;
641
 
642
  // Generate JS
643
  $atts['type'] = 'testimonialswidget_widget_js';
644
- $js = apply_filters( 'testimonials_widget_cache_get', false, $atts );
645
 
646
  if ( false === $js ) {
647
  $js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
@@ -657,8 +671,10 @@ EOD;
657
  }
658
 
659
 
660
- public static function scripts() {
661
  wp_enqueue_script( 'jquery' );
 
 
662
  }
663
 
664
 
@@ -748,6 +764,8 @@ function nextTestimonial{$widget_number}() {
748
  next.removeClass('display-none');
749
  next.addClass('active');
750
 
 
 
751
  if ( {$enable_animation} ) {
752
  // added padding
753
  {$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
@@ -770,7 +788,12 @@ EOF;
770
  $scripts[ $id_base ] = $javascript;
771
  }
772
 
773
- $scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
 
 
 
 
 
774
 
775
  return $scripts;
776
  }
@@ -850,13 +873,13 @@ EOF;
850
  if ( $keep_whitespace )
851
  $class .= ' whitespace';
852
 
853
- $div_open = '<div class="';
854
  if ( ! empty( $testimonial['post_id'] ) )
855
- $div_open .= join( ' ', get_post_class( $class, $testimonial['post_id'] ) );
856
  else
857
- $div_open .= 'testimonials-widget type-testimonials-widget status-publish hentry ' . $class;
858
 
859
- $div_open .= '">';
 
860
 
861
  if ( $remove_hentry )
862
  $div_open = str_replace( ' hentry', '', $div_open );
@@ -1391,7 +1414,7 @@ EOF;
1391
  $args = self::get_query_args( $atts );
1392
  $args['query'] = true;
1393
 
1394
- $testimonials = apply_filters( 'testimonials_widget_cache_get', false, $args );
1395
 
1396
  if ( false === $testimonials ) {
1397
  $testimonials = new WP_Query( $args );
@@ -1448,7 +1471,7 @@ EOF;
1448
  $testimonial_data[] = $data;
1449
  }
1450
 
1451
- $testimonial_data = apply_filters( 'testimonials_widget_data', $testimonial_data );
1452
 
1453
  return $testimonial_data;
1454
  }
@@ -1546,7 +1569,7 @@ EOF;
1546
  * @return string $translation
1547
  */
1548
  public function gettext_testimonials( $translation ) {
1549
- remove_action( 'gettext', array( &$this, 'gettext_testimonials' ) );
1550
 
1551
  global $post;
1552
 
@@ -1558,7 +1581,7 @@ EOF;
1558
  }
1559
  }
1560
 
1561
- add_action( 'gettext', array( &$this, 'gettext_testimonials' ) );
1562
 
1563
  return $translation;
1564
  }
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.4
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.13.4';
32
 
33
  private static $base = null;
34
  private static $max_num_pages = 0;
41
  public static $css_called = false;
42
  public static $donate_button = '';
43
  public static $instance_number = 0;
44
+ public static $instance_widget = 0;
45
  public static $scripts = array();
46
  public static $scripts_called = false;
47
  public static $settings_link = '';
48
  public static $tag_close_quote = '<span class="close-quote"></span>';
49
  public static $tag_open_quote = '<span class="open-quote"></span>';
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' ) );
56
+ add_action( 'init', array( $this, 'init' ) );
57
+ add_action( 'widgets_init', array( $this, 'widgets_init' ) );
58
+ add_shortcode( 'testimonialswidget_list', array( $this, 'testimonialswidget_list' ) );
59
+ add_shortcode( 'testimonialswidget_widget', array( $this, 'testimonialswidget_widget' ) );
60
  }
61
 
62
 
65
 
66
  $this->add_meta_box_testimonials_widget();
67
  $this->update();
68
+ add_action( 'gettext', array( $this, 'gettext_testimonials' ) );
69
+ add_action( 'manage_' . self::PT . '_posts_custom_column', array( $this, 'manage_posts_custom_column' ), 10, 2 );
70
+ add_action( 'right_now_content_table_end', array( $this, 'right_now_content_table_end' ) );
71
+ add_filter( 'manage_' . self::PT . '_posts_columns', array( $this, 'manage_posts_columns' ) );
72
+ add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
73
+ add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
74
+ add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
75
+ add_filter( 'pre_get_posts', array( $this, 'pre_get_posts_author' ) );
76
  self::support_thumbnails();
77
  }
78
 
79
 
80
  public function init() {
81
+ add_filter( 'the_content', array( $this, 'get_single' ) );
82
  load_plugin_textdomain( self::PT, false, 'testimonials-widget/languages' );
83
  self::$base = plugin_basename( __FILE__ );
84
  self::$cpt_category = self::PT . '-category';
105
  }
106
 
107
 
108
+ public static function add_instance() {
109
+ self::$use_instance = false;
110
+ self::$instance_number++;
111
+ }
112
+
113
+
114
  public static function get_instance() {
115
+ return self::$use_instance ? self::$instance_number : self::$instance_widget;
116
  }
117
 
118
 
119
+ public static function set_instance( $widget_number ) {
120
+ self::$use_instance = true;
121
+ self::$instance_widget = $widget_number;
122
  }
123
 
124
 
236
  if ( $file != self::$base )
237
  return $input;
238
 
239
+ $disable_donate = tw_get_option( 'disable_donate' );
240
+ if ( $disable_donate )
241
+ return;
242
+
243
  $links = array(
244
  '<a href="http://aihr.us/about-aihrus/donate/"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="PayPal - The safer, easier way to pay online!" /></a>',
245
  '<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Purchase Testimonials Widget Premium</a>',
599
 
600
  $atts['type'] = 'testimonialswidget_list';
601
 
602
+ $content = apply_filters( 'testimonials_widget_cache_get', $atts );
603
 
604
  if ( false === $content ) {
605
  $testimonials = self::get_testimonials( $atts );
612
 
613
 
614
  public static function testimonialswidget_widget( $atts, $widget_number = null ) {
 
 
 
615
  if ( empty( $widget_number ) ) {
616
  $widget_number = self::$widget_number++;
617
 
618
+ if ( ! isset( $atts['random'] ) )
619
  $atts['random'] = 1;
620
  }
621
 
622
+ self::set_instance( $widget_number );
623
+
624
  $atts = wp_parse_args( $atts, self::get_defaults() );
625
  $atts = Testimonials_Widget_Settings::validate_settings( $atts );
626
 
628
  $atts['type'] = 'testimonialswidget_widget';
629
  $atts['widget_number'] = $widget_number;
630
 
631
+ self::scripts( $atts );
632
+
633
  $testimonials = self::get_testimonials( $atts );
634
 
635
+ $content = apply_filters( 'testimonials_widget_cache_get', $atts );
636
 
637
  if ( false === $content ) {
638
  $content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
641
 
642
  // Generate CSS
643
  $atts['type'] = 'testimonialswidget_widget_css';
644
+ $css = apply_filters( 'testimonials_widget_cache_get', $atts );
645
 
646
  if ( false === $css ) {
647
  $css = self::get_testimonials_html_css( $atts, $widget_number );
655
 
656
  // Generate JS
657
  $atts['type'] = 'testimonialswidget_widget_js';
658
+ $js = apply_filters( 'testimonials_widget_cache_get', $atts );
659
 
660
  if ( false === $js ) {
661
  $js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
671
  }
672
 
673
 
674
+ public static function scripts( $atts ) {
675
  wp_enqueue_script( 'jquery' );
676
+
677
+ do_action( 'testimonials_widget_scripts', $atts );
678
  }
679
 
680
 
764
  next.removeClass('display-none');
765
  next.addClass('active');
766
 
767
+ {INTERNAL_SCRIPTS}
768
+
769
  if ( {$enable_animation} ) {
770
  // added padding
771
  {$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
788
  $scripts[ $id_base ] = $javascript;
789
  }
790
 
791
+ $scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
792
+ $scripts_internal = apply_filters( 'testimonials_widget_testimonials_js_internal', array(), $testimonials, $atts, $widget_number );
793
+ $internal_scripts = implode( "\n", $scripts_internal );
794
+ $scripts = str_replace( '{INTERNAL_SCRIPTS}', $internal_scripts, $scripts );
795
+
796
+ ksort( $scripts );
797
 
798
  return $scripts;
799
  }
873
  if ( $keep_whitespace )
874
  $class .= ' whitespace';
875
 
 
876
  if ( ! empty( $testimonial['post_id'] ) )
877
+ $class = join( ' ', get_post_class( $class, $testimonial['post_id'] ) );
878
  else
879
+ $class = 'testimonials-widget type-testimonials-widget status-publish hentry ' . $class;
880
 
881
+ $class = apply_filters( 'testimonials_widget_get_testimonial_html_class', $class, $testimonial, $atts, $is_list, $is_first, $widget_number );
882
+ $div_open = '<div class="' . $class . '">';
883
 
884
  if ( $remove_hentry )
885
  $div_open = str_replace( ' hentry', '', $div_open );
1414
  $args = self::get_query_args( $atts );
1415
  $args['query'] = true;
1416
 
1417
+ $testimonials = apply_filters( 'testimonials_widget_cache_get', $args );
1418
 
1419
  if ( false === $testimonials ) {
1420
  $testimonials = new WP_Query( $args );
1471
  $testimonial_data[] = $data;
1472
  }
1473
 
1474
+ $testimonial_data = apply_filters( 'testimonials_widget_data', $testimonial_data, $atts );
1475
 
1476
  return $testimonial_data;
1477
  }
1569
  * @return string $translation
1570
  */
1571
  public function gettext_testimonials( $translation ) {
1572
+ remove_action( 'gettext', array( $this, 'gettext_testimonials' ) );
1573
 
1574
  global $post;
1575
 
1581
  }
1582
  }
1583
 
1584
+ add_action( 'gettext', array( $this, 'gettext_testimonials' ) );
1585
 
1586
  return $translation;
1587
  }