Version Description
= 2.12.0 =
- CSS and JavaScript renaming
-
bottom_text
renamed tobottom-text
-
close_quote
renamed toclose-quote
-
display_none
renamed todisplay-none
-
join_location
renamed tojoin-location
-
join_title
renamed tojoin-title
-
open_quote
renamed toopen-quote
-
testimonialswidget_testimonial
renamed totestimonials-widget-testimonial
-
testimonialswidget_testimonials
renamed totestimonials-widget-testimonials
-
= 2.11.3 =
- Correct filter name
testimonials_widget_next_posts_link
totestimonials_widget_next_posts_link_text
= 2.11.0 =
- CSS class names are simplified. For the most part, other than
testimonialswidget_testimonial
removetestimonialswidget_
from the CSS class name in your CSS customizations.- Ex:
.testimonialswidget_join
becomes.join
- Ex:
.testimonialswidget_author
becomes.author
- Ex:
- Testimonials are now formatted using
blockquote
thanq
for HTML5 compliance. If you needq
tag formatting, enable it at WP Admin > Testimonials > Settings, Compatibility & Reset tab-
cite
is nowdiv.credit
-
= 2.8.0 =
- Deprecated
-
hide_author
nowhide_source
-
- Removed filters
testimonials_widget_options_update
,testimonials_widget_options_form
- Use
testimonials_widget_validate_settings
andtestimonials_widget_settings
instead
- Use
- Renamed variable and related class
widget_text
tobottom_text
= 2.7.3 =
- Quotes are no longer handled via
q
,p:before
, orp:after
CSS. It's handled via.testimonialswidget_testimonial .testimonialswidget_open_quote:before
and.testimonialswidget_testimonial .testimonialswidget_close_quote:after
- This change was made to keep consistency in how quotes were managed and to reduce the number of exception cases. In the end, this is simpler.
= 2.7.0 =
- Quotes with
keep_whitespace=true
aren't applied via CSS.testimonialswidget_testimonial q
tag anymore, but.testimonialswidget_testimonial q p:first-child:before
and.testimonialswidget_testimonial q p:last-child:after
- Widget testimonial
p
tags are no longer CSSdisplay: inline
,display: block
as expected
= 2.4.1 =
- Paging is on by default, except for widgets
= 2.0.0 =
- CSS
- Class
testimonialswidget_company
replacestestimonialswidget_source
- Class
testimonialswidget_source
replacestestimonialswidget_author
- The tighten widget display up, p tags within q are displayed inline.
- Class
- JavaScript
- The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires
wp_footer()
in the footer.
- The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires
- Shortcode options
-
hide_source
replaced byhide_url
-
hide_author
replaced byhide_source
-
- Testimonials
- Migration from the old custom table to new custom post type is automatically done. Import might take a few moments to complete.
- Company, URL and email details are attempted to be identified and placed properly based upon the original author and source fields. The company is "guessed" from the
author
field when there's a ", " or " of " context. If thesource
is an email, it's saved as such. Otherwise, it's assumed to be a URL. - Public testimonials are saved as Published. Non-public testimonials are marked as Private.
- Widget options
- "Show author" and "Show source" options are replaced by "Hide source" and "Hide URL" respectively. There's no backwards compatibility for these changes.
- Default
min-height
is now 250px than 150px.
Download this release
Release Info
Developer | comprock |
Plugin | Testimonials Widget |
Version | 2.12.6 |
Comparing to | |
See all releases |
Code changes from version 2.12.5 to 2.12.6
- changelog.txt +10 -0
- languages/testimonials-widget.pot +61 -52
- lib/class-settings-testimonials-widget.php +18 -25
- phpcs.ruleset.xml +1 -0
- phpmd.ruleset.xml +1 -4
- readme.txt +9 -4
- testimonials-widget.php +69 -68
changelog.txt
CHANGED
@@ -4,6 +4,16 @@
|
|
4 |
|
5 |
= trunk =
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
= 2.12.5 =
|
8 |
* BUGFIX Correct loose vs strict comparison for intval and absint
|
9 |
* If no refresh_interval, then LIMIT 1
|
4 |
|
5 |
= trunk =
|
6 |
|
7 |
+
= 2.12.6 =
|
8 |
+
* BUGFIX If no refresh_interval, then LIMIT 1
|
9 |
+
* Change donate from $1 to $2 due to fees
|
10 |
+
* Dashboard testimonials count statistics
|
11 |
+
* Display donate on major/minor version release or if it's been a month
|
12 |
+
* Remove braces from simple if/else structures
|
13 |
+
* Settings page inheritance note
|
14 |
+
* Update premium features listing
|
15 |
+
* Use donate button than text
|
16 |
+
|
17 |
= 2.12.5 =
|
18 |
* BUGFIX Correct loose vs strict comparison for intval and absint
|
19 |
* If no refresh_interval, then LIMIT 1
|
languages/testimonials-widget.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Testimonials Widget 2.12.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
-
"POT-Creation-Date: 2013-05-
|
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-settings-testimonials-widget.php:86 testimonials-widget.php:
|
48 |
-
#: testimonials-widget.php:
|
49 |
msgid "Testimonials"
|
50 |
msgstr ""
|
51 |
|
@@ -290,7 +290,7 @@ msgstr ""
|
|
290 |
msgid "Author"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: lib/class-settings-testimonials-widget.php:330 testimonials-widget.php:
|
294 |
msgid "Date"
|
295 |
msgstr ""
|
296 |
|
@@ -298,7 +298,7 @@ msgstr ""
|
|
298 |
msgid "Menu Order"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: lib/class-settings-testimonials-widget.php:332 testimonials-widget.php:
|
302 |
msgid "Source"
|
303 |
msgstr ""
|
304 |
|
@@ -320,28 +320,28 @@ msgstr ""
|
|
320 |
msgid "None"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: lib/class-settings-testimonials-widget.php:346 testimonials-widget.php:
|
324 |
-
#: testimonials-widget.php:
|
325 |
msgid "Title"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: lib/class-settings-testimonials-widget.php:347 testimonials-widget.php:
|
329 |
-
#: testimonials-widget.php:
|
330 |
msgid "Email"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: lib/class-settings-testimonials-widget.php:348 testimonials-widget.php:
|
334 |
-
#: testimonials-widget.php:
|
335 |
msgid "Location"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: lib/class-settings-testimonials-widget.php:349 testimonials-widget.php:
|
339 |
-
#: testimonials-widget.php:
|
340 |
msgid "Company"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: lib/class-settings-testimonials-widget.php:350 testimonials-widget.php:
|
344 |
-
#: testimonials-widget.php:
|
345 |
msgid "URL"
|
346 |
msgstr ""
|
347 |
|
@@ -462,15 +462,24 @@ msgstr ""
|
|
462 |
msgid "Settings"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: lib/class-settings-testimonials-widget.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
msgid "Save Changes"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: lib/class-settings-testimonials-widget.php:
|
470 |
msgid "Copyright ©%1$s %2$s."
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: lib/class-settings-testimonials-widget.php:
|
474 |
msgid "Required"
|
475 |
msgstr ""
|
476 |
|
@@ -478,7 +487,7 @@ msgstr ""
|
|
478 |
msgid "Display testimonials with multiple selection and display options"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.12.
|
482 |
#. Plugin Name of the plugin/theme
|
483 |
#: lib/class-testimonials-widget-widget.php:37
|
484 |
msgid "Testimonials Widget"
|
@@ -496,136 +505,136 @@ msgstr ""
|
|
496 |
msgid "Expand/Collapse"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: testimonials-widget.php:
|
500 |
msgid ""
|
501 |
"If your Testimonials Widget display has gone to funky town, please <a href="
|
502 |
"\"%s\">read the FAQ</a> about possible CSS fixes."
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: testimonials-widget.php:
|
506 |
msgid ""
|
507 |
-
"Please donate $
|
508 |
"maintained %s"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: testimonials-widget.php:
|
512 |
msgid "Image"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: testimonials-widget.php:
|
516 |
msgid "Shortcodes"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: testimonials-widget.php:
|
520 |
msgid "Published by"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: testimonials-widget.php:
|
524 |
msgid "Category"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: testimonials-widget.php:
|
528 |
msgid "Tags"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: testimonials-widget.php:
|
532 |
msgid "Add New"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: testimonials-widget.php:
|
536 |
msgid "Add New Testimonial"
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: testimonials-widget.php:
|
540 |
msgid "Edit Testimonial"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: testimonials-widget.php:
|
544 |
msgid "No testimonials found"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: testimonials-widget.php:
|
548 |
msgid "No testimonials found in Trash"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: testimonials-widget.php:
|
552 |
msgid "Search Testimonials"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: testimonials-widget.php:
|
556 |
msgid "Testimonial"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: testimonials-widget.php:
|
560 |
msgid "View Testimonial"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: testimonials-widget.php:
|
564 |
msgid "…"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: testimonials-widget.php:
|
568 |
msgid "«"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: testimonials-widget.php:
|
572 |
msgid "»"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: testimonials-widget.php:
|
576 |
msgid "Testimonial Data"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: testimonials-widget.php:
|
580 |
msgid "Enter title here"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: testimonials-widget.php:
|
584 |
msgid "Enter testimonial source here"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: testimonials-widget.php:
|
588 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: testimonials-widget.php:
|
592 |
msgid "Custom field updated."
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: testimonials-widget.php:
|
596 |
msgid "Custom field deleted."
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: testimonials-widget.php:
|
600 |
msgid "Testimonial updated."
|
601 |
msgstr ""
|
602 |
|
603 |
#. translators: %s: date and time of the revision
|
604 |
-
#: testimonials-widget.php:
|
605 |
msgid "Testimonial restored to revision from %s"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: testimonials-widget.php:
|
609 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: testimonials-widget.php:
|
613 |
msgid "Testimonial saved."
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: testimonials-widget.php:
|
617 |
msgid ""
|
618 |
"Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
|
619 |
"a>"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: testimonials-widget.php:
|
623 |
msgid ""
|
624 |
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
625 |
"\"%2$s\">Preview testimonial</a>"
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: testimonials-widget.php:
|
629 |
msgid ""
|
630 |
"Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
|
631 |
"testimonial</a>"
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Testimonials Widget 2.12.6\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2013-05-19 00:54:29+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-settings-testimonials-widget.php:86 testimonials-widget.php:493
|
48 |
+
#: testimonials-widget.php:538
|
49 |
msgid "Testimonials"
|
50 |
msgstr ""
|
51 |
|
290 |
msgid "Author"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: lib/class-settings-testimonials-widget.php:330 testimonials-widget.php:479
|
294 |
msgid "Date"
|
295 |
msgstr ""
|
296 |
|
298 |
msgid "Menu Order"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: lib/class-settings-testimonials-widget.php:332 testimonials-widget.php:469
|
302 |
msgid "Source"
|
303 |
msgstr ""
|
304 |
|
320 |
msgid "None"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: lib/class-settings-testimonials-widget.php:346 testimonials-widget.php:471
|
324 |
+
#: testimonials-widget.php:1485
|
325 |
msgid "Title"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: lib/class-settings-testimonials-widget.php:347 testimonials-widget.php:473
|
329 |
+
#: testimonials-widget.php:1497
|
330 |
msgid "Email"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: lib/class-settings-testimonials-widget.php:348 testimonials-widget.php:472
|
334 |
+
#: testimonials-widget.php:1491
|
335 |
msgid "Location"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: lib/class-settings-testimonials-widget.php:349 testimonials-widget.php:474
|
339 |
+
#: testimonials-widget.php:1503
|
340 |
msgid "Company"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: lib/class-settings-testimonials-widget.php:350 testimonials-widget.php:475
|
344 |
+
#: testimonials-widget.php:1509
|
345 |
msgid "URL"
|
346 |
msgstr ""
|
347 |
|
462 |
msgid "Settings"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: lib/class-settings-testimonials-widget.php:584
|
466 |
+
msgid ""
|
467 |
+
"These Testimonials Widget Settings establish the default option values for "
|
468 |
+
"shortcodes, theme functions, and widget instances. Widgets, once created no "
|
469 |
+
"longer inherit these global settings. Therefore, you'll need to update each "
|
470 |
+
"widget with the new settings. It might be easier to delete the widget and "
|
471 |
+
"then recreate it."
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: lib/class-settings-testimonials-widget.php:601
|
475 |
msgid "Save Changes"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: lib/class-settings-testimonials-widget.php:613
|
479 |
msgid "Copyright ©%1$s %2$s."
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: lib/class-settings-testimonials-widget.php:969
|
483 |
msgid "Required"
|
484 |
msgstr ""
|
485 |
|
487 |
msgid "Display testimonials with multiple selection and display options"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.12.6) #-#-#-#-#
|
491 |
#. Plugin Name of the plugin/theme
|
492 |
#: lib/class-testimonials-widget-widget.php:37
|
493 |
msgid "Testimonials Widget"
|
505 |
msgid "Expand/Collapse"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: testimonials-widget.php:271
|
509 |
msgid ""
|
510 |
"If your Testimonials Widget display has gone to funky town, please <a href="
|
511 |
"\"%s\">read the FAQ</a> about possible CSS fixes."
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: testimonials-widget.php:280
|
515 |
msgid ""
|
516 |
+
"Please donate $2 towards keeping Testimonials Widget plugin supported and "
|
517 |
"maintained %s"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: testimonials-widget.php:468
|
521 |
msgid "Image"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: testimonials-widget.php:470
|
525 |
msgid "Shortcodes"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: testimonials-widget.php:476
|
529 |
msgid "Published by"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: testimonials-widget.php:477
|
533 |
msgid "Category"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: testimonials-widget.php:478
|
537 |
msgid "Tags"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: testimonials-widget.php:490
|
541 |
msgid "Add New"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: testimonials-widget.php:491 testimonials-widget.php:494
|
545 |
msgid "Add New Testimonial"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: testimonials-widget.php:492
|
549 |
msgid "Edit Testimonial"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: testimonials-widget.php:495 testimonials-widget.php:792
|
553 |
msgid "No testimonials found"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: testimonials-widget.php:496
|
557 |
msgid "No testimonials found in Trash"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: testimonials-widget.php:498
|
561 |
msgid "Search Testimonials"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: testimonials-widget.php:499 testimonials-widget.php:1597
|
565 |
msgid "Testimonial"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: testimonials-widget.php:500
|
569 |
msgid "View Testimonial"
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: testimonials-widget.php:904
|
573 |
msgid "…"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: testimonials-widget.php:1223
|
577 |
msgid "«"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: testimonials-widget.php:1232
|
581 |
msgid "»"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: testimonials-widget.php:1521
|
585 |
msgid "Testimonial Data"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: testimonials-widget.php:1546
|
589 |
msgid "Enter title here"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: testimonials-widget.php:1547
|
593 |
msgid "Enter testimonial source here"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: testimonials-widget.php:1572
|
597 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: testimonials-widget.php:1573
|
601 |
msgid "Custom field updated."
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: testimonials-widget.php:1574
|
605 |
msgid "Custom field deleted."
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: testimonials-widget.php:1575
|
609 |
msgid "Testimonial updated."
|
610 |
msgstr ""
|
611 |
|
612 |
#. translators: %s: date and time of the revision
|
613 |
+
#: testimonials-widget.php:1577
|
614 |
msgid "Testimonial restored to revision from %s"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: testimonials-widget.php:1578
|
618 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: testimonials-widget.php:1579
|
622 |
msgid "Testimonial saved."
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: testimonials-widget.php:1580
|
626 |
msgid ""
|
627 |
"Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
|
628 |
"a>"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: testimonials-widget.php:1581
|
632 |
msgid ""
|
633 |
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
634 |
"\"%2$s\">Preview testimonial</a>"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: testimonials-widget.php:1582
|
638 |
msgid ""
|
639 |
"Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
|
640 |
"testimonial</a>"
|
lib/class-settings-testimonials-widget.php
CHANGED
@@ -581,6 +581,8 @@ class Testimonials_Widget_Settings {
|
|
581 |
<div class="icon32" id="icon-options-general"></div>
|
582 |
<h2>' . __( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
|
583 |
|
|
|
|
|
584 |
echo '<form action="options.php" method="post">';
|
585 |
|
586 |
settings_fields( self::ID );
|
@@ -606,7 +608,7 @@ class Testimonials_Widget_Settings {
|
|
606 |
or <a href="'.get_admin_url().'post-new.php?post_type=testimonials-widget">add</a> testimonials.</p>
|
607 |
|
608 |
<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>
|
609 |
-
|
610 |
|
611 |
$text = __( 'Copyright ©%1$s %2$s.', 'testimonials-widget' );
|
612 |
$link = '<a href="http://aihr.us">Aihrus</a>';
|
@@ -657,14 +659,11 @@ class Testimonials_Widget_Settings {
|
|
657 |
}
|
658 |
|
659 |
|
660 |
-
public function display_section() {
|
661 |
-
// code
|
662 |
-
}
|
663 |
|
664 |
|
665 |
public function display_about_section() {
|
666 |
-
|
667 |
-
echo <<<EOD
|
668 |
<div id="about" style="width: 70%; min-height: 225px;">
|
669 |
<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>
|
670 |
</div>
|
@@ -692,9 +691,8 @@ EOD;
|
|
692 |
}
|
693 |
|
694 |
$field_class = '';
|
695 |
-
if ( ! empty( $class ) )
|
696 |
$field_class = ' ' . $class;
|
697 |
-
}
|
698 |
|
699 |
switch ( $type ) {
|
700 |
case 'checkbox':
|
@@ -788,11 +786,10 @@ EOD;
|
|
788 |
break;
|
789 |
}
|
790 |
|
791 |
-
if ( $do_echo )
|
792 |
echo $content;
|
793 |
-
|
794 |
return $content;
|
795 |
-
}
|
796 |
}
|
797 |
|
798 |
|
@@ -874,11 +871,10 @@ EOD;
|
|
874 |
$validations = explode( ',', $validations );
|
875 |
|
876 |
if ( ! isset( $input[ $id ] ) ) {
|
877 |
-
if ( 'checkbox' != $type )
|
878 |
$input[ $id ] = $default;
|
879 |
-
|
880 |
$input[ $id ] = 0;
|
881 |
-
}
|
882 |
}
|
883 |
|
884 |
if ( $default == $input[ $id ] && ! in_array( 'required', $validations ) )
|
@@ -908,20 +904,19 @@ EOD;
|
|
908 |
}
|
909 |
|
910 |
// same has_archive and rewrite_slug causes problems
|
911 |
-
if ( $input['has_archive'] == $input['rewrite_slug'] )
|
912 |
$input['rewrite_slug'] = $defaults['rewrite_slug'];
|
913 |
-
}
|
914 |
|
915 |
// did URL slugs change?
|
916 |
$has_archive = tw_get_option( 'has_archive' );
|
917 |
$rewrite_slug = tw_get_option( 'rewrite_slug' );
|
918 |
-
if ( $has_archive != $input['has_archive'] || $rewrite_slug != $input['rewrite_slug'] )
|
919 |
flush_rewrite_rules();
|
920 |
-
}
|
921 |
|
922 |
-
$input['version']
|
923 |
-
$input['donate_version']
|
924 |
-
$input
|
|
|
925 |
|
926 |
unset( $input['export'] );
|
927 |
unset( $input['import'] );
|
@@ -970,9 +965,8 @@ EOD;
|
|
970 |
break;
|
971 |
|
972 |
case 'required':
|
973 |
-
if ( empty( $input[ $id ] ) )
|
974 |
$errors[ $id ] = __( 'Required', 'testimonials-widget' );
|
975 |
-
}
|
976 |
break;
|
977 |
|
978 |
case 'slug':
|
@@ -1083,9 +1077,8 @@ function tw_get_option( $option, $default = null ) {
|
|
1083 |
function tw_set_option( $option, $value = null ) {
|
1084 |
$options = get_option( Testimonials_Widget_Settings::ID );
|
1085 |
|
1086 |
-
if ( ! is_array( $options ) )
|
1087 |
$options = array();
|
1088 |
-
}
|
1089 |
|
1090 |
$options[$option] = $value;
|
1091 |
update_option( Testimonials_Widget_Settings::ID, $options );
|
581 |
<div class="icon32" id="icon-options-general"></div>
|
582 |
<h2>' . __( 'Testimonials Widget Settings', 'testimonials-widget' ) . '</h2>';
|
583 |
|
584 |
+
echo '<div class="updated"><p>' . __( 'These Testimonials Widget Settings establish the default option values for shortcodes, theme functions, and widget instances. Widgets, once created no longer inherit these global settings. Therefore, you\'ll need to update each widget with the new settings. It might be easier to delete the widget and then recreate it.', 'testimonials-widget' ) . '</p></div>';
|
585 |
+
|
586 |
echo '<form action="options.php" method="post">';
|
587 |
|
588 |
settings_fields( self::ID );
|
608 |
or <a href="'.get_admin_url().'post-new.php?post_type=testimonials-widget">add</a> testimonials.</p>
|
609 |
|
610 |
<p>If you like this plugin, please <a href="http://aihr.us/about-aihrus/donate/" title="Donate for Good Karma"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="Donate for Good Karma" /></a> or <a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/" title="purchase Testimonials Widget Premium">purchase Testimonials Widget Premium</a> to help fund further development and <a href="http://wordpress.org/support/plugin/testimonials-widget" title="Support forums">support</a>.</p>
|
611 |
+
';
|
612 |
|
613 |
$text = __( 'Copyright ©%1$s %2$s.', 'testimonials-widget' );
|
614 |
$link = '<a href="http://aihr.us">Aihrus</a>';
|
659 |
}
|
660 |
|
661 |
|
662 |
+
public function display_section() {}
|
|
|
|
|
663 |
|
664 |
|
665 |
public function display_about_section() {
|
666 |
+
echo <<<EOD
|
|
|
667 |
<div id="about" style="width: 70%; min-height: 225px;">
|
668 |
<p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="/wp-content/plugins/testimonials-widget/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="http://wordpress.org/extend/plugins/testimonials-widget/">Testimonials Widget</a> is by <a href="http://aihr.us/about-aihrus/michael-cannon-resume/">Michael Cannon</a>. He's <a title="Lot's of stuff about Peichi Liu…" href="http://peimic.com/t/peichi-liu/">Peichi’s</a> smiling man, an adventurous <a title="Water rat" href="http://www.chinesehoroscope.org/chinese_zodiac/rat/" target="_blank">water-rat</a>, <a title="Axelerant – Open Source. Engineered." href="http://axelerant.com/who-we-are">chief people officer</a>, <a title="Aihrus – website support made easy since 1999" href="http://aihr.us/about-aihrus/">chief technology officer</a>, <a title="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>, <a title="Michael's poetic like literary ramblings" href="http://peimic.com/t/poetry/">poet</a>, <a title="World Wide Opportunities on Organic Farms" href="http://peimic.com/t/WWOOF/">WWOOF’er</a> and <a title="My traveled to country list, is more than my age." href="http://peimic.com/c/travel/">world traveler</a>.</p>
|
669 |
</div>
|
691 |
}
|
692 |
|
693 |
$field_class = '';
|
694 |
+
if ( ! empty( $class ) )
|
695 |
$field_class = ' ' . $class;
|
|
|
696 |
|
697 |
switch ( $type ) {
|
698 |
case 'checkbox':
|
786 |
break;
|
787 |
}
|
788 |
|
789 |
+
if ( $do_echo )
|
790 |
echo $content;
|
791 |
+
else
|
792 |
return $content;
|
|
|
793 |
}
|
794 |
|
795 |
|
871 |
$validations = explode( ',', $validations );
|
872 |
|
873 |
if ( ! isset( $input[ $id ] ) ) {
|
874 |
+
if ( 'checkbox' != $type )
|
875 |
$input[ $id ] = $default;
|
876 |
+
else
|
877 |
$input[ $id ] = 0;
|
|
|
878 |
}
|
879 |
|
880 |
if ( $default == $input[ $id ] && ! in_array( 'required', $validations ) )
|
904 |
}
|
905 |
|
906 |
// same has_archive and rewrite_slug causes problems
|
907 |
+
if ( $input['has_archive'] == $input['rewrite_slug'] )
|
908 |
$input['rewrite_slug'] = $defaults['rewrite_slug'];
|
|
|
909 |
|
910 |
// did URL slugs change?
|
911 |
$has_archive = tw_get_option( 'has_archive' );
|
912 |
$rewrite_slug = tw_get_option( 'rewrite_slug' );
|
913 |
+
if ( $has_archive != $input['has_archive'] || $rewrite_slug != $input['rewrite_slug'] )
|
914 |
flush_rewrite_rules();
|
|
|
915 |
|
916 |
+
$input['version'] = self::$version;
|
917 |
+
$input['donate_version'] = Testimonials_Widget::VERSION;
|
918 |
+
$input['donate_date_display'] = tw_get_option( 'donate_date_display', 0 );
|
919 |
+
$input = apply_filters( 'testimonials_widget_validate_settings', $input, $errors );
|
920 |
|
921 |
unset( $input['export'] );
|
922 |
unset( $input['import'] );
|
965 |
break;
|
966 |
|
967 |
case 'required':
|
968 |
+
if ( empty( $input[ $id ] ) )
|
969 |
$errors[ $id ] = __( 'Required', 'testimonials-widget' );
|
|
|
970 |
break;
|
971 |
|
972 |
case 'slug':
|
1077 |
function tw_set_option( $option, $value = null ) {
|
1078 |
$options = get_option( Testimonials_Widget_Settings::ID );
|
1079 |
|
1080 |
+
if ( ! is_array( $options ) )
|
1081 |
$options = array();
|
|
|
1082 |
|
1083 |
$options[$option] = $value;
|
1084 |
update_option( Testimonials_Widget_Settings::ID, $options );
|
phpcs.ruleset.xml
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
</description>
|
6 |
|
7 |
<exclude-pattern>lib/class-redrokk-metabox-class.php</exclude-pattern>
|
|
|
8 |
|
9 |
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
10 |
|
5 |
</description>
|
6 |
|
7 |
<exclude-pattern>lib/class-redrokk-metabox-class.php</exclude-pattern>
|
8 |
+
<exclude-pattern>lib/Akismet.class.php</exclude-pattern>
|
9 |
|
10 |
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
11 |
|
phpmd.ruleset.xml
CHANGED
@@ -1,15 +1,12 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<ruleset name="Aihrus"
|
3 |
-
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
5 |
-
xsi:schemaLocation="http://pmd.sf.net/
|
6 |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
7 |
<description>
|
8 |
Custom phpmd rules to check for Aihrus' WordPress projects
|
9 |
</description>
|
10 |
|
11 |
-
<exclude-pattern>lib/class-redrokk-metabox-class.php</exclude-pattern>
|
12 |
-
|
13 |
<!-- @ref http://phpmd.org/documentation/creating-a-ruleset.html -->
|
14 |
|
15 |
<!--
|
1 |
<?xml version="1.0"?>
|
2 |
<ruleset name="Aihrus"
|
|
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
+
xsi:schemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
|
5 |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
6 |
<description>
|
7 |
Custom phpmd rules to check for Aihrus' WordPress projects
|
8 |
</description>
|
9 |
|
|
|
|
|
10 |
<!-- @ref http://phpmd.org/documentation/creating-a-ruleset.html -->
|
11 |
|
12 |
<!--
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://aihr.us/about-aihrus/donate/
|
|
5 |
Tags: client, customer, quotations, quote, quotes, random, review, quote, recommendation, reference, testimonial, testimonials, testimony, widget, wpml
|
6 |
Requires at least: 3.4
|
7 |
Tested up to: 3.6.0
|
8 |
-
Stable tag: 2.12.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -43,9 +43,9 @@ The single testimonial view supports image, source, title, location, email, comp
|
|
43 |
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.
|
44 |
|
45 |
* "Read more" link column on testimonial posts admin page
|
|
|
46 |
* Alternate destinations for "Read more" links
|
47 |
* Alternating `.even` and `.odd` CSS classes for styling testimonial list entries
|
48 |
-
* Auto flush URLs cache if archive or testimonial slugs change
|
49 |
* Built-in update notification
|
50 |
* Caching of testimonials queries and content to decrease server load time improve page loading speed by 1/10 to 1/2 a second
|
51 |
* Deactivates self if no active or incorrect version of Testimonials Widget plugin
|
@@ -56,19 +56,21 @@ Testimonials Widget Premium plugin extends the best [Testimonials Widget](http:/
|
|
56 |
* Excerpts for widget view, with read more link to complete testimonial
|
57 |
* Filters for caching and more link control, text replacement, and more
|
58 |
* Front-end entry form for user supplied testimonials. [Live demo](http://aihr.us/about-aihrus/testimonials/add-testimonial/)
|
|
|
|
|
59 |
* Plugin version tracking to ensure compatibility
|
60 |
* Premium tab on settings screen for site-wide option defaults
|
61 |
* Prevent duplicate testimonials when using multiple testimonial instances
|
62 |
-
* Prevents same has_archive and rewrite_slug which causes URL problems
|
63 |
* Read more links for testimonials exceeding the character limit
|
|
|
64 |
* Select only testimonials with excerpts, images or of arbitrary maximum and minimum length
|
65 |
* Select post, page and other custom post types for content rotations
|
66 |
* Settings and URL based cache clearing
|
67 |
* Shortcodes and theme functions for testimonials count and testimonial link list
|
|
|
68 |
* Show excerpts with list and single views
|
69 |
* Show unique testimonials on page with multiple testimonial instances
|
70 |
* Testimonial links listing with image, source, title, location, company, and URL fields
|
71 |
-
* Shortcodes, theme functions, and widget user testimonial submission form
|
72 |
* WPML compatible
|
73 |
|
74 |
[Buy Testimonials Widget Premium](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/) plugin for WordPress.
|
@@ -356,6 +358,7 @@ Please visit the [Testimonials Widget Knowledge Base](https://aihrus.zendesk.com
|
|
356 |
15. Testimonials Widget Settings > Post Type tab
|
357 |
16. Testimonials Widget Settings > Widget tab
|
358 |
17. Testimonials Widget Settings > Compatibility & Reset tab
|
|
|
359 |
|
360 |
|
361 |
== Changelog ==
|
@@ -443,3 +446,5 @@ Beta testers benefit directly with latest versions, free access to Testimonials
|
|
443 |
== TODO ==
|
444 |
|
445 |
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/).
|
|
|
|
5 |
Tags: client, customer, quotations, quote, quotes, random, review, quote, recommendation, reference, testimonial, testimonials, testimony, widget, wpml
|
6 |
Requires at least: 3.4
|
7 |
Tested up to: 3.6.0
|
8 |
+
Stable tag: 2.12.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
43 |
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.
|
44 |
|
45 |
* "Read more" link column on testimonial posts admin page
|
46 |
+
* Akismet anti-spam checking
|
47 |
* Alternate destinations for "Read more" links
|
48 |
* Alternating `.even` and `.odd` CSS classes for styling testimonial list entries
|
|
|
49 |
* Built-in update notification
|
50 |
* Caching of testimonials queries and content to decrease server load time improve page loading speed by 1/10 to 1/2 a second
|
51 |
* Deactivates self if no active or incorrect version of Testimonials Widget plugin
|
56 |
* Excerpts for widget view, with read more link to complete testimonial
|
57 |
* Filters for caching and more link control, text replacement, and more
|
58 |
* Front-end entry form for user supplied testimonials. [Live demo](http://aihr.us/about-aihrus/testimonials/add-testimonial/)
|
59 |
+
* Multiple anti-spam traps
|
60 |
+
* Multiple user-entry forms on same page are allowed
|
61 |
* Plugin version tracking to ensure compatibility
|
62 |
* Premium tab on settings screen for site-wide option defaults
|
63 |
* Prevent duplicate testimonials when using multiple testimonial instances
|
|
|
64 |
* Read more links for testimonials exceeding the character limit
|
65 |
+
* Right Now Dashboard widget displays "Pending Testimonials" counts
|
66 |
* Select only testimonials with excerpts, images or of arbitrary maximum and minimum length
|
67 |
* Select post, page and other custom post types for content rotations
|
68 |
* Settings and URL based cache clearing
|
69 |
* Shortcodes and theme functions for testimonials count and testimonial link list
|
70 |
+
* Shortcodes, theme functions, and widget user testimonial submission form
|
71 |
* Show excerpts with list and single views
|
72 |
* Show unique testimonials on page with multiple testimonial instances
|
73 |
* Testimonial links listing with image, source, title, location, company, and URL fields
|
|
|
74 |
* WPML compatible
|
75 |
|
76 |
[Buy Testimonials Widget Premium](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/) plugin for WordPress.
|
358 |
15. Testimonials Widget Settings > Post Type tab
|
359 |
16. Testimonials Widget Settings > Widget tab
|
360 |
17. Testimonials Widget Settings > Compatibility & Reset tab
|
361 |
+
18. Dashboard > Right Now "Testimonials" count
|
362 |
|
363 |
|
364 |
== Changelog ==
|
446 |
== TODO ==
|
447 |
|
448 |
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/).
|
449 |
+
|
450 |
+
* BUG [IE8 + Google Font Issue](http://wordpress.org/support/topic/ie8-google-font-issue)
|
testimonials-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Testimonials Widget
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/testimonials-widget/
|
5 |
* Description: Testimonials Widget plugin allows you to display random or selected portfolio, quotes, reviews, showcases, or text with images on your WordPress blog.
|
6 |
-
* Version: 2.12.
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
|
9 |
* License: GPLv2 or later
|
@@ -31,7 +31,7 @@ class Testimonials_Widget {
|
|
31 |
const OLD_NAME = 'testimonialswidget';
|
32 |
const PLUGIN_FILE = 'testimonials-widget/testimonials-widget.php';
|
33 |
const PT = 'testimonials-widget';
|
34 |
-
const VERSION = '2.12.
|
35 |
|
36 |
private static $base = null;
|
37 |
private static $max_num_pages = 0;
|
@@ -72,6 +72,7 @@ class Testimonials_Widget {
|
|
72 |
$this->update();
|
73 |
add_action( 'gettext', array( &$this, 'gettext_testimonials' ) );
|
74 |
add_action( 'manage_' . self::PT . '_posts_custom_column', array( &$this, 'manage_testimonialswidget_posts_custom_column' ), 10, 2 );
|
|
|
75 |
add_filter( 'manage_' . self::PT . '_posts_columns', array( &$this, 'manage_edit_testimonialswidget_columns' ) );
|
76 |
add_filter( 'plugin_action_links', array( &$this, 'plugin_action_links' ), 10, 2 );
|
77 |
add_filter( 'plugin_row_meta', array( &$this, 'plugin_row_meta' ), 10, 2 );
|
@@ -101,9 +102,8 @@ EOD;
|
|
101 |
|
102 |
|
103 |
public function plugin_action_links( $links, $file ) {
|
104 |
-
if ( $file == self::$base )
|
105 |
array_unshift( $links, self::$settings_link );
|
106 |
-
}
|
107 |
|
108 |
return $links;
|
109 |
}
|
@@ -168,8 +168,9 @@ EOD;
|
|
168 |
if ( ! current_user_can( 'activate_plugins' ) )
|
169 |
return;
|
170 |
|
171 |
-
$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] :
|
172 |
-
|
|
|
173 |
|
174 |
self::init();
|
175 |
|
@@ -186,8 +187,9 @@ EOD;
|
|
186 |
if ( ! current_user_can( 'activate_plugins' ) )
|
187 |
return;
|
188 |
|
189 |
-
$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] :
|
190 |
-
|
|
|
191 |
|
192 |
flush_rewrite_rules();
|
193 |
}
|
@@ -250,12 +252,11 @@ EOD;
|
|
250 |
|
251 |
|
252 |
public static function plugin_row_meta( $input, $file ) {
|
253 |
-
if ( $file != self::$base )
|
254 |
return $input;
|
255 |
-
}
|
256 |
|
257 |
$links = array(
|
258 |
-
'<a href="http://aihr.us/about-aihrus/donate/"
|
259 |
'<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Purchase Testimonials Widget Premium</a>',
|
260 |
);
|
261 |
|
@@ -276,7 +277,7 @@ EOD;
|
|
276 |
|
277 |
public function admin_notices_donate() {
|
278 |
$content = '<div class="updated"><p>';
|
279 |
-
$content .= sprintf( __( 'Please donate $
|
280 |
$content .= '</p></div>';
|
281 |
|
282 |
echo $content;
|
@@ -286,22 +287,25 @@ EOD;
|
|
286 |
public function update() {
|
287 |
$prior_version = tw_get_option( 'admin_notices' );
|
288 |
if ( $prior_version ) {
|
289 |
-
if ( $prior_version < '2.12.0' )
|
290 |
add_action( 'admin_notices', array( $this, 'admin_notices_2_12_0' ) );
|
291 |
-
}
|
292 |
|
293 |
tw_set_option( 'admin_notices' );
|
294 |
}
|
295 |
|
296 |
-
|
297 |
-
|
|
|
|
|
|
|
|
|
|
|
298 |
add_action( 'admin_notices', array( $this, 'admin_notices_donate' ) );
|
|
|
299 |
tw_set_option( 'donate_version', self::VERSION );
|
300 |
}
|
301 |
|
302 |
$options = get_option( self::OLD_NAME );
|
303 |
-
|
304 |
-
// testimonials already migrated?
|
305 |
if ( true !== $options['migrated'] )
|
306 |
$this->migrate();
|
307 |
}
|
@@ -376,9 +380,8 @@ EOD;
|
|
376 |
// track/link testimonial import to new post
|
377 |
add_post_meta( $post_id, $meta_key, $result->testimonial_id );
|
378 |
|
379 |
-
if ( ! empty( $company ) )
|
380 |
add_post_meta( $post_id, 'testimonials-widget-company', $company );
|
381 |
-
}
|
382 |
|
383 |
$source = $result->source;
|
384 |
if ( ! empty( $source ) ) {
|
@@ -432,9 +435,8 @@ EOD;
|
|
432 |
case 'testimonials-widget-email':
|
433 |
case 'testimonials-widget-url':
|
434 |
$url = get_post_meta( $post_id, $column, true );
|
435 |
-
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
436 |
$url = 'http://' . $url;
|
437 |
-
}
|
438 |
|
439 |
$result = make_clickable( $url );
|
440 |
break;
|
@@ -574,11 +576,10 @@ EOD;
|
|
574 |
|
575 |
|
576 |
public static function get_defaults( $single_view = false ) {
|
577 |
-
if ( empty( $single_view ) )
|
578 |
return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
|
579 |
-
|
580 |
return apply_filters( 'testimonials_widget_defaults_single', tw_get_options() );
|
581 |
-
}
|
582 |
}
|
583 |
|
584 |
|
@@ -620,6 +621,7 @@ EOD;
|
|
620 |
if ( empty( $atts['random'] ) )
|
621 |
$atts['random'] = 1;
|
622 |
}
|
|
|
623 |
$atts = wp_parse_args( $atts, self::get_defaults() );
|
624 |
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
625 |
|
@@ -791,9 +793,8 @@ EOF;
|
|
791 |
);
|
792 |
}
|
793 |
|
794 |
-
if ( $paging || $paging_before )
|
795 |
$html .= self::get_testimonials_paging( $atts );
|
796 |
-
}
|
797 |
|
798 |
$is_first = true;
|
799 |
|
@@ -804,9 +805,8 @@ EOF;
|
|
804 |
$is_first = false;
|
805 |
}
|
806 |
|
807 |
-
if ( $paging || $paging_after )
|
808 |
$html .= self::get_testimonials_paging( $atts, false );
|
809 |
-
}
|
810 |
|
811 |
$html .= '</div>';
|
812 |
|
@@ -826,7 +826,6 @@ EOF;
|
|
826 |
$remove_hentry = $atts['remove_hentry'];
|
827 |
|
828 |
$class = 'testimonials-widget-testimonial';
|
829 |
-
|
830 |
if ( is_single() && empty( $widget_number ) ) {
|
831 |
$class .= ' single';
|
832 |
} elseif ( $is_list ) {
|
@@ -841,7 +840,6 @@ EOF;
|
|
841 |
$class .= ' whitespace';
|
842 |
|
843 |
$div_open = '<div class="';
|
844 |
-
|
845 |
if ( ! empty( $testimonial['post_id'] ) )
|
846 |
$div_open .= join( ' ', get_post_class( $class, $testimonial['post_id'] ) );
|
847 |
else
|
@@ -859,9 +857,8 @@ EOF;
|
|
859 |
$image .= '</span>';
|
860 |
}
|
861 |
|
862 |
-
if ( ! $do_image_single && 'get_single' == $atts['type'] )
|
863 |
$image = '';
|
864 |
-
}
|
865 |
|
866 |
$quote = self::get_quote( $testimonial, $atts, $widget_number );
|
867 |
$cite = self::get_cite( $testimonial, $atts );
|
@@ -874,7 +871,6 @@ EOF;
|
|
874 |
}
|
875 |
|
876 |
$bottom_text = '';
|
877 |
-
|
878 |
if ( ! empty( $atts['bottom_text'] ) ) {
|
879 |
$bottom_text = '<div class="bottom_text">';
|
880 |
$bottom_text .= $atts['bottom_text'];
|
@@ -1038,9 +1034,8 @@ EOF;
|
|
1038 |
return $string;
|
1039 |
}
|
1040 |
|
1041 |
-
if ( ! empty( $char_limit ) )
|
1042 |
return self::truncate( $string, $char_limit, $pad, $force_pad );
|
1043 |
-
}
|
1044 |
|
1045 |
return $string . $pad;
|
1046 |
}
|
@@ -1130,9 +1125,8 @@ EOF;
|
|
1130 |
// on the stack so hopefully we're not introducing more
|
1131 |
// problems.
|
1132 |
|
1133 |
-
if ( end( $tag_stack ) == $tag_inner )
|
1134 |
array_pop( $tag_stack );
|
1135 |
-
}
|
1136 |
} elseif ( $tag[$func_strlen( $tag ) - 2] == '/' || in_array( strtolower( $tag_inner ), $unpaired_tags ) ) {
|
1137 |
// Self-closing or unpaired tag
|
1138 |
$output .= $tag;
|
@@ -1149,9 +1143,8 @@ EOF;
|
|
1149 |
|
1150 |
// Print any remaining text after the last tag, if there's room
|
1151 |
|
1152 |
-
if ( $output_length < $max_length && $position < $func_strlen( $html ) )
|
1153 |
$output .= $func_strcut( $html, $position, $max_length - $output_length );
|
1154 |
-
}
|
1155 |
|
1156 |
$truncated = $func_strlen( $html ) - $position > $max_length - $output_length;
|
1157 |
|
@@ -1206,25 +1199,22 @@ EOF;
|
|
1206 |
public static function get_testimonials_paging( $atts, $prepend = true ) {
|
1207 |
$html = '';
|
1208 |
|
1209 |
-
if ( is_home() || 1 === self::$max_num_pages )
|
1210 |
return $html;
|
1211 |
-
}
|
1212 |
|
1213 |
$html .= '<div class="paging';
|
1214 |
|
1215 |
-
if ( $prepend )
|
1216 |
$html .= ' prepend';
|
1217 |
-
|
1218 |
$html .= ' append';
|
1219 |
-
}
|
1220 |
|
1221 |
$html .= '">';
|
1222 |
|
1223 |
-
if ( ! empty( $atts['paged'] ) )
|
1224 |
$paged = $atts['paged'];
|
1225 |
-
|
1226 |
$paged = 1;
|
1227 |
-
}
|
1228 |
|
1229 |
if ( ! function_exists( 'wp_pagenavi' ) ) {
|
1230 |
$html .= ' <div class="alignleft">';
|
@@ -1290,16 +1280,15 @@ EOF;
|
|
1290 |
public static function get_query_args( $atts ) {
|
1291 |
extract( $atts );
|
1292 |
|
1293 |
-
if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) )
|
1294 |
remove_filter( 'posts_orderby', 'CPTOrderPosts', 99, 2 );
|
1295 |
-
}
|
1296 |
|
1297 |
if ( $random ) {
|
1298 |
$orderby = 'rand';
|
1299 |
$order = false;
|
1300 |
}
|
1301 |
|
1302 |
-
if ( empty( $refresh_interval ) )
|
1303 |
$limit = 1;
|
1304 |
|
1305 |
$args = array(
|
@@ -1317,27 +1306,24 @@ EOF;
|
|
1317 |
$args['post_status'][] = 'draft';
|
1318 |
}
|
1319 |
|
1320 |
-
if ( $paging && ! empty( $atts['paged'] ) && is_singular() )
|
1321 |
$args['paged'] = $atts['paged'];
|
1322 |
-
}
|
1323 |
|
1324 |
if ( ! $random && $meta_key ) {
|
1325 |
$args['meta_key'] = $meta_key;
|
1326 |
$args['orderby'] = 'meta_value';
|
1327 |
}
|
1328 |
|
1329 |
-
if ( $order )
|
1330 |
$args['order'] = $order;
|
1331 |
-
}
|
1332 |
|
1333 |
if ( $ids ) {
|
1334 |
$ids = explode( ',', $ids );
|
1335 |
|
1336 |
$args['post__in'] = $ids;
|
1337 |
|
1338 |
-
if ( 'none' == $args['orderby'] )
|
1339 |
add_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ), 10, 2 );
|
1340 |
-
}
|
1341 |
}
|
1342 |
|
1343 |
|
@@ -1349,23 +1335,20 @@ EOF;
|
|
1349 |
|
1350 |
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
1351 |
if ( ! $use_cpt_taxonomy ) {
|
1352 |
-
if ( $category )
|
1353 |
$args['category_name'] = $category;
|
1354 |
-
}
|
1355 |
|
1356 |
if ( $tags ) {
|
1357 |
$tags = explode( ',', $tags );
|
1358 |
|
1359 |
-
if ( $tags_all )
|
1360 |
$args['tag_slug__and'] = $tags;
|
1361 |
-
|
1362 |
$args['tag_slug__in'] = $tags;
|
1363 |
-
}
|
1364 |
}
|
1365 |
} else {
|
1366 |
-
if ( $category )
|
1367 |
$args[ self::$cpt_category ] = $category;
|
1368 |
-
}
|
1369 |
|
1370 |
if ( $tags ) {
|
1371 |
if ( $tags_all ) {
|
@@ -1406,9 +1389,8 @@ EOF;
|
|
1406 |
$testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
|
1407 |
}
|
1408 |
|
1409 |
-
if ( has_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) ) )
|
1410 |
remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
|
1411 |
-
}
|
1412 |
|
1413 |
self::$max_num_pages = $testimonials->max_num_pages;
|
1414 |
self::$post_count = $testimonials->post_count;
|
@@ -1438,9 +1420,8 @@ EOF;
|
|
1438 |
}
|
1439 |
|
1440 |
$url = get_post_meta( $post_id, 'testimonials-widget-url', true );
|
1441 |
-
if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
1442 |
$url = 'http://' . $url;
|
1443 |
-
}
|
1444 |
|
1445 |
$data = array(
|
1446 |
'post_id' => $post_id,
|
@@ -1605,6 +1586,26 @@ EOF;
|
|
1605 |
}
|
1606 |
|
1607 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1608 |
}
|
1609 |
|
1610 |
|
3 |
* Plugin Name: Testimonials Widget
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/testimonials-widget/
|
5 |
* Description: Testimonials Widget plugin allows you to display random or selected portfolio, quotes, reviews, showcases, or text with images on your WordPress blog.
|
6 |
+
* Version: 2.12.6
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/about-aihrus/michael-cannon-resume/
|
9 |
* License: GPLv2 or later
|
31 |
const OLD_NAME = 'testimonialswidget';
|
32 |
const PLUGIN_FILE = 'testimonials-widget/testimonials-widget.php';
|
33 |
const PT = 'testimonials-widget';
|
34 |
+
const VERSION = '2.12.6';
|
35 |
|
36 |
private static $base = null;
|
37 |
private static $max_num_pages = 0;
|
72 |
$this->update();
|
73 |
add_action( 'gettext', array( &$this, 'gettext_testimonials' ) );
|
74 |
add_action( 'manage_' . self::PT . '_posts_custom_column', array( &$this, 'manage_testimonialswidget_posts_custom_column' ), 10, 2 );
|
75 |
+
add_action( 'right_now_content_table_end', array( &$this, 'right_now_content_table_end' ) );
|
76 |
add_filter( 'manage_' . self::PT . '_posts_columns', array( &$this, 'manage_edit_testimonialswidget_columns' ) );
|
77 |
add_filter( 'plugin_action_links', array( &$this, 'plugin_action_links' ), 10, 2 );
|
78 |
add_filter( 'plugin_row_meta', array( &$this, 'plugin_row_meta' ), 10, 2 );
|
102 |
|
103 |
|
104 |
public function plugin_action_links( $links, $file ) {
|
105 |
+
if ( $file == self::$base )
|
106 |
array_unshift( $links, self::$settings_link );
|
|
|
107 |
|
108 |
return $links;
|
109 |
}
|
168 |
if ( ! current_user_can( 'activate_plugins' ) )
|
169 |
return;
|
170 |
|
171 |
+
$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : false;
|
172 |
+
if ( $plugin )
|
173 |
+
check_admin_referer( "activate-plugin_{$plugin}" );
|
174 |
|
175 |
self::init();
|
176 |
|
187 |
if ( ! current_user_can( 'activate_plugins' ) )
|
188 |
return;
|
189 |
|
190 |
+
$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : false;
|
191 |
+
if ( $plugin )
|
192 |
+
check_admin_referer( "deactivate-plugin_{$plugin}" );
|
193 |
|
194 |
flush_rewrite_rules();
|
195 |
}
|
252 |
|
253 |
|
254 |
public static function plugin_row_meta( $input, $file ) {
|
255 |
+
if ( $file != self::$base )
|
256 |
return $input;
|
|
|
257 |
|
258 |
$links = array(
|
259 |
+
'<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>',
|
260 |
'<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Purchase Testimonials Widget Premium</a>',
|
261 |
);
|
262 |
|
277 |
|
278 |
public function admin_notices_donate() {
|
279 |
$content = '<div class="updated"><p>';
|
280 |
+
$content .= sprintf( __( 'Please donate $2 towards keeping Testimonials Widget plugin supported and maintained %s', 'testimonials-widget' ), self::$donate_button );
|
281 |
$content .= '</p></div>';
|
282 |
|
283 |
echo $content;
|
287 |
public function update() {
|
288 |
$prior_version = tw_get_option( 'admin_notices' );
|
289 |
if ( $prior_version ) {
|
290 |
+
if ( $prior_version < '2.12.0' )
|
291 |
add_action( 'admin_notices', array( $this, 'admin_notices_2_12_0' ) );
|
|
|
292 |
|
293 |
tw_set_option( 'admin_notices' );
|
294 |
}
|
295 |
|
296 |
+
// display donate on major/minor version release or if it's been a month
|
297 |
+
$now = time();
|
298 |
+
$donate_date_display = tw_get_option( 'donate_date_display', 0 );
|
299 |
+
$month_in_seconds = 4.33 * WEEK_IN_SECONDS;
|
300 |
+
$donate_month = $donate_date_display + $month_in_seconds;
|
301 |
+
$donate_version = tw_get_option( 'donate_version', false );
|
302 |
+
if ( ! $donate_date_display || $donate_month < $now || ! $donate_version || ( $donate_version != self::VERSION && preg_match( '#\.0$#', self::VERSION ) ) ) {
|
303 |
add_action( 'admin_notices', array( $this, 'admin_notices_donate' ) );
|
304 |
+
tw_set_option( 'donate_date_display', $now );
|
305 |
tw_set_option( 'donate_version', self::VERSION );
|
306 |
}
|
307 |
|
308 |
$options = get_option( self::OLD_NAME );
|
|
|
|
|
309 |
if ( true !== $options['migrated'] )
|
310 |
$this->migrate();
|
311 |
}
|
380 |
// track/link testimonial import to new post
|
381 |
add_post_meta( $post_id, $meta_key, $result->testimonial_id );
|
382 |
|
383 |
+
if ( ! empty( $company ) )
|
384 |
add_post_meta( $post_id, 'testimonials-widget-company', $company );
|
|
|
385 |
|
386 |
$source = $result->source;
|
387 |
if ( ! empty( $source ) ) {
|
435 |
case 'testimonials-widget-email':
|
436 |
case 'testimonials-widget-url':
|
437 |
$url = get_post_meta( $post_id, $column, true );
|
438 |
+
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
439 |
$url = 'http://' . $url;
|
|
|
440 |
|
441 |
$result = make_clickable( $url );
|
442 |
break;
|
576 |
|
577 |
|
578 |
public static function get_defaults( $single_view = false ) {
|
579 |
+
if ( empty( $single_view ) )
|
580 |
return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
|
581 |
+
else
|
582 |
return apply_filters( 'testimonials_widget_defaults_single', tw_get_options() );
|
|
|
583 |
}
|
584 |
|
585 |
|
621 |
if ( empty( $atts['random'] ) )
|
622 |
$atts['random'] = 1;
|
623 |
}
|
624 |
+
|
625 |
$atts = wp_parse_args( $atts, self::get_defaults() );
|
626 |
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
627 |
|
793 |
);
|
794 |
}
|
795 |
|
796 |
+
if ( $paging || $paging_before )
|
797 |
$html .= self::get_testimonials_paging( $atts );
|
|
|
798 |
|
799 |
$is_first = true;
|
800 |
|
805 |
$is_first = false;
|
806 |
}
|
807 |
|
808 |
+
if ( $paging || $paging_after )
|
809 |
$html .= self::get_testimonials_paging( $atts, false );
|
|
|
810 |
|
811 |
$html .= '</div>';
|
812 |
|
826 |
$remove_hentry = $atts['remove_hentry'];
|
827 |
|
828 |
$class = 'testimonials-widget-testimonial';
|
|
|
829 |
if ( is_single() && empty( $widget_number ) ) {
|
830 |
$class .= ' single';
|
831 |
} elseif ( $is_list ) {
|
840 |
$class .= ' whitespace';
|
841 |
|
842 |
$div_open = '<div class="';
|
|
|
843 |
if ( ! empty( $testimonial['post_id'] ) )
|
844 |
$div_open .= join( ' ', get_post_class( $class, $testimonial['post_id'] ) );
|
845 |
else
|
857 |
$image .= '</span>';
|
858 |
}
|
859 |
|
860 |
+
if ( ! $do_image_single && 'get_single' == $atts['type'] )
|
861 |
$image = '';
|
|
|
862 |
|
863 |
$quote = self::get_quote( $testimonial, $atts, $widget_number );
|
864 |
$cite = self::get_cite( $testimonial, $atts );
|
871 |
}
|
872 |
|
873 |
$bottom_text = '';
|
|
|
874 |
if ( ! empty( $atts['bottom_text'] ) ) {
|
875 |
$bottom_text = '<div class="bottom_text">';
|
876 |
$bottom_text .= $atts['bottom_text'];
|
1034 |
return $string;
|
1035 |
}
|
1036 |
|
1037 |
+
if ( ! empty( $char_limit ) )
|
1038 |
return self::truncate( $string, $char_limit, $pad, $force_pad );
|
|
|
1039 |
|
1040 |
return $string . $pad;
|
1041 |
}
|
1125 |
// on the stack so hopefully we're not introducing more
|
1126 |
// problems.
|
1127 |
|
1128 |
+
if ( end( $tag_stack ) == $tag_inner )
|
1129 |
array_pop( $tag_stack );
|
|
|
1130 |
} elseif ( $tag[$func_strlen( $tag ) - 2] == '/' || in_array( strtolower( $tag_inner ), $unpaired_tags ) ) {
|
1131 |
// Self-closing or unpaired tag
|
1132 |
$output .= $tag;
|
1143 |
|
1144 |
// Print any remaining text after the last tag, if there's room
|
1145 |
|
1146 |
+
if ( $output_length < $max_length && $position < $func_strlen( $html ) )
|
1147 |
$output .= $func_strcut( $html, $position, $max_length - $output_length );
|
|
|
1148 |
|
1149 |
$truncated = $func_strlen( $html ) - $position > $max_length - $output_length;
|
1150 |
|
1199 |
public static function get_testimonials_paging( $atts, $prepend = true ) {
|
1200 |
$html = '';
|
1201 |
|
1202 |
+
if ( is_home() || 1 === self::$max_num_pages )
|
1203 |
return $html;
|
|
|
1204 |
|
1205 |
$html .= '<div class="paging';
|
1206 |
|
1207 |
+
if ( $prepend )
|
1208 |
$html .= ' prepend';
|
1209 |
+
else
|
1210 |
$html .= ' append';
|
|
|
1211 |
|
1212 |
$html .= '">';
|
1213 |
|
1214 |
+
if ( ! empty( $atts['paged'] ) )
|
1215 |
$paged = $atts['paged'];
|
1216 |
+
else
|
1217 |
$paged = 1;
|
|
|
1218 |
|
1219 |
if ( ! function_exists( 'wp_pagenavi' ) ) {
|
1220 |
$html .= ' <div class="alignleft">';
|
1280 |
public static function get_query_args( $atts ) {
|
1281 |
extract( $atts );
|
1282 |
|
1283 |
+
if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) )
|
1284 |
remove_filter( 'posts_orderby', 'CPTOrderPosts', 99, 2 );
|
|
|
1285 |
|
1286 |
if ( $random ) {
|
1287 |
$orderby = 'rand';
|
1288 |
$order = false;
|
1289 |
}
|
1290 |
|
1291 |
+
if ( ! empty( $type ) && 'testimonialswidget_widget' == $type && empty( $refresh_interval ) )
|
1292 |
$limit = 1;
|
1293 |
|
1294 |
$args = array(
|
1306 |
$args['post_status'][] = 'draft';
|
1307 |
}
|
1308 |
|
1309 |
+
if ( $paging && ! empty( $atts['paged'] ) && is_singular() )
|
1310 |
$args['paged'] = $atts['paged'];
|
|
|
1311 |
|
1312 |
if ( ! $random && $meta_key ) {
|
1313 |
$args['meta_key'] = $meta_key;
|
1314 |
$args['orderby'] = 'meta_value';
|
1315 |
}
|
1316 |
|
1317 |
+
if ( $order )
|
1318 |
$args['order'] = $order;
|
|
|
1319 |
|
1320 |
if ( $ids ) {
|
1321 |
$ids = explode( ',', $ids );
|
1322 |
|
1323 |
$args['post__in'] = $ids;
|
1324 |
|
1325 |
+
if ( 'none' == $args['orderby'] )
|
1326 |
add_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ), 10, 2 );
|
|
|
1327 |
}
|
1328 |
|
1329 |
|
1335 |
|
1336 |
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
1337 |
if ( ! $use_cpt_taxonomy ) {
|
1338 |
+
if ( $category )
|
1339 |
$args['category_name'] = $category;
|
|
|
1340 |
|
1341 |
if ( $tags ) {
|
1342 |
$tags = explode( ',', $tags );
|
1343 |
|
1344 |
+
if ( $tags_all )
|
1345 |
$args['tag_slug__and'] = $tags;
|
1346 |
+
else
|
1347 |
$args['tag_slug__in'] = $tags;
|
|
|
1348 |
}
|
1349 |
} else {
|
1350 |
+
if ( $category )
|
1351 |
$args[ self::$cpt_category ] = $category;
|
|
|
1352 |
|
1353 |
if ( $tags ) {
|
1354 |
if ( $tags_all ) {
|
1389 |
$testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
|
1390 |
}
|
1391 |
|
1392 |
+
if ( has_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) ) )
|
1393 |
remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
|
|
|
1394 |
|
1395 |
self::$max_num_pages = $testimonials->max_num_pages;
|
1396 |
self::$post_count = $testimonials->post_count;
|
1420 |
}
|
1421 |
|
1422 |
$url = get_post_meta( $post_id, 'testimonials-widget-url', true );
|
1423 |
+
if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
1424 |
$url = 'http://' . $url;
|
|
|
1425 |
|
1426 |
$data = array(
|
1427 |
'post_id' => $post_id,
|
1586 |
}
|
1587 |
|
1588 |
|
1589 |
+
public function right_now_content_table_end() {
|
1590 |
+
$content = '
|
1591 |
+
<tr>
|
1592 |
+
<td class="first b b-%1$s">%4$s%2$s%5$s</td>
|
1593 |
+
<td class="t %1$s">%4$s%3$s%5$s</td>
|
1594 |
+
</tr>';
|
1595 |
+
$posts = wp_count_posts( Testimonials_Widget::PT );
|
1596 |
+
$count = $posts->publish;
|
1597 |
+
$name = _n( 'Testimonial', 'Testimonials', $count, 'testimonials-widget' );
|
1598 |
+
$count_f = number_format_i18n( $count );
|
1599 |
+
$a_open = '<a href="edit.php?post_type=' . Testimonials_Widget::PT . '">';
|
1600 |
+
$a_close = '</a>';
|
1601 |
+
|
1602 |
+
if ( current_user_can( 'edit_others_posts' ) )
|
1603 |
+
echo sprintf( $content, Testimonials_Widget::PT, $count_f, $name, $a_open, $a_close );
|
1604 |
+
else
|
1605 |
+
echo sprintf( $content, Testimonials_Widget::PT, $count_f, $name, '', '' );
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
|
1609 |
}
|
1610 |
|
1611 |
|