Version Description
= 2.16.0 =
- Requires PHP 5.3+
= 2.15.0 =
- If upgrading, bxSlider will not be enabled by default. You must enable it in your widget and global settings. CSS customizations must be reviewed to have the
.active
and.display-none
classes removed. The main.testimonials-widget-testimonial
class also need thedisplay: none;
andclear: left;
removed.
= 2.14.0 =
- 60 modifications See Changelog
- CSS wp_register_style and wp_enqueue_style slug changed from 'testimonials-widget' to 'Testimonials_Widget'
- Gravatar image size now based upon Thumbnail size in Media Settings
- Scripts
ksort
removed. Usearray_unshift
in yourtestimonials_widget_testimonials_js
filters instead. - Testimonials > Settings, General tab, option Enable Review Schema? is enabled by default.
= 2.13.6 =
- IE 7 CSS moved to separate file. Include via Testimonials > Settings if needed
= 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.17.2 |
Comparing to | |
See all releases |
Code changes from version 2.18.4 to 2.17.2
- API.md +0 -4
- CHANGELOG.md +0 -60
- README.md +2 -1
- TODO.md +11 -0
- changelog.txt +969 -0
- {assets/css → css}/images/bx_loader.gif +0 -0
- {assets/css → css}/images/controls.png +0 -0
- {assets/css → css}/jquery.bxslider.css +0 -0
- {assets/css → css}/testimonials-widget-2.14.0.css +0 -0
- {assets/css → css}/testimonials-widget-ie7.css +0 -0
- forum-responses.txt +29 -0
- includes/class-testimonials-widget.php +0 -2112
- {assets/js → js}/jquery.bxslider.js +0 -0
- {assets/js → js}/jquery.easing.1.3.js +0 -0
- {assets/js → js}/jquery.fitvids.js +0 -0
- languages/testimonials-widget.pot +339 -363
- lib/aihrus/.gitignore +2 -0
- {includes/libraries/aihrus-framework → lib/aihrus}/CHANGELOG.md +2 -26
- {includes/libraries/aihrus-framework → lib/aihrus}/LICENSE +0 -0
- {includes/libraries/aihrus-framework → lib/aihrus}/README.md +14 -13
- lib/aihrus/TODO.md +3 -0
- {includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-common.php +8 -10
- {includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-licensing.php +1 -1
- {includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-settings.php +22 -51
- {includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-widget.php +3 -3
- {includes/libraries/aihrus-framework → lib/aihrus}/interface-aihrus-common.php +1 -1
- {includes/libraries/aihrus-framework → lib/aihrus}/interface-aihrus-licensing.php +1 -1
- {includes/libraries/aihrus-framework → lib/aihrus}/interface-aihrus-widget.php +1 -1
- {includes/libraries/aihrus-framework → lib/aihrus}/requirements.php +19 -19
- {includes/libraries → lib}/class-redrokk-metabox-class.php +0 -0
- {includes → lib}/class-testimonials-widget-settings.php +26 -24
- {includes → lib}/class-testimonials-widget-widget.php +11 -5
- {includes → lib}/requirements.php +2 -2
- {assets/images → media}/michael-cannon-red-square-300x2251.jpg +0 -0
- phpcs.ruleset.xml +31 -0
- phpmd.ruleset.xml +21 -0
- readme.txt +15 -48
- testimonials-widget-ie7.css +15 -0
- assets/css/testimonials-widget.css → testimonials-widget.css +0 -10
- testimonials-widget.php +2033 -55
API.md
CHANGED
@@ -179,10 +179,6 @@ The [Testimonials plugin](http://wordpress.org/plugins/testimonials-widget/) com
|
|
179 |
|
180 |
Alows for display of custom input types.
|
181 |
|
182 |
-
* `testimonials_widget_settings_defaults`
|
183 |
-
|
184 |
-
Override settings defaults with your own.
|
185 |
-
|
186 |
## Need More?
|
187 |
|
188 |
Further examples and more can be found by reading and searching the [Testimonials Knowledge Base](https://aihrus.zendesk.com/categories/20104507-Testimonials-Widget) and [source code](https://github.com/michael-cannon/testimonials-widget).
|
179 |
|
180 |
Alows for display of custom input types.
|
181 |
|
|
|
|
|
|
|
|
|
182 |
## Need More?
|
183 |
|
184 |
Further examples and more can be found by reading and searching the [Testimonials Knowledge Base](https://aihrus.zendesk.com/categories/20104507-Testimonials-Widget) and [source code](https://github.com/michael-cannon/testimonials-widget).
|
CHANGELOG.md
CHANGED
@@ -2,66 +2,6 @@
|
|
2 |
|
3 |
## master
|
4 |
|
5 |
-
## 2.18.4
|
6 |
-
* RESOLVE #69 Disallow .display-none when only 1 testimonials or no refresh_interval
|
7 |
-
|
8 |
-
## 2.18.3
|
9 |
-
* Add option "Exclude bxSlider CSS?"
|
10 |
-
* Exit if accessed directly
|
11 |
-
* Initially no show bxSlider widget testimonials entries
|
12 |
-
* RESOLVE #61 Horizontal transitions not working in widget
|
13 |
-
* RESOLVE #62 Bootstrap class name hide conflict
|
14 |
-
* RESOLVE #65 Widget blank options aren't saving correctly
|
15 |
-
* Update copyright year
|
16 |
-
|
17 |
-
## 2.18.2
|
18 |
-
* RESOLVE #57 Testimonials Stacking on first load
|
19 |
-
|
20 |
-
## 2.18.1
|
21 |
-
* Add FAQ How do I create a testimonial record?
|
22 |
-
* Add screenshot 21. Shortcode helpers on category and tag admin screens
|
23 |
-
* Correct Codeship image include
|
24 |
-
* jQuery 1.10+ note
|
25 |
-
* Remove "Use bxSlider?" and "Include IE7 CSS" from widget options
|
26 |
-
* Remove option "Always Load CSS?" `force_css_loading`
|
27 |
-
* Remove Travis CI configuration. Using Codeship.io instead
|
28 |
-
* Require Aihrus Framework 1.0.3
|
29 |
-
* RESOLVE #2 Add shortcode column to categories page
|
30 |
-
* RESOLVE #3 Add shortcode column to tags page
|
31 |
-
* RESOLVE #54 Notice: Constant TW_AIHR_VERSION already defined
|
32 |
-
* RESOLVE #8 Validate HTML
|
33 |
-
* RESOLVE Featured image via Gravatar not saving correctly
|
34 |
-
* RESOLVE Not passing requirements failure to premium plugin
|
35 |
-
* RESOLVE Schema output cluttered up single view
|
36 |
-
* RESOLVE Scripts not loading in footer
|
37 |
-
* Support JetPack's Publicize module
|
38 |
-
* Verbiage updates
|
39 |
-
* Widgets don't rotate notice
|
40 |
-
|
41 |
-
## 2.18.0
|
42 |
-
* Add Codeship.io status
|
43 |
-
* Check for init and theme functions to exist
|
44 |
-
* CLOSE #11 Conflicts with "Re-order posts within Categories"
|
45 |
-
* Link to Testimonials by WooThemes migrator
|
46 |
-
* Move ci to tests
|
47 |
-
* Move CSS to assets
|
48 |
-
* Move files to assets
|
49 |
-
* Move lib to includes/libraries
|
50 |
-
* Move main class to own class file
|
51 |
-
* Remove Travis CI status
|
52 |
-
* RESOLVE #43 hatom feed errors
|
53 |
-
* RESOLVE #45 Plugin Disables Itself
|
54 |
-
* RESOLVE #7 Support subdirectory testimonial landing page
|
55 |
-
* RESOLVE Non-SSL protocol used for scripts and styles
|
56 |
-
* Revise required file paths
|
57 |
-
* Specify a “Text Domain” and “Domain Path”
|
58 |
-
* Update shortcode examples
|
59 |
-
* Update verbiage
|
60 |
-
* Use $plugin_assets than $plugin_path
|
61 |
-
|
62 |
-
## 2.17.3
|
63 |
-
* RESOLVE #44 Blank testimonial between each rotating testimonial
|
64 |
-
|
65 |
## 2.17.2
|
66 |
* RESOLVE Testimonials Premium load issue
|
67 |
* RESOLVE [Testimonial box displays as all white in widget on IE9](http://wordpress.org/support/topic/testimonial-box-displays-as-all-white-in-widget-on-ie9). Thank you [jbmoore](http://wordpress.org/support/profile/jbmoore)
|
2 |
|
3 |
## master
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
## 2.17.2
|
6 |
* RESOLVE Testimonials Premium load issue
|
7 |
* RESOLVE [Testimonial box displays as all white in widget on IE9](http://wordpress.org/support/topic/testimonial-box-displays-as-all-white-in-widget-on-ie9). Thank you [jbmoore](http://wordpress.org/support/profile/jbmoore)
|
README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
# README Testimonials WordPress Plugin
|
2 |
|
3 |
-
[![
|
4 |
[![ProjectStatus](http://stillmaintained.com/michael-cannon/testimonials-widget.png)](http://stillmaintained.com/michael-cannon/testimonials-widget)
|
|
|
5 |
|
6 |
## Welcome to the Testimonials Github repository
|
7 |
|
1 |
# README Testimonials 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 |
+
[Codeship status](https://www.codeship.io/projects/b5524630-43f6-0131-3b4d-76a8e32a74d4/status)
|
6 |
|
7 |
## Welcome to the Testimonials Github repository
|
8 |
|
TODO.md
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# TODO Testimonials
|
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 |
+
* Add shortcode column to categories page
|
6 |
+
* Add shortcode column to tags page
|
7 |
+
* Consolidate schema by testimonial item
|
8 |
+
* Move suggest JS to footer
|
9 |
+
* On widget expand/collaspe switch labels
|
10 |
+
* Support subdirectory testimonial landing page
|
11 |
+
* Validate HTML
|
changelog.txt
ADDED
@@ -0,0 +1,969 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Testimonials Widget ===
|
2 |
+
|
3 |
+
== Changelog ==
|
4 |
+
|
5 |
+
= trunk =
|
6 |
+
|
7 |
+
= 2.13.0 =
|
8 |
+
* Add PHP Copy and Paste Detector
|
9 |
+
* Add PHP run-time checks
|
10 |
+
* Add Travis CI with PHP Code Sniffer
|
11 |
+
* Add developer README and CONTRIBUTING docs
|
12 |
+
* BUGFIX DOM Element error on last testimonial rotation
|
13 |
+
* BUGFIX Data delete on uninstall not firing
|
14 |
+
* BUGFIX Testimonials Widget edit page doesn't display custom taxonomies
|
15 |
+
* Beta test update text
|
16 |
+
* Coding standards updates
|
17 |
+
* Create TODO doc
|
18 |
+
* Disabled PHP Mess Detector
|
19 |
+
* Don't escape already escaped text
|
20 |
+
* Don't load plugin till all are loaded
|
21 |
+
* FEATURE [Animated widget rotation](http://wordpress.org/support/topic/animate-jumpy-widget)
|
22 |
+
* OPTION Add Disable animation?
|
23 |
+
* Relocate activation, deactivation, and uninstall hooks
|
24 |
+
* Remove WP_UNINSTALL_PLUGIN reference
|
25 |
+
* Remove class from settings page link
|
26 |
+
* Rename class-settings-testimonials-widget.php to class-testimonials-widget-settings.php
|
27 |
+
* Revise API doc headings
|
28 |
+
* Revise instance creators to only fire when ready
|
29 |
+
* Update Filters listing to API document
|
30 |
+
* Update POT
|
31 |
+
|
32 |
+
= 2.12.8 =
|
33 |
+
* Add filter `testimonials_widget_cite_html` to adjust cite contents - Thank you [Dimitrios](http://visualweb.gr/) for the suggestion
|
34 |
+
* BUGFIX Warning: Illegal string offset 'exclude'
|
35 |
+
* Replace __ with esc_html__
|
36 |
+
* Update Premium features
|
37 |
+
|
38 |
+
= 2.12.7 =
|
39 |
+
* BUGFIX Link targets affected page navigation
|
40 |
+
* Removed donate monthly show code
|
41 |
+
|
42 |
+
= 2.12.6 =
|
43 |
+
* BUGFIX If no refresh_interval, then LIMIT 1
|
44 |
+
* Change donate from $1 to $2 due to fees
|
45 |
+
* Dashboard testimonials count statistics
|
46 |
+
* Display donate on major/minor version release or if it's been a month
|
47 |
+
* Remove braces from simple if/else structures
|
48 |
+
* Settings page inheritance note
|
49 |
+
* Update premium features listing
|
50 |
+
* Use donate button than text
|
51 |
+
|
52 |
+
= 2.12.5 =
|
53 |
+
* BUGFIX Correct loose vs strict comparison for intval and absint
|
54 |
+
* If no refresh_interval, then LIMIT 1
|
55 |
+
|
56 |
+
= 2.12.4 =
|
57 |
+
* BUGFIX Settings jQuery UI Tabs conflict
|
58 |
+
* NOT BUG [WPML bug](http://wordpress.org/support/topic/wpml-bug?replies=1)
|
59 |
+
* Remove settings.css
|
60 |
+
* Settings about section height fix
|
61 |
+
* TODOs update
|
62 |
+
* Update Premium product page URL
|
63 |
+
* Update WPML configuration
|
64 |
+
* Use PayPal donate image in settings
|
65 |
+
|
66 |
+
= 2.12.3 =
|
67 |
+
* BUGFIX Import option constantly overrides settings
|
68 |
+
* BUGFIX [Error When Database Does Not Exist Yet](http://wordpress.org/support/topic/error-when-database-does-not-exist-yet)
|
69 |
+
|
70 |
+
= 2.12.2 =
|
71 |
+
* $1 donation link admin_notice on installation or major/minor update
|
72 |
+
* Add forum responses cheat sheet
|
73 |
+
* Auto flush URLs if archive or testimonial slugs change
|
74 |
+
* BUGFIX Respect attribute settings by preventing reset_defaults and importexport activating on front-end
|
75 |
+
* Convert slug, slugs, and term setting items to lowercase on save
|
76 |
+
* Correctly delete all testimonials options on delete
|
77 |
+
* Don't create class instance unless plugin is activated
|
78 |
+
* FEATURE Allow for custom post type categories and tags [Idea via crdunst](http://wordpress.org/support/topic/feedback-tagscategories?replies=3#post-4160839)
|
79 |
+
* Prevent same has_archive and rewrite_slug which causes URL problems
|
80 |
+
* Remove excess FAQ text
|
81 |
+
* Remove unused settings and methods
|
82 |
+
* Remove unused testing settings
|
83 |
+
* Set version for which admin notice to display
|
84 |
+
|
85 |
+
= 2.12.1 =
|
86 |
+
* BUGFIX Settings memory leak [Sites hosed after update 2.12.0](http://wordpress.org/support/topic/premium-sites-hosed-after-update-2120)
|
87 |
+
* BUGFIX [importexport settings failure](http://wordpress.org/support/topic/errors-after-updating)
|
88 |
+
* Change update warning verbiage
|
89 |
+
* Update FAQ & support links to knowledge base
|
90 |
+
|
91 |
+
= 2.12.0 =
|
92 |
+
* Add file headers to lib/class*
|
93 |
+
* Add filter testimonials_widget_widget_options to alter displayed widget options
|
94 |
+
* BUGFIX Correct settings required validation `break 2`
|
95 |
+
* BUGFIX Non-static method Testimonials_Widget::get_testimonials_html() should not be called statically
|
96 |
+
* CSS rename testimonialswidget_testimonial(s) to testimonials-widget-testimonial(s)
|
97 |
+
* Correct static get_testimonials_html, get_testimonials_htmls, widget_options function declaration
|
98 |
+
* Correct static validators call
|
99 |
+
* Explain options inheritance
|
100 |
+
* FEATURE Remove Plugin Data on Deletion? - Delete all Testimonials Widget data and options from database on plugin deletion
|
101 |
+
* FEATURE Settings export/import
|
102 |
+
* Refactor out get_quote and get_cite from get_testimonial_html
|
103 |
+
* Refactor excess settings grab in widget_options
|
104 |
+
* Remove $blank from testimonials_truncate()
|
105 |
+
* Remove unused code
|
106 |
+
* Rename metabox.class.php class-redrokk-metabox-class.php
|
107 |
+
* Rename settings.testimonials-widget.php class-settings-testimonials-widget.php
|
108 |
+
* Rename testimonials-widget-widget.php class-testimonials-widget-widget.php
|
109 |
+
* Revise FAQ
|
110 |
+
* SCREENSHOT 17. Testimonials Widget Settings > Compatibility & Reset tab
|
111 |
+
* Show latest updates notice on activation
|
112 |
+
* Spellcheck readme.txt
|
113 |
+
* Update CSS for WordPress Coding standards
|
114 |
+
* Update FAQ
|
115 |
+
* Update JavaScript for WordPress Coding standards
|
116 |
+
* Update PHP for WordPress Coding Standards
|
117 |
+
* Update POT
|
118 |
+
* Update TODOs
|
119 |
+
* Update premium features
|
120 |
+
* Update rulesets
|
121 |
+
* Use ID for widget
|
122 |
+
|
123 |
+
= 2.11.3 =
|
124 |
+
* BUGFIX [Can't set featured image](http://wordpress.org/support/topic/cant-set-featured-image-3)
|
125 |
+
* Begin WordPress coding standard cleanup
|
126 |
+
* Bold option headers
|
127 |
+
* Change `has_archive` default from `testimonials` to `testimonials-archive`
|
128 |
+
* Clean up static method calls to prevent PHP Strict notices
|
129 |
+
* Correct filter name `testimonials_widget_next_posts_link` to `testimonials_widget_next_posts_link_text`
|
130 |
+
* Correct static methods calling
|
131 |
+
* Secure activation, deactivation, uninstall operations
|
132 |
+
* Update POT
|
133 |
+
* Update profile
|
134 |
+
|
135 |
+
= 2.11.2 =
|
136 |
+
* Add `min1` and `nozero` validation
|
137 |
+
* Always include settings class
|
138 |
+
* BUGFIX Don't prepend http to email addresses
|
139 |
+
* Move lesser used widget options to expandable Additional Widget Options section
|
140 |
+
* Move settings setup to `init`
|
141 |
+
* Revise `absint` and `intval` validation to default on blank entry
|
142 |
+
* Update POT
|
143 |
+
* Update TODO
|
144 |
+
* Update text domain for localization and POT
|
145 |
+
* Use `links_add_target` for widget title link
|
146 |
+
|
147 |
+
= 2.11.1 =
|
148 |
+
* BUGFIX [Fatal error: Testimonials_Widget_Settings](http://wordpress.org/support/topic/fatal-error-testimonials_widget_settings)
|
149 |
+
|
150 |
+
= 2.11.0 =
|
151 |
+
* Add Option "Hide Image in Single View?" `hide_image_single`
|
152 |
+
* Add `.author` and `.email` to CSS
|
153 |
+
* Add `.single` to single view testimonials
|
154 |
+
* Add location to meta_key ordering options
|
155 |
+
* BUGFIX [Convert q tags to blockquote](http://wordpress.org/support/topic/open-link-in-new-tab-html-validation) [Why?](http://www.w3schools.com/tags/tag_blockquote.asp)
|
156 |
+
* BUGFIX [Fix cite tag usage - it's title, not source](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-cite-element) using [T](http://html5doctor.com/blockquote-q-cite/) [BD](http://oli.jp/2011/blockquote/)
|
157 |
+
* Beta testers needed section added
|
158 |
+
* Disable self-generated quotation marks
|
159 |
+
* Enable backwards compatibility for default options
|
160 |
+
* Ignore init() during AJAX and autosave operations
|
161 |
+
* Optimize DB after uninstall
|
162 |
+
* Rename CSS attributes to credit
|
163 |
+
* Revise README verbiage in general
|
164 |
+
* Simplify CSS naming
|
165 |
+
* Update Allow Comments verbiage
|
166 |
+
* Update TODOs
|
167 |
+
* Update features listing
|
168 |
+
* Update options listing
|
169 |
+
* Update premium features
|
170 |
+
* Update readme formatting
|
171 |
+
|
172 |
+
= 2.10.3 =
|
173 |
+
* Add "Menu Order" to Order By options
|
174 |
+
* Add Height option to automatically set min and max height
|
175 |
+
* BUGFIX [Only one testimonial displaying](http://wordpress.org/support/topic/only-one-testimonial-displaying)
|
176 |
+
* BUGFIX [Post Types Order](http://wordpress.org/support/topic/random-order-doesnt-work) - sorting conflict
|
177 |
+
* Delete data on uninstall
|
178 |
+
* Enable quotes and join for IE7 - Thank you [SFMichael](http://wordpress.org/support/topic/ie-7-quotes-fix)
|
179 |
+
* Flush URLs on deactivation
|
180 |
+
* Revise self::$base usage
|
181 |
+
* Revise settings_link handling
|
182 |
+
* Screenshot 16 Testimonials Widget Settings > Widget tab
|
183 |
+
* Update Premium link
|
184 |
+
* Update TODOs
|
185 |
+
|
186 |
+
= 2.10.2 =
|
187 |
+
* BUGFIX Settings initialization overwrote previous settings
|
188 |
+
|
189 |
+
= 2.10.1 =
|
190 |
+
* Moved [FAQ](http://aihr.us/testimonials-widget/faq/)
|
191 |
+
* Removed premium screenshots
|
192 |
+
* Rename screenshot-3.png screenshot-2.png
|
193 |
+
* Rename screenshot-4.png screenshot-3.png
|
194 |
+
* Rename screenshot-5.png screenshot-4.png
|
195 |
+
* Rename screenshot-6.png screenshot-5.png
|
196 |
+
* Rename screenshot-7.png screenshot-6.png
|
197 |
+
* Rename screenshot-8.png screenshot-7.png
|
198 |
+
* Rename screenshot-13.png screenshot-8.png
|
199 |
+
* Rename screenshot-14.png screenshot-9.png
|
200 |
+
* Rename screenshot-21.png screenshot-10.png
|
201 |
+
* Rename screenshot-22.png screenshot-11.png
|
202 |
+
* Rename screenshot-23.png screenshot-12.png
|
203 |
+
* Rename screenshot-24.png screenshot-13.png
|
204 |
+
* Rename screenshot-25.png screenshot-14.png
|
205 |
+
* Rename screenshot-26.png screenshot-15.png
|
206 |
+
* Screenshot 2 removed
|
207 |
+
* Screenshot 9 removed
|
208 |
+
* Screenshot 10 removed
|
209 |
+
* Screenshot 11 removed
|
210 |
+
* Screenshot 12 removed
|
211 |
+
* Screenshot 15 removed
|
212 |
+
* Screenshot 16 removed
|
213 |
+
* Screenshot 17 removed
|
214 |
+
* Screenshot 18 removed
|
215 |
+
* Screenshot 19 removed
|
216 |
+
* Screenshot 20 removed
|
217 |
+
* Screenshot 27 removed
|
218 |
+
* Screenshot 28 removed
|
219 |
+
|
220 |
+
= 2.10.0 =
|
221 |
+
* Add `hide_content` option verbiage
|
222 |
+
* Add screenshot 27 `[[testimonialswidgetpremium_form]]` – Add a Testimonial
|
223 |
+
* Add screenshot 28 Testimonials Widget Settings > Entry Form tab
|
224 |
+
* Added rel="nofollow" to URL - Thank you Nicholas Corrieri for the suggestion
|
225 |
+
* Convert validation to configuration
|
226 |
+
* Correct breakline on radio settings display
|
227 |
+
* Correct checkbox checking
|
228 |
+
* Correct paging handling
|
229 |
+
* Correct post_status selection for single view
|
230 |
+
* Describe settings defaults
|
231 |
+
* Dutch translation by Bjorn Robijns
|
232 |
+
* Enable echo/return for display_setting
|
233 |
+
* Enable file input for settings
|
234 |
+
* Enable widget options no-show
|
235 |
+
* Finish validation configuration move
|
236 |
+
* Form demo link
|
237 |
+
* Move Changelog to changelog.txt
|
238 |
+
* Rename load_sections > _sections
|
239 |
+
* Rename load_settings > settings
|
240 |
+
* Save option defaults
|
241 |
+
* Set missing checkbox values to 0 on validate
|
242 |
+
* TODO Delete data option on deactivation
|
243 |
+
* Update Premium description
|
244 |
+
* Update WPML configuration
|
245 |
+
|
246 |
+
= 2.9.1 =
|
247 |
+
* BUGFIX Assigning the return value of new by reference is deprecated in metabox.class.php
|
248 |
+
|
249 |
+
= 2.9.0 =
|
250 |
+
* Add location meta field after title
|
251 |
+
* Add location related options
|
252 |
+
* FAQ 18, 34, 35 update
|
253 |
+
* Screenshot 2, 4, 5 updated
|
254 |
+
* Update POT
|
255 |
+
|
256 |
+
= 2.8.4 =
|
257 |
+
* BUGFIX [Title link does not allow a relative link](http://wordpress.org/support/topic/title-link-does-not-allow-a-relative-link)
|
258 |
+
|
259 |
+
= 2.8.3 =
|
260 |
+
* BUGFIX [Selection > Category Filter doesn't remember >1 category](http://wordpress.org/support/topic/selection-category-filter-doesnt-remember-1-category)
|
261 |
+
* FAQ 67 testimonials paging doesn't work
|
262 |
+
* FAQ 68 feature XYZ
|
263 |
+
|
264 |
+
= 2.8.2 =
|
265 |
+
* Add filter `testimonials_widget_version`
|
266 |
+
* Screenshot 11/16 updated
|
267 |
+
* Update POT
|
268 |
+
* Update Premium features
|
269 |
+
* Version tracking for default settings
|
270 |
+
|
271 |
+
= 2.8.1 =
|
272 |
+
* Customizable archive and testimonial URLs
|
273 |
+
* FAQ 66 Change the testimonials archive or single view URL
|
274 |
+
* Optional commenting on testimonial single-view pages
|
275 |
+
* Screenshot 26 Testimonials Widget Settings > Post Type tab
|
276 |
+
* Update POT
|
277 |
+
|
278 |
+
= 2.8.0 =
|
279 |
+
* Merge in settings branch
|
280 |
+
* Add `tw_get_options`
|
281 |
+
* Add filter `testimonials_widget_sections` – Alter section options
|
282 |
+
* Add filter `testimonials_widget_settings` – Alter setting options
|
283 |
+
* Add settings page 'Selection', 'Ordering', and 'Widget' tabs
|
284 |
+
* BUG with "Post Types Order"
|
285 |
+
* BUGFIX paging when not in singular view
|
286 |
+
* Configure settings within Testimonials_Widget_Settings class
|
287 |
+
* Enable 'Expand/Collapse' view in Widget options
|
288 |
+
* FAQ 65 Disable the stylesheet
|
289 |
+
* FEATURE Remove `.hentry` CSS?
|
290 |
+
* FEATURE Testimonials Widget Settings screen
|
291 |
+
* Removed filters `testimonials_widget_options_update`, `testimonials_widget_options_form`
|
292 |
+
* Rename `widget_text` to `bottom_text`
|
293 |
+
* Revise About page content
|
294 |
+
* Revise Settings page footer
|
295 |
+
* Revise widget options update and validation
|
296 |
+
* Screenshot 11 updated
|
297 |
+
* Screenshot 16 updated
|
298 |
+
* Screenshot 2 updated
|
299 |
+
* Screenshot 22 Testimonials Widget Settings > General tab
|
300 |
+
* Screenshot 23 Expanded 'Selection Options' Testimonials Widget
|
301 |
+
* Screenshot 24 Expanded 'Ordering Options' Testimonials Widget
|
302 |
+
* Screenshot 25 Testimonials Widget Settings > Selection tab
|
303 |
+
* Screenshot 3 updated
|
304 |
+
* Screenshot 4 updated, Expanded 'General Options' Testimonials Widget
|
305 |
+
* Update "Shortcode and Widget Options" verbiage
|
306 |
+
* Update POT file
|
307 |
+
* Use defaults via Testimonials_Widget_Settings class
|
308 |
+
* Validate shortcode and widget options via Testimonials_Widget_Settings::validate_settings
|
309 |
+
* Verbiage updates
|
310 |
+
|
311 |
+
= 2.7.17 =
|
312 |
+
* Add purchase Testimonials Widget Premium plugin meta link
|
313 |
+
* Begin settings screen work
|
314 |
+
* FAQ 20 Update
|
315 |
+
* FAQ 31 Update
|
316 |
+
* FAQ 63 Remove the cite –
|
317 |
+
* FAQ 64 Plugin conflict
|
318 |
+
* Screenshot 21 Poedit Catalog properties
|
319 |
+
* TODO class removal
|
320 |
+
* Update localization verbiage
|
321 |
+
|
322 |
+
= 2.7.16 =
|
323 |
+
* Add comments panel to edit screen - [Thank you BarrieSpence](http://wordpress.org/support/topic/disable-comments-10?replies=1)
|
324 |
+
* TODO Admin panel
|
325 |
+
|
326 |
+
= 2.7.15 =
|
327 |
+
* Add "CSS class" to widget options window
|
328 |
+
* FAQ 31/34/35/50/53/55 updates
|
329 |
+
* FAQ 61 Determine .testimonialswidget_testimonialsNNN
|
330 |
+
* FAQ 62 Category and tag selection
|
331 |
+
* Feature updates
|
332 |
+
* Localization, Hebrew
|
333 |
+
* Screenshot 3 updated
|
334 |
+
|
335 |
+
= 2.7.14 =
|
336 |
+
* BUGFIX [Testimonials archive view URL conflicts with Page slug](http://wordpress.org/support/topic/testimonials-archive-view-url-conflicts-with-page-slug)
|
337 |
+
* FAQ 1 Update - Thank you [aaaronscat](http://wordpress.org/support/topic/writing-php-to-display-rotating-widget-in-a-template) for the inspiration
|
338 |
+
* FAQ 60 Download older versions of Testimonials Widget
|
339 |
+
* Premium feature update
|
340 |
+
* Screenshot 20 added
|
341 |
+
|
342 |
+
= 2.7.13 =
|
343 |
+
* Adapt for `mb_strcut` and `mb_strlen` alternatives
|
344 |
+
* BUGFIX [Widget doesn't appear](http://wordpress.org/support/topic/widget-doesnt-appear-1)
|
345 |
+
* Update POT
|
346 |
+
|
347 |
+
= 2.7.12 =
|
348 |
+
* Change Aihrus support email to contact form
|
349 |
+
* FAQ 1 Update - Thank you [aaaronscat](http://wordpress.org/support/topic/writing-php-to-display-rotating-widget-in-a-template) for the inspiration
|
350 |
+
* Update Testimonials Widget Premium URL
|
351 |
+
|
352 |
+
= 2.7.11 =
|
353 |
+
* Citation styling note
|
354 |
+
* Removed sub-category shortcode example
|
355 |
+
* Thanks to Joe Weber for asset header
|
356 |
+
* Update premium URL
|
357 |
+
* Update premium features
|
358 |
+
* Update premium purchase URL
|
359 |
+
|
360 |
+
= 2.7.10 =
|
361 |
+
* BUGFIX extra excerpt in single view
|
362 |
+
* Screenshot 11 updated
|
363 |
+
* Update premium features
|
364 |
+
|
365 |
+
= 2.7.9 =
|
366 |
+
* Revise content truncation to respect HTML tags
|
367 |
+
* Update premium description
|
368 |
+
* Update premium features
|
369 |
+
|
370 |
+
= 2.7.8 =
|
371 |
+
* Add `before` and `after` options to `paging`
|
372 |
+
* FAQ 58 Specify testimonials per page or section
|
373 |
+
* FAQ 59 Rotating widget show all testimonials than only one at a time
|
374 |
+
* Revert on-demand CSS to always included
|
375 |
+
* Support process and donation update
|
376 |
+
* Thank you to [mkearns](http://wordpress.org/support/topic/just-excellent-3) for specifying a sub-category shortcode example
|
377 |
+
* Update premium URL
|
378 |
+
* Update premium features
|
379 |
+
|
380 |
+
= 2.7.7 =
|
381 |
+
* FAQ 13 Update
|
382 |
+
* FAQ 31 Update
|
383 |
+
* Shortcode examples "[[" to "["
|
384 |
+
|
385 |
+
= 2.7.6 =
|
386 |
+
* Add `[[testimonialswidget_widget]]` to Shortcodes column
|
387 |
+
* CSS cite `margin-top` adjustment
|
388 |
+
* Enable testimonials archive view
|
389 |
+
* FAQ 1 Update
|
390 |
+
* FAQ 52 Update
|
391 |
+
* FAQ 53 Update
|
392 |
+
* FAQ 55 Style page and instance testimonials
|
393 |
+
* FAQ 56 Testimonials archive view URL
|
394 |
+
* FAQ 57 Testimonial single view URL
|
395 |
+
* Only include CSS if testimonials instance called
|
396 |
+
* Screenshot 19 `[[testimonialswidget_widget unique=true]]` Show multiple testimonials in rotation
|
397 |
+
* Set arg defaults via `defaults`
|
398 |
+
|
399 |
+
= 2.7.5 =
|
400 |
+
* BUGFIX PHP Warning for new fields in widget when widget already exists
|
401 |
+
* Exclude IDs option
|
402 |
+
* Implement instance tracking
|
403 |
+
* Protect shortcode examples
|
404 |
+
* Update asset header size
|
405 |
+
* Update premium features
|
406 |
+
|
407 |
+
= 2.7.4 =
|
408 |
+
* Asset header help request
|
409 |
+
* Premium feature updates
|
410 |
+
* Screenshot 9 updated
|
411 |
+
* Screenshot 10 replaced
|
412 |
+
* Screenshot 11 updated
|
413 |
+
* Screenshot 15 updated
|
414 |
+
* Screenshot 17 Single `[[testimonialswidget_list]]` entry with and without 'Read more' link
|
415 |
+
* Screenshot 18 `[[testimonialswidgetpremium_count]]` Examples
|
416 |
+
|
417 |
+
= 2.7.3 =
|
418 |
+
* Apply quotes only around testimonial content
|
419 |
+
* FAQ 13 update
|
420 |
+
* FAQ 34 update
|
421 |
+
* FAQ 35 update
|
422 |
+
* Screenshot 8 replaced
|
423 |
+
* Simplified quotes handling
|
424 |
+
* Upgrade notification
|
425 |
+
|
426 |
+
= 2.7.2 =
|
427 |
+
* FAQ 54 update
|
428 |
+
* Screenshot 12 update
|
429 |
+
* Screenshot 16 Edit testimonial with "Excerpt" and "Read More Link" fields - Testimonials Widget Premium plugin
|
430 |
+
|
431 |
+
= 2.7.1 =
|
432 |
+
* Description update
|
433 |
+
* FAQ 1 update
|
434 |
+
* FAQ 2 update
|
435 |
+
* FAQ 4 update
|
436 |
+
* FAQ 5 update
|
437 |
+
* FAQ 6 update
|
438 |
+
* FAQ 7 update
|
439 |
+
* FAQ 8 update
|
440 |
+
* FAQ 9 update
|
441 |
+
* FAQ 12 update
|
442 |
+
* FAQ 14 update
|
443 |
+
* FAQ 15 update
|
444 |
+
* FAQ 17 update
|
445 |
+
* FAQ 22 update
|
446 |
+
* FAQ 25 update
|
447 |
+
* FAQ 26 update
|
448 |
+
* FAQ 30 update
|
449 |
+
* FAQ 32 update
|
450 |
+
* FAQ 34 update
|
451 |
+
* FAQ 35 update
|
452 |
+
* FAQ 37 update
|
453 |
+
* FAQ 53 update
|
454 |
+
* Feature update
|
455 |
+
* Installation update
|
456 |
+
* Screenshot 1 update
|
457 |
+
* Screenshot 2 update
|
458 |
+
* Screenshot 3 update
|
459 |
+
* Screenshot 4 update
|
460 |
+
* Screenshot 5 update
|
461 |
+
* Screenshot 6 update
|
462 |
+
* Screenshot 7 update
|
463 |
+
* Screenshot 8 replaced
|
464 |
+
* Screenshot 9 replaced
|
465 |
+
* Screenshot 12 update
|
466 |
+
* Screenshot 15 update
|
467 |
+
* Screenshot 16 removed
|
468 |
+
* Screenshot 17 removed
|
469 |
+
* Screenshot 18 removed
|
470 |
+
|
471 |
+
= 2.7.0 =
|
472 |
+
* FAQ 13 Update
|
473 |
+
* FAQ 54 Release early. Release often.
|
474 |
+
* Redo content opening and closing quotes display
|
475 |
+
* Upgrade notification for 2.7.0
|
476 |
+
|
477 |
+
= 2.6.6 =
|
478 |
+
* Remove CSS `overflow: auto` - too many complaints
|
479 |
+
* FAQ 53 Scroll widget based testimonial content
|
480 |
+
|
481 |
+
= 2.6.5 =
|
482 |
+
* BUGFIX: overflow auto than scroll
|
483 |
+
* Correct screenshot 11 & 18
|
484 |
+
|
485 |
+
= 2.6.4 =
|
486 |
+
* Add filters `testimonials_widget_posts_custom_column`, `testimonials_widget_columns`, `testimonials_widget_meta_box`
|
487 |
+
* BUGFIX Testimonial posts page column URL now correctly clickable
|
488 |
+
* Code spacing cleanup
|
489 |
+
* Enabled [scrolling text](http://wordpress.org/support/topic/plugin-testimonials-widget-scroll-for-a-single-but-long-testimonial) for maximum height restricted testimonial widgets
|
490 |
+
* FAQ 34/35 CSS styling update
|
491 |
+
* Scrolling testimonials for maximum height restricted widgets
|
492 |
+
* Testimonials have `get_post_class` applied
|
493 |
+
* Update premium features
|
494 |
+
|
495 |
+
= 2.6.3 =
|
496 |
+
* Add filter `testimonials_widget_query_args`
|
497 |
+
* Add filters `testimonials_widget_testimonials_css`, `testimonials_widget_testimonials_js`
|
498 |
+
* Allow `limit=-1`
|
499 |
+
* BUGFIX Repeated footer CSS and JavaScript
|
500 |
+
* CSS - block disply widget image
|
501 |
+
* FAQ 52 Include testimonies in archive view
|
502 |
+
* Refactor `get_query_args` out of `get_testimonials`
|
503 |
+
* Revise JavaScript handling
|
504 |
+
* Screenshot 17 `require_image`, `minimum_length` and `maximum_length` shortcode option examples
|
505 |
+
* Screenshot 18 Widget with 'Next testimonial…' link
|
506 |
+
* Update POT
|
507 |
+
* Update premium features
|
508 |
+
* Update premium screenshots
|
509 |
+
|
510 |
+
= 2.6.2 =
|
511 |
+
* Compatible with WordPress 3.6
|
512 |
+
* Fix single view PHP warning
|
513 |
+
|
514 |
+
= 2.6.1 =
|
515 |
+
* Add filter `testimonials_widget_testimonial_html_single_content`
|
516 |
+
* Add `force_pad` option to `testimonials_truncate`
|
517 |
+
* Copyright year update
|
518 |
+
* Update Premium features
|
519 |
+
|
520 |
+
= 2.6.0 =
|
521 |
+
* Add FAQ 51 filter `testimonials_widget_get_testimonial_html` usage
|
522 |
+
* FAQ 50 Revise
|
523 |
+
* Reorganize `get_testimonial_html`
|
524 |
+
|
525 |
+
= 2.5.6 =
|
526 |
+
* Add FAQ 50 Example to set widget gradient background color
|
527 |
+
* FAQ 13 Update
|
528 |
+
* FAQ 20 Add PHP tags
|
529 |
+
* FAQ 48 Code correction
|
530 |
+
* FAQ 49 Code correction
|
531 |
+
|
532 |
+
= 2.5.5 =
|
533 |
+
* Enable widget caching
|
534 |
+
* Refactor `get_testimonials_html` to break out CSS/JS generation
|
535 |
+
* Respect [meta capabilities](http://wordpress.org/support/topic/plugin-testimonials-widget-version-20-rewrite-suggestions-request?replies=18#post-3359157)
|
536 |
+
* Revise TODO text
|
537 |
+
* TODO remove Template engine - see `testimonials_widget_testimonial_html*` filters
|
538 |
+
|
539 |
+
= 2.5.4 =
|
540 |
+
* Add filter `testimonials_widget_testimonial_html_single`
|
541 |
+
* Add filter `testimonials_widget_testimonial_html`
|
542 |
+
* Aihrus testimonial URL correction
|
543 |
+
* FAQ 34 Find `testimonialswidget_testimonialsNNN` instance naming
|
544 |
+
* FAQ 48 Customize testimonial list/widget output
|
545 |
+
* FAQ 49 Customize testimonial single output
|
546 |
+
|
547 |
+
= 2.5.3 =
|
548 |
+
* Add donate link in plugin section
|
549 |
+
* Donate links
|
550 |
+
|
551 |
+
= 2.5.2 =
|
552 |
+
* Aihrus branding
|
553 |
+
|
554 |
+
= 2.5.1 =
|
555 |
+
* Update POT file
|
556 |
+
|
557 |
+
= 2.5.0 =
|
558 |
+
* Add option Keep whitespace? - Thank you [kangchenjunga](http://wordpress.org/support/topic/optional-wpautop-functionality-for-better-formatting?replies=2) for the suggestion
|
559 |
+
* Revise FAQ 47
|
560 |
+
* Screenshot 16 - Widget whitespace kept
|
561 |
+
* Update Author URL
|
562 |
+
|
563 |
+
= 2.4.8 =
|
564 |
+
* Donate to purchase verbiage change - One bad experience ruins it for all
|
565 |
+
* FAQ 47 testimonials list in a widget
|
566 |
+
* TODO Add location field
|
567 |
+
* TODO Add plugin donate link
|
568 |
+
* [CleanCSS](http://cleancss.com/) the CSS
|
569 |
+
|
570 |
+
= 2.4.7 =
|
571 |
+
* Add filter `testimonials_widget_defaults_single`
|
572 |
+
* TODO clean up for premium version
|
573 |
+
* TODO Optional wpautop functionality for better formatting
|
574 |
+
|
575 |
+
= 2.4.6 =
|
576 |
+
* Add 'No order' as an Order By widget option
|
577 |
+
* Add FAQ 45 testimonial character limit
|
578 |
+
* Add Recommendation heading
|
579 |
+
* FAQ 23 mention 404
|
580 |
+
* FAQ 46 testimonial ordering by given IDs
|
581 |
+
* Update filters listing
|
582 |
+
* Use `posts_results` filter to put posts in same orders as post__in when orderby=none
|
583 |
+
|
584 |
+
= 2.4.5 =
|
585 |
+
* BUGFIX Missing CSS for testimonialswidget_join_title
|
586 |
+
* FAQ 44 Refresh interval - Thank you [biztips](http://wordpress.org/support/topic/fatal-error-558?replies=6#post-3475595)
|
587 |
+
|
588 |
+
= 2.4.4 =
|
589 |
+
* Add screenshot 15
|
590 |
+
* FAQ 34 Update CSS
|
591 |
+
* FAQ 35 Update CSS
|
592 |
+
* FAQ 42 Exclude testimonial categories from Category widget
|
593 |
+
* FAQ 43 Exclude testimonial categories from my sitemap
|
594 |
+
* Update premium features
|
595 |
+
|
596 |
+
= 2.4.3 =
|
597 |
+
* Adjust default `limit` to 10 from 25
|
598 |
+
* Add CSS `margin-top` to `cite`, `.testimonialswidget_extra` and `.testimonialswidget_text`
|
599 |
+
* BUGFIX [Keep `widget_text` with each testimonial](http://wordpress.org/support/topic/images-not-showin?replies=10)
|
600 |
+
* Donate link update
|
601 |
+
* FAQ 41 Widget height consistency
|
602 |
+
|
603 |
+
= 2.4.2 =
|
604 |
+
* BUGFIX [No image](http://wordpress.org/support/topic/update-17?replies=4) in [widget](http://wordpress.org/support/topic/plugin-testimonials-widget-short-rotating-testimonial-link-to-the-full-testimonial?replies=16)
|
605 |
+
* TODO Add refactor `get_testimonials_html`
|
606 |
+
|
607 |
+
= 2.4.1 =
|
608 |
+
* BUGFIX `testimonialswidget_widget` always random
|
609 |
+
* Comment and verbiage cleanups
|
610 |
+
* Minor refactor of `get_testimonial_html`
|
611 |
+
* TODO Added Template engine
|
612 |
+
|
613 |
+
= 2.4.0 =
|
614 |
+
* FAQ 39 Style the custom widget text
|
615 |
+
* FAQ 40 Page number pagination
|
616 |
+
* FEATURE Custom widget text
|
617 |
+
* FEATURE Make the widget title clickable
|
618 |
+
* FEATURE Page numbers via WP-PageNavi
|
619 |
+
* Refactor paging to use WordPress functions
|
620 |
+
* SCREENSHOT 12 recrop
|
621 |
+
* SCREENSHOT 13 Widget with clickable title and custom text/HTML on bottom
|
622 |
+
* SCREENSHOT 14 WP-PageNavi compatible for page numbers than default arrows
|
623 |
+
* SCREENSHOT 3 update
|
624 |
+
* SCREENSHOT 4 update
|
625 |
+
* TODO Remove Custom widget text - added
|
626 |
+
* TODO Remove Make the widget title clickable - added
|
627 |
+
* TODO Remove Page numbers - added
|
628 |
+
* TODO Remove fields to show - done via theme
|
629 |
+
|
630 |
+
= 2.3.4 =
|
631 |
+
* BUGFIX [Testimonial plugin means Set Feature Image Not Displaying](http://wordpress.org/support/topic/testimonial-plugin-means-set-feature-image-not-displaying)
|
632 |
+
* Test with WordPress 3.5.0 RC1
|
633 |
+
* TODO remove Publish & New - just click 'New Testimonial' after Publishing
|
634 |
+
* Update donate link
|
635 |
+
|
636 |
+
= 2.3.3 =
|
637 |
+
* FEATURE Improved single page view
|
638 |
+
* SCREENSHOT Single testimonial view
|
639 |
+
* TODO Meta capabilities
|
640 |
+
|
641 |
+
= 2.3.2 =
|
642 |
+
* Add filters `testimonials_widget_options_update`, `testimonials_widget_options_form`
|
643 |
+
* BUGFIX ["featured image" module disappeared](http://wordpress.org/support/topic/no-image-upload?replies=12#post-3423001)
|
644 |
+
* Clean up tags per [plugin guidelines](http://wordpress.org/extend/plugins/about/guidelines/)
|
645 |
+
* Combine source and url display when no email or company
|
646 |
+
* FAQ renumber second 36 to 37
|
647 |
+
* FAQ 38 Use filter `testimonials_widget_defaults`
|
648 |
+
* FEATURE Centralized defaults via filter `testimonials_widget_defaults`
|
649 |
+
* Only grab `paged` information once
|
650 |
+
* Prepend HTTP protocol if missing in URL
|
651 |
+
* SCREENSHOT Widget Premium Options
|
652 |
+
* Simplify filter `testimonials_widget_content`
|
653 |
+
* Simplify read more ellipsis
|
654 |
+
* Trim content after formatting
|
655 |
+
|
656 |
+
= 2.3.1 =
|
657 |
+
* BUGFIX [No image upload](http://wordpress.org/support/topic/no-image-upload)
|
658 |
+
* FAQ 36 Why donate?
|
659 |
+
|
660 |
+
= 2.3.0 =
|
661 |
+
* BUGFIX No paging when cached
|
662 |
+
* FAQ 3 Check for empty $data
|
663 |
+
* FAQ 33 Change more content ellipsis
|
664 |
+
* FAQ 34/35 Clarify CSS classes
|
665 |
+
* FAQ 36 Configure Next and Previous page indicators
|
666 |
+
* FEATURE (Premium) [Read More links](http://wordpress.org/support/topic/plugin-testimonials-widget-short-rotating-testimonial-link-to-the-full-testimonial) to [full testimonial page](http://wordpress.org/support/topic/very-easy-to-use-moderately-easy-to-style)
|
667 |
+
* FEATURE Easier to configure Next and Previous page indicators
|
668 |
+
* Refactor `get_testimonial_html`
|
669 |
+
* Refactor testimonial HTML creation methods
|
670 |
+
* Remove "Read more…" preparations
|
671 |
+
* Replace `testimonials_truncate` with WordPress's `wp_trim_words`
|
672 |
+
* SCREENSHOTS 'Read more' links
|
673 |
+
* Sanitize names
|
674 |
+
* TEMP Prevent widget caching
|
675 |
+
* TODO Clarify 'Read more'
|
676 |
+
* TODO Remove - CSV Export
|
677 |
+
* TODO Updates
|
678 |
+
* Update POT file
|
679 |
+
|
680 |
+
= 2.2.9 =
|
681 |
+
* BUGFIX [Testimonial List Loading 2nd Blank Box](http://wordpress.org/support/topic/testimonial-list-loading-2nd-blank-box)
|
682 |
+
|
683 |
+
= 2.2.8 =
|
684 |
+
* Begin "Read more…" preparations
|
685 |
+
* Correct content display processing
|
686 |
+
* FAQ 32 Min-height usage
|
687 |
+
* FAQ 4 Custom code placement clarification
|
688 |
+
* TODO Updates
|
689 |
+
* Widgets display content sans `wpautop` formatting
|
690 |
+
|
691 |
+
= 2.2.7 =
|
692 |
+
* Catch widget number in cache
|
693 |
+
* FAQ Custom query code. Thank you [tcwebguru](http://wordpress.org/support/topic/display-on-page-without-widget)
|
694 |
+
* FAQ Change Testimonials Widget text labels
|
695 |
+
* Language verbiage correction
|
696 |
+
* PHP notice fix - esc_attr
|
697 |
+
* Remove premium code include
|
698 |
+
|
699 |
+
= 2.2.6 =
|
700 |
+
* BUGFIX Widget config not saving correctly
|
701 |
+
* FAQ Export/import
|
702 |
+
* TODO Updates
|
703 |
+
|
704 |
+
= 2.2.5 =
|
705 |
+
* Adapt for [Testimonials Widget Premium plugin](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/)
|
706 |
+
* Add support text
|
707 |
+
* Correct verbiage spacing
|
708 |
+
* Explain `limit`
|
709 |
+
* TODO revisions
|
710 |
+
|
711 |
+
= 2.2.4 =
|
712 |
+
* BUGFIX [Tags - no more than 2?](http://wordpress.org/support/topic/tags-no-more-than-2)
|
713 |
+
* Clean up PHP notices
|
714 |
+
* Fix Changelog link
|
715 |
+
* PREMIUM Implement testimonials query and content caching
|
716 |
+
* TODO update
|
717 |
+
|
718 |
+
= 2.2.3 =
|
719 |
+
* Begin premium plugin adaptions
|
720 |
+
* BUGFIX [Tags - no more than 2?](http://wordpress.org/support/topic/tags-no-more-than-2)
|
721 |
+
* BUGFIX [Updated - Now getting fatal error when using testimonialswidget_list()](http://wordpress.org/support/topic/updated-now-getting-fatal-error-when-using-testimonialswidget_list)
|
722 |
+
* Clean up links in readme.txt
|
723 |
+
* Correct company and URL link usage
|
724 |
+
* [Correct readme.txt to standard](http://wordpress.org/extend/plugins/about/readme.txt)
|
725 |
+
* Don't rotate testimonial if only 1
|
726 |
+
* TODO updates
|
727 |
+
|
728 |
+
= 2.2.2 =
|
729 |
+
* BUGFIX [Now getting fatal error when using testimonialswidget_list()](http://wordpress.org/support/topic/updated-now-getting-fatal-error-when-using-testimonialswidget_list)
|
730 |
+
* Theme function defaults
|
731 |
+
* TODO updates
|
732 |
+
* URL pointing update
|
733 |
+
|
734 |
+
= 2.2.1 =
|
735 |
+
* Number FAQ Entries
|
736 |
+
* Revise Installation Usage text
|
737 |
+
* Revise Shortcode and Widget Options text
|
738 |
+
|
739 |
+
= 2.2.0 =
|
740 |
+
* FAQ `testimonialswidget_widget()` example
|
741 |
+
* Multisite compatible
|
742 |
+
* Reversion as 2.1.10 was a minor release than only bug fixes
|
743 |
+
|
744 |
+
= 2.1.10 =
|
745 |
+
* [Add title field ](http://wordpress.org/support/topic/plugin-testimonials-widget-just-tried-216-thoughts-suggestions)
|
746 |
+
* Consolidate defaults to simplify code maintenance
|
747 |
+
* Correct CSS testimonial list spacing
|
748 |
+
* Debug true - clear out PHP notices and such
|
749 |
+
* Default minimum height removed for widgets, now optional
|
750 |
+
* Maximum height setting
|
751 |
+
* [Remove CSS `position` attributes `.testimonialswidget_testimonial { position: absolute; }`](http://wordpress.org/support/topic/testimonials-widget-not-showing-correctly-on-sub-pages)
|
752 |
+
* TODO cleanup
|
753 |
+
* Update language POT
|
754 |
+
* Update screenshots
|
755 |
+
* Update WPML
|
756 |
+
* Widget options dropdown for ORDER BY entries
|
757 |
+
|
758 |
+
= 2.1.9 =
|
759 |
+
* Allow min_height 0
|
760 |
+
* FAQ - How do I use the theme function `testimonialswidget_list()`?
|
761 |
+
* Move CSS include to header
|
762 |
+
|
763 |
+
= 2.1.8 =
|
764 |
+
* Remove testimonialswidget_widget char_limit default
|
765 |
+
* TODO - debug true
|
766 |
+
|
767 |
+
= 2.1.7 =
|
768 |
+
* [0 disables char_limit](http://wordpress.org/support/topic/plugin-testimonials-widget-more-than-one-testimonial-appears-overlaps-content-below-the-widget)
|
769 |
+
* [Set link target](http://wordpress.org/support/topic/plugin-testimonials-widget-just-tried-216-thoughts-suggestions)
|
770 |
+
* Update widget option top screenshot
|
771 |
+
|
772 |
+
= 2.1.6 =
|
773 |
+
* FAQ: `ORDER BY` explanation
|
774 |
+
* FAQ: `testimonial_extra` explanation
|
775 |
+
* [Moved CSS to footer](http://wordpress.org/support/topic/plugin-testimonials-widget-html-validation)
|
776 |
+
* Next testimonial link idea
|
777 |
+
* Option: Add `hide_not_found` to prevent showing "No testimonials found"
|
778 |
+
* Revise theme methods as functions
|
779 |
+
* Screenshot: Update upper widget options
|
780 |
+
* Staged widget testimonials are initially `display: none` via CSS `.testimonialswidget_display_none`
|
781 |
+
* TODO updates
|
782 |
+
* Verbiage: Refresh Interval to Rotation Speed
|
783 |
+
* Widget option explanations
|
784 |
+
|
785 |
+
= 2.1.5 =
|
786 |
+
* Always apply min-height
|
787 |
+
|
788 |
+
= 2.1.4 =
|
789 |
+
* Enable WPML
|
790 |
+
* Idea - Maximum height setting
|
791 |
+
* Revise description
|
792 |
+
* Revise TODO
|
793 |
+
|
794 |
+
= 2.1.3 =
|
795 |
+
* Allow commas in meta_key
|
796 |
+
* FAQ on page not found
|
797 |
+
* Fix widget Random order always true condition
|
798 |
+
* Increase bottom margin spacing for listed testimonials
|
799 |
+
* TODO vote casting note
|
800 |
+
* Update localization pot file
|
801 |
+
|
802 |
+
= 2.1.2 =
|
803 |
+
* Add `hide_gravatar` option
|
804 |
+
* Add apply_filters( 'testimonials_widget_data', $testimonial_data ) to process data before display
|
805 |
+
* Add right margin to gravatar image
|
806 |
+
* Added empty testimonial data field `testimonial_extra` for customization in testimonials
|
807 |
+
* Allow widget and shortcode sorting by post meta values via `meta_key`
|
808 |
+
* Correct PHP static accessors
|
809 |
+
* Update FAQ
|
810 |
+
* Update widget options screenshots
|
811 |
+
* Working full testimonial URLs
|
812 |
+
|
813 |
+
= 2.1.1 =
|
814 |
+
* Add [[testimonialswidget_list]] paging screenshot
|
815 |
+
|
816 |
+
= 2.1.0 =
|
817 |
+
* Enable paging for [[testimonialswidget_list]] shortcode
|
818 |
+
* Flush rewrite rules on activation
|
819 |
+
* Disallow paging in widget and [[testimonialswidget_widget]] shortcode
|
820 |
+
|
821 |
+
= 2.0.6 =
|
822 |
+
* Update shortcode option directions
|
823 |
+
|
824 |
+
= 2.0.5 =
|
825 |
+
* Ignore already imported
|
826 |
+
* Mark `testimonialswidget_widget() $number` argument as optional
|
827 |
+
|
828 |
+
= 2.0.4 =
|
829 |
+
* Allow for 0 refresh_interval in get_testimonials_html
|
830 |
+
|
831 |
+
= 2.0.3 =
|
832 |
+
* Allow for 0 refresh_interval in widget
|
833 |
+
|
834 |
+
= 2.0.2 =
|
835 |
+
* BUGFIX [Warning: call_user_func_array() ??](http://wordpress.org/support/topic/plugin-testimonials-widget-warning-call_user_func_array)
|
836 |
+
* Added Testimonials_Widget_Widget::get_testimonials_scripts for use with add_filter for wp_footer
|
837 |
+
|
838 |
+
= 2.0.1 =
|
839 |
+
* Verbiage updates
|
840 |
+
* Readme.txt validation
|
841 |
+
* widget q p tag display inline
|
842 |
+
* GPL2 licensing
|
843 |
+
* Move upgrade notice text towards installation
|
844 |
+
* Reorder screenshots
|
845 |
+
* Apply 'the_content' filters directly to prevent plugin baggage
|
846 |
+
* Update screenshot-7.png
|
847 |
+
|
848 |
+
= 2.0.0 =
|
849 |
+
* Major rewrite
|
850 |
+
* Add filters for image & gravatar sizes
|
851 |
+
* Admin bar New > Testimonial
|
852 |
+
* Authors and lower can manage their own testimonials
|
853 |
+
* Auto-migration from old to new format upon install
|
854 |
+
* Public > Published
|
855 |
+
* Not public > Private
|
856 |
+
* Categories - product, project, service
|
857 |
+
* Clean up verbiage
|
858 |
+
* Cleaner widget class
|
859 |
+
* Custom columns list view
|
860 |
+
* Image
|
861 |
+
* Source
|
862 |
+
* Shortcode
|
863 |
+
* Email
|
864 |
+
* Company
|
865 |
+
* URL
|
866 |
+
* Published by
|
867 |
+
* Category
|
868 |
+
* Tags
|
869 |
+
* Date
|
870 |
+
* Custom fields metabox
|
871 |
+
* Email
|
872 |
+
* Company
|
873 |
+
* URL
|
874 |
+
* Custom post-type
|
875 |
+
* Default fields - source, email, company, URL
|
876 |
+
* Editors and higher can manage all testimonials and edit testimonial publisher
|
877 |
+
* Enable categories and tags
|
878 |
+
* Enable full shortcode options in widget
|
879 |
+
* Gravatar
|
880 |
+
* HTML content allowed
|
881 |
+
* Images
|
882 |
+
* JavaScript in footer
|
883 |
+
* Localization
|
884 |
+
* Reference shortcode column
|
885 |
+
* Reorganize widget options panel
|
886 |
+
* Rotation JavaScript in footer than body
|
887 |
+
* Shortcode options validation
|
888 |
+
* WP_Query for get_testimonials()
|
889 |
+
* Widget image on own line
|
890 |
+
* Widget options
|
891 |
+
* Title
|
892 |
+
* Category filter
|
893 |
+
* Tags filter
|
894 |
+
* Require all tags
|
895 |
+
* Advanced options
|
896 |
+
* Hide image?
|
897 |
+
* Hide source?
|
898 |
+
* Hide email?
|
899 |
+
* Hide company?
|
900 |
+
* Hide URL?
|
901 |
+
* Character limit
|
902 |
+
* IDs filter
|
903 |
+
* Limit
|
904 |
+
* Maximum Height
|
905 |
+
* Minimum Height
|
906 |
+
* ORDER BY
|
907 |
+
* ORDER BY Order
|
908 |
+
* Random order
|
909 |
+
* Rotation Speed
|
910 |
+
* Move caching to ideas
|
911 |
+
* Add theme function `testimonialswidget_widget()` doc
|
912 |
+
* Update POT
|
913 |
+
* [[testimonialswidget_widget]] shortcode
|
914 |
+
* Match [[testimonialswidget_widget]] shortcode option defaults to widget
|
915 |
+
* Update screenshots
|
916 |
+
* Readd Minimum Height - need help getting around this
|
917 |
+
|
918 |
+
= 0.2.13 =
|
919 |
+
* Clean up CSS
|
920 |
+
* Remove q & cite p wrapper
|
921 |
+
|
922 |
+
= 0.2.12 =
|
923 |
+
* the_title filter fix
|
924 |
+
|
925 |
+
= 0.2.11 =
|
926 |
+
* Enable character limit for shortcode
|
927 |
+
|
928 |
+
= 0.2.10 =
|
929 |
+
* Character limit nows forces text truncation than preventing of testimonial to show
|
930 |
+
* Add option - Limit number of testimonials to pull at a time
|
931 |
+
* Sanitize widget variables
|
932 |
+
* Fix random_order issue on testimonials widget
|
933 |
+
|
934 |
+
= 0.2.9 =
|
935 |
+
* Require Editor role for managing Testimonials
|
936 |
+
|
937 |
+
= 0.2.8 =
|
938 |
+
* CSS testimonialswidget_testimonial_list fix #2
|
939 |
+
|
940 |
+
= 0.2.7 =
|
941 |
+
* CSS testimonialswidget_testimonial_list fix
|
942 |
+
|
943 |
+
= 0.2.6 =
|
944 |
+
* CSS updates for widgets and lists
|
945 |
+
|
946 |
+
= 0.2.5 =
|
947 |
+
* Add span.testimonialswidget_join for author , join text
|
948 |
+
* Add nl2br for testimonials display on a page
|
949 |
+
|
950 |
+
= 0.2.4 =
|
951 |
+
* Shortcode added - Thank you Hal Gatewood
|
952 |
+
|
953 |
+
= 0.2.3 =
|
954 |
+
* Allow testimonials to have multiple tags
|
955 |
+
* Show only quotes with all tags
|
956 |
+
|
957 |
+
= 0.2.2 =
|
958 |
+
* Show newest testimonials first in admin list by default
|
959 |
+
* Quick locallization
|
960 |
+
* Quotes Collection recommendation
|
961 |
+
|
962 |
+
= 2011-10-03: Version 0.2 =
|
963 |
+
* Multi-widget enabled
|
964 |
+
* Testimonial, author & source text are clickable automatically
|
965 |
+
* Allow 0 refresh to make widget static
|
966 |
+
* Allow pressing return when editing testimonial to save record
|
967 |
+
|
968 |
+
= 2011-08-12: Version 0.1 =
|
969 |
+
* initial release
|
{assets/css → css}/images/bx_loader.gif
RENAMED
File without changes
|
{assets/css → css}/images/controls.png
RENAMED
File without changes
|
{assets/css → css}/jquery.bxslider.css
RENAMED
File without changes
|
{assets/css → css}/testimonials-widget-2.14.0.css
RENAMED
File without changes
|
{assets/css → css}/testimonials-widget-ie7.css
RENAMED
File without changes
|
forum-responses.txt
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Are you still having trouble?
|
2 |
+
|
3 |
+
Has looking through the <a href="https://aihrus.zendesk.com/categories/20104507-Testimonials-Widget">knowledge base</a> helped?
|
4 |
+
|
5 |
+
***
|
6 |
+
|
7 |
+
Got a URL to share with me so that I can help further?
|
8 |
+
|
9 |
+
***
|
10 |
+
|
11 |
+
Are you okay now?
|
12 |
+
|
13 |
+
***
|
14 |
+
|
15 |
+
Did you guys give the Testimonials Widget 2.12.1 release a try yet?
|
16 |
+
|
17 |
+
That's correctly the recent memory leak.
|
18 |
+
|
19 |
+
***
|
20 |
+
|
21 |
+
Did the 2.12.1 update work for you?
|
22 |
+
|
23 |
+
***
|
24 |
+
|
25 |
+
Please send me an admin login via http://aihr.us/contact-aihrus/.
|
26 |
+
|
27 |
+
***
|
28 |
+
|
29 |
+
See the <a href="http://wordpress.org/plugins/testimonials-widget/faq/">FAQ</a> and search the knowledge base mentioned there.
|
includes/class-testimonials-widget.php
DELETED
@@ -1,2112 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Copyright 2014 Michael Cannon (email: mc@aihr.us)
|
4 |
-
* This program is free software; you can redistribute it and/or modify
|
5 |
-
* it under the terms of the GNU General Public License, version 2, as
|
6 |
-
* published by the Free Software Foundation.
|
7 |
-
* This program is distributed in the hope that it will be useful,
|
8 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
10 |
-
* GNU General Public License for more details.
|
11 |
-
* You should have received a copy of the GNU General Public License
|
12 |
-
* along with this program; if not, write to the Free Software
|
13 |
-
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14 |
-
*/
|
15 |
-
|
16 |
-
require_once TW_DIR_LIB . 'aihrus-framework/class-aihrus-common.php';
|
17 |
-
require_once TW_DIR_LIB . 'class-redrokk-metabox-class.php';
|
18 |
-
require_once TW_DIR_INC . 'class-testimonials-widget-settings.php';
|
19 |
-
require_once TW_DIR_INC . 'class-testimonials-widget-widget.php';
|
20 |
-
|
21 |
-
if ( class_exists( 'Testimonials_Widget' ) )
|
22 |
-
return;
|
23 |
-
|
24 |
-
|
25 |
-
class Testimonials_Widget extends Aihrus_Common {
|
26 |
-
const BASE = TW_BASE;
|
27 |
-
const ID = 'testimonials-widget-testimonials';
|
28 |
-
const SLUG = 'tw_';
|
29 |
-
const VERSION = TW_VERSION;
|
30 |
-
|
31 |
-
const OLD_NAME = 'testimonialswidget';
|
32 |
-
const PT = 'testimonials-widget';
|
33 |
-
|
34 |
-
private static $found_posts = 0;
|
35 |
-
private static $max_num_pages = 0;
|
36 |
-
private static $post_count = 0;
|
37 |
-
private static $wp_query;
|
38 |
-
|
39 |
-
public static $class = __CLASS__;
|
40 |
-
public static $cpt_category = '';
|
41 |
-
public static $cpt_tags = '';
|
42 |
-
public static $css = array();
|
43 |
-
public static $css_called = false;
|
44 |
-
public static $instance_number = 0;
|
45 |
-
public static $instance_widget = 0;
|
46 |
-
public static $menu_shortcodes;
|
47 |
-
public static $not_found = false;
|
48 |
-
public static $notice_key;
|
49 |
-
public static $plugin_assets;
|
50 |
-
public static $scripts = array();
|
51 |
-
public static $scripts_called = false;
|
52 |
-
public static $settings_link = '';
|
53 |
-
public static $tag_close_quote = '<span class="close-quote"></span>';
|
54 |
-
public static $tag_open_quote = '<span class="open-quote"></span>';
|
55 |
-
public static $use_instance = false;
|
56 |
-
public static $widget_number = 100000;
|
57 |
-
|
58 |
-
public static $agg_count = 'reviewCount';
|
59 |
-
public static $agg_schema = 'http://schema.org/AggregateRating';
|
60 |
-
|
61 |
-
public static $cw_author = 'author';
|
62 |
-
public static $cw_date = 'datePublished';
|
63 |
-
public static $cw_date_mod = 'dateModified';
|
64 |
-
public static $cw_aggregate = 'aggregateRating';
|
65 |
-
public static $cw_review = 'review';
|
66 |
-
public static $cw_source_org = 'sourceOrganization';
|
67 |
-
|
68 |
-
public static $org_location = 'location';
|
69 |
-
public static $org_schema = 'http://schema.org/Organization';
|
70 |
-
|
71 |
-
public static $person_email = 'email';
|
72 |
-
public static $person_home = 'homeLocation';
|
73 |
-
public static $person_job_title = 'jobTitle';
|
74 |
-
public static $person_schema = 'http://schema.org/Person';
|
75 |
-
public static $person_member = 'memberOf';
|
76 |
-
|
77 |
-
public static $place_schema = 'http://schema.org/Place';
|
78 |
-
|
79 |
-
public static $review_body = 'reviewBody';
|
80 |
-
public static $review_item = 'itemReviewed';
|
81 |
-
public static $review_schema = 'http://schema.org/Review';
|
82 |
-
|
83 |
-
public static $schema_div_open = '<div itemscope itemtype="%1$s">';
|
84 |
-
public static $schema_div_prop = '<div itemprop="%1$s" itemscope itemtype="%2$s">%3$s</div>';
|
85 |
-
public static $schema_item_prop = 'itemprop="%1$s"';
|
86 |
-
public static $schema_meta = '<meta itemprop="%1$s" content="%2$s" />';
|
87 |
-
public static $schema_span = '<span itemprop="%1$s">%2$s</span>';
|
88 |
-
|
89 |
-
public static $thing_image = 'image';
|
90 |
-
public static $thing_name = 'name';
|
91 |
-
public static $thing_schema = 'http://schema.org/Thing';
|
92 |
-
public static $thing_url = 'url';
|
93 |
-
|
94 |
-
|
95 |
-
public function __construct() {
|
96 |
-
parent::__construct();
|
97 |
-
|
98 |
-
self::$plugin_assets = plugins_url( '/assets/', dirname( __FILE__ ) );
|
99 |
-
self::$plugin_assets = self::strip_protocol( self::$plugin_assets );
|
100 |
-
|
101 |
-
add_action( 'admin_init', array( __CLASS__, 'admin_init' ) );
|
102 |
-
add_action( 'admin_menu', array( __CLASS__, 'admin_menu' ) );
|
103 |
-
add_action( 'init', array( __CLASS__, 'init' ) );
|
104 |
-
add_action( 'widgets_init', array( __CLASS__, 'widgets_init' ) );
|
105 |
-
add_shortcode( 'testimonialswidget_list', array( __CLASS__, 'testimonialswidget_list' ) );
|
106 |
-
add_shortcode( 'testimonialswidget_widget', array( __CLASS__, 'testimonialswidget_widget' ) );
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
public static function admin_init() {
|
111 |
-
self::support_thumbnails();
|
112 |
-
|
113 |
-
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>';
|
114 |
-
|
115 |
-
self::add_meta_box_testimonials_widget();
|
116 |
-
self::update();
|
117 |
-
|
118 |
-
add_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
119 |
-
add_action( 'manage_' . self::PT . '_posts_custom_column', array( __CLASS__, 'manage_posts_custom_column' ), 10, 2 );
|
120 |
-
add_action( 'right_now_content_table_end', array( __CLASS__, 'right_now_content_table_end' ) );
|
121 |
-
add_filter( 'manage_' . self::PT . '_posts_columns', array( __CLASS__, 'manage_posts_columns' ) );
|
122 |
-
add_filter( 'plugin_action_links', array( __CLASS__, 'plugin_action_links' ), 10, 2 );
|
123 |
-
add_filter( 'plugin_row_meta', array( __CLASS__, 'plugin_row_meta' ), 10, 2 );
|
124 |
-
add_filter( 'post_updated_messages', array( __CLASS__, 'post_updated_messages' ) );
|
125 |
-
add_filter( 'pre_get_posts', array( __CLASS__, 'pre_get_posts_author' ) );
|
126 |
-
|
127 |
-
if ( self::do_load() ) {
|
128 |
-
add_filter( 'manage_category_custom_column', array( __CLASS__, 'category_column' ), 10, 3 );
|
129 |
-
add_filter( 'manage_edit-category_columns', array( __CLASS__, 'category_columns' ) );
|
130 |
-
add_filter( 'manage_edit-post_tag_columns', array( __CLASS__, 'category_columns' ) );
|
131 |
-
add_filter( 'manage_edit-testimonials-widget-category_columns', array( __CLASS__, 'category_columns' ) );
|
132 |
-
add_filter( 'manage_edit-testimonials-widget-post_tag_columns', array( __CLASS__, 'category_columns' ) );
|
133 |
-
add_filter( 'manage_post_tag_custom_column', array( __CLASS__, 'post_tag_column' ), 10, 3 );
|
134 |
-
add_filter( 'manage_testimonials-widget-category_custom_column', array( __CLASS__, 'category_column' ), 10, 3 );
|
135 |
-
add_filter( 'manage_testimonials-widget-post_tag_custom_column', array( __CLASS__, 'post_tag_column' ), 10, 3 );
|
136 |
-
}
|
137 |
-
}
|
138 |
-
|
139 |
-
|
140 |
-
public static function admin_menu() {
|
141 |
-
self::$menu_shortcodes = add_submenu_page( 'edit.php?post_type=' . self::PT, esc_html__( 'Testimonials Shortcode Examples', 'testimonials-widget' ), esc_html__( 'E.g. Shortcodes', 'testimonials-widget' ), 'manage_options', 'shortcodes', array( __CLASS__, 'show_shortcodes' ) );
|
142 |
-
}
|
143 |
-
|
144 |
-
|
145 |
-
public static function init() {
|
146 |
-
add_filter( 'the_content', array( __CLASS__, 'get_single' ), -1 );
|
147 |
-
|
148 |
-
load_plugin_textdomain( self::PT, false, 'testimonials-widget/languages' );
|
149 |
-
|
150 |
-
self::$cpt_category = self::PT . '-category';
|
151 |
-
self::$cpt_tags = self::PT . '-post_tag';
|
152 |
-
|
153 |
-
self::init_post_type();
|
154 |
-
self::styles();
|
155 |
-
}
|
156 |
-
|
157 |
-
|
158 |
-
public static function plugin_action_links( $links, $file ) {
|
159 |
-
if ( self::BASE == $file )
|
160 |
-
array_unshift( $links, self::$settings_link );
|
161 |
-
|
162 |
-
return $links;
|
163 |
-
}
|
164 |
-
|
165 |
-
|
166 |
-
public static function add_instance() {
|
167 |
-
self::$use_instance = false;
|
168 |
-
self::$instance_number++;
|
169 |
-
|
170 |
-
return self::$instance_number;
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
public static function get_instance() {
|
175 |
-
return self::$use_instance ? self::$instance_number : self::$instance_widget;
|
176 |
-
}
|
177 |
-
|
178 |
-
|
179 |
-
public static function set_instance( $widget_number ) {
|
180 |
-
self::$use_instance = true;
|
181 |
-
self::$instance_widget = $widget_number;
|
182 |
-
}
|
183 |
-
|
184 |
-
|
185 |
-
public static function support_thumbnails() {
|
186 |
-
$feature = 'post-thumbnails';
|
187 |
-
$feature_level = get_theme_support( $feature );
|
188 |
-
|
189 |
-
if ( true === $feature_level ) {
|
190 |
-
// already enabled for all post types
|
191 |
-
return;
|
192 |
-
} elseif ( false === $feature_level ) {
|
193 |
-
// none allowed, only enable for our own
|
194 |
-
add_theme_support( $feature, array( self::PT ) );
|
195 |
-
} else {
|
196 |
-
// add our own to list of supported
|
197 |
-
$feature_level[0][] = self::PT;
|
198 |
-
add_theme_support( $feature, $feature_level[0] );
|
199 |
-
}
|
200 |
-
}
|
201 |
-
|
202 |
-
|
203 |
-
public static function get_single( $content ) {
|
204 |
-
global $post;
|
205 |
-
|
206 |
-
if ( ! is_single() || self::PT != $post->post_type )
|
207 |
-
return $content;
|
208 |
-
|
209 |
-
$atts = self::get_defaults( true );
|
210 |
-
$atts['hide_content'] = 1;
|
211 |
-
$atts['ids'] = $post->ID;
|
212 |
-
$atts['type'] = 'get_single';
|
213 |
-
|
214 |
-
$instance = self::add_instance();
|
215 |
-
$atts['widget_number'] = $instance;
|
216 |
-
|
217 |
-
$testimonials = array();
|
218 |
-
|
219 |
-
$text = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
220 |
-
if ( false === $text ) {
|
221 |
-
$testimonials = self::get_testimonials( $atts );
|
222 |
-
$testimonial = $testimonials[0];
|
223 |
-
|
224 |
-
$details = self::get_testimonial_html( $testimonial, $atts );
|
225 |
-
$details = apply_filters( 'testimonials_widget_testimonial_html_single', $details, $testimonial, $atts );
|
226 |
-
|
227 |
-
$content = apply_filters( 'testimonials_widget_testimonial_html_single_content', $content, $testimonial, $atts );
|
228 |
-
|
229 |
-
$text = $content . $details;
|
230 |
-
$text = apply_filters( 'testimonials_widget_cache_set', $text, $atts );
|
231 |
-
}
|
232 |
-
|
233 |
-
self::call_scripts_styles( $testimonials, $atts, $instance );
|
234 |
-
|
235 |
-
return $text;
|
236 |
-
}
|
237 |
-
|
238 |
-
|
239 |
-
public static function activation() {
|
240 |
-
if ( ! current_user_can( 'activate_plugins' ) )
|
241 |
-
return;
|
242 |
-
|
243 |
-
self::init();
|
244 |
-
flush_rewrite_rules();
|
245 |
-
}
|
246 |
-
|
247 |
-
|
248 |
-
public static function deactivation() {
|
249 |
-
if ( ! current_user_can( 'activate_plugins' ) )
|
250 |
-
return;
|
251 |
-
|
252 |
-
flush_rewrite_rules();
|
253 |
-
}
|
254 |
-
|
255 |
-
|
256 |
-
public static function uninstall() {
|
257 |
-
if ( ! current_user_can( 'activate_plugins' ) )
|
258 |
-
return;
|
259 |
-
|
260 |
-
global $wpdb;
|
261 |
-
|
262 |
-
require_once TW_DIR_INC . 'class-testimonials-widget-settings.php';
|
263 |
-
|
264 |
-
$delete_data = tw_get_option( 'delete_data', false );
|
265 |
-
if ( $delete_data ) {
|
266 |
-
delete_option( self::OLD_NAME );
|
267 |
-
delete_option( Testimonials_Widget_Settings::ID );
|
268 |
-
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->options . '`' );
|
269 |
-
|
270 |
-
Testimonials_Widget::delete_testimonials();
|
271 |
-
}
|
272 |
-
}
|
273 |
-
|
274 |
-
|
275 |
-
public static function delete_testimonials() {
|
276 |
-
global $wpdb;
|
277 |
-
|
278 |
-
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = '" . self::PT . "'";
|
279 |
-
$posts = $wpdb->get_results( $query );
|
280 |
-
|
281 |
-
foreach ( $posts as $post ) {
|
282 |
-
$post_id = $post->ID;
|
283 |
-
Testimonials_Widget::delete_attachments( $post_id );
|
284 |
-
|
285 |
-
// dels post, meta & comments
|
286 |
-
// true is force delete
|
287 |
-
wp_delete_post( $post_id, true );
|
288 |
-
}
|
289 |
-
|
290 |
-
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->postmeta . '`' );
|
291 |
-
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->posts . '`' );
|
292 |
-
}
|
293 |
-
|
294 |
-
|
295 |
-
public static function delete_attachments( $post_id = false ) {
|
296 |
-
global $wpdb;
|
297 |
-
|
298 |
-
$post_id = $post_id ? $post_id : 0;
|
299 |
-
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_parent = {$post_id}";
|
300 |
-
$attachments = $wpdb->get_results( $query );
|
301 |
-
|
302 |
-
foreach ( $attachments as $attachment ) {
|
303 |
-
// true is force delete
|
304 |
-
wp_delete_attachment( $attachment->ID, true );
|
305 |
-
}
|
306 |
-
}
|
307 |
-
|
308 |
-
|
309 |
-
public static function plugin_row_meta( $input, $file ) {
|
310 |
-
if ( self::BASE != $file )
|
311 |
-
return $input;
|
312 |
-
|
313 |
-
$disable_donate = tw_get_option( 'disable_donate' );
|
314 |
-
if ( $disable_donate )
|
315 |
-
return $input;
|
316 |
-
|
317 |
-
$links = array(
|
318 |
-
self::$donate_link,
|
319 |
-
);
|
320 |
-
|
321 |
-
global $TW_Premium;
|
322 |
-
if ( ! isset( $TW_Premium ) )
|
323 |
-
$links[] = TW_PREMIUM_LINK;
|
324 |
-
|
325 |
-
$input = array_merge( $input, $links );
|
326 |
-
|
327 |
-
return $input;
|
328 |
-
}
|
329 |
-
|
330 |
-
|
331 |
-
public static function notice_2_12_0() {
|
332 |
-
$text = sprintf( __( 'If your Testimonials display has gone to funky town, please <a href="%s">read the FAQ</a> about possible CSS fixes.', 'testimonials-widget' ), esc_url( 'https://aihrus.zendesk.com/entries/23722573-Major-Changes-Since-2-10-0' ) );
|
333 |
-
|
334 |
-
aihr_notice_updated( $text );
|
335 |
-
}
|
336 |
-
|
337 |
-
|
338 |
-
public static function notice_donate( $disable_donate = null, $item_name = null ) {
|
339 |
-
$disable_donate = tw_get_option( 'disable_donate' );
|
340 |
-
|
341 |
-
parent::notice_donate( $disable_donate, TW_NAME );
|
342 |
-
}
|
343 |
-
|
344 |
-
|
345 |
-
public static function update() {
|
346 |
-
$prior_version = tw_get_option( 'admin_notices' );
|
347 |
-
if ( $prior_version ) {
|
348 |
-
if ( $prior_version < '2.12.0' )
|
349 |
-
self::set_notice( 'notice_2_12_0' );
|
350 |
-
|
351 |
-
if ( $prior_version < '2.15.0' )
|
352 |
-
self::set_notice( 'notice_2_15_0' );
|
353 |
-
|
354 |
-
if ( $prior_version < self::VERSION )
|
355 |
-
do_action( 'testimonials_widget_update' );
|
356 |
-
|
357 |
-
tw_set_option( 'admin_notices' );
|
358 |
-
}
|
359 |
-
|
360 |
-
// display donate on major/minor version release
|
361 |
-
$donate_version = tw_get_option( 'donate_version', false );
|
362 |
-
if ( ! $donate_version || ( $donate_version != self::VERSION && preg_match( '#\.0$#', self::VERSION ) ) ) {
|
363 |
-
self::set_notice( 'notice_donate' );
|
364 |
-
tw_set_option( 'donate_version', self::VERSION );
|
365 |
-
}
|
366 |
-
|
367 |
-
$options = get_option( self::OLD_NAME );
|
368 |
-
if ( true !== $options['migrated'] )
|
369 |
-
self::migrate();
|
370 |
-
}
|
371 |
-
|
372 |
-
|
373 |
-
public static function migrate() {
|
374 |
-
global $wpdb;
|
375 |
-
|
376 |
-
$table_name = $wpdb->prefix . self::OLD_NAME;
|
377 |
-
$meta_key = '_' . self::PT . ':testimonial_id';
|
378 |
-
$has_table_query = "SELECT table_name FROM information_schema.tables WHERE table_schema='{$wpdb->dbname}' AND table_name='{$table_name}'";
|
379 |
-
$has_table_result = $wpdb->get_col( $has_table_query );
|
380 |
-
|
381 |
-
if ( ! empty( $has_table_result ) ) {
|
382 |
-
// check that db table exists and has entries
|
383 |
-
$query = 'SELECT `testimonial_id`, `testimonial`, `author`, `source`, `tags`, `public`, `time_added`, `time_updated` FROM `' . $table_name . '`';
|
384 |
-
|
385 |
-
// ignore already imported
|
386 |
-
$done_import_query = 'SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE meta_key = "' . $meta_key . '"';
|
387 |
-
$done_import = $wpdb->get_col( $done_import_query );
|
388 |
-
|
389 |
-
if ( ! empty( $done_import ) ) {
|
390 |
-
$done_import = array_unique( $done_import );
|
391 |
-
$query .= ' WHERE testimonial_id NOT IN ( ' . implode( ',', $done_import ) . ' )';
|
392 |
-
}
|
393 |
-
|
394 |
-
$results = $wpdb->get_results( $query );
|
395 |
-
if ( ! empty( $results ) ) {
|
396 |
-
foreach ( $results as $result ) {
|
397 |
-
// author can contain title and company details
|
398 |
-
$author = $result->author;
|
399 |
-
$company = false;
|
400 |
-
|
401 |
-
// ex: First Last of Company!
|
402 |
-
$author = str_replace( ' of ', ', ', $author );
|
403 |
-
// now ex: First Last, Company!
|
404 |
-
|
405 |
-
// ex: First Last, Company
|
406 |
-
// ex: First Last, Web Development Manager, Topcon Positioning Systems, Inc.
|
407 |
-
// ex: First Last, Owner, Company, LLC
|
408 |
-
$author = str_replace( ' of ', ', ', $author );
|
409 |
-
$temp_comma = '^^^';
|
410 |
-
$author = str_replace( ', LLC', $temp_comma . ' LLC', $author );
|
411 |
-
|
412 |
-
// now ex: First Last, Owner, Company^^^ LLC
|
413 |
-
$author = str_replace( ', Inc', $temp_comma . ' Inc', $author );
|
414 |
-
|
415 |
-
// ex: First Last, Web Development Manager, Company^^^ Inc.
|
416 |
-
// it's possible to have "Michael Cannon, Senior Developer" and "Senior Developer" become the company. Okay for now
|
417 |
-
$author = explode( ', ', $author );
|
418 |
-
|
419 |
-
if ( 1 < count( $author ) ) {
|
420 |
-
$company = array_pop( $author );
|
421 |
-
$company = str_replace( $temp_comma, ',', $company );
|
422 |
-
}
|
423 |
-
|
424 |
-
$author = implode( ', ', $author );
|
425 |
-
$author = str_replace( $temp_comma, ',', $author );
|
426 |
-
|
427 |
-
$post_data = array(
|
428 |
-
'post_type' => self::PT,
|
429 |
-
'post_status' => ( 'yes' == $result->public ) ? 'publish' : 'private',
|
430 |
-
'post_date' => $result->time_added,
|
431 |
-
'post_modified' => $result->time_updated,
|
432 |
-
'post_title' => $author,
|
433 |
-
'post_content' => $result->testimonial,
|
434 |
-
'tags_input' => $result->tags,
|
435 |
-
);
|
436 |
-
|
437 |
-
$post_id = wp_insert_post( $post_data, true );
|
438 |
-
|
439 |
-
// track/link testimonial import to new post
|
440 |
-
add_post_meta( $post_id, $meta_key, $result->testimonial_id );
|
441 |
-
|
442 |
-
if ( ! empty( $company ) )
|
443 |
-
add_post_meta( $post_id, 'testimonials-widget-company', $company );
|
444 |
-
|
445 |
-
$source = $result->source;
|
446 |
-
if ( ! empty( $source ) ) {
|
447 |
-
if ( is_email( $source ) ) {
|
448 |
-
add_post_meta( $post_id, 'testimonials-widget-email', $source );
|
449 |
-
} else {
|
450 |
-
add_post_meta( $post_id, 'testimonials-widget-url', $source );
|
451 |
-
}
|
452 |
-
}
|
453 |
-
}
|
454 |
-
}
|
455 |
-
}
|
456 |
-
|
457 |
-
$options['migrated'] = true;
|
458 |
-
delete_option( self::OLD_NAME );
|
459 |
-
add_option( self::OLD_NAME, $options, '', 'no' );
|
460 |
-
}
|
461 |
-
|
462 |
-
|
463 |
-
public static function pre_get_posts_author( $query ) {
|
464 |
-
global $user_ID;
|
465 |
-
|
466 |
-
// author's and below
|
467 |
-
if ( $query->is_admin && ! empty( $query->is_main_query ) && $query->is_post_type_archive( Testimonials_Widget::PT ) && ! current_user_can( 'edit_others_posts' ) )
|
468 |
-
$query->set( 'post_author', $user_ID );
|
469 |
-
|
470 |
-
return $query;
|
471 |
-
}
|
472 |
-
|
473 |
-
|
474 |
-
public static function manage_posts_custom_column( $column, $post_id ) {
|
475 |
-
$result = false;
|
476 |
-
|
477 |
-
switch ( $column ) {
|
478 |
-
case 'id':
|
479 |
-
$result = $post_id;
|
480 |
-
break;
|
481 |
-
|
482 |
-
case 'shortcode':
|
483 |
-
$result = '[testimonialswidget_list ids="';
|
484 |
-
$result .= $post_id;
|
485 |
-
$result .= '"]';
|
486 |
-
$result .= '<br />';
|
487 |
-
$result .= '[testimonialswidget_widget ids="';
|
488 |
-
$result .= $post_id;
|
489 |
-
$result .= '"]';
|
490 |
-
break;
|
491 |
-
|
492 |
-
case 'testimonials-widget-company':
|
493 |
-
case 'testimonials-widget-location':
|
494 |
-
case 'testimonials-widget-title':
|
495 |
-
$result = get_post_meta( $post_id, $column, true );
|
496 |
-
break;
|
497 |
-
|
498 |
-
case 'testimonials-widget-email':
|
499 |
-
case 'testimonials-widget-url':
|
500 |
-
$url = get_post_meta( $post_id, $column, true );
|
501 |
-
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
502 |
-
$url = 'http://' . $url;
|
503 |
-
|
504 |
-
$result = make_clickable( $url );
|
505 |
-
break;
|
506 |
-
|
507 |
-
case 'thumbnail':
|
508 |
-
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
509 |
-
|
510 |
-
if ( has_post_thumbnail( $post_id ) )
|
511 |
-
$result = get_the_post_thumbnail( $post_id, 'thumbnail' );
|
512 |
-
elseif ( is_email( $email ) )
|
513 |
-
$result = get_avatar( $email );
|
514 |
-
else
|
515 |
-
$result = false;
|
516 |
-
break;
|
517 |
-
|
518 |
-
case self::$cpt_category:
|
519 |
-
case self::$cpt_tags:
|
520 |
-
$terms = get_the_terms( $post_id, $column );
|
521 |
-
$result = '';
|
522 |
-
if ( ! empty( $terms ) ) {
|
523 |
-
$out = array();
|
524 |
-
foreach ( $terms as $term )
|
525 |
-
$out[] = '<a href="' . admin_url( 'edit-tags.php?action=edit&taxonomy=' . $column . '&tag_ID=' . $term->term_id . '&post_type=' . self::PT ) . '">' . $term->name . '</a>';
|
526 |
-
|
527 |
-
$result = join( ', ', $out );
|
528 |
-
}
|
529 |
-
break;
|
530 |
-
}
|
531 |
-
|
532 |
-
$result = apply_filters( 'testimonials_widget_posts_custom_column', $result, $column, $post_id );
|
533 |
-
|
534 |
-
if ( $result )
|
535 |
-
echo $result;
|
536 |
-
}
|
537 |
-
|
538 |
-
|
539 |
-
public static function manage_posts_columns( $columns ) {
|
540 |
-
// order of keys matches column ordering
|
541 |
-
$columns = array(
|
542 |
-
'cb' => '<input type="checkbox" />',
|
543 |
-
'id' => esc_html__( 'ID', 'testimonials-widget' ),
|
544 |
-
'thumbnail' => esc_html__( 'Image', 'testimonials-widget' ),
|
545 |
-
'title' => esc_html__( 'Source', 'testimonials-widget' ),
|
546 |
-
'shortcode' => esc_html__( 'Shortcodes', 'testimonials-widget' ),
|
547 |
-
'testimonials-widget-title' => esc_html__( 'Job Title', 'testimonials-widget' ),
|
548 |
-
'testimonials-widget-location' => esc_html__( 'Location', 'testimonials-widget' ),
|
549 |
-
'testimonials-widget-email' => esc_html__( 'Email', 'testimonials-widget' ),
|
550 |
-
'testimonials-widget-company' => esc_html__( 'Company', 'testimonials-widget' ),
|
551 |
-
'testimonials-widget-url' => esc_html__( 'URL', 'testimonials-widget' ),
|
552 |
-
'author' => esc_html__( 'Published by', 'testimonials-widget' ),
|
553 |
-
'date' => esc_html__( 'Date', 'testimonials-widget' ),
|
554 |
-
);
|
555 |
-
|
556 |
-
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
557 |
-
if ( ! $use_cpt_taxonomy ) {
|
558 |
-
$columns[ 'categories' ] = esc_html__( 'Category', 'testimonials-widget' );
|
559 |
-
$columns[ 'tags' ] = esc_html__( 'Tags', 'testimonials-widget' );
|
560 |
-
} else {
|
561 |
-
$columns[ self::$cpt_category ] = esc_html__( 'Category', 'testimonials-widget' );
|
562 |
-
$columns[ self::$cpt_tags ] = esc_html__( 'Tags', 'testimonials-widget' );
|
563 |
-
}
|
564 |
-
|
565 |
-
$columns = apply_filters( 'testimonials_widget_columns', $columns );
|
566 |
-
|
567 |
-
return $columns;
|
568 |
-
}
|
569 |
-
|
570 |
-
|
571 |
-
public static function init_post_type() {
|
572 |
-
$labels = array(
|
573 |
-
'add_new' => esc_html__( 'Add New', 'testimonials-widget' ),
|
574 |
-
'add_new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
575 |
-
'edit_item' => esc_html__( 'Edit Testimonial', 'testimonials-widget' ),
|
576 |
-
'name' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
577 |
-
'new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
578 |
-
'not_found' => esc_html__( 'No testimonials found', 'testimonials-widget' ),
|
579 |
-
'not_found_in_trash' => esc_html__( 'No testimonials found in Trash', 'testimonials-widget' ),
|
580 |
-
'parent_item_colon' => null,
|
581 |
-
'search_items' => esc_html__( 'Search Testimonials', 'testimonials-widget' ),
|
582 |
-
'singular_name' => esc_html__( 'Testimonial', 'testimonials-widget' ),
|
583 |
-
'view_item' => esc_html__( 'View Testimonial', 'testimonials-widget' ),
|
584 |
-
);
|
585 |
-
|
586 |
-
$supports = array(
|
587 |
-
'title',
|
588 |
-
'editor',
|
589 |
-
'thumbnail',
|
590 |
-
'publicize',
|
591 |
-
);
|
592 |
-
|
593 |
-
$allow_comments = tw_get_option( 'allow_comments', false );
|
594 |
-
if ( $allow_comments )
|
595 |
-
$supports[] = 'comments';
|
596 |
-
|
597 |
-
$has_archive = tw_get_option( 'has_archive', true );
|
598 |
-
$rewrite_slug = tw_get_option( 'rewrite_slug', 'testimonial' );
|
599 |
-
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
600 |
-
|
601 |
-
// editor's and up
|
602 |
-
if ( current_user_can( 'edit_others_posts' ) )
|
603 |
-
$supports[] = 'author';
|
604 |
-
|
605 |
-
if ( ! $use_cpt_taxonomy ) {
|
606 |
-
$do_register_taxonomy = false;
|
607 |
-
$taxonomies = array(
|
608 |
-
'category',
|
609 |
-
'post_tag',
|
610 |
-
);
|
611 |
-
} else {
|
612 |
-
$do_register_taxonomy = true;
|
613 |
-
$taxonomies = array(
|
614 |
-
self::$cpt_category,
|
615 |
-
self::$cpt_tags,
|
616 |
-
);
|
617 |
-
|
618 |
-
self::register_taxonomies();
|
619 |
-
}
|
620 |
-
|
621 |
-
$args = array(
|
622 |
-
'label' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
623 |
-
'capability_type' => 'post',
|
624 |
-
'has_archive' => $has_archive,
|
625 |
-
'hierarchical' => false,
|
626 |
-
'labels' => $labels,
|
627 |
-
'public' => true,
|
628 |
-
'publicly_queryable' => true,
|
629 |
-
'query_var' => true,
|
630 |
-
'rewrite' => array(
|
631 |
-
'slug' => $rewrite_slug,
|
632 |
-
'with_front' => false,
|
633 |
-
),
|
634 |
-
'supports' => $supports,
|
635 |
-
'taxonomies' => $taxonomies,
|
636 |
-
);
|
637 |
-
|
638 |
-
register_post_type( self::PT, $args );
|
639 |
-
|
640 |
-
if ( $do_register_taxonomy ) {
|
641 |
-
register_taxonomy_for_object_type( self::$cpt_category, self::PT );
|
642 |
-
register_taxonomy_for_object_type( self::$cpt_tags, self::PT );
|
643 |
-
}
|
644 |
-
}
|
645 |
-
|
646 |
-
|
647 |
-
public static function register_taxonomies() {
|
648 |
-
$args = array(
|
649 |
-
'hierarchical' => true,
|
650 |
-
'show_admin_column' => true,
|
651 |
-
);
|
652 |
-
register_taxonomy( self::$cpt_category, self::PT, $args );
|
653 |
-
|
654 |
-
$args = array(
|
655 |
-
'show_admin_column' => true,
|
656 |
-
'update_count_callback' => '_update_post_term_count',
|
657 |
-
);
|
658 |
-
register_taxonomy( self::$cpt_tags, self::PT, $args );
|
659 |
-
}
|
660 |
-
|
661 |
-
|
662 |
-
public static function get_defaults( $single_view = false ) {
|
663 |
-
if ( empty( $single_view ) )
|
664 |
-
return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
|
665 |
-
else
|
666 |
-
return apply_filters( 'testimonials_widget_defaults_single', tw_get_options() );
|
667 |
-
}
|
668 |
-
|
669 |
-
|
670 |
-
public static function testimonialswidget_list( $atts ) {
|
671 |
-
$atts = wp_parse_args( $atts, self::get_defaults() );
|
672 |
-
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
673 |
-
|
674 |
-
if ( get_query_var( 'paged' ) ) {
|
675 |
-
$atts['paged'] = get_query_var( 'paged' );
|
676 |
-
} elseif ( get_query_var( 'page' ) ) {
|
677 |
-
$atts['paged'] = get_query_var( 'page' );
|
678 |
-
} else {
|
679 |
-
$atts['paged'] = 1;
|
680 |
-
}
|
681 |
-
|
682 |
-
$atts['type'] = 'testimonialswidget_list';
|
683 |
-
|
684 |
-
$instance = self::add_instance();
|
685 |
-
$atts['widget_number'] = $instance;
|
686 |
-
|
687 |
-
$testimonials = array();
|
688 |
-
|
689 |
-
$content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
690 |
-
if ( false === $content ) {
|
691 |
-
$testimonials = self::get_testimonials( $atts );
|
692 |
-
$content = self::get_testimonials_html( $testimonials, $atts );
|
693 |
-
$content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
|
694 |
-
}
|
695 |
-
|
696 |
-
self::call_scripts_styles( $testimonials, $atts, $instance );
|
697 |
-
|
698 |
-
return $content;
|
699 |
-
}
|
700 |
-
|
701 |
-
|
702 |
-
public static function testimonialswidget_widget( $atts, $widget_number = null ) {
|
703 |
-
if ( empty( $widget_number ) ) {
|
704 |
-
$widget_number = self::$widget_number++;
|
705 |
-
|
706 |
-
if ( ! isset( $atts['random'] ) )
|
707 |
-
$atts['random'] = 1;
|
708 |
-
|
709 |
-
if ( ! isset( $atts['enable_schema'] ) )
|
710 |
-
$atts['enable_schema'] = 0;
|
711 |
-
}
|
712 |
-
|
713 |
-
$atts = wp_parse_args( $atts, self::get_defaults() );
|
714 |
-
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
715 |
-
|
716 |
-
$atts['paging'] = false;
|
717 |
-
$atts['type'] = 'testimonialswidget_widget';
|
718 |
-
|
719 |
-
self::set_instance( $widget_number );
|
720 |
-
$atts['widget_number'] = $widget_number;
|
721 |
-
|
722 |
-
$testimonials = array();
|
723 |
-
|
724 |
-
$content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
725 |
-
if ( false === $content ) {
|
726 |
-
$testimonials = self::get_testimonials( $atts );
|
727 |
-
$content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
|
728 |
-
$content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
|
729 |
-
}
|
730 |
-
|
731 |
-
self::call_scripts_styles( $testimonials, $atts, $widget_number );
|
732 |
-
|
733 |
-
return $content;
|
734 |
-
}
|
735 |
-
|
736 |
-
|
737 |
-
public static function scripts( $atts ) {
|
738 |
-
if ( is_admin() )
|
739 |
-
return;
|
740 |
-
|
741 |
-
wp_enqueue_script( 'jquery' );
|
742 |
-
|
743 |
-
$use_bxslider = $atts['use_bxslider'];
|
744 |
-
if ( $use_bxslider ) {
|
745 |
-
$enable_video = $atts['enable_video'];
|
746 |
-
if ( $enable_video ) {
|
747 |
-
wp_register_script( 'jquery.fitvids', self::$plugin_assets . 'js/jquery.fitvids.js', array( 'jquery' ), '1.0', true );
|
748 |
-
wp_enqueue_script( 'jquery.fitvids' );
|
749 |
-
}
|
750 |
-
|
751 |
-
wp_register_script( 'jquery.bxslider', self::$plugin_assets . 'js/jquery.bxslider.js', array( 'jquery' ), '4.1.1', true );
|
752 |
-
wp_enqueue_script( 'jquery.bxslider' );
|
753 |
-
}
|
754 |
-
|
755 |
-
do_action( 'testimonials_widget_scripts', $atts );
|
756 |
-
}
|
757 |
-
|
758 |
-
|
759 |
-
public static function styles() {
|
760 |
-
if ( is_admin() )
|
761 |
-
return;
|
762 |
-
|
763 |
-
$use_bxslider = tw_get_option( 'use_bxslider' );
|
764 |
-
if ( $use_bxslider ) {
|
765 |
-
$exclude_bxslider_css = tw_get_option( 'exclude_bxslider_css' );
|
766 |
-
if ( empty( $exclude_bxslider_css ) ) {
|
767 |
-
wp_register_style( 'jquery.bxslider', self::$plugin_assets . 'css/jquery.bxslider.css' );
|
768 |
-
wp_enqueue_style( 'jquery.bxslider' );
|
769 |
-
}
|
770 |
-
|
771 |
-
wp_register_style( __CLASS__, self::$plugin_assets . 'css/testimonials-widget.css' );
|
772 |
-
} else {
|
773 |
-
wp_register_style( __CLASS__, self::$plugin_assets . 'css/testimonials-widget-2.14.0.css' );
|
774 |
-
|
775 |
-
$include_ie7_css = tw_get_option( 'include_ie7_css' );
|
776 |
-
if ( $include_ie7_css ) {
|
777 |
-
wp_register_style( __CLASS__ . '-ie7', self::$plugin_assets . 'css/testimonials-widget-ie7.css' );
|
778 |
-
wp_enqueue_style( __CLASS__ . '-ie7' );
|
779 |
-
}
|
780 |
-
}
|
781 |
-
|
782 |
-
wp_enqueue_style( __CLASS__ );
|
783 |
-
|
784 |
-
do_action( 'testimonials_widget_styles' );
|
785 |
-
}
|
786 |
-
|
787 |
-
|
788 |
-
public static function get_testimonials_html_css( $atts, $widget_number = null ) {
|
789 |
-
$css = array();
|
790 |
-
$id_base = self::ID . $widget_number;
|
791 |
-
|
792 |
-
switch ( $atts['type'] ) {
|
793 |
-
case 'testimonialswidget_widget':
|
794 |
-
$use_bxslider = $atts['use_bxslider'];
|
795 |
-
if ( ! $use_bxslider ) {
|
796 |
-
$height = $atts['height'];
|
797 |
-
$max_height = $atts['max_height'];
|
798 |
-
$min_height = $atts['min_height'];
|
799 |
-
|
800 |
-
if ( $height ) {
|
801 |
-
$max_height = $height;
|
802 |
-
$min_height = $height;
|
803 |
-
}
|
804 |
-
|
805 |
-
if ( $min_height ) {
|
806 |
-
$css[] = <<<EOF
|
807 |
-
<style>
|
808 |
-
.$id_base {
|
809 |
-
min-height: {$min_height}px;
|
810 |
-
}
|
811 |
-
</style>
|
812 |
-
EOF;
|
813 |
-
}
|
814 |
-
|
815 |
-
if ( $max_height ) {
|
816 |
-
$css[] = <<<EOF
|
817 |
-
<style>
|
818 |
-
.$id_base {
|
819 |
-
max-height: {$max_height}px;
|
820 |
-
}
|
821 |
-
</style>
|
822 |
-
EOF;
|
823 |
-
}
|
824 |
-
}
|
825 |
-
break;
|
826 |
-
}
|
827 |
-
|
828 |
-
$css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
|
829 |
-
|
830 |
-
return $css;
|
831 |
-
}
|
832 |
-
|
833 |
-
|
834 |
-
public static function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
|
835 |
-
$not_found = self::get_not_found();
|
836 |
-
if ( $not_found )
|
837 |
-
return;
|
838 |
-
|
839 |
-
$scripts = array();
|
840 |
-
$scripts_internal = array();
|
841 |
-
|
842 |
-
$id = self::ID;
|
843 |
-
$id_base = $id . $widget_number;
|
844 |
-
|
845 |
-
switch ( $atts['type'] ) {
|
846 |
-
case 'testimonialswidget_widget':
|
847 |
-
$javascript = '';
|
848 |
-
if ( 1 < count( $testimonials ) ) {
|
849 |
-
$refresh_interval = $atts['refresh_interval'];
|
850 |
-
|
851 |
-
$javascript .= '<script type="text/javascript">' . "\n";
|
852 |
-
|
853 |
-
$use_bxslider = $atts['use_bxslider'];
|
854 |
-
if ( $use_bxslider ) {
|
855 |
-
$enable_video = $atts['enable_video'];
|
856 |
-
$show_start_stop = $atts['show_start_stop'];
|
857 |
-
$transition_mode = $atts['transition_mode'];
|
858 |
-
|
859 |
-
$auto = $refresh_interval ? 'true' : 'false';
|
860 |
-
$pager = ! $refresh_interval ? 'pager: true' : 'pager: false';
|
861 |
-
$pause = $refresh_interval * 1000;
|
862 |
-
$video = $enable_video ? "video: true,\nuseCSS: false" : 'video: false';
|
863 |
-
|
864 |
-
$autoControls = $show_start_stop ? 'autoControls: true,' : '';
|
865 |
-
|
866 |
-
$slider_var = self::SLUG . $widget_number;
|
867 |
-
$javascript .= <<<EOF
|
868 |
-
var {$slider_var} = null;
|
869 |
-
|
870 |
-
jQuery(document).ready(function() {
|
871 |
-
{$slider_var} = jQuery('.{$id_base}').bxSlider({
|
872 |
-
auto: {$auto},
|
873 |
-
{$autoControls}
|
874 |
-
autoHover: true,
|
875 |
-
controls: false,
|
876 |
-
mode: '{$transition_mode}',
|
877 |
-
{$pager},
|
878 |
-
pause: {$pause},
|
879 |
-
{$video},
|
880 |
-
slideMargin: 2
|
881 |
-
});
|
882 |
-
});
|
883 |
-
|
884 |
-
EOF;
|
885 |
-
} else {
|
886 |
-
$tw_padding = 'tw_padding' . $widget_number;
|
887 |
-
$tw_wrapper = 'tw_wrapper' . $widget_number;
|
888 |
-
|
889 |
-
$disable_animation = $atts['disable_animation'];
|
890 |
-
$fade_in_speed = $atts['fade_in_speed'];
|
891 |
-
$fade_out_speed = $atts['fade_out_speed'];
|
892 |
-
$height = $atts['height'];
|
893 |
-
$max_height = $atts['max_height'];
|
894 |
-
$min_height = $atts['min_height'];
|
895 |
-
|
896 |
-
$enable_animation = 1;
|
897 |
-
if ( $disable_animation || $height || $max_height || $min_height )
|
898 |
-
$enable_animation = 0;
|
899 |
-
|
900 |
-
if ( $refresh_interval ) {
|
901 |
-
$javascript .= <<<EOF
|
902 |
-
function nextTestimonial{$widget_number}() {
|
903 |
-
if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
|
904 |
-
var active = jQuery('.{$id_base} .active');
|
905 |
-
var next = (jQuery('.{$id_base} .active').next().length > 0) ? jQuery('.{$id_base} .active').next() : jQuery('.{$id_base} .testimonials-widget-testimonial:first-child');
|
906 |
-
|
907 |
-
active.fadeOut({$fade_out_speed}, function() {
|
908 |
-
active.removeClass('active');
|
909 |
-
next.fadeIn({$fade_in_speed});
|
910 |
-
next.removeClass('display-none');
|
911 |
-
next.addClass('active');
|
912 |
-
|
913 |
-
{INTERNAL_SCRIPTS}
|
914 |
-
|
915 |
-
// added padding
|
916 |
-
if ( {$enable_animation} )
|
917 |
-
{$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
|
918 |
-
});
|
919 |
-
}
|
920 |
-
}
|
921 |
-
|
922 |
-
jQuery(document).ready(function() {
|
923 |
-
jQuery('.{$id_base}').hover(function() {
|
924 |
-
jQuery(this).addClass('hovered')
|
925 |
-
}, function() {
|
926 |
-
jQuery(this).removeClass('hovered')
|
927 |
-
});
|
928 |
-
|
929 |
-
nextTestimonial{$widget_number}interval = setInterval('nextTestimonial{$widget_number}()', {$refresh_interval} * 1000);
|
930 |
-
});
|
931 |
-
|
932 |
-
EOF;
|
933 |
-
}
|
934 |
-
|
935 |
-
$javascript .= <<<EOF
|
936 |
-
if ( {$enable_animation} ) {
|
937 |
-
var {$tw_wrapper} = jQuery('.{$id_base}');
|
938 |
-
var {$tw_padding} = 0;
|
939 |
-
|
940 |
-
jQuery(document).ready(function() {
|
941 |
-
// tw_padding is the difference in height to take into account all styling options
|
942 |
-
{$tw_padding} = {$tw_wrapper}.height() - jQuery('.{$id_base} .testimonials-widget-testimonial').height();
|
943 |
-
|
944 |
-
// fixes first animation by defining height to adjust to
|
945 |
-
{$tw_wrapper}.height( {$tw_wrapper}.height() );
|
946 |
-
});
|
947 |
-
}
|
948 |
-
EOF;
|
949 |
-
}
|
950 |
-
|
951 |
-
$javascript .= "\n" . '</script>';
|
952 |
-
$scripts[ $id_base ] = $javascript;
|
953 |
-
}
|
954 |
-
break;
|
955 |
-
}
|
956 |
-
|
957 |
-
$scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
|
958 |
-
$scripts_internal = apply_filters( 'testimonials_widget_testimonials_js_internal', $scripts_internal, $testimonials, $atts, $widget_number );
|
959 |
-
$internal_scripts = implode( "\n", $scripts_internal );
|
960 |
-
$scripts = str_replace( '{INTERNAL_SCRIPTS}', $internal_scripts, $scripts );
|
961 |
-
|
962 |
-
return $scripts;
|
963 |
-
}
|
964 |
-
|
965 |
-
|
966 |
-
public static function get_testimonials_html( $testimonials, $atts, $is_list = true, $widget_number = null ) {
|
967 |
-
$hide_not_found = $atts['hide_not_found'];
|
968 |
-
$paging = Testimonials_Widget_Settings::is_true( $atts['paging'] );
|
969 |
-
$paging_before = ( 'before' === strtolower( $atts['paging'] ) );
|
970 |
-
$paging_after = ( 'after' === strtolower( $atts['paging'] ) );
|
971 |
-
$target = $atts['target'];
|
972 |
-
|
973 |
-
$id = self::ID;
|
974 |
-
|
975 |
-
if ( is_null( $widget_number ) ) {
|
976 |
-
$div_open = '<div class="' . $id;
|
977 |
-
|
978 |
-
if ( $is_list )
|
979 |
-
$div_open .= ' listing';
|
980 |
-
|
981 |
-
$div_open .= '">';
|
982 |
-
} else {
|
983 |
-
$id_base = $id . $widget_number;
|
984 |
-
$div_open = '<div class="' . $id . ' ' . $id_base . '">';
|
985 |
-
}
|
986 |
-
|
987 |
-
$div_open .= "\n";
|
988 |
-
if ( empty( $testimonials ) && ! $hide_not_found ) {
|
989 |
-
$testimonials = array(
|
990 |
-
array( 'testimonial_content' => esc_html__( 'No testimonials found', 'testimonials-widget' ) ),
|
991 |
-
);
|
992 |
-
|
993 |
-
self::set_not_found( true );
|
994 |
-
} else
|
995 |
-
self::set_not_found();
|
996 |
-
|
997 |
-
$pre_paging = '';
|
998 |
-
if ( $paging || $paging_before )
|
999 |
-
$pre_paging = self::get_testimonials_paging( $atts );
|
1000 |
-
|
1001 |
-
$is_first = true;
|
1002 |
-
|
1003 |
-
$testimonial_content = '';
|
1004 |
-
foreach ( $testimonials as $testimonial ) {
|
1005 |
-
$content = self::get_testimonial_html( $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1006 |
-
if ( $target )
|
1007 |
-
$content = links_add_target( $content, $target );
|
1008 |
-
$content = apply_filters( 'testimonials_widget_testimonial_html', $content, $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1009 |
-
$is_first = false;
|
1010 |
-
|
1011 |
-
$testimonial_content .= $content;
|
1012 |
-
}
|
1013 |
-
|
1014 |
-
$post_paging = '';
|
1015 |
-
if ( $paging || $paging_after )
|
1016 |
-
$post_paging = self::get_testimonials_paging( $atts, false );
|
1017 |
-
|
1018 |
-
$div_close = '</div>';
|
1019 |
-
$div_close .= "\n";
|
1020 |
-
|
1021 |
-
$html = $div_open
|
1022 |
-
. $pre_paging
|
1023 |
-
. $testimonial_content
|
1024 |
-
. $post_paging
|
1025 |
-
. $div_close;
|
1026 |
-
|
1027 |
-
$html = apply_filters( 'testimonials_widget_get_testimonials_html', $html, $testimonials, $atts, $is_list, $widget_number, $div_open, $pre_paging, $testimonial_content, $post_paging, $div_close );
|
1028 |
-
|
1029 |
-
return $html;
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
|
1033 |
-
public static function get_testimonial_html( $testimonial, $atts, $is_list = true, $is_first = false, $widget_number = null ) {
|
1034 |
-
$disable_quotes = $atts['disable_quotes'];
|
1035 |
-
$do_image = ! $atts['hide_image'] && ! empty( $testimonial['testimonial_image'] );
|
1036 |
-
$do_image_single = ! $atts['hide_image_single'];
|
1037 |
-
$do_schema = $atts['enable_schema'];
|
1038 |
-
$keep_whitespace = $atts['keep_whitespace'];
|
1039 |
-
$remove_hentry = $atts['remove_hentry'];
|
1040 |
-
$transition_mode = $atts['transition_mode'];
|
1041 |
-
$use_bxslider = $atts['use_bxslider'];
|
1042 |
-
|
1043 |
-
$class = 'testimonials-widget-testimonial';
|
1044 |
-
if ( is_single() && empty( $widget_number ) ) {
|
1045 |
-
$class .= ' single';
|
1046 |
-
} elseif ( $is_list ) {
|
1047 |
-
$class .= ' list';
|
1048 |
-
} else {
|
1049 |
-
// widget display
|
1050 |
-
if ( $use_bxslider ) {
|
1051 |
-
$refresh_interval = $atts['refresh_interval'];
|
1052 |
-
if ( ! $is_first && ! empty( $refresh_interval ) && ! in_array( $transition_mode, array( 'horizontal', 'vertical' ) ) ) {
|
1053 |
-
$class .= ' display-none';
|
1054 |
-
}
|
1055 |
-
} else {
|
1056 |
-
if ( $is_first ) {
|
1057 |
-
$class .= ' active';
|
1058 |
-
} else {
|
1059 |
-
$class .= ' display-none';
|
1060 |
-
}
|
1061 |
-
}
|
1062 |
-
}
|
1063 |
-
|
1064 |
-
if ( $keep_whitespace )
|
1065 |
-
$class .= ' whitespace';
|
1066 |
-
|
1067 |
-
$post_id = $testimonial['post_id'];
|
1068 |
-
if ( ! empty( $post_id ) )
|
1069 |
-
$class = join( ' ', get_post_class( $class, $post_id ) );
|
1070 |
-
else
|
1071 |
-
$class = 'testimonials-widget type-testimonials-widget status-publish hentry ' . $class;
|
1072 |
-
|
1073 |
-
$class = apply_filters( 'testimonials_widget_get_testimonial_html_class', $class, $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1074 |
-
$div_open = '<div class="' . $class . '">';
|
1075 |
-
$div_open .= '<!-- ' . self::ID . ":{$post_id}: -->";
|
1076 |
-
|
1077 |
-
if ( $do_schema ) {
|
1078 |
-
$div_open .= "\n";
|
1079 |
-
$div_open .= sprintf( self::$schema_div_open, self::$review_schema );
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
if ( $remove_hentry )
|
1083 |
-
$div_open = str_replace( ' hentry', '', $div_open );
|
1084 |
-
|
1085 |
-
$image = '';
|
1086 |
-
if ( $do_image ) {
|
1087 |
-
$pic = $testimonial['testimonial_image'];
|
1088 |
-
|
1089 |
-
$image .= '<span class="image">';
|
1090 |
-
$image .= $pic;
|
1091 |
-
$image .= '</span>';
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
if ( ! $do_image_single && 'get_single' == $atts['type'] )
|
1095 |
-
$image = '';
|
1096 |
-
|
1097 |
-
$quote = self::get_quote( $testimonial, $atts, $widget_number );
|
1098 |
-
|
1099 |
-
$cite = '';
|
1100 |
-
if ( 1 < count( $testimonial ) ) {
|
1101 |
-
$cite = self::get_cite( $testimonial, $atts );
|
1102 |
-
|
1103 |
-
if ( $do_schema ) {
|
1104 |
-
$schema = self::get_schema( $testimonial, $atts );
|
1105 |
-
$cite .= $schema;
|
1106 |
-
}
|
1107 |
-
}
|
1108 |
-
|
1109 |
-
$extra = '';
|
1110 |
-
if ( ! empty( $testimonial['testimonial_extra'] ) ) {
|
1111 |
-
$extra .= '<div class="extra">';
|
1112 |
-
$extra .= $testimonial['testimonial_extra'];
|
1113 |
-
$extra .= '</div>';
|
1114 |
-
$extra .= "\n";
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
$bottom_text = '';
|
1118 |
-
if ( ! empty( $atts['bottom_text'] ) ) {
|
1119 |
-
$bottom_text = '<div class="bottom_text">';
|
1120 |
-
$bottom_text .= $atts['bottom_text'];
|
1121 |
-
$bottom_text .= '</div>';
|
1122 |
-
$bottom_text .= "\n";
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
$div_close = '';
|
1126 |
-
if ( $do_schema ) {
|
1127 |
-
$div_close .= '</div>';
|
1128 |
-
$div_close .= "\n";
|
1129 |
-
}
|
1130 |
-
|
1131 |
-
$div_close .= '</div>';
|
1132 |
-
$div_close .= "\n";
|
1133 |
-
|
1134 |
-
$html = $div_open
|
1135 |
-
. $image
|
1136 |
-
. $quote
|
1137 |
-
. $cite
|
1138 |
-
. $extra
|
1139 |
-
. $bottom_text
|
1140 |
-
. $div_close;
|
1141 |
-
|
1142 |
-
$html = apply_filters( 'testimonials_widget_get_testimonial_html', $html, $testimonial, $atts, $is_list, $is_first, $widget_number, $div_open, $image, $quote, $cite, $extra, $bottom_text, $div_close );
|
1143 |
-
|
1144 |
-
// not done sooner as tag_close_quote is used for Premium
|
1145 |
-
if ( $disable_quotes ) {
|
1146 |
-
$html = str_replace( self::$tag_open_quote, '', $html );
|
1147 |
-
$html = str_replace( self::$tag_close_quote, '', $html );
|
1148 |
-
}
|
1149 |
-
|
1150 |
-
return $html;
|
1151 |
-
}
|
1152 |
-
|
1153 |
-
|
1154 |
-
public static function get_quote( $testimonial, $atts, $widget_number ) {
|
1155 |
-
$char_limit = $atts['char_limit'];
|
1156 |
-
$content_more = apply_filters( 'testimonials_widget_content_more', esc_html__( '…', 'testimonials-widget' ) );
|
1157 |
-
$content_more .= self::$tag_close_quote;
|
1158 |
-
$do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
|
1159 |
-
$use_quote_tag = $atts['use_quote_tag'];
|
1160 |
-
|
1161 |
-
$quote = '';
|
1162 |
-
if ( $do_content ) {
|
1163 |
-
$content = $testimonial['testimonial_content'];
|
1164 |
-
$content = self::format_content( $content, $widget_number, $atts );
|
1165 |
-
if ( $char_limit ) {
|
1166 |
-
$content = self::testimonials_truncate( $content, $char_limit, $content_more );
|
1167 |
-
$content = force_balance_tags( $content );
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
$content = apply_filters( 'testimonials_widget_content', $content, $widget_number, $testimonial, $atts );
|
1171 |
-
$content = make_clickable( $content );
|
1172 |
-
|
1173 |
-
if ( ! $use_quote_tag ) {
|
1174 |
-
$quote = '<blockquote>';
|
1175 |
-
$quote .= $content;
|
1176 |
-
$quote .= '</blockquote>';
|
1177 |
-
} else {
|
1178 |
-
$quote = '<q>';
|
1179 |
-
$quote .= $content;
|
1180 |
-
$quote .= '</q>';
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
$quote = "\n" . $quote;
|
1184 |
-
}
|
1185 |
-
|
1186 |
-
return $quote;
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
|
1190 |
-
public static function get_cite( $testimonial, $atts ) {
|
1191 |
-
extract( $testimonial );
|
1192 |
-
|
1193 |
-
$do_company = ! $atts['hide_company'] && ! empty( $testimonial_company );
|
1194 |
-
$do_email = ! $atts['hide_email'] && ! empty( $testimonial_email ) && is_email( $testimonial_email );
|
1195 |
-
$do_location = ! $atts['hide_location'] && ! empty( $testimonial_location );
|
1196 |
-
$do_source = ! $atts['hide_source'] && ! empty( $testimonial_source );
|
1197 |
-
$do_title = ! $atts['hide_title'] && ! empty( $testimonial_title );
|
1198 |
-
$do_url = ! $atts['hide_url'] && ! empty( $testimonial_url );
|
1199 |
-
$use_quote_tag = $atts['use_quote_tag'];
|
1200 |
-
|
1201 |
-
$cite = '';
|
1202 |
-
|
1203 |
-
$done_url = false;
|
1204 |
-
if ( $do_source && $do_email ) {
|
1205 |
-
$cite .= '<span class="author">';
|
1206 |
-
$cite .= '<a href="mailto:' . $testimonial_email . '">';
|
1207 |
-
$cite .= $testimonial_source;
|
1208 |
-
$cite .= '</a>';
|
1209 |
-
$cite .= '</span>';
|
1210 |
-
} elseif ( $do_source && ! $do_company && $do_url ) {
|
1211 |
-
$done_url = true;
|
1212 |
-
|
1213 |
-
$cite .= '<span class="author">';
|
1214 |
-
$cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
|
1215 |
-
$cite .= $testimonial_source;
|
1216 |
-
$cite .= '</a>';
|
1217 |
-
$cite .= '</span>';
|
1218 |
-
} elseif ( $do_source ) {
|
1219 |
-
$cite .= '<span class="author">';
|
1220 |
-
$cite .= $testimonial_source;
|
1221 |
-
$cite .= '</span>';
|
1222 |
-
} elseif ( $do_email ) {
|
1223 |
-
$cite .= '<span class="email">';
|
1224 |
-
$cite .= make_clickable( $testimonial_email );
|
1225 |
-
$cite .= '</span>';
|
1226 |
-
}
|
1227 |
-
|
1228 |
-
if ( $do_title && $cite )
|
1229 |
-
$cite .= '<span class="join-title"></span>';
|
1230 |
-
|
1231 |
-
if ( $do_title ) {
|
1232 |
-
$cite .= '<span class="title">';
|
1233 |
-
$cite .= $testimonial_title;
|
1234 |
-
$cite .= '</span>';
|
1235 |
-
}
|
1236 |
-
|
1237 |
-
if ( $do_location && $cite )
|
1238 |
-
$cite .= '<span class="join-location"></span>';
|
1239 |
-
|
1240 |
-
if ( $do_location ) {
|
1241 |
-
$cite .= '<span class="location">';
|
1242 |
-
$cite .= $testimonial_location;
|
1243 |
-
$cite .= '</span>';
|
1244 |
-
}
|
1245 |
-
|
1246 |
-
if ( ( $do_company || ( $do_url && ! $done_url ) ) && $cite )
|
1247 |
-
$cite .= '<span class="join"></span>';
|
1248 |
-
|
1249 |
-
if ( $do_company && $do_url ) {
|
1250 |
-
$cite .= '<span class="company">';
|
1251 |
-
$cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
|
1252 |
-
$cite .= $testimonial_company;
|
1253 |
-
$cite .= '</a>';
|
1254 |
-
$cite .= '</span>';
|
1255 |
-
} elseif ( $do_company ) {
|
1256 |
-
$cite .= '<span class="company">';
|
1257 |
-
$cite .= $testimonial_company;
|
1258 |
-
$cite .= '</span>';
|
1259 |
-
} elseif ( $do_url && ! $done_url ) {
|
1260 |
-
$cite .= '<span class="url">';
|
1261 |
-
$cite .= make_clickable( $testimonial_url );
|
1262 |
-
$cite .= '</span>';
|
1263 |
-
}
|
1264 |
-
|
1265 |
-
$cite = apply_filters( 'testimonials_widget_cite_html', $cite, $testimonial, $atts );
|
1266 |
-
|
1267 |
-
if ( ! empty( $cite ) ) {
|
1268 |
-
if ( ! $use_quote_tag ) {
|
1269 |
-
$temp = '<div class="credit">';
|
1270 |
-
$temp .= $cite;
|
1271 |
-
$temp .= '</div>';
|
1272 |
-
|
1273 |
-
$cite = "\n" . $temp . "\n";
|
1274 |
-
} else {
|
1275 |
-
$cite = '<cite>' . $cite . '</cite>';
|
1276 |
-
}
|
1277 |
-
}
|
1278 |
-
|
1279 |
-
return $cite;
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
|
1283 |
-
// Original PHP code as myTruncate2 by Chirp Internet: www.chirp.com.au
|
1284 |
-
public static function testimonials_truncate( $string, $char_limit = false, $pad = '…', $force_pad = false ) {
|
1285 |
-
if ( empty( $force_pad ) ) {
|
1286 |
-
if ( ! $char_limit )
|
1287 |
-
return $string;
|
1288 |
-
|
1289 |
-
// return with no change if string is shorter than $char_limit
|
1290 |
-
if ( strlen( $string ) <= $char_limit )
|
1291 |
-
return $string;
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
if ( $char_limit )
|
1295 |
-
return self::truncate( $string, $char_limit, $pad, $force_pad );
|
1296 |
-
|
1297 |
-
return $string . $pad;
|
1298 |
-
}
|
1299 |
-
|
1300 |
-
|
1301 |
-
public static function format_content( $content, $widget_number, $atts ) {
|
1302 |
-
if ( empty ( $content ) )
|
1303 |
-
return $content;
|
1304 |
-
|
1305 |
-
$keep_whitespace = $atts['keep_whitespace'];
|
1306 |
-
$do_shortcode = $atts['do_shortcode'];
|
1307 |
-
|
1308 |
-
// wrap our own quote class around the content before any formatting
|
1309 |
-
// happens
|
1310 |
-
|
1311 |
-
$temp_content = self::$tag_open_quote;
|
1312 |
-
$temp_content .= $content;
|
1313 |
-
$temp_content .= self::$tag_close_quote;
|
1314 |
-
|
1315 |
-
$content = $temp_content;
|
1316 |
-
$content = trim( $content );
|
1317 |
-
$content = wptexturize( $content );
|
1318 |
-
$content = convert_smilies( $content );
|
1319 |
-
$content = convert_chars( $content );
|
1320 |
-
|
1321 |
-
if ( is_null( $widget_number ) || $keep_whitespace )
|
1322 |
-
$content = wpautop( $content );
|
1323 |
-
|
1324 |
-
$content = shortcode_unautop( $content );
|
1325 |
-
|
1326 |
-
if ( $do_shortcode )
|
1327 |
-
$content = do_shortcode( $content );
|
1328 |
-
else
|
1329 |
-
$content = strip_shortcodes( $content );
|
1330 |
-
|
1331 |
-
$content = str_replace( ']]>', ']]>', $content );
|
1332 |
-
$content = trim( $content );
|
1333 |
-
|
1334 |
-
return $content;
|
1335 |
-
}
|
1336 |
-
|
1337 |
-
|
1338 |
-
public static function get_testimonials_paging( $atts, $prepend = true ) {
|
1339 |
-
$html = '';
|
1340 |
-
|
1341 |
-
if ( is_home() || 1 === self::$max_num_pages )
|
1342 |
-
return $html;
|
1343 |
-
|
1344 |
-
$html .= '<div class="paging';
|
1345 |
-
|
1346 |
-
if ( $prepend )
|
1347 |
-
$html .= ' prepend';
|
1348 |
-
else
|
1349 |
-
$html .= ' append';
|
1350 |
-
|
1351 |
-
$html .= '">';
|
1352 |
-
$html .= "\n";
|
1353 |
-
|
1354 |
-
if ( $atts['paged'] )
|
1355 |
-
$paged = $atts['paged'];
|
1356 |
-
else
|
1357 |
-
$paged = 1;
|
1358 |
-
|
1359 |
-
if ( ! function_exists( 'wp_pagenavi' ) ) {
|
1360 |
-
$html .= '<div class="alignleft">';
|
1361 |
-
|
1362 |
-
if ( 1 < $paged ) {
|
1363 |
-
$laquo = apply_filters( 'testimonials_widget_previous_posts_link_text', esc_html__( '«', 'testimonials-widget' ) );
|
1364 |
-
$html .= get_previous_posts_link( $laquo, $paged );
|
1365 |
-
}
|
1366 |
-
|
1367 |
-
$html .= '</div>';
|
1368 |
-
$html .= "\n";
|
1369 |
-
$html .= '<div class="alignright">';
|
1370 |
-
if ( $paged != self::$max_num_pages ) {
|
1371 |
-
$raquo = apply_filters( 'testimonials_widget_next_posts_link_text', esc_html__( '»', 'testimonials-widget' ) );
|
1372 |
-
$html .= get_next_posts_link( $raquo, self::$max_num_pages );
|
1373 |
-
}
|
1374 |
-
|
1375 |
-
$html .= '</div>';
|
1376 |
-
$html .= "\n";
|
1377 |
-
} else {
|
1378 |
-
$args = array(
|
1379 |
-
'echo' => false,
|
1380 |
-
'query' => self::$wp_query,
|
1381 |
-
);
|
1382 |
-
$args = apply_filters( 'testimonials_widget_wp_pagenavi', $args );
|
1383 |
-
|
1384 |
-
$html .= wp_pagenavi( $args );
|
1385 |
-
$html .= "\n";
|
1386 |
-
}
|
1387 |
-
|
1388 |
-
$html .= '</div>';
|
1389 |
-
$html .= "\n";
|
1390 |
-
|
1391 |
-
return $html;
|
1392 |
-
}
|
1393 |
-
|
1394 |
-
|
1395 |
-
public static function get_testimonials_css() {
|
1396 |
-
if ( empty( self::$css_called ) ) {
|
1397 |
-
foreach ( self::$css as $css )
|
1398 |
-
echo $css;
|
1399 |
-
|
1400 |
-
self::$css_called = true;
|
1401 |
-
}
|
1402 |
-
}
|
1403 |
-
|
1404 |
-
|
1405 |
-
public static function get_testimonials_scripts() {
|
1406 |
-
if ( empty( self::$scripts_called ) ) {
|
1407 |
-
foreach ( self::$scripts as $script )
|
1408 |
-
echo $script;
|
1409 |
-
|
1410 |
-
self::$scripts_called = true;
|
1411 |
-
}
|
1412 |
-
}
|
1413 |
-
|
1414 |
-
|
1415 |
-
/**
|
1416 |
-
*
|
1417 |
-
*
|
1418 |
-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1419 |
-
*/
|
1420 |
-
public static function get_query_args( $atts ) {
|
1421 |
-
extract( $atts );
|
1422 |
-
|
1423 |
-
if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) )
|
1424 |
-
remove_filter( 'posts_orderby', 'CPTOrderPosts', 99, 2 );
|
1425 |
-
|
1426 |
-
if ( $random ) {
|
1427 |
-
$orderby = 'rand';
|
1428 |
-
$order = false;
|
1429 |
-
}
|
1430 |
-
|
1431 |
-
$args = array(
|
1432 |
-
'orderby' => $orderby,
|
1433 |
-
'post_status' => array(
|
1434 |
-
'publish',
|
1435 |
-
'private',
|
1436 |
-
),
|
1437 |
-
'post_type' => Testimonials_Widget::PT,
|
1438 |
-
'posts_per_page' => $limit,
|
1439 |
-
);
|
1440 |
-
|
1441 |
-
if ( is_single() ) {
|
1442 |
-
$args['post_status'][] = 'pending';
|
1443 |
-
$args['post_status'][] = 'draft';
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
if ( $paging && ! empty( $atts['paged'] ) && is_singular() )
|
1447 |
-
$args['paged'] = $atts['paged'];
|
1448 |
-
|
1449 |
-
if ( ! $random && $meta_key ) {
|
1450 |
-
$args['meta_key'] = $meta_key;
|
1451 |
-
$args['orderby'] = 'meta_value';
|
1452 |
-
}
|
1453 |
-
|
1454 |
-
if ( $order )
|
1455 |
-
$args['order'] = $order;
|
1456 |
-
|
1457 |
-
if ( $ids ) {
|
1458 |
-
$ids = explode( ',', $ids );
|
1459 |
-
|
1460 |
-
$args['post__in'] = $ids;
|
1461 |
-
|
1462 |
-
if ( 'none' == $args['orderby'] )
|
1463 |
-
add_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ), 10, 2 );
|
1464 |
-
}
|
1465 |
-
|
1466 |
-
if ( $exclude ) {
|
1467 |
-
$exclude = explode( ',', $exclude );
|
1468 |
-
$args['post__not_in'] = $exclude;
|
1469 |
-
}
|
1470 |
-
|
1471 |
-
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
1472 |
-
if ( ! $use_cpt_taxonomy ) {
|
1473 |
-
if ( $category )
|
1474 |
-
$args['category_name'] = $category;
|
1475 |
-
|
1476 |
-
if ( $tags ) {
|
1477 |
-
$tags = explode( ',', $tags );
|
1478 |
-
|
1479 |
-
if ( $tags_all )
|
1480 |
-
$args['tag_slug__and'] = $tags;
|
1481 |
-
else
|
1482 |
-
$args['tag_slug__in'] = $tags;
|
1483 |
-
}
|
1484 |
-
} else {
|
1485 |
-
if ( $category )
|
1486 |
-
$args[ self::$cpt_category ] = $category;
|
1487 |
-
|
1488 |
-
if ( $tags ) {
|
1489 |
-
if ( $tags_all ) {
|
1490 |
-
$args[ 'tax_query' ] = array(
|
1491 |
-
'relation' => 'AND',
|
1492 |
-
);
|
1493 |
-
|
1494 |
-
$tags = explode( ',', $tags );
|
1495 |
-
foreach ( $tags as $term ) {
|
1496 |
-
$args[ 'tax_query' ][] = array(
|
1497 |
-
'taxonomy' => self::$cpt_tags,
|
1498 |
-
'terms' => array( $term ),
|
1499 |
-
'field' => 'slug',
|
1500 |
-
);
|
1501 |
-
}
|
1502 |
-
} else {
|
1503 |
-
$args[ self::$cpt_tags ] = $tags;
|
1504 |
-
}
|
1505 |
-
}
|
1506 |
-
}
|
1507 |
-
|
1508 |
-
$args = apply_filters( 'testimonials_widget_query_args', $args, $atts );
|
1509 |
-
|
1510 |
-
return $args;
|
1511 |
-
}
|
1512 |
-
|
1513 |
-
|
1514 |
-
/**
|
1515 |
-
*
|
1516 |
-
*
|
1517 |
-
* @SuppressWarnings(PHPMD.LongVariable)
|
1518 |
-
*/
|
1519 |
-
public static function get_testimonials( $atts ) {
|
1520 |
-
$hide_gravatar = $atts['hide_gravatar'];
|
1521 |
-
|
1522 |
-
$args = self::get_query_args( $atts );
|
1523 |
-
$args['query'] = true;
|
1524 |
-
|
1525 |
-
$testimonials = apply_filters( 'testimonials_widget_cache_get', false, $args );
|
1526 |
-
if ( false === $testimonials ) {
|
1527 |
-
$testimonials = new WP_Query( $args );
|
1528 |
-
$testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
|
1529 |
-
}
|
1530 |
-
|
1531 |
-
if ( has_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) ) )
|
1532 |
-
remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
|
1533 |
-
|
1534 |
-
self::$max_num_pages = $testimonials->max_num_pages;
|
1535 |
-
self::$found_posts = $testimonials->found_posts;
|
1536 |
-
self::$post_count = $testimonials->post_count;
|
1537 |
-
self::$wp_query = $testimonials;
|
1538 |
-
|
1539 |
-
wp_reset_postdata();
|
1540 |
-
|
1541 |
-
$image_size = apply_filters( 'testimonials_widget_image_size', 'thumbnail' );
|
1542 |
-
if ( ! is_array( $image_size ) ) {
|
1543 |
-
global $_wp_additional_image_sizes;
|
1544 |
-
if ( ! empty( $_wp_additional_image_sizes[ $image_size ] ) )
|
1545 |
-
$gravatar_size = $_wp_additional_image_sizes[ $image_size ]['width'];
|
1546 |
-
else
|
1547 |
-
$gravatar_size = get_option( $image_size . '_size_w' );
|
1548 |
-
|
1549 |
-
$gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $gravatar_size );
|
1550 |
-
} else
|
1551 |
-
$gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $image_size );
|
1552 |
-
|
1553 |
-
$testimonial_data = array();
|
1554 |
-
|
1555 |
-
if ( empty( self::$post_count ) )
|
1556 |
-
return $testimonial_data;
|
1557 |
-
|
1558 |
-
foreach ( $testimonials->posts as $row ) {
|
1559 |
-
$post_id = $row->ID;
|
1560 |
-
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
1561 |
-
|
1562 |
-
if ( has_post_thumbnail( $post_id ) ) {
|
1563 |
-
$image = get_the_post_thumbnail( $post_id, $image_size );
|
1564 |
-
} elseif ( ! $hide_gravatar && is_email( $email ) ) {
|
1565 |
-
$image = get_avatar( $email, $gravatar_size );
|
1566 |
-
|
1567 |
-
self::make_gravatar_featured( $post_id, $email );
|
1568 |
-
} else {
|
1569 |
-
$image = false;
|
1570 |
-
}
|
1571 |
-
|
1572 |
-
$image = self::strip_protocol( $image );
|
1573 |
-
|
1574 |
-
$url = get_post_meta( $post_id, 'testimonials-widget-url', true );
|
1575 |
-
if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
1576 |
-
$url = 'http://' . $url;
|
1577 |
-
|
1578 |
-
$data = array(
|
1579 |
-
'post_id' => $post_id,
|
1580 |
-
'testimonial_company' => get_post_meta( $post_id, 'testimonials-widget-company', true ),
|
1581 |
-
'testimonial_content' => $row->post_content,
|
1582 |
-
'testimonial_email' => $email,
|
1583 |
-
'testimonial_extra' => '',
|
1584 |
-
'testimonial_image' => $image,
|
1585 |
-
'testimonial_location' => get_post_meta( $post_id, 'testimonials-widget-location', true ),
|
1586 |
-
'testimonial_source' => $row->post_title,
|
1587 |
-
'testimonial_title' => get_post_meta( $post_id, 'testimonials-widget-title', true ),
|
1588 |
-
'testimonial_url' => $url,
|
1589 |
-
);
|
1590 |
-
|
1591 |
-
$testimonial_data[] = $data;
|
1592 |
-
}
|
1593 |
-
|
1594 |
-
$testimonial_data = apply_filters( 'testimonials_widget_data', $testimonial_data, $atts );
|
1595 |
-
|
1596 |
-
return $testimonial_data;
|
1597 |
-
}
|
1598 |
-
|
1599 |
-
|
1600 |
-
public static function posts_results_sort_none( $posts, $query ) {
|
1601 |
-
$order = $query->query_vars['post__in'];
|
1602 |
-
if ( empty( $order ) )
|
1603 |
-
return $posts;
|
1604 |
-
|
1605 |
-
$posts_none_sorted = array();
|
1606 |
-
// put posts in same orders as post__in
|
1607 |
-
foreach ( $order as $id ) {
|
1608 |
-
foreach ( $posts as $key => $post ) {
|
1609 |
-
if ( $id == $post->ID ) {
|
1610 |
-
$posts_none_sorted[] = $post;
|
1611 |
-
unset( $posts[$key] );
|
1612 |
-
}
|
1613 |
-
}
|
1614 |
-
}
|
1615 |
-
|
1616 |
-
return $posts_none_sorted;
|
1617 |
-
}
|
1618 |
-
|
1619 |
-
|
1620 |
-
public static function widgets_init() {
|
1621 |
-
register_widget( 'Testimonials_Widget_Widget' );
|
1622 |
-
}
|
1623 |
-
|
1624 |
-
|
1625 |
-
/**
|
1626 |
-
*
|
1627 |
-
*
|
1628 |
-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1629 |
-
*/
|
1630 |
-
public static function add_meta_box_testimonials_widget() {
|
1631 |
-
$fields = array(
|
1632 |
-
array(
|
1633 |
-
'name' => esc_html__( 'Job Title', 'testimonials-widget' ),
|
1634 |
-
'id' => 'testimonials-widget-title',
|
1635 |
-
'type' => 'text',
|
1636 |
-
'desc' => '',
|
1637 |
-
),
|
1638 |
-
array(
|
1639 |
-
'name' => esc_html__( 'Location', 'testimonials-widget' ),
|
1640 |
-
'id' => 'testimonials-widget-location',
|
1641 |
-
'type' => 'text',
|
1642 |
-
'desc' => '',
|
1643 |
-
),
|
1644 |
-
array(
|
1645 |
-
'name' => esc_html__( 'Email', 'testimonials-widget' ),
|
1646 |
-
'id' => 'testimonials-widget-email',
|
1647 |
-
'type' => 'text',
|
1648 |
-
'desc' => '',
|
1649 |
-
),
|
1650 |
-
array(
|
1651 |
-
'name' => esc_html__( 'Company', 'testimonials-widget' ),
|
1652 |
-
'id' => 'testimonials-widget-company',
|
1653 |
-
'type' => 'text',
|
1654 |
-
'desc' => '',
|
1655 |
-
),
|
1656 |
-
array(
|
1657 |
-
'name' => esc_html__( 'URL', 'testimonials-widget' ),
|
1658 |
-
'id' => 'testimonials-widget-url',
|
1659 |
-
'type' => 'text',
|
1660 |
-
'desc' => '',
|
1661 |
-
),
|
1662 |
-
);
|
1663 |
-
|
1664 |
-
$fields = apply_filters( 'testimonials_widget_meta_box', $fields );
|
1665 |
-
|
1666 |
-
$meta_box = redrokk_metabox_class::getInstance(
|
1667 |
-
self::ID,
|
1668 |
-
array(
|
1669 |
-
'title' => esc_html__( 'Testimonial Data', 'testimonials-widget' ),
|
1670 |
-
'description' => '',
|
1671 |
-
'_object_types' => 'testimonials-widget',
|
1672 |
-
'priority' => 'high',
|
1673 |
-
'_fields' => $fields,
|
1674 |
-
)
|
1675 |
-
);
|
1676 |
-
}
|
1677 |
-
|
1678 |
-
|
1679 |
-
/**
|
1680 |
-
* Revise default new testimonial text
|
1681 |
-
*
|
1682 |
-
* Original author: Travis Ballard http://www.travisballard.com
|
1683 |
-
*
|
1684 |
-
* @param string $translation
|
1685 |
-
* @return string $translation
|
1686 |
-
*/
|
1687 |
-
public static function gettext_testimonials( $translation ) {
|
1688 |
-
remove_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
1689 |
-
|
1690 |
-
global $post;
|
1691 |
-
|
1692 |
-
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1693 |
-
switch ( $translation ) {
|
1694 |
-
case esc_html__( 'Enter title here', 'testimonials-widget' ):
|
1695 |
-
return esc_html__( 'Enter testimonial source here', 'testimonials-widget' );
|
1696 |
-
break;
|
1697 |
-
}
|
1698 |
-
}
|
1699 |
-
|
1700 |
-
add_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
1701 |
-
|
1702 |
-
return $translation;
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
|
1706 |
-
/**
|
1707 |
-
* Update messages for custom post type
|
1708 |
-
*
|
1709 |
-
* Original author: Travis Ballard http://www.travisballard.com
|
1710 |
-
*
|
1711 |
-
* @SuppressWarnings(PHPMD.Superglobals)
|
1712 |
-
* @param mixed $m
|
1713 |
-
* @return mixed $m
|
1714 |
-
*/
|
1715 |
-
public static function post_updated_messages( $m ) {
|
1716 |
-
global $post;
|
1717 |
-
|
1718 |
-
$m[ self::PT ] = array(
|
1719 |
-
0 => '', // Unused. Messages start at index 1.
|
1720 |
-
1 => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1721 |
-
2 => esc_html__( 'Custom field updated.', 'testimonials-widget' ),
|
1722 |
-
3 => esc_html__( 'Custom field deleted.', 'testimonials-widget' ),
|
1723 |
-
4 => esc_html__( 'Testimonial updated.', 'testimonials-widget' ),
|
1724 |
-
/* translators: %s: date and time of the revision */
|
1725 |
-
5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Testimonial restored to revision from %s', 'testimonials-widget' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
1726 |
-
6 => sprintf( __( 'Testimonial published. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1727 |
-
7 => esc_html__( 'Testimonial saved.', 'testimonials-widget' ),
|
1728 |
-
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 ) ) ) ),
|
1729 |
-
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 ) ) ),
|
1730 |
-
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 ) ) ) )
|
1731 |
-
);
|
1732 |
-
|
1733 |
-
return $m;
|
1734 |
-
}
|
1735 |
-
|
1736 |
-
|
1737 |
-
public static function right_now_content_table_end() {
|
1738 |
-
$content = '
|
1739 |
-
<tr>
|
1740 |
-
<td class="first b b-%1$s">%4$s%2$s%5$s</td>
|
1741 |
-
<td class="t %1$s">%4$s%3$s%5$s</td>
|
1742 |
-
</tr>';
|
1743 |
-
$posts = wp_count_posts( Testimonials_Widget::PT );
|
1744 |
-
$count = $posts->publish;
|
1745 |
-
$name = _n( 'Testimonial', 'Testimonials', $count, 'testimonials-widget' );
|
1746 |
-
$count_f = number_format_i18n( $count );
|
1747 |
-
$a_open = '<a href="edit.php?post_type=' . Testimonials_Widget::PT . '">';
|
1748 |
-
$a_close = '</a>';
|
1749 |
-
|
1750 |
-
if ( current_user_can( 'edit_others_posts' ) )
|
1751 |
-
$result = sprintf( $content, Testimonials_Widget::PT, $count_f, $name, $a_open, $a_close );
|
1752 |
-
else
|
1753 |
-
$result = sprintf( $content, Testimonials_Widget::PT, $count_f, $name, '', '' );
|
1754 |
-
|
1755 |
-
echo $result;
|
1756 |
-
}
|
1757 |
-
|
1758 |
-
|
1759 |
-
/**
|
1760 |
-
*
|
1761 |
-
*
|
1762 |
-
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1763 |
-
*/
|
1764 |
-
public static function get_schema( $testimonial, $atts ) {
|
1765 |
-
foreach ( $testimonial as $key => $value ) {
|
1766 |
-
if ( 'testimonial_image' != $key )
|
1767 |
-
$testimonial[ $key ] = self::clean_string( $value );
|
1768 |
-
}
|
1769 |
-
|
1770 |
-
extract( $testimonial );
|
1771 |
-
|
1772 |
-
$do_company = ! $atts['hide_company'] && ! empty( $testimonial_company );
|
1773 |
-
$do_content = ! empty( $testimonial['testimonial_content'] );
|
1774 |
-
$do_email = ! $atts['hide_email'] && ! empty( $testimonial_email ) && is_email( $testimonial_email );
|
1775 |
-
$do_image = ! $atts['hide_image'] && ! empty( $testimonial_image );
|
1776 |
-
$do_location = ! $atts['hide_location'] && ! empty( $testimonial_location );
|
1777 |
-
$do_source = ! $atts['hide_source'] && ! empty( $testimonial_source );
|
1778 |
-
$do_title = ! $atts['hide_title'] && ! empty( $testimonial_title );
|
1779 |
-
$do_url = ! $atts['hide_url'] && ! empty( $testimonial_url );
|
1780 |
-
|
1781 |
-
$item_reviewed = self::clean_string( $atts['item_reviewed'] );
|
1782 |
-
$item_reviewed_url = self::clean_string( $atts['item_reviewed_url'] );
|
1783 |
-
|
1784 |
-
$schema = '<div style="display: none;">';
|
1785 |
-
$schema .= "\n";
|
1786 |
-
|
1787 |
-
$agg_meta = array();
|
1788 |
-
$author_meta = array();
|
1789 |
-
$item_meta = array();
|
1790 |
-
$location_meta = array();
|
1791 |
-
$org_meta = array();
|
1792 |
-
$review_meta = array();
|
1793 |
-
|
1794 |
-
if ( $do_source )
|
1795 |
-
$author_meta[ self::$thing_name ] = $testimonial_source;
|
1796 |
-
|
1797 |
-
if ( $do_title )
|
1798 |
-
$author_meta[ self::$person_job_title ] = $testimonial_title;
|
1799 |
-
|
1800 |
-
if ( $do_email )
|
1801 |
-
$author_meta[ self::$person_email ] = $testimonial_email;
|
1802 |
-
|
1803 |
-
if ( ! $do_company ) {
|
1804 |
-
if ( $do_url )
|
1805 |
-
$author_meta[ self::$thing_url ] = $testimonial_url;
|
1806 |
-
} else {
|
1807 |
-
if ( $do_url )
|
1808 |
-
$org_meta[ self::$thing_url ] = $testimonial_url;
|
1809 |
-
|
1810 |
-
$org_meta[ self::$thing_name ] = $testimonial_company;
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
if ( $do_location ) {
|
1814 |
-
$location_meta[ self::$thing_name ] = $testimonial_location;
|
1815 |
-
|
1816 |
-
if ( ! $do_company )
|
1817 |
-
$author_meta[ self::$person_home ] = array( self::$place_schema, $location_meta );
|
1818 |
-
else
|
1819 |
-
$org_meta[ self::$org_location ] = array( self::$place_schema, $location_meta );
|
1820 |
-
}
|
1821 |
-
|
1822 |
-
if ( ! empty( $author_meta ) && ! empty( $org_meta ) )
|
1823 |
-
$author_meta[ self::$person_member ] = array( self::$org_schema, $org_meta );
|
1824 |
-
elseif ( ! empty( $org_meta ) )
|
1825 |
-
$author_meta[ self::$cw_source_org ] = array( self::$org_schema, $org_meta );
|
1826 |
-
|
1827 |
-
$author_meta = apply_filters( 'testimonials_widget_schema_author', $author_meta, $testimonial, $atts );
|
1828 |
-
$author = self::create_schema_div_prop( self::$cw_author, self::$person_schema, $author_meta );
|
1829 |
-
$schema .= $author;
|
1830 |
-
$schema .= "\n";
|
1831 |
-
|
1832 |
-
$post = get_post( $testimonial['post_id'] );
|
1833 |
-
$the_date = mysql2date( 'Y-m-d', $post->post_date );
|
1834 |
-
$the_date_mod = mysql2date( 'Y-m-d', $post->post_modified );
|
1835 |
-
|
1836 |
-
$review_name_length = apply_filters( 'testimonials_widget_review_name_length', 156 );
|
1837 |
-
|
1838 |
-
if ( $do_content )
|
1839 |
-
$review_meta[ self::$review_body ] = $testimonial['testimonial_content'];
|
1840 |
-
|
1841 |
-
$review_meta[ self::$cw_date ] = $the_date;
|
1842 |
-
$review_meta[ self::$cw_date_mod ] = $the_date_mod;
|
1843 |
-
$review_meta[ self::$thing_name ] = self::testimonials_truncate( $testimonial_content, $review_name_length );
|
1844 |
-
$review_meta[ self::$thing_url ] = post_permalink( $post->ID );
|
1845 |
-
|
1846 |
-
if ( $do_image ) {
|
1847 |
-
$src = self::get_image_src( $testimonial_image );
|
1848 |
-
|
1849 |
-
$review_meta[ self::$thing_image ] = $src;
|
1850 |
-
}
|
1851 |
-
|
1852 |
-
$review_meta = apply_filters( 'testimonials_widget_schema_review', $review_meta, $testimonial, $atts );
|
1853 |
-
$review = self::create_schema_meta( $review_meta );
|
1854 |
-
$schema .= $review;
|
1855 |
-
$schema .= "\n";
|
1856 |
-
|
1857 |
-
$agg_meta[ self::$agg_count ] = self::$found_posts;
|
1858 |
-
|
1859 |
-
$agg_meta = apply_filters( 'testimonials_widget_schema_aggregate', $agg_meta, $testimonial, $atts );
|
1860 |
-
$aggregate = self::create_schema_div_prop( self::$cw_aggregate, self::$agg_schema, $agg_meta );
|
1861 |
-
$schema .= $aggregate;
|
1862 |
-
$schema .= "\n";
|
1863 |
-
|
1864 |
-
$item_meta[ self::$thing_name ] = $item_reviewed;
|
1865 |
-
$item_meta[ self::$thing_url ] = $item_reviewed_url;
|
1866 |
-
|
1867 |
-
$item_meta = apply_filters( 'testimonials_widget_schema_item', $item_meta, $testimonial, $atts );
|
1868 |
-
$item = self::create_schema_div_prop( self::$review_item, self::$thing_schema, $item_meta );
|
1869 |
-
$schema .= $item;
|
1870 |
-
$schema .= "\n";
|
1871 |
-
|
1872 |
-
$schema .= '</div>';
|
1873 |
-
$schema .= "\n";
|
1874 |
-
|
1875 |
-
$schema = apply_filters( 'testimonials_widget_schema', $schema, $testimonial, $atts );
|
1876 |
-
|
1877 |
-
return $schema;
|
1878 |
-
}
|
1879 |
-
|
1880 |
-
|
1881 |
-
public static function create_schema_meta( $meta_data ) {
|
1882 |
-
$meta = '';
|
1883 |
-
|
1884 |
-
if ( empty( $meta_data ) )
|
1885 |
-
return $meta;
|
1886 |
-
|
1887 |
-
foreach ( $meta_data as $key => $value ) {
|
1888 |
-
if ( is_array( $value ) )
|
1889 |
-
$meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
|
1890 |
-
else
|
1891 |
-
$meta .= sprintf( self::$schema_meta, $key, $value );
|
1892 |
-
|
1893 |
-
$meta .= "\n";
|
1894 |
-
}
|
1895 |
-
|
1896 |
-
return $meta;
|
1897 |
-
}
|
1898 |
-
|
1899 |
-
|
1900 |
-
public static function create_schema_span( $property_name, $span_data ) {
|
1901 |
-
$span = '';
|
1902 |
-
|
1903 |
-
if ( empty( $span_data ) )
|
1904 |
-
return $span;
|
1905 |
-
|
1906 |
-
$span = sprintf( self::$schema_span, $property_name, $span_data );
|
1907 |
-
|
1908 |
-
return $span;
|
1909 |
-
}
|
1910 |
-
|
1911 |
-
|
1912 |
-
public static function create_schema_div_prop( $property_name, $schema_name, $meta_data ) {
|
1913 |
-
$meta = '';
|
1914 |
-
$schema = '';
|
1915 |
-
|
1916 |
-
if ( empty( $meta_data ) )
|
1917 |
-
return $schema;
|
1918 |
-
|
1919 |
-
if ( is_array( $meta_data ) ) {
|
1920 |
-
foreach ( $meta_data as $key => $value ) {
|
1921 |
-
if ( is_array( $value ) )
|
1922 |
-
$meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
|
1923 |
-
else
|
1924 |
-
$meta .= sprintf( self::$schema_meta, $key, $value );
|
1925 |
-
|
1926 |
-
$meta .= "\n";
|
1927 |
-
}
|
1928 |
-
|
1929 |
-
$schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta );
|
1930 |
-
} else
|
1931 |
-
$schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta_data );
|
1932 |
-
|
1933 |
-
return $schema;
|
1934 |
-
}
|
1935 |
-
|
1936 |
-
|
1937 |
-
public static function generate_css( $atts, $widget_number = null ) {
|
1938 |
-
$atts['subtype'] = 'css';
|
1939 |
-
|
1940 |
-
$css = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
1941 |
-
if ( false === $css ) {
|
1942 |
-
$css = self::get_testimonials_html_css( $atts, $widget_number );
|
1943 |
-
$css = apply_filters( 'testimonials_widget_cache_set', $css, $atts );
|
1944 |
-
}
|
1945 |
-
|
1946 |
-
if ( ! empty( $css ) ) {
|
1947 |
-
self::$css = array_merge( $css, self::$css );
|
1948 |
-
add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_css' ), 20 );
|
1949 |
-
}
|
1950 |
-
}
|
1951 |
-
|
1952 |
-
|
1953 |
-
public static function generate_js( $testimonials, $atts, $widget_number = null ) {
|
1954 |
-
$atts['subtype'] = 'js';
|
1955 |
-
|
1956 |
-
$js = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
1957 |
-
if ( false === $js ) {
|
1958 |
-
$js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
|
1959 |
-
$js = apply_filters( 'testimonials_widget_cache_set', $js, $atts );
|
1960 |
-
}
|
1961 |
-
|
1962 |
-
if ( ! empty( $js ) ) {
|
1963 |
-
self::$scripts = array_merge( $js, self::$scripts );
|
1964 |
-
add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_scripts' ), 20 );
|
1965 |
-
}
|
1966 |
-
}
|
1967 |
-
|
1968 |
-
|
1969 |
-
public static function call_scripts_styles( $testimonials, $atts, $widget_number = null ) {
|
1970 |
-
if ( is_null( $widget_number ) )
|
1971 |
-
$widget_number = Testimonials_Widget::get_instance();
|
1972 |
-
|
1973 |
-
self::scripts( $atts );
|
1974 |
-
|
1975 |
-
self::generate_css( $atts );
|
1976 |
-
self::generate_js( $testimonials, $atts, $widget_number );
|
1977 |
-
}
|
1978 |
-
|
1979 |
-
|
1980 |
-
public static function make_gravatar_featured( $post_id, $email ) {
|
1981 |
-
$size = get_option( 'large_size_w' );
|
1982 |
-
$image = get_avatar( $email, $size );
|
1983 |
-
$src = self::get_image_src( $image, false );
|
1984 |
-
$file = sanitize_title( $email ) . '.jpeg';
|
1985 |
-
|
1986 |
-
self::add_media( $post_id, $src, $file );
|
1987 |
-
}
|
1988 |
-
|
1989 |
-
|
1990 |
-
public static function notice_2_15_0() {
|
1991 |
-
$text = sprintf( __( 'If your Testimonials display has gone to funky town, please <a href="%s">read the FAQ</a> about possible fixes.', 'testimonials-widget' ), esc_url( 'https://aihrus.zendesk.com/entries/28402246-Major-Change-for-2-15-0' ) );
|
1992 |
-
|
1993 |
-
aihr_notice_updated( $text );
|
1994 |
-
}
|
1995 |
-
|
1996 |
-
|
1997 |
-
public static function show_shortcodes() {
|
1998 |
-
echo '<div class="wrap">';
|
1999 |
-
echo '<div class="icon32" id="icon-options-general"></div>';
|
2000 |
-
echo '<h2>' . esc_html__( 'Testimonials Shortcode Examples', 'testimonials-widget' ) . '</h2>';
|
2001 |
-
|
2002 |
-
$shortcodes = <<<EOD
|
2003 |
-
<h3>[testimonialswidget_list]</h3>
|
2004 |
-
|
2005 |
-
<ul>
|
2006 |
-
<li><code>[testimonialswidget_list category="category-name"]</code> - Testimonial list by category</li>
|
2007 |
-
<li><code>[testimonialswidget_list category=product hide_not_found=true]</code> - Testimonial list by category and hide "No testimonials found" message</li>
|
2008 |
-
<li><code>[testimonialswidget_list category=product tags=widget limit=5]</code> - Testimonial list by tag, showing 5 at most</li>
|
2009 |
-
<li><code>[testimonialswidget_list char_limit=0 limit=-1]</code> - Show all testimonials on one page</li>
|
2010 |
-
<li><code>[testimonialswidget_list char_limit=0 target=_new limit=3 disable_quotes=true]</code> - Show 3 full-length testimonials, with opening and closing quote marks removed</li>
|
2011 |
-
<li><code>[testimonialswidget_list hide_source=true hide_url=true]</code> - Show testimonial list with source and urls hidden</li>
|
2012 |
-
<li><code>[testimonialswidget_list ids="1,11,111" paging=false]</code> - Show only these 3 testimonials</li>
|
2013 |
-
<li><code>[testimonialswidget_list meta_key=testimonials-widget-company order=asc limit=15]</code> - Show 15 testimonials, in company order</li>
|
2014 |
-
<li><code>[testimonialswidget_list order=ASC orderby=title]</code> - List testimonials by post title</li>
|
2015 |
-
<li><code>[testimonialswidget_list tags="test,fun" random=true exclude="2,22,333"]</code> - Select testimonials tagged with either "test" or "fun", in random order, but ignore those of the excluded ids</li>
|
2016 |
-
</ul>
|
2017 |
-
|
2018 |
-
<h3>[testimonialswidget_widget]</h3>
|
2019 |
-
|
2020 |
-
<ul>
|
2021 |
-
<li><code>[testimonialswidget_widget category=product order=asc]</code> - Show rotating testimonials, of the product category, lowest post ids first</li>
|
2022 |
-
<li><code>[testimonialswidget_widget tags=sometag random=true]</code> - Show rotating, random testimonials having tag "sometag"</li>
|
2023 |
-
</ul>
|
2024 |
-
EOD;
|
2025 |
-
|
2026 |
-
$shortcodes = apply_filters( 'testimonials_widget_shortcodes', $shortcodes );
|
2027 |
-
|
2028 |
-
echo $shortcodes;
|
2029 |
-
echo '</div>';
|
2030 |
-
}
|
2031 |
-
|
2032 |
-
|
2033 |
-
public static function set_not_found( $not_found = false ) {
|
2034 |
-
self::$not_found = $not_found;
|
2035 |
-
}
|
2036 |
-
|
2037 |
-
|
2038 |
-
public static function get_not_found() {
|
2039 |
-
return self::$not_found;
|
2040 |
-
}
|
2041 |
-
|
2042 |
-
|
2043 |
-
public static function version_check() {
|
2044 |
-
$good_version = true;
|
2045 |
-
|
2046 |
-
return $good_version;
|
2047 |
-
}
|
2048 |
-
|
2049 |
-
|
2050 |
-
/**
|
2051 |
-
*
|
2052 |
-
*
|
2053 |
-
* @SuppressWarnings(PHPMD.Superglobals)
|
2054 |
-
*/
|
2055 |
-
public static function do_load() {
|
2056 |
-
$do_load = false;
|
2057 |
-
if ( ! empty( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'options.php' ) ) ) {
|
2058 |
-
$do_load = true;
|
2059 |
-
} elseif ( ! empty( $_REQUEST['post_type'] ) && self::PT == $_REQUEST['post_type'] ) {
|
2060 |
-
if ( ! empty( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'edit.php', 'edit-tags.php' ) ) ) {
|
2061 |
-
$do_load = true;
|
2062 |
-
} elseif ( ! empty( $_REQUEST['page'] ) && Testimonials_Widget_Settings::ID == $_REQUEST['page'] ) {
|
2063 |
-
$do_load = true;
|
2064 |
-
}
|
2065 |
-
}
|
2066 |
-
|
2067 |
-
return $do_load;
|
2068 |
-
}
|
2069 |
-
|
2070 |
-
|
2071 |
-
public static function category_columns( $columns ) {
|
2072 |
-
$columns['shortcode'] = esc_html__( 'Shortcode', 'testimonials-widget' );
|
2073 |
-
|
2074 |
-
return $columns;
|
2075 |
-
}
|
2076 |
-
|
2077 |
-
|
2078 |
-
public static function category_column( $result, $column_name, $term_id, $category = true ) {
|
2079 |
-
$attribute = $category ? 'category' : 'tags';
|
2080 |
-
|
2081 |
-
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
2082 |
-
if ( ! $use_cpt_taxonomy ) {
|
2083 |
-
if ( $category )
|
2084 |
-
$term = get_term( $term_id, 'category' );
|
2085 |
-
else
|
2086 |
-
$term = get_term( $term_id, 'post_tag' );
|
2087 |
-
} else {
|
2088 |
-
if ( $category )
|
2089 |
-
$term = get_term( $term_id, self::$cpt_category );
|
2090 |
-
else
|
2091 |
-
$term = get_term( $term_id, self::$cpt_tags );
|
2092 |
-
}
|
2093 |
-
|
2094 |
-
switch ( $column_name ) {
|
2095 |
-
case 'shortcode':
|
2096 |
-
$result = '[testimonialswidget_list ' . $attribute . '="' .$term->slug . '"]';
|
2097 |
-
$result .= '<br />';
|
2098 |
-
$result .= '[testimonialswidget_widget ' . $attribute . '="' .$term->slug . '"]';
|
2099 |
-
break;
|
2100 |
-
}
|
2101 |
-
|
2102 |
-
return $result;
|
2103 |
-
}
|
2104 |
-
|
2105 |
-
|
2106 |
-
public static function post_tag_column( $result, $column_name, $term_id ) {
|
2107 |
-
return self::category_column( $result, $column_name, $term_id, false );
|
2108 |
-
}
|
2109 |
-
}
|
2110 |
-
|
2111 |
-
|
2112 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{assets/js → js}/jquery.bxslider.js
RENAMED
File without changes
|
{assets/js → js}/jquery.easing.1.3.js
RENAMED
File without changes
|
{assets/js → js}/jquery.fitvids.js
RENAMED
File without changes
|
languages/testimonials-widget.pot
CHANGED
@@ -1,884 +1,860 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Testimonials by Aihrus package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Testimonials by Aihrus 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
msgid "Testimonials Settings"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#:
|
20 |
-
#: includes/class-testimonials-widget.php:113
|
21 |
msgid "Settings"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#:
|
25 |
-
#:
|
26 |
msgid "General"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#:
|
30 |
-
#:
|
31 |
msgid "Selection"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#:
|
35 |
-
#:
|
36 |
msgid "Ordering"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#:
|
40 |
-
#:
|
41 |
msgid "Widget"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#:
|
45 |
-
#:
|
46 |
msgid "Post Type"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#:
|
50 |
msgid "Widget Title"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#:
|
54 |
-
#:
|
55 |
-
#:
|
56 |
-
#: includes/class-testimonials-widget.php:622
|
57 |
msgid "Testimonials"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#:
|
61 |
msgid "Title Link"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#:
|
65 |
msgid "URL, path, or post ID to link widget title to. Ex: http://example.com/stuff, /testimonials, 123 or "
|
66 |
msgstr ""
|
67 |
|
68 |
-
#:
|
69 |
msgid "Character Limit"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#:
|
73 |
msgid "Number of characters to limit non-single testimonial views to"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#:
|
77 |
msgid "Rotation Speed"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#:
|
81 |
msgid "Number of seconds between testimonial rotations or 0 for no rotation at all refresh"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#:
|
85 |
msgid "Additional Widget Options"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#:
|
89 |
msgid "Transition Mode?"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#:
|
93 |
msgid "Type of transition between slides"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#:
|
97 |
msgid "Fade"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#:
|
101 |
msgid "Horizontal"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#:
|
105 |
msgid "Vertical"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#:
|
109 |
msgid "Show Play/Pause?"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#:
|
113 |
msgid "Display start and stop buttons underneath the testimonial slider."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#:
|
117 |
msgid "Enable Video?"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#:
|
121 |
msgid "Only enable when displaying video content."
|
122 |
msgstr ""
|
123 |
|
124 |
-
#:
|
125 |
msgid "Keep Whitespace?"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#:
|
129 |
msgid "Keeps testimonials looking as entered than sans auto-formatting"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#:
|
133 |
msgid "Testimonial Bottom Text"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#:
|
137 |
msgid "Custom text or HTML for bottom of testimonials"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#:
|
141 |
msgid "General Options"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#:
|
145 |
msgid "Adds HTML tag markup per the <a href=\"%s\">Review schema</a> to testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#:
|
149 |
msgid "Enable Review Schema?"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#:
|
153 |
-
msgid "
|
154 |
msgstr ""
|
155 |
|
156 |
-
#:
|
157 |
msgid "Name of thing being referenced in testimonials"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#:
|
161 |
-
msgid "
|
162 |
msgstr ""
|
163 |
|
164 |
-
#:
|
165 |
msgid "URL of thing being referenced in testimonials"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#:
|
169 |
msgid "Hide built-in quotes?"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#:
|
173 |
msgid "Remove open and close quote span tags surrounding testimonial content"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#:
|
177 |
msgid "Hide \"Testimonials Not Found\"?"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#:
|
181 |
msgid "Hide Gravatar Image?"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#:
|
185 |
msgid "Hide Image?"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#:
|
189 |
msgid "Hide Image in Single View?"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#:
|
193 |
msgid "Hide Testimonial Content?"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#:
|
197 |
msgid "Hide Author/Source?"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#:
|
201 |
msgid "Don't display \"Post Title\" in cite"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#:
|
205 |
msgid "Hide Email?"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#:
|
209 |
msgid "Hide Job Title?"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#:
|
213 |
msgid "Hide Location?"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#:
|
217 |
msgid "Hide Company?"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#:
|
221 |
msgid "Hide URL?"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#:
|
225 |
-
msgid "Exclude bxSlider CSS?"
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: includes/class-testimonials-widget-settings.php:326
|
229 |
-
msgid "For a bare-bones, unthemed slider."
|
230 |
-
msgstr ""
|
231 |
-
|
232 |
-
#: includes/class-testimonials-widget-settings.php:333
|
233 |
msgid "URL Target"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#:
|
237 |
msgid "Add target to all URLs; leave blank if none"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#:
|
241 |
msgid "Enable Paging?"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#:
|
245 |
msgid "For `[testimonialswidget_list]`"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#:
|
249 |
msgid "Disable"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#:
|
253 |
msgid "Enable"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#:
|
257 |
msgid "Before testimonials"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#:
|
261 |
msgid "After testimonials"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#:
|
265 |
-
msgid "
|
266 |
msgstr ""
|
267 |
|
268 |
-
#:
|
269 |
msgid "If unchecked, shortcodes are stripped."
|
270 |
msgstr ""
|
271 |
|
272 |
-
#:
|
273 |
msgid "Selection Options"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#:
|
277 |
msgid "Category Filter"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#:
|
281 |
msgid "Comma separated category names. Ex: Category A, Another category"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#:
|
285 |
msgid "Tags Filter"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#:
|
289 |
msgid "Comma separated tag names. Ex: Tag A, Another tag"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#:
|
293 |
msgid "Require All Tags?"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#:
|
297 |
msgid "Select only testimonials with all of the given tags"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#:
|
301 |
msgid "Include IDs Filter"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#:
|
305 |
-
#:
|
306 |
msgid "Comma separated testimonial IDs. Ex: 3,1,2"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#:
|
310 |
msgid "Exclude IDs Filter"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#:
|
314 |
msgid "Limit"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#:
|
318 |
msgid "Number of testimonials to select per instance"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#:
|
322 |
msgid "Ordering Options"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#:
|
326 |
msgid "Random Order?"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#:
|
330 |
msgid "If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#:
|
334 |
msgid "ORDER BY"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#:
|
338 |
msgid "Used when \"Random Order\" is disabled"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#:
|
342 |
msgid "Testimonial ID"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#:
|
346 |
msgid "Author"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#:
|
350 |
-
#: includes/class-testimonials-widget.php:553
|
351 |
msgid "Date"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#:
|
355 |
msgid "Menu Order"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#:
|
359 |
-
#: includes/class-testimonials-widget.php:545
|
360 |
msgid "Source"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#:
|
364 |
msgid "No order"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#:
|
368 |
msgid "ORDER BY meta_key"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#:
|
372 |
msgid "Used when \"Random Order\" is disabled and sorting by a testimonials meta key is needed. Overrides ORDER BY"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#:
|
376 |
msgid "None"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#:
|
380 |
-
#:
|
381 |
-
#: includes/class-testimonials-widget.php:1633
|
382 |
msgid "Job Title"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#:
|
386 |
-
#:
|
387 |
-
#: includes/class-testimonials-widget.php:1645
|
388 |
msgid "Email"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#:
|
392 |
-
#:
|
393 |
-
#: includes/class-testimonials-widget.php:1639
|
394 |
msgid "Location"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#:
|
398 |
-
#:
|
399 |
-
#: includes/class-testimonials-widget.php:1651
|
400 |
msgid "Company"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#:
|
404 |
-
#:
|
405 |
-
#: includes/class-testimonials-widget.php:1657
|
406 |
msgid "URL"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#:
|
410 |
msgid "ORDER BY Order"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#:
|
414 |
msgid "Descending"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#:
|
418 |
msgid "Ascending"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#:
|
422 |
msgid "Allow Comments?"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#:
|
426 |
msgid "Only affects the Testimonials post edit page. Your theme controls the front-end view."
|
427 |
msgstr ""
|
428 |
|
429 |
-
#:
|
430 |
msgid "URL slug-name for <a href=\"%1s\">testimonials archive</a> page."
|
431 |
msgstr ""
|
432 |
|
433 |
-
#:
|
434 |
msgid "Archive Page URL"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#:
|
438 |
msgid "URL slug-name for testimonial view pages. Shouldn't be the same as the Archive Page URL nor should it match a page URL slug."
|
439 |
msgstr ""
|
440 |
|
441 |
-
#:
|
442 |
msgid "Testimonial Page URL"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#:
|
446 |
msgid "Reset & Compatiblity Options"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#:
|
450 |
msgid "Don't Use Default Taxonomies?"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#:
|
454 |
msgid "If checked, use Testimonials' own category and tag taxonomies instead"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#:
|
458 |
msgid "Version Based Options"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#:
|
462 |
msgid "Use bxSlider?"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#:
|
466 |
msgid "Pre 2.15.0, Testimonials' used custom JavaScript for transitions."
|
467 |
msgstr ""
|
468 |
|
469 |
-
#:
|
470 |
msgid "Disable Animation?"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#:
|
474 |
msgid "Pre 2.15.0, Disable animation between testimonial transitions. Useful when stacking widgets."
|
475 |
msgstr ""
|
476 |
|
477 |
-
#:
|
478 |
msgid "Fade Out Speed"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#:
|
482 |
-
#:
|
483 |
msgid "Pre 2.15.0, Transition duration in milliseconds; higher values indicate slower animations, not faster ones."
|
484 |
msgstr ""
|
485 |
|
486 |
-
#:
|
487 |
msgid "Fade In Speed"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#:
|
491 |
msgid "Height"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#:
|
495 |
msgid "Pre 2.15.0, Testimonials height, in pixels. Overrides minimum and maximum height"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#:
|
499 |
msgid "Minimum Height"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#:
|
503 |
msgid "Pre 2.15.0, Set for minimum display height, in pixels"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#:
|
507 |
msgid "Maximum Height"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#:
|
511 |
msgid "Pre 2.15.0, Set for maximum display height, in pixels"
|
512 |
msgstr ""
|
513 |
|
514 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
msgid "Include IE7 CSS?"
|
516 |
msgstr ""
|
517 |
|
518 |
-
#:
|
519 |
msgid "IE7 specific CSS moved to separate CSS file in version 2.13.6."
|
520 |
msgstr ""
|
521 |
|
522 |
-
#:
|
523 |
msgid "Use `<q>` tag?"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#:
|
527 |
msgid "Pre 2.11.0, not HTML5 compliant"
|
528 |
msgstr ""
|
529 |
|
530 |
-
#:
|
531 |
msgid "Remove `.hentry` CSS?"
|
532 |
msgstr ""
|
533 |
|
534 |
-
#:
|
535 |
msgid "Pre 2.6.4, some themes use class `.hentry` in a manner that breaks Testimonials' CSS"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#:
|
539 |
msgid "These Testimonials 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."
|
540 |
msgstr ""
|
541 |
|
542 |
-
#:
|
543 |
msgid "Shortcode option names are listed below each entry."
|
544 |
msgstr ""
|
545 |
|
546 |
-
#:
|
547 |
msgid "View the <a href=\"%s\">Testimonials documentation</a>."
|
548 |
msgstr ""
|
549 |
|
550 |
-
#:
|
551 |
msgid "Show or hide optional fields."
|
552 |
msgstr ""
|
553 |
|
554 |
-
#:
|
555 |
msgid "Options used to select testimonials."
|
556 |
msgstr ""
|
557 |
|
558 |
-
#:
|
559 |
msgid "Options used to determine displayed testimonials ordering."
|
560 |
msgstr ""
|
561 |
|
562 |
-
#:
|
563 |
msgid "Options related to showing testimonials in widgets."
|
564 |
msgstr ""
|
565 |
|
566 |
-
#:
|
567 |
msgid "Archive and singular page URL related testimonials options."
|
568 |
msgstr ""
|
569 |
|
570 |
-
#:
|
571 |
msgid "Compatibility & Reset"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#:
|
575 |
msgid "Backwards compatibility, import/export options, and reset options."
|
576 |
msgstr ""
|
577 |
|
578 |
-
#:
|
579 |
msgid "Display testimonials with multiple selection and display options"
|
580 |
msgstr ""
|
581 |
|
582 |
-
#:
|
583 |
msgid "CSS Class"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#:
|
587 |
msgid "This widget's unique CSS class for styling"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#:
|
591 |
-
|
|
|
|
|
|
|
592 |
msgid "Testimonials Shortcode Examples"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#:
|
596 |
msgid "E.g. Shortcodes"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#:
|
600 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible CSS fixes."
|
601 |
msgstr ""
|
602 |
|
603 |
-
#:
|
604 |
msgid "ID"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#:
|
608 |
msgid "Image"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#:
|
612 |
msgid "Shortcodes"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#:
|
616 |
msgid "Published by"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#:
|
620 |
-
#: includes/class-testimonials-widget.php:561
|
621 |
msgid "Category"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#:
|
625 |
-
#: includes/class-testimonials-widget.php:562
|
626 |
msgid "Tags"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#:
|
630 |
msgid "Add New"
|
631 |
msgstr ""
|
632 |
|
633 |
-
#:
|
634 |
-
#: includes/class-testimonials-widget.php:577
|
635 |
msgid "Add New Testimonial"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#:
|
639 |
msgid "Edit Testimonial"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#:
|
643 |
-
#: includes/class-testimonials-widget.php:990
|
644 |
msgid "No testimonials found"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#:
|
648 |
msgid "No testimonials found in Trash"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#:
|
652 |
msgid "Search Testimonials"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#:
|
656 |
-
#: includes/class-testimonials-widget.php:1745
|
657 |
msgid "Testimonial"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#:
|
661 |
msgid "View Testimonial"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#:
|
665 |
msgid "…"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#:
|
669 |
msgid "«"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#:
|
673 |
msgid "»"
|
674 |
msgstr ""
|
675 |
|
676 |
-
#:
|
677 |
msgid "Testimonial Data"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#:
|
681 |
msgid "Enter title here"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#:
|
685 |
msgid "Enter testimonial source here"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#:
|
689 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#:
|
693 |
msgid "Custom field updated."
|
694 |
msgstr ""
|
695 |
|
696 |
-
#:
|
697 |
msgid "Custom field deleted."
|
698 |
msgstr ""
|
699 |
|
700 |
-
#:
|
701 |
msgid "Testimonial updated."
|
702 |
msgstr ""
|
703 |
|
704 |
#. translators: %s: date and time of the revision
|
705 |
|
706 |
-
#:
|
707 |
msgid "Testimonial restored to revision from %s"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#:
|
711 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#:
|
715 |
msgid "Testimonial saved."
|
716 |
msgstr ""
|
717 |
|
718 |
-
#:
|
719 |
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#:
|
723 |
msgid "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview testimonial</a>"
|
724 |
msgstr ""
|
725 |
|
726 |
-
#:
|
727 |
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#:
|
731 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible fixes."
|
732 |
msgstr ""
|
733 |
-
|
734 |
-
#: includes/class-testimonials-widget.php:2072
|
735 |
-
msgid "Shortcode"
|
736 |
-
msgstr ""
|
737 |
-
|
738 |
-
#: includes/libraries/aihrus-framework/class-aihrus-common.php:156
|
739 |
-
msgid "Please donate $5 towards ongoing free support and development of the \"%1$s\" plugin. %2$s"
|
740 |
-
msgstr ""
|
741 |
-
|
742 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:62
|
743 |
-
msgid "Reset"
|
744 |
-
msgstr ""
|
745 |
-
|
746 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:63
|
747 |
-
msgid "About"
|
748 |
-
msgstr ""
|
749 |
-
|
750 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:81
|
751 |
-
msgid "Export Settings"
|
752 |
-
msgstr ""
|
753 |
-
|
754 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:83
|
755 |
-
msgid "These are your current settings in a serialized format. Copy the contents to make a backup of your settings."
|
756 |
-
msgstr ""
|
757 |
-
|
758 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:91
|
759 |
-
msgid "Import Settings"
|
760 |
-
msgstr ""
|
761 |
-
|
762 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:93
|
763 |
-
msgid "Paste new serialized settings here to overwrite your current configuration."
|
764 |
-
msgstr ""
|
765 |
-
|
766 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:97
|
767 |
-
msgid "Delete all %s data and options from database on plugin deletion. Even if this option isn't checked, WordPress will still give a data deletion warning."
|
768 |
-
msgstr ""
|
769 |
-
|
770 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:101
|
771 |
-
msgid "Remove Plugin Data on Deletion?"
|
772 |
-
msgstr ""
|
773 |
-
|
774 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:110
|
775 |
-
msgid "Reset to Defaults?"
|
776 |
-
msgstr ""
|
777 |
-
|
778 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:113
|
779 |
-
msgid "Check this box to reset options to their defaults"
|
780 |
-
msgstr ""
|
781 |
-
|
782 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:237
|
783 |
-
msgid "<img class=\"alignright size-medium\" src=\"%1$simages/michael-cannon-red-square-300x2251.jpg\" alt=\"Michael in Red Square, Moscow, Russia\" width=\"300\" height=\"225\" /><a href=\"%2$s\">%3$s</a> is by <a href=\"%4$s\">Michael Cannon</a>. He's <a href=\"%5$s\">Peichi’s</a> smiling man, an adventurous <a href=\"%6$s\" target=\"_blank\">water-rat</a>, <a href=\"%7$s\">chief people officer</a>, <a href=\"%8$s\">cyclist</a>, <a href=\"%9$s\">full stack developer</a>, <a href=\"%10$s\">poet</a>, <a href=\"%11$s\">WWOOF’er</a> and <a href=\"%12$s\">world traveler</a>."
|
784 |
-
msgstr ""
|
785 |
-
|
786 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:280
|
787 |
-
msgid "Save Changes"
|
788 |
-
msgstr ""
|
789 |
-
|
790 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:288
|
791 |
-
msgid "If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> or <a href=\"%3$s\" title=\"purchase premium WordPress plugins from Aihrus \">purchase the Premium version</a> to help fund further development and <a href=\"%4$s\" title=\"Support forums\">support</a>."
|
792 |
-
msgstr ""
|
793 |
-
|
794 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:299
|
795 |
-
msgid "Copyright ©%1$s <a href=\"%2$s\">Aihrus</a>."
|
796 |
-
msgstr ""
|
797 |
-
|
798 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:566
|
799 |
-
msgid "Settings saved."
|
800 |
-
msgstr ""
|
801 |
-
|
802 |
-
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:619
|
803 |
-
msgid "Required"
|
804 |
-
msgstr ""
|
805 |
-
|
806 |
-
#: includes/libraries/aihrus-framework/class-aihrus-widget.php:140
|
807 |
-
msgid "Expand/Collapse All Options"
|
808 |
-
msgstr ""
|
809 |
-
|
810 |
-
#: includes/libraries/aihrus-framework/class-aihrus-widget.php:149
|
811 |
-
msgid "Expand/Collapse"
|
812 |
-
msgstr ""
|
813 |
-
|
814 |
-
#: includes/libraries/aihrus-framework/requirements.php:30
|
815 |
-
msgid "`aihr_check_aihrus_framework` requires $file argument"
|
816 |
-
msgstr ""
|
817 |
-
|
818 |
-
#: includes/libraries/aihrus-framework/requirements.php:75
|
819 |
-
#: includes/requirements.php:49
|
820 |
-
msgid "<a href=\"%1$s\">Update plugins</a>. <a href=\"%2$s\">More information</a>."
|
821 |
-
msgstr ""
|
822 |
-
|
823 |
-
#: includes/libraries/aihrus-framework/requirements.php:86
|
824 |
-
msgid "Plugin \"%1$s\" is causing the out of date issue."
|
825 |
-
msgstr ""
|
826 |
-
|
827 |
-
#: includes/libraries/aihrus-framework/requirements.php:91
|
828 |
-
msgid "Plugin \"%1$s\" has been deactivated as it requires Aihrus Framework %2$s or newer. You're running Aihrus Framework %4$s. Once corrected, \"%1$s\" can be activated. %5$s %3$s"
|
829 |
-
msgstr ""
|
830 |
-
|
831 |
-
#: includes/libraries/aihrus-framework/requirements.php:100
|
832 |
-
msgid "`aihr_check_php` requires $file argument"
|
833 |
-
msgstr ""
|
834 |
-
|
835 |
-
#: includes/libraries/aihrus-framework/requirements.php:141
|
836 |
-
msgid "Plugin \"%1$s\" has been deactivated as it requires PHP %2$s or newer. You're running PHP %4$s. Once corrected, \"%1$s\" can be activated. <a href=\"%3$s\">More information</a>."
|
837 |
-
msgstr ""
|
838 |
-
|
839 |
-
#: includes/libraries/aihrus-framework/requirements.php:150
|
840 |
-
msgid "`aihr_check_wp` requires $file argument"
|
841 |
-
msgstr ""
|
842 |
-
|
843 |
-
#: includes/libraries/aihrus-framework/requirements.php:195
|
844 |
-
msgid "Plugin \"%1$s\" has been deactivated as it requires WordPress %2$s or newer. You're running WordPress %4$s. Once corrected, \"%1$s\" can be activated. <a href=\"%3$s\">Update WordPress</a>."
|
845 |
-
msgstr ""
|
846 |
-
|
847 |
-
#: includes/libraries/aihrus-framework/requirements.php:225
|
848 |
-
msgid "<a href=\"%1$s\">update to</a>"
|
849 |
-
msgstr ""
|
850 |
-
|
851 |
-
#: includes/libraries/aihrus-framework/requirements.php:230
|
852 |
-
msgid "<a href=\"%1$s\">install</a>"
|
853 |
-
msgstr ""
|
854 |
-
|
855 |
-
#: includes/libraries/aihrus-framework/requirements.php:233
|
856 |
-
msgid "<a href=\"%1$s\">activate</a>"
|
857 |
-
msgstr ""
|
858 |
-
|
859 |
-
#: includes/libraries/aihrus-framework/requirements.php:237
|
860 |
-
msgid "Plugin \"%3$s\" has been deactivated. Please %1$s \"%4$s\" version %2$s or newer before activating \"%3$s\"."
|
861 |
-
msgstr ""
|
862 |
-
|
863 |
-
#: includes/libraries/aihrus-framework/requirements.php:250
|
864 |
-
msgid "<a href=\"%1$s\">%2$s > Settings</a>, <em>Premium</em> tab, <em>License Key</em> entry"
|
865 |
-
msgstr ""
|
866 |
-
|
867 |
-
#: includes/libraries/aihrus-framework/requirements.php:255
|
868 |
-
msgid "<a href=\"%s\">Where's my license key?</a>"
|
869 |
-
msgstr ""
|
870 |
-
|
871 |
-
#: includes/libraries/aihrus-framework/requirements.php:260
|
872 |
-
msgid "<a href=\"%1$s\">%2$s</a>"
|
873 |
-
msgstr ""
|
874 |
-
|
875 |
-
#: includes/libraries/aihrus-framework/requirements.php:264
|
876 |
-
msgid "Plugin \"%1$s\" requires license activation before updating will work. Please activate the license key through %2$s. No license key? See \"%3$s\" or purchase \"%4$s\"."
|
877 |
-
msgstr ""
|
878 |
-
|
879 |
-
#: includes/requirements.php:51
|
880 |
-
msgid "Plugin \"%1$s\" has been deactivated as it requires a current Aihrus Framework. Once corrected, \"%1$s\" can be activated. %2$s"
|
881 |
-
msgstr ""
|
882 |
#. Plugin Name of the plugin/theme
|
883 |
msgid "Testimonials by Aihrus"
|
884 |
msgstr ""
|
1 |
+
# Copyright (C) 2013 Testimonials by Aihrus
|
2 |
# This file is distributed under the same license as the Testimonials by Aihrus package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Testimonials by Aihrus 2.17.2\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2013-12-31 00:37:53+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: lib/aihrus/class-aihrus-common.php:156
|
16 |
+
msgid "Please donate $5 towards ongoing free support and development of the \"%1$s\" plugin. %2$s"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: lib/aihrus/class-aihrus-settings.php:61
|
20 |
+
msgid "Reset"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: lib/aihrus/class-aihrus-settings.php:62
|
24 |
+
msgid "About"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: lib/aihrus/class-aihrus-settings.php:80
|
28 |
+
msgid "Export Settings"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: lib/aihrus/class-aihrus-settings.php:82
|
32 |
+
msgid "These are your current settings in a serialized format. Copy the contents to make a backup of your settings."
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: lib/aihrus/class-aihrus-settings.php:90
|
36 |
+
msgid "Import Settings"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: lib/aihrus/class-aihrus-settings.php:92
|
40 |
+
msgid "Paste new serialized settings here to overwrite your current configuration."
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: lib/aihrus/class-aihrus-settings.php:96
|
44 |
+
msgid "Delete all %s data and options from database on plugin deletion"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: lib/aihrus/class-aihrus-settings.php:100
|
48 |
+
msgid "Remove Plugin Data on Deletion?"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: lib/aihrus/class-aihrus-settings.php:109
|
52 |
+
msgid "Reset to Defaults?"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: lib/aihrus/class-aihrus-settings.php:112
|
56 |
+
msgid "Check this box to reset options to their defaults"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: lib/aihrus/class-aihrus-settings.php:236
|
60 |
+
msgid "<img class=\"alignright size-medium\" src=\"%1$s/media/michael-cannon-red-square-300x2251.jpg\" alt=\"Michael in Red Square, Moscow, Russia\" width=\"300\" height=\"225\" /><a href=\"%2$s\">%3$s</a> is by <a href=\"%4$s\">Michael Cannon</a>. He's <a href=\"%5$s\">Peichi’s</a> smiling man, an adventurous <a href=\"%6$s\" target=\"_blank\">water-rat</a>, <a href=\"%7$s\">chief people officer</a>, <a href=\"%8$s\">cyclist</a>, <a href=\"%9$s\">full stack developer</a>, <a href=\"%10$s\">poet</a>, <a href=\"%11$s\">WWOOF’er</a> and <a href=\"%12$s\">world traveler</a>."
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: lib/aihrus/class-aihrus-settings.php:278
|
64 |
+
msgid "Save Changes"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: lib/aihrus/class-aihrus-settings.php:286
|
68 |
+
msgid "If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> or <a href=\"%3$s\" title=\"purchase premium WordPress plugins from Aihrus \">purchase the Premium version</a> to help fund further development and <a href=\"%4$s\" title=\"Support forums\">support</a>."
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: lib/aihrus/class-aihrus-settings.php:297
|
72 |
+
msgid "Copyright ©%1$s <a href=\"%2$s\">Aihrus</a>."
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: lib/aihrus/class-aihrus-settings.php:598
|
76 |
+
msgid "Required"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: lib/aihrus/class-aihrus-widget.php:140
|
80 |
+
msgid "Expand/Collapse All Options"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: lib/aihrus/class-aihrus-widget.php:149
|
84 |
+
msgid "Expand/Collapse"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: lib/aihrus/requirements.php:30
|
88 |
+
msgid "`aihr_check_aihrus_framework` requires $file argument"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: lib/aihrus/requirements.php:75 lib/requirements.php:49
|
92 |
+
msgid "<a href=\"%1$s\">Update plugins</a>. <a href=\"%2$s\">More information</a>."
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: lib/aihrus/requirements.php:86
|
96 |
+
msgid "Plugin \"%1$s\" is causing the out of date issue."
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: lib/aihrus/requirements.php:91
|
100 |
+
msgid "Plugin \"%1$s\" has been deactivated as it requires Aihrus Framework %2$s or newer. You're running Aihrus Framework %4$s. Once corrected, \"%1$s\" can be activated. %5$s %3$s"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: lib/aihrus/requirements.php:100
|
104 |
+
msgid "`aihr_check_php` requires $file argument"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: lib/aihrus/requirements.php:141
|
108 |
+
msgid "Plugin \"%1$s\" has been deactivated as it requires PHP %2$s or newer. You're running PHP %4$s. Once corrected, \"%1$s\" can be activated. <a href=\"%3$s\">More information</a>."
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: lib/aihrus/requirements.php:150
|
112 |
+
msgid "`aihr_check_wp` requires $file argument"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: lib/aihrus/requirements.php:195
|
116 |
+
msgid "Plugin \"%1$s\" has been deactivated as it requires WordPress %2$s or newer. You're running WordPress %4$s. Once corrected, \"%1$s\" can be activated. <a href=\"%3$s\">Update WordPress</a>."
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: lib/aihrus/requirements.php:225
|
120 |
+
msgid "<a href=\"%1$s\">update to</a>"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: lib/aihrus/requirements.php:230
|
124 |
+
msgid "<a href=\"%1$s\">install</a>"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: lib/aihrus/requirements.php:233
|
128 |
+
msgid "<a href=\"%1$s\">activate</a>"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: lib/aihrus/requirements.php:237
|
132 |
+
msgid "Plugin \"%3$s\" has been deactivated. Please %1$s \"%4$s\" version %2$s or newer before activating \"%3$s\"."
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: lib/aihrus/requirements.php:250
|
136 |
+
msgid "<a href=\"%1$s\">%2$s > Settings</a>, <em>Premium</em> tab, <em>License Key</em> entry"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: lib/aihrus/requirements.php:255
|
140 |
+
msgid "<a href=\"%s\">Where's my license key?</a>"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: lib/aihrus/requirements.php:260
|
144 |
+
msgid "<a href=\"%1$s\">%2$s</a>"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: lib/aihrus/requirements.php:264
|
148 |
+
msgid "Plugin \"%1$s\" requires license activation before updating will work. Please activate the license key through %2$s. No license key? See \"%3$s\" or purchase \"%4$s\"."
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: lib/class-testimonials-widget-settings.php:91
|
152 |
msgid "Testimonials Settings"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: lib/class-testimonials-widget-settings.php:91 testimonials-widget.php:131
|
|
|
156 |
msgid "Settings"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: lib/class-testimonials-widget-settings.php:110
|
160 |
+
#: lib/class-testimonials-widget-settings.php:879
|
161 |
msgid "General"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: lib/class-testimonials-widget-settings.php:111
|
165 |
+
#: lib/class-testimonials-widget-settings.php:887
|
166 |
msgid "Selection"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: lib/class-testimonials-widget-settings.php:112
|
170 |
+
#: lib/class-testimonials-widget-settings.php:895
|
171 |
msgid "Ordering"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: lib/class-testimonials-widget-settings.php:113
|
175 |
+
#: lib/class-testimonials-widget-settings.php:903
|
176 |
msgid "Widget"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: lib/class-testimonials-widget-settings.php:114
|
180 |
+
#: lib/class-testimonials-widget-settings.php:911
|
181 |
msgid "Post Type"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: lib/class-testimonials-widget-settings.php:131
|
185 |
msgid "Widget Title"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: lib/class-testimonials-widget-settings.php:132
|
189 |
+
#: lib/class-testimonials-widget-widget.php:32 testimonials-widget.php:593
|
190 |
+
#: testimonials-widget.php:638
|
|
|
191 |
msgid "Testimonials"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: lib/class-testimonials-widget-settings.php:138
|
195 |
msgid "Title Link"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: lib/class-testimonials-widget-settings.php:139
|
199 |
msgid "URL, path, or post ID to link widget title to. Ex: http://example.com/stuff, /testimonials, 123 or "
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: lib/class-testimonials-widget-settings.php:145
|
203 |
msgid "Character Limit"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: lib/class-testimonials-widget-settings.php:146
|
207 |
msgid "Number of characters to limit non-single testimonial views to"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: lib/class-testimonials-widget-settings.php:152
|
211 |
msgid "Rotation Speed"
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: lib/class-testimonials-widget-settings.php:153
|
215 |
msgid "Number of seconds between testimonial rotations or 0 for no rotation at all refresh"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: lib/class-testimonials-widget-settings.php:165
|
219 |
msgid "Additional Widget Options"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: lib/class-testimonials-widget-settings.php:171
|
223 |
msgid "Transition Mode?"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: lib/class-testimonials-widget-settings.php:172
|
227 |
msgid "Type of transition between slides"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: lib/class-testimonials-widget-settings.php:175
|
231 |
msgid "Fade"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: lib/class-testimonials-widget-settings.php:176
|
235 |
msgid "Horizontal"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: lib/class-testimonials-widget-settings.php:177
|
239 |
msgid "Vertical"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: lib/class-testimonials-widget-settings.php:184
|
243 |
msgid "Show Play/Pause?"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: lib/class-testimonials-widget-settings.php:185
|
247 |
msgid "Display start and stop buttons underneath the testimonial slider."
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: lib/class-testimonials-widget-settings.php:193
|
251 |
msgid "Enable Video?"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: lib/class-testimonials-widget-settings.php:194
|
255 |
msgid "Only enable when displaying video content."
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: lib/class-testimonials-widget-settings.php:201
|
259 |
msgid "Keep Whitespace?"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: lib/class-testimonials-widget-settings.php:202
|
263 |
msgid "Keeps testimonials looking as entered than sans auto-formatting"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: lib/class-testimonials-widget-settings.php:209
|
267 |
msgid "Testimonial Bottom Text"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: lib/class-testimonials-widget-settings.php:210
|
271 |
msgid "Custom text or HTML for bottom of testimonials"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: lib/class-testimonials-widget-settings.php:222
|
275 |
msgid "General Options"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: lib/class-testimonials-widget-settings.php:226
|
279 |
msgid "Adds HTML tag markup per the <a href=\"%s\">Review schema</a> to testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results."
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: lib/class-testimonials-widget-settings.php:229
|
283 |
msgid "Enable Review Schema?"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: lib/class-testimonials-widget-settings.php:237
|
287 |
+
msgid "Reviewed Item?"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: lib/class-testimonials-widget-settings.php:238
|
291 |
msgid "Name of thing being referenced in testimonials"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: lib/class-testimonials-widget-settings.php:244
|
295 |
+
msgid "Reviewed Item URL?"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: lib/class-testimonials-widget-settings.php:245
|
299 |
msgid "URL of thing being referenced in testimonials"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: lib/class-testimonials-widget-settings.php:252
|
303 |
msgid "Hide built-in quotes?"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: lib/class-testimonials-widget-settings.php:253
|
307 |
msgid "Remove open and close quote span tags surrounding testimonial content"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: lib/class-testimonials-widget-settings.php:259
|
311 |
msgid "Hide \"Testimonials Not Found\"?"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: lib/class-testimonials-widget-settings.php:265
|
315 |
msgid "Hide Gravatar Image?"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: lib/class-testimonials-widget-settings.php:271
|
319 |
msgid "Hide Image?"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: lib/class-testimonials-widget-settings.php:277
|
323 |
msgid "Hide Image in Single View?"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: lib/class-testimonials-widget-settings.php:284
|
327 |
msgid "Hide Testimonial Content?"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: lib/class-testimonials-widget-settings.php:290
|
331 |
msgid "Hide Author/Source?"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: lib/class-testimonials-widget-settings.php:293
|
335 |
msgid "Don't display \"Post Title\" in cite"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: lib/class-testimonials-widget-settings.php:297
|
339 |
msgid "Hide Email?"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: lib/class-testimonials-widget-settings.php:304
|
343 |
msgid "Hide Job Title?"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: lib/class-testimonials-widget-settings.php:310
|
347 |
msgid "Hide Location?"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: lib/class-testimonials-widget-settings.php:316
|
351 |
msgid "Hide Company?"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: lib/class-testimonials-widget-settings.php:322
|
355 |
msgid "Hide URL?"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: lib/class-testimonials-widget-settings.php:328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
msgid "URL Target"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: lib/class-testimonials-widget-settings.php:329
|
363 |
msgid "Add target to all URLs; leave blank if none"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: lib/class-testimonials-widget-settings.php:334
|
367 |
msgid "Enable Paging?"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: lib/class-testimonials-widget-settings.php:335
|
371 |
msgid "For `[testimonialswidget_list]`"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: lib/class-testimonials-widget-settings.php:338
|
375 |
msgid "Disable"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: lib/class-testimonials-widget-settings.php:339
|
379 |
msgid "Enable"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: lib/class-testimonials-widget-settings.php:340
|
383 |
msgid "Before testimonials"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: lib/class-testimonials-widget-settings.php:341
|
387 |
msgid "After testimonials"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: lib/class-testimonials-widget-settings.php:348
|
391 |
+
msgid "Do [shortcodes]?"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: lib/class-testimonials-widget-settings.php:349
|
395 |
msgid "If unchecked, shortcodes are stripped."
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: lib/class-testimonials-widget-settings.php:362
|
399 |
msgid "Selection Options"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: lib/class-testimonials-widget-settings.php:368
|
403 |
msgid "Category Filter"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: lib/class-testimonials-widget-settings.php:369
|
407 |
msgid "Comma separated category names. Ex: Category A, Another category"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: lib/class-testimonials-widget-settings.php:376
|
411 |
msgid "Tags Filter"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: lib/class-testimonials-widget-settings.php:377
|
415 |
msgid "Comma separated tag names. Ex: Tag A, Another tag"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: lib/class-testimonials-widget-settings.php:384
|
419 |
msgid "Require All Tags?"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: lib/class-testimonials-widget-settings.php:385
|
423 |
msgid "Select only testimonials with all of the given tags"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: lib/class-testimonials-widget-settings.php:392
|
427 |
msgid "Include IDs Filter"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: lib/class-testimonials-widget-settings.php:393
|
431 |
+
#: lib/class-testimonials-widget-settings.php:400
|
432 |
msgid "Comma separated testimonial IDs. Ex: 3,1,2"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: lib/class-testimonials-widget-settings.php:399
|
436 |
msgid "Exclude IDs Filter"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: lib/class-testimonials-widget-settings.php:406
|
440 |
msgid "Limit"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: lib/class-testimonials-widget-settings.php:407
|
444 |
msgid "Number of testimonials to select per instance"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: lib/class-testimonials-widget-settings.php:420
|
448 |
msgid "Ordering Options"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: lib/class-testimonials-widget-settings.php:426
|
452 |
msgid "Random Order?"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: lib/class-testimonials-widget-settings.php:427
|
456 |
msgid "If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: lib/class-testimonials-widget-settings.php:434
|
460 |
msgid "ORDER BY"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: lib/class-testimonials-widget-settings.php:435
|
464 |
msgid "Used when \"Random Order\" is disabled"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: lib/class-testimonials-widget-settings.php:438
|
468 |
msgid "Testimonial ID"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: lib/class-testimonials-widget-settings.php:439
|
472 |
msgid "Author"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: lib/class-testimonials-widget-settings.php:440 testimonials-widget.php:570
|
|
|
476 |
msgid "Date"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: lib/class-testimonials-widget-settings.php:441
|
480 |
msgid "Menu Order"
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: lib/class-testimonials-widget-settings.php:442 testimonials-widget.php:562
|
|
|
484 |
msgid "Source"
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: lib/class-testimonials-widget-settings.php:443
|
488 |
msgid "No order"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: lib/class-testimonials-widget-settings.php:451
|
492 |
msgid "ORDER BY meta_key"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: lib/class-testimonials-widget-settings.php:452
|
496 |
msgid "Used when \"Random Order\" is disabled and sorting by a testimonials meta key is needed. Overrides ORDER BY"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: lib/class-testimonials-widget-settings.php:455
|
500 |
msgid "None"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: lib/class-testimonials-widget-settings.php:456 testimonials-widget.php:564
|
504 |
+
#: testimonials-widget.php:1628
|
|
|
505 |
msgid "Job Title"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: lib/class-testimonials-widget-settings.php:457 testimonials-widget.php:566
|
509 |
+
#: testimonials-widget.php:1640
|
|
|
510 |
msgid "Email"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: lib/class-testimonials-widget-settings.php:458 testimonials-widget.php:565
|
514 |
+
#: testimonials-widget.php:1634
|
|
|
515 |
msgid "Location"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: lib/class-testimonials-widget-settings.php:459 testimonials-widget.php:567
|
519 |
+
#: testimonials-widget.php:1646
|
|
|
520 |
msgid "Company"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: lib/class-testimonials-widget-settings.php:460 testimonials-widget.php:568
|
524 |
+
#: testimonials-widget.php:1652
|
|
|
525 |
msgid "URL"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: lib/class-testimonials-widget-settings.php:467
|
529 |
msgid "ORDER BY Order"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: lib/class-testimonials-widget-settings.php:470
|
533 |
msgid "Descending"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: lib/class-testimonials-widget-settings.php:471
|
537 |
msgid "Ascending"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: lib/class-testimonials-widget-settings.php:485
|
541 |
msgid "Allow Comments?"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: lib/class-testimonials-widget-settings.php:486
|
545 |
msgid "Only affects the Testimonials post edit page. Your theme controls the front-end view."
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: lib/class-testimonials-widget-settings.php:492
|
549 |
msgid "URL slug-name for <a href=\"%1s\">testimonials archive</a> page."
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: lib/class-testimonials-widget-settings.php:498
|
553 |
msgid "Archive Page URL"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: lib/class-testimonials-widget-settings.php:505
|
557 |
msgid "URL slug-name for testimonial view pages. Shouldn't be the same as the Archive Page URL nor should it match a page URL slug."
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: lib/class-testimonials-widget-settings.php:509
|
561 |
msgid "Testimonial Page URL"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: lib/class-testimonials-widget-settings.php:519
|
565 |
msgid "Reset & Compatiblity Options"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: lib/class-testimonials-widget-settings.php:525
|
569 |
msgid "Don't Use Default Taxonomies?"
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: lib/class-testimonials-widget-settings.php:528
|
573 |
msgid "If checked, use Testimonials' own category and tag taxonomies instead"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: lib/class-testimonials-widget-settings.php:536
|
577 |
msgid "Version Based Options"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: lib/class-testimonials-widget-settings.php:542
|
581 |
msgid "Use bxSlider?"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: lib/class-testimonials-widget-settings.php:543
|
585 |
msgid "Pre 2.15.0, Testimonials' used custom JavaScript for transitions."
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: lib/class-testimonials-widget-settings.php:555
|
589 |
msgid "Disable Animation?"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: lib/class-testimonials-widget-settings.php:556
|
593 |
msgid "Pre 2.15.0, Disable animation between testimonial transitions. Useful when stacking widgets."
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: lib/class-testimonials-widget-settings.php:564
|
597 |
msgid "Fade Out Speed"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: lib/class-testimonials-widget-settings.php:565
|
601 |
+
#: lib/class-testimonials-widget-settings.php:573
|
602 |
msgid "Pre 2.15.0, Transition duration in milliseconds; higher values indicate slower animations, not faster ones."
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: lib/class-testimonials-widget-settings.php:572
|
606 |
msgid "Fade In Speed"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: lib/class-testimonials-widget-settings.php:580
|
610 |
msgid "Height"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: lib/class-testimonials-widget-settings.php:581
|
614 |
msgid "Pre 2.15.0, Testimonials height, in pixels. Overrides minimum and maximum height"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: lib/class-testimonials-widget-settings.php:587
|
618 |
msgid "Minimum Height"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: lib/class-testimonials-widget-settings.php:588
|
622 |
msgid "Pre 2.15.0, Set for minimum display height, in pixels"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: lib/class-testimonials-widget-settings.php:594
|
626 |
msgid "Maximum Height"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: lib/class-testimonials-widget-settings.php:595
|
630 |
msgid "Pre 2.15.0, Set for maximum display height, in pixels"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: lib/class-testimonials-widget-settings.php:601
|
634 |
+
msgid "Always Load CSS?"
|
635 |
+
msgstr ""
|
636 |
+
|
637 |
+
#: lib/class-testimonials-widget-settings.php:602
|
638 |
+
msgid "Pre 2.14.0, Testimonials' CSS was always loaded, whether needed or not"
|
639 |
+
msgstr ""
|
640 |
+
|
641 |
+
#: lib/class-testimonials-widget-settings.php:613
|
642 |
msgid "Include IE7 CSS?"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: lib/class-testimonials-widget-settings.php:614
|
646 |
msgid "IE7 specific CSS moved to separate CSS file in version 2.13.6."
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: lib/class-testimonials-widget-settings.php:626
|
650 |
msgid "Use `<q>` tag?"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: lib/class-testimonials-widget-settings.php:627
|
654 |
msgid "Pre 2.11.0, not HTML5 compliant"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: lib/class-testimonials-widget-settings.php:638
|
658 |
msgid "Remove `.hentry` CSS?"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: lib/class-testimonials-widget-settings.php:639
|
662 |
msgid "Pre 2.6.4, some themes use class `.hentry` in a manner that breaks Testimonials' CSS"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: lib/class-testimonials-widget-settings.php:865
|
666 |
msgid "These Testimonials 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."
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: lib/class-testimonials-widget-settings.php:867
|
670 |
msgid "Shortcode option names are listed below each entry."
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: lib/class-testimonials-widget-settings.php:870
|
674 |
msgid "View the <a href=\"%s\">Testimonials documentation</a>."
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: lib/class-testimonials-widget-settings.php:880
|
678 |
msgid "Show or hide optional fields."
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: lib/class-testimonials-widget-settings.php:888
|
682 |
msgid "Options used to select testimonials."
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: lib/class-testimonials-widget-settings.php:896
|
686 |
msgid "Options used to determine displayed testimonials ordering."
|
687 |
msgstr ""
|
688 |
|
689 |
+
#: lib/class-testimonials-widget-settings.php:904
|
690 |
msgid "Options related to showing testimonials in widgets."
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: lib/class-testimonials-widget-settings.php:912
|
694 |
msgid "Archive and singular page URL related testimonials options."
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: lib/class-testimonials-widget-settings.php:919
|
698 |
msgid "Compatibility & Reset"
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: lib/class-testimonials-widget-settings.php:920
|
702 |
msgid "Backwards compatibility, import/export options, and reset options."
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: lib/class-testimonials-widget-widget.php:30
|
706 |
msgid "Display testimonials with multiple selection and display options"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: lib/class-testimonials-widget-widget.php:102
|
710 |
msgid "CSS Class"
|
711 |
msgstr ""
|
712 |
|
713 |
+
#: lib/class-testimonials-widget-widget.php:103
|
714 |
msgid "This widget's unique CSS class for styling"
|
715 |
msgstr ""
|
716 |
|
717 |
+
#: lib/requirements.php:51
|
718 |
+
msgid "Plugin \"%1$s\" has been deactivated as it requires a current Aihrus Framework. Once corrected, \"%1$s\" can be activated. %2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
+
#: testimonials-widget.php:148 testimonials-widget.php:1980
|
722 |
msgid "Testimonials Shortcode Examples"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: testimonials-widget.php:148
|
726 |
msgid "E.g. Shortcodes"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: testimonials-widget.php:349
|
730 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible CSS fixes."
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: testimonials-widget.php:560
|
734 |
msgid "ID"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: testimonials-widget.php:561
|
738 |
msgid "Image"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: testimonials-widget.php:563
|
742 |
msgid "Shortcodes"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: testimonials-widget.php:569
|
746 |
msgid "Published by"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: testimonials-widget.php:575 testimonials-widget.php:578
|
|
|
750 |
msgid "Category"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: testimonials-widget.php:576 testimonials-widget.php:579
|
|
|
754 |
msgid "Tags"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: testimonials-widget.php:590
|
758 |
msgid "Add New"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: testimonials-widget.php:591 testimonials-widget.php:594
|
|
|
762 |
msgid "Add New Testimonial"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: testimonials-widget.php:592
|
766 |
msgid "Edit Testimonial"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: testimonials-widget.php:595 testimonials-widget.php:1002
|
|
|
770 |
msgid "No testimonials found"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: testimonials-widget.php:596
|
774 |
msgid "No testimonials found in Trash"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: testimonials-widget.php:598
|
778 |
msgid "Search Testimonials"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: testimonials-widget.php:599 testimonials-widget.php:1740
|
|
|
782 |
msgid "Testimonial"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: testimonials-widget.php:600
|
786 |
msgid "View Testimonial"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: testimonials-widget.php:1151
|
790 |
msgid "…"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: testimonials-widget.php:1360
|
794 |
msgid "«"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: testimonials-widget.php:1369
|
798 |
msgid "»"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: testimonials-widget.php:1664
|
802 |
msgid "Testimonial Data"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: testimonials-widget.php:1689
|
806 |
msgid "Enter title here"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: testimonials-widget.php:1690
|
810 |
msgid "Enter testimonial source here"
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: testimonials-widget.php:1715
|
814 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: testimonials-widget.php:1716
|
818 |
msgid "Custom field updated."
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: testimonials-widget.php:1717
|
822 |
msgid "Custom field deleted."
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: testimonials-widget.php:1718
|
826 |
msgid "Testimonial updated."
|
827 |
msgstr ""
|
828 |
|
829 |
#. translators: %s: date and time of the revision
|
830 |
|
831 |
+
#: testimonials-widget.php:1720
|
832 |
msgid "Testimonial restored to revision from %s"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: testimonials-widget.php:1721
|
836 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: testimonials-widget.php:1722
|
840 |
msgid "Testimonial saved."
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: testimonials-widget.php:1723
|
844 |
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: testimonials-widget.php:1724
|
848 |
msgid "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview testimonial</a>"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: testimonials-widget.php:1725
|
852 |
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: testimonials-widget.php:1971
|
856 |
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible fixes."
|
857 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
858 |
#. Plugin Name of the plugin/theme
|
859 |
msgid "Testimonials by Aihrus"
|
860 |
msgstr ""
|
lib/aihrus/.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
000-code-qa.txt
|
2 |
+
diff.txt
|
{includes/libraries/aihrus-framework → lib/aihrus}/CHANGELOG.md
RENAMED
@@ -1,30 +1,6 @@
|
|
1 |
# CHANGELOG Aihrus Framework
|
2 |
|
3 |
-
##
|
4 |
-
|
5 |
-
## 1.0.4RC2
|
6 |
-
* Register `jquery-style`
|
7 |
-
* RESOLVE michael-cannon/testimonials-widget#65 Widget blank options aren't saving correctly
|
8 |
-
* Update copyright year
|
9 |
-
|
10 |
-
## 1.0.3
|
11 |
-
* RESOLVE Fatal error: Call to undefined function add_settings_error() in class-aihrus-settings.php on line 559
|
12 |
-
* RESOLVE Featured image via Gravatar not saving correctly
|
13 |
-
* Revise data deletion description - Thank you Mark
|
14 |
-
|
15 |
-
## 1.0.2
|
16 |
-
* Add phpunit.xml
|
17 |
-
* Add `slash_sanitize_title` verification helper
|
18 |
-
* Coding standards
|
19 |
-
* Display "Settings saved."
|
20 |
-
* Move ci to tests
|
21 |
-
* Remove Travis configuration
|
22 |
-
* RESOLVE michael-cannon/testimonials-widget#48 Activation on WP 3.6 not working
|
23 |
-
* RESOLVE michael-cannon/wootheme-testimonials-to-testimonials#2 No settings saved notice upon saving settings
|
24 |
-
* Update usage instructions
|
25 |
-
* Use $plugin_assets than $plugin_path
|
26 |
-
|
27 |
-
## 1.0.1
|
28 |
* Add strip_protocol
|
29 |
* Add valid_hash check
|
30 |
* Move relicensing to plugin level
|
@@ -32,7 +8,7 @@
|
|
32 |
## 1.0.0
|
33 |
* Enable aihr_check_aihrus_framework
|
34 |
|
35 |
-
##
|
36 |
* Abstract notice helper methods as functions
|
37 |
* Add TODO
|
38 |
* Add `add_media` post attachment helper
|
1 |
# CHANGELOG Aihrus Framework
|
2 |
|
3 |
+
## 1.0.1-alpha
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Add strip_protocol
|
5 |
* Add valid_hash check
|
6 |
* Move relicensing to plugin level
|
8 |
## 1.0.0
|
9 |
* Enable aihr_check_aihrus_framework
|
10 |
|
11 |
+
## master
|
12 |
* Abstract notice helper methods as functions
|
13 |
* Add TODO
|
14 |
* Add `add_media` post attachment helper
|
{includes/libraries/aihrus-framework → lib/aihrus}/LICENSE
RENAMED
File without changes
|
{includes/libraries/aihrus-framework → lib/aihrus}/README.md
RENAMED
@@ -20,7 +20,7 @@ A helper library for WordPress plugins by Aihrus.
|
|
20 |
|
21 |
```
|
22 |
git remote add aihrus https://github.com/michael-cannon/aihrus-framework.git
|
23 |
-
git subtree add -P
|
24 |
git commit -a -m "Readd aihrus framework"
|
25 |
git push origin master
|
26 |
```
|
@@ -28,7 +28,7 @@ git push origin master
|
|
28 |
* Link plugin to libary
|
29 |
|
30 |
```
|
31 |
-
require
|
32 |
```
|
33 |
|
34 |
* Extend plugin class to library
|
@@ -40,31 +40,32 @@ class Wordpress_Starter extends Aihrus_Common {
|
|
40 |
* Add class static members
|
41 |
|
42 |
```
|
43 |
-
public static $class
|
44 |
public static $notice_key;
|
45 |
```
|
46 |
|
47 |
-
* Set notices…
|
48 |
|
49 |
```
|
50 |
…
|
51 |
if ( $bad_version )
|
52 |
-
|
53 |
…
|
54 |
-
function
|
55 |
-
$
|
56 |
-
$
|
57 |
-
|
58 |
-
$
|
59 |
-
|
60 |
-
|
|
|
61 |
}
|
62 |
```
|
63 |
|
64 |
* Update the external library
|
65 |
|
66 |
```
|
67 |
-
git subtree pull -P
|
68 |
```
|
69 |
|
70 |
* Update the plugin repository
|
20 |
|
21 |
```
|
22 |
git remote add aihrus https://github.com/michael-cannon/aihrus-framework.git
|
23 |
+
git subtree add -P lib/aihrus aihrus master
|
24 |
git commit -a -m "Readd aihrus framework"
|
25 |
git push origin master
|
26 |
```
|
28 |
* Link plugin to libary
|
29 |
|
30 |
```
|
31 |
+
require WPSP_DIR_LIB . '/aihrus/class-aihrus-common.php';
|
32 |
```
|
33 |
|
34 |
* Extend plugin class to library
|
40 |
* Add class static members
|
41 |
|
42 |
```
|
43 |
+
public static $class;
|
44 |
public static $notice_key;
|
45 |
```
|
46 |
|
47 |
+
* Set notices… (fixme)
|
48 |
|
49 |
```
|
50 |
…
|
51 |
if ( $bad_version )
|
52 |
+
self::set_notice( 'notice_version' );
|
53 |
…
|
54 |
+
public static function notice_version( $free_base = null, $free_name = null, $free_slug = null, $free_version = null, $item_name = null ) {
|
55 |
+
$free_base = self::FREE_PLUGIN_BASE;
|
56 |
+
$free_name = 'Testimonials';
|
57 |
+
$free_slug = 'testimonials-widget';
|
58 |
+
$free_version = self::FREE_VERSION;
|
59 |
+
$item_name = self::NAME;
|
60 |
+
|
61 |
+
parent::notice_version( $free_base, $free_name, $free_slug, $free_version, $item_name );
|
62 |
}
|
63 |
```
|
64 |
|
65 |
* Update the external library
|
66 |
|
67 |
```
|
68 |
+
git subtree pull -P lib/aihrus aihrus master
|
69 |
```
|
70 |
|
71 |
* Update the plugin repository
|
lib/aihrus/TODO.md
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
# TODO Aihrus Framework
|
2 |
+
|
3 |
+
* TBD
|
{includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-common.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -153,7 +153,7 @@ EOD;
|
|
153 |
if ( $disable_donate )
|
154 |
return;
|
155 |
|
156 |
-
$text = sprintf( esc_html__( 'Please donate $5 towards ongoing free support and development of the "%1$s" plugin. %2$s' ), $item_name, self::$donate_button );
|
157 |
|
158 |
aihr_notice_updated( $text );
|
159 |
}
|
@@ -308,14 +308,12 @@ EOD;
|
|
308 |
}
|
309 |
|
310 |
|
311 |
-
public static function get_image_src( $image
|
312 |
$doc = new DOMDocument();
|
313 |
$doc->loadHTML( $image );
|
314 |
$xpath = new DOMXPath( $doc );
|
315 |
$src = $xpath->evaluate( 'string(//img/@src)' );
|
316 |
-
|
317 |
-
if ( $strip_protocol )
|
318 |
-
$src = self::strip_protocol( $src );
|
319 |
|
320 |
return $src;
|
321 |
}
|
@@ -448,11 +446,11 @@ EOD;
|
|
448 |
|
449 |
|
450 |
public static function strip_protocol( $link ) {
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
|
455 |
-
|
456 |
}
|
457 |
|
458 |
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
153 |
if ( $disable_donate )
|
154 |
return;
|
155 |
|
156 |
+
$text = sprintf( esc_html__( 'Please donate $5 towards ongoing free support and development of the "%1$s" plugin. %2$s', 'testimonials-widget' ), $item_name, self::$donate_button );
|
157 |
|
158 |
aihr_notice_updated( $text );
|
159 |
}
|
308 |
}
|
309 |
|
310 |
|
311 |
+
public static function get_image_src( $image ) {
|
312 |
$doc = new DOMDocument();
|
313 |
$doc->loadHTML( $image );
|
314 |
$xpath = new DOMXPath( $doc );
|
315 |
$src = $xpath->evaluate( 'string(//img/@src)' );
|
316 |
+
$src = self::strip_protocol( $src );
|
|
|
|
|
317 |
|
318 |
return $src;
|
319 |
}
|
446 |
|
447 |
|
448 |
public static function strip_protocol( $link ) {
|
449 |
+
if ( ! empty( $link ) ) {
|
450 |
+
$link = preg_replace( '#https?:#', '', $link );
|
451 |
+
}
|
452 |
|
453 |
+
return $link;
|
454 |
}
|
455 |
|
456 |
|
{includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-licensing.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
{includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-settings.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -22,7 +22,6 @@
|
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
24 |
|
25 |
-
require_once ABSPATH . 'wp-admin/includes/template.php';
|
26 |
|
27 |
if ( class_exists( 'Aihrus_Settings' ) )
|
28 |
return;
|
@@ -59,8 +58,8 @@ abstract class Aihrus_Settings {
|
|
59 |
|
60 |
|
61 |
public static function sections() {
|
62 |
-
static::$sections['reset'] = esc_html__( 'Reset' );
|
63 |
-
static::$sections['about'] = esc_html__( 'About' );
|
64 |
}
|
65 |
|
66 |
|
@@ -78,9 +77,9 @@ abstract class Aihrus_Settings {
|
|
78 |
|
79 |
static::$settings['export'] = array(
|
80 |
'section' => 'reset',
|
81 |
-
'title' => esc_html__( 'Export Settings' ),
|
82 |
'type' => 'readonly',
|
83 |
-
'desc' => esc_html__( 'These are your current settings in a serialized format. Copy the contents to make a backup of your settings.' ),
|
84 |
'std' => $serialized_options,
|
85 |
'widget' => 0,
|
86 |
);
|
@@ -88,17 +87,17 @@ abstract class Aihrus_Settings {
|
|
88 |
|
89 |
static::$settings['import'] = array(
|
90 |
'section' => 'reset',
|
91 |
-
'title' => esc_html__( 'Import Settings' ),
|
92 |
'type' => 'textarea',
|
93 |
-
'desc' => esc_html__( 'Paste new serialized settings here to overwrite your current configuration.' ),
|
94 |
'widget' => 0,
|
95 |
);
|
96 |
|
97 |
-
$desc = esc_html__( 'Delete all %s data and options from database on plugin deletion
|
98 |
|
99 |
static::$settings['delete_data'] = array(
|
100 |
'section' => 'reset',
|
101 |
-
'title' => esc_html__( 'Remove Plugin Data on Deletion?' ),
|
102 |
'type' => 'checkbox',
|
103 |
'class' => 'warning',
|
104 |
'desc' => sprintf( $desc, static::NAME ),
|
@@ -107,10 +106,10 @@ abstract class Aihrus_Settings {
|
|
107 |
|
108 |
static::$settings['reset_defaults'] = array(
|
109 |
'section' => 'reset',
|
110 |
-
'title' => esc_html__( 'Reset to Defaults?' ),
|
111 |
'type' => 'checkbox',
|
112 |
'class' => 'warning',
|
113 |
-
'desc' => esc_html__( 'Check this box to reset options to their defaults' ),
|
114 |
);
|
115 |
}
|
116 |
|
@@ -234,12 +233,12 @@ abstract class Aihrus_Settings {
|
|
234 |
|
235 |
public static function display_about() {
|
236 |
$name = str_replace( ' Settings', '', static::NAME );
|
237 |
-
$text = __( '<img class="alignright size-medium" src="%1$
|
238 |
|
239 |
echo '<div id="about" style="width: 70%; min-height: 225px;"><p>';
|
240 |
echo sprintf(
|
241 |
$text,
|
242 |
-
static::$
|
243 |
esc_url( static::$plugin_url ),
|
244 |
$name,
|
245 |
esc_url( 'http://aihr.us/resume/' ),
|
@@ -263,7 +262,6 @@ abstract class Aihrus_Settings {
|
|
263 |
|
264 |
echo '<form action="options.php" method="post">';
|
265 |
|
266 |
-
settings_errors( static::ID );
|
267 |
settings_fields( static::ID );
|
268 |
|
269 |
echo '<div id="' . static::ID . '">
|
@@ -277,7 +275,7 @@ abstract class Aihrus_Settings {
|
|
277 |
self::do_settings_sections( static::ID );
|
278 |
|
279 |
echo '
|
280 |
-
<p class="submit"><input name="Submit" type="submit" class="button-primary" value="' . esc_html__( 'Save Changes' ) . '" /></p>
|
281 |
</form>
|
282 |
</div>
|
283 |
';
|
@@ -285,7 +283,7 @@ abstract class Aihrus_Settings {
|
|
285 |
if ( ! $disable_donate ) {
|
286 |
echo '<p>' .
|
287 |
sprintf(
|
288 |
-
__( 'If you like this plugin, please <a href="%1$s" title="Donate for Good Karma"><img src="%2$s" border="0" alt="Donate for Good Karma" /></a> or <a href="%3$s" title="purchase premium WordPress plugins from Aihrus ">purchase the Premium version</a> to help fund further development and <a href="%4$s" title="Support forums">support</a>.' ),
|
289 |
esc_url( 'http://aihr.us/about-aihrus/donate/' ),
|
290 |
esc_url( 'https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif' ),
|
291 |
esc_url( 'http://aihr.us/store/' ),
|
@@ -296,7 +294,7 @@ abstract class Aihrus_Settings {
|
|
296 |
|
297 |
echo '<p class="copyright">' .
|
298 |
sprintf(
|
299 |
-
__( 'Copyright ©%1$s <a href="%2$s">Aihrus</a>.' ),
|
300 |
date( 'Y' ),
|
301 |
esc_url( 'http://aihr.us' )
|
302 |
) .
|
@@ -468,8 +466,7 @@ abstract class Aihrus_Settings {
|
|
468 |
|
469 |
|
470 |
public static function styles() {
|
471 |
-
|
472 |
-
wp_enqueue_style( 'jquery-style' );
|
473 |
}
|
474 |
|
475 |
|
@@ -481,12 +478,9 @@ abstract class Aihrus_Settings {
|
|
481 |
public static function validate_settings( $input, $options = null, $do_errors = false ) {
|
482 |
$errors = array();
|
483 |
|
484 |
-
$null_options = false;
|
485 |
if ( is_null( $options ) ) {
|
486 |
-
$null_options = true;
|
487 |
-
|
488 |
-
$defaults = static::get_defaults();
|
489 |
$options = self::get_settings();
|
|
|
490 |
|
491 |
if ( is_admin() ) {
|
492 |
if ( ! empty( $input['reset_defaults'] ) ) {
|
@@ -517,15 +511,10 @@ abstract class Aihrus_Settings {
|
|
517 |
$validations = explode( ',', $validations );
|
518 |
|
519 |
if ( ! isset( $input[ $id ] ) ) {
|
520 |
-
if ( 'checkbox' != $type )
|
521 |
$input[ $id ] = $default;
|
522 |
-
|
523 |
-
|
524 |
-
continue;
|
525 |
-
} else {
|
526 |
-
$input[ $id ] = 0;
|
527 |
-
}
|
528 |
-
}
|
529 |
}
|
530 |
|
531 |
if ( $default == $input[ $id ] && ! in_array( 'required', $validations ) )
|
@@ -557,16 +546,6 @@ abstract class Aihrus_Settings {
|
|
557 |
unset( $input['export'] );
|
558 |
unset( $input['import'] );
|
559 |
|
560 |
-
$hide_update_notice = false;
|
561 |
-
if ( isset( static::$hide_update_notice ) && ! empty( static::$hide_update_notice ) ) {
|
562 |
-
$hide_update_notice = true;
|
563 |
-
}
|
564 |
-
|
565 |
-
if ( $null_options && empty( $errors ) && ! $hide_update_notice ) {
|
566 |
-
add_settings_error( static::ID, 'settings_updated', esc_html__( 'Settings saved.' ), 'updated' );
|
567 |
-
set_transient( 'settings_errors', get_settings_errors(), 30 );
|
568 |
-
}
|
569 |
-
|
570 |
if ( empty( $do_errors ) ) {
|
571 |
$validated = $input;
|
572 |
} else {
|
@@ -616,15 +595,7 @@ abstract class Aihrus_Settings {
|
|
616 |
|
617 |
case 'required':
|
618 |
if ( empty( $input[ $id ] ) )
|
619 |
-
$errors[ $id ] = esc_html__( 'Required' );
|
620 |
-
break;
|
621 |
-
|
622 |
-
case 'slash_sanitize_title':
|
623 |
-
$temp = explode( '/', $input[ $id ] );
|
624 |
-
$temp = array_map( 'sanitize_title', $temp );
|
625 |
-
$temp = implode( '/', $temp );
|
626 |
-
|
627 |
-
$input[ $id ] = $temp;
|
628 |
break;
|
629 |
|
630 |
case 'slug':
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
24 |
|
|
|
25 |
|
26 |
if ( class_exists( 'Aihrus_Settings' ) )
|
27 |
return;
|
58 |
|
59 |
|
60 |
public static function sections() {
|
61 |
+
static::$sections['reset'] = esc_html__( 'Reset', 'testimonials-widget' );
|
62 |
+
static::$sections['about'] = esc_html__( 'About', 'testimonials-widget' );
|
63 |
}
|
64 |
|
65 |
|
77 |
|
78 |
static::$settings['export'] = array(
|
79 |
'section' => 'reset',
|
80 |
+
'title' => esc_html__( 'Export Settings', 'testimonials-widget' ),
|
81 |
'type' => 'readonly',
|
82 |
+
'desc' => esc_html__( 'These are your current settings in a serialized format. Copy the contents to make a backup of your settings.', 'testimonials-widget' ),
|
83 |
'std' => $serialized_options,
|
84 |
'widget' => 0,
|
85 |
);
|
87 |
|
88 |
static::$settings['import'] = array(
|
89 |
'section' => 'reset',
|
90 |
+
'title' => esc_html__( 'Import Settings', 'testimonials-widget' ),
|
91 |
'type' => 'textarea',
|
92 |
+
'desc' => esc_html__( 'Paste new serialized settings here to overwrite your current configuration.', 'testimonials-widget' ),
|
93 |
'widget' => 0,
|
94 |
);
|
95 |
|
96 |
+
$desc = esc_html__( 'Delete all %s data and options from database on plugin deletion', 'testimonials-widget' );
|
97 |
|
98 |
static::$settings['delete_data'] = array(
|
99 |
'section' => 'reset',
|
100 |
+
'title' => esc_html__( 'Remove Plugin Data on Deletion?', 'testimonials-widget' ),
|
101 |
'type' => 'checkbox',
|
102 |
'class' => 'warning',
|
103 |
'desc' => sprintf( $desc, static::NAME ),
|
106 |
|
107 |
static::$settings['reset_defaults'] = array(
|
108 |
'section' => 'reset',
|
109 |
+
'title' => esc_html__( 'Reset to Defaults?', 'testimonials-widget' ),
|
110 |
'type' => 'checkbox',
|
111 |
'class' => 'warning',
|
112 |
+
'desc' => esc_html__( 'Check this box to reset options to their defaults', 'testimonials-widget' ),
|
113 |
);
|
114 |
}
|
115 |
|
233 |
|
234 |
public static function display_about() {
|
235 |
$name = str_replace( ' Settings', '', static::NAME );
|
236 |
+
$text = __( '<img class="alignright size-medium" src="%1$s/media/michael-cannon-red-square-300x2251.jpg" alt="Michael in Red Square, Moscow, Russia" width="300" height="225" /><a href="%2$s">%3$s</a> is by <a href="%4$s">Michael Cannon</a>. He\'s <a href="%5$s">Peichi’s</a> smiling man, an adventurous <a href="%6$s" target="_blank">water-rat</a>, <a href="%7$s">chief people officer</a>, <a href="%8$s">cyclist</a>, <a href="%9$s">full stack developer</a>, <a href="%10$s">poet</a>, <a href="%11$s">WWOOF’er</a> and <a href="%12$s">world traveler</a>.', 'testimonials-widget' );
|
237 |
|
238 |
echo '<div id="about" style="width: 70%; min-height: 225px;"><p>';
|
239 |
echo sprintf(
|
240 |
$text,
|
241 |
+
static::$plugin_path,
|
242 |
esc_url( static::$plugin_url ),
|
243 |
$name,
|
244 |
esc_url( 'http://aihr.us/resume/' ),
|
262 |
|
263 |
echo '<form action="options.php" method="post">';
|
264 |
|
|
|
265 |
settings_fields( static::ID );
|
266 |
|
267 |
echo '<div id="' . static::ID . '">
|
275 |
self::do_settings_sections( static::ID );
|
276 |
|
277 |
echo '
|
278 |
+
<p class="submit"><input name="Submit" type="submit" class="button-primary" value="' . esc_html__( 'Save Changes', 'testimonials-widget' ) . '" /></p>
|
279 |
</form>
|
280 |
</div>
|
281 |
';
|
283 |
if ( ! $disable_donate ) {
|
284 |
echo '<p>' .
|
285 |
sprintf(
|
286 |
+
__( 'If you like this plugin, please <a href="%1$s" title="Donate for Good Karma"><img src="%2$s" border="0" alt="Donate for Good Karma" /></a> or <a href="%3$s" title="purchase premium WordPress plugins from Aihrus ">purchase the Premium version</a> to help fund further development and <a href="%4$s" title="Support forums">support</a>.', 'testimonials-widget' ),
|
287 |
esc_url( 'http://aihr.us/about-aihrus/donate/' ),
|
288 |
esc_url( 'https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif' ),
|
289 |
esc_url( 'http://aihr.us/store/' ),
|
294 |
|
295 |
echo '<p class="copyright">' .
|
296 |
sprintf(
|
297 |
+
__( 'Copyright ©%1$s <a href="%2$s">Aihrus</a>.', 'testimonials-widget' ),
|
298 |
date( 'Y' ),
|
299 |
esc_url( 'http://aihr.us' )
|
300 |
) .
|
466 |
|
467 |
|
468 |
public static function styles() {
|
469 |
+
wp_enqueue_style( 'jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
|
|
|
470 |
}
|
471 |
|
472 |
|
478 |
public static function validate_settings( $input, $options = null, $do_errors = false ) {
|
479 |
$errors = array();
|
480 |
|
|
|
481 |
if ( is_null( $options ) ) {
|
|
|
|
|
|
|
482 |
$options = self::get_settings();
|
483 |
+
$defaults = static::get_defaults();
|
484 |
|
485 |
if ( is_admin() ) {
|
486 |
if ( ! empty( $input['reset_defaults'] ) ) {
|
511 |
$validations = explode( ',', $validations );
|
512 |
|
513 |
if ( ! isset( $input[ $id ] ) ) {
|
514 |
+
if ( 'checkbox' != $type )
|
515 |
$input[ $id ] = $default;
|
516 |
+
else
|
517 |
+
$input[ $id ] = 0;
|
|
|
|
|
|
|
|
|
|
|
518 |
}
|
519 |
|
520 |
if ( $default == $input[ $id ] && ! in_array( 'required', $validations ) )
|
546 |
unset( $input['export'] );
|
547 |
unset( $input['import'] );
|
548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
if ( empty( $do_errors ) ) {
|
550 |
$validated = $input;
|
551 |
} else {
|
595 |
|
596 |
case 'required':
|
597 |
if ( empty( $input[ $id ] ) )
|
598 |
+
$errors[ $id ] = esc_html__( 'Required', 'testimonials-widget' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
break;
|
600 |
|
601 |
case 'slug':
|
{includes/libraries/aihrus-framework → lib/aihrus}/class-aihrus-widget.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -137,7 +137,7 @@ abstract class Aihrus_Widget extends WP_Widget implements Aihrus_Widget_Interfac
|
|
137 |
if ( ! empty( $desc ) )
|
138 |
echo '<h3>' . $desc . '</h3>';
|
139 |
|
140 |
-
echo '<a id="' . $this->get_field_id( $id ) . '" style="cursor:pointer;" onclick="jQuery( \'.tw-collapsible-control\' ) . slideToggle(); jQuery( \'.tw-collapsible\' ) . slideToggle();">' . esc_html__( 'Expand/Collapse All Options' ) . ' »</a>';
|
141 |
|
142 |
$do_return = true;
|
143 |
break;
|
@@ -146,7 +146,7 @@ abstract class Aihrus_Widget extends WP_Widget implements Aihrus_Widget_Interfac
|
|
146 |
if ( ! empty( $desc ) )
|
147 |
echo '<h3>' . $desc . '</h3>';
|
148 |
|
149 |
-
echo '<a id="' . $this->get_field_id( $id ) . '" style="cursor:pointer;" onclick="jQuery( \'div#' . $this->get_field_id( $id ) . '\' ) . slideToggle();" class="tw-collapsible-control">' . esc_html__( 'Expand/Collapse' ) . ' »</a>';
|
150 |
echo '<div id="' . $this->get_field_id( $id ) . '" style="display:none" class="tw-collapsible">';
|
151 |
|
152 |
$do_return = true;
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
137 |
if ( ! empty( $desc ) )
|
138 |
echo '<h3>' . $desc . '</h3>';
|
139 |
|
140 |
+
echo '<a id="' . $this->get_field_id( $id ) . '" style="cursor:pointer;" onclick="jQuery( \'.tw-collapsible-control\' ) . slideToggle(); jQuery( \'.tw-collapsible\' ) . slideToggle();">' . esc_html__( 'Expand/Collapse All Options', 'testimonials-widget' ) . ' »</a>';
|
141 |
|
142 |
$do_return = true;
|
143 |
break;
|
146 |
if ( ! empty( $desc ) )
|
147 |
echo '<h3>' . $desc . '</h3>';
|
148 |
|
149 |
+
echo '<a id="' . $this->get_field_id( $id ) . '" style="cursor:pointer;" onclick="jQuery( \'div#' . $this->get_field_id( $id ) . '\' ) . slideToggle();" class="tw-collapsible-control">' . esc_html__( 'Expand/Collapse', 'testimonials-widget' ) . ' »</a>';
|
150 |
echo '<div id="' . $this->get_field_id( $id ) . '" style="display:none" class="tw-collapsible">';
|
151 |
|
152 |
$do_return = true;
|
{includes/libraries/aihrus-framework → lib/aihrus}/interface-aihrus-common.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
{includes/libraries/aihrus-framework → lib/aihrus}/interface-aihrus-licensing.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
{includes/libraries/aihrus-framework → lib/aihrus}/interface-aihrus-widget.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
{includes/libraries/aihrus-framework → lib/aihrus}/requirements.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -20,14 +20,14 @@ if ( ! defined( 'AIHR_BASE' ) )
|
|
20 |
define( 'AIHR_BASE', __FILE__ );
|
21 |
|
22 |
if ( ! defined( 'AIHR_VERSION' ) )
|
23 |
-
define( 'AIHR_VERSION', '1.0.
|
24 |
|
25 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
26 |
|
27 |
if ( ! function_exists( 'aihr_check_aihrus_framework' ) ) {
|
28 |
function aihr_check_aihrus_framework( $file = null, $name = null, $aihr_min = '1.0.0' ) {
|
29 |
if ( is_null( $file ) ) {
|
30 |
-
aihr_notice_error( __( '`aihr_check_aihrus_framework` requires $file argument' ) );
|
31 |
|
32 |
return false;
|
33 |
}
|
@@ -72,7 +72,7 @@ if ( ! function_exists( 'aihr_notice_aihrus_framework' ) ) {
|
|
72 |
}
|
73 |
|
74 |
$help_url = esc_url( 'https://aihrus.zendesk.com/entries/35689458' );
|
75 |
-
$help_link = sprintf( __( '<a href="%1$s">Update plugins</a>. <a href="%2$s">More information</a>.' ), self_admin_url( 'update-core.php' ), $help_url );
|
76 |
|
77 |
$note = '';
|
78 |
if ( defined( 'AIHR_BASE' ) ) {
|
@@ -83,12 +83,12 @@ if ( ! function_exists( 'aihr_notice_aihrus_framework' ) ) {
|
|
83 |
$plugin_name = str_replace( '-', ' ', $plugin_name );
|
84 |
$plugin_name = ucwords( $plugin_name );
|
85 |
|
86 |
-
$note = sprintf( esc_html__( 'Plugin "%1$s" is causing the out of date issue.' ), $plugin_name );
|
87 |
}
|
88 |
|
89 |
$aihr_version = defined( 'AIHR_VERSION' ) ? AIHR_VERSION : '0.0.0';
|
90 |
|
91 |
-
$text = sprintf( esc_html__( 'Plugin "%1$s" has been deactivated as it requires Aihrus Framework %2$s or newer. You\'re running Aihrus Framework %4$s. Once corrected, "%1$s" can be activated. %5$s %3$s' ), $name, AIHR_VERSION_MIN, $help_link, $aihr_version, $note );
|
92 |
|
93 |
aihr_notice_error( $text );
|
94 |
}
|
@@ -97,7 +97,7 @@ if ( ! function_exists( 'aihr_notice_aihrus_framework' ) ) {
|
|
97 |
if ( ! function_exists( 'aihr_check_php' ) ) {
|
98 |
function aihr_check_php( $file = null, $name = null, $php_min = '5.3.0' ) {
|
99 |
if ( is_null( $file ) ) {
|
100 |
-
aihr_notice_error( __( '`aihr_check_php` requires $file argument' ) );
|
101 |
|
102 |
return false;
|
103 |
}
|
@@ -138,16 +138,16 @@ if ( ! function_exists( 'aihr_notice_php' ) ) {
|
|
138 |
|
139 |
$help_url = esc_url( 'https://aihrus.zendesk.com/entries/30678006' );
|
140 |
|
141 |
-
$text = sprintf( __( 'Plugin "%1$s" has been deactivated as it requires PHP %2$s or newer. You\'re running PHP %4$s. Once corrected, "%1$s" can be activated. <a href="%3$s">More information</a>.' ), $name, AIHR_PHP_VERSION_MIN, $help_url, PHP_VERSION );
|
142 |
|
143 |
aihr_notice_error( $text );
|
144 |
}
|
145 |
}
|
146 |
|
147 |
if ( ! function_exists( 'aihr_check_wp' ) ) {
|
148 |
-
function aihr_check_wp( $file = null, $name = null, $wp_min = '3.6' ) {
|
149 |
if ( is_null( $file ) ) {
|
150 |
-
aihr_notice_error( __( '`aihr_check_wp` requires $file argument' ) );
|
151 |
|
152 |
return false;
|
153 |
}
|
@@ -192,7 +192,7 @@ if ( ! function_exists( 'aihr_notice_wp' ) ) {
|
|
192 |
|
193 |
$help_url = network_admin_url( 'update-core.php' );
|
194 |
|
195 |
-
$text = sprintf( __( 'Plugin "%1$s" has been deactivated as it requires WordPress %2$s or newer. You\'re running WordPress %4$s. Once corrected, "%1$s" can be activated. <a href="%3$s">Update WordPress</a>.' ), $name, AIHR_WP_VERSION_MIN, $help_url, $wp_version );
|
196 |
|
197 |
aihr_notice_error( $text );
|
198 |
}
|
@@ -222,19 +222,19 @@ if ( ! function_exists( 'aihr_notice_version' ) ) {
|
|
222 |
function aihr_notice_version( $required_base, $required_name, $required_slug, $required_version, $item_name ) {
|
223 |
$is_active = is_plugin_active( $required_base );
|
224 |
if ( $is_active )
|
225 |
-
$link = sprintf( __( '<a href="%1$s">update to</a>' ), self_admin_url( 'update-core.php' ) );
|
226 |
else {
|
227 |
$plugins = get_plugins();
|
228 |
if ( empty( $plugins[ $required_base ] ) ) {
|
229 |
$install = esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $required_slug ), 'install-plugin_' . $required_slug ) );
|
230 |
-
$link = sprintf( __( '<a href="%1$s">install</a>' ), $install );
|
231 |
} else {
|
232 |
$activate = esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $required_base ), 'activate-plugin_' . $required_base ) );
|
233 |
-
$link = sprintf( __( '<a href="%1$s">activate</a>' ), $activate );
|
234 |
}
|
235 |
}
|
236 |
|
237 |
-
$text = sprintf( __( 'Plugin "%3$s" has been deactivated. Please %1$s "%4$s" version %2$s or newer before activating "%3$s".' ), $link, $required_version, $item_name, $required_name );
|
238 |
|
239 |
aihr_notice_error( $text );
|
240 |
}
|
@@ -247,21 +247,21 @@ if ( ! function_exists( 'aihr_notice_license' ) ) {
|
|
247 |
else
|
248 |
$link = get_admin_url() . 'edit.php?post_type=' . $post_type . '&page=' . $settings_id;
|
249 |
|
250 |
-
$text = __( '<a href="%1$s">%2$s > Settings</a>, <em>Premium</em> tab, <em>License Key</em> entry' );
|
251 |
|
252 |
$settings_link = sprintf( $text, $link, $free_name );
|
253 |
|
254 |
$link = esc_url( 'https://aihrus.zendesk.com/entries/28745227' );
|
255 |
-
$text = __( '<a href="%s">Where\'s my license key?</a>' );
|
256 |
|
257 |
$faq_link = sprintf( $text, $link );
|
258 |
|
259 |
$link = esc_url( $purchase_url );
|
260 |
-
$text = __( '<a href="%1$s">%2$s</a>' );
|
261 |
|
262 |
$buy_link = sprintf( $text, $link, $item_name );
|
263 |
|
264 |
-
$text = sprintf( __( 'Plugin "%1$s" requires license activation before updating will work. Please activate the license key through %2$s. No license key? See "%3$s" or purchase "%4$s".' ), $item_name, $settings_link, $faq_link, $buy_link );
|
265 |
|
266 |
aihr_notice_error( $text );
|
267 |
}
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
20 |
define( 'AIHR_BASE', __FILE__ );
|
21 |
|
22 |
if ( ! defined( 'AIHR_VERSION' ) )
|
23 |
+
define( 'AIHR_VERSION', '1.0.1' );
|
24 |
|
25 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
26 |
|
27 |
if ( ! function_exists( 'aihr_check_aihrus_framework' ) ) {
|
28 |
function aihr_check_aihrus_framework( $file = null, $name = null, $aihr_min = '1.0.0' ) {
|
29 |
if ( is_null( $file ) ) {
|
30 |
+
aihr_notice_error( __( '`aihr_check_aihrus_framework` requires $file argument', 'testimonials-widget' ) );
|
31 |
|
32 |
return false;
|
33 |
}
|
72 |
}
|
73 |
|
74 |
$help_url = esc_url( 'https://aihrus.zendesk.com/entries/35689458' );
|
75 |
+
$help_link = sprintf( __( '<a href="%1$s">Update plugins</a>. <a href="%2$s">More information</a>.', 'testimonials-widget' ), self_admin_url( 'update-core.php' ), $help_url );
|
76 |
|
77 |
$note = '';
|
78 |
if ( defined( 'AIHR_BASE' ) ) {
|
83 |
$plugin_name = str_replace( '-', ' ', $plugin_name );
|
84 |
$plugin_name = ucwords( $plugin_name );
|
85 |
|
86 |
+
$note = sprintf( esc_html__( 'Plugin "%1$s" is causing the out of date issue.', 'testimonials-widget' ), $plugin_name );
|
87 |
}
|
88 |
|
89 |
$aihr_version = defined( 'AIHR_VERSION' ) ? AIHR_VERSION : '0.0.0';
|
90 |
|
91 |
+
$text = sprintf( esc_html__( 'Plugin "%1$s" has been deactivated as it requires Aihrus Framework %2$s or newer. You\'re running Aihrus Framework %4$s. Once corrected, "%1$s" can be activated. %5$s %3$s', 'testimonials-widget' ), $name, AIHR_VERSION_MIN, $help_link, $aihr_version, $note );
|
92 |
|
93 |
aihr_notice_error( $text );
|
94 |
}
|
97 |
if ( ! function_exists( 'aihr_check_php' ) ) {
|
98 |
function aihr_check_php( $file = null, $name = null, $php_min = '5.3.0' ) {
|
99 |
if ( is_null( $file ) ) {
|
100 |
+
aihr_notice_error( __( '`aihr_check_php` requires $file argument', 'testimonials-widget' ) );
|
101 |
|
102 |
return false;
|
103 |
}
|
138 |
|
139 |
$help_url = esc_url( 'https://aihrus.zendesk.com/entries/30678006' );
|
140 |
|
141 |
+
$text = sprintf( __( 'Plugin "%1$s" has been deactivated as it requires PHP %2$s or newer. You\'re running PHP %4$s. Once corrected, "%1$s" can be activated. <a href="%3$s">More information</a>.', 'testimonials-widget' ), $name, AIHR_PHP_VERSION_MIN, $help_url, PHP_VERSION );
|
142 |
|
143 |
aihr_notice_error( $text );
|
144 |
}
|
145 |
}
|
146 |
|
147 |
if ( ! function_exists( 'aihr_check_wp' ) ) {
|
148 |
+
function aihr_check_wp( $file = null, $name = null, $wp_min = '3.6.0' ) {
|
149 |
if ( is_null( $file ) ) {
|
150 |
+
aihr_notice_error( __( '`aihr_check_wp` requires $file argument', 'testimonials-widget' ) );
|
151 |
|
152 |
return false;
|
153 |
}
|
192 |
|
193 |
$help_url = network_admin_url( 'update-core.php' );
|
194 |
|
195 |
+
$text = sprintf( __( 'Plugin "%1$s" has been deactivated as it requires WordPress %2$s or newer. You\'re running WordPress %4$s. Once corrected, "%1$s" can be activated. <a href="%3$s">Update WordPress</a>.', 'testimonials-widget' ), $name, AIHR_WP_VERSION_MIN, $help_url, $wp_version );
|
196 |
|
197 |
aihr_notice_error( $text );
|
198 |
}
|
222 |
function aihr_notice_version( $required_base, $required_name, $required_slug, $required_version, $item_name ) {
|
223 |
$is_active = is_plugin_active( $required_base );
|
224 |
if ( $is_active )
|
225 |
+
$link = sprintf( __( '<a href="%1$s">update to</a>', 'testimonials-widget' ), self_admin_url( 'update-core.php' ) );
|
226 |
else {
|
227 |
$plugins = get_plugins();
|
228 |
if ( empty( $plugins[ $required_base ] ) ) {
|
229 |
$install = esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $required_slug ), 'install-plugin_' . $required_slug ) );
|
230 |
+
$link = sprintf( __( '<a href="%1$s">install</a>', 'testimonials-widget' ), $install );
|
231 |
} else {
|
232 |
$activate = esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $required_base ), 'activate-plugin_' . $required_base ) );
|
233 |
+
$link = sprintf( __( '<a href="%1$s">activate</a>', 'testimonials-widget' ), $activate );
|
234 |
}
|
235 |
}
|
236 |
|
237 |
+
$text = sprintf( __( 'Plugin "%3$s" has been deactivated. Please %1$s "%4$s" version %2$s or newer before activating "%3$s".', 'testimonials-widget' ), $link, $required_version, $item_name, $required_name );
|
238 |
|
239 |
aihr_notice_error( $text );
|
240 |
}
|
247 |
else
|
248 |
$link = get_admin_url() . 'edit.php?post_type=' . $post_type . '&page=' . $settings_id;
|
249 |
|
250 |
+
$text = __( '<a href="%1$s">%2$s > Settings</a>, <em>Premium</em> tab, <em>License Key</em> entry', 'testimonials-widget' );
|
251 |
|
252 |
$settings_link = sprintf( $text, $link, $free_name );
|
253 |
|
254 |
$link = esc_url( 'https://aihrus.zendesk.com/entries/28745227' );
|
255 |
+
$text = __( '<a href="%s">Where\'s my license key?</a>', 'testimonials-widget' );
|
256 |
|
257 |
$faq_link = sprintf( $text, $link );
|
258 |
|
259 |
$link = esc_url( $purchase_url );
|
260 |
+
$text = __( '<a href="%1$s">%2$s</a>', 'testimonials-widget' );
|
261 |
|
262 |
$buy_link = sprintf( $text, $link, $item_name );
|
263 |
|
264 |
+
$text = sprintf( __( 'Plugin "%1$s" requires license activation before updating will work. Please activate the license key through %2$s. No license key? See "%3$s" or purchase "%4$s".', 'testimonials-widget' ), $item_name, $settings_link, $faq_link, $buy_link );
|
265 |
|
266 |
aihr_notice_error( $text );
|
267 |
}
|
{includes/libraries → lib}/class-redrokk-metabox-class.php
RENAMED
File without changes
|
{includes → lib}/class-testimonials-widget-settings.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -22,7 +22,7 @@
|
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
24 |
|
25 |
-
require_once TW_DIR_LIB . 'aihrus
|
26 |
|
27 |
if ( class_exists( 'Testimonials_Widget_Settings' ) )
|
28 |
return;
|
@@ -35,7 +35,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
35 |
public static $admin_page;
|
36 |
public static $class = __CLASS__;
|
37 |
public static $defaults = array();
|
38 |
-
public static $
|
39 |
public static $plugin_url = 'http://wordpress.org/plugins/testimonials-widget/';
|
40 |
public static $sections = array();
|
41 |
public static $settings = array();
|
@@ -99,7 +99,10 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
99 |
public static function init() {
|
100 |
load_plugin_textdomain( 'testimonials-widget', false, '/testimonials-widget/languages/' );
|
101 |
|
102 |
-
|
|
|
|
|
|
|
103 |
}
|
104 |
|
105 |
|
@@ -231,14 +234,14 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
231 |
);
|
232 |
|
233 |
self::$settings['item_reviewed'] = array(
|
234 |
-
'title' => esc_html__( '
|
235 |
'desc' => esc_html__( 'Name of thing being referenced in testimonials', 'testimonials-widget' ),
|
236 |
'std' => get_option( 'blogname' ),
|
237 |
'widget' => 0,
|
238 |
);
|
239 |
|
240 |
self::$settings['item_reviewed_url'] = array(
|
241 |
-
'title' => esc_html__( '
|
242 |
'desc' => esc_html__( 'URL of thing being referenced in testimonials', 'testimonials-widget' ),
|
243 |
'std' => network_site_url(),
|
244 |
'validate' => 'url',
|
@@ -321,14 +324,6 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
321 |
'validate' => 'is_true',
|
322 |
);
|
323 |
|
324 |
-
self::$settings['exclude_bxslider_css'] = array(
|
325 |
-
'title' => esc_html__( 'Exclude bxSlider CSS?', 'testimonials-widget' ),
|
326 |
-
'desc' => esc_html__( 'For a bare-bones, unthemed slider.', 'testimonials-widget' ),
|
327 |
-
'type' => 'checkbox',
|
328 |
-
'validate' => 'is_true',
|
329 |
-
'widget' => 0,
|
330 |
-
);
|
331 |
-
|
332 |
self::$settings['target'] = array(
|
333 |
'title' => esc_html__( 'URL Target', 'testimonials-widget' ),
|
334 |
'desc' => esc_html__( 'Add target to all URLs; leave blank if none', 'testimonials-widget' ),
|
@@ -350,7 +345,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
350 |
);
|
351 |
|
352 |
self::$settings['do_shortcode'] = array(
|
353 |
-
'title' => esc_html__( '
|
354 |
'desc' => esc_html__( 'If unchecked, shortcodes are stripped.', 'testimonials-widget' ),
|
355 |
'type' => 'checkbox',
|
356 |
'validate' => 'is_true',
|
@@ -503,7 +498,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
503 |
'title' => esc_html__( 'Archive Page URL', 'testimonials-widget' ),
|
504 |
'desc' => sprintf( $desc, $site_url ),
|
505 |
'std' => 'testimonials-archive',
|
506 |
-
'validate' => '
|
507 |
'widget' => 0,
|
508 |
);
|
509 |
|
@@ -514,7 +509,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
514 |
'title' => esc_html__( 'Testimonial Page URL', 'testimonials-widget' ),
|
515 |
'desc' => $desc,
|
516 |
'std' => 'testimonial',
|
517 |
-
'validate' => '
|
518 |
'widget' => 0,
|
519 |
);
|
520 |
|
@@ -553,7 +548,6 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
553 |
'std' => 0,
|
554 |
),
|
555 |
'std' => 1,
|
556 |
-
'widget' => 0,
|
557 |
);
|
558 |
|
559 |
self::$settings['disable_animation'] = array(
|
@@ -602,6 +596,18 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
602 |
'validate' => 'min1',
|
603 |
);
|
604 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
self::$settings['include_ie7_css'] = array(
|
606 |
'section' => 'reset',
|
607 |
'title' => esc_html__( 'Include IE7 CSS?', 'testimonials-widget' ),
|
@@ -612,7 +618,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
612 |
'version' => '2.13.6',
|
613 |
'std' => 1,
|
614 |
),
|
615 |
-
'widget' =>
|
616 |
);
|
617 |
|
618 |
self::$settings['use_quote_tag'] = array(
|
@@ -637,7 +643,6 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
637 |
'version' => '2.6.4',
|
638 |
'std' => 1,
|
639 |
),
|
640 |
-
'std' => 1,
|
641 |
);
|
642 |
|
643 |
self::$settings['reset_expand_end'] = array(
|
@@ -655,10 +660,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
655 |
public static function get_defaults( $mode = null, $old_version = null ) {
|
656 |
$old_version = tw_get_option( 'version' );
|
657 |
|
658 |
-
|
659 |
-
$defaults = apply_filters( 'testimonials_widget_settings_defaults', $defaults );
|
660 |
-
|
661 |
-
return $defaults;
|
662 |
}
|
663 |
|
664 |
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
24 |
|
25 |
+
require_once TW_DIR_LIB . '/aihrus/class-aihrus-settings.php';
|
26 |
|
27 |
if ( class_exists( 'Testimonials_Widget_Settings' ) )
|
28 |
return;
|
35 |
public static $admin_page;
|
36 |
public static $class = __CLASS__;
|
37 |
public static $defaults = array();
|
38 |
+
public static $plugin_path;
|
39 |
public static $plugin_url = 'http://wordpress.org/plugins/testimonials-widget/';
|
40 |
public static $sections = array();
|
41 |
public static $settings = array();
|
99 |
public static function init() {
|
100 |
load_plugin_textdomain( 'testimonials-widget', false, '/testimonials-widget/languages/' );
|
101 |
|
102 |
+
$plugin_path = plugins_url( '', dirname( __FILE__ ) );
|
103 |
+
$plugin_path = Testimonials_Widget::strip_protocol( $plugin_path );
|
104 |
+
|
105 |
+
self::$plugin_path = $plugin_path;
|
106 |
}
|
107 |
|
108 |
|
234 |
);
|
235 |
|
236 |
self::$settings['item_reviewed'] = array(
|
237 |
+
'title' => esc_html__( 'Reviewed Item?', 'testimonials-widget' ),
|
238 |
'desc' => esc_html__( 'Name of thing being referenced in testimonials', 'testimonials-widget' ),
|
239 |
'std' => get_option( 'blogname' ),
|
240 |
'widget' => 0,
|
241 |
);
|
242 |
|
243 |
self::$settings['item_reviewed_url'] = array(
|
244 |
+
'title' => esc_html__( 'Reviewed Item URL?', 'testimonials-widget' ),
|
245 |
'desc' => esc_html__( 'URL of thing being referenced in testimonials', 'testimonials-widget' ),
|
246 |
'std' => network_site_url(),
|
247 |
'validate' => 'url',
|
324 |
'validate' => 'is_true',
|
325 |
);
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
self::$settings['target'] = array(
|
328 |
'title' => esc_html__( 'URL Target', 'testimonials-widget' ),
|
329 |
'desc' => esc_html__( 'Add target to all URLs; leave blank if none', 'testimonials-widget' ),
|
345 |
);
|
346 |
|
347 |
self::$settings['do_shortcode'] = array(
|
348 |
+
'title' => esc_html__( 'Do [shortcodes]?', 'testimonials-widget' ),
|
349 |
'desc' => esc_html__( 'If unchecked, shortcodes are stripped.', 'testimonials-widget' ),
|
350 |
'type' => 'checkbox',
|
351 |
'validate' => 'is_true',
|
498 |
'title' => esc_html__( 'Archive Page URL', 'testimonials-widget' ),
|
499 |
'desc' => sprintf( $desc, $site_url ),
|
500 |
'std' => 'testimonials-archive',
|
501 |
+
'validate' => 'sanitize_title',
|
502 |
'widget' => 0,
|
503 |
);
|
504 |
|
509 |
'title' => esc_html__( 'Testimonial Page URL', 'testimonials-widget' ),
|
510 |
'desc' => $desc,
|
511 |
'std' => 'testimonial',
|
512 |
+
'validate' => 'sanitize_title',
|
513 |
'widget' => 0,
|
514 |
);
|
515 |
|
548 |
'std' => 0,
|
549 |
),
|
550 |
'std' => 1,
|
|
|
551 |
);
|
552 |
|
553 |
self::$settings['disable_animation'] = array(
|
596 |
'validate' => 'min1',
|
597 |
);
|
598 |
|
599 |
+
self::$settings['force_css_loading'] = array(
|
600 |
+
'section' => 'reset',
|
601 |
+
'title' => esc_html__( 'Always Load CSS?', 'testimonials-widget' ),
|
602 |
+
'desc' => esc_html__( 'Pre 2.14.0, Testimonials\' CSS was always loaded, whether needed or not', 'testimonials-widget' ),
|
603 |
+
'type' => 'checkbox',
|
604 |
+
'validate' => 'is_true',
|
605 |
+
'backwards' => array(
|
606 |
+
'version' => '2.14.0',
|
607 |
+
'std' => 1,
|
608 |
+
),
|
609 |
+
);
|
610 |
+
|
611 |
self::$settings['include_ie7_css'] = array(
|
612 |
'section' => 'reset',
|
613 |
'title' => esc_html__( 'Include IE7 CSS?', 'testimonials-widget' ),
|
618 |
'version' => '2.13.6',
|
619 |
'std' => 1,
|
620 |
),
|
621 |
+
'widget' => 1,
|
622 |
);
|
623 |
|
624 |
self::$settings['use_quote_tag'] = array(
|
643 |
'version' => '2.6.4',
|
644 |
'std' => 1,
|
645 |
),
|
|
|
646 |
);
|
647 |
|
648 |
self::$settings['reset_expand_end'] = array(
|
660 |
public static function get_defaults( $mode = null, $old_version = null ) {
|
661 |
$old_version = tw_get_option( 'version' );
|
662 |
|
663 |
+
return parent::get_defaults( $mode, $old_version );
|
|
|
|
|
|
|
664 |
}
|
665 |
|
666 |
|
{includes → lib}/class-testimonials-widget-widget.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -16,7 +16,7 @@
|
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
-
require_once TW_DIR_LIB . 'aihrus
|
20 |
|
21 |
if ( class_exists( 'Testimonials_Widget_Widget' ) )
|
22 |
return;
|
@@ -65,9 +65,15 @@ class Testimonials_Widget_Widget extends Aihrus_Widget {
|
|
65 |
if ( empty( $instance ) ) {
|
66 |
$do_number = false;
|
67 |
|
68 |
-
$
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
} elseif ( ! empty( $instance['resetted'] ) ) {
|
72 |
if ( empty( $instance['char_limit'] ) )
|
73 |
$instance['char_limit'] = 500;
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
+
require_once TW_DIR_LIB . '/aihrus/class-aihrus-widget.php';
|
20 |
|
21 |
if ( class_exists( 'Testimonials_Widget_Widget' ) )
|
22 |
return;
|
65 |
if ( empty( $instance ) ) {
|
66 |
$do_number = false;
|
67 |
|
68 |
+
if ( empty( $defaults['char_limit'] ) )
|
69 |
+
$defaults['char_limit'] = 500;
|
70 |
+
|
71 |
+
if ( empty( $defaults['random'] ) )
|
72 |
+
$defaults['random'] = 1;
|
73 |
+
|
74 |
+
$defaults['enable_schema'] = 0;
|
75 |
+
|
76 |
+
$instance = array();
|
77 |
} elseif ( ! empty( $instance['resetted'] ) ) {
|
78 |
if ( empty( $instance['char_limit'] ) )
|
79 |
$instance['char_limit'] = 500;
|
{includes → lib}/requirements.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -16,7 +16,7 @@
|
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
-
require_once TW_DIR_LIB . 'aihrus
|
20 |
|
21 |
|
22 |
function tw_requirements_check() {
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
+
require_once TW_DIR_LIB . '/aihrus/requirements.php';
|
20 |
|
21 |
|
22 |
function tw_requirements_check() {
|
{assets/images → media}/michael-cannon-red-square-300x2251.jpg
RENAMED
File without changes
|
phpcs.ruleset.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="Aihrus">
|
3 |
+
<description>
|
4 |
+
Custom phpcs rules to check for Aihrus' WordPress projects
|
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="Generic">
|
11 |
+
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
12 |
+
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
13 |
+
<exclude name="Generic.Files.LineLength.MaxExceeded" />
|
14 |
+
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
|
15 |
+
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
|
16 |
+
<exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
|
17 |
+
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
|
18 |
+
<exclude name="Generic.PHP.UpperCaseConstant.Found" />
|
19 |
+
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
|
20 |
+
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
21 |
+
</rule>
|
22 |
+
|
23 |
+
<rule ref="Squiz.PHP.CommentedOutCode"/>
|
24 |
+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
25 |
+
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
|
26 |
+
</rule>
|
27 |
+
|
28 |
+
<rule ref="WordPress">
|
29 |
+
<exclude name="WordPress.XSS.EscapeOutput" />
|
30 |
+
</rule>
|
31 |
+
</ruleset>
|
phpmd.ruleset.xml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<!--
|
13 |
+
<rule ref="rulesets/codesize.xml" />
|
14 |
+
-->
|
15 |
+
<rule ref="rulesets/controversial.xml/Superglobals" />
|
16 |
+
<rule ref="rulesets/design.xml" />
|
17 |
+
<rule ref="rulesets/naming.xml">
|
18 |
+
<exclude name="ShortVariable" />
|
19 |
+
</rule>
|
20 |
+
<rule ref="rulesets/unusedcode.xml" />
|
21 |
+
</ruleset>
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://aihr.us/about-aihrus/donate/
|
|
5 |
Tags: client, customer, portfolio, quotations, quote, quotes, random, recommendation, reference, review, reviews, testimonial, testimonials, testimony, wpml
|
6 |
Requires at least: 3.6
|
7 |
Tested up to: 3.9.0
|
8 |
-
Stable tag: 2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -16,9 +16,8 @@ Testimonials by Aihrus lets you randomly slide or list selected portfolios, quot
|
|
16 |
|
17 |
Testimonials [by Aihrus](http://aihr.us/about-aihrus/) lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site. You can insert Testimonials content via shortcode, theme functions, or widgets with category and tag selections and having multiple display options such as random or specific ordering. Further, [Review schema](http://schema.org/Review) for improved search engine results is built-in.
|
18 |
|
19 |
-
[youtube
|
20 |
-
|
21 |
-
**[Video introduction](https://www.youtube.com/watch?v=bhUhuQ-2m8s)**
|
22 |
|
23 |
**View a [Live Testimonials Demo](http://aihr.us/good-work-deserves-good-words-testimonials-examples/)**
|
24 |
|
@@ -73,7 +72,6 @@ The single testimonial view supports image, source, title, location, email, comp
|
|
73 |
= Testimonials Migration Helpers =
|
74 |
* Testimonials Widget pre 2.0.0 - Upgrading is automatic
|
75 |
* [GC Testimonials](http://wordpress.org/plugins/gc-testimonials-to-testimonials/)
|
76 |
-
* [Testimonials by WooThemes](http://wordpress.org/plugins/wootheme-testimonials-to-testimonials/)
|
77 |
|
78 |
= Testimonials Premium =
|
79 |
|
@@ -142,16 +140,15 @@ Testimonials Premium adds onto the best WordPress testimonials plugin there is,
|
|
142 |
* Respects meta capabilities
|
143 |
* Rotation JavaScript in footer than body
|
144 |
* Settings page contextual help
|
145 |
-
* Shortcode helpers on category and tag admin screens
|
146 |
* Shortcodes allowed inside of testimonials content
|
147 |
* Supports [WP-PageNavi](http://wordpress.org/extend/plugins/wp-pagenavi/)
|
148 |
* Testimonial content supports HTML
|
149 |
* Testimonial, email, and URL fields are clickable – URL requires `http://` or `https://` prefix
|
|
|
150 |
* Testimonials output is completely customizable via filters
|
151 |
* Testimonials support styling based upon CSS classes for category, tags and post id
|
152 |
-
* Testimonials widget displays static and rotating testimonials
|
153 |
-
* Unique CSS class per widget
|
154 |
* URLs can be opened in new windows
|
|
|
155 |
* WordPress Multilingual enabled [WPML](http://wpml.org/)
|
156 |
|
157 |
= Shortcode Examples =
|
@@ -171,7 +168,8 @@ Testimonials Premium adds onto the best WordPress testimonials plugin there is,
|
|
171 |
|
172 |
**[[testimonialswidget_widget]]**
|
173 |
|
174 |
-
* `[[testimonialswidget_widget category=product order=asc]]` - Show rotating testimonials, of the product category, lowest post ids first
|
|
|
175 |
* `[[testimonialswidget_widget tags=sometag random=true]]` - Show rotating, random testimonials having tag "sometag"
|
176 |
|
177 |
= Shortcode and Widget Options =
|
@@ -184,9 +182,9 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
184 |
|
185 |
* Enable Review Schema? – Adds HTML tag markup per the [Review schema](http://schema.org/Review) to testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results.
|
186 |
* `enable_schema` - default true; enable_schema=false
|
187 |
-
*
|
188 |
* `item_reviewed` - default "Site Title"
|
189 |
-
*
|
190 |
* `item_reviewed_url` - default `network_site_url();`
|
191 |
* Hide built-in quotes? - Remove open and close quote span tags surrounding testimonial content
|
192 |
* `disable_quotes` - default false; disable_quotes=true
|
@@ -212,17 +210,15 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
212 |
* `hide_company` - default show; hide_company=true
|
213 |
* Hide URL?
|
214 |
* `hide_url` - default show; hide_url=true
|
215 |
-
* Exclude bxSlider CSS? - For a bare-bones, unthemed slider.
|
216 |
-
* `exclude_bxslider_css` - default show; exclude_bxslider_css=true
|
217 |
* URL Target - Add target to all URLs; leave blank if none
|
218 |
* `target` - default none; target=_new
|
219 |
-
* Enable Paging
|
220 |
* `paging` - default true [true|before|after|false]; paging=false
|
221 |
* `true` – display paging before and after testimonial entries
|
222 |
* `before` – display paging only before testimonial entries
|
223 |
* `after` – display paging only after testimonial entries
|
224 |
* Widget - Not functional
|
225 |
-
*
|
226 |
* `do_shortcode` - default false; do_shortcode=true
|
227 |
|
228 |
**Selection**
|
@@ -304,18 +300,18 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
304 |
* `min_height` - default none; min_height=100
|
305 |
* Maximum Height - Set for maximum display height, in pixels
|
306 |
* `max_height` - default none; max_height=250
|
|
|
307 |
* Include IE7 CSS? - IE7 specific CSS moved to separate CSS file in version 2.13.6.
|
308 |
* Use `<q>` tag? – Pre 2.11.0. Not HTML5 compliant
|
309 |
* `use_quote_tag` - default none; use_quote_tag=true
|
310 |
-
* Remove `.hentry` CSS? – Some themes use class `.hentry` in a manner that breaks Testimonials' CSS
|
311 |
-
* `remove_hentry` - default
|
312 |
|
313 |
|
314 |
== Installation ==
|
315 |
|
316 |
= Requirements =
|
317 |
|
318 |
-
* [jQuery 1.10+](https://aihrus.zendesk.com/entries/23693363)
|
319 |
* PHP 5.3+ [Read notice](https://aihrus.zendesk.com/entries/30678006) – Since 2.16.0
|
320 |
|
321 |
= Install Methods =
|
@@ -361,17 +357,12 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
361 |
= Most Common Issues =
|
362 |
|
363 |
* Got `Parse error: syntax error, unexpected T_STATIC, expecting ')'`? Read [Most Aihrus Plugins Require PHP 5.3+](https://aihrus.zendesk.com/entries/30678006) for the fixes.
|
364 |
-
* [
|
365 |
* [Change or debug CSS](https://aihrus.zendesk.com/entries/24910733) AKA "What's up with these quotes?"
|
366 |
* [Customize bxSlider](http://bxslider.com/examples)
|
367 |
-
* [Debug common theme and plugin conflicts](https://aihrus.zendesk.com/entries/25119302)
|
368 |
* [How do I change my widget's rotation speed or other options?](https://aihrus.zendesk.com/entries/27714083)
|
369 |
-
* [How do I create a testimonial record?](https://aihrus.zendesk.com/entries/30602506)
|
370 |
-
* [How to change testimonials layout](https://aihrus.zendesk.com/entries/38055707)
|
371 |
-
* [My options don't work, no matter what I do.](https://aihrus.zendesk.com/entries/30746533)
|
372 |
* [Pagination is broken](https://aihrus.zendesk.com/entries/23693513)
|
373 |
* [Test Review schema output](http://www.google.com/webmasters/tools/richsnippets)
|
374 |
-
* [Widgets don't rotate](https://aihrus.zendesk.com/entries/23693363)
|
375 |
|
376 |
= Still Stuck or Want Something Done? Get Support! =
|
377 |
|
@@ -404,7 +395,6 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
404 |
18. Dashboard > Right Now "Testimonials" count
|
405 |
19. Using Review and AggregateRating schema data structures
|
406 |
20. Testimonials Shortcode Examples page
|
407 |
-
21. Shortcode helpers on category and tag admin screens
|
408 |
|
409 |
[gallery]
|
410 |
|
@@ -416,24 +406,6 @@ See [Changelog](https://github.com/michael-cannon/testimonials-widget/blob/maste
|
|
416 |
|
417 |
== Upgrade Notice ==
|
418 |
|
419 |
-
= 2.18.3 =
|
420 |
-
|
421 |
-
* CSS class `.hide` renamed `.display-none`
|
422 |
-
* This is the last version supporting pre-bxSlider options
|
423 |
-
|
424 |
-
= 2.18.2 =
|
425 |
-
|
426 |
-
* CSS class `.display-none` renamed `.hide`
|
427 |
-
|
428 |
-
= 2.18.1 =
|
429 |
-
|
430 |
-
* CSS is back to being always loaded in the header
|
431 |
-
* Removed "Use bxSlider?" and "Include IE7 CSS" from widget options
|
432 |
-
|
433 |
-
= 2.18.0 =
|
434 |
-
|
435 |
-
* `remove_hentry` is now true by default
|
436 |
-
|
437 |
= 2.16.0 =
|
438 |
|
439 |
* [Requires PHP 5.3+](https://aihrus.zendesk.com/entries/30678006)
|
@@ -540,11 +512,6 @@ Version 2.0.0 of Testimonials is a complete rewrite based upon a composite of id
|
|
540 |
Prior to version 2.0.0, this plugin was a fork of [Quotes Collection](http://srinig.com/wordpress/plugins/quotes-collection/) by [Srini G](http://wordpress.org/support/profile/SriniG) with additional contributions from [j0hnsmith](http://wordpress.org/support/profile/j0hnsmith), [ChrisCree](http://wordpress.org/support/profile/ChrisCree) and [comprock](http://wordpress.org/support/profile/comprock).
|
541 |
|
542 |
|
543 |
-
== Conflicts ==
|
544 |
-
|
545 |
-
* [ReOrder Post Within Categories](http://wordpress.org/plugins/reorder-post-within-categories/) – Uses custom ordering table
|
546 |
-
|
547 |
-
|
548 |
== Localization ==
|
549 |
|
550 |
* Dutch by Bjorn Robijns
|
5 |
Tags: client, customer, portfolio, quotations, quote, quotes, random, recommendation, reference, review, reviews, testimonial, testimonials, testimony, wpml
|
6 |
Requires at least: 3.6
|
7 |
Tested up to: 3.9.0
|
8 |
+
Stable tag: 2.17.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
16 |
|
17 |
Testimonials [by Aihrus](http://aihr.us/about-aihrus/) lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site. You can insert Testimonials content via shortcode, theme functions, or widgets with category and tag selections and having multiple display options such as random or specific ordering. Further, [Review schema](http://schema.org/Review) for improved search engine results is built-in.
|
18 |
|
19 |
+
[youtube http://www.youtube.com/watch?v=bhUhuQ-2m8s]
|
20 |
+
**[Video introduction](http://youtu.be/bhUhuQ-2m8s)**
|
|
|
21 |
|
22 |
**View a [Live Testimonials Demo](http://aihr.us/good-work-deserves-good-words-testimonials-examples/)**
|
23 |
|
72 |
= Testimonials Migration Helpers =
|
73 |
* Testimonials Widget pre 2.0.0 - Upgrading is automatic
|
74 |
* [GC Testimonials](http://wordpress.org/plugins/gc-testimonials-to-testimonials/)
|
|
|
75 |
|
76 |
= Testimonials Premium =
|
77 |
|
140 |
* Respects meta capabilities
|
141 |
* Rotation JavaScript in footer than body
|
142 |
* Settings page contextual help
|
|
|
143 |
* Shortcodes allowed inside of testimonials content
|
144 |
* Supports [WP-PageNavi](http://wordpress.org/extend/plugins/wp-pagenavi/)
|
145 |
* Testimonial content supports HTML
|
146 |
* Testimonial, email, and URL fields are clickable – URL requires `http://` or `https://` prefix
|
147 |
+
* Testimonials widget displays static and rotating testimonials
|
148 |
* Testimonials output is completely customizable via filters
|
149 |
* Testimonials support styling based upon CSS classes for category, tags and post id
|
|
|
|
|
150 |
* URLs can be opened in new windows
|
151 |
+
* Unique CSS class per widget
|
152 |
* WordPress Multilingual enabled [WPML](http://wpml.org/)
|
153 |
|
154 |
= Shortcode Examples =
|
168 |
|
169 |
**[[testimonialswidget_widget]]**
|
170 |
|
171 |
+
* `[[testimonialswidget_widget category=product order=asc height=300]]` - Show rotating testimonials, in a fixed height container, of the product category, lowest post ids first
|
172 |
+
* `[[testimonialswidget_widget min_height=250 max_height=500]]` - Show rotating testimonials in a box no smaller or bigger than 250 to 500 pixels in height
|
173 |
* `[[testimonialswidget_widget tags=sometag random=true]]` - Show rotating, random testimonials having tag "sometag"
|
174 |
|
175 |
= Shortcode and Widget Options =
|
182 |
|
183 |
* Enable Review Schema? – Adds HTML tag markup per the [Review schema](http://schema.org/Review) to testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely on this markup to improve the display of search results.
|
184 |
* `enable_schema` - default true; enable_schema=false
|
185 |
+
* Reviewed Item? - Name of thing being referenced in testimonials
|
186 |
* `item_reviewed` - default "Site Title"
|
187 |
+
* Reviewed Item URL? - URL of thing being referenced in testimonials
|
188 |
* `item_reviewed_url` - default `network_site_url();`
|
189 |
* Hide built-in quotes? - Remove open and close quote span tags surrounding testimonial content
|
190 |
* `disable_quotes` - default false; disable_quotes=true
|
210 |
* `hide_company` - default show; hide_company=true
|
211 |
* Hide URL?
|
212 |
* `hide_url` - default show; hide_url=true
|
|
|
|
|
213 |
* URL Target - Add target to all URLs; leave blank if none
|
214 |
* `target` - default none; target=_new
|
215 |
+
* Enable Paging - for [[testimonialswidget_list]]
|
216 |
* `paging` - default true [true|before|after|false]; paging=false
|
217 |
* `true` – display paging before and after testimonial entries
|
218 |
* `before` – display paging only before testimonial entries
|
219 |
* `after` – display paging only after testimonial entries
|
220 |
* Widget - Not functional
|
221 |
+
* Do [shortcodes] - If unchecked, shortcodes are stripped.
|
222 |
* `do_shortcode` - default false; do_shortcode=true
|
223 |
|
224 |
**Selection**
|
300 |
* `min_height` - default none; min_height=100
|
301 |
* Maximum Height - Set for maximum display height, in pixels
|
302 |
* `max_height` - default none; max_height=250
|
303 |
+
* Always Load CSS? - Pre 2.14.0. Testimonials' CSS was always loaded, whether needed or not
|
304 |
* Include IE7 CSS? - IE7 specific CSS moved to separate CSS file in version 2.13.6.
|
305 |
* Use `<q>` tag? – Pre 2.11.0. Not HTML5 compliant
|
306 |
* `use_quote_tag` - default none; use_quote_tag=true
|
307 |
+
* Remove `.hentry` CSS? – Some themes use class `.hentry` in a manner that breaks Testimonials' CSS
|
308 |
+
* `remove_hentry` - default none; remove_hentry=true
|
309 |
|
310 |
|
311 |
== Installation ==
|
312 |
|
313 |
= Requirements =
|
314 |
|
|
|
315 |
* PHP 5.3+ [Read notice](https://aihrus.zendesk.com/entries/30678006) – Since 2.16.0
|
316 |
|
317 |
= Install Methods =
|
357 |
= Most Common Issues =
|
358 |
|
359 |
* Got `Parse error: syntax error, unexpected T_STATIC, expecting ')'`? Read [Most Aihrus Plugins Require PHP 5.3+](https://aihrus.zendesk.com/entries/30678006) for the fixes.
|
360 |
+
* [Debug common theme and plugin conflicts](https://aihrus.zendesk.com/entries/25119302)
|
361 |
* [Change or debug CSS](https://aihrus.zendesk.com/entries/24910733) AKA "What's up with these quotes?"
|
362 |
* [Customize bxSlider](http://bxslider.com/examples)
|
|
|
363 |
* [How do I change my widget's rotation speed or other options?](https://aihrus.zendesk.com/entries/27714083)
|
|
|
|
|
|
|
364 |
* [Pagination is broken](https://aihrus.zendesk.com/entries/23693513)
|
365 |
* [Test Review schema output](http://www.google.com/webmasters/tools/richsnippets)
|
|
|
366 |
|
367 |
= Still Stuck or Want Something Done? Get Support! =
|
368 |
|
395 |
18. Dashboard > Right Now "Testimonials" count
|
396 |
19. Using Review and AggregateRating schema data structures
|
397 |
20. Testimonials Shortcode Examples page
|
|
|
398 |
|
399 |
[gallery]
|
400 |
|
406 |
|
407 |
== Upgrade Notice ==
|
408 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
= 2.16.0 =
|
410 |
|
411 |
* [Requires PHP 5.3+](https://aihrus.zendesk.com/entries/30678006)
|
512 |
Prior to version 2.0.0, this plugin was a fork of [Quotes Collection](http://srinig.com/wordpress/plugins/quotes-collection/) by [Srini G](http://wordpress.org/support/profile/SriniG) with additional contributions from [j0hnsmith](http://wordpress.org/support/profile/j0hnsmith), [ChrisCree](http://wordpress.org/support/profile/ChrisCree) and [comprock](http://wordpress.org/support/profile/comprock).
|
513 |
|
514 |
|
|
|
|
|
|
|
|
|
|
|
515 |
== Localization ==
|
516 |
|
517 |
* Dutch by Bjorn Robijns
|
testimonials-widget-ie7.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*csslint star-property-hack: false*/
|
2 |
+
.testimonials-widget-testimonial .open-quote {
|
3 |
+
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '“' );
|
4 |
+
}
|
5 |
+
|
6 |
+
.testimonials-widget-testimonial .close-quote {
|
7 |
+
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '”' );
|
8 |
+
}
|
9 |
+
|
10 |
+
.testimonials-widget-testimonial .join-title,
|
11 |
+
.testimonials-widget-testimonial .join-location,
|
12 |
+
.testimonials-widget-testimonial .join {
|
13 |
+
/* section between source and company information */
|
14 |
+
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ', ' );
|
15 |
+
}
|
assets/css/testimonials-widget.css → testimonials-widget.css
RENAMED
@@ -4,16 +4,6 @@
|
|
4 |
.testimonials-widget-testimonial {
|
5 |
}
|
6 |
|
7 |
-
.testimonials-widget-testimonials .active {
|
8 |
-
/* active testimonials */
|
9 |
-
display: block;
|
10 |
-
}
|
11 |
-
|
12 |
-
.testimonials-widget-testimonials .display-none {
|
13 |
-
/* staged testimonials */
|
14 |
-
display: none;
|
15 |
-
}
|
16 |
-
|
17 |
.testimonials-widget-testimonials .paging {
|
18 |
clear: both;
|
19 |
font-weight: 700;
|
4 |
.testimonials-widget-testimonial {
|
5 |
}
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
.testimonials-widget-testimonials .paging {
|
8 |
clear: both;
|
9 |
font-weight: 700;
|
testimonials-widget.php
CHANGED
@@ -3,17 +3,15 @@
|
|
3 |
* Plugin Name: Testimonials by Aihrus
|
4 |
* Plugin URI: http://wordpress.org/plugins/testimonials-widget/
|
5 |
* Description: Testimonials by Aihrus lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site.
|
6 |
-
* Version: 2.
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/resume/
|
9 |
* License: GPLv2 or later
|
10 |
-
* Text Domain: testimonials-widget
|
11 |
-
* Domain Path: /languages
|
12 |
*/
|
13 |
|
14 |
|
15 |
/**
|
16 |
-
* Copyright
|
17 |
* This program is free software; you can redistribute it and/or modify
|
18 |
* it under the terms of the GNU General Public License, version 2, as
|
19 |
* published by the Free Software Foundation.
|
@@ -26,46 +24,2036 @@
|
|
26 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
define( 'TW_AIHR_VERSION', '1.0.4RC2' );
|
35 |
|
36 |
-
if ( !
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
if (
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
if (
|
43 |
-
|
|
|
|
|
|
|
44 |
|
45 |
-
if (
|
46 |
-
|
47 |
|
48 |
-
if (
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
-
|
52 |
-
define( 'TW_PREMIUM_LINK', '<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Buy Premium</a>' );
|
53 |
|
54 |
-
if ( !
|
55 |
-
|
|
|
|
|
|
|
56 |
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
|
59 |
-
|
|
|
60 |
|
61 |
-
$tw_activated = true;
|
62 |
-
if ( ! tw_requirements_check() ) {
|
63 |
-
$tw_activated = false;
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
-
|
|
|
|
|
|
|
|
|
69 |
|
70 |
add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
71 |
|
@@ -76,41 +2064,31 @@ add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
|
76 |
* @SuppressWarnings(PHPMD.LongVariable)
|
77 |
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
78 |
*/
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$Testimonials_Widget_Settings = new Testimonials_Widget_Settings();
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
}
|
90 |
}
|
91 |
}
|
92 |
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
register_uninstall_hook( __FILE__, array( 'Testimonials_Widget', 'uninstall' ) );
|
97 |
-
|
98 |
-
|
99 |
-
if ( ! function_exists( 'testimonialswidget_list' ) ) {
|
100 |
-
function testimonialswidget_list( $atts = array() ) {
|
101 |
-
global $Testimonials_Widget;
|
102 |
|
103 |
-
|
104 |
-
}
|
105 |
}
|
106 |
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
global $Testimonials_Widget;
|
111 |
|
112 |
-
|
113 |
-
}
|
114 |
}
|
115 |
|
|
|
116 |
?>
|
3 |
* Plugin Name: Testimonials by Aihrus
|
4 |
* Plugin URI: http://wordpress.org/plugins/testimonials-widget/
|
5 |
* Description: Testimonials by Aihrus lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site.
|
6 |
+
* Version: 2.17.2
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/resume/
|
9 |
* License: GPLv2 or later
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
|
13 |
/**
|
14 |
+
* Copyright 2013 Michael Cannon (email: mc@aihr.us)
|
15 |
* This program is free software; you can redistribute it and/or modify
|
16 |
* it under the terms of the GNU General Public License, version 2, as
|
17 |
* published by the Free Software Foundation.
|
24 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
27 |
+
define( 'TW_AIHR_VERSION', '1.0.1' );
|
28 |
+
define( 'TW_BASE', plugin_basename( __FILE__ ) );
|
29 |
+
define( 'TW_DIR', plugin_dir_path( __FILE__ ) );
|
30 |
+
define( 'TW_DIR_LIB', TW_DIR . '/lib' );
|
31 |
+
define( 'TW_NAME', 'Testimonials by Aihrus' );
|
32 |
+
define( 'TW_PREMIUM_LINK', '<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Purchase Testimonials Premium</a>' );
|
33 |
+
define( 'TW_VERSION', '2.17.2' );
|
34 |
|
35 |
+
require_once TW_DIR_LIB . '/requirements.php';
|
|
|
36 |
|
37 |
+
if ( ! tw_requirements_check() ) {
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
|
41 |
+
require_once TW_DIR_LIB . '/aihrus/class-aihrus-common.php';
|
42 |
+
require_once TW_DIR_LIB . '/class-redrokk-metabox-class.php';
|
43 |
+
require_once TW_DIR_LIB . '/class-testimonials-widget-settings.php';
|
44 |
+
require_once TW_DIR_LIB . '/class-testimonials-widget-widget.php';
|
45 |
+
|
46 |
+
|
47 |
+
class Testimonials_Widget extends Aihrus_Common {
|
48 |
+
const BASE = TW_BASE;
|
49 |
+
const ID = 'testimonials-widget-testimonials';
|
50 |
+
const SLUG = 'tw_';
|
51 |
+
const VERSION = TW_VERSION;
|
52 |
+
|
53 |
+
const OLD_NAME = 'testimonialswidget';
|
54 |
+
const PT = 'testimonials-widget';
|
55 |
+
|
56 |
+
private static $found_posts = 0;
|
57 |
+
private static $max_num_pages = 0;
|
58 |
+
private static $post_count = 0;
|
59 |
+
private static $wp_query;
|
60 |
+
|
61 |
+
public static $class = __CLASS__;
|
62 |
+
public static $cpt_category = '';
|
63 |
+
public static $cpt_tags = '';
|
64 |
+
public static $css = array();
|
65 |
+
public static $css_called = false;
|
66 |
+
public static $instance_number = 0;
|
67 |
+
public static $instance_widget = 0;
|
68 |
+
public static $menu_shortcodes;
|
69 |
+
public static $not_found = false;
|
70 |
+
public static $notice_key;
|
71 |
+
public static $scripts = array();
|
72 |
+
public static $scripts_called = false;
|
73 |
+
public static $settings_link = '';
|
74 |
+
public static $tag_close_quote = '<span class="close-quote"></span>';
|
75 |
+
public static $tag_open_quote = '<span class="open-quote"></span>';
|
76 |
+
public static $use_instance = false;
|
77 |
+
public static $widget_number = 100000;
|
78 |
+
|
79 |
+
public static $agg_count = 'reviewCount';
|
80 |
+
public static $agg_schema = 'http://schema.org/AggregateRating';
|
81 |
+
|
82 |
+
public static $cw_author = 'author';
|
83 |
+
public static $cw_date = 'datePublished';
|
84 |
+
public static $cw_date_mod = 'dateModified';
|
85 |
+
public static $cw_aggregate = 'aggregateRating';
|
86 |
+
public static $cw_review = 'review';
|
87 |
+
public static $cw_source_org = 'sourceOrganization';
|
88 |
+
|
89 |
+
public static $org_location = 'location';
|
90 |
+
public static $org_schema = 'http://schema.org/Organization';
|
91 |
+
|
92 |
+
public static $person_email = 'email';
|
93 |
+
public static $person_home = 'homeLocation';
|
94 |
+
public static $person_job_title = 'jobTitle';
|
95 |
+
public static $person_schema = 'http://schema.org/Person';
|
96 |
+
public static $person_member = 'memberOf';
|
97 |
+
|
98 |
+
public static $place_schema = 'http://schema.org/Place';
|
99 |
+
|
100 |
+
public static $review_body = 'reviewBody';
|
101 |
+
public static $review_item = 'itemReviewed';
|
102 |
+
public static $review_schema = 'http://schema.org/Review';
|
103 |
+
|
104 |
+
public static $schema_div_open = '<div itemscope itemtype="%1$s">';
|
105 |
+
public static $schema_div_prop = '<div itemprop="%1$s" itemscope itemtype="%2$s">%3$s</div>';
|
106 |
+
public static $schema_item_prop = 'itemprop="%1$s"';
|
107 |
+
public static $schema_meta = '<meta itemprop="%1$s" content="%2$s" />';
|
108 |
+
public static $schema_span = '<span itemprop="%1$s">%2$s</span>';
|
109 |
+
|
110 |
+
public static $thing_image = 'image';
|
111 |
+
public static $thing_name = 'name';
|
112 |
+
public static $thing_schema = 'http://schema.org/Thing';
|
113 |
+
public static $thing_url = 'url';
|
114 |
+
|
115 |
+
|
116 |
+
public function __construct() {
|
117 |
+
parent::__construct();
|
118 |
+
|
119 |
+
add_action( 'admin_init', array( __CLASS__, 'admin_init' ) );
|
120 |
+
add_action( 'admin_menu', array( __CLASS__, 'admin_menu' ) );
|
121 |
+
add_action( 'init', array( __CLASS__, 'init' ) );
|
122 |
+
add_action( 'widgets_init', array( __CLASS__, 'widgets_init' ) );
|
123 |
+
add_shortcode( 'testimonialswidget_list', array( __CLASS__, 'testimonialswidget_list' ) );
|
124 |
+
add_shortcode( 'testimonialswidget_widget', array( __CLASS__, 'testimonialswidget_widget' ) );
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
public static function admin_init() {
|
129 |
+
self::support_thumbnails();
|
130 |
+
|
131 |
+
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>';
|
132 |
+
|
133 |
+
self::add_meta_box_testimonials_widget();
|
134 |
+
self::update();
|
135 |
+
|
136 |
+
add_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
137 |
+
add_action( 'manage_' . self::PT . '_posts_custom_column', array( __CLASS__, 'manage_posts_custom_column' ), 10, 2 );
|
138 |
+
add_action( 'right_now_content_table_end', array( __CLASS__, 'right_now_content_table_end' ) );
|
139 |
+
add_filter( 'manage_' . self::PT . '_posts_columns', array( __CLASS__, 'manage_posts_columns' ) );
|
140 |
+
add_filter( 'plugin_action_links', array( __CLASS__, 'plugin_action_links' ), 10, 2 );
|
141 |
+
add_filter( 'plugin_row_meta', array( __CLASS__, 'plugin_row_meta' ), 10, 2 );
|
142 |
+
add_filter( 'post_updated_messages', array( __CLASS__, 'post_updated_messages' ) );
|
143 |
+
add_filter( 'pre_get_posts', array( __CLASS__, 'pre_get_posts_author' ) );
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
public static function admin_menu() {
|
148 |
+
self::$menu_shortcodes = add_submenu_page( 'edit.php?post_type=' . self::PT, esc_html__( 'Testimonials Shortcode Examples', 'testimonials-widget' ), esc_html__( 'E.g. Shortcodes', 'testimonials-widget' ), 'manage_options', 'shortcodes', array( __CLASS__, 'show_shortcodes' ) );
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
public static function init() {
|
153 |
+
add_filter( 'the_content', array( __CLASS__, 'get_single' ) );
|
154 |
+
|
155 |
+
load_plugin_textdomain( self::PT, false, 'testimonials-widget/languages' );
|
156 |
+
|
157 |
+
self::$cpt_category = self::PT . '-category';
|
158 |
+
self::$cpt_tags = self::PT . '-post_tag';
|
159 |
+
|
160 |
+
self::init_post_type();
|
161 |
+
|
162 |
+
$force_css_loading = tw_get_option( 'force_css_loading' );
|
163 |
+
if ( $force_css_loading )
|
164 |
+
self::styles();
|
165 |
+
}
|
166 |
+
|
167 |
+
|
168 |
+
public static function plugin_action_links( $links, $file ) {
|
169 |
+
if ( self::BASE == $file )
|
170 |
+
array_unshift( $links, self::$settings_link );
|
171 |
+
|
172 |
+
return $links;
|
173 |
+
}
|
174 |
+
|
175 |
+
|
176 |
+
public static function add_instance() {
|
177 |
+
self::$use_instance = false;
|
178 |
+
self::$instance_number++;
|
179 |
+
|
180 |
+
return self::$instance_number;
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
public static function get_instance() {
|
185 |
+
return self::$use_instance ? self::$instance_number : self::$instance_widget;
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
public static function set_instance( $widget_number ) {
|
190 |
+
self::$use_instance = true;
|
191 |
+
self::$instance_widget = $widget_number;
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
public static function support_thumbnails() {
|
196 |
+
$feature = 'post-thumbnails';
|
197 |
+
$feature_level = get_theme_support( $feature );
|
198 |
+
|
199 |
+
if ( true === $feature_level ) {
|
200 |
+
// already enabled for all post types
|
201 |
+
return;
|
202 |
+
} elseif ( false === $feature_level ) {
|
203 |
+
// none allowed, only enable for our own
|
204 |
+
add_theme_support( $feature, array( self::PT ) );
|
205 |
+
} else {
|
206 |
+
// add our own to list of supported
|
207 |
+
$feature_level[0][] = self::PT;
|
208 |
+
add_theme_support( $feature, $feature_level[0] );
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
public static function get_single( $content ) {
|
214 |
+
global $post;
|
215 |
+
|
216 |
+
if ( ! is_single() || self::PT != $post->post_type )
|
217 |
+
return $content;
|
218 |
+
|
219 |
+
$atts = self::get_defaults( true );
|
220 |
+
$atts['hide_content'] = 1;
|
221 |
+
$atts['ids'] = $post->ID;
|
222 |
+
$atts['type'] = 'get_single';
|
223 |
+
|
224 |
+
$instance = self::add_instance();
|
225 |
+
$atts['widget_number'] = $instance;
|
226 |
+
|
227 |
+
$testimonials = array();
|
228 |
+
|
229 |
+
$text = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
230 |
+
if ( false === $text ) {
|
231 |
+
$testimonials = self::get_testimonials( $atts );
|
232 |
+
$testimonial = $testimonials[0];
|
233 |
+
|
234 |
+
$details = self::get_testimonial_html( $testimonial, $atts );
|
235 |
+
$details = apply_filters( 'testimonials_widget_testimonial_html_single', $details, $testimonial, $atts );
|
236 |
+
|
237 |
+
$do_schema = $atts['enable_schema'];
|
238 |
+
if ( $do_schema )
|
239 |
+
$content = self::create_schema_span( self::$review_body, $content );
|
240 |
+
|
241 |
+
$content = apply_filters( 'testimonials_widget_testimonial_html_single_content', $content, $testimonial, $atts );
|
242 |
+
|
243 |
+
$text = $content . $details;
|
244 |
+
if ( $do_schema )
|
245 |
+
$text = self::create_schema_div_prop( self::$cw_review, self::$review_schema, $text );
|
246 |
+
|
247 |
+
$text = apply_filters( 'testimonials_widget_cache_set', $text, $atts );
|
248 |
+
}
|
249 |
+
|
250 |
+
self::call_scripts_styles( $testimonials, $atts, $instance );
|
251 |
+
|
252 |
+
return $text;
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
public static function activation() {
|
257 |
+
if ( ! current_user_can( 'activate_plugins' ) )
|
258 |
+
return;
|
259 |
+
|
260 |
+
self::init();
|
261 |
+
flush_rewrite_rules();
|
262 |
+
}
|
263 |
+
|
264 |
+
|
265 |
+
public static function deactivation() {
|
266 |
+
if ( ! current_user_can( 'activate_plugins' ) )
|
267 |
+
return;
|
268 |
+
|
269 |
+
flush_rewrite_rules();
|
270 |
+
}
|
271 |
+
|
272 |
+
|
273 |
+
public static function uninstall() {
|
274 |
+
if ( ! current_user_can( 'activate_plugins' ) )
|
275 |
+
return;
|
276 |
+
|
277 |
+
global $wpdb;
|
278 |
+
|
279 |
+
require_once TW_DIR_LIB . '/class-testimonials-widget-settings.php';
|
280 |
+
|
281 |
+
$delete_data = tw_get_option( 'delete_data', false );
|
282 |
+
if ( $delete_data ) {
|
283 |
+
delete_option( self::OLD_NAME );
|
284 |
+
delete_option( Testimonials_Widget_Settings::ID );
|
285 |
+
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->options . '`' );
|
286 |
+
|
287 |
+
Testimonials_Widget::delete_testimonials();
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
|
292 |
+
public static function delete_testimonials() {
|
293 |
+
global $wpdb;
|
294 |
+
|
295 |
+
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = '" . self::PT . "'";
|
296 |
+
$posts = $wpdb->get_results( $query );
|
297 |
+
|
298 |
+
foreach ( $posts as $post ) {
|
299 |
+
$post_id = $post->ID;
|
300 |
+
Testimonials_Widget::delete_attachments( $post_id );
|
301 |
+
|
302 |
+
// dels post, meta & comments
|
303 |
+
// true is force delete
|
304 |
+
wp_delete_post( $post_id, true );
|
305 |
+
}
|
306 |
+
|
307 |
+
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->postmeta . '`' );
|
308 |
+
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->posts . '`' );
|
309 |
+
}
|
310 |
+
|
311 |
+
|
312 |
+
public static function delete_attachments( $post_id = false ) {
|
313 |
+
global $wpdb;
|
314 |
+
|
315 |
+
$post_id = $post_id ? $post_id : 0;
|
316 |
+
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_parent = {$post_id}";
|
317 |
+
$attachments = $wpdb->get_results( $query );
|
318 |
+
|
319 |
+
foreach ( $attachments as $attachment ) {
|
320 |
+
// true is force delete
|
321 |
+
wp_delete_attachment( $attachment->ID, true );
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
|
326 |
+
public static function plugin_row_meta( $input, $file ) {
|
327 |
+
if ( self::BASE != $file )
|
328 |
+
return $input;
|
329 |
+
|
330 |
+
$disable_donate = tw_get_option( 'disable_donate' );
|
331 |
+
if ( $disable_donate )
|
332 |
+
return $input;
|
333 |
+
|
334 |
+
$links = array(
|
335 |
+
self::$donate_link,
|
336 |
+
);
|
337 |
+
|
338 |
+
global $TW_Premium;
|
339 |
+
if ( ! isset( $TW_Premium ) )
|
340 |
+
$links[] = TW_PREMIUM_LINK;
|
341 |
+
|
342 |
+
$input = array_merge( $input, $links );
|
343 |
+
|
344 |
+
return $input;
|
345 |
+
}
|
346 |
+
|
347 |
+
|
348 |
+
public static function notice_2_12_0() {
|
349 |
+
$text = sprintf( __( 'If your Testimonials display has gone to funky town, please <a href="%s">read the FAQ</a> about possible CSS fixes.', 'testimonials-widget' ), esc_url( 'https://aihrus.zendesk.com/entries/23722573-Major-Changes-Since-2-10-0' ) );
|
350 |
+
|
351 |
+
self::notice_updated( $text );
|
352 |
+
}
|
353 |
+
|
354 |
+
|
355 |
+
public static function notice_donate( $disable_donate = null, $item_name = null ) {
|
356 |
+
$disable_donate = tw_get_option( 'disable_donate' );
|
357 |
+
|
358 |
+
parent::notice_donate( $disable_donate, TW_NAME );
|
359 |
+
}
|
360 |
+
|
361 |
+
|
362 |
+
public static function update() {
|
363 |
+
$prior_version = tw_get_option( 'admin_notices' );
|
364 |
+
if ( $prior_version ) {
|
365 |
+
if ( $prior_version < '2.12.0' )
|
366 |
+
self::set_notice( 'notice_2_12_0' );
|
367 |
+
|
368 |
+
if ( $prior_version < '2.15.0' )
|
369 |
+
self::set_notice( 'notice_2_15_0' );
|
370 |
+
|
371 |
+
if ( $prior_version < self::VERSION )
|
372 |
+
do_action( 'testimonials_widget_update' );
|
373 |
+
|
374 |
+
tw_set_option( 'admin_notices' );
|
375 |
+
}
|
376 |
+
|
377 |
+
// display donate on major/minor version release
|
378 |
+
$donate_version = tw_get_option( 'donate_version', false );
|
379 |
+
if ( ! $donate_version || ( $donate_version != self::VERSION && preg_match( '#\.0$#', self::VERSION ) ) ) {
|
380 |
+
self::set_notice( 'notice_donate' );
|
381 |
+
tw_set_option( 'donate_version', self::VERSION );
|
382 |
+
}
|
383 |
+
|
384 |
+
$options = get_option( self::OLD_NAME );
|
385 |
+
if ( true !== $options['migrated'] )
|
386 |
+
self::migrate();
|
387 |
+
}
|
388 |
+
|
389 |
+
|
390 |
+
public static function migrate() {
|
391 |
+
global $wpdb;
|
392 |
+
|
393 |
+
$table_name = $wpdb->prefix . self::OLD_NAME;
|
394 |
+
$meta_key = '_' . self::PT . ':testimonial_id';
|
395 |
+
$has_table_query = "SELECT table_name FROM information_schema.tables WHERE table_schema='{$wpdb->dbname}' AND table_name='{$table_name}'";
|
396 |
+
$has_table_result = $wpdb->get_col( $has_table_query );
|
397 |
+
|
398 |
+
if ( ! empty( $has_table_result ) ) {
|
399 |
+
// check that db table exists and has entries
|
400 |
+
$query = 'SELECT `testimonial_id`, `testimonial`, `author`, `source`, `tags`, `public`, `time_added`, `time_updated` FROM `' . $table_name . '`';
|
401 |
+
|
402 |
+
// ignore already imported
|
403 |
+
$done_import_query = 'SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE meta_key = "' . $meta_key . '"';
|
404 |
+
$done_import = $wpdb->get_col( $done_import_query );
|
405 |
+
|
406 |
+
if ( ! empty( $done_import ) ) {
|
407 |
+
$done_import = array_unique( $done_import );
|
408 |
+
$query .= ' WHERE testimonial_id NOT IN ( ' . implode( ',', $done_import ) . ' )';
|
409 |
+
}
|
410 |
+
|
411 |
+
$results = $wpdb->get_results( $query );
|
412 |
+
if ( ! empty( $results ) ) {
|
413 |
+
foreach ( $results as $result ) {
|
414 |
+
// author can contain title and company details
|
415 |
+
$author = $result->author;
|
416 |
+
$company = false;
|
417 |
+
|
418 |
+
// ex: First Last of Company!
|
419 |
+
$author = str_replace( ' of ', ', ', $author );
|
420 |
+
// now ex: First Last, Company!
|
421 |
+
|
422 |
+
// ex: First Last, Company
|
423 |
+
// ex: First Last, Web Development Manager, Topcon Positioning Systems, Inc.
|
424 |
+
// ex: First Last, Owner, Company, LLC
|
425 |
+
$author = str_replace( ' of ', ', ', $author );
|
426 |
+
$temp_comma = '^^^';
|
427 |
+
$author = str_replace( ', LLC', $temp_comma . ' LLC', $author );
|
428 |
+
|
429 |
+
// now ex: First Last, Owner, Company^^^ LLC
|
430 |
+
$author = str_replace( ', Inc', $temp_comma . ' Inc', $author );
|
431 |
+
|
432 |
+
// ex: First Last, Web Development Manager, Company^^^ Inc.
|
433 |
+
// it's possible to have "Michael Cannon, Senior Developer" and "Senior Developer" become the company. Okay for now
|
434 |
+
$author = explode( ', ', $author );
|
435 |
+
|
436 |
+
if ( 1 < count( $author ) ) {
|
437 |
+
$company = array_pop( $author );
|
438 |
+
$company = str_replace( $temp_comma, ',', $company );
|
439 |
+
}
|
440 |
+
|
441 |
+
$author = implode( ', ', $author );
|
442 |
+
$author = str_replace( $temp_comma, ',', $author );
|
443 |
+
|
444 |
+
$post_data = array(
|
445 |
+
'post_type' => self::PT,
|
446 |
+
'post_status' => ( 'yes' == $result->public ) ? 'publish' : 'private',
|
447 |
+
'post_date' => $result->time_added,
|
448 |
+
'post_modified' => $result->time_updated,
|
449 |
+
'post_title' => $author,
|
450 |
+
'post_content' => $result->testimonial,
|
451 |
+
'tags_input' => $result->tags,
|
452 |
+
);
|
453 |
+
|
454 |
+
$post_id = wp_insert_post( $post_data, true );
|
455 |
+
|
456 |
+
// track/link testimonial import to new post
|
457 |
+
add_post_meta( $post_id, $meta_key, $result->testimonial_id );
|
458 |
+
|
459 |
+
if ( ! empty( $company ) )
|
460 |
+
add_post_meta( $post_id, 'testimonials-widget-company', $company );
|
461 |
+
|
462 |
+
$source = $result->source;
|
463 |
+
if ( ! empty( $source ) ) {
|
464 |
+
if ( is_email( $source ) ) {
|
465 |
+
add_post_meta( $post_id, 'testimonials-widget-email', $source );
|
466 |
+
} else {
|
467 |
+
add_post_meta( $post_id, 'testimonials-widget-url', $source );
|
468 |
+
}
|
469 |
+
}
|
470 |
+
}
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
$options['migrated'] = true;
|
475 |
+
delete_option( self::OLD_NAME );
|
476 |
+
add_option( self::OLD_NAME, $options, '', 'no' );
|
477 |
+
}
|
478 |
+
|
479 |
+
|
480 |
+
public static function pre_get_posts_author( $query ) {
|
481 |
+
global $user_ID;
|
482 |
+
|
483 |
+
// author's and below
|
484 |
+
if ( $query->is_admin && ! empty( $query->is_main_query ) && $query->is_post_type_archive( Testimonials_Widget::PT ) && ! current_user_can( 'edit_others_posts' ) )
|
485 |
+
$query->set( 'post_author', $user_ID );
|
486 |
+
|
487 |
+
return $query;
|
488 |
+
}
|
489 |
+
|
490 |
+
|
491 |
+
public static function manage_posts_custom_column( $column, $post_id ) {
|
492 |
+
$result = false;
|
493 |
+
|
494 |
+
switch ( $column ) {
|
495 |
+
case 'id':
|
496 |
+
$result = $post_id;
|
497 |
+
break;
|
498 |
+
|
499 |
+
case 'shortcode':
|
500 |
+
$result = '[testimonialswidget_list ids="';
|
501 |
+
$result .= $post_id;
|
502 |
+
$result .= '"]';
|
503 |
+
$result .= '<br />';
|
504 |
+
$result .= '[testimonialswidget_widget ids="';
|
505 |
+
$result .= $post_id;
|
506 |
+
$result .= '"]';
|
507 |
+
break;
|
508 |
+
|
509 |
+
case 'testimonials-widget-company':
|
510 |
+
case 'testimonials-widget-location':
|
511 |
+
case 'testimonials-widget-title':
|
512 |
+
$result = get_post_meta( $post_id, $column, true );
|
513 |
+
break;
|
514 |
+
|
515 |
+
case 'testimonials-widget-email':
|
516 |
+
case 'testimonials-widget-url':
|
517 |
+
$url = get_post_meta( $post_id, $column, true );
|
518 |
+
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
519 |
+
$url = 'http://' . $url;
|
520 |
+
|
521 |
+
$result = make_clickable( $url );
|
522 |
+
break;
|
523 |
+
|
524 |
+
case 'thumbnail':
|
525 |
+
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
526 |
+
|
527 |
+
if ( has_post_thumbnail( $post_id ) )
|
528 |
+
$result = get_the_post_thumbnail( $post_id, 'thumbnail' );
|
529 |
+
elseif ( is_email( $email ) )
|
530 |
+
$result = get_avatar( $email );
|
531 |
+
else
|
532 |
+
$result = false;
|
533 |
+
break;
|
534 |
+
|
535 |
+
case self::$cpt_category:
|
536 |
+
case self::$cpt_tags:
|
537 |
+
$terms = get_the_terms( $post_id, $column );
|
538 |
+
$result = '';
|
539 |
+
if ( ! empty( $terms ) ) {
|
540 |
+
$out = array();
|
541 |
+
foreach ( $terms as $term )
|
542 |
+
$out[] = '<a href="' . admin_url( 'edit-tags.php?action=edit&taxonomy=' . $column . '&tag_ID=' . $term->term_id . '&post_type=' . self::PT ) . '">' . $term->name . '</a>';
|
543 |
+
|
544 |
+
$result = join( ', ', $out );
|
545 |
+
}
|
546 |
+
break;
|
547 |
+
}
|
548 |
+
|
549 |
+
$result = apply_filters( 'testimonials_widget_posts_custom_column', $result, $column, $post_id );
|
550 |
+
|
551 |
+
if ( $result )
|
552 |
+
echo $result;
|
553 |
+
}
|
554 |
+
|
555 |
+
|
556 |
+
public static function manage_posts_columns( $columns ) {
|
557 |
+
// order of keys matches column ordering
|
558 |
+
$columns = array(
|
559 |
+
'cb' => '<input type="checkbox" />',
|
560 |
+
'id' => esc_html__( 'ID', 'testimonials-widget' ),
|
561 |
+
'thumbnail' => esc_html__( 'Image', 'testimonials-widget' ),
|
562 |
+
'title' => esc_html__( 'Source', 'testimonials-widget' ),
|
563 |
+
'shortcode' => esc_html__( 'Shortcodes', 'testimonials-widget' ),
|
564 |
+
'testimonials-widget-title' => esc_html__( 'Job Title', 'testimonials-widget' ),
|
565 |
+
'testimonials-widget-location' => esc_html__( 'Location', 'testimonials-widget' ),
|
566 |
+
'testimonials-widget-email' => esc_html__( 'Email', 'testimonials-widget' ),
|
567 |
+
'testimonials-widget-company' => esc_html__( 'Company', 'testimonials-widget' ),
|
568 |
+
'testimonials-widget-url' => esc_html__( 'URL', 'testimonials-widget' ),
|
569 |
+
'author' => esc_html__( 'Published by', 'testimonials-widget' ),
|
570 |
+
'date' => esc_html__( 'Date', 'testimonials-widget' ),
|
571 |
+
);
|
572 |
+
|
573 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
574 |
+
if ( ! $use_cpt_taxonomy ) {
|
575 |
+
$columns[ 'categories' ] = esc_html__( 'Category', 'testimonials-widget' );
|
576 |
+
$columns[ 'tags' ] = esc_html__( 'Tags', 'testimonials-widget' );
|
577 |
+
} else {
|
578 |
+
$columns[ self::$cpt_category ] = esc_html__( 'Category', 'testimonials-widget' );
|
579 |
+
$columns[ self::$cpt_tags ] = esc_html__( 'Tags', 'testimonials-widget' );
|
580 |
+
}
|
581 |
+
|
582 |
+
$columns = apply_filters( 'testimonials_widget_columns', $columns );
|
583 |
+
|
584 |
+
return $columns;
|
585 |
+
}
|
586 |
+
|
587 |
+
|
588 |
+
public static function init_post_type() {
|
589 |
+
$labels = array(
|
590 |
+
'add_new' => esc_html__( 'Add New', 'testimonials-widget' ),
|
591 |
+
'add_new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
592 |
+
'edit_item' => esc_html__( 'Edit Testimonial', 'testimonials-widget' ),
|
593 |
+
'name' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
594 |
+
'new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
595 |
+
'not_found' => esc_html__( 'No testimonials found', 'testimonials-widget' ),
|
596 |
+
'not_found_in_trash' => esc_html__( 'No testimonials found in Trash', 'testimonials-widget' ),
|
597 |
+
'parent_item_colon' => null,
|
598 |
+
'search_items' => esc_html__( 'Search Testimonials', 'testimonials-widget' ),
|
599 |
+
'singular_name' => esc_html__( 'Testimonial', 'testimonials-widget' ),
|
600 |
+
'view_item' => esc_html__( 'View Testimonial', 'testimonials-widget' ),
|
601 |
+
);
|
602 |
+
|
603 |
+
$supports = array(
|
604 |
+
'title',
|
605 |
+
'editor',
|
606 |
+
'thumbnail',
|
607 |
+
);
|
608 |
+
|
609 |
+
$allow_comments = tw_get_option( 'allow_comments', false );
|
610 |
+
if ( $allow_comments )
|
611 |
+
$supports[] = 'comments';
|
612 |
+
|
613 |
+
$has_archive = tw_get_option( 'has_archive', true );
|
614 |
+
$rewrite_slug = tw_get_option( 'rewrite_slug', 'testimonial' );
|
615 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
616 |
+
|
617 |
+
// editor's and up
|
618 |
+
if ( current_user_can( 'edit_others_posts' ) )
|
619 |
+
$supports[] = 'author';
|
620 |
+
|
621 |
+
if ( ! $use_cpt_taxonomy ) {
|
622 |
+
$do_register_taxonomy = false;
|
623 |
+
$taxonomies = array(
|
624 |
+
'category',
|
625 |
+
'post_tag',
|
626 |
+
);
|
627 |
+
} else {
|
628 |
+
$do_register_taxonomy = true;
|
629 |
+
$taxonomies = array(
|
630 |
+
self::$cpt_category,
|
631 |
+
self::$cpt_tags,
|
632 |
+
);
|
633 |
+
|
634 |
+
self::register_taxonomies();
|
635 |
+
}
|
636 |
+
|
637 |
+
$args = array(
|
638 |
+
'label' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
639 |
+
'capability_type' => 'post',
|
640 |
+
'has_archive' => $has_archive,
|
641 |
+
'hierarchical' => false,
|
642 |
+
'labels' => $labels,
|
643 |
+
'public' => true,
|
644 |
+
'publicly_queryable' => true,
|
645 |
+
'query_var' => true,
|
646 |
+
'rewrite' => array(
|
647 |
+
'slug' => $rewrite_slug,
|
648 |
+
'with_front' => false,
|
649 |
+
),
|
650 |
+
'supports' => $supports,
|
651 |
+
'taxonomies' => $taxonomies,
|
652 |
+
);
|
653 |
+
|
654 |
+
register_post_type( self::PT, $args );
|
655 |
+
|
656 |
+
if ( $do_register_taxonomy ) {
|
657 |
+
register_taxonomy_for_object_type( self::$cpt_category, self::PT );
|
658 |
+
register_taxonomy_for_object_type( self::$cpt_tags, self::PT );
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
+
|
663 |
+
public static function register_taxonomies() {
|
664 |
+
$args = array(
|
665 |
+
'hierarchical' => true,
|
666 |
+
'show_admin_column' => true,
|
667 |
+
);
|
668 |
+
register_taxonomy( self::$cpt_category, self::PT, $args );
|
669 |
+
|
670 |
+
$args = array(
|
671 |
+
'show_admin_column' => true,
|
672 |
+
'update_count_callback' => '_update_post_term_count',
|
673 |
+
);
|
674 |
+
register_taxonomy( self::$cpt_tags, self::PT, $args );
|
675 |
+
}
|
676 |
+
|
677 |
+
|
678 |
+
public static function get_defaults( $single_view = false ) {
|
679 |
+
if ( empty( $single_view ) )
|
680 |
+
return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
|
681 |
+
else
|
682 |
+
return apply_filters( 'testimonials_widget_defaults_single', tw_get_options() );
|
683 |
+
}
|
684 |
+
|
685 |
+
|
686 |
+
public static function testimonialswidget_list( $atts ) {
|
687 |
+
$atts = wp_parse_args( $atts, self::get_defaults() );
|
688 |
+
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
689 |
+
|
690 |
+
if ( get_query_var( 'paged' ) ) {
|
691 |
+
$atts['paged'] = get_query_var( 'paged' );
|
692 |
+
} elseif ( get_query_var( 'page' ) ) {
|
693 |
+
$atts['paged'] = get_query_var( 'page' );
|
694 |
+
} else {
|
695 |
+
$atts['paged'] = 1;
|
696 |
+
}
|
697 |
+
|
698 |
+
$atts['type'] = 'testimonialswidget_list';
|
699 |
+
|
700 |
+
$instance = self::add_instance();
|
701 |
+
$atts['widget_number'] = $instance;
|
702 |
+
|
703 |
+
$testimonials = array();
|
704 |
+
|
705 |
+
$content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
706 |
+
if ( false === $content ) {
|
707 |
+
$testimonials = self::get_testimonials( $atts );
|
708 |
+
$content = self::get_testimonials_html( $testimonials, $atts );
|
709 |
+
$content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
|
710 |
+
}
|
711 |
+
|
712 |
+
self::call_scripts_styles( $testimonials, $atts, $instance );
|
713 |
+
|
714 |
+
return $content;
|
715 |
+
}
|
716 |
+
|
717 |
+
|
718 |
+
public static function testimonialswidget_widget( $atts, $widget_number = null ) {
|
719 |
+
if ( empty( $widget_number ) ) {
|
720 |
+
$widget_number = self::$widget_number++;
|
721 |
+
|
722 |
+
if ( ! isset( $atts['random'] ) )
|
723 |
+
$atts['random'] = 1;
|
724 |
+
|
725 |
+
if ( ! isset( $atts['enable_schema'] ) )
|
726 |
+
$atts['enable_schema'] = 0;
|
727 |
+
}
|
728 |
+
|
729 |
+
$atts = wp_parse_args( $atts, self::get_defaults() );
|
730 |
+
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
731 |
+
|
732 |
+
$atts['paging'] = false;
|
733 |
+
$atts['type'] = 'testimonialswidget_widget';
|
734 |
+
|
735 |
+
self::set_instance( $widget_number );
|
736 |
+
$atts['widget_number'] = $widget_number;
|
737 |
+
|
738 |
+
$testimonials = array();
|
739 |
+
|
740 |
+
$content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
741 |
+
if ( false === $content ) {
|
742 |
+
$testimonials = self::get_testimonials( $atts );
|
743 |
+
$content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
|
744 |
+
$content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
|
745 |
+
}
|
746 |
+
|
747 |
+
self::call_scripts_styles( $testimonials, $atts, $widget_number );
|
748 |
+
|
749 |
+
return $content;
|
750 |
+
}
|
751 |
+
|
752 |
+
|
753 |
+
public static function scripts( $atts ) {
|
754 |
+
if ( is_admin() )
|
755 |
+
return;
|
756 |
+
|
757 |
+
wp_enqueue_script( 'jquery' );
|
758 |
+
|
759 |
+
$use_bxslider = $atts['use_bxslider'];
|
760 |
+
if ( $use_bxslider ) {
|
761 |
+
$enable_video = $atts['enable_video'];
|
762 |
+
if ( $enable_video ) {
|
763 |
+
wp_register_script( 'jquery.fitvids', plugins_url( 'js/jquery.fitvids.js', __FILE__ ), array( 'jquery' ), '1.0' );
|
764 |
+
wp_enqueue_script( 'jquery.fitvids' );
|
765 |
+
}
|
766 |
+
|
767 |
+
wp_register_script( 'jquery.bxslider', plugins_url( 'js/jquery.bxslider.js', __FILE__ ), array( 'jquery' ), '4.1.1' );
|
768 |
+
wp_enqueue_script( 'jquery.bxslider' );
|
769 |
+
}
|
770 |
+
|
771 |
+
do_action( 'testimonials_widget_scripts', $atts );
|
772 |
+
}
|
773 |
+
|
774 |
+
|
775 |
+
public static function styles() {
|
776 |
+
if ( is_admin() )
|
777 |
+
return;
|
778 |
+
|
779 |
+
$use_bxslider = tw_get_option( 'use_bxslider' );
|
780 |
+
if ( $use_bxslider ) {
|
781 |
+
wp_register_style( 'jquery.bxslider', plugins_url( 'css/jquery.bxslider.css', __FILE__ ) );
|
782 |
+
wp_enqueue_style( 'jquery.bxslider' );
|
783 |
+
|
784 |
+
wp_register_style( __CLASS__, plugins_url( 'testimonials-widget.css', __FILE__ ) );
|
785 |
+
} else {
|
786 |
+
wp_register_style( __CLASS__, plugins_url( 'css/testimonials-widget-2.14.0.css', __FILE__ ) );
|
787 |
+
|
788 |
+
$include_ie7_css = tw_get_option( 'include_ie7_css' );
|
789 |
+
if ( $include_ie7_css ) {
|
790 |
+
wp_register_style( __CLASS__ . '-ie7', plugins_url( 'css/testimonials-widget-ie7.css', __FILE__ ) );
|
791 |
+
wp_enqueue_style( __CLASS__ . '-ie7' );
|
792 |
+
}
|
793 |
+
}
|
794 |
+
|
795 |
+
wp_enqueue_style( __CLASS__ );
|
796 |
+
|
797 |
+
do_action( 'testimonials_widget_styles' );
|
798 |
+
}
|
799 |
+
|
800 |
+
|
801 |
+
public static function get_testimonials_html_css( $atts, $widget_number = null ) {
|
802 |
+
$css = array();
|
803 |
+
$id_base = self::ID . $widget_number;
|
804 |
+
|
805 |
+
switch ( $atts['type'] ) {
|
806 |
+
case 'testimonialswidget_widget':
|
807 |
+
$use_bxslider = $atts['use_bxslider'];
|
808 |
+
if ( ! $use_bxslider ) {
|
809 |
+
$height = $atts['height'];
|
810 |
+
$max_height = $atts['max_height'];
|
811 |
+
$min_height = $atts['min_height'];
|
812 |
+
|
813 |
+
if ( $height ) {
|
814 |
+
$max_height = $height;
|
815 |
+
$min_height = $height;
|
816 |
+
}
|
817 |
+
|
818 |
+
if ( $min_height ) {
|
819 |
+
$css[] = <<<EOF
|
820 |
+
<style>
|
821 |
+
.$id_base {
|
822 |
+
min-height: {$min_height}px;
|
823 |
+
}
|
824 |
+
</style>
|
825 |
+
EOF;
|
826 |
+
}
|
827 |
+
|
828 |
+
if ( $max_height ) {
|
829 |
+
$css[] = <<<EOF
|
830 |
+
<style>
|
831 |
+
.$id_base {
|
832 |
+
max-height: {$max_height}px;
|
833 |
+
}
|
834 |
+
</style>
|
835 |
+
EOF;
|
836 |
+
}
|
837 |
+
}
|
838 |
+
break;
|
839 |
+
}
|
840 |
+
|
841 |
+
$css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
|
842 |
+
|
843 |
+
return $css;
|
844 |
+
}
|
845 |
+
|
846 |
+
|
847 |
+
public static function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
|
848 |
+
$not_found = self::get_not_found();
|
849 |
+
if ( $not_found )
|
850 |
+
return;
|
851 |
+
|
852 |
+
$scripts = array();
|
853 |
+
$scripts_internal = array();
|
854 |
+
|
855 |
+
$id = self::ID;
|
856 |
+
$id_base = $id . $widget_number;
|
857 |
+
|
858 |
+
switch ( $atts['type'] ) {
|
859 |
+
case 'testimonialswidget_widget':
|
860 |
+
$javascript = '';
|
861 |
+
if ( 1 < count( $testimonials ) ) {
|
862 |
+
$refresh_interval = $atts['refresh_interval'];
|
863 |
+
|
864 |
+
$javascript .= '<script type="text/javascript">' . "\n";
|
865 |
+
|
866 |
+
$use_bxslider = $atts['use_bxslider'];
|
867 |
+
if ( $use_bxslider ) {
|
868 |
+
$enable_video = $atts['enable_video'];
|
869 |
+
$show_start_stop = $atts['show_start_stop'];
|
870 |
+
$transition_mode = $atts['transition_mode'];
|
871 |
+
|
872 |
+
$auto = $refresh_interval ? 'true' : 'false';
|
873 |
+
$pager = ! $refresh_interval ? 'pager: true' : 'pager: false';
|
874 |
+
$pause = $refresh_interval * 1000;
|
875 |
+
$video = $enable_video ? "video: true,\nuseCSS: false" : 'video: false';
|
876 |
+
|
877 |
+
$autoControls = $show_start_stop ? 'autoControls: true,' : '';
|
878 |
+
|
879 |
+
$slider_var = self::SLUG . $widget_number;
|
880 |
+
$javascript .= <<<EOF
|
881 |
+
var {$slider_var} = null;
|
882 |
+
|
883 |
+
jQuery(document).ready(function() {
|
884 |
+
{$slider_var} = jQuery('.{$id_base}').bxSlider({
|
885 |
+
auto: {$auto},
|
886 |
+
{$autoControls}
|
887 |
+
autoHover: true,
|
888 |
+
controls: false,
|
889 |
+
mode: '{$transition_mode}',
|
890 |
+
{$pager},
|
891 |
+
pause: {$pause},
|
892 |
+
{$video},
|
893 |
+
slideMargin: 2
|
894 |
+
});
|
895 |
+
});
|
896 |
+
|
897 |
+
EOF;
|
898 |
+
} else {
|
899 |
+
$tw_padding = 'tw_padding' . $widget_number;
|
900 |
+
$tw_wrapper = 'tw_wrapper' . $widget_number;
|
901 |
+
|
902 |
+
$disable_animation = $atts['disable_animation'];
|
903 |
+
$fade_in_speed = $atts['fade_in_speed'];
|
904 |
+
$fade_out_speed = $atts['fade_out_speed'];
|
905 |
+
$height = $atts['height'];
|
906 |
+
$max_height = $atts['max_height'];
|
907 |
+
$min_height = $atts['min_height'];
|
908 |
+
|
909 |
+
$enable_animation = 1;
|
910 |
+
if ( $disable_animation || $height || $max_height || $min_height )
|
911 |
+
$enable_animation = 0;
|
912 |
+
|
913 |
+
if ( $refresh_interval ) {
|
914 |
+
$javascript .= <<<EOF
|
915 |
+
function nextTestimonial{$widget_number}() {
|
916 |
+
if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
|
917 |
+
var active = jQuery('.{$id_base} .active');
|
918 |
+
var next = (jQuery('.{$id_base} .active').next().length > 0) ? jQuery('.{$id_base} .active').next() : jQuery('.{$id_base} .testimonials-widget-testimonial:first-child');
|
919 |
+
|
920 |
+
active.fadeOut({$fade_out_speed}, function() {
|
921 |
+
active.removeClass('active');
|
922 |
+
next.fadeIn({$fade_in_speed});
|
923 |
+
next.removeClass('display-none');
|
924 |
+
next.addClass('active');
|
925 |
+
|
926 |
+
{INTERNAL_SCRIPTS}
|
927 |
+
|
928 |
+
// added padding
|
929 |
+
if ( {$enable_animation} )
|
930 |
+
{$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
|
931 |
+
});
|
932 |
+
}
|
933 |
+
}
|
934 |
+
|
935 |
+
jQuery(document).ready(function() {
|
936 |
+
jQuery('.{$id_base}').hover(function() {
|
937 |
+
jQuery(this).addClass('hovered')
|
938 |
+
}, function() {
|
939 |
+
jQuery(this).removeClass('hovered')
|
940 |
+
});
|
941 |
+
|
942 |
+
nextTestimonial{$widget_number}interval = setInterval('nextTestimonial{$widget_number}()', {$refresh_interval} * 1000);
|
943 |
+
});
|
944 |
+
|
945 |
+
EOF;
|
946 |
+
}
|
947 |
+
|
948 |
+
$javascript .= <<<EOF
|
949 |
+
if ( {$enable_animation} ) {
|
950 |
+
var {$tw_wrapper} = jQuery('.{$id_base}');
|
951 |
+
var {$tw_padding} = 0;
|
952 |
+
|
953 |
+
jQuery(document).ready(function() {
|
954 |
+
// tw_padding is the difference in height to take into account all styling options
|
955 |
+
{$tw_padding} = {$tw_wrapper}.height() - jQuery('.{$id_base} .testimonials-widget-testimonial').height();
|
956 |
+
|
957 |
+
// fixes first animation by defining height to adjust to
|
958 |
+
{$tw_wrapper}.height( {$tw_wrapper}.height() );
|
959 |
+
});
|
960 |
+
}
|
961 |
+
EOF;
|
962 |
+
}
|
963 |
+
|
964 |
+
$javascript .= "\n" . '</script>';
|
965 |
+
$scripts[ $id_base ] = $javascript;
|
966 |
+
}
|
967 |
+
break;
|
968 |
+
}
|
969 |
+
|
970 |
+
$scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
|
971 |
+
$scripts_internal = apply_filters( 'testimonials_widget_testimonials_js_internal', $scripts_internal, $testimonials, $atts, $widget_number );
|
972 |
+
$internal_scripts = implode( "\n", $scripts_internal );
|
973 |
+
$scripts = str_replace( '{INTERNAL_SCRIPTS}', $internal_scripts, $scripts );
|
974 |
+
|
975 |
+
return $scripts;
|
976 |
+
}
|
977 |
+
|
978 |
+
|
979 |
+
public static function get_testimonials_html( $testimonials, $atts, $is_list = true, $widget_number = null ) {
|
980 |
+
$hide_not_found = $atts['hide_not_found'];
|
981 |
+
$paging = Testimonials_Widget_Settings::is_true( $atts['paging'] );
|
982 |
+
$paging_before = ( 'before' === strtolower( $atts['paging'] ) );
|
983 |
+
$paging_after = ( 'after' === strtolower( $atts['paging'] ) );
|
984 |
+
$target = $atts['target'];
|
985 |
+
|
986 |
+
$id = self::ID;
|
987 |
+
|
988 |
+
if ( is_null( $widget_number ) ) {
|
989 |
+
$div_open = '<div class="' . $id;
|
990 |
+
|
991 |
+
if ( $is_list )
|
992 |
+
$div_open .= ' listing';
|
993 |
+
|
994 |
+
$div_open .= '">';
|
995 |
+
} else {
|
996 |
+
$id_base = $id . $widget_number;
|
997 |
+
$div_open = '<div class="' . $id . ' ' . $id_base . '">';
|
998 |
+
}
|
999 |
+
|
1000 |
+
if ( empty( $testimonials ) && ! $hide_not_found ) {
|
1001 |
+
$testimonials = array(
|
1002 |
+
array( 'testimonial_content' => esc_html__( 'No testimonials found', 'testimonials-widget' ) ),
|
1003 |
+
);
|
1004 |
+
|
1005 |
+
self::set_not_found( true );
|
1006 |
+
} else
|
1007 |
+
self::set_not_found();
|
1008 |
+
|
1009 |
+
$pre_paging = '';
|
1010 |
+
if ( $paging || $paging_before )
|
1011 |
+
$pre_paging = self::get_testimonials_paging( $atts );
|
1012 |
+
|
1013 |
+
$is_first = true;
|
1014 |
+
|
1015 |
+
$testimonial_content = '';
|
1016 |
+
foreach ( $testimonials as $testimonial ) {
|
1017 |
+
$content = self::get_testimonial_html( $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1018 |
+
if ( $target )
|
1019 |
+
$content = links_add_target( $content, $target );
|
1020 |
+
$content = apply_filters( 'testimonials_widget_testimonial_html', $content, $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1021 |
+
$is_first = false;
|
1022 |
+
|
1023 |
+
$testimonial_content .= $content;
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
$post_paging = '';
|
1027 |
+
if ( $paging || $paging_after )
|
1028 |
+
$post_paging = self::get_testimonials_paging( $atts, false );
|
1029 |
+
|
1030 |
+
$div_close = '</div>';
|
1031 |
+
|
1032 |
+
$html = $div_open
|
1033 |
+
. $pre_paging
|
1034 |
+
. $testimonial_content
|
1035 |
+
. $post_paging
|
1036 |
+
. $div_close;
|
1037 |
+
|
1038 |
+
$html = apply_filters( 'testimonials_widget_get_testimonials_html', $html, $testimonials, $atts, $is_list, $widget_number, $div_open, $pre_paging, $testimonial_content, $post_paging, $div_close );
|
1039 |
+
|
1040 |
+
return $html;
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
|
1044 |
+
public static function get_testimonial_html( $testimonial, $atts, $is_list = true, $is_first = false, $widget_number = null ) {
|
1045 |
+
$disable_quotes = $atts['disable_quotes'];
|
1046 |
+
$do_image = ! $atts['hide_image'] && ! empty( $testimonial['testimonial_image'] );
|
1047 |
+
$do_image_single = ! $atts['hide_image_single'];
|
1048 |
+
$do_content = ! $atts['hide_content'];
|
1049 |
+
$do_schema = $atts['enable_schema'];
|
1050 |
+
$keep_whitespace = $atts['keep_whitespace'];
|
1051 |
+
$remove_hentry = $atts['remove_hentry'];
|
1052 |
+
$use_bxslider = $atts['use_bxslider'];
|
1053 |
+
|
1054 |
+
$class = 'testimonials-widget-testimonial';
|
1055 |
+
if ( is_single() && empty( $widget_number ) )
|
1056 |
+
$class .= ' single';
|
1057 |
+
elseif ( $is_list )
|
1058 |
+
$class .= ' list';
|
1059 |
+
elseif ( ! $use_bxslider ) {
|
1060 |
+
if ( $is_first )
|
1061 |
+
$class .= ' active';
|
1062 |
+
elseif ( ! $is_first )
|
1063 |
+
$class .= ' display-none';
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
if ( $keep_whitespace )
|
1067 |
+
$class .= ' whitespace';
|
1068 |
+
|
1069 |
+
$post_id = $testimonial['post_id'];
|
1070 |
+
if ( ! empty( $post_id ) )
|
1071 |
+
$class = join( ' ', get_post_class( $class, $post_id ) );
|
1072 |
+
else
|
1073 |
+
$class = 'testimonials-widget type-testimonials-widget status-publish hentry ' . $class;
|
1074 |
+
|
1075 |
+
$class = apply_filters( 'testimonials_widget_get_testimonial_html_class', $class, $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1076 |
+
$div_open = '<!-- ' . self::ID . ":{$post_id}: -->";
|
1077 |
+
$div_open .= '<div class="' . $class . '">';
|
1078 |
+
|
1079 |
+
if ( $do_schema && $do_content )
|
1080 |
+
$div_open .= sprintf( self::$schema_div_open, self::$review_schema );
|
1081 |
+
|
1082 |
+
if ( $remove_hentry )
|
1083 |
+
$div_open = str_replace( ' hentry', '', $div_open );
|
1084 |
+
|
1085 |
+
$image = '';
|
1086 |
+
if ( $do_image ) {
|
1087 |
+
$pic = $testimonial['testimonial_image'];
|
1088 |
+
|
1089 |
+
$image .= '<span class="image">';
|
1090 |
+
$image .= $pic;
|
1091 |
+
$image .= '</span>';
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
if ( ! $do_image_single && 'get_single' == $atts['type'] )
|
1095 |
+
$image = '';
|
1096 |
+
|
1097 |
+
$quote = self::get_quote( $testimonial, $atts, $widget_number );
|
1098 |
+
|
1099 |
+
$cite = '';
|
1100 |
+
if ( 1 < count( $testimonial ) ) {
|
1101 |
+
$cite = self::get_cite( $testimonial, $atts );
|
1102 |
+
|
1103 |
+
if ( $do_schema ) {
|
1104 |
+
$schema = self::get_schema( $testimonial, $atts );
|
1105 |
+
$cite .= $schema;
|
1106 |
+
}
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
$extra = '';
|
1110 |
+
if ( ! empty( $testimonial['testimonial_extra'] ) ) {
|
1111 |
+
$extra .= '<div class="extra">';
|
1112 |
+
$extra .= $testimonial['testimonial_extra'];
|
1113 |
+
$extra .= '</div>';
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
$bottom_text = '';
|
1117 |
+
if ( ! empty( $atts['bottom_text'] ) ) {
|
1118 |
+
$bottom_text = '<div class="bottom_text">';
|
1119 |
+
$bottom_text .= $atts['bottom_text'];
|
1120 |
+
$bottom_text .= '</div>';
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
$div_close = '';
|
1124 |
+
if ( $do_schema && $do_content )
|
1125 |
+
$div_close .= '</div>';
|
1126 |
+
|
1127 |
+
$div_close .= '</div>';
|
1128 |
+
|
1129 |
+
$html = $div_open
|
1130 |
+
. $image
|
1131 |
+
. $quote
|
1132 |
+
. $cite
|
1133 |
+
. $extra
|
1134 |
+
. $bottom_text
|
1135 |
+
. $div_close;
|
1136 |
+
|
1137 |
+
$html = apply_filters( 'testimonials_widget_get_testimonial_html', $html, $testimonial, $atts, $is_list, $is_first, $widget_number, $div_open, $image, $quote, $cite, $extra, $bottom_text, $div_close );
|
1138 |
+
|
1139 |
+
// not done sooner as tag_close_quote is used for Premium
|
1140 |
+
if ( $disable_quotes ) {
|
1141 |
+
$html = str_replace( self::$tag_open_quote, '', $html );
|
1142 |
+
$html = str_replace( self::$tag_close_quote, '', $html );
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
return $html;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
|
1149 |
+
public static function get_quote( $testimonial, $atts, $widget_number ) {
|
1150 |
+
$char_limit = $atts['char_limit'];
|
1151 |
+
$content_more = apply_filters( 'testimonials_widget_content_more', esc_html__( '…', 'testimonials-widget' ) );
|
1152 |
+
$content_more .= self::$tag_close_quote;
|
1153 |
+
$do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
|
1154 |
+
$do_schema = $atts['enable_schema'];
|
1155 |
+
$use_quote_tag = $atts['use_quote_tag'];
|
1156 |
+
|
1157 |
+
$quote = '';
|
1158 |
+
if ( $do_content ) {
|
1159 |
+
$content = $testimonial['testimonial_content'];
|
1160 |
+
if ( $do_schema )
|
1161 |
+
$content = self::create_schema_span( self::$review_body, $content );
|
1162 |
+
|
1163 |
+
$content = self::format_content( $content, $widget_number, $atts );
|
1164 |
+
|
1165 |
+
if ( $char_limit ) {
|
1166 |
+
$content = self::testimonials_truncate( $content, $char_limit, $content_more );
|
1167 |
+
$content = force_balance_tags( $content );
|
1168 |
+
}
|
1169 |
+
|
1170 |
+
$content = apply_filters( 'testimonials_widget_content', $content, $widget_number, $testimonial, $atts );
|
1171 |
+
$content = make_clickable( $content );
|
1172 |
+
|
1173 |
+
if ( ! $use_quote_tag ) {
|
1174 |
+
$quote = '<blockquote>';
|
1175 |
+
$quote .= $content;
|
1176 |
+
$quote .= '</blockquote>';
|
1177 |
+
} else {
|
1178 |
+
$quote = '<q>';
|
1179 |
+
$quote .= $content;
|
1180 |
+
$quote .= '</q>';
|
1181 |
+
}
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
return $quote;
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
|
1188 |
+
public static function get_cite( $testimonial, $atts ) {
|
1189 |
+
extract( $testimonial );
|
1190 |
+
|
1191 |
+
$do_company = ! $atts['hide_company'] && ! empty( $testimonial_company );
|
1192 |
+
$do_email = ! $atts['hide_email'] && ! empty( $testimonial_email ) && is_email( $testimonial_email );
|
1193 |
+
$do_location = ! $atts['hide_location'] && ! empty( $testimonial_location );
|
1194 |
+
$do_source = ! $atts['hide_source'] && ! empty( $testimonial_source );
|
1195 |
+
$do_title = ! $atts['hide_title'] && ! empty( $testimonial_title );
|
1196 |
+
$do_url = ! $atts['hide_url'] && ! empty( $testimonial_url );
|
1197 |
+
$use_quote_tag = $atts['use_quote_tag'];
|
1198 |
+
|
1199 |
+
$cite = '';
|
1200 |
+
|
1201 |
+
$done_url = false;
|
1202 |
+
if ( $do_source && $do_email ) {
|
1203 |
+
$cite .= '<span class="author">';
|
1204 |
+
$cite .= '<a href="mailto:' . $testimonial_email . '">';
|
1205 |
+
$cite .= $testimonial_source;
|
1206 |
+
$cite .= '</a>';
|
1207 |
+
$cite .= '</span>';
|
1208 |
+
} elseif ( $do_source && ! $do_company && $do_url ) {
|
1209 |
+
$done_url = true;
|
1210 |
+
|
1211 |
+
$cite .= '<span class="author">';
|
1212 |
+
$cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
|
1213 |
+
$cite .= $testimonial_source;
|
1214 |
+
$cite .= '</a>';
|
1215 |
+
$cite .= '</span>';
|
1216 |
+
} elseif ( $do_source ) {
|
1217 |
+
$cite .= '<span class="author">';
|
1218 |
+
$cite .= $testimonial_source;
|
1219 |
+
$cite .= '</span>';
|
1220 |
+
} elseif ( $do_email ) {
|
1221 |
+
$cite .= '<span class="email">';
|
1222 |
+
$cite .= make_clickable( $testimonial_email );
|
1223 |
+
$cite .= '</span>';
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
if ( $do_title && $cite )
|
1227 |
+
$cite .= '<span class="join-title"></span>';
|
1228 |
|
1229 |
+
if ( $do_title ) {
|
1230 |
+
$cite .= '<span class="title">';
|
1231 |
+
$cite .= $testimonial_title;
|
1232 |
+
$cite .= '</span>';
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
if ( $do_location && $cite )
|
1236 |
+
$cite .= '<span class="join-location"></span>';
|
1237 |
|
1238 |
+
if ( $do_location ) {
|
1239 |
+
$cite .= '<span class="location">';
|
1240 |
+
$cite .= $testimonial_location;
|
1241 |
+
$cite .= '</span>';
|
1242 |
+
}
|
1243 |
|
1244 |
+
if ( ( $do_company || ( $do_url && ! $done_url ) ) && $cite )
|
1245 |
+
$cite .= '<span class="join"></span>';
|
1246 |
|
1247 |
+
if ( $do_company && $do_url ) {
|
1248 |
+
$cite .= '<span class="company">';
|
1249 |
+
$cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
|
1250 |
+
$cite .= $testimonial_company;
|
1251 |
+
$cite .= '</a>';
|
1252 |
+
$cite .= '</span>';
|
1253 |
+
} elseif ( $do_company ) {
|
1254 |
+
$cite .= '<span class="company">';
|
1255 |
+
$cite .= $testimonial_company;
|
1256 |
+
$cite .= '</span>';
|
1257 |
+
} elseif ( $do_url && ! $done_url ) {
|
1258 |
+
$cite .= '<span class="url">';
|
1259 |
+
$cite .= make_clickable( $testimonial_url );
|
1260 |
+
$cite .= '</span>';
|
1261 |
+
}
|
1262 |
|
1263 |
+
$cite = apply_filters( 'testimonials_widget_cite_html', $cite, $testimonial, $atts );
|
|
|
1264 |
|
1265 |
+
if ( ! empty( $cite ) ) {
|
1266 |
+
if ( ! $use_quote_tag ) {
|
1267 |
+
$temp = '<div class="credit">';
|
1268 |
+
$temp .= $cite;
|
1269 |
+
$temp .= '</div>';
|
1270 |
|
1271 |
+
$cite = $temp;
|
1272 |
+
} else {
|
1273 |
+
$cite = '<cite>' . $cite . '</cite>';
|
1274 |
+
}
|
1275 |
+
}
|
1276 |
|
1277 |
+
return $cite;
|
1278 |
+
}
|
1279 |
|
|
|
|
|
|
|
1280 |
|
1281 |
+
// Original PHP code as myTruncate2 by Chirp Internet: www.chirp.com.au
|
1282 |
+
public static function testimonials_truncate( $string, $char_limit = false, $pad = '…', $force_pad = false ) {
|
1283 |
+
if ( empty( $force_pad ) ) {
|
1284 |
+
if ( ! $char_limit )
|
1285 |
+
return $string;
|
1286 |
+
|
1287 |
+
// return with no change if string is shorter than $char_limit
|
1288 |
+
if ( strlen( $string ) <= $char_limit )
|
1289 |
+
return $string;
|
1290 |
+
}
|
1291 |
+
|
1292 |
+
if ( $char_limit )
|
1293 |
+
return self::truncate( $string, $char_limit, $pad, $force_pad );
|
1294 |
+
|
1295 |
+
return $string . $pad;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
|
1299 |
+
public static function format_content( $content, $widget_number, $atts ) {
|
1300 |
+
if ( empty ( $content ) )
|
1301 |
+
return $content;
|
1302 |
+
|
1303 |
+
$keep_whitespace = $atts['keep_whitespace'];
|
1304 |
+
$do_shortcode = $atts['do_shortcode'];
|
1305 |
+
|
1306 |
+
// wrap our own quote class around the content before any formatting
|
1307 |
+
// happens
|
1308 |
+
|
1309 |
+
$temp_content = self::$tag_open_quote;
|
1310 |
+
$temp_content .= $content;
|
1311 |
+
$temp_content .= self::$tag_close_quote;
|
1312 |
+
|
1313 |
+
$content = $temp_content;
|
1314 |
+
$content = trim( $content );
|
1315 |
+
$content = wptexturize( $content );
|
1316 |
+
$content = convert_smilies( $content );
|
1317 |
+
$content = convert_chars( $content );
|
1318 |
+
|
1319 |
+
if ( is_null( $widget_number ) || $keep_whitespace )
|
1320 |
+
$content = wpautop( $content );
|
1321 |
+
|
1322 |
+
$content = shortcode_unautop( $content );
|
1323 |
+
|
1324 |
+
if ( $do_shortcode )
|
1325 |
+
$content = do_shortcode( $content );
|
1326 |
+
else
|
1327 |
+
$content = strip_shortcodes( $content );
|
1328 |
+
|
1329 |
+
$content = str_replace( ']]>', ']]>', $content );
|
1330 |
+
$content = trim( $content );
|
1331 |
+
|
1332 |
+
return $content;
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
|
1336 |
+
public static function get_testimonials_paging( $atts, $prepend = true ) {
|
1337 |
+
$html = '';
|
1338 |
+
|
1339 |
+
if ( is_home() || 1 === self::$max_num_pages )
|
1340 |
+
return $html;
|
1341 |
+
|
1342 |
+
$html .= '<div class="paging';
|
1343 |
+
|
1344 |
+
if ( $prepend )
|
1345 |
+
$html .= ' prepend';
|
1346 |
+
else
|
1347 |
+
$html .= ' append';
|
1348 |
+
|
1349 |
+
$html .= '">';
|
1350 |
+
|
1351 |
+
if ( $atts['paged'] )
|
1352 |
+
$paged = $atts['paged'];
|
1353 |
+
else
|
1354 |
+
$paged = 1;
|
1355 |
+
|
1356 |
+
if ( ! function_exists( 'wp_pagenavi' ) ) {
|
1357 |
+
$html .= ' <div class="alignleft">';
|
1358 |
+
|
1359 |
+
if ( 1 < $paged ) {
|
1360 |
+
$laquo = apply_filters( 'testimonials_widget_previous_posts_link_text', esc_html__( '«', 'testimonials-widget' ) );
|
1361 |
+
$html .= get_previous_posts_link( $laquo, $paged );
|
1362 |
+
}
|
1363 |
+
|
1364 |
+
$html .= ' </div>';
|
1365 |
+
|
1366 |
+
$html .= ' <div class="alignright">';
|
1367 |
+
|
1368 |
+
if ( $paged != self::$max_num_pages ) {
|
1369 |
+
$raquo = apply_filters( 'testimonials_widget_next_posts_link_text', esc_html__( '»', 'testimonials-widget' ) );
|
1370 |
+
$html .= get_next_posts_link( $raquo, self::$max_num_pages );
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
$html .= ' </div>';
|
1374 |
+
} else {
|
1375 |
+
$args = array(
|
1376 |
+
'echo' => false,
|
1377 |
+
'query' => self::$wp_query,
|
1378 |
+
);
|
1379 |
+
$args = apply_filters( 'testimonials_widget_wp_pagenavi', $args );
|
1380 |
+
|
1381 |
+
$html .= wp_pagenavi( $args );
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
$html .= '</div>';
|
1385 |
+
|
1386 |
+
return $html;
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
|
1390 |
+
public static function get_testimonials_css() {
|
1391 |
+
if ( empty( self::$css_called ) ) {
|
1392 |
+
foreach ( self::$css as $css )
|
1393 |
+
echo $css;
|
1394 |
+
|
1395 |
+
self::$css_called = true;
|
1396 |
+
}
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
|
1400 |
+
public static function get_testimonials_scripts() {
|
1401 |
+
if ( empty( self::$scripts_called ) ) {
|
1402 |
+
foreach ( self::$scripts as $script )
|
1403 |
+
echo $script;
|
1404 |
+
|
1405 |
+
self::$scripts_called = true;
|
1406 |
+
}
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
|
1410 |
+
/**
|
1411 |
+
*
|
1412 |
+
*
|
1413 |
+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1414 |
+
*/
|
1415 |
+
public static function get_query_args( $atts ) {
|
1416 |
+
extract( $atts );
|
1417 |
+
|
1418 |
+
if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) )
|
1419 |
+
remove_filter( 'posts_orderby', 'CPTOrderPosts', 99, 2 );
|
1420 |
+
|
1421 |
+
if ( $random ) {
|
1422 |
+
$orderby = 'rand';
|
1423 |
+
$order = false;
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
$args = array(
|
1427 |
+
'orderby' => $orderby,
|
1428 |
+
'post_status' => array(
|
1429 |
+
'publish',
|
1430 |
+
'private',
|
1431 |
+
),
|
1432 |
+
'post_type' => Testimonials_Widget::PT,
|
1433 |
+
'posts_per_page' => $limit,
|
1434 |
+
);
|
1435 |
+
|
1436 |
+
if ( is_single() ) {
|
1437 |
+
$args['post_status'][] = 'pending';
|
1438 |
+
$args['post_status'][] = 'draft';
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
if ( $paging && ! empty( $atts['paged'] ) && is_singular() )
|
1442 |
+
$args['paged'] = $atts['paged'];
|
1443 |
+
|
1444 |
+
if ( ! $random && $meta_key ) {
|
1445 |
+
$args['meta_key'] = $meta_key;
|
1446 |
+
$args['orderby'] = 'meta_value';
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
if ( $order )
|
1450 |
+
$args['order'] = $order;
|
1451 |
+
|
1452 |
+
if ( $ids ) {
|
1453 |
+
$ids = explode( ',', $ids );
|
1454 |
+
|
1455 |
+
$args['post__in'] = $ids;
|
1456 |
+
|
1457 |
+
if ( 'none' == $args['orderby'] )
|
1458 |
+
add_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ), 10, 2 );
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
if ( $exclude ) {
|
1462 |
+
$exclude = explode( ',', $exclude );
|
1463 |
+
$args['post__not_in'] = $exclude;
|
1464 |
+
}
|
1465 |
+
|
1466 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
1467 |
+
if ( ! $use_cpt_taxonomy ) {
|
1468 |
+
if ( $category )
|
1469 |
+
$args['category_name'] = $category;
|
1470 |
+
|
1471 |
+
if ( $tags ) {
|
1472 |
+
$tags = explode( ',', $tags );
|
1473 |
+
|
1474 |
+
if ( $tags_all )
|
1475 |
+
$args['tag_slug__and'] = $tags;
|
1476 |
+
else
|
1477 |
+
$args['tag_slug__in'] = $tags;
|
1478 |
+
}
|
1479 |
+
} else {
|
1480 |
+
if ( $category )
|
1481 |
+
$args[ self::$cpt_category ] = $category;
|
1482 |
+
|
1483 |
+
if ( $tags ) {
|
1484 |
+
if ( $tags_all ) {
|
1485 |
+
$args[ 'tax_query' ] = array(
|
1486 |
+
'relation' => 'AND',
|
1487 |
+
);
|
1488 |
+
|
1489 |
+
$tags = explode( ',', $tags );
|
1490 |
+
foreach ( $tags as $term ) {
|
1491 |
+
$args[ 'tax_query' ][] = array(
|
1492 |
+
'taxonomy' => self::$cpt_tags,
|
1493 |
+
'terms' => array( $term ),
|
1494 |
+
'field' => 'slug',
|
1495 |
+
);
|
1496 |
+
}
|
1497 |
+
} else {
|
1498 |
+
$args[ self::$cpt_tags ] = $tags;
|
1499 |
+
}
|
1500 |
+
}
|
1501 |
+
}
|
1502 |
+
|
1503 |
+
$args = apply_filters( 'testimonials_widget_query_args', $args, $atts );
|
1504 |
+
|
1505 |
+
return $args;
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
|
1509 |
+
/**
|
1510 |
+
*
|
1511 |
+
*
|
1512 |
+
* @SuppressWarnings(PHPMD.LongVariable)
|
1513 |
+
*/
|
1514 |
+
public static function get_testimonials( $atts ) {
|
1515 |
+
$hide_gravatar = $atts['hide_gravatar'];
|
1516 |
+
|
1517 |
+
$args = self::get_query_args( $atts );
|
1518 |
+
$args['query'] = true;
|
1519 |
+
|
1520 |
+
$testimonials = apply_filters( 'testimonials_widget_cache_get', false, $args );
|
1521 |
+
if ( false === $testimonials ) {
|
1522 |
+
$testimonials = new WP_Query( $args );
|
1523 |
+
$testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
if ( has_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) ) )
|
1527 |
+
remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
|
1528 |
+
|
1529 |
+
self::$max_num_pages = $testimonials->max_num_pages;
|
1530 |
+
self::$found_posts = $testimonials->found_posts;
|
1531 |
+
self::$post_count = $testimonials->post_count;
|
1532 |
+
self::$wp_query = $testimonials;
|
1533 |
+
|
1534 |
+
wp_reset_postdata();
|
1535 |
+
|
1536 |
+
$image_size = apply_filters( 'testimonials_widget_image_size', 'thumbnail' );
|
1537 |
+
if ( ! is_array( $image_size ) ) {
|
1538 |
+
global $_wp_additional_image_sizes;
|
1539 |
+
if ( ! empty( $_wp_additional_image_sizes[ $image_size ] ) )
|
1540 |
+
$gravatar_size = $_wp_additional_image_sizes[ $image_size ]['width'];
|
1541 |
+
else
|
1542 |
+
$gravatar_size = get_option( $image_size . '_size_w' );
|
1543 |
+
|
1544 |
+
$gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $gravatar_size );
|
1545 |
+
} else
|
1546 |
+
$gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $image_size );
|
1547 |
+
|
1548 |
+
$testimonial_data = array();
|
1549 |
+
|
1550 |
+
if ( empty( self::$post_count ) )
|
1551 |
+
return $testimonial_data;
|
1552 |
+
|
1553 |
+
foreach ( $testimonials->posts as $row ) {
|
1554 |
+
$post_id = $row->ID;
|
1555 |
+
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
1556 |
+
|
1557 |
+
if ( has_post_thumbnail( $post_id ) ) {
|
1558 |
+
$image = get_the_post_thumbnail( $post_id, $image_size );
|
1559 |
+
} elseif ( ! $hide_gravatar && is_email( $email ) ) {
|
1560 |
+
$image = get_avatar( $email, $gravatar_size );
|
1561 |
+
|
1562 |
+
self::make_gravatar_featured( $post_id, $email );
|
1563 |
+
} else {
|
1564 |
+
$image = false;
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
$image = self::strip_protocol( $image );
|
1568 |
+
|
1569 |
+
$url = get_post_meta( $post_id, 'testimonials-widget-url', true );
|
1570 |
+
if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
1571 |
+
$url = 'http://' . $url;
|
1572 |
+
|
1573 |
+
$data = array(
|
1574 |
+
'post_id' => $post_id,
|
1575 |
+
'testimonial_company' => get_post_meta( $post_id, 'testimonials-widget-company', true ),
|
1576 |
+
'testimonial_content' => $row->post_content,
|
1577 |
+
'testimonial_email' => $email,
|
1578 |
+
'testimonial_extra' => '',
|
1579 |
+
'testimonial_image' => $image,
|
1580 |
+
'testimonial_location' => get_post_meta( $post_id, 'testimonials-widget-location', true ),
|
1581 |
+
'testimonial_source' => $row->post_title,
|
1582 |
+
'testimonial_title' => get_post_meta( $post_id, 'testimonials-widget-title', true ),
|
1583 |
+
'testimonial_url' => $url,
|
1584 |
+
);
|
1585 |
+
|
1586 |
+
$testimonial_data[] = $data;
|
1587 |
+
}
|
1588 |
+
|
1589 |
+
$testimonial_data = apply_filters( 'testimonials_widget_data', $testimonial_data, $atts );
|
1590 |
+
|
1591 |
+
return $testimonial_data;
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
|
1595 |
+
public static function posts_results_sort_none( $posts, $query ) {
|
1596 |
+
$order = $query->query_vars['post__in'];
|
1597 |
+
if ( empty( $order ) )
|
1598 |
+
return $posts;
|
1599 |
+
|
1600 |
+
$posts_none_sorted = array();
|
1601 |
+
// put posts in same orders as post__in
|
1602 |
+
foreach ( $order as $id ) {
|
1603 |
+
foreach ( $posts as $key => $post ) {
|
1604 |
+
if ( $id == $post->ID ) {
|
1605 |
+
$posts_none_sorted[] = $post;
|
1606 |
+
unset( $posts[$key] );
|
1607 |
+
}
|
1608 |
+
}
|
1609 |
+
}
|
1610 |
+
|
1611 |
+
return $posts_none_sorted;
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
|
1615 |
+
public static function widgets_init() {
|
1616 |
+
register_widget( 'Testimonials_Widget_Widget' );
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
|
1620 |
+
/**
|
1621 |
+
*
|
1622 |
+
*
|
1623 |
+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1624 |
+
*/
|
1625 |
+
public static function add_meta_box_testimonials_widget() {
|
1626 |
+
$fields = array(
|
1627 |
+
array(
|
1628 |
+
'name' => esc_html__( 'Job Title', 'testimonials-widget' ),
|
1629 |
+
'id' => 'testimonials-widget-title',
|
1630 |
+
'type' => 'text',
|
1631 |
+
'desc' => '',
|
1632 |
+
),
|
1633 |
+
array(
|
1634 |
+
'name' => esc_html__( 'Location', 'testimonials-widget' ),
|
1635 |
+
'id' => 'testimonials-widget-location',
|
1636 |
+
'type' => 'text',
|
1637 |
+
'desc' => '',
|
1638 |
+
),
|
1639 |
+
array(
|
1640 |
+
'name' => esc_html__( 'Email', 'testimonials-widget' ),
|
1641 |
+
'id' => 'testimonials-widget-email',
|
1642 |
+
'type' => 'text',
|
1643 |
+
'desc' => '',
|
1644 |
+
),
|
1645 |
+
array(
|
1646 |
+
'name' => esc_html__( 'Company', 'testimonials-widget' ),
|
1647 |
+
'id' => 'testimonials-widget-company',
|
1648 |
+
'type' => 'text',
|
1649 |
+
'desc' => '',
|
1650 |
+
),
|
1651 |
+
array(
|
1652 |
+
'name' => esc_html__( 'URL', 'testimonials-widget' ),
|
1653 |
+
'id' => 'testimonials-widget-url',
|
1654 |
+
'type' => 'text',
|
1655 |
+
'desc' => '',
|
1656 |
+
),
|
1657 |
+
);
|
1658 |
+
|
1659 |
+
$fields = apply_filters( 'testimonials_widget_meta_box', $fields );
|
1660 |
+
|
1661 |
+
$meta_box = redrokk_metabox_class::getInstance(
|
1662 |
+
self::ID,
|
1663 |
+
array(
|
1664 |
+
'title' => esc_html__( 'Testimonial Data', 'testimonials-widget' ),
|
1665 |
+
'description' => '',
|
1666 |
+
'_object_types' => 'testimonials-widget',
|
1667 |
+
'priority' => 'high',
|
1668 |
+
'_fields' => $fields,
|
1669 |
+
)
|
1670 |
+
);
|
1671 |
+
}
|
1672 |
+
|
1673 |
+
|
1674 |
+
/**
|
1675 |
+
* Revise default new testimonial text
|
1676 |
+
*
|
1677 |
+
* Original author: Travis Ballard http://www.travisballard.com
|
1678 |
+
*
|
1679 |
+
* @param string $translation
|
1680 |
+
* @return string $translation
|
1681 |
+
*/
|
1682 |
+
public static function gettext_testimonials( $translation ) {
|
1683 |
+
remove_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
1684 |
+
|
1685 |
+
global $post;
|
1686 |
+
|
1687 |
+
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1688 |
+
switch ( $translation ) {
|
1689 |
+
case esc_html__( 'Enter title here', 'testimonials-widget' ):
|
1690 |
+
return esc_html__( 'Enter testimonial source here', 'testimonials-widget' );
|
1691 |
+
break;
|
1692 |
+
}
|
1693 |
+
}
|
1694 |
+
|
1695 |
+
add_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
1696 |
+
|
1697 |
+
return $translation;
|
1698 |
+
}
|
1699 |
+
|
1700 |
+
|
1701 |
+
/**
|
1702 |
+
* Update messages for custom post type
|
1703 |
+
*
|
1704 |
+
* Original author: Travis Ballard http://www.travisballard.com
|
1705 |
+
*
|
1706 |
+
* @SuppressWarnings(PHPMD.Superglobals)
|
1707 |
+
* @param mixed $m
|
1708 |
+
* @return mixed $m
|
1709 |
+
*/
|
1710 |
+
public static function post_updated_messages( $m ) {
|
1711 |
+
global $post;
|
1712 |
+
|
1713 |
+
$m[ self::PT ] = array(
|
1714 |
+
0 => '', // Unused. Messages start at index 1.
|
1715 |
+
1 => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1716 |
+
2 => esc_html__( 'Custom field updated.', 'testimonials-widget' ),
|
1717 |
+
3 => esc_html__( 'Custom field deleted.', 'testimonials-widget' ),
|
1718 |
+
4 => esc_html__( 'Testimonial updated.', 'testimonials-widget' ),
|
1719 |
+
/* translators: %s: date and time of the revision */
|
1720 |
+
5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Testimonial restored to revision from %s', 'testimonials-widget' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
1721 |
+
6 => sprintf( __( 'Testimonial published. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1722 |
+
7 => esc_html__( 'Testimonial saved.', 'testimonials-widget' ),
|
1723 |
+
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 ) ) ) ),
|
1724 |
+
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 ) ) ),
|
1725 |
+
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 ) ) ) )
|
1726 |
+
);
|
1727 |
+
|
1728 |
+
return $m;
|
1729 |
+
}
|
1730 |
+
|
1731 |
+
|
1732 |
+
public static function right_now_content_table_end() {
|
1733 |
+
$content = '
|
1734 |
+
<tr>
|
1735 |
+
<td class="first b b-%1$s">%4$s%2$s%5$s</td>
|
1736 |
+
<td class="t %1$s">%4$s%3$s%5$s</td>
|
1737 |
+
</tr>';
|
1738 |
+
$posts = wp_count_posts( Testimonials_Widget::PT );
|
1739 |
+
$count = $posts->publish;
|
1740 |
+
$name = _n( 'Testimonial', 'Testimonials', $count, 'testimonials-widget' );
|
1741 |
+
$count_f = number_format_i18n( $count );
|
1742 |
+
$a_open = '<a href="edit.php?post_type=' . Testimonials_Widget::PT . '">';
|
1743 |
+
$a_close = '</a>';
|
1744 |
+
|
1745 |
+
if ( current_user_can( 'edit_others_posts' ) )
|
1746 |
+
$result = sprintf( $content, Testimonials_Widget::PT, $count_f, $name, $a_open, $a_close );
|
1747 |
+
else
|
1748 |
+
$result = sprintf( $content, Testimonials_Widget::PT, $count_f, $name, '', '' );
|
1749 |
+
|
1750 |
+
echo $result;
|
1751 |
+
}
|
1752 |
+
|
1753 |
+
|
1754 |
+
/**
|
1755 |
+
*
|
1756 |
+
*
|
1757 |
+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1758 |
+
*/
|
1759 |
+
public static function get_schema( $testimonial, $atts ) {
|
1760 |
+
foreach ( $testimonial as $key => $value ) {
|
1761 |
+
if ( 'testimonial_image' != $key )
|
1762 |
+
$testimonial[ $key ] = self::clean_string( $value );
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
extract( $testimonial );
|
1766 |
+
|
1767 |
+
$do_company = ! $atts['hide_company'] && ! empty( $testimonial_company );
|
1768 |
+
$do_email = ! $atts['hide_email'] && ! empty( $testimonial_email ) && is_email( $testimonial_email );
|
1769 |
+
$do_image = ! $atts['hide_image'] && ! empty( $testimonial_image );
|
1770 |
+
$do_location = ! $atts['hide_location'] && ! empty( $testimonial_location );
|
1771 |
+
$do_source = ! $atts['hide_source'] && ! empty( $testimonial_source );
|
1772 |
+
$do_title = ! $atts['hide_title'] && ! empty( $testimonial_title );
|
1773 |
+
$do_url = ! $atts['hide_url'] && ! empty( $testimonial_url );
|
1774 |
+
|
1775 |
+
$item_reviewed = self::clean_string( $atts['item_reviewed'] );
|
1776 |
+
$item_reviewed_url = self::clean_string( $atts['item_reviewed_url'] );
|
1777 |
+
|
1778 |
+
$schema = '';
|
1779 |
+
|
1780 |
+
$agg_meta = array();
|
1781 |
+
$author_meta = array();
|
1782 |
+
$item_meta = array();
|
1783 |
+
$location_meta = array();
|
1784 |
+
$org_meta = array();
|
1785 |
+
$review_meta = array();
|
1786 |
+
|
1787 |
+
if ( $do_source )
|
1788 |
+
$author_meta[ self::$thing_name ] = $testimonial_source;
|
1789 |
+
|
1790 |
+
if ( $do_title )
|
1791 |
+
$author_meta[ self::$person_job_title ] = $testimonial_title;
|
1792 |
+
|
1793 |
+
if ( $do_email )
|
1794 |
+
$author_meta[ self::$person_email ] = $testimonial_email;
|
1795 |
+
|
1796 |
+
if ( ! $do_company ) {
|
1797 |
+
if ( $do_url )
|
1798 |
+
$author_meta[ self::$thing_url ] = $testimonial_url;
|
1799 |
+
} else {
|
1800 |
+
if ( $do_url )
|
1801 |
+
$org_meta[ self::$thing_url ] = $testimonial_url;
|
1802 |
+
|
1803 |
+
$org_meta[ self::$thing_name ] = $testimonial_company;
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
if ( $do_location ) {
|
1807 |
+
$location_meta[ self::$thing_name ] = $testimonial_location;
|
1808 |
+
|
1809 |
+
if ( ! $do_company )
|
1810 |
+
$author_meta[ self::$person_home ] = array( self::$place_schema, $location_meta );
|
1811 |
+
else
|
1812 |
+
$org_meta[ self::$org_location ] = array( self::$place_schema, $location_meta );
|
1813 |
+
}
|
1814 |
+
|
1815 |
+
if ( ! empty( $author_meta ) && ! empty( $org_meta ) )
|
1816 |
+
$author_meta[ self::$person_member ] = array( self::$org_schema, $org_meta );
|
1817 |
+
elseif ( ! empty( $org_meta ) )
|
1818 |
+
$author_meta[ self::$cw_source_org ] = array( self::$org_schema, $org_meta );
|
1819 |
+
|
1820 |
+
$author_meta = apply_filters( 'testimonials_widget_schema_author', $author_meta, $testimonial, $atts );
|
1821 |
+
$author = self::create_schema_div_prop( self::$cw_author, self::$person_schema, $author_meta );
|
1822 |
+
$schema .= $author;
|
1823 |
+
|
1824 |
+
$post = get_post( $testimonial['post_id'] );
|
1825 |
+
$the_date = mysql2date( 'Y-m-d', $post->post_date );
|
1826 |
+
$the_date_mod = mysql2date( 'Y-m-d', $post->post_modified );
|
1827 |
+
|
1828 |
+
$review_name_length = apply_filters( 'testimonials_widget_review_name_length', 156 );
|
1829 |
+
|
1830 |
+
$review_meta[ self::$cw_date ] = $the_date;
|
1831 |
+
$review_meta[ self::$cw_date_mod ] = $the_date_mod;
|
1832 |
+
$review_meta[ self::$thing_name ] = self::testimonials_truncate( $testimonial_content, $review_name_length );
|
1833 |
+
$review_meta[ self::$thing_url ] = post_permalink( $post->ID );
|
1834 |
+
|
1835 |
+
if ( $do_image ) {
|
1836 |
+
$src = self::get_image_src( $testimonial_image );
|
1837 |
+
|
1838 |
+
$review_meta[ self::$thing_image ] = $src;
|
1839 |
+
}
|
1840 |
+
|
1841 |
+
$review_meta = apply_filters( 'testimonials_widget_schema_review', $review_meta, $testimonial, $atts );
|
1842 |
+
$review = self::create_schema_meta( $review_meta );
|
1843 |
+
$schema .= $review;
|
1844 |
+
|
1845 |
+
$agg_meta[ self::$agg_count ] = self::$found_posts;
|
1846 |
+
|
1847 |
+
$agg_meta = apply_filters( 'testimonials_widget_schema_aggregate', $agg_meta, $testimonial, $atts );
|
1848 |
+
$aggregate = self::create_schema_div_prop( self::$cw_aggregate, self::$agg_schema, $agg_meta );
|
1849 |
+
$schema .= $aggregate;
|
1850 |
+
|
1851 |
+
$item_meta[ self::$thing_name ] = $item_reviewed;
|
1852 |
+
$item_meta[ self::$thing_url ] = $item_reviewed_url;
|
1853 |
+
|
1854 |
+
$item_meta = apply_filters( 'testimonials_widget_schema_item', $item_meta, $testimonial, $atts );
|
1855 |
+
$item = self::create_schema_div_prop( self::$review_item, self::$thing_schema, $item_meta );
|
1856 |
+
$schema .= $item;
|
1857 |
+
|
1858 |
+
$schema = apply_filters( 'testimonials_widget_schema', $schema, $testimonial, $atts );
|
1859 |
+
|
1860 |
+
return $schema;
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
|
1864 |
+
public static function create_schema_meta( $meta_data ) {
|
1865 |
+
$meta = '';
|
1866 |
+
|
1867 |
+
if ( empty( $meta_data ) )
|
1868 |
+
return $meta;
|
1869 |
+
|
1870 |
+
foreach ( $meta_data as $key => $value ) {
|
1871 |
+
if ( is_array( $value ) )
|
1872 |
+
$meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
|
1873 |
+
else
|
1874 |
+
$meta .= sprintf( self::$schema_meta, $key, $value );
|
1875 |
+
}
|
1876 |
+
|
1877 |
+
return $meta;
|
1878 |
+
}
|
1879 |
+
|
1880 |
+
|
1881 |
+
public static function create_schema_span( $property_name, $span_data ) {
|
1882 |
+
$span = '';
|
1883 |
+
|
1884 |
+
if ( empty( $span_data ) )
|
1885 |
+
return $span;
|
1886 |
+
|
1887 |
+
$span = sprintf( self::$schema_span, $property_name, $span_data );
|
1888 |
+
|
1889 |
+
return $span;
|
1890 |
+
}
|
1891 |
+
|
1892 |
+
|
1893 |
+
public static function create_schema_div_prop( $property_name, $schema_name, $meta_data ) {
|
1894 |
+
$meta = '';
|
1895 |
+
$schema = '';
|
1896 |
+
|
1897 |
+
if ( empty( $meta_data ) )
|
1898 |
+
return $schema;
|
1899 |
+
|
1900 |
+
if ( is_array( $meta_data ) ) {
|
1901 |
+
foreach ( $meta_data as $key => $value ) {
|
1902 |
+
if ( is_array( $value ) )
|
1903 |
+
$meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
|
1904 |
+
else
|
1905 |
+
$meta .= sprintf( self::$schema_meta, $key, $value );
|
1906 |
+
}
|
1907 |
+
|
1908 |
+
$schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta );
|
1909 |
+
} else
|
1910 |
+
$schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta_data );
|
1911 |
+
|
1912 |
+
return $schema;
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
|
1916 |
+
public static function generate_css( $atts, $widget_number = null ) {
|
1917 |
+
$atts['subtype'] = 'css';
|
1918 |
+
|
1919 |
+
$css = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
1920 |
+
if ( false === $css ) {
|
1921 |
+
$css = self::get_testimonials_html_css( $atts, $widget_number );
|
1922 |
+
$css = apply_filters( 'testimonials_widget_cache_set', $css, $atts );
|
1923 |
+
}
|
1924 |
+
|
1925 |
+
if ( ! empty( $css ) ) {
|
1926 |
+
self::$css = array_merge( $css, self::$css );
|
1927 |
+
add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_css' ), 20 );
|
1928 |
+
}
|
1929 |
+
}
|
1930 |
+
|
1931 |
+
|
1932 |
+
public static function generate_js( $testimonials, $atts, $widget_number = null ) {
|
1933 |
+
$atts['subtype'] = 'js';
|
1934 |
+
|
1935 |
+
$js = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
1936 |
+
if ( false === $js ) {
|
1937 |
+
$js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
|
1938 |
+
$js = apply_filters( 'testimonials_widget_cache_set', $js, $atts );
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
if ( ! empty( $js ) ) {
|
1942 |
+
self::$scripts = array_merge( $js, self::$scripts );
|
1943 |
+
add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_scripts' ), 20 );
|
1944 |
+
}
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
|
1948 |
+
public static function call_scripts_styles( $testimonials, $atts, $widget_number = null ) {
|
1949 |
+
if ( is_null( $widget_number ) )
|
1950 |
+
$widget_number = Testimonials_Widget::get_instance();
|
1951 |
+
|
1952 |
+
self::scripts( $atts );
|
1953 |
+
self::styles();
|
1954 |
+
|
1955 |
+
self::generate_css( $atts );
|
1956 |
+
self::generate_js( $testimonials, $atts, $widget_number );
|
1957 |
+
}
|
1958 |
+
|
1959 |
+
|
1960 |
+
public static function make_gravatar_featured( $post_id, $email ) {
|
1961 |
+
$size = get_option( 'large_size_w' );
|
1962 |
+
$image = get_avatar( $email, $size );
|
1963 |
+
$src = self::get_image_src( $image );
|
1964 |
+
$file = sanitize_title( $email ) . '.jpeg';
|
1965 |
+
|
1966 |
+
self::add_media( $post_id, $src, $file );
|
1967 |
+
}
|
1968 |
+
|
1969 |
+
|
1970 |
+
public static function notice_2_15_0() {
|
1971 |
+
$text = sprintf( __( 'If your Testimonials display has gone to funky town, please <a href="%s">read the FAQ</a> about possible fixes.', 'testimonials-widget' ), esc_url( 'https://aihrus.zendesk.com/entries/28402246-Major-Change-for-2-15-0' ) );
|
1972 |
+
|
1973 |
+
self::notice_updated( $text );
|
1974 |
+
}
|
1975 |
+
|
1976 |
+
|
1977 |
+
public static function show_shortcodes() {
|
1978 |
+
echo '<div class="wrap">';
|
1979 |
+
echo '<div class="icon32" id="icon-options-general"></div>';
|
1980 |
+
echo '<h2>' . esc_html__( 'Testimonials Shortcode Examples', 'testimonials-widget' ) . '</h2>';
|
1981 |
+
|
1982 |
+
$shortcodes = <<<EOD
|
1983 |
+
<h3>[testimonialswidget_list]</h3>
|
1984 |
+
|
1985 |
+
<ul>
|
1986 |
+
<li><code>[testimonialswidget_list category="category-name"]</code> - Testimonial list by category</li>
|
1987 |
+
<li><code>[testimonialswidget_list category=product hide_not_found=true]</code> - Testimonial list by category and hide "No testimonials found" message</li>
|
1988 |
+
<li><code>[testimonialswidget_list category=product tags=widget limit=5]</code> - Testimonial list by tag, showing 5 at most</li>
|
1989 |
+
<li><code>[testimonialswidget_list char_limit=0 limit=-1]</code> - Show all testimonials on one page</li>
|
1990 |
+
<li><code>[testimonialswidget_list char_limit=0 target=_new limit=3 disable_quotes=true]</code> - Show 3 full-length testimonials, with opening and closing quote marks removed</li>
|
1991 |
+
<li><code>[testimonialswidget_list hide_source=true hide_url=true]</code> - Show testimonial list with source and urls hidden</li>
|
1992 |
+
<li><code>[testimonialswidget_list ids="1,11,111" paging=false]</code> - Show only these 3 testimonials</li>
|
1993 |
+
<li><code>[testimonialswidget_list meta_key=testimonials-widget-company order=asc limit=15]</code> - Show 15 testimonials, in company order</li>
|
1994 |
+
<li><code>[testimonialswidget_list order=ASC orderby=title]</code> - List testimonials by post title</li>
|
1995 |
+
<li><code>[testimonialswidget_list tags="test,fun" random=true exclude="2,22,333"]</code> - Select testimonials tagged with either "test" or "fun", in random order, but ignore those of the excluded ids</li>
|
1996 |
+
</ul>
|
1997 |
+
|
1998 |
+
<h3>[testimonialswidget_widget]</h3>
|
1999 |
+
|
2000 |
+
<ul>
|
2001 |
+
<li><code>[testimonialswidget_widget category=product order=asc height=300]</code> - Show rotating testimonials, in a fixed height container, of the product category, lowest post ids first</li>
|
2002 |
+
<li><code>[testimonialswidget_widget min_height=250 max_height=500]</code> - Show rotating testimonials in a box no smaller or bigger than 250 to 500 pixels in height</li>
|
2003 |
+
<li><code>[testimonialswidget_widget tags=sometag random=true]</code> - Show rotating, random testimonials having tag "sometag"</li>
|
2004 |
+
</ul>
|
2005 |
+
EOD;
|
2006 |
+
|
2007 |
+
$shortcodes = apply_filters( 'testimonials_widget_shortcodes', $shortcodes );
|
2008 |
+
|
2009 |
+
echo $shortcodes;
|
2010 |
+
echo '</div>';
|
2011 |
+
}
|
2012 |
+
|
2013 |
+
|
2014 |
+
public static function set_not_found( $not_found = false ) {
|
2015 |
+
self::$not_found = $not_found;
|
2016 |
+
}
|
2017 |
+
|
2018 |
+
|
2019 |
+
public static function get_not_found() {
|
2020 |
+
return self::$not_found;
|
2021 |
+
}
|
2022 |
+
|
2023 |
+
|
2024 |
+
public static function version_check() {
|
2025 |
+
$good_version = true;
|
2026 |
+
|
2027 |
+
return $good_version;
|
2028 |
+
}
|
2029 |
+
|
2030 |
+
|
2031 |
+
/**
|
2032 |
+
*
|
2033 |
+
*
|
2034 |
+
* @SuppressWarnings(PHPMD.Superglobals)
|
2035 |
+
*/
|
2036 |
+
public static function do_load() {
|
2037 |
+
$do_load = false;
|
2038 |
+
if ( ! empty( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'options.php' ) ) ) {
|
2039 |
+
$do_load = true;
|
2040 |
+
} elseif ( ! empty( $_REQUEST['post_type'] ) && self::PT == $_REQUEST['post_type'] ) {
|
2041 |
+
if ( ! empty( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'edit.php' ) ) ) {
|
2042 |
+
$do_load = true;
|
2043 |
+
} elseif ( ! empty( $_REQUEST['page'] ) && Testimonials_Widget_Settings::ID == $_REQUEST['page'] ) {
|
2044 |
+
$do_load = true;
|
2045 |
+
}
|
2046 |
+
}
|
2047 |
+
|
2048 |
+
return $do_load;
|
2049 |
+
}
|
2050 |
}
|
2051 |
|
2052 |
+
|
2053 |
+
register_activation_hook( __FILE__, array( 'Testimonials_Widget', 'activation' ) );
|
2054 |
+
register_deactivation_hook( __FILE__, array( 'Testimonials_Widget', 'deactivation' ) );
|
2055 |
+
register_uninstall_hook( __FILE__, array( 'Testimonials_Widget', 'uninstall' ) );
|
2056 |
+
|
2057 |
|
2058 |
add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
2059 |
|
2064 |
* @SuppressWarnings(PHPMD.LongVariable)
|
2065 |
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
2066 |
*/
|
2067 |
+
function testimonialswidget_init() {
|
2068 |
+
if ( Testimonials_Widget::version_check() ) {
|
2069 |
+
global $Testimonials_Widget_Settings;
|
2070 |
+
if ( is_null( $Testimonials_Widget_Settings ) )
|
2071 |
+
$Testimonials_Widget_Settings = new Testimonials_Widget_Settings();
|
|
|
2072 |
|
2073 |
+
global $Testimonials_Widget;
|
2074 |
+
if ( is_null( $Testimonials_Widget ) )
|
2075 |
+
$Testimonials_Widget = new Testimonials_Widget();
|
|
|
2076 |
}
|
2077 |
}
|
2078 |
|
2079 |
|
2080 |
+
function testimonialswidget_list( $atts = array() ) {
|
2081 |
+
global $Testimonials_Widget;
|
|
|
|
|
|
|
|
|
|
|
|
|
2082 |
|
2083 |
+
return $Testimonials_Widget->testimonialswidget_list( $atts );
|
|
|
2084 |
}
|
2085 |
|
2086 |
|
2087 |
+
function testimonialswidget_widget( $atts = array(), $widget_number = null ) {
|
2088 |
+
global $Testimonials_Widget;
|
|
|
2089 |
|
2090 |
+
return $Testimonials_Widget->testimonialswidget_widget( $atts, $widget_number );
|
|
|
2091 |
}
|
2092 |
|
2093 |
+
|
2094 |
?>
|