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.13.2 |
Comparing to | |
See all releases |
Code changes from version 2.13.1 to 2.13.2
- CHANGELOG.md +7 -1
- README.md +1 -0
- TODO.md +1 -2
- languages/testimonials-widget.pot +3 -3
- lib/class-testimonials-widget-settings.php +1 -1
- lib/class-testimonials-widget-widget.php +5 -5
- readme.txt +1 -1
- testimonials-widget.php +47 -47
CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
# CHANGELOG Testimonials Widget
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
## 2.13.1
|
6 |
* Add demo link
|
1 |
# CHANGELOG Testimonials Widget
|
2 |
|
3 |
+
## master
|
4 |
+
|
5 |
+
## 2.13.2
|
6 |
+
* Add StillMaintained.com notice
|
7 |
+
* BUGFIX Extra meta box fields are no show
|
8 |
+
* Disengaged from hard coded wp-content path
|
9 |
+
* Escape translations
|
10 |
|
11 |
## 2.13.1
|
12 |
* Add demo link
|
README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
# README Testimonials Widget WordPress Plugin
|
2 |
|
3 |
[![Build Status](https://travis-ci.org/michael-cannon/testimonials-widget.png?branch=master)](https://travis-ci.org/michael-cannon/testimonials-widget)
|
|
|
4 |
|
5 |
## Welcome to the Testimonials Widget Github repository
|
6 |
|
1 |
# README Testimonials Widget WordPress Plugin
|
2 |
|
3 |
[![Build Status](https://travis-ci.org/michael-cannon/testimonials-widget.png?branch=master)](https://travis-ci.org/michael-cannon/testimonials-widget)
|
4 |
+
[![ProjectStatus](http://stillmaintained.com/michael-cannon/testimonials-widget.png)](http://stillmaintained.com/michael-cannon/testimonials-widget)
|
5 |
|
6 |
## Welcome to the Testimonials Widget Github repository
|
7 |
|
TODO.md
CHANGED
@@ -2,5 +2,4 @@
|
|
2 |
|
3 |
Is there something you want done? Write it up on the [support forums](http://wordpress.org/support/plugin/testimonials-widget) and then [donate](http://aihr.us/about-aihrus/donate/) or [write an awesome testimonial](http://aihr.us/about-aihrus/testimonials/add-testimonial/).
|
4 |
|
5 |
-
* BUG [IE8 + Google Font Issue](http://wordpress.org/support/topic/ie8-google-font-issue)
|
6 |
-
* Disengage from hard coded wp-content path
|
2 |
|
3 |
Is there something you want done? Write it up on the [support forums](http://wordpress.org/support/plugin/testimonials-widget) and then [donate](http://aihr.us/about-aihrus/donate/) or [write an awesome testimonial](http://aihr.us/about-aihrus/testimonials/add-testimonial/).
|
4 |
|
5 |
+
* BUG [IE8 + Google Font Issue](http://wordpress.org/support/topic/ie8-google-font-issue)
|
|
languages/testimonials-widget.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Testimonials Widget package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Testimonials Widget 2.13.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
-
"POT-Creation-Date: 2013-07-01
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -498,7 +498,7 @@ msgstr ""
|
|
498 |
msgid "Display testimonials with multiple selection and display options"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.13.
|
502 |
#. Plugin Name of the plugin/theme
|
503 |
#: lib/class-testimonials-widget-widget.php:37
|
504 |
msgid "Testimonials Widget"
|
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.2\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2013-07-13 01:50:23+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
498 |
msgid "Display testimonials with multiple selection and display options"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#. #-#-#-#-# testimonials-widget.pot (Testimonials Widget 2.13.2) #-#-#-#-#
|
502 |
#. Plugin Name of the plugin/theme
|
503 |
#: lib/class-testimonials-widget-widget.php:37
|
504 |
msgid "Testimonials Widget"
|
lib/class-testimonials-widget-settings.php
CHANGED
@@ -674,7 +674,7 @@ class Testimonials_Widget_Settings {
|
|
674 |
public function display_about_section() {
|
675 |
echo '
|
676 |
<div id="about" style="width: 70%; min-height: 225px;">
|
677 |
-
<p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="/
|
678 |
</div>
|
679 |
';
|
680 |
}
|
674 |
public function display_about_section() {
|
675 |
echo '
|
676 |
<div id="about" style="width: 70%; min-height: 225px;">
|
677 |
+
<p><img class="alignright size-medium" title="Michael in Red Square, Moscow, Russia" src="' . WP_PLUGIN_URL . '/testimonials-widget/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="http://wordpress.org/extend/plugins/testimonials-widget/">Testimonials Widget</a> is by <a href="http://aihr.us/about-aihrus/michael-cannon-resume/">Michael Cannon</a>. He\'s <a title="Lot\'s of stuff about Peichi Liu…" href="http://peimic.com/t/peichi-liu/">Peichi’s</a> smiling man, an adventurous <a title="Water rat" href="http://www.chinesehoroscope.org/chinese_zodiac/rat/" target="_blank">water-rat</a>, <a title="Axelerant – Open Source. Engineered." href="http://axelerant.com/who-we-are">chief people officer</a>, <a title="Aihrus – website support made easy since 1999" href="http://aihr.us/about-aihrus/">chief technology officer</a>, <a title="Road biker, cyclist, biking; whatever you call, I love to ride" href="http://peimic.com/c/biking/">cyclist</a>, <a title="Michael\'s poetic like literary ramblings" href="http://peimic.com/t/poetry/">poet</a>, <a title="World Wide Opportunities on Organic Farms" href="http://peimic.com/t/WWOOF/">WWOOF’er</a> and <a title="My traveled to country list, is more than my age." href="http://peimic.com/c/travel/">world traveler</a>.</p>
|
678 |
</div>
|
679 |
';
|
680 |
}
|
lib/class-testimonials-widget-widget.php
CHANGED
@@ -23,7 +23,7 @@ class Testimonials_Widget_Widget extends WP_Widget {
|
|
23 |
// Widget settings
|
24 |
$widget_ops = array(
|
25 |
'classname' => 'Testimonials_Widget_Widget',
|
26 |
-
'description' =>
|
27 |
);
|
28 |
|
29 |
// Widget control settings
|
@@ -34,7 +34,7 @@ class Testimonials_Widget_Widget extends WP_Widget {
|
|
34 |
// Create the widget
|
35 |
$this->WP_Widget(
|
36 |
self::ID,
|
37 |
-
|
38 |
$widget_ops,
|
39 |
$control_ops
|
40 |
);
|
@@ -159,8 +159,8 @@ class Testimonials_Widget_Widget extends WP_Widget {
|
|
159 |
$form_parts['css_class'] = array(
|
160 |
'section' => 'widget',
|
161 |
'type' => 'readonly',
|
162 |
-
'title' =>
|
163 |
-
'desc' =>
|
164 |
'std' => $std,
|
165 |
'widget' => 1,
|
166 |
);
|
@@ -204,7 +204,7 @@ class Testimonials_Widget_Widget extends WP_Widget {
|
|
204 |
if ( ! empty( $desc ) )
|
205 |
echo '<h3>' . $desc . '</h3>';
|
206 |
|
207 |
-
echo '<a id="' . $this->get_field_id( $id ) . '" style="cursor:pointer;" onclick="jQuery( \'div#' . $this->get_field_id( $id ) . '\' ) . slideToggle();">' .
|
208 |
echo '<div id="' . $this->get_field_id( $id ) . '" style="display:none">';
|
209 |
|
210 |
$do_return = true;
|
23 |
// Widget settings
|
24 |
$widget_ops = array(
|
25 |
'classname' => 'Testimonials_Widget_Widget',
|
26 |
+
'description' => esc_html__( 'Display testimonials with multiple selection and display options', 'testimonials-widget' )
|
27 |
);
|
28 |
|
29 |
// Widget control settings
|
34 |
// Create the widget
|
35 |
$this->WP_Widget(
|
36 |
self::ID,
|
37 |
+
esc_html__( 'Testimonials Widget', 'testimonials-widget' ),
|
38 |
$widget_ops,
|
39 |
$control_ops
|
40 |
);
|
159 |
$form_parts['css_class'] = array(
|
160 |
'section' => 'widget',
|
161 |
'type' => 'readonly',
|
162 |
+
'title' => esc_html__( 'CSS Class', 'testimonials-widget' ),
|
163 |
+
'desc' => esc_html__( 'This widget\'s unique CSS class for styling', 'testimonials-widget' ),
|
164 |
'std' => $std,
|
165 |
'widget' => 1,
|
166 |
);
|
204 |
if ( ! empty( $desc ) )
|
205 |
echo '<h3>' . $desc . '</h3>';
|
206 |
|
207 |
+
echo '<a id="' . $this->get_field_id( $id ) . '" style="cursor:pointer;" onclick="jQuery( \'div#' . $this->get_field_id( $id ) . '\' ) . slideToggle();">' . esc_html__( 'Expand/Collapse', 'testimonials-widget' ) . ' »</a>';
|
208 |
echo '<div id="' . $this->get_field_id( $id ) . '" style="display:none">';
|
209 |
|
210 |
$do_return = true;
|
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.
|
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.2
|
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.
|
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.
|
32 |
|
33 |
private static $base = null;
|
34 |
private static $max_num_pages = 0;
|
@@ -59,7 +59,7 @@ class Testimonials_Widget {
|
|
59 |
|
60 |
|
61 |
public function admin_init() {
|
62 |
-
self::$settings_link = '<a href="' . get_admin_url() . 'edit.php?post_type=' . Testimonials_Widget::PT . '&page=' . Testimonials_Widget_Settings::ID . '">' .
|
63 |
|
64 |
$this->add_meta_box_testimonials_widget();
|
65 |
$this->update();
|
@@ -249,7 +249,7 @@ EOD;
|
|
249 |
|
250 |
public function admin_notices_donate() {
|
251 |
$content = '<div class="updated"><p>';
|
252 |
-
$content .= sprintf(
|
253 |
$content .= '</p></div>';
|
254 |
|
255 |
echo $content;
|
@@ -445,25 +445,25 @@ EOD;
|
|
445 |
// order of keys matches column ordering
|
446 |
$columns = array(
|
447 |
'cb' => '<input type="checkbox" />',
|
448 |
-
'thumbnail' =>
|
449 |
-
'title' =>
|
450 |
-
'shortcode' =>
|
451 |
-
'testimonials-widget-title' =>
|
452 |
-
'testimonials-widget-location' =>
|
453 |
-
'testimonials-widget-email' =>
|
454 |
-
'testimonials-widget-company' =>
|
455 |
-
'testimonials-widget-url' =>
|
456 |
-
'author' =>
|
457 |
-
'date' =>
|
458 |
);
|
459 |
|
460 |
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
461 |
if ( ! $use_cpt_taxonomy ) {
|
462 |
-
$columns[ 'categories' ] =
|
463 |
-
$columns[ 'tags' ] =
|
464 |
} else {
|
465 |
-
$columns[ self::$cpt_category ] =
|
466 |
-
$columns[ self::$cpt_tags ] =
|
467 |
}
|
468 |
|
469 |
$columns = apply_filters( 'testimonials_widget_columns', $columns );
|
@@ -474,17 +474,17 @@ EOD;
|
|
474 |
|
475 |
public function init_post_type() {
|
476 |
$labels = array(
|
477 |
-
'add_new' =>
|
478 |
-
'add_new_item' =>
|
479 |
-
'edit_item' =>
|
480 |
-
'name' =>
|
481 |
-
'new_item' =>
|
482 |
-
'not_found' =>
|
483 |
-
'not_found_in_trash' =>
|
484 |
'parent_item_colon' => null,
|
485 |
-
'search_items' =>
|
486 |
-
'singular_name' =>
|
487 |
-
'view_item' =>
|
488 |
);
|
489 |
|
490 |
$supports = array(
|
@@ -522,7 +522,7 @@ EOD;
|
|
522 |
}
|
523 |
|
524 |
$args = array(
|
525 |
-
'label' =>
|
526 |
'capability_type' => 'post',
|
527 |
'has_archive' => $has_archive,
|
528 |
'hierarchical' => false,
|
@@ -801,7 +801,7 @@ EOF;
|
|
801 |
|
802 |
if ( empty( $testimonials ) && ! $hide_not_found ) {
|
803 |
$testimonials = array(
|
804 |
-
array( 'testimonial_content' =>
|
805 |
);
|
806 |
}
|
807 |
|
@@ -912,7 +912,7 @@ EOF;
|
|
912 |
|
913 |
public static function get_quote( $testimonial, $atts, $widget_number ) {
|
914 |
$char_limit = $atts['char_limit'];
|
915 |
-
$content_more = apply_filters( 'testimonials_widget_content_more',
|
916 |
$content_more .= self::$tag_close_quote;
|
917 |
$do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
|
918 |
$use_quote_tag = $atts['use_quote_tag'];
|
@@ -1231,7 +1231,7 @@ EOF;
|
|
1231 |
$html .= ' <div class="alignleft">';
|
1232 |
|
1233 |
if ( 1 < $paged ) {
|
1234 |
-
$laquo = apply_filters( 'testimonials_widget_previous_posts_link_text',
|
1235 |
$html .= get_previous_posts_link( $laquo, $paged );
|
1236 |
}
|
1237 |
|
@@ -1240,7 +1240,7 @@ EOF;
|
|
1240 |
$html .= ' <div class="alignright">';
|
1241 |
|
1242 |
if ( $paged != self::$max_num_pages ) {
|
1243 |
-
$raquo = apply_filters( 'testimonials_widget_next_posts_link_text',
|
1244 |
$html .= get_next_posts_link( $raquo, self::$max_num_pages );
|
1245 |
}
|
1246 |
|
@@ -1490,31 +1490,31 @@ EOF;
|
|
1490 |
|
1491 |
$fields = array(
|
1492 |
array(
|
1493 |
-
'name' =>
|
1494 |
'id' => 'testimonials-widget-title',
|
1495 |
'type' => 'text',
|
1496 |
'desc' => '',
|
1497 |
),
|
1498 |
array(
|
1499 |
-
'name' =>
|
1500 |
'id' => 'testimonials-widget-location',
|
1501 |
'type' => 'text',
|
1502 |
'desc' => '',
|
1503 |
),
|
1504 |
array(
|
1505 |
-
'name' =>
|
1506 |
'id' => 'testimonials-widget-email',
|
1507 |
'type' => 'text',
|
1508 |
'desc' => '',
|
1509 |
),
|
1510 |
array(
|
1511 |
-
'name' =>
|
1512 |
'id' => 'testimonials-widget-company',
|
1513 |
'type' => 'text',
|
1514 |
'desc' => '',
|
1515 |
),
|
1516 |
array(
|
1517 |
-
'name' =>
|
1518 |
'id' => 'testimonials-widget-url',
|
1519 |
'type' => 'text',
|
1520 |
'desc' => '',
|
@@ -1526,7 +1526,7 @@ EOF;
|
|
1526 |
$meta_box = redrokk_metabox_class::getInstance(
|
1527 |
self::OLD_NAME,
|
1528 |
array(
|
1529 |
-
'title' =>
|
1530 |
'description' => '',
|
1531 |
'_object_types' => 'testimonials-widget',
|
1532 |
'priority' => 'high',
|
@@ -1551,8 +1551,8 @@ EOF;
|
|
1551 |
|
1552 |
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1553 |
switch ( $translation ) {
|
1554 |
-
case
|
1555 |
-
return
|
1556 |
break;
|
1557 |
}
|
1558 |
}
|
@@ -1578,13 +1578,13 @@ EOF;
|
|
1578 |
$m[ self::PT ] = array(
|
1579 |
0 => '', // Unused. Messages start at index 1.
|
1580 |
1 => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1581 |
-
2 =>
|
1582 |
-
3 =>
|
1583 |
-
4 =>
|
1584 |
/* translators: %s: date and time of the revision */
|
1585 |
-
5 => isset( $_GET['revision'] ) ? sprintf(
|
1586 |
6 => sprintf( __( 'Testimonial published. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1587 |
-
7 =>
|
1588 |
8 => sprintf( __( 'Testimonial submitted. <a target="_blank" href="%s">Preview testimonial</a>', 'testimonials-widget' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
|
1589 |
9 => sprintf( __( 'Testimonial scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview testimonial</a>', 'testimonials-widget' ), date_i18n( 'M j, Y @ G:i', strtotime( $post->post_date ) ), esc_url( get_permalink( $post->ID ) ) ),
|
1590 |
10 => sprintf( __( 'Testimonial draft updated. <a target="_blank" href="%s">Preview testimonial</a>', 'testimonials-widget' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) )
|
@@ -1619,7 +1619,7 @@ EOF;
|
|
1619 |
}
|
1620 |
|
1621 |
|
1622 |
-
add_action( 'plugins_loaded', 'testimonialswidget_init' );
|
1623 |
|
1624 |
|
1625 |
/**
|
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.2
|
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.2';
|
32 |
|
33 |
private static $base = null;
|
34 |
private static $max_num_pages = 0;
|
59 |
|
60 |
|
61 |
public function admin_init() {
|
62 |
+
self::$settings_link = '<a href="' . get_admin_url() . 'edit.php?post_type=' . Testimonials_Widget::PT . '&page=' . Testimonials_Widget_Settings::ID . '">' . esc_html__( 'Settings', 'testimonials-widget' ) . '</a>';
|
63 |
|
64 |
$this->add_meta_box_testimonials_widget();
|
65 |
$this->update();
|
249 |
|
250 |
public function admin_notices_donate() {
|
251 |
$content = '<div class="updated"><p>';
|
252 |
+
$content .= sprintf( esc_html__( 'Please donate $2 towards development and support of this Testimonials Widget plugin. %s', 'testimonials-widget' ), self::$donate_button );
|
253 |
$content .= '</p></div>';
|
254 |
|
255 |
echo $content;
|
445 |
// order of keys matches column ordering
|
446 |
$columns = array(
|
447 |
'cb' => '<input type="checkbox" />',
|
448 |
+
'thumbnail' => esc_html__( 'Image', 'testimonials-widget' ),
|
449 |
+
'title' => esc_html__( 'Source', 'testimonials-widget' ),
|
450 |
+
'shortcode' => esc_html__( 'Shortcodes', 'testimonials-widget' ),
|
451 |
+
'testimonials-widget-title' => esc_html__( 'Title', 'testimonials-widget' ),
|
452 |
+
'testimonials-widget-location' => esc_html__( 'Location', 'testimonials-widget' ),
|
453 |
+
'testimonials-widget-email' => esc_html__( 'Email', 'testimonials-widget' ),
|
454 |
+
'testimonials-widget-company' => esc_html__( 'Company', 'testimonials-widget' ),
|
455 |
+
'testimonials-widget-url' => esc_html__( 'URL', 'testimonials-widget' ),
|
456 |
+
'author' => esc_html__( 'Published by', 'testimonials-widget' ),
|
457 |
+
'date' => esc_html__( 'Date', 'testimonials-widget' ),
|
458 |
);
|
459 |
|
460 |
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
461 |
if ( ! $use_cpt_taxonomy ) {
|
462 |
+
$columns[ 'categories' ] = esc_html__( 'Category', 'testimonials-widget' );
|
463 |
+
$columns[ 'tags' ] = esc_html__( 'Tags', 'testimonials-widget' );
|
464 |
} else {
|
465 |
+
$columns[ self::$cpt_category ] = esc_html__( 'Category', 'testimonials-widget' );
|
466 |
+
$columns[ self::$cpt_tags ] = esc_html__( 'Tags', 'testimonials-widget' );
|
467 |
}
|
468 |
|
469 |
$columns = apply_filters( 'testimonials_widget_columns', $columns );
|
474 |
|
475 |
public function init_post_type() {
|
476 |
$labels = array(
|
477 |
+
'add_new' => esc_html__( 'Add New', 'testimonials-widget' ),
|
478 |
+
'add_new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
479 |
+
'edit_item' => esc_html__( 'Edit Testimonial', 'testimonials-widget' ),
|
480 |
+
'name' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
481 |
+
'new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
482 |
+
'not_found' => esc_html__( 'No testimonials found', 'testimonials-widget' ),
|
483 |
+
'not_found_in_trash' => esc_html__( 'No testimonials found in Trash', 'testimonials-widget' ),
|
484 |
'parent_item_colon' => null,
|
485 |
+
'search_items' => esc_html__( 'Search Testimonials', 'testimonials-widget' ),
|
486 |
+
'singular_name' => esc_html__( 'Testimonial', 'testimonials-widget' ),
|
487 |
+
'view_item' => esc_html__( 'View Testimonial', 'testimonials-widget' ),
|
488 |
);
|
489 |
|
490 |
$supports = array(
|
522 |
}
|
523 |
|
524 |
$args = array(
|
525 |
+
'label' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
526 |
'capability_type' => 'post',
|
527 |
'has_archive' => $has_archive,
|
528 |
'hierarchical' => false,
|
801 |
|
802 |
if ( empty( $testimonials ) && ! $hide_not_found ) {
|
803 |
$testimonials = array(
|
804 |
+
array( 'testimonial_content' => esc_html__( 'No testimonials found', 'testimonials-widget' ) ),
|
805 |
);
|
806 |
}
|
807 |
|
912 |
|
913 |
public static function get_quote( $testimonial, $atts, $widget_number ) {
|
914 |
$char_limit = $atts['char_limit'];
|
915 |
+
$content_more = apply_filters( 'testimonials_widget_content_more', esc_html__( '…', 'testimonials-widget' ) );
|
916 |
$content_more .= self::$tag_close_quote;
|
917 |
$do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
|
918 |
$use_quote_tag = $atts['use_quote_tag'];
|
1231 |
$html .= ' <div class="alignleft">';
|
1232 |
|
1233 |
if ( 1 < $paged ) {
|
1234 |
+
$laquo = apply_filters( 'testimonials_widget_previous_posts_link_text', esc_html__( '«', 'testimonials-widget' ) );
|
1235 |
$html .= get_previous_posts_link( $laquo, $paged );
|
1236 |
}
|
1237 |
|
1240 |
$html .= ' <div class="alignright">';
|
1241 |
|
1242 |
if ( $paged != self::$max_num_pages ) {
|
1243 |
+
$raquo = apply_filters( 'testimonials_widget_next_posts_link_text', esc_html__( '»', 'testimonials-widget' ) );
|
1244 |
$html .= get_next_posts_link( $raquo, self::$max_num_pages );
|
1245 |
}
|
1246 |
|
1490 |
|
1491 |
$fields = array(
|
1492 |
array(
|
1493 |
+
'name' => esc_html__( 'Title', 'testimonials-widget' ),
|
1494 |
'id' => 'testimonials-widget-title',
|
1495 |
'type' => 'text',
|
1496 |
'desc' => '',
|
1497 |
),
|
1498 |
array(
|
1499 |
+
'name' => esc_html__( 'Location', 'testimonials-widget' ),
|
1500 |
'id' => 'testimonials-widget-location',
|
1501 |
'type' => 'text',
|
1502 |
'desc' => '',
|
1503 |
),
|
1504 |
array(
|
1505 |
+
'name' => esc_html__( 'Email', 'testimonials-widget' ),
|
1506 |
'id' => 'testimonials-widget-email',
|
1507 |
'type' => 'text',
|
1508 |
'desc' => '',
|
1509 |
),
|
1510 |
array(
|
1511 |
+
'name' => esc_html__( 'Company', 'testimonials-widget' ),
|
1512 |
'id' => 'testimonials-widget-company',
|
1513 |
'type' => 'text',
|
1514 |
'desc' => '',
|
1515 |
),
|
1516 |
array(
|
1517 |
+
'name' => esc_html__( 'URL', 'testimonials-widget' ),
|
1518 |
'id' => 'testimonials-widget-url',
|
1519 |
'type' => 'text',
|
1520 |
'desc' => '',
|
1526 |
$meta_box = redrokk_metabox_class::getInstance(
|
1527 |
self::OLD_NAME,
|
1528 |
array(
|
1529 |
+
'title' => esc_html__( 'Testimonial Data', 'testimonials-widget' ),
|
1530 |
'description' => '',
|
1531 |
'_object_types' => 'testimonials-widget',
|
1532 |
'priority' => 'high',
|
1551 |
|
1552 |
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1553 |
switch ( $translation ) {
|
1554 |
+
case esc_html__( 'Enter title here', 'testimonials-widget' ):
|
1555 |
+
return esc_html__( 'Enter testimonial source here', 'testimonials-widget' );
|
1556 |
break;
|
1557 |
}
|
1558 |
}
|
1578 |
$m[ self::PT ] = array(
|
1579 |
0 => '', // Unused. Messages start at index 1.
|
1580 |
1 => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1581 |
+
2 => esc_html__( 'Custom field updated.', 'testimonials-widget' ),
|
1582 |
+
3 => esc_html__( 'Custom field deleted.', 'testimonials-widget' ),
|
1583 |
+
4 => esc_html__( 'Testimonial updated.', 'testimonials-widget' ),
|
1584 |
/* translators: %s: date and time of the revision */
|
1585 |
+
5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Testimonial restored to revision from %s', 'testimonials-widget' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
1586 |
6 => sprintf( __( 'Testimonial published. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1587 |
+
7 => esc_html__( 'Testimonial saved.', 'testimonials-widget' ),
|
1588 |
8 => sprintf( __( 'Testimonial submitted. <a target="_blank" href="%s">Preview testimonial</a>', 'testimonials-widget' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
|
1589 |
9 => sprintf( __( 'Testimonial scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview testimonial</a>', 'testimonials-widget' ), date_i18n( 'M j, Y @ G:i', strtotime( $post->post_date ) ), esc_url( get_permalink( $post->ID ) ) ),
|
1590 |
10 => sprintf( __( 'Testimonial draft updated. <a target="_blank" href="%s">Preview testimonial</a>', 'testimonials-widget' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) )
|
1619 |
}
|
1620 |
|
1621 |
|
1622 |
+
add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
1623 |
|
1624 |
|
1625 |
/**
|