Version Description
-
remove_hentry
is now true by default
Download this release
Release Info
Developer | comprock |
Plugin | Testimonials Widget |
Version | 2.18.0 |
Comparing to | |
See all releases |
Code changes from version 2.17.1 to 2.18.0
- API.md +4 -0
- CHANGELOG.md +28 -0
- README.md +1 -2
- TODO.md +0 -11
- {css → assets/css}/images/bx_loader.gif +0 -0
- {css → assets/css}/images/controls.png +0 -0
- {css → assets/css}/jquery.bxslider.css +0 -0
- {css → assets/css}/testimonials-widget-2.14.0.css +0 -0
- {css → assets/css}/testimonials-widget-ie7.css +0 -0
- testimonials-widget.css → assets/css/testimonials-widget.css +1 -1
- {media → assets/images}/michael-cannon-red-square-300x2251.jpg +0 -0
- {js → assets/js}/jquery.bxslider.js +0 -0
- {js → assets/js}/jquery.easing.1.3.js +0 -0
- {js → assets/js}/jquery.fitvids.js +0 -0
- changelog.txt +0 -969
- forum-responses.txt +0 -16
- {lib → includes}/class-testimonials-widget-settings.php +13 -12
- {lib → includes}/class-testimonials-widget-widget.php +2 -2
- includes/class-testimonials-widget.php +2033 -0
- {lib/aihrus → includes/libraries/aihrus-framework}/CHANGELOG.md +12 -2
- {lib/aihrus → includes/libraries/aihrus-framework}/LICENSE +0 -0
- {lib/aihrus → includes/libraries/aihrus-framework}/README.md +13 -14
- {lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-common.php +5 -5
- {lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-licensing.php +0 -0
- {lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-settings.php +24 -16
- {lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-widget.php +2 -2
- {lib/aihrus → includes/libraries/aihrus-framework}/interface-aihrus-common.php +0 -0
- {lib/aihrus → includes/libraries/aihrus-framework}/interface-aihrus-licensing.php +0 -0
- {lib/aihrus → includes/libraries/aihrus-framework}/interface-aihrus-widget.php +0 -0
- {lib/aihrus → includes/libraries/aihrus-framework}/requirements.php +17 -17
- {lib → includes/libraries}/class-redrokk-metabox-class.php +0 -0
- {lib → includes}/requirements.php +1 -1
- languages/testimonials-widget.pot +348 -332
- lib/aihrus/.gitignore +0 -2
- lib/aihrus/TODO.md +0 -3
- phpcs.ruleset.xml +0 -31
- phpmd.ruleset.xml +0 -21
- readme.txt +16 -7
- testimonials-widget-ie7.css +0 -15
- testimonials-widget.php +33 -2035
API.md
CHANGED
@@ -179,6 +179,10 @@ The [Testimonials plugin](http://wordpress.org/plugins/testimonials-widget/) com
|
|
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).
|
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).
|
CHANGELOG.md
CHANGED
@@ -2,6 +2,34 @@
|
|
2 |
|
3 |
## master
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
## 2.17.1
|
6 |
* No show premium link when it's installed
|
7 |
* RESOLVE #34 Non-SSL protocol used for image inclusion
|
2 |
|
3 |
## master
|
4 |
|
5 |
+
## 2.18.0
|
6 |
+
* Add Codeship.io status
|
7 |
+
* Check for init and theme functions to exist
|
8 |
+
* CLOSE #11 Conflicts with "Re-order posts within Categories"
|
9 |
+
* Link to Testimonials by WooThemes migrator
|
10 |
+
* Move ci to tests
|
11 |
+
* Move CSS to assets
|
12 |
+
* Move files to assets
|
13 |
+
* Move lib to includes/libraries
|
14 |
+
* Move main class to own class file
|
15 |
+
* Remove Travis CI status
|
16 |
+
* RESOLVE #43 hatom feed errors
|
17 |
+
* RESOLVE #45 Plugin Disables Itself
|
18 |
+
* RESOLVE #7 Support subdirectory testimonial landing page
|
19 |
+
* RESOLVE Non-SSL protocol used for scripts and styles
|
20 |
+
* Revise required file paths
|
21 |
+
* Specify a “Text Domain” and “Domain Path”
|
22 |
+
* Update shortcode examples
|
23 |
+
* Update verbiage
|
24 |
+
* Use $plugin_assets than $plugin_path
|
25 |
+
|
26 |
+
## 2.17.3-alpha
|
27 |
+
* RESOLVE #44 Blank testimonial between each rotating testimonial
|
28 |
+
|
29 |
+
## 2.17.2
|
30 |
+
* RESOLVE Testimonials Premium load issue
|
31 |
+
* 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)
|
32 |
+
|
33 |
## 2.17.1
|
34 |
* No show premium link when it's installed
|
35 |
* RESOLVE #34 Non-SSL protocol used for image inclusion
|
README.md
CHANGED
@@ -1,8 +1,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 |
|
1 |
# README Testimonials WordPress Plugin
|
2 |
|
|
|
|
|
3 |
[Codeship status](https://www.codeship.io/projects/b5524630-43f6-0131-3b4d-76a8e32a74d4/status)
|
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 |
|
TODO.md
DELETED
@@ -1,11 +0,0 @@
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{css → assets/css}/images/bx_loader.gif
RENAMED
File without changes
|
{css → assets/css}/images/controls.png
RENAMED
File without changes
|
{css → assets/css}/jquery.bxslider.css
RENAMED
File without changes
|
{css → assets/css}/testimonials-widget-2.14.0.css
RENAMED
File without changes
|
{css → assets/css}/testimonials-widget-ie7.css
RENAMED
File without changes
|
testimonials-widget.css → assets/css/testimonials-widget.css
RENAMED
@@ -110,5 +110,5 @@
|
|
110 |
-webkit-box-shadow: none;
|
111 |
box-shadow: none;
|
112 |
border: none;
|
113 |
-
background:
|
114 |
}
|
110 |
-webkit-box-shadow: none;
|
111 |
box-shadow: none;
|
112 |
border: none;
|
113 |
+
background: transparent !important;
|
114 |
}
|
{media → assets/images}/michael-cannon-red-square-300x2251.jpg
RENAMED
File without changes
|
{js → assets/js}/jquery.bxslider.js
RENAMED
File without changes
|
{js → assets/js}/jquery.easing.1.3.js
RENAMED
File without changes
|
{js → assets/js}/jquery.fitvids.js
RENAMED
File without changes
|
changelog.txt
DELETED
@@ -1,969 +0,0 @@
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
forum-responses.txt
DELETED
@@ -1,16 +0,0 @@
|
|
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 |
-
Got a URL to share with me so that I can help further?
|
6 |
-
--
|
7 |
-
Are you okay now?
|
8 |
-
--
|
9 |
-
Did you guys give the Testimonials Widget 2.12.1 release a try yet?
|
10 |
-
|
11 |
-
That's correctly the recent memory leak.
|
12 |
-
--
|
13 |
-
Did the 2.12.1 update work for you?
|
14 |
-
--
|
15 |
-
Please send me an admin login via http://aihr.us/contact-aihrus/.
|
16 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{lib → includes}/class-testimonials-widget-settings.php
RENAMED
@@ -22,11 +22,11 @@
|
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
24 |
|
|
|
|
|
25 |
if ( class_exists( 'Testimonials_Widget_Settings' ) )
|
26 |
return;
|
27 |
|
28 |
-
require_once TW_DIR_LIB . '/aihrus/class-aihrus-settings.php';
|
29 |
-
|
30 |
|
31 |
class Testimonials_Widget_Settings extends Aihrus_Settings {
|
32 |
const ID = 'testimonialswidget_settings';
|
@@ -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,10 +99,7 @@ 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 |
-
$plugin_path = Testimonials_Widget::strip_protocol( $plugin_path );
|
104 |
-
|
105 |
-
self::$plugin_path = $plugin_path;
|
106 |
}
|
107 |
|
108 |
|
@@ -234,14 +231,14 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
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',
|
@@ -498,7 +495,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
498 |
'title' => esc_html__( 'Archive Page URL', 'testimonials-widget' ),
|
499 |
'desc' => sprintf( $desc, $site_url ),
|
500 |
'std' => 'testimonials-archive',
|
501 |
-
'validate' => '
|
502 |
'widget' => 0,
|
503 |
);
|
504 |
|
@@ -509,7 +506,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
509 |
'title' => esc_html__( 'Testimonial Page URL', 'testimonials-widget' ),
|
510 |
'desc' => $desc,
|
511 |
'std' => 'testimonial',
|
512 |
-
'validate' => '
|
513 |
'widget' => 0,
|
514 |
);
|
515 |
|
@@ -643,6 +640,7 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
643 |
'version' => '2.6.4',
|
644 |
'std' => 1,
|
645 |
),
|
|
|
646 |
);
|
647 |
|
648 |
self::$settings['reset_expand_end'] = array(
|
@@ -660,7 +658,10 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
660 |
public static function get_defaults( $mode = null, $old_version = null ) {
|
661 |
$old_version = tw_get_option( 'version' );
|
662 |
|
663 |
-
|
|
|
|
|
|
|
664 |
}
|
665 |
|
666 |
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
24 |
|
25 |
+
require_once TW_DIR_LIB . 'aihrus-framework/class-aihrus-settings.php';
|
26 |
+
|
27 |
if ( class_exists( 'Testimonials_Widget_Settings' ) )
|
28 |
return;
|
29 |
|
|
|
|
|
30 |
|
31 |
class Testimonials_Widget_Settings extends Aihrus_Settings {
|
32 |
const ID = 'testimonialswidget_settings';
|
35 |
public static $admin_page;
|
36 |
public static $class = __CLASS__;
|
37 |
public static $defaults = array();
|
38 |
+
public static $plugin_assets;
|
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 |
+
self::$plugin_assets = Testimonials_Widget::$plugin_assets;
|
|
|
|
|
|
|
103 |
}
|
104 |
|
105 |
|
231 |
);
|
232 |
|
233 |
self::$settings['item_reviewed'] = array(
|
234 |
+
'title' => esc_html__( 'Default Reviewed Item?', 'testimonials-widget' ),
|
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__( 'Default Reviewed Item URL?', 'testimonials-widget' ),
|
242 |
'desc' => esc_html__( 'URL of thing being referenced in testimonials', 'testimonials-widget' ),
|
243 |
'std' => network_site_url(),
|
244 |
'validate' => 'url',
|
495 |
'title' => esc_html__( 'Archive Page URL', 'testimonials-widget' ),
|
496 |
'desc' => sprintf( $desc, $site_url ),
|
497 |
'std' => 'testimonials-archive',
|
498 |
+
'validate' => 'slash_sanitize_title',
|
499 |
'widget' => 0,
|
500 |
);
|
501 |
|
506 |
'title' => esc_html__( 'Testimonial Page URL', 'testimonials-widget' ),
|
507 |
'desc' => $desc,
|
508 |
'std' => 'testimonial',
|
509 |
+
'validate' => 'slash_sanitize_title',
|
510 |
'widget' => 0,
|
511 |
);
|
512 |
|
640 |
'version' => '2.6.4',
|
641 |
'std' => 1,
|
642 |
),
|
643 |
+
'std' => 1,
|
644 |
);
|
645 |
|
646 |
self::$settings['reset_expand_end'] = array(
|
658 |
public static function get_defaults( $mode = null, $old_version = null ) {
|
659 |
$old_version = tw_get_option( 'version' );
|
660 |
|
661 |
+
$defaults = parent::get_defaults( $mode, $old_version );
|
662 |
+
$defaults = apply_filters( 'testimonials_widget_settings_defaults', $defaults );
|
663 |
+
|
664 |
+
return $defaults;
|
665 |
}
|
666 |
|
667 |
|
{lib → includes}/class-testimonials-widget-widget.php
RENAMED
@@ -16,11 +16,11 @@
|
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
|
|
|
|
19 |
if ( class_exists( 'Testimonials_Widget_Widget' ) )
|
20 |
return;
|
21 |
|
22 |
-
require_once TW_DIR_LIB . '/aihrus/class-aihrus-widget.php';
|
23 |
-
|
24 |
|
25 |
class Testimonials_Widget_Widget extends Aihrus_Widget {
|
26 |
const ID = 'testimonials_widget';
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
+
require_once TW_DIR_LIB . 'aihrus-framework/class-aihrus-widget.php';
|
20 |
+
|
21 |
if ( class_exists( 'Testimonials_Widget_Widget' ) )
|
22 |
return;
|
23 |
|
|
|
|
|
24 |
|
25 |
class Testimonials_Widget_Widget extends Aihrus_Widget {
|
26 |
const ID = 'testimonials_widget';
|
includes/class-testimonials-widget.php
ADDED
@@ -0,0 +1,2033 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright 2013 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 |
+
|
128 |
+
|
129 |
+
public static function admin_menu() {
|
130 |
+
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' ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
public static function init() {
|
135 |
+
add_filter( 'the_content', array( __CLASS__, 'get_single' ) );
|
136 |
+
|
137 |
+
load_plugin_textdomain( self::PT, false, 'testimonials-widget/languages' );
|
138 |
+
|
139 |
+
self::$cpt_category = self::PT . '-category';
|
140 |
+
self::$cpt_tags = self::PT . '-post_tag';
|
141 |
+
|
142 |
+
self::init_post_type();
|
143 |
+
|
144 |
+
$force_css_loading = tw_get_option( 'force_css_loading' );
|
145 |
+
if ( $force_css_loading )
|
146 |
+
self::styles();
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
public static function plugin_action_links( $links, $file ) {
|
151 |
+
if ( self::BASE == $file )
|
152 |
+
array_unshift( $links, self::$settings_link );
|
153 |
+
|
154 |
+
return $links;
|
155 |
+
}
|
156 |
+
|
157 |
+
|
158 |
+
public static function add_instance() {
|
159 |
+
self::$use_instance = false;
|
160 |
+
self::$instance_number++;
|
161 |
+
|
162 |
+
return self::$instance_number;
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
public static function get_instance() {
|
167 |
+
return self::$use_instance ? self::$instance_number : self::$instance_widget;
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
public static function set_instance( $widget_number ) {
|
172 |
+
self::$use_instance = true;
|
173 |
+
self::$instance_widget = $widget_number;
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
public static function support_thumbnails() {
|
178 |
+
$feature = 'post-thumbnails';
|
179 |
+
$feature_level = get_theme_support( $feature );
|
180 |
+
|
181 |
+
if ( true === $feature_level ) {
|
182 |
+
// already enabled for all post types
|
183 |
+
return;
|
184 |
+
} elseif ( false === $feature_level ) {
|
185 |
+
// none allowed, only enable for our own
|
186 |
+
add_theme_support( $feature, array( self::PT ) );
|
187 |
+
} else {
|
188 |
+
// add our own to list of supported
|
189 |
+
$feature_level[0][] = self::PT;
|
190 |
+
add_theme_support( $feature, $feature_level[0] );
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
public static function get_single( $content ) {
|
196 |
+
global $post;
|
197 |
+
|
198 |
+
if ( ! is_single() || self::PT != $post->post_type )
|
199 |
+
return $content;
|
200 |
+
|
201 |
+
$atts = self::get_defaults( true );
|
202 |
+
$atts['hide_content'] = 1;
|
203 |
+
$atts['ids'] = $post->ID;
|
204 |
+
$atts['type'] = 'get_single';
|
205 |
+
|
206 |
+
$instance = self::add_instance();
|
207 |
+
$atts['widget_number'] = $instance;
|
208 |
+
|
209 |
+
$testimonials = array();
|
210 |
+
|
211 |
+
$text = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
212 |
+
if ( false === $text ) {
|
213 |
+
$testimonials = self::get_testimonials( $atts );
|
214 |
+
$testimonial = $testimonials[0];
|
215 |
+
|
216 |
+
$details = self::get_testimonial_html( $testimonial, $atts );
|
217 |
+
$details = apply_filters( 'testimonials_widget_testimonial_html_single', $details, $testimonial, $atts );
|
218 |
+
|
219 |
+
$do_schema = $atts['enable_schema'];
|
220 |
+
if ( $do_schema )
|
221 |
+
$content = self::create_schema_span( self::$review_body, $content );
|
222 |
+
|
223 |
+
$content = apply_filters( 'testimonials_widget_testimonial_html_single_content', $content, $testimonial, $atts );
|
224 |
+
|
225 |
+
$text = $content . $details;
|
226 |
+
if ( $do_schema )
|
227 |
+
$text = self::create_schema_div_prop( self::$cw_review, self::$review_schema, $text );
|
228 |
+
|
229 |
+
$text = apply_filters( 'testimonials_widget_cache_set', $text, $atts );
|
230 |
+
}
|
231 |
+
|
232 |
+
self::call_scripts_styles( $testimonials, $atts, $instance );
|
233 |
+
|
234 |
+
return $text;
|
235 |
+
}
|
236 |
+
|
237 |
+
|
238 |
+
public static function activation() {
|
239 |
+
if ( ! current_user_can( 'activate_plugins' ) )
|
240 |
+
return;
|
241 |
+
|
242 |
+
self::init();
|
243 |
+
flush_rewrite_rules();
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
public static function deactivation() {
|
248 |
+
if ( ! current_user_can( 'activate_plugins' ) )
|
249 |
+
return;
|
250 |
+
|
251 |
+
flush_rewrite_rules();
|
252 |
+
}
|
253 |
+
|
254 |
+
|
255 |
+
public static function uninstall() {
|
256 |
+
if ( ! current_user_can( 'activate_plugins' ) )
|
257 |
+
return;
|
258 |
+
|
259 |
+
global $wpdb;
|
260 |
+
|
261 |
+
require_once TW_DIR_INC . 'class-testimonials-widget-settings.php';
|
262 |
+
|
263 |
+
$delete_data = tw_get_option( 'delete_data', false );
|
264 |
+
if ( $delete_data ) {
|
265 |
+
delete_option( self::OLD_NAME );
|
266 |
+
delete_option( Testimonials_Widget_Settings::ID );
|
267 |
+
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->options . '`' );
|
268 |
+
|
269 |
+
Testimonials_Widget::delete_testimonials();
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
|
274 |
+
public static function delete_testimonials() {
|
275 |
+
global $wpdb;
|
276 |
+
|
277 |
+
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = '" . self::PT . "'";
|
278 |
+
$posts = $wpdb->get_results( $query );
|
279 |
+
|
280 |
+
foreach ( $posts as $post ) {
|
281 |
+
$post_id = $post->ID;
|
282 |
+
Testimonials_Widget::delete_attachments( $post_id );
|
283 |
+
|
284 |
+
// dels post, meta & comments
|
285 |
+
// true is force delete
|
286 |
+
wp_delete_post( $post_id, true );
|
287 |
+
}
|
288 |
+
|
289 |
+
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->postmeta . '`' );
|
290 |
+
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->posts . '`' );
|
291 |
+
}
|
292 |
+
|
293 |
+
|
294 |
+
public static function delete_attachments( $post_id = false ) {
|
295 |
+
global $wpdb;
|
296 |
+
|
297 |
+
$post_id = $post_id ? $post_id : 0;
|
298 |
+
$query = "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_parent = {$post_id}";
|
299 |
+
$attachments = $wpdb->get_results( $query );
|
300 |
+
|
301 |
+
foreach ( $attachments as $attachment ) {
|
302 |
+
// true is force delete
|
303 |
+
wp_delete_attachment( $attachment->ID, true );
|
304 |
+
}
|
305 |
+
}
|
306 |
+
|
307 |
+
|
308 |
+
public static function plugin_row_meta( $input, $file ) {
|
309 |
+
if ( self::BASE != $file )
|
310 |
+
return $input;
|
311 |
+
|
312 |
+
$disable_donate = tw_get_option( 'disable_donate' );
|
313 |
+
if ( $disable_donate )
|
314 |
+
return $input;
|
315 |
+
|
316 |
+
$links = array(
|
317 |
+
self::$donate_link,
|
318 |
+
);
|
319 |
+
|
320 |
+
global $TW_Premium;
|
321 |
+
if ( ! isset( $TW_Premium ) )
|
322 |
+
$links[] = TW_PREMIUM_LINK;
|
323 |
+
|
324 |
+
$input = array_merge( $input, $links );
|
325 |
+
|
326 |
+
return $input;
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
public static function notice_2_12_0() {
|
331 |
+
$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' ) );
|
332 |
+
|
333 |
+
self::notice_updated( $text );
|
334 |
+
}
|
335 |
+
|
336 |
+
|
337 |
+
public static function notice_donate( $disable_donate = null, $item_name = null ) {
|
338 |
+
$disable_donate = tw_get_option( 'disable_donate' );
|
339 |
+
|
340 |
+
parent::notice_donate( $disable_donate, TW_NAME );
|
341 |
+
}
|
342 |
+
|
343 |
+
|
344 |
+
public static function update() {
|
345 |
+
$prior_version = tw_get_option( 'admin_notices' );
|
346 |
+
if ( $prior_version ) {
|
347 |
+
if ( $prior_version < '2.12.0' )
|
348 |
+
self::set_notice( 'notice_2_12_0' );
|
349 |
+
|
350 |
+
if ( $prior_version < '2.15.0' )
|
351 |
+
self::set_notice( 'notice_2_15_0' );
|
352 |
+
|
353 |
+
if ( $prior_version < self::VERSION )
|
354 |
+
do_action( 'testimonials_widget_update' );
|
355 |
+
|
356 |
+
tw_set_option( 'admin_notices' );
|
357 |
+
}
|
358 |
+
|
359 |
+
// display donate on major/minor version release
|
360 |
+
$donate_version = tw_get_option( 'donate_version', false );
|
361 |
+
if ( ! $donate_version || ( $donate_version != self::VERSION && preg_match( '#\.0$#', self::VERSION ) ) ) {
|
362 |
+
self::set_notice( 'notice_donate' );
|
363 |
+
tw_set_option( 'donate_version', self::VERSION );
|
364 |
+
}
|
365 |
+
|
366 |
+
$options = get_option( self::OLD_NAME );
|
367 |
+
if ( true !== $options['migrated'] )
|
368 |
+
self::migrate();
|
369 |
+
}
|
370 |
+
|
371 |
+
|
372 |
+
public static function migrate() {
|
373 |
+
global $wpdb;
|
374 |
+
|
375 |
+
$table_name = $wpdb->prefix . self::OLD_NAME;
|
376 |
+
$meta_key = '_' . self::PT . ':testimonial_id';
|
377 |
+
$has_table_query = "SELECT table_name FROM information_schema.tables WHERE table_schema='{$wpdb->dbname}' AND table_name='{$table_name}'";
|
378 |
+
$has_table_result = $wpdb->get_col( $has_table_query );
|
379 |
+
|
380 |
+
if ( ! empty( $has_table_result ) ) {
|
381 |
+
// check that db table exists and has entries
|
382 |
+
$query = 'SELECT `testimonial_id`, `testimonial`, `author`, `source`, `tags`, `public`, `time_added`, `time_updated` FROM `' . $table_name . '`';
|
383 |
+
|
384 |
+
// ignore already imported
|
385 |
+
$done_import_query = 'SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE meta_key = "' . $meta_key . '"';
|
386 |
+
$done_import = $wpdb->get_col( $done_import_query );
|
387 |
+
|
388 |
+
if ( ! empty( $done_import ) ) {
|
389 |
+
$done_import = array_unique( $done_import );
|
390 |
+
$query .= ' WHERE testimonial_id NOT IN ( ' . implode( ',', $done_import ) . ' )';
|
391 |
+
}
|
392 |
+
|
393 |
+
$results = $wpdb->get_results( $query );
|
394 |
+
if ( ! empty( $results ) ) {
|
395 |
+
foreach ( $results as $result ) {
|
396 |
+
// author can contain title and company details
|
397 |
+
$author = $result->author;
|
398 |
+
$company = false;
|
399 |
+
|
400 |
+
// ex: First Last of Company!
|
401 |
+
$author = str_replace( ' of ', ', ', $author );
|
402 |
+
// now ex: First Last, Company!
|
403 |
+
|
404 |
+
// ex: First Last, Company
|
405 |
+
// ex: First Last, Web Development Manager, Topcon Positioning Systems, Inc.
|
406 |
+
// ex: First Last, Owner, Company, LLC
|
407 |
+
$author = str_replace( ' of ', ', ', $author );
|
408 |
+
$temp_comma = '^^^';
|
409 |
+
$author = str_replace( ', LLC', $temp_comma . ' LLC', $author );
|
410 |
+
|
411 |
+
// now ex: First Last, Owner, Company^^^ LLC
|
412 |
+
$author = str_replace( ', Inc', $temp_comma . ' Inc', $author );
|
413 |
+
|
414 |
+
// ex: First Last, Web Development Manager, Company^^^ Inc.
|
415 |
+
// it's possible to have "Michael Cannon, Senior Developer" and "Senior Developer" become the company. Okay for now
|
416 |
+
$author = explode( ', ', $author );
|
417 |
+
|
418 |
+
if ( 1 < count( $author ) ) {
|
419 |
+
$company = array_pop( $author );
|
420 |
+
$company = str_replace( $temp_comma, ',', $company );
|
421 |
+
}
|
422 |
+
|
423 |
+
$author = implode( ', ', $author );
|
424 |
+
$author = str_replace( $temp_comma, ',', $author );
|
425 |
+
|
426 |
+
$post_data = array(
|
427 |
+
'post_type' => self::PT,
|
428 |
+
'post_status' => ( 'yes' == $result->public ) ? 'publish' : 'private',
|
429 |
+
'post_date' => $result->time_added,
|
430 |
+
'post_modified' => $result->time_updated,
|
431 |
+
'post_title' => $author,
|
432 |
+
'post_content' => $result->testimonial,
|
433 |
+
'tags_input' => $result->tags,
|
434 |
+
);
|
435 |
+
|
436 |
+
$post_id = wp_insert_post( $post_data, true );
|
437 |
+
|
438 |
+
// track/link testimonial import to new post
|
439 |
+
add_post_meta( $post_id, $meta_key, $result->testimonial_id );
|
440 |
+
|
441 |
+
if ( ! empty( $company ) )
|
442 |
+
add_post_meta( $post_id, 'testimonials-widget-company', $company );
|
443 |
+
|
444 |
+
$source = $result->source;
|
445 |
+
if ( ! empty( $source ) ) {
|
446 |
+
if ( is_email( $source ) ) {
|
447 |
+
add_post_meta( $post_id, 'testimonials-widget-email', $source );
|
448 |
+
} else {
|
449 |
+
add_post_meta( $post_id, 'testimonials-widget-url', $source );
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
$options['migrated'] = true;
|
457 |
+
delete_option( self::OLD_NAME );
|
458 |
+
add_option( self::OLD_NAME, $options, '', 'no' );
|
459 |
+
}
|
460 |
+
|
461 |
+
|
462 |
+
public static function pre_get_posts_author( $query ) {
|
463 |
+
global $user_ID;
|
464 |
+
|
465 |
+
// author's and below
|
466 |
+
if ( $query->is_admin && ! empty( $query->is_main_query ) && $query->is_post_type_archive( Testimonials_Widget::PT ) && ! current_user_can( 'edit_others_posts' ) )
|
467 |
+
$query->set( 'post_author', $user_ID );
|
468 |
+
|
469 |
+
return $query;
|
470 |
+
}
|
471 |
+
|
472 |
+
|
473 |
+
public static function manage_posts_custom_column( $column, $post_id ) {
|
474 |
+
$result = false;
|
475 |
+
|
476 |
+
switch ( $column ) {
|
477 |
+
case 'id':
|
478 |
+
$result = $post_id;
|
479 |
+
break;
|
480 |
+
|
481 |
+
case 'shortcode':
|
482 |
+
$result = '[testimonialswidget_list ids="';
|
483 |
+
$result .= $post_id;
|
484 |
+
$result .= '"]';
|
485 |
+
$result .= '<br />';
|
486 |
+
$result .= '[testimonialswidget_widget ids="';
|
487 |
+
$result .= $post_id;
|
488 |
+
$result .= '"]';
|
489 |
+
break;
|
490 |
+
|
491 |
+
case 'testimonials-widget-company':
|
492 |
+
case 'testimonials-widget-location':
|
493 |
+
case 'testimonials-widget-title':
|
494 |
+
$result = get_post_meta( $post_id, $column, true );
|
495 |
+
break;
|
496 |
+
|
497 |
+
case 'testimonials-widget-email':
|
498 |
+
case 'testimonials-widget-url':
|
499 |
+
$url = get_post_meta( $post_id, $column, true );
|
500 |
+
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
501 |
+
$url = 'http://' . $url;
|
502 |
+
|
503 |
+
$result = make_clickable( $url );
|
504 |
+
break;
|
505 |
+
|
506 |
+
case 'thumbnail':
|
507 |
+
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
508 |
+
|
509 |
+
if ( has_post_thumbnail( $post_id ) )
|
510 |
+
$result = get_the_post_thumbnail( $post_id, 'thumbnail' );
|
511 |
+
elseif ( is_email( $email ) )
|
512 |
+
$result = get_avatar( $email );
|
513 |
+
else
|
514 |
+
$result = false;
|
515 |
+
break;
|
516 |
+
|
517 |
+
case self::$cpt_category:
|
518 |
+
case self::$cpt_tags:
|
519 |
+
$terms = get_the_terms( $post_id, $column );
|
520 |
+
$result = '';
|
521 |
+
if ( ! empty( $terms ) ) {
|
522 |
+
$out = array();
|
523 |
+
foreach ( $terms as $term )
|
524 |
+
$out[] = '<a href="' . admin_url( 'edit-tags.php?action=edit&taxonomy=' . $column . '&tag_ID=' . $term->term_id . '&post_type=' . self::PT ) . '">' . $term->name . '</a>';
|
525 |
+
|
526 |
+
$result = join( ', ', $out );
|
527 |
+
}
|
528 |
+
break;
|
529 |
+
}
|
530 |
+
|
531 |
+
$result = apply_filters( 'testimonials_widget_posts_custom_column', $result, $column, $post_id );
|
532 |
+
|
533 |
+
if ( $result )
|
534 |
+
echo $result;
|
535 |
+
}
|
536 |
+
|
537 |
+
|
538 |
+
public static function manage_posts_columns( $columns ) {
|
539 |
+
// order of keys matches column ordering
|
540 |
+
$columns = array(
|
541 |
+
'cb' => '<input type="checkbox" />',
|
542 |
+
'id' => esc_html__( 'ID', 'testimonials-widget' ),
|
543 |
+
'thumbnail' => esc_html__( 'Image', 'testimonials-widget' ),
|
544 |
+
'title' => esc_html__( 'Source', 'testimonials-widget' ),
|
545 |
+
'shortcode' => esc_html__( 'Shortcodes', 'testimonials-widget' ),
|
546 |
+
'testimonials-widget-title' => esc_html__( 'Job Title', 'testimonials-widget' ),
|
547 |
+
'testimonials-widget-location' => esc_html__( 'Location', 'testimonials-widget' ),
|
548 |
+
'testimonials-widget-email' => esc_html__( 'Email', 'testimonials-widget' ),
|
549 |
+
'testimonials-widget-company' => esc_html__( 'Company', 'testimonials-widget' ),
|
550 |
+
'testimonials-widget-url' => esc_html__( 'URL', 'testimonials-widget' ),
|
551 |
+
'author' => esc_html__( 'Published by', 'testimonials-widget' ),
|
552 |
+
'date' => esc_html__( 'Date', 'testimonials-widget' ),
|
553 |
+
);
|
554 |
+
|
555 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
556 |
+
if ( ! $use_cpt_taxonomy ) {
|
557 |
+
$columns[ 'categories' ] = esc_html__( 'Category', 'testimonials-widget' );
|
558 |
+
$columns[ 'tags' ] = esc_html__( 'Tags', 'testimonials-widget' );
|
559 |
+
} else {
|
560 |
+
$columns[ self::$cpt_category ] = esc_html__( 'Category', 'testimonials-widget' );
|
561 |
+
$columns[ self::$cpt_tags ] = esc_html__( 'Tags', 'testimonials-widget' );
|
562 |
+
}
|
563 |
+
|
564 |
+
$columns = apply_filters( 'testimonials_widget_columns', $columns );
|
565 |
+
|
566 |
+
return $columns;
|
567 |
+
}
|
568 |
+
|
569 |
+
|
570 |
+
public static function init_post_type() {
|
571 |
+
$labels = array(
|
572 |
+
'add_new' => esc_html__( 'Add New', 'testimonials-widget' ),
|
573 |
+
'add_new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
574 |
+
'edit_item' => esc_html__( 'Edit Testimonial', 'testimonials-widget' ),
|
575 |
+
'name' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
576 |
+
'new_item' => esc_html__( 'Add New Testimonial', 'testimonials-widget' ),
|
577 |
+
'not_found' => esc_html__( 'No testimonials found', 'testimonials-widget' ),
|
578 |
+
'not_found_in_trash' => esc_html__( 'No testimonials found in Trash', 'testimonials-widget' ),
|
579 |
+
'parent_item_colon' => null,
|
580 |
+
'search_items' => esc_html__( 'Search Testimonials', 'testimonials-widget' ),
|
581 |
+
'singular_name' => esc_html__( 'Testimonial', 'testimonials-widget' ),
|
582 |
+
'view_item' => esc_html__( 'View Testimonial', 'testimonials-widget' ),
|
583 |
+
);
|
584 |
+
|
585 |
+
$supports = array(
|
586 |
+
'title',
|
587 |
+
'editor',
|
588 |
+
'thumbnail',
|
589 |
+
);
|
590 |
+
|
591 |
+
$allow_comments = tw_get_option( 'allow_comments', false );
|
592 |
+
if ( $allow_comments )
|
593 |
+
$supports[] = 'comments';
|
594 |
+
|
595 |
+
$has_archive = tw_get_option( 'has_archive', true );
|
596 |
+
$rewrite_slug = tw_get_option( 'rewrite_slug', 'testimonial' );
|
597 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
598 |
+
|
599 |
+
// editor's and up
|
600 |
+
if ( current_user_can( 'edit_others_posts' ) )
|
601 |
+
$supports[] = 'author';
|
602 |
+
|
603 |
+
if ( ! $use_cpt_taxonomy ) {
|
604 |
+
$do_register_taxonomy = false;
|
605 |
+
$taxonomies = array(
|
606 |
+
'category',
|
607 |
+
'post_tag',
|
608 |
+
);
|
609 |
+
} else {
|
610 |
+
$do_register_taxonomy = true;
|
611 |
+
$taxonomies = array(
|
612 |
+
self::$cpt_category,
|
613 |
+
self::$cpt_tags,
|
614 |
+
);
|
615 |
+
|
616 |
+
self::register_taxonomies();
|
617 |
+
}
|
618 |
+
|
619 |
+
$args = array(
|
620 |
+
'label' => esc_html__( 'Testimonials', 'testimonials-widget' ),
|
621 |
+
'capability_type' => 'post',
|
622 |
+
'has_archive' => $has_archive,
|
623 |
+
'hierarchical' => false,
|
624 |
+
'labels' => $labels,
|
625 |
+
'public' => true,
|
626 |
+
'publicly_queryable' => true,
|
627 |
+
'query_var' => true,
|
628 |
+
'rewrite' => array(
|
629 |
+
'slug' => $rewrite_slug,
|
630 |
+
'with_front' => false,
|
631 |
+
),
|
632 |
+
'supports' => $supports,
|
633 |
+
'taxonomies' => $taxonomies,
|
634 |
+
);
|
635 |
+
|
636 |
+
register_post_type( self::PT, $args );
|
637 |
+
|
638 |
+
if ( $do_register_taxonomy ) {
|
639 |
+
register_taxonomy_for_object_type( self::$cpt_category, self::PT );
|
640 |
+
register_taxonomy_for_object_type( self::$cpt_tags, self::PT );
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
|
645 |
+
public static function register_taxonomies() {
|
646 |
+
$args = array(
|
647 |
+
'hierarchical' => true,
|
648 |
+
'show_admin_column' => true,
|
649 |
+
);
|
650 |
+
register_taxonomy( self::$cpt_category, self::PT, $args );
|
651 |
+
|
652 |
+
$args = array(
|
653 |
+
'show_admin_column' => true,
|
654 |
+
'update_count_callback' => '_update_post_term_count',
|
655 |
+
);
|
656 |
+
register_taxonomy( self::$cpt_tags, self::PT, $args );
|
657 |
+
}
|
658 |
+
|
659 |
+
|
660 |
+
public static function get_defaults( $single_view = false ) {
|
661 |
+
if ( empty( $single_view ) )
|
662 |
+
return apply_filters( 'testimonials_widget_defaults', tw_get_options() );
|
663 |
+
else
|
664 |
+
return apply_filters( 'testimonials_widget_defaults_single', tw_get_options() );
|
665 |
+
}
|
666 |
+
|
667 |
+
|
668 |
+
public static function testimonialswidget_list( $atts ) {
|
669 |
+
$atts = wp_parse_args( $atts, self::get_defaults() );
|
670 |
+
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
671 |
+
|
672 |
+
if ( get_query_var( 'paged' ) ) {
|
673 |
+
$atts['paged'] = get_query_var( 'paged' );
|
674 |
+
} elseif ( get_query_var( 'page' ) ) {
|
675 |
+
$atts['paged'] = get_query_var( 'page' );
|
676 |
+
} else {
|
677 |
+
$atts['paged'] = 1;
|
678 |
+
}
|
679 |
+
|
680 |
+
$atts['type'] = 'testimonialswidget_list';
|
681 |
+
|
682 |
+
$instance = self::add_instance();
|
683 |
+
$atts['widget_number'] = $instance;
|
684 |
+
|
685 |
+
$testimonials = array();
|
686 |
+
|
687 |
+
$content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
688 |
+
if ( false === $content ) {
|
689 |
+
$testimonials = self::get_testimonials( $atts );
|
690 |
+
$content = self::get_testimonials_html( $testimonials, $atts );
|
691 |
+
$content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
|
692 |
+
}
|
693 |
+
|
694 |
+
self::call_scripts_styles( $testimonials, $atts, $instance );
|
695 |
+
|
696 |
+
return $content;
|
697 |
+
}
|
698 |
+
|
699 |
+
|
700 |
+
public static function testimonialswidget_widget( $atts, $widget_number = null ) {
|
701 |
+
if ( empty( $widget_number ) ) {
|
702 |
+
$widget_number = self::$widget_number++;
|
703 |
+
|
704 |
+
if ( ! isset( $atts['random'] ) )
|
705 |
+
$atts['random'] = 1;
|
706 |
+
|
707 |
+
if ( ! isset( $atts['enable_schema'] ) )
|
708 |
+
$atts['enable_schema'] = 0;
|
709 |
+
}
|
710 |
+
|
711 |
+
$atts = wp_parse_args( $atts, self::get_defaults() );
|
712 |
+
$atts = Testimonials_Widget_Settings::validate_settings( $atts );
|
713 |
+
|
714 |
+
$atts['paging'] = false;
|
715 |
+
$atts['type'] = 'testimonialswidget_widget';
|
716 |
+
|
717 |
+
self::set_instance( $widget_number );
|
718 |
+
$atts['widget_number'] = $widget_number;
|
719 |
+
|
720 |
+
$testimonials = array();
|
721 |
+
|
722 |
+
$content = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
723 |
+
if ( false === $content ) {
|
724 |
+
$testimonials = self::get_testimonials( $atts );
|
725 |
+
$content = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );
|
726 |
+
$content = apply_filters( 'testimonials_widget_cache_set', $content, $atts );
|
727 |
+
}
|
728 |
+
|
729 |
+
self::call_scripts_styles( $testimonials, $atts, $widget_number );
|
730 |
+
|
731 |
+
return $content;
|
732 |
+
}
|
733 |
+
|
734 |
+
|
735 |
+
public static function scripts( $atts ) {
|
736 |
+
if ( is_admin() )
|
737 |
+
return;
|
738 |
+
|
739 |
+
wp_enqueue_script( 'jquery' );
|
740 |
+
|
741 |
+
$use_bxslider = $atts['use_bxslider'];
|
742 |
+
if ( $use_bxslider ) {
|
743 |
+
$enable_video = $atts['enable_video'];
|
744 |
+
if ( $enable_video ) {
|
745 |
+
wp_register_script( 'jquery.fitvids', self::$plugin_assets . 'js/jquery.fitvids.js', array( 'jquery' ), '1.0' );
|
746 |
+
wp_enqueue_script( 'jquery.fitvids' );
|
747 |
+
}
|
748 |
+
|
749 |
+
wp_register_script( 'jquery.bxslider', self::$plugin_assets . 'js/jquery.bxslider.js', array( 'jquery' ), '4.1.1' );
|
750 |
+
wp_enqueue_script( 'jquery.bxslider' );
|
751 |
+
}
|
752 |
+
|
753 |
+
do_action( 'testimonials_widget_scripts', $atts );
|
754 |
+
}
|
755 |
+
|
756 |
+
|
757 |
+
public static function styles() {
|
758 |
+
if ( is_admin() )
|
759 |
+
return;
|
760 |
+
|
761 |
+
$use_bxslider = tw_get_option( 'use_bxslider' );
|
762 |
+
if ( $use_bxslider ) {
|
763 |
+
wp_register_style( 'jquery.bxslider', self::$plugin_assets . 'css/jquery.bxslider.css' );
|
764 |
+
wp_enqueue_style( 'jquery.bxslider' );
|
765 |
+
|
766 |
+
wp_register_style( __CLASS__, self::$plugin_assets . 'css/testimonials-widget.css' );
|
767 |
+
} else {
|
768 |
+
wp_register_style( __CLASS__, self::$plugin_assets . 'css/testimonials-widget-2.14.0.css' );
|
769 |
+
|
770 |
+
$include_ie7_css = tw_get_option( 'include_ie7_css' );
|
771 |
+
if ( $include_ie7_css ) {
|
772 |
+
wp_register_style( __CLASS__ . '-ie7', self::$plugin_assets . 'css/testimonials-widget-ie7.css' );
|
773 |
+
wp_enqueue_style( __CLASS__ . '-ie7' );
|
774 |
+
}
|
775 |
+
}
|
776 |
+
|
777 |
+
wp_enqueue_style( __CLASS__ );
|
778 |
+
|
779 |
+
do_action( 'testimonials_widget_styles' );
|
780 |
+
}
|
781 |
+
|
782 |
+
|
783 |
+
public static function get_testimonials_html_css( $atts, $widget_number = null ) {
|
784 |
+
$css = array();
|
785 |
+
$id_base = self::ID . $widget_number;
|
786 |
+
|
787 |
+
switch ( $atts['type'] ) {
|
788 |
+
case 'testimonialswidget_widget':
|
789 |
+
$use_bxslider = $atts['use_bxslider'];
|
790 |
+
if ( ! $use_bxslider ) {
|
791 |
+
$height = $atts['height'];
|
792 |
+
$max_height = $atts['max_height'];
|
793 |
+
$min_height = $atts['min_height'];
|
794 |
+
|
795 |
+
if ( $height ) {
|
796 |
+
$max_height = $height;
|
797 |
+
$min_height = $height;
|
798 |
+
}
|
799 |
+
|
800 |
+
if ( $min_height ) {
|
801 |
+
$css[] = <<<EOF
|
802 |
+
<style>
|
803 |
+
.$id_base {
|
804 |
+
min-height: {$min_height}px;
|
805 |
+
}
|
806 |
+
</style>
|
807 |
+
EOF;
|
808 |
+
}
|
809 |
+
|
810 |
+
if ( $max_height ) {
|
811 |
+
$css[] = <<<EOF
|
812 |
+
<style>
|
813 |
+
.$id_base {
|
814 |
+
max-height: {$max_height}px;
|
815 |
+
}
|
816 |
+
</style>
|
817 |
+
EOF;
|
818 |
+
}
|
819 |
+
}
|
820 |
+
break;
|
821 |
+
}
|
822 |
+
|
823 |
+
$css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
|
824 |
+
|
825 |
+
return $css;
|
826 |
+
}
|
827 |
+
|
828 |
+
|
829 |
+
public static function get_testimonials_html_js( $testimonials, $atts, $widget_number = null ) {
|
830 |
+
$not_found = self::get_not_found();
|
831 |
+
if ( $not_found )
|
832 |
+
return;
|
833 |
+
|
834 |
+
$scripts = array();
|
835 |
+
$scripts_internal = array();
|
836 |
+
|
837 |
+
$id = self::ID;
|
838 |
+
$id_base = $id . $widget_number;
|
839 |
+
|
840 |
+
switch ( $atts['type'] ) {
|
841 |
+
case 'testimonialswidget_widget':
|
842 |
+
$javascript = '';
|
843 |
+
if ( 1 < count( $testimonials ) ) {
|
844 |
+
$refresh_interval = $atts['refresh_interval'];
|
845 |
+
|
846 |
+
$javascript .= '<script type="text/javascript">' . "\n";
|
847 |
+
|
848 |
+
$use_bxslider = $atts['use_bxslider'];
|
849 |
+
if ( $use_bxslider ) {
|
850 |
+
$enable_video = $atts['enable_video'];
|
851 |
+
$show_start_stop = $atts['show_start_stop'];
|
852 |
+
$transition_mode = $atts['transition_mode'];
|
853 |
+
|
854 |
+
$auto = $refresh_interval ? 'true' : 'false';
|
855 |
+
$pager = ! $refresh_interval ? 'pager: true' : 'pager: false';
|
856 |
+
$pause = $refresh_interval * 1000;
|
857 |
+
$video = $enable_video ? "video: true,\nuseCSS: false" : 'video: false';
|
858 |
+
|
859 |
+
$autoControls = $show_start_stop ? 'autoControls: true,' : '';
|
860 |
+
|
861 |
+
$slider_var = self::SLUG . $widget_number;
|
862 |
+
$javascript .= <<<EOF
|
863 |
+
var {$slider_var} = null;
|
864 |
+
|
865 |
+
jQuery(document).ready(function() {
|
866 |
+
{$slider_var} = jQuery('.{$id_base}').bxSlider({
|
867 |
+
auto: {$auto},
|
868 |
+
{$autoControls}
|
869 |
+
autoHover: true,
|
870 |
+
controls: false,
|
871 |
+
mode: '{$transition_mode}',
|
872 |
+
{$pager},
|
873 |
+
pause: {$pause},
|
874 |
+
{$video},
|
875 |
+
slideMargin: 2
|
876 |
+
});
|
877 |
+
});
|
878 |
+
|
879 |
+
EOF;
|
880 |
+
} else {
|
881 |
+
$tw_padding = 'tw_padding' . $widget_number;
|
882 |
+
$tw_wrapper = 'tw_wrapper' . $widget_number;
|
883 |
+
|
884 |
+
$disable_animation = $atts['disable_animation'];
|
885 |
+
$fade_in_speed = $atts['fade_in_speed'];
|
886 |
+
$fade_out_speed = $atts['fade_out_speed'];
|
887 |
+
$height = $atts['height'];
|
888 |
+
$max_height = $atts['max_height'];
|
889 |
+
$min_height = $atts['min_height'];
|
890 |
+
|
891 |
+
$enable_animation = 1;
|
892 |
+
if ( $disable_animation || $height || $max_height || $min_height )
|
893 |
+
$enable_animation = 0;
|
894 |
+
|
895 |
+
if ( $refresh_interval ) {
|
896 |
+
$javascript .= <<<EOF
|
897 |
+
function nextTestimonial{$widget_number}() {
|
898 |
+
if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
|
899 |
+
var active = jQuery('.{$id_base} .active');
|
900 |
+
var next = (jQuery('.{$id_base} .active').next().length > 0) ? jQuery('.{$id_base} .active').next() : jQuery('.{$id_base} .testimonials-widget-testimonial:first-child');
|
901 |
+
|
902 |
+
active.fadeOut({$fade_out_speed}, function() {
|
903 |
+
active.removeClass('active');
|
904 |
+
next.fadeIn({$fade_in_speed});
|
905 |
+
next.removeClass('display-none');
|
906 |
+
next.addClass('active');
|
907 |
+
|
908 |
+
{INTERNAL_SCRIPTS}
|
909 |
+
|
910 |
+
// added padding
|
911 |
+
if ( {$enable_animation} )
|
912 |
+
{$tw_wrapper}.animate({ height: next.height() + {$tw_padding} });
|
913 |
+
});
|
914 |
+
}
|
915 |
+
}
|
916 |
+
|
917 |
+
jQuery(document).ready(function() {
|
918 |
+
jQuery('.{$id_base}').hover(function() {
|
919 |
+
jQuery(this).addClass('hovered')
|
920 |
+
}, function() {
|
921 |
+
jQuery(this).removeClass('hovered')
|
922 |
+
});
|
923 |
+
|
924 |
+
nextTestimonial{$widget_number}interval = setInterval('nextTestimonial{$widget_number}()', {$refresh_interval} * 1000);
|
925 |
+
});
|
926 |
+
|
927 |
+
EOF;
|
928 |
+
}
|
929 |
+
|
930 |
+
$javascript .= <<<EOF
|
931 |
+
if ( {$enable_animation} ) {
|
932 |
+
var {$tw_wrapper} = jQuery('.{$id_base}');
|
933 |
+
var {$tw_padding} = 0;
|
934 |
+
|
935 |
+
jQuery(document).ready(function() {
|
936 |
+
// tw_padding is the difference in height to take into account all styling options
|
937 |
+
{$tw_padding} = {$tw_wrapper}.height() - jQuery('.{$id_base} .testimonials-widget-testimonial').height();
|
938 |
+
|
939 |
+
// fixes first animation by defining height to adjust to
|
940 |
+
{$tw_wrapper}.height( {$tw_wrapper}.height() );
|
941 |
+
});
|
942 |
+
}
|
943 |
+
EOF;
|
944 |
+
}
|
945 |
+
|
946 |
+
$javascript .= "\n" . '</script>';
|
947 |
+
$scripts[ $id_base ] = $javascript;
|
948 |
+
}
|
949 |
+
break;
|
950 |
+
}
|
951 |
+
|
952 |
+
$scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
|
953 |
+
$scripts_internal = apply_filters( 'testimonials_widget_testimonials_js_internal', $scripts_internal, $testimonials, $atts, $widget_number );
|
954 |
+
$internal_scripts = implode( "\n", $scripts_internal );
|
955 |
+
$scripts = str_replace( '{INTERNAL_SCRIPTS}', $internal_scripts, $scripts );
|
956 |
+
|
957 |
+
return $scripts;
|
958 |
+
}
|
959 |
+
|
960 |
+
|
961 |
+
public static function get_testimonials_html( $testimonials, $atts, $is_list = true, $widget_number = null ) {
|
962 |
+
$hide_not_found = $atts['hide_not_found'];
|
963 |
+
$paging = Testimonials_Widget_Settings::is_true( $atts['paging'] );
|
964 |
+
$paging_before = ( 'before' === strtolower( $atts['paging'] ) );
|
965 |
+
$paging_after = ( 'after' === strtolower( $atts['paging'] ) );
|
966 |
+
$target = $atts['target'];
|
967 |
+
|
968 |
+
$id = self::ID;
|
969 |
+
|
970 |
+
if ( is_null( $widget_number ) ) {
|
971 |
+
$div_open = '<div class="' . $id;
|
972 |
+
|
973 |
+
if ( $is_list )
|
974 |
+
$div_open .= ' listing';
|
975 |
+
|
976 |
+
$div_open .= '">';
|
977 |
+
} else {
|
978 |
+
$id_base = $id . $widget_number;
|
979 |
+
$div_open = '<div class="' . $id . ' ' . $id_base . '">';
|
980 |
+
}
|
981 |
+
|
982 |
+
if ( empty( $testimonials ) && ! $hide_not_found ) {
|
983 |
+
$testimonials = array(
|
984 |
+
array( 'testimonial_content' => esc_html__( 'No testimonials found', 'testimonials-widget' ) ),
|
985 |
+
);
|
986 |
+
|
987 |
+
self::set_not_found( true );
|
988 |
+
} else
|
989 |
+
self::set_not_found();
|
990 |
+
|
991 |
+
$pre_paging = '';
|
992 |
+
if ( $paging || $paging_before )
|
993 |
+
$pre_paging = self::get_testimonials_paging( $atts );
|
994 |
+
|
995 |
+
$is_first = true;
|
996 |
+
|
997 |
+
$testimonial_content = '';
|
998 |
+
foreach ( $testimonials as $testimonial ) {
|
999 |
+
$content = self::get_testimonial_html( $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1000 |
+
if ( $target )
|
1001 |
+
$content = links_add_target( $content, $target );
|
1002 |
+
$content = apply_filters( 'testimonials_widget_testimonial_html', $content, $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1003 |
+
$is_first = false;
|
1004 |
+
|
1005 |
+
$testimonial_content .= $content;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
$post_paging = '';
|
1009 |
+
if ( $paging || $paging_after )
|
1010 |
+
$post_paging = self::get_testimonials_paging( $atts, false );
|
1011 |
+
|
1012 |
+
$div_close = '</div>';
|
1013 |
+
|
1014 |
+
$html = $div_open
|
1015 |
+
. $pre_paging
|
1016 |
+
. $testimonial_content
|
1017 |
+
. $post_paging
|
1018 |
+
. $div_close;
|
1019 |
+
|
1020 |
+
$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 );
|
1021 |
+
|
1022 |
+
return $html;
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
|
1026 |
+
public static function get_testimonial_html( $testimonial, $atts, $is_list = true, $is_first = false, $widget_number = null ) {
|
1027 |
+
$disable_quotes = $atts['disable_quotes'];
|
1028 |
+
$do_image = ! $atts['hide_image'] && ! empty( $testimonial['testimonial_image'] );
|
1029 |
+
$do_image_single = ! $atts['hide_image_single'];
|
1030 |
+
$do_content = ! $atts['hide_content'];
|
1031 |
+
$do_schema = $atts['enable_schema'];
|
1032 |
+
$keep_whitespace = $atts['keep_whitespace'];
|
1033 |
+
$remove_hentry = $atts['remove_hentry'];
|
1034 |
+
$use_bxslider = $atts['use_bxslider'];
|
1035 |
+
|
1036 |
+
$class = 'testimonials-widget-testimonial';
|
1037 |
+
if ( is_single() && empty( $widget_number ) )
|
1038 |
+
$class .= ' single';
|
1039 |
+
elseif ( $is_list )
|
1040 |
+
$class .= ' list';
|
1041 |
+
elseif ( ! $use_bxslider ) {
|
1042 |
+
if ( $is_first )
|
1043 |
+
$class .= ' active';
|
1044 |
+
elseif ( ! $is_first )
|
1045 |
+
$class .= ' display-none';
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
if ( $keep_whitespace )
|
1049 |
+
$class .= ' whitespace';
|
1050 |
+
|
1051 |
+
$post_id = $testimonial['post_id'];
|
1052 |
+
if ( ! empty( $post_id ) )
|
1053 |
+
$class = join( ' ', get_post_class( $class, $post_id ) );
|
1054 |
+
else
|
1055 |
+
$class = 'testimonials-widget type-testimonials-widget status-publish hentry ' . $class;
|
1056 |
+
|
1057 |
+
$class = apply_filters( 'testimonials_widget_get_testimonial_html_class', $class, $testimonial, $atts, $is_list, $is_first, $widget_number );
|
1058 |
+
$div_open = '<div class="' . $class . '">';
|
1059 |
+
$div_open .= '<!-- ' . self::ID . ":{$post_id}: -->";
|
1060 |
+
|
1061 |
+
if ( $do_schema && $do_content )
|
1062 |
+
$div_open .= sprintf( self::$schema_div_open, self::$review_schema );
|
1063 |
+
|
1064 |
+
if ( $remove_hentry )
|
1065 |
+
$div_open = str_replace( ' hentry', '', $div_open );
|
1066 |
+
|
1067 |
+
$image = '';
|
1068 |
+
if ( $do_image ) {
|
1069 |
+
$pic = $testimonial['testimonial_image'];
|
1070 |
+
|
1071 |
+
$image .= '<span class="image">';
|
1072 |
+
$image .= $pic;
|
1073 |
+
$image .= '</span>';
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
if ( ! $do_image_single && 'get_single' == $atts['type'] )
|
1077 |
+
$image = '';
|
1078 |
+
|
1079 |
+
$quote = self::get_quote( $testimonial, $atts, $widget_number );
|
1080 |
+
|
1081 |
+
$cite = '';
|
1082 |
+
if ( 1 < count( $testimonial ) ) {
|
1083 |
+
$cite = self::get_cite( $testimonial, $atts );
|
1084 |
+
|
1085 |
+
if ( $do_schema ) {
|
1086 |
+
$schema = self::get_schema( $testimonial, $atts );
|
1087 |
+
$cite .= $schema;
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
$extra = '';
|
1092 |
+
if ( ! empty( $testimonial['testimonial_extra'] ) ) {
|
1093 |
+
$extra .= '<div class="extra">';
|
1094 |
+
$extra .= $testimonial['testimonial_extra'];
|
1095 |
+
$extra .= '</div>';
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
$bottom_text = '';
|
1099 |
+
if ( ! empty( $atts['bottom_text'] ) ) {
|
1100 |
+
$bottom_text = '<div class="bottom_text">';
|
1101 |
+
$bottom_text .= $atts['bottom_text'];
|
1102 |
+
$bottom_text .= '</div>';
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
$div_close = '';
|
1106 |
+
if ( $do_schema && $do_content )
|
1107 |
+
$div_close .= '</div>';
|
1108 |
+
|
1109 |
+
$div_close .= '</div>';
|
1110 |
+
|
1111 |
+
$html = $div_open
|
1112 |
+
. $image
|
1113 |
+
. $quote
|
1114 |
+
. $cite
|
1115 |
+
. $extra
|
1116 |
+
. $bottom_text
|
1117 |
+
. $div_close;
|
1118 |
+
|
1119 |
+
$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 );
|
1120 |
+
|
1121 |
+
// not done sooner as tag_close_quote is used for Premium
|
1122 |
+
if ( $disable_quotes ) {
|
1123 |
+
$html = str_replace( self::$tag_open_quote, '', $html );
|
1124 |
+
$html = str_replace( self::$tag_close_quote, '', $html );
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
return $html;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
|
1131 |
+
public static function get_quote( $testimonial, $atts, $widget_number ) {
|
1132 |
+
$char_limit = $atts['char_limit'];
|
1133 |
+
$content_more = apply_filters( 'testimonials_widget_content_more', esc_html__( '…', 'testimonials-widget' ) );
|
1134 |
+
$content_more .= self::$tag_close_quote;
|
1135 |
+
$do_content = ! $atts['hide_content'] && ! empty( $testimonial['testimonial_content'] );
|
1136 |
+
$do_schema = $atts['enable_schema'];
|
1137 |
+
$use_quote_tag = $atts['use_quote_tag'];
|
1138 |
+
|
1139 |
+
$quote = '';
|
1140 |
+
if ( $do_content ) {
|
1141 |
+
$content = $testimonial['testimonial_content'];
|
1142 |
+
if ( $do_schema )
|
1143 |
+
$content = self::create_schema_span( self::$review_body, $content );
|
1144 |
+
|
1145 |
+
$content = self::format_content( $content, $widget_number, $atts );
|
1146 |
+
|
1147 |
+
if ( $char_limit ) {
|
1148 |
+
$content = self::testimonials_truncate( $content, $char_limit, $content_more );
|
1149 |
+
$content = force_balance_tags( $content );
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
$content = apply_filters( 'testimonials_widget_content', $content, $widget_number, $testimonial, $atts );
|
1153 |
+
$content = make_clickable( $content );
|
1154 |
+
|
1155 |
+
if ( ! $use_quote_tag ) {
|
1156 |
+
$quote = '<blockquote>';
|
1157 |
+
$quote .= $content;
|
1158 |
+
$quote .= '</blockquote>';
|
1159 |
+
} else {
|
1160 |
+
$quote = '<q>';
|
1161 |
+
$quote .= $content;
|
1162 |
+
$quote .= '</q>';
|
1163 |
+
}
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
return $quote;
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
|
1170 |
+
public static function get_cite( $testimonial, $atts ) {
|
1171 |
+
extract( $testimonial );
|
1172 |
+
|
1173 |
+
$do_company = ! $atts['hide_company'] && ! empty( $testimonial_company );
|
1174 |
+
$do_email = ! $atts['hide_email'] && ! empty( $testimonial_email ) && is_email( $testimonial_email );
|
1175 |
+
$do_location = ! $atts['hide_location'] && ! empty( $testimonial_location );
|
1176 |
+
$do_source = ! $atts['hide_source'] && ! empty( $testimonial_source );
|
1177 |
+
$do_title = ! $atts['hide_title'] && ! empty( $testimonial_title );
|
1178 |
+
$do_url = ! $atts['hide_url'] && ! empty( $testimonial_url );
|
1179 |
+
$use_quote_tag = $atts['use_quote_tag'];
|
1180 |
+
|
1181 |
+
$cite = '';
|
1182 |
+
|
1183 |
+
$done_url = false;
|
1184 |
+
if ( $do_source && $do_email ) {
|
1185 |
+
$cite .= '<span class="author">';
|
1186 |
+
$cite .= '<a href="mailto:' . $testimonial_email . '">';
|
1187 |
+
$cite .= $testimonial_source;
|
1188 |
+
$cite .= '</a>';
|
1189 |
+
$cite .= '</span>';
|
1190 |
+
} elseif ( $do_source && ! $do_company && $do_url ) {
|
1191 |
+
$done_url = true;
|
1192 |
+
|
1193 |
+
$cite .= '<span class="author">';
|
1194 |
+
$cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
|
1195 |
+
$cite .= $testimonial_source;
|
1196 |
+
$cite .= '</a>';
|
1197 |
+
$cite .= '</span>';
|
1198 |
+
} elseif ( $do_source ) {
|
1199 |
+
$cite .= '<span class="author">';
|
1200 |
+
$cite .= $testimonial_source;
|
1201 |
+
$cite .= '</span>';
|
1202 |
+
} elseif ( $do_email ) {
|
1203 |
+
$cite .= '<span class="email">';
|
1204 |
+
$cite .= make_clickable( $testimonial_email );
|
1205 |
+
$cite .= '</span>';
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
if ( $do_title && $cite )
|
1209 |
+
$cite .= '<span class="join-title"></span>';
|
1210 |
+
|
1211 |
+
if ( $do_title ) {
|
1212 |
+
$cite .= '<span class="title">';
|
1213 |
+
$cite .= $testimonial_title;
|
1214 |
+
$cite .= '</span>';
|
1215 |
+
}
|
1216 |
+
|
1217 |
+
if ( $do_location && $cite )
|
1218 |
+
$cite .= '<span class="join-location"></span>';
|
1219 |
+
|
1220 |
+
if ( $do_location ) {
|
1221 |
+
$cite .= '<span class="location">';
|
1222 |
+
$cite .= $testimonial_location;
|
1223 |
+
$cite .= '</span>';
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
if ( ( $do_company || ( $do_url && ! $done_url ) ) && $cite )
|
1227 |
+
$cite .= '<span class="join"></span>';
|
1228 |
+
|
1229 |
+
if ( $do_company && $do_url ) {
|
1230 |
+
$cite .= '<span class="company">';
|
1231 |
+
$cite .= '<a href="' . $testimonial_url . '" rel="nofollow">';
|
1232 |
+
$cite .= $testimonial_company;
|
1233 |
+
$cite .= '</a>';
|
1234 |
+
$cite .= '</span>';
|
1235 |
+
} elseif ( $do_company ) {
|
1236 |
+
$cite .= '<span class="company">';
|
1237 |
+
$cite .= $testimonial_company;
|
1238 |
+
$cite .= '</span>';
|
1239 |
+
} elseif ( $do_url && ! $done_url ) {
|
1240 |
+
$cite .= '<span class="url">';
|
1241 |
+
$cite .= make_clickable( $testimonial_url );
|
1242 |
+
$cite .= '</span>';
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
$cite = apply_filters( 'testimonials_widget_cite_html', $cite, $testimonial, $atts );
|
1246 |
+
|
1247 |
+
if ( ! empty( $cite ) ) {
|
1248 |
+
if ( ! $use_quote_tag ) {
|
1249 |
+
$temp = '<div class="credit">';
|
1250 |
+
$temp .= $cite;
|
1251 |
+
$temp .= '</div>';
|
1252 |
+
|
1253 |
+
$cite = $temp;
|
1254 |
+
} else {
|
1255 |
+
$cite = '<cite>' . $cite . '</cite>';
|
1256 |
+
}
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
return $cite;
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
|
1263 |
+
// Original PHP code as myTruncate2 by Chirp Internet: www.chirp.com.au
|
1264 |
+
public static function testimonials_truncate( $string, $char_limit = false, $pad = '…', $force_pad = false ) {
|
1265 |
+
if ( empty( $force_pad ) ) {
|
1266 |
+
if ( ! $char_limit )
|
1267 |
+
return $string;
|
1268 |
+
|
1269 |
+
// return with no change if string is shorter than $char_limit
|
1270 |
+
if ( strlen( $string ) <= $char_limit )
|
1271 |
+
return $string;
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
if ( $char_limit )
|
1275 |
+
return self::truncate( $string, $char_limit, $pad, $force_pad );
|
1276 |
+
|
1277 |
+
return $string . $pad;
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
|
1281 |
+
public static function format_content( $content, $widget_number, $atts ) {
|
1282 |
+
if ( empty ( $content ) )
|
1283 |
+
return $content;
|
1284 |
+
|
1285 |
+
$keep_whitespace = $atts['keep_whitespace'];
|
1286 |
+
$do_shortcode = $atts['do_shortcode'];
|
1287 |
+
|
1288 |
+
// wrap our own quote class around the content before any formatting
|
1289 |
+
// happens
|
1290 |
+
|
1291 |
+
$temp_content = self::$tag_open_quote;
|
1292 |
+
$temp_content .= $content;
|
1293 |
+
$temp_content .= self::$tag_close_quote;
|
1294 |
+
|
1295 |
+
$content = $temp_content;
|
1296 |
+
$content = trim( $content );
|
1297 |
+
$content = wptexturize( $content );
|
1298 |
+
$content = convert_smilies( $content );
|
1299 |
+
$content = convert_chars( $content );
|
1300 |
+
|
1301 |
+
if ( is_null( $widget_number ) || $keep_whitespace )
|
1302 |
+
$content = wpautop( $content );
|
1303 |
+
|
1304 |
+
$content = shortcode_unautop( $content );
|
1305 |
+
|
1306 |
+
if ( $do_shortcode )
|
1307 |
+
$content = do_shortcode( $content );
|
1308 |
+
else
|
1309 |
+
$content = strip_shortcodes( $content );
|
1310 |
+
|
1311 |
+
$content = str_replace( ']]>', ']]>', $content );
|
1312 |
+
$content = trim( $content );
|
1313 |
+
|
1314 |
+
return $content;
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
|
1318 |
+
public static function get_testimonials_paging( $atts, $prepend = true ) {
|
1319 |
+
$html = '';
|
1320 |
+
|
1321 |
+
if ( is_home() || 1 === self::$max_num_pages )
|
1322 |
+
return $html;
|
1323 |
+
|
1324 |
+
$html .= '<div class="paging';
|
1325 |
+
|
1326 |
+
if ( $prepend )
|
1327 |
+
$html .= ' prepend';
|
1328 |
+
else
|
1329 |
+
$html .= ' append';
|
1330 |
+
|
1331 |
+
$html .= '">';
|
1332 |
+
|
1333 |
+
if ( $atts['paged'] )
|
1334 |
+
$paged = $atts['paged'];
|
1335 |
+
else
|
1336 |
+
$paged = 1;
|
1337 |
+
|
1338 |
+
if ( ! function_exists( 'wp_pagenavi' ) ) {
|
1339 |
+
$html .= ' <div class="alignleft">';
|
1340 |
+
|
1341 |
+
if ( 1 < $paged ) {
|
1342 |
+
$laquo = apply_filters( 'testimonials_widget_previous_posts_link_text', esc_html__( '«', 'testimonials-widget' ) );
|
1343 |
+
$html .= get_previous_posts_link( $laquo, $paged );
|
1344 |
+
}
|
1345 |
+
|
1346 |
+
$html .= ' </div>';
|
1347 |
+
|
1348 |
+
$html .= ' <div class="alignright">';
|
1349 |
+
|
1350 |
+
if ( $paged != self::$max_num_pages ) {
|
1351 |
+
$raquo = apply_filters( 'testimonials_widget_next_posts_link_text', esc_html__( '»', 'testimonials-widget' ) );
|
1352 |
+
$html .= get_next_posts_link( $raquo, self::$max_num_pages );
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
$html .= ' </div>';
|
1356 |
+
} else {
|
1357 |
+
$args = array(
|
1358 |
+
'echo' => false,
|
1359 |
+
'query' => self::$wp_query,
|
1360 |
+
);
|
1361 |
+
$args = apply_filters( 'testimonials_widget_wp_pagenavi', $args );
|
1362 |
+
|
1363 |
+
$html .= wp_pagenavi( $args );
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
$html .= '</div>';
|
1367 |
+
|
1368 |
+
return $html;
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
|
1372 |
+
public static function get_testimonials_css() {
|
1373 |
+
if ( empty( self::$css_called ) ) {
|
1374 |
+
foreach ( self::$css as $css )
|
1375 |
+
echo $css;
|
1376 |
+
|
1377 |
+
self::$css_called = true;
|
1378 |
+
}
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
|
1382 |
+
public static function get_testimonials_scripts() {
|
1383 |
+
if ( empty( self::$scripts_called ) ) {
|
1384 |
+
foreach ( self::$scripts as $script )
|
1385 |
+
echo $script;
|
1386 |
+
|
1387 |
+
self::$scripts_called = true;
|
1388 |
+
}
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
|
1392 |
+
/**
|
1393 |
+
*
|
1394 |
+
*
|
1395 |
+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1396 |
+
*/
|
1397 |
+
public static function get_query_args( $atts ) {
|
1398 |
+
extract( $atts );
|
1399 |
+
|
1400 |
+
if ( has_filter( 'posts_orderby', 'CPTOrderPosts' ) )
|
1401 |
+
remove_filter( 'posts_orderby', 'CPTOrderPosts', 99, 2 );
|
1402 |
+
|
1403 |
+
if ( $random ) {
|
1404 |
+
$orderby = 'rand';
|
1405 |
+
$order = false;
|
1406 |
+
}
|
1407 |
+
|
1408 |
+
$args = array(
|
1409 |
+
'orderby' => $orderby,
|
1410 |
+
'post_status' => array(
|
1411 |
+
'publish',
|
1412 |
+
'private',
|
1413 |
+
),
|
1414 |
+
'post_type' => Testimonials_Widget::PT,
|
1415 |
+
'posts_per_page' => $limit,
|
1416 |
+
);
|
1417 |
+
|
1418 |
+
if ( is_single() ) {
|
1419 |
+
$args['post_status'][] = 'pending';
|
1420 |
+
$args['post_status'][] = 'draft';
|
1421 |
+
}
|
1422 |
+
|
1423 |
+
if ( $paging && ! empty( $atts['paged'] ) && is_singular() )
|
1424 |
+
$args['paged'] = $atts['paged'];
|
1425 |
+
|
1426 |
+
if ( ! $random && $meta_key ) {
|
1427 |
+
$args['meta_key'] = $meta_key;
|
1428 |
+
$args['orderby'] = 'meta_value';
|
1429 |
+
}
|
1430 |
+
|
1431 |
+
if ( $order )
|
1432 |
+
$args['order'] = $order;
|
1433 |
+
|
1434 |
+
if ( $ids ) {
|
1435 |
+
$ids = explode( ',', $ids );
|
1436 |
+
|
1437 |
+
$args['post__in'] = $ids;
|
1438 |
+
|
1439 |
+
if ( 'none' == $args['orderby'] )
|
1440 |
+
add_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ), 10, 2 );
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
if ( $exclude ) {
|
1444 |
+
$exclude = explode( ',', $exclude );
|
1445 |
+
$args['post__not_in'] = $exclude;
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
1449 |
+
if ( ! $use_cpt_taxonomy ) {
|
1450 |
+
if ( $category )
|
1451 |
+
$args['category_name'] = $category;
|
1452 |
+
|
1453 |
+
if ( $tags ) {
|
1454 |
+
$tags = explode( ',', $tags );
|
1455 |
+
|
1456 |
+
if ( $tags_all )
|
1457 |
+
$args['tag_slug__and'] = $tags;
|
1458 |
+
else
|
1459 |
+
$args['tag_slug__in'] = $tags;
|
1460 |
+
}
|
1461 |
+
} else {
|
1462 |
+
if ( $category )
|
1463 |
+
$args[ self::$cpt_category ] = $category;
|
1464 |
+
|
1465 |
+
if ( $tags ) {
|
1466 |
+
if ( $tags_all ) {
|
1467 |
+
$args[ 'tax_query' ] = array(
|
1468 |
+
'relation' => 'AND',
|
1469 |
+
);
|
1470 |
+
|
1471 |
+
$tags = explode( ',', $tags );
|
1472 |
+
foreach ( $tags as $term ) {
|
1473 |
+
$args[ 'tax_query' ][] = array(
|
1474 |
+
'taxonomy' => self::$cpt_tags,
|
1475 |
+
'terms' => array( $term ),
|
1476 |
+
'field' => 'slug',
|
1477 |
+
);
|
1478 |
+
}
|
1479 |
+
} else {
|
1480 |
+
$args[ self::$cpt_tags ] = $tags;
|
1481 |
+
}
|
1482 |
+
}
|
1483 |
+
}
|
1484 |
+
|
1485 |
+
$args = apply_filters( 'testimonials_widget_query_args', $args, $atts );
|
1486 |
+
|
1487 |
+
return $args;
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
|
1491 |
+
/**
|
1492 |
+
*
|
1493 |
+
*
|
1494 |
+
* @SuppressWarnings(PHPMD.LongVariable)
|
1495 |
+
*/
|
1496 |
+
public static function get_testimonials( $atts ) {
|
1497 |
+
$hide_gravatar = $atts['hide_gravatar'];
|
1498 |
+
|
1499 |
+
$args = self::get_query_args( $atts );
|
1500 |
+
$args['query'] = true;
|
1501 |
+
|
1502 |
+
$testimonials = apply_filters( 'testimonials_widget_cache_get', false, $args );
|
1503 |
+
if ( false === $testimonials ) {
|
1504 |
+
$testimonials = new WP_Query( $args );
|
1505 |
+
$testimonials = apply_filters( 'testimonials_widget_cache_set', $testimonials, $args );
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
if ( has_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) ) )
|
1509 |
+
remove_filter( 'posts_results', array( 'Testimonials_Widget', 'posts_results_sort_none' ) );
|
1510 |
+
|
1511 |
+
self::$max_num_pages = $testimonials->max_num_pages;
|
1512 |
+
self::$found_posts = $testimonials->found_posts;
|
1513 |
+
self::$post_count = $testimonials->post_count;
|
1514 |
+
self::$wp_query = $testimonials;
|
1515 |
+
|
1516 |
+
wp_reset_postdata();
|
1517 |
+
|
1518 |
+
$image_size = apply_filters( 'testimonials_widget_image_size', 'thumbnail' );
|
1519 |
+
if ( ! is_array( $image_size ) ) {
|
1520 |
+
global $_wp_additional_image_sizes;
|
1521 |
+
if ( ! empty( $_wp_additional_image_sizes[ $image_size ] ) )
|
1522 |
+
$gravatar_size = $_wp_additional_image_sizes[ $image_size ]['width'];
|
1523 |
+
else
|
1524 |
+
$gravatar_size = get_option( $image_size . '_size_w' );
|
1525 |
+
|
1526 |
+
$gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $gravatar_size );
|
1527 |
+
} else
|
1528 |
+
$gravatar_size = apply_filters( 'testimonials_widget_gravatar_size', $image_size );
|
1529 |
+
|
1530 |
+
$testimonial_data = array();
|
1531 |
+
|
1532 |
+
if ( empty( self::$post_count ) )
|
1533 |
+
return $testimonial_data;
|
1534 |
+
|
1535 |
+
foreach ( $testimonials->posts as $row ) {
|
1536 |
+
$post_id = $row->ID;
|
1537 |
+
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
1538 |
+
|
1539 |
+
if ( has_post_thumbnail( $post_id ) ) {
|
1540 |
+
$image = get_the_post_thumbnail( $post_id, $image_size );
|
1541 |
+
} elseif ( ! $hide_gravatar && is_email( $email ) ) {
|
1542 |
+
$image = get_avatar( $email, $gravatar_size );
|
1543 |
+
|
1544 |
+
self::make_gravatar_featured( $post_id, $email );
|
1545 |
+
} else {
|
1546 |
+
$image = false;
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
$image = self::strip_protocol( $image );
|
1550 |
+
|
1551 |
+
$url = get_post_meta( $post_id, 'testimonials-widget-url', true );
|
1552 |
+
if ( ! empty( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
1553 |
+
$url = 'http://' . $url;
|
1554 |
+
|
1555 |
+
$data = array(
|
1556 |
+
'post_id' => $post_id,
|
1557 |
+
'testimonial_company' => get_post_meta( $post_id, 'testimonials-widget-company', true ),
|
1558 |
+
'testimonial_content' => $row->post_content,
|
1559 |
+
'testimonial_email' => $email,
|
1560 |
+
'testimonial_extra' => '',
|
1561 |
+
'testimonial_image' => $image,
|
1562 |
+
'testimonial_location' => get_post_meta( $post_id, 'testimonials-widget-location', true ),
|
1563 |
+
'testimonial_source' => $row->post_title,
|
1564 |
+
'testimonial_title' => get_post_meta( $post_id, 'testimonials-widget-title', true ),
|
1565 |
+
'testimonial_url' => $url,
|
1566 |
+
);
|
1567 |
+
|
1568 |
+
$testimonial_data[] = $data;
|
1569 |
+
}
|
1570 |
+
|
1571 |
+
$testimonial_data = apply_filters( 'testimonials_widget_data', $testimonial_data, $atts );
|
1572 |
+
|
1573 |
+
return $testimonial_data;
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
|
1577 |
+
public static function posts_results_sort_none( $posts, $query ) {
|
1578 |
+
$order = $query->query_vars['post__in'];
|
1579 |
+
if ( empty( $order ) )
|
1580 |
+
return $posts;
|
1581 |
+
|
1582 |
+
$posts_none_sorted = array();
|
1583 |
+
// put posts in same orders as post__in
|
1584 |
+
foreach ( $order as $id ) {
|
1585 |
+
foreach ( $posts as $key => $post ) {
|
1586 |
+
if ( $id == $post->ID ) {
|
1587 |
+
$posts_none_sorted[] = $post;
|
1588 |
+
unset( $posts[$key] );
|
1589 |
+
}
|
1590 |
+
}
|
1591 |
+
}
|
1592 |
+
|
1593 |
+
return $posts_none_sorted;
|
1594 |
+
}
|
1595 |
+
|
1596 |
+
|
1597 |
+
public static function widgets_init() {
|
1598 |
+
register_widget( 'Testimonials_Widget_Widget' );
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
|
1602 |
+
/**
|
1603 |
+
*
|
1604 |
+
*
|
1605 |
+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1606 |
+
*/
|
1607 |
+
public static function add_meta_box_testimonials_widget() {
|
1608 |
+
$fields = array(
|
1609 |
+
array(
|
1610 |
+
'name' => esc_html__( 'Job Title', 'testimonials-widget' ),
|
1611 |
+
'id' => 'testimonials-widget-title',
|
1612 |
+
'type' => 'text',
|
1613 |
+
'desc' => '',
|
1614 |
+
),
|
1615 |
+
array(
|
1616 |
+
'name' => esc_html__( 'Location', 'testimonials-widget' ),
|
1617 |
+
'id' => 'testimonials-widget-location',
|
1618 |
+
'type' => 'text',
|
1619 |
+
'desc' => '',
|
1620 |
+
),
|
1621 |
+
array(
|
1622 |
+
'name' => esc_html__( 'Email', 'testimonials-widget' ),
|
1623 |
+
'id' => 'testimonials-widget-email',
|
1624 |
+
'type' => 'text',
|
1625 |
+
'desc' => '',
|
1626 |
+
),
|
1627 |
+
array(
|
1628 |
+
'name' => esc_html__( 'Company', 'testimonials-widget' ),
|
1629 |
+
'id' => 'testimonials-widget-company',
|
1630 |
+
'type' => 'text',
|
1631 |
+
'desc' => '',
|
1632 |
+
),
|
1633 |
+
array(
|
1634 |
+
'name' => esc_html__( 'URL', 'testimonials-widget' ),
|
1635 |
+
'id' => 'testimonials-widget-url',
|
1636 |
+
'type' => 'text',
|
1637 |
+
'desc' => '',
|
1638 |
+
),
|
1639 |
+
);
|
1640 |
+
|
1641 |
+
$fields = apply_filters( 'testimonials_widget_meta_box', $fields );
|
1642 |
+
|
1643 |
+
$meta_box = redrokk_metabox_class::getInstance(
|
1644 |
+
self::ID,
|
1645 |
+
array(
|
1646 |
+
'title' => esc_html__( 'Testimonial Data', 'testimonials-widget' ),
|
1647 |
+
'description' => '',
|
1648 |
+
'_object_types' => 'testimonials-widget',
|
1649 |
+
'priority' => 'high',
|
1650 |
+
'_fields' => $fields,
|
1651 |
+
)
|
1652 |
+
);
|
1653 |
+
}
|
1654 |
+
|
1655 |
+
|
1656 |
+
/**
|
1657 |
+
* Revise default new testimonial text
|
1658 |
+
*
|
1659 |
+
* Original author: Travis Ballard http://www.travisballard.com
|
1660 |
+
*
|
1661 |
+
* @param string $translation
|
1662 |
+
* @return string $translation
|
1663 |
+
*/
|
1664 |
+
public static function gettext_testimonials( $translation ) {
|
1665 |
+
remove_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
1666 |
+
|
1667 |
+
global $post;
|
1668 |
+
|
1669 |
+
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1670 |
+
switch ( $translation ) {
|
1671 |
+
case esc_html__( 'Enter title here', 'testimonials-widget' ):
|
1672 |
+
return esc_html__( 'Enter testimonial source here', 'testimonials-widget' );
|
1673 |
+
break;
|
1674 |
+
}
|
1675 |
+
}
|
1676 |
+
|
1677 |
+
add_action( 'gettext', array( __CLASS__, 'gettext_testimonials' ) );
|
1678 |
+
|
1679 |
+
return $translation;
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
|
1683 |
+
/**
|
1684 |
+
* Update messages for custom post type
|
1685 |
+
*
|
1686 |
+
* Original author: Travis Ballard http://www.travisballard.com
|
1687 |
+
*
|
1688 |
+
* @SuppressWarnings(PHPMD.Superglobals)
|
1689 |
+
* @param mixed $m
|
1690 |
+
* @return mixed $m
|
1691 |
+
*/
|
1692 |
+
public static function post_updated_messages( $m ) {
|
1693 |
+
global $post;
|
1694 |
+
|
1695 |
+
$m[ self::PT ] = array(
|
1696 |
+
0 => '', // Unused. Messages start at index 1.
|
1697 |
+
1 => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1698 |
+
2 => esc_html__( 'Custom field updated.', 'testimonials-widget' ),
|
1699 |
+
3 => esc_html__( 'Custom field deleted.', 'testimonials-widget' ),
|
1700 |
+
4 => esc_html__( 'Testimonial updated.', 'testimonials-widget' ),
|
1701 |
+
/* translators: %s: date and time of the revision */
|
1702 |
+
5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Testimonial restored to revision from %s', 'testimonials-widget' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
1703 |
+
6 => sprintf( __( 'Testimonial published. <a href="%s">View testimonial</a>', 'testimonials-widget' ), esc_url( get_permalink( $post->ID ) ) ),
|
1704 |
+
7 => esc_html__( 'Testimonial saved.', 'testimonials-widget' ),
|
1705 |
+
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 ) ) ) ),
|
1706 |
+
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 ) ) ),
|
1707 |
+
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 ) ) ) )
|
1708 |
+
);
|
1709 |
+
|
1710 |
+
return $m;
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
|
1714 |
+
public static function right_now_content_table_end() {
|
1715 |
+
$content = '
|
1716 |
+
<tr>
|
1717 |
+
<td class="first b b-%1$s">%4$s%2$s%5$s</td>
|
1718 |
+
<td class="t %1$s">%4$s%3$s%5$s</td>
|
1719 |
+
</tr>';
|
1720 |
+
$posts = wp_count_posts( Testimonials_Widget::PT );
|
1721 |
+
$count = $posts->publish;
|
1722 |
+
$name = _n( 'Testimonial', 'Testimonials', $count, 'testimonials-widget' );
|
1723 |
+
$count_f = number_format_i18n( $count );
|
1724 |
+
$a_open = '<a href="edit.php?post_type=' . Testimonials_Widget::PT . '">';
|
1725 |
+
$a_close = '</a>';
|
1726 |
+
|
1727 |
+
if ( current_user_can( 'edit_others_posts' ) )
|
1728 |
+
$result = sprintf( $content, Testimonials_Widget::PT, $count_f, $name, $a_open, $a_close );
|
1729 |
+
else
|
1730 |
+
$result = sprintf( $content, Testimonials_Widget::PT, $count_f, $name, '', '' );
|
1731 |
+
|
1732 |
+
echo $result;
|
1733 |
+
}
|
1734 |
+
|
1735 |
+
|
1736 |
+
/**
|
1737 |
+
*
|
1738 |
+
*
|
1739 |
+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
1740 |
+
*/
|
1741 |
+
public static function get_schema( $testimonial, $atts ) {
|
1742 |
+
foreach ( $testimonial as $key => $value ) {
|
1743 |
+
if ( 'testimonial_image' != $key )
|
1744 |
+
$testimonial[ $key ] = self::clean_string( $value );
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
extract( $testimonial );
|
1748 |
+
|
1749 |
+
$do_company = ! $atts['hide_company'] && ! empty( $testimonial_company );
|
1750 |
+
$do_email = ! $atts['hide_email'] && ! empty( $testimonial_email ) && is_email( $testimonial_email );
|
1751 |
+
$do_image = ! $atts['hide_image'] && ! empty( $testimonial_image );
|
1752 |
+
$do_location = ! $atts['hide_location'] && ! empty( $testimonial_location );
|
1753 |
+
$do_source = ! $atts['hide_source'] && ! empty( $testimonial_source );
|
1754 |
+
$do_title = ! $atts['hide_title'] && ! empty( $testimonial_title );
|
1755 |
+
$do_url = ! $atts['hide_url'] && ! empty( $testimonial_url );
|
1756 |
+
|
1757 |
+
$item_reviewed = self::clean_string( $atts['item_reviewed'] );
|
1758 |
+
$item_reviewed_url = self::clean_string( $atts['item_reviewed_url'] );
|
1759 |
+
|
1760 |
+
$schema = '';
|
1761 |
+
|
1762 |
+
$agg_meta = array();
|
1763 |
+
$author_meta = array();
|
1764 |
+
$item_meta = array();
|
1765 |
+
$location_meta = array();
|
1766 |
+
$org_meta = array();
|
1767 |
+
$review_meta = array();
|
1768 |
+
|
1769 |
+
if ( $do_source )
|
1770 |
+
$author_meta[ self::$thing_name ] = $testimonial_source;
|
1771 |
+
|
1772 |
+
if ( $do_title )
|
1773 |
+
$author_meta[ self::$person_job_title ] = $testimonial_title;
|
1774 |
+
|
1775 |
+
if ( $do_email )
|
1776 |
+
$author_meta[ self::$person_email ] = $testimonial_email;
|
1777 |
+
|
1778 |
+
if ( ! $do_company ) {
|
1779 |
+
if ( $do_url )
|
1780 |
+
$author_meta[ self::$thing_url ] = $testimonial_url;
|
1781 |
+
} else {
|
1782 |
+
if ( $do_url )
|
1783 |
+
$org_meta[ self::$thing_url ] = $testimonial_url;
|
1784 |
+
|
1785 |
+
$org_meta[ self::$thing_name ] = $testimonial_company;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
if ( $do_location ) {
|
1789 |
+
$location_meta[ self::$thing_name ] = $testimonial_location;
|
1790 |
+
|
1791 |
+
if ( ! $do_company )
|
1792 |
+
$author_meta[ self::$person_home ] = array( self::$place_schema, $location_meta );
|
1793 |
+
else
|
1794 |
+
$org_meta[ self::$org_location ] = array( self::$place_schema, $location_meta );
|
1795 |
+
}
|
1796 |
+
|
1797 |
+
if ( ! empty( $author_meta ) && ! empty( $org_meta ) )
|
1798 |
+
$author_meta[ self::$person_member ] = array( self::$org_schema, $org_meta );
|
1799 |
+
elseif ( ! empty( $org_meta ) )
|
1800 |
+
$author_meta[ self::$cw_source_org ] = array( self::$org_schema, $org_meta );
|
1801 |
+
|
1802 |
+
$author_meta = apply_filters( 'testimonials_widget_schema_author', $author_meta, $testimonial, $atts );
|
1803 |
+
$author = self::create_schema_div_prop( self::$cw_author, self::$person_schema, $author_meta );
|
1804 |
+
$schema .= $author;
|
1805 |
+
|
1806 |
+
$post = get_post( $testimonial['post_id'] );
|
1807 |
+
$the_date = mysql2date( 'Y-m-d', $post->post_date );
|
1808 |
+
$the_date_mod = mysql2date( 'Y-m-d', $post->post_modified );
|
1809 |
+
|
1810 |
+
$review_name_length = apply_filters( 'testimonials_widget_review_name_length', 156 );
|
1811 |
+
|
1812 |
+
$review_meta[ self::$cw_date ] = $the_date;
|
1813 |
+
$review_meta[ self::$cw_date_mod ] = $the_date_mod;
|
1814 |
+
$review_meta[ self::$thing_name ] = self::testimonials_truncate( $testimonial_content, $review_name_length );
|
1815 |
+
$review_meta[ self::$thing_url ] = post_permalink( $post->ID );
|
1816 |
+
|
1817 |
+
if ( $do_image ) {
|
1818 |
+
$src = self::get_image_src( $testimonial_image );
|
1819 |
+
|
1820 |
+
$review_meta[ self::$thing_image ] = $src;
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
$review_meta = apply_filters( 'testimonials_widget_schema_review', $review_meta, $testimonial, $atts );
|
1824 |
+
$review = self::create_schema_meta( $review_meta );
|
1825 |
+
$schema .= $review;
|
1826 |
+
|
1827 |
+
$agg_meta[ self::$agg_count ] = self::$found_posts;
|
1828 |
+
|
1829 |
+
$agg_meta = apply_filters( 'testimonials_widget_schema_aggregate', $agg_meta, $testimonial, $atts );
|
1830 |
+
$aggregate = self::create_schema_div_prop( self::$cw_aggregate, self::$agg_schema, $agg_meta );
|
1831 |
+
$schema .= $aggregate;
|
1832 |
+
|
1833 |
+
$item_meta[ self::$thing_name ] = $item_reviewed;
|
1834 |
+
$item_meta[ self::$thing_url ] = $item_reviewed_url;
|
1835 |
+
|
1836 |
+
$item_meta = apply_filters( 'testimonials_widget_schema_item', $item_meta, $testimonial, $atts );
|
1837 |
+
$item = self::create_schema_div_prop( self::$review_item, self::$thing_schema, $item_meta );
|
1838 |
+
$schema .= $item;
|
1839 |
+
|
1840 |
+
$schema = apply_filters( 'testimonials_widget_schema', $schema, $testimonial, $atts );
|
1841 |
+
|
1842 |
+
return $schema;
|
1843 |
+
}
|
1844 |
+
|
1845 |
+
|
1846 |
+
public static function create_schema_meta( $meta_data ) {
|
1847 |
+
$meta = '';
|
1848 |
+
|
1849 |
+
if ( empty( $meta_data ) )
|
1850 |
+
return $meta;
|
1851 |
+
|
1852 |
+
foreach ( $meta_data as $key => $value ) {
|
1853 |
+
if ( is_array( $value ) )
|
1854 |
+
$meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
|
1855 |
+
else
|
1856 |
+
$meta .= sprintf( self::$schema_meta, $key, $value );
|
1857 |
+
}
|
1858 |
+
|
1859 |
+
return $meta;
|
1860 |
+
}
|
1861 |
+
|
1862 |
+
|
1863 |
+
public static function create_schema_span( $property_name, $span_data ) {
|
1864 |
+
$span = '';
|
1865 |
+
|
1866 |
+
if ( empty( $span_data ) )
|
1867 |
+
return $span;
|
1868 |
+
|
1869 |
+
$span = sprintf( self::$schema_span, $property_name, $span_data );
|
1870 |
+
|
1871 |
+
return $span;
|
1872 |
+
}
|
1873 |
+
|
1874 |
+
|
1875 |
+
public static function create_schema_div_prop( $property_name, $schema_name, $meta_data ) {
|
1876 |
+
$meta = '';
|
1877 |
+
$schema = '';
|
1878 |
+
|
1879 |
+
if ( empty( $meta_data ) )
|
1880 |
+
return $schema;
|
1881 |
+
|
1882 |
+
if ( is_array( $meta_data ) ) {
|
1883 |
+
foreach ( $meta_data as $key => $value ) {
|
1884 |
+
if ( is_array( $value ) )
|
1885 |
+
$meta .= self::create_schema_div_prop( $key, $value[ 0 ], $value[ 1 ] );
|
1886 |
+
else
|
1887 |
+
$meta .= sprintf( self::$schema_meta, $key, $value );
|
1888 |
+
}
|
1889 |
+
|
1890 |
+
$schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta );
|
1891 |
+
} else
|
1892 |
+
$schema = sprintf( self::$schema_div_prop, $property_name, $schema_name, $meta_data );
|
1893 |
+
|
1894 |
+
return $schema;
|
1895 |
+
}
|
1896 |
+
|
1897 |
+
|
1898 |
+
public static function generate_css( $atts, $widget_number = null ) {
|
1899 |
+
$atts['subtype'] = 'css';
|
1900 |
+
|
1901 |
+
$css = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
1902 |
+
if ( false === $css ) {
|
1903 |
+
$css = self::get_testimonials_html_css( $atts, $widget_number );
|
1904 |
+
$css = apply_filters( 'testimonials_widget_cache_set', $css, $atts );
|
1905 |
+
}
|
1906 |
+
|
1907 |
+
if ( ! empty( $css ) ) {
|
1908 |
+
self::$css = array_merge( $css, self::$css );
|
1909 |
+
add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_css' ), 20 );
|
1910 |
+
}
|
1911 |
+
}
|
1912 |
+
|
1913 |
+
|
1914 |
+
public static function generate_js( $testimonials, $atts, $widget_number = null ) {
|
1915 |
+
$atts['subtype'] = 'js';
|
1916 |
+
|
1917 |
+
$js = apply_filters( 'testimonials_widget_cache_get', false, $atts );
|
1918 |
+
if ( false === $js ) {
|
1919 |
+
$js = self::get_testimonials_html_js( $testimonials, $atts, $widget_number );
|
1920 |
+
$js = apply_filters( 'testimonials_widget_cache_set', $js, $atts );
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
if ( ! empty( $js ) ) {
|
1924 |
+
self::$scripts = array_merge( $js, self::$scripts );
|
1925 |
+
add_action( 'wp_footer', array( 'Testimonials_Widget', 'get_testimonials_scripts' ), 20 );
|
1926 |
+
}
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
|
1930 |
+
public static function call_scripts_styles( $testimonials, $atts, $widget_number = null ) {
|
1931 |
+
if ( is_null( $widget_number ) )
|
1932 |
+
$widget_number = Testimonials_Widget::get_instance();
|
1933 |
+
|
1934 |
+
self::scripts( $atts );
|
1935 |
+
self::styles();
|
1936 |
+
|
1937 |
+
self::generate_css( $atts );
|
1938 |
+
self::generate_js( $testimonials, $atts, $widget_number );
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
|
1942 |
+
public static function make_gravatar_featured( $post_id, $email ) {
|
1943 |
+
$size = get_option( 'large_size_w' );
|
1944 |
+
$image = get_avatar( $email, $size );
|
1945 |
+
$src = self::get_image_src( $image );
|
1946 |
+
$file = sanitize_title( $email ) . '.jpeg';
|
1947 |
+
|
1948 |
+
self::add_media( $post_id, $src, $file );
|
1949 |
+
}
|
1950 |
+
|
1951 |
+
|
1952 |
+
public static function notice_2_15_0() {
|
1953 |
+
$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' ) );
|
1954 |
+
|
1955 |
+
self::notice_updated( $text );
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
|
1959 |
+
public static function show_shortcodes() {
|
1960 |
+
echo '<div class="wrap">';
|
1961 |
+
echo '<div class="icon32" id="icon-options-general"></div>';
|
1962 |
+
echo '<h2>' . esc_html__( 'Testimonials Shortcode Examples', 'testimonials-widget' ) . '</h2>';
|
1963 |
+
|
1964 |
+
$shortcodes = <<<EOD
|
1965 |
+
<h3>[testimonialswidget_list]</h3>
|
1966 |
+
|
1967 |
+
<ul>
|
1968 |
+
<li><code>[testimonialswidget_list category="category-name"]</code> - Testimonial list by category</li>
|
1969 |
+
<li><code>[testimonialswidget_list category=product hide_not_found=true]</code> - Testimonial list by category and hide "No testimonials found" message</li>
|
1970 |
+
<li><code>[testimonialswidget_list category=product tags=widget limit=5]</code> - Testimonial list by tag, showing 5 at most</li>
|
1971 |
+
<li><code>[testimonialswidget_list char_limit=0 limit=-1]</code> - Show all testimonials on one page</li>
|
1972 |
+
<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>
|
1973 |
+
<li><code>[testimonialswidget_list hide_source=true hide_url=true]</code> - Show testimonial list with source and urls hidden</li>
|
1974 |
+
<li><code>[testimonialswidget_list ids="1,11,111" paging=false]</code> - Show only these 3 testimonials</li>
|
1975 |
+
<li><code>[testimonialswidget_list meta_key=testimonials-widget-company order=asc limit=15]</code> - Show 15 testimonials, in company order</li>
|
1976 |
+
<li><code>[testimonialswidget_list order=ASC orderby=title]</code> - List testimonials by post title</li>
|
1977 |
+
<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>
|
1978 |
+
</ul>
|
1979 |
+
|
1980 |
+
<h3>[testimonialswidget_widget]</h3>
|
1981 |
+
|
1982 |
+
<ul>
|
1983 |
+
<li><code>[testimonialswidget_widget category=product order=asc]</code> - Show rotating testimonials, of the product category, lowest post ids first</li>
|
1984 |
+
<li><code>[testimonialswidget_widget tags=sometag random=true]</code> - Show rotating, random testimonials having tag "sometag"</li>
|
1985 |
+
</ul>
|
1986 |
+
EOD;
|
1987 |
+
|
1988 |
+
$shortcodes = apply_filters( 'testimonials_widget_shortcodes', $shortcodes );
|
1989 |
+
|
1990 |
+
echo $shortcodes;
|
1991 |
+
echo '</div>';
|
1992 |
+
}
|
1993 |
+
|
1994 |
+
|
1995 |
+
public static function set_not_found( $not_found = false ) {
|
1996 |
+
self::$not_found = $not_found;
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
|
2000 |
+
public static function get_not_found() {
|
2001 |
+
return self::$not_found;
|
2002 |
+
}
|
2003 |
+
|
2004 |
+
|
2005 |
+
public static function version_check() {
|
2006 |
+
$good_version = true;
|
2007 |
+
|
2008 |
+
return $good_version;
|
2009 |
+
}
|
2010 |
+
|
2011 |
+
|
2012 |
+
/**
|
2013 |
+
*
|
2014 |
+
*
|
2015 |
+
* @SuppressWarnings(PHPMD.Superglobals)
|
2016 |
+
*/
|
2017 |
+
public static function do_load() {
|
2018 |
+
$do_load = false;
|
2019 |
+
if ( ! empty( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'options.php' ) ) ) {
|
2020 |
+
$do_load = true;
|
2021 |
+
} elseif ( ! empty( $_REQUEST['post_type'] ) && self::PT == $_REQUEST['post_type'] ) {
|
2022 |
+
if ( ! empty( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'edit.php' ) ) ) {
|
2023 |
+
$do_load = true;
|
2024 |
+
} elseif ( ! empty( $_REQUEST['page'] ) && Testimonials_Widget_Settings::ID == $_REQUEST['page'] ) {
|
2025 |
+
$do_load = true;
|
2026 |
+
}
|
2027 |
+
}
|
2028 |
+
|
2029 |
+
return $do_load;
|
2030 |
+
}
|
2031 |
+
}
|
2032 |
+
|
2033 |
+
?>
|
{lib/aihrus → includes/libraries/aihrus-framework}/CHANGELOG.md
RENAMED
@@ -1,6 +1,16 @@
|
|
1 |
# CHANGELOG Aihrus Framework
|
2 |
|
3 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Add strip_protocol
|
5 |
* Add valid_hash check
|
6 |
* Move relicensing to plugin level
|
@@ -8,7 +18,7 @@
|
|
8 |
## 1.0.0
|
9 |
* Enable aihr_check_aihrus_framework
|
10 |
|
11 |
-
##
|
12 |
* Abstract notice helper methods as functions
|
13 |
* Add TODO
|
14 |
* Add `add_media` post attachment helper
|
1 |
# CHANGELOG Aihrus Framework
|
2 |
|
3 |
+
## master
|
4 |
+
* Add `slash_sanitize_title` verification helper
|
5 |
+
* Add phpunit.xml
|
6 |
+
* Coding standards
|
7 |
+
* Move ci to tests
|
8 |
+
* Remove Travis configuration
|
9 |
+
* RESOLVE michael-cannon/testimonials-widget#48 Activation on WP 3.6 not working
|
10 |
+
* Update usage instructions
|
11 |
+
* Use $plugin_assets than $plugin_path
|
12 |
+
|
13 |
+
## 1.0.1
|
14 |
* Add strip_protocol
|
15 |
* Add valid_hash check
|
16 |
* Move relicensing to plugin level
|
18 |
## 1.0.0
|
19 |
* Enable aihr_check_aihrus_framework
|
20 |
|
21 |
+
## 0.0.0
|
22 |
* Abstract notice helper methods as functions
|
23 |
* Add TODO
|
24 |
* Add `add_media` post attachment helper
|
{lib/aihrus → includes/libraries/aihrus-framework}/LICENSE
RENAMED
File without changes
|
{lib/aihrus → includes/libraries/aihrus-framework}/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,32 +40,31 @@ 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 |
-
|
55 |
-
$
|
56 |
-
$
|
57 |
-
|
58 |
-
$
|
59 |
-
|
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
|
69 |
```
|
70 |
|
71 |
* Update the plugin repository
|
20 |
|
21 |
```
|
22 |
git remote add aihrus https://github.com/michael-cannon/aihrus-framework.git
|
23 |
+
git subtree add -P include/libraries/aihrus-framework 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 WPS_DIR_LIB . '/aihrus-framework/class-aihrus-common.php';
|
32 |
```
|
33 |
|
34 |
* Extend plugin class to library
|
40 |
* Add class static members
|
41 |
|
42 |
```
|
43 |
+
public static $class = __CLASS__;
|
44 |
public static $notice_key;
|
45 |
```
|
46 |
|
47 |
+
* Set notices…
|
48 |
|
49 |
```
|
50 |
…
|
51 |
if ( $bad_version )
|
52 |
+
add_action( 'admin_notices', 'wps_notice_aihrus' );
|
53 |
…
|
54 |
+
function wps_notice_aihrus() {
|
55 |
+
$help_url = esc_url( 'https://aihrus.zendesk.com/entries/35689458' );
|
56 |
+
$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 );
|
57 |
+
|
58 |
+
$text = sprintf( esc_html__( 'Plugin "%1$s" has been deactivated as it requires a current Aihrus Framework. Once corrected, "%1$s" can be activated. %2$s' ), WPS_NAME, $help_link );
|
59 |
+
|
60 |
+
aihr_notice_error( $text );
|
|
|
61 |
}
|
62 |
```
|
63 |
|
64 |
* Update the external library
|
65 |
|
66 |
```
|
67 |
+
git subtree pull -P include/libraries/aihrus-framework aihrus master
|
68 |
```
|
69 |
|
70 |
* Update the plugin repository
|
{lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-common.php
RENAMED
@@ -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'
|
157 |
|
158 |
aihr_notice_updated( $text );
|
159 |
}
|
@@ -446,11 +446,11 @@ EOD;
|
|
446 |
|
447 |
|
448 |
public static function strip_protocol( $link ) {
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
|
453 |
-
|
454 |
}
|
455 |
|
456 |
|
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 |
}
|
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 |
|
{lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-licensing.php
RENAMED
File without changes
|
{lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-settings.php
RENAMED
@@ -58,8 +58,8 @@ abstract class Aihrus_Settings {
|
|
58 |
|
59 |
|
60 |
public static function sections() {
|
61 |
-
static::$sections['reset'] = esc_html__( 'Reset'
|
62 |
-
static::$sections['about'] = esc_html__( 'About'
|
63 |
}
|
64 |
|
65 |
|
@@ -77,9 +77,9 @@ abstract class Aihrus_Settings {
|
|
77 |
|
78 |
static::$settings['export'] = array(
|
79 |
'section' => 'reset',
|
80 |
-
'title' => esc_html__( 'Export Settings'
|
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.'
|
83 |
'std' => $serialized_options,
|
84 |
'widget' => 0,
|
85 |
);
|
@@ -87,17 +87,17 @@ abstract class Aihrus_Settings {
|
|
87 |
|
88 |
static::$settings['import'] = array(
|
89 |
'section' => 'reset',
|
90 |
-
'title' => esc_html__( 'Import Settings'
|
91 |
'type' => 'textarea',
|
92 |
-
'desc' => esc_html__( 'Paste new serialized settings here to overwrite your current configuration.'
|
93 |
'widget' => 0,
|
94 |
);
|
95 |
|
96 |
-
$desc = esc_html__( 'Delete all %s data and options from database on plugin deletion'
|
97 |
|
98 |
static::$settings['delete_data'] = array(
|
99 |
'section' => 'reset',
|
100 |
-
'title' => esc_html__( 'Remove Plugin Data on Deletion?'
|
101 |
'type' => 'checkbox',
|
102 |
'class' => 'warning',
|
103 |
'desc' => sprintf( $desc, static::NAME ),
|
@@ -106,10 +106,10 @@ abstract class Aihrus_Settings {
|
|
106 |
|
107 |
static::$settings['reset_defaults'] = array(
|
108 |
'section' => 'reset',
|
109 |
-
'title' => esc_html__( 'Reset to Defaults?'
|
110 |
'type' => 'checkbox',
|
111 |
'class' => 'warning',
|
112 |
-
'desc' => esc_html__( 'Check this box to reset options to their defaults'
|
113 |
);
|
114 |
}
|
115 |
|
@@ -233,12 +233,12 @@ abstract class Aihrus_Settings {
|
|
233 |
|
234 |
public static function display_about() {
|
235 |
$name = str_replace( ' Settings', '', static::NAME );
|
236 |
-
$text = __( '<img class="alignright size-medium" src="%1$
|
237 |
|
238 |
echo '<div id="about" style="width: 70%; min-height: 225px;"><p>';
|
239 |
echo sprintf(
|
240 |
$text,
|
241 |
-
static::$
|
242 |
esc_url( static::$plugin_url ),
|
243 |
$name,
|
244 |
esc_url( 'http://aihr.us/resume/' ),
|
@@ -275,7 +275,7 @@ abstract class Aihrus_Settings {
|
|
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'
|
279 |
</form>
|
280 |
</div>
|
281 |
';
|
@@ -283,7 +283,7 @@ abstract class Aihrus_Settings {
|
|
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>.'
|
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,7 +294,7 @@ abstract class Aihrus_Settings {
|
|
294 |
|
295 |
echo '<p class="copyright">' .
|
296 |
sprintf(
|
297 |
-
__( 'Copyright ©%1$s <a href="%2$s">Aihrus</a>.'
|
298 |
date( 'Y' ),
|
299 |
esc_url( 'http://aihr.us' )
|
300 |
) .
|
@@ -595,7 +595,15 @@ abstract class Aihrus_Settings {
|
|
595 |
|
596 |
case 'required':
|
597 |
if ( empty( $input[ $id ] ) )
|
598 |
-
$errors[ $id ] = esc_html__( 'Required'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
break;
|
600 |
|
601 |
case 'slug':
|
58 |
|
59 |
|
60 |
public static function sections() {
|
61 |
+
static::$sections['reset'] = esc_html__( 'Reset' );
|
62 |
+
static::$sections['about'] = esc_html__( 'About' );
|
63 |
}
|
64 |
|
65 |
|
77 |
|
78 |
static::$settings['export'] = array(
|
79 |
'section' => 'reset',
|
80 |
+
'title' => esc_html__( 'Export Settings' ),
|
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.' ),
|
83 |
'std' => $serialized_options,
|
84 |
'widget' => 0,
|
85 |
);
|
87 |
|
88 |
static::$settings['import'] = array(
|
89 |
'section' => 'reset',
|
90 |
+
'title' => esc_html__( 'Import Settings' ),
|
91 |
'type' => 'textarea',
|
92 |
+
'desc' => esc_html__( 'Paste new serialized settings here to overwrite your current configuration.' ),
|
93 |
'widget' => 0,
|
94 |
);
|
95 |
|
96 |
+
$desc = esc_html__( 'Delete all %s data and options from database on plugin deletion' );
|
97 |
|
98 |
static::$settings['delete_data'] = array(
|
99 |
'section' => 'reset',
|
100 |
+
'title' => esc_html__( 'Remove Plugin Data on Deletion?' ),
|
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?' ),
|
110 |
'type' => 'checkbox',
|
111 |
'class' => 'warning',
|
112 |
+
'desc' => esc_html__( 'Check this box to reset options to their defaults' ),
|
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$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>.' );
|
237 |
|
238 |
echo '<div id="about" style="width: 70%; min-height: 225px;"><p>';
|
239 |
echo sprintf(
|
240 |
$text,
|
241 |
+
static::$plugin_assets,
|
242 |
esc_url( static::$plugin_url ),
|
243 |
$name,
|
244 |
esc_url( 'http://aihr.us/resume/' ),
|
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' ) . '" /></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>.' ),
|
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>.' ),
|
298 |
date( 'Y' ),
|
299 |
esc_url( 'http://aihr.us' )
|
300 |
) .
|
595 |
|
596 |
case 'required':
|
597 |
if ( empty( $input[ $id ] ) )
|
598 |
+
$errors[ $id ] = esc_html__( 'Required' );
|
599 |
+
break;
|
600 |
+
|
601 |
+
case 'slash_sanitize_title':
|
602 |
+
$temp = explode( '/', $input[ $id ] );
|
603 |
+
$temp = array_map( 'sanitize_title', $temp );
|
604 |
+
$temp = implode( '/', $temp );
|
605 |
+
|
606 |
+
$input[ $id ] = $temp;
|
607 |
break;
|
608 |
|
609 |
case 'slug':
|
{lib/aihrus → includes/libraries/aihrus-framework}/class-aihrus-widget.php
RENAMED
@@ -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'
|
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'
|
150 |
echo '<div id="' . $this->get_field_id( $id ) . '" style="display:none" class="tw-collapsible">';
|
151 |
|
152 |
$do_return = true;
|
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 |
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;
|
{lib/aihrus → includes/libraries/aihrus-framework}/interface-aihrus-common.php
RENAMED
File without changes
|
{lib/aihrus → includes/libraries/aihrus-framework}/interface-aihrus-licensing.php
RENAMED
File without changes
|
{lib/aihrus → includes/libraries/aihrus-framework}/interface-aihrus-widget.php
RENAMED
File without changes
|
{lib/aihrus → includes/libraries/aihrus-framework}/requirements.php
RENAMED
@@ -27,7 +27,7 @@ require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
|
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>.'
|
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.'
|
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'
|
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>.'
|
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>.'
|
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>'
|
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>'
|
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>'
|
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".'
|
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".'
|
265 |
|
266 |
aihr_notice_error( $text );
|
267 |
}
|
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 |
}
|
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 |
$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 |
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 |
|
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 |
|
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 |
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 |
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 |
}
|
{lib → includes/libraries}/class-redrokk-metabox-class.php
RENAMED
File without changes
|
{lib → includes}/requirements.php
RENAMED
@@ -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 . '
|
20 |
|
21 |
|
22 |
function tw_requirements_check() {
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
+
require_once TW_DIR_LIB . 'aihrus-framework/requirements.php';
|
20 |
|
21 |
|
22 |
function tw_requirements_check() {
|
languages/testimonials-widget.pot
CHANGED
@@ -1,860 +1,876 @@
|
|
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 "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 |
-
#:
|
|
|
156 |
msgid "Settings"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#:
|
160 |
-
#:
|
161 |
msgid "General"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#:
|
165 |
-
#:
|
166 |
msgid "Selection"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#:
|
170 |
-
#:
|
171 |
msgid "Ordering"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#:
|
175 |
-
#:
|
176 |
msgid "Widget"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#:
|
180 |
-
#:
|
181 |
msgid "Post Type"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#:
|
185 |
msgid "Widget Title"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#:
|
189 |
-
#:
|
190 |
-
#: testimonials-widget.php:
|
|
|
191 |
msgid "Testimonials"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#:
|
195 |
msgid "Title Link"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#:
|
199 |
msgid "URL, path, or post ID to link widget title to. Ex: http://example.com/stuff, /testimonials, 123 or "
|
200 |
msgstr ""
|
201 |
|
202 |
-
#:
|
203 |
msgid "Character Limit"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#:
|
207 |
msgid "Number of characters to limit non-single testimonial views to"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#:
|
211 |
msgid "Rotation Speed"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#:
|
215 |
msgid "Number of seconds between testimonial rotations or 0 for no rotation at all refresh"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#:
|
219 |
msgid "Additional Widget Options"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#:
|
223 |
msgid "Transition Mode?"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#:
|
227 |
msgid "Type of transition between slides"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#:
|
231 |
msgid "Fade"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#:
|
235 |
msgid "Horizontal"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#:
|
239 |
msgid "Vertical"
|
240 |
msgstr ""
|
241 |
|
242 |
-
#:
|
243 |
msgid "Show Play/Pause?"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#:
|
247 |
msgid "Display start and stop buttons underneath the testimonial slider."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#:
|
251 |
msgid "Enable Video?"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#:
|
255 |
msgid "Only enable when displaying video content."
|
256 |
msgstr ""
|
257 |
|
258 |
-
#:
|
259 |
msgid "Keep Whitespace?"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#:
|
263 |
msgid "Keeps testimonials looking as entered than sans auto-formatting"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#:
|
267 |
msgid "Testimonial Bottom Text"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#:
|
271 |
msgid "Custom text or HTML for bottom of testimonials"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#:
|
275 |
msgid "General Options"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#:
|
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 |
-
#:
|
283 |
msgid "Enable Review Schema?"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#:
|
287 |
-
msgid "Reviewed Item?"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#:
|
291 |
msgid "Name of thing being referenced in testimonials"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#:
|
295 |
-
msgid "Reviewed Item URL?"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#:
|
299 |
msgid "URL of thing being referenced in testimonials"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#:
|
303 |
msgid "Hide built-in quotes?"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#:
|
307 |
msgid "Remove open and close quote span tags surrounding testimonial content"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#:
|
311 |
msgid "Hide \"Testimonials Not Found\"?"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#:
|
315 |
msgid "Hide Gravatar Image?"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#:
|
319 |
msgid "Hide Image?"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#:
|
323 |
msgid "Hide Image in Single View?"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#:
|
327 |
msgid "Hide Testimonial Content?"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#:
|
331 |
msgid "Hide Author/Source?"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#:
|
335 |
msgid "Don't display \"Post Title\" in cite"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#:
|
339 |
msgid "Hide Email?"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#:
|
343 |
msgid "Hide Job Title?"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#:
|
347 |
msgid "Hide Location?"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#:
|
351 |
msgid "Hide Company?"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#:
|
355 |
msgid "Hide URL?"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#:
|
359 |
msgid "URL Target"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#:
|
363 |
msgid "Add target to all URLs; leave blank if none"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#:
|
367 |
msgid "Enable Paging?"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#:
|
371 |
msgid "For `[testimonialswidget_list]`"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#:
|
375 |
msgid "Disable"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#:
|
379 |
msgid "Enable"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#:
|
383 |
msgid "Before testimonials"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#:
|
387 |
msgid "After testimonials"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#:
|
391 |
msgid "Do [shortcodes]?"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#:
|
395 |
msgid "If unchecked, shortcodes are stripped."
|
396 |
msgstr ""
|
397 |
|
398 |
-
#:
|
399 |
msgid "Selection Options"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#:
|
403 |
msgid "Category Filter"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#:
|
407 |
msgid "Comma separated category names. Ex: Category A, Another category"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#:
|
411 |
msgid "Tags Filter"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#:
|
415 |
msgid "Comma separated tag names. Ex: Tag A, Another tag"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#:
|
419 |
msgid "Require All Tags?"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#:
|
423 |
msgid "Select only testimonials with all of the given tags"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#:
|
427 |
msgid "Include IDs Filter"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#:
|
431 |
-
#:
|
432 |
msgid "Comma separated testimonial IDs. Ex: 3,1,2"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#:
|
436 |
msgid "Exclude IDs Filter"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#:
|
440 |
msgid "Limit"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#:
|
444 |
msgid "Number of testimonials to select per instance"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#:
|
448 |
msgid "Ordering Options"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#:
|
452 |
msgid "Random Order?"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#:
|
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 |
-
#:
|
460 |
msgid "ORDER BY"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#:
|
464 |
msgid "Used when \"Random Order\" is disabled"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#:
|
468 |
msgid "Testimonial ID"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#:
|
472 |
msgid "Author"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#:
|
|
|
476 |
msgid "Date"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#:
|
480 |
msgid "Menu Order"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#:
|
|
|
484 |
msgid "Source"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#:
|
488 |
msgid "No order"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#:
|
492 |
msgid "ORDER BY meta_key"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#:
|
496 |
msgid "Used when \"Random Order\" is disabled and sorting by a testimonials meta key is needed. Overrides ORDER BY"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#:
|
500 |
msgid "None"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#:
|
504 |
-
#: testimonials-widget.php:
|
|
|
505 |
msgid "Job Title"
|
506 |
msgstr ""
|
507 |
|
508 |
-
#:
|
509 |
-
#: testimonials-widget.php:
|
|
|
510 |
msgid "Email"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#:
|
514 |
-
#: testimonials-widget.php:
|
|
|
515 |
msgid "Location"
|
516 |
msgstr ""
|
517 |
|
518 |
-
#:
|
519 |
-
#: testimonials-widget.php:
|
|
|
520 |
msgid "Company"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#:
|
524 |
-
#: testimonials-widget.php:
|
|
|
525 |
msgid "URL"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#:
|
529 |
msgid "ORDER BY Order"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#:
|
533 |
msgid "Descending"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#:
|
537 |
msgid "Ascending"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#:
|
541 |
msgid "Allow Comments?"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#:
|
545 |
msgid "Only affects the Testimonials post edit page. Your theme controls the front-end view."
|
546 |
msgstr ""
|
547 |
|
548 |
-
#:
|
549 |
msgid "URL slug-name for <a href=\"%1s\">testimonials archive</a> page."
|
550 |
msgstr ""
|
551 |
|
552 |
-
#:
|
553 |
msgid "Archive Page URL"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#:
|
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 |
-
#:
|
561 |
msgid "Testimonial Page URL"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#:
|
565 |
msgid "Reset & Compatiblity Options"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#:
|
569 |
msgid "Don't Use Default Taxonomies?"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#:
|
573 |
msgid "If checked, use Testimonials' own category and tag taxonomies instead"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#:
|
577 |
msgid "Version Based Options"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#:
|
581 |
msgid "Use bxSlider?"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#:
|
585 |
msgid "Pre 2.15.0, Testimonials' used custom JavaScript for transitions."
|
586 |
msgstr ""
|
587 |
|
588 |
-
#:
|
589 |
msgid "Disable Animation?"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#:
|
593 |
msgid "Pre 2.15.0, Disable animation between testimonial transitions. Useful when stacking widgets."
|
594 |
msgstr ""
|
595 |
|
596 |
-
#:
|
597 |
msgid "Fade Out Speed"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#:
|
601 |
-
#:
|
602 |
msgid "Pre 2.15.0, Transition duration in milliseconds; higher values indicate slower animations, not faster ones."
|
603 |
msgstr ""
|
604 |
|
605 |
-
#:
|
606 |
msgid "Fade In Speed"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#:
|
610 |
msgid "Height"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#:
|
614 |
msgid "Pre 2.15.0, Testimonials height, in pixels. Overrides minimum and maximum height"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#:
|
618 |
msgid "Minimum Height"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#:
|
622 |
msgid "Pre 2.15.0, Set for minimum display height, in pixels"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#:
|
626 |
msgid "Maximum Height"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#:
|
630 |
msgid "Pre 2.15.0, Set for maximum display height, in pixels"
|
631 |
msgstr ""
|
632 |
|
633 |
-
#:
|
634 |
msgid "Always Load CSS?"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#:
|
638 |
msgid "Pre 2.14.0, Testimonials' CSS was always loaded, whether needed or not"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#:
|
642 |
msgid "Include IE7 CSS?"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#:
|
646 |
msgid "IE7 specific CSS moved to separate CSS file in version 2.13.6."
|
647 |
msgstr ""
|
648 |
|
649 |
-
#:
|
650 |
msgid "Use `<q>` tag?"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#:
|
654 |
msgid "Pre 2.11.0, not HTML5 compliant"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#:
|
658 |
msgid "Remove `.hentry` CSS?"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#:
|
662 |
msgid "Pre 2.6.4, some themes use class `.hentry` in a manner that breaks Testimonials' CSS"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#:
|
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 |
-
#:
|
670 |
msgid "Shortcode option names are listed below each entry."
|
671 |
msgstr ""
|
672 |
|
673 |
-
#:
|
674 |
msgid "View the <a href=\"%s\">Testimonials documentation</a>."
|
675 |
msgstr ""
|
676 |
|
677 |
-
#:
|
678 |
msgid "Show or hide optional fields."
|
679 |
msgstr ""
|
680 |
|
681 |
-
#:
|
682 |
msgid "Options used to select testimonials."
|
683 |
msgstr ""
|
684 |
|
685 |
-
#:
|
686 |
msgid "Options used to determine displayed testimonials ordering."
|
687 |
msgstr ""
|
688 |
|
689 |
-
#:
|
690 |
msgid "Options related to showing testimonials in widgets."
|
691 |
msgstr ""
|
692 |
|
693 |
-
#:
|
694 |
msgid "Archive and singular page URL related testimonials options."
|
695 |
msgstr ""
|
696 |
|
697 |
-
#:
|
698 |
msgid "Compatibility & Reset"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#:
|
702 |
msgid "Backwards compatibility, import/export options, and reset options."
|
703 |
msgstr ""
|
704 |
|
705 |
-
#:
|
706 |
msgid "Display testimonials with multiple selection and display options"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#:
|
710 |
msgid "CSS Class"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#:
|
714 |
msgid "This widget's unique CSS class for styling"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#:
|
718 |
-
|
719 |
-
msgstr ""
|
720 |
-
|
721 |
-
#: testimonials-widget.php:148 testimonials-widget.php:1980
|
722 |
msgid "Testimonials Shortcode Examples"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: testimonials-widget.php:
|
726 |
msgid "E.g. Shortcodes"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: testimonials-widget.php:
|
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:
|
734 |
msgid "ID"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: testimonials-widget.php:
|
738 |
msgid "Image"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: testimonials-widget.php:
|
742 |
msgid "Shortcodes"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: testimonials-widget.php:
|
746 |
msgid "Published by"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#:
|
|
|
750 |
msgid "Category"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#:
|
|
|
754 |
msgid "Tags"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: testimonials-widget.php:
|
758 |
msgid "Add New"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#:
|
|
|
762 |
msgid "Add New Testimonial"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: testimonials-widget.php:
|
766 |
msgid "Edit Testimonial"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#:
|
|
|
770 |
msgid "No testimonials found"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: testimonials-widget.php:
|
774 |
msgid "No testimonials found in Trash"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: testimonials-widget.php:
|
778 |
msgid "Search Testimonials"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#:
|
|
|
782 |
msgid "Testimonial"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: testimonials-widget.php:
|
786 |
msgid "View Testimonial"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: testimonials-widget.php:
|
790 |
msgid "…"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: testimonials-widget.php:
|
794 |
msgid "«"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: testimonials-widget.php:
|
798 |
msgid "»"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: testimonials-widget.php:
|
802 |
msgid "Testimonial Data"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: testimonials-widget.php:
|
806 |
msgid "Enter title here"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: testimonials-widget.php:
|
810 |
msgid "Enter testimonial source here"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: testimonials-widget.php:
|
814 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: testimonials-widget.php:
|
818 |
msgid "Custom field updated."
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: testimonials-widget.php:
|
822 |
msgid "Custom field deleted."
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: testimonials-widget.php:
|
826 |
msgid "Testimonial updated."
|
827 |
msgstr ""
|
828 |
|
829 |
#. translators: %s: date and time of the revision
|
830 |
|
831 |
-
#: testimonials-widget.php:
|
832 |
msgid "Testimonial restored to revision from %s"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: testimonials-widget.php:
|
836 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: testimonials-widget.php:
|
840 |
msgid "Testimonial saved."
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: testimonials-widget.php:
|
844 |
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: testimonials-widget.php:
|
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:
|
852 |
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: testimonials-widget.php:
|
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 ""
|
1 |
+
# Copyright (C) 2014 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.18.0-alpha\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2014-01-14 05:32:22+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: 2014-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: includes/class-testimonials-widget-settings.php:91
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
msgid "Testimonials Settings"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: includes/class-testimonials-widget-settings.php:91
|
20 |
+
#: includes/class-testimonials-widget.php:113
|
21 |
msgid "Settings"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: includes/class-testimonials-widget-settings.php:107
|
25 |
+
#: includes/class-testimonials-widget-settings.php:876
|
26 |
msgid "General"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: includes/class-testimonials-widget-settings.php:108
|
30 |
+
#: includes/class-testimonials-widget-settings.php:884
|
31 |
msgid "Selection"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: includes/class-testimonials-widget-settings.php:109
|
35 |
+
#: includes/class-testimonials-widget-settings.php:892
|
36 |
msgid "Ordering"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: includes/class-testimonials-widget-settings.php:110
|
40 |
+
#: includes/class-testimonials-widget-settings.php:900
|
41 |
msgid "Widget"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: includes/class-testimonials-widget-settings.php:111
|
45 |
+
#: includes/class-testimonials-widget-settings.php:908
|
46 |
msgid "Post Type"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: includes/class-testimonials-widget-settings.php:128
|
50 |
msgid "Widget Title"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: includes/class-testimonials-widget-settings.php:129
|
54 |
+
#: includes/class-testimonials-widget-widget.php:32
|
55 |
+
#: includes/class-testimonials-widget.php:575
|
56 |
+
#: includes/class-testimonials-widget.php:620
|
57 |
msgid "Testimonials"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: includes/class-testimonials-widget-settings.php:135
|
61 |
msgid "Title Link"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: includes/class-testimonials-widget-settings.php:136
|
65 |
msgid "URL, path, or post ID to link widget title to. Ex: http://example.com/stuff, /testimonials, 123 or "
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: includes/class-testimonials-widget-settings.php:142
|
69 |
msgid "Character Limit"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: includes/class-testimonials-widget-settings.php:143
|
73 |
msgid "Number of characters to limit non-single testimonial views to"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: includes/class-testimonials-widget-settings.php:149
|
77 |
msgid "Rotation Speed"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: includes/class-testimonials-widget-settings.php:150
|
81 |
msgid "Number of seconds between testimonial rotations or 0 for no rotation at all refresh"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: includes/class-testimonials-widget-settings.php:162
|
85 |
msgid "Additional Widget Options"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: includes/class-testimonials-widget-settings.php:168
|
89 |
msgid "Transition Mode?"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: includes/class-testimonials-widget-settings.php:169
|
93 |
msgid "Type of transition between slides"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/class-testimonials-widget-settings.php:172
|
97 |
msgid "Fade"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: includes/class-testimonials-widget-settings.php:173
|
101 |
msgid "Horizontal"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: includes/class-testimonials-widget-settings.php:174
|
105 |
msgid "Vertical"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: includes/class-testimonials-widget-settings.php:181
|
109 |
msgid "Show Play/Pause?"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: includes/class-testimonials-widget-settings.php:182
|
113 |
msgid "Display start and stop buttons underneath the testimonial slider."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: includes/class-testimonials-widget-settings.php:190
|
117 |
msgid "Enable Video?"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: includes/class-testimonials-widget-settings.php:191
|
121 |
msgid "Only enable when displaying video content."
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: includes/class-testimonials-widget-settings.php:198
|
125 |
msgid "Keep Whitespace?"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: includes/class-testimonials-widget-settings.php:199
|
129 |
msgid "Keeps testimonials looking as entered than sans auto-formatting"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: includes/class-testimonials-widget-settings.php:206
|
133 |
msgid "Testimonial Bottom Text"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: includes/class-testimonials-widget-settings.php:207
|
137 |
msgid "Custom text or HTML for bottom of testimonials"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/class-testimonials-widget-settings.php:219
|
141 |
msgid "General Options"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/class-testimonials-widget-settings.php:223
|
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 |
+
#: includes/class-testimonials-widget-settings.php:226
|
149 |
msgid "Enable Review Schema?"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/class-testimonials-widget-settings.php:234
|
153 |
+
msgid "Default Reviewed Item?"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/class-testimonials-widget-settings.php:235
|
157 |
msgid "Name of thing being referenced in testimonials"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/class-testimonials-widget-settings.php:241
|
161 |
+
msgid "Default Reviewed Item URL?"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: includes/class-testimonials-widget-settings.php:242
|
165 |
msgid "URL of thing being referenced in testimonials"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: includes/class-testimonials-widget-settings.php:249
|
169 |
msgid "Hide built-in quotes?"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: includes/class-testimonials-widget-settings.php:250
|
173 |
msgid "Remove open and close quote span tags surrounding testimonial content"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/class-testimonials-widget-settings.php:256
|
177 |
msgid "Hide \"Testimonials Not Found\"?"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: includes/class-testimonials-widget-settings.php:262
|
181 |
msgid "Hide Gravatar Image?"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: includes/class-testimonials-widget-settings.php:268
|
185 |
msgid "Hide Image?"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/class-testimonials-widget-settings.php:274
|
189 |
msgid "Hide Image in Single View?"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/class-testimonials-widget-settings.php:281
|
193 |
msgid "Hide Testimonial Content?"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: includes/class-testimonials-widget-settings.php:287
|
197 |
msgid "Hide Author/Source?"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/class-testimonials-widget-settings.php:290
|
201 |
msgid "Don't display \"Post Title\" in cite"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/class-testimonials-widget-settings.php:294
|
205 |
msgid "Hide Email?"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: includes/class-testimonials-widget-settings.php:301
|
209 |
msgid "Hide Job Title?"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/class-testimonials-widget-settings.php:307
|
213 |
msgid "Hide Location?"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/class-testimonials-widget-settings.php:313
|
217 |
msgid "Hide Company?"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/class-testimonials-widget-settings.php:319
|
221 |
msgid "Hide URL?"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/class-testimonials-widget-settings.php:325
|
225 |
msgid "URL Target"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: includes/class-testimonials-widget-settings.php:326
|
229 |
msgid "Add target to all URLs; leave blank if none"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: includes/class-testimonials-widget-settings.php:331
|
233 |
msgid "Enable Paging?"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: includes/class-testimonials-widget-settings.php:332
|
237 |
msgid "For `[testimonialswidget_list]`"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: includes/class-testimonials-widget-settings.php:335
|
241 |
msgid "Disable"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: includes/class-testimonials-widget-settings.php:336
|
245 |
msgid "Enable"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: includes/class-testimonials-widget-settings.php:337
|
249 |
msgid "Before testimonials"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: includes/class-testimonials-widget-settings.php:338
|
253 |
msgid "After testimonials"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: includes/class-testimonials-widget-settings.php:345
|
257 |
msgid "Do [shortcodes]?"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: includes/class-testimonials-widget-settings.php:346
|
261 |
msgid "If unchecked, shortcodes are stripped."
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: includes/class-testimonials-widget-settings.php:359
|
265 |
msgid "Selection Options"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: includes/class-testimonials-widget-settings.php:365
|
269 |
msgid "Category Filter"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: includes/class-testimonials-widget-settings.php:366
|
273 |
msgid "Comma separated category names. Ex: Category A, Another category"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: includes/class-testimonials-widget-settings.php:373
|
277 |
msgid "Tags Filter"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: includes/class-testimonials-widget-settings.php:374
|
281 |
msgid "Comma separated tag names. Ex: Tag A, Another tag"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: includes/class-testimonials-widget-settings.php:381
|
285 |
msgid "Require All Tags?"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: includes/class-testimonials-widget-settings.php:382
|
289 |
msgid "Select only testimonials with all of the given tags"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: includes/class-testimonials-widget-settings.php:389
|
293 |
msgid "Include IDs Filter"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: includes/class-testimonials-widget-settings.php:390
|
297 |
+
#: includes/class-testimonials-widget-settings.php:397
|
298 |
msgid "Comma separated testimonial IDs. Ex: 3,1,2"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: includes/class-testimonials-widget-settings.php:396
|
302 |
msgid "Exclude IDs Filter"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: includes/class-testimonials-widget-settings.php:403
|
306 |
msgid "Limit"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: includes/class-testimonials-widget-settings.php:404
|
310 |
msgid "Number of testimonials to select per instance"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: includes/class-testimonials-widget-settings.php:417
|
314 |
msgid "Ordering Options"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: includes/class-testimonials-widget-settings.php:423
|
318 |
msgid "Random Order?"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: includes/class-testimonials-widget-settings.php:424
|
322 |
msgid "If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: includes/class-testimonials-widget-settings.php:431
|
326 |
msgid "ORDER BY"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: includes/class-testimonials-widget-settings.php:432
|
330 |
msgid "Used when \"Random Order\" is disabled"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: includes/class-testimonials-widget-settings.php:435
|
334 |
msgid "Testimonial ID"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: includes/class-testimonials-widget-settings.php:436
|
338 |
msgid "Author"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/class-testimonials-widget-settings.php:437
|
342 |
+
#: includes/class-testimonials-widget.php:552
|
343 |
msgid "Date"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: includes/class-testimonials-widget-settings.php:438
|
347 |
msgid "Menu Order"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: includes/class-testimonials-widget-settings.php:439
|
351 |
+
#: includes/class-testimonials-widget.php:544
|
352 |
msgid "Source"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: includes/class-testimonials-widget-settings.php:440
|
356 |
msgid "No order"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: includes/class-testimonials-widget-settings.php:448
|
360 |
msgid "ORDER BY meta_key"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: includes/class-testimonials-widget-settings.php:449
|
364 |
msgid "Used when \"Random Order\" is disabled and sorting by a testimonials meta key is needed. Overrides ORDER BY"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: includes/class-testimonials-widget-settings.php:452
|
368 |
msgid "None"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: includes/class-testimonials-widget-settings.php:453
|
372 |
+
#: includes/class-testimonials-widget.php:546
|
373 |
+
#: includes/class-testimonials-widget.php:1610
|
374 |
msgid "Job Title"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: includes/class-testimonials-widget-settings.php:454
|
378 |
+
#: includes/class-testimonials-widget.php:548
|
379 |
+
#: includes/class-testimonials-widget.php:1622
|
380 |
msgid "Email"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: includes/class-testimonials-widget-settings.php:455
|
384 |
+
#: includes/class-testimonials-widget.php:547
|
385 |
+
#: includes/class-testimonials-widget.php:1616
|
386 |
msgid "Location"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: includes/class-testimonials-widget-settings.php:456
|
390 |
+
#: includes/class-testimonials-widget.php:549
|
391 |
+
#: includes/class-testimonials-widget.php:1628
|
392 |
msgid "Company"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: includes/class-testimonials-widget-settings.php:457
|
396 |
+
#: includes/class-testimonials-widget.php:550
|
397 |
+
#: includes/class-testimonials-widget.php:1634
|
398 |
msgid "URL"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: includes/class-testimonials-widget-settings.php:464
|
402 |
msgid "ORDER BY Order"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: includes/class-testimonials-widget-settings.php:467
|
406 |
msgid "Descending"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: includes/class-testimonials-widget-settings.php:468
|
410 |
msgid "Ascending"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: includes/class-testimonials-widget-settings.php:482
|
414 |
msgid "Allow Comments?"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: includes/class-testimonials-widget-settings.php:483
|
418 |
msgid "Only affects the Testimonials post edit page. Your theme controls the front-end view."
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: includes/class-testimonials-widget-settings.php:489
|
422 |
msgid "URL slug-name for <a href=\"%1s\">testimonials archive</a> page."
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: includes/class-testimonials-widget-settings.php:495
|
426 |
msgid "Archive Page URL"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: includes/class-testimonials-widget-settings.php:502
|
430 |
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."
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: includes/class-testimonials-widget-settings.php:506
|
434 |
msgid "Testimonial Page URL"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: includes/class-testimonials-widget-settings.php:516
|
438 |
msgid "Reset & Compatiblity Options"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: includes/class-testimonials-widget-settings.php:522
|
442 |
msgid "Don't Use Default Taxonomies?"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: includes/class-testimonials-widget-settings.php:525
|
446 |
msgid "If checked, use Testimonials' own category and tag taxonomies instead"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: includes/class-testimonials-widget-settings.php:533
|
450 |
msgid "Version Based Options"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: includes/class-testimonials-widget-settings.php:539
|
454 |
msgid "Use bxSlider?"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: includes/class-testimonials-widget-settings.php:540
|
458 |
msgid "Pre 2.15.0, Testimonials' used custom JavaScript for transitions."
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/class-testimonials-widget-settings.php:552
|
462 |
msgid "Disable Animation?"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/class-testimonials-widget-settings.php:553
|
466 |
msgid "Pre 2.15.0, Disable animation between testimonial transitions. Useful when stacking widgets."
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: includes/class-testimonials-widget-settings.php:561
|
470 |
msgid "Fade Out Speed"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: includes/class-testimonials-widget-settings.php:562
|
474 |
+
#: includes/class-testimonials-widget-settings.php:570
|
475 |
msgid "Pre 2.15.0, Transition duration in milliseconds; higher values indicate slower animations, not faster ones."
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/class-testimonials-widget-settings.php:569
|
479 |
msgid "Fade In Speed"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/class-testimonials-widget-settings.php:577
|
483 |
msgid "Height"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/class-testimonials-widget-settings.php:578
|
487 |
msgid "Pre 2.15.0, Testimonials height, in pixels. Overrides minimum and maximum height"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: includes/class-testimonials-widget-settings.php:584
|
491 |
msgid "Minimum Height"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: includes/class-testimonials-widget-settings.php:585
|
495 |
msgid "Pre 2.15.0, Set for minimum display height, in pixels"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: includes/class-testimonials-widget-settings.php:591
|
499 |
msgid "Maximum Height"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: includes/class-testimonials-widget-settings.php:592
|
503 |
msgid "Pre 2.15.0, Set for maximum display height, in pixels"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: includes/class-testimonials-widget-settings.php:598
|
507 |
msgid "Always Load CSS?"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: includes/class-testimonials-widget-settings.php:599
|
511 |
msgid "Pre 2.14.0, Testimonials' CSS was always loaded, whether needed or not"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: includes/class-testimonials-widget-settings.php:610
|
515 |
msgid "Include IE7 CSS?"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: includes/class-testimonials-widget-settings.php:611
|
519 |
msgid "IE7 specific CSS moved to separate CSS file in version 2.13.6."
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: includes/class-testimonials-widget-settings.php:623
|
523 |
msgid "Use `<q>` tag?"
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: includes/class-testimonials-widget-settings.php:624
|
527 |
msgid "Pre 2.11.0, not HTML5 compliant"
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: includes/class-testimonials-widget-settings.php:635
|
531 |
msgid "Remove `.hentry` CSS?"
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: includes/class-testimonials-widget-settings.php:636
|
535 |
msgid "Pre 2.6.4, some themes use class `.hentry` in a manner that breaks Testimonials' CSS"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: includes/class-testimonials-widget-settings.php:862
|
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 |
+
#: includes/class-testimonials-widget-settings.php:864
|
543 |
msgid "Shortcode option names are listed below each entry."
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: includes/class-testimonials-widget-settings.php:867
|
547 |
msgid "View the <a href=\"%s\">Testimonials documentation</a>."
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/class-testimonials-widget-settings.php:877
|
551 |
msgid "Show or hide optional fields."
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: includes/class-testimonials-widget-settings.php:885
|
555 |
msgid "Options used to select testimonials."
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: includes/class-testimonials-widget-settings.php:893
|
559 |
msgid "Options used to determine displayed testimonials ordering."
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: includes/class-testimonials-widget-settings.php:901
|
563 |
msgid "Options related to showing testimonials in widgets."
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: includes/class-testimonials-widget-settings.php:909
|
567 |
msgid "Archive and singular page URL related testimonials options."
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: includes/class-testimonials-widget-settings.php:916
|
571 |
msgid "Compatibility & Reset"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: includes/class-testimonials-widget-settings.php:917
|
575 |
msgid "Backwards compatibility, import/export options, and reset options."
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: includes/class-testimonials-widget-widget.php:30
|
579 |
msgid "Display testimonials with multiple selection and display options"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: includes/class-testimonials-widget-widget.php:102
|
583 |
msgid "CSS Class"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: includes/class-testimonials-widget-widget.php:103
|
587 |
msgid "This widget's unique CSS class for styling"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: includes/class-testimonials-widget.php:130
|
591 |
+
#: includes/class-testimonials-widget.php:1962
|
|
|
|
|
|
|
592 |
msgid "Testimonials Shortcode Examples"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: includes/class-testimonials-widget.php:130
|
596 |
msgid "E.g. Shortcodes"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: includes/class-testimonials-widget.php:331
|
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 |
+
#: includes/class-testimonials-widget.php:542
|
604 |
msgid "ID"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: includes/class-testimonials-widget.php:543
|
608 |
msgid "Image"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: includes/class-testimonials-widget.php:545
|
612 |
msgid "Shortcodes"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: includes/class-testimonials-widget.php:551
|
616 |
msgid "Published by"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: includes/class-testimonials-widget.php:557
|
620 |
+
#: includes/class-testimonials-widget.php:560
|
621 |
msgid "Category"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: includes/class-testimonials-widget.php:558
|
625 |
+
#: includes/class-testimonials-widget.php:561
|
626 |
msgid "Tags"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: includes/class-testimonials-widget.php:572
|
630 |
msgid "Add New"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: includes/class-testimonials-widget.php:573
|
634 |
+
#: includes/class-testimonials-widget.php:576
|
635 |
msgid "Add New Testimonial"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: includes/class-testimonials-widget.php:574
|
639 |
msgid "Edit Testimonial"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: includes/class-testimonials-widget.php:577
|
643 |
+
#: includes/class-testimonials-widget.php:984
|
644 |
msgid "No testimonials found"
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: includes/class-testimonials-widget.php:578
|
648 |
msgid "No testimonials found in Trash"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: includes/class-testimonials-widget.php:580
|
652 |
msgid "Search Testimonials"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: includes/class-testimonials-widget.php:581
|
656 |
+
#: includes/class-testimonials-widget.php:1722
|
657 |
msgid "Testimonial"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: includes/class-testimonials-widget.php:582
|
661 |
msgid "View Testimonial"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: includes/class-testimonials-widget.php:1133
|
665 |
msgid "…"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: includes/class-testimonials-widget.php:1342
|
669 |
msgid "«"
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: includes/class-testimonials-widget.php:1351
|
673 |
msgid "»"
|
674 |
msgstr ""
|
675 |
|
676 |
+
#: includes/class-testimonials-widget.php:1646
|
677 |
msgid "Testimonial Data"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: includes/class-testimonials-widget.php:1671
|
681 |
msgid "Enter title here"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: includes/class-testimonials-widget.php:1672
|
685 |
msgid "Enter testimonial source here"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: includes/class-testimonials-widget.php:1697
|
689 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: includes/class-testimonials-widget.php:1698
|
693 |
msgid "Custom field updated."
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: includes/class-testimonials-widget.php:1699
|
697 |
msgid "Custom field deleted."
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: includes/class-testimonials-widget.php:1700
|
701 |
msgid "Testimonial updated."
|
702 |
msgstr ""
|
703 |
|
704 |
#. translators: %s: date and time of the revision
|
705 |
|
706 |
+
#: includes/class-testimonials-widget.php:1702
|
707 |
msgid "Testimonial restored to revision from %s"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/class-testimonials-widget.php:1703
|
711 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: includes/class-testimonials-widget.php:1704
|
715 |
msgid "Testimonial saved."
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: includes/class-testimonials-widget.php:1705
|
719 |
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
720 |
msgstr ""
|
721 |
|
722 |
+
#: includes/class-testimonials-widget.php:1706
|
723 |
msgid "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview testimonial</a>"
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: includes/class-testimonials-widget.php:1707
|
727 |
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: includes/class-testimonials-widget.php:1953
|
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/libraries/aihrus-framework/class-aihrus-common.php:156
|
735 |
+
msgid "Please donate $5 towards ongoing free support and development of the \"%1$s\" plugin. %2$s"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:61
|
739 |
+
msgid "Reset"
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:62
|
743 |
+
msgid "About"
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:80
|
747 |
+
msgid "Export Settings"
|
748 |
+
msgstr ""
|
749 |
+
|
750 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:82
|
751 |
+
msgid "These are your current settings in a serialized format. Copy the contents to make a backup of your settings."
|
752 |
+
msgstr ""
|
753 |
+
|
754 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:90
|
755 |
+
msgid "Import Settings"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:92
|
759 |
+
msgid "Paste new serialized settings here to overwrite your current configuration."
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:96
|
763 |
+
msgid "Delete all %s data and options from database on plugin deletion"
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:100
|
767 |
+
msgid "Remove Plugin Data on Deletion?"
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:109
|
771 |
+
msgid "Reset to Defaults?"
|
772 |
+
msgstr ""
|
773 |
+
|
774 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:112
|
775 |
+
msgid "Check this box to reset options to their defaults"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:236
|
779 |
+
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>."
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:278
|
783 |
+
msgid "Save Changes"
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:286
|
787 |
+
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>."
|
788 |
+
msgstr ""
|
789 |
+
|
790 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:297
|
791 |
+
msgid "Copyright ©%1$s <a href=\"%2$s\">Aihrus</a>."
|
792 |
+
msgstr ""
|
793 |
+
|
794 |
+
#: includes/libraries/aihrus-framework/class-aihrus-settings.php:598
|
795 |
+
msgid "Required"
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#: includes/libraries/aihrus-framework/class-aihrus-widget.php:140
|
799 |
+
msgid "Expand/Collapse All Options"
|
800 |
+
msgstr ""
|
801 |
+
|
802 |
+
#: includes/libraries/aihrus-framework/class-aihrus-widget.php:149
|
803 |
+
msgid "Expand/Collapse"
|
804 |
+
msgstr ""
|
805 |
+
|
806 |
+
#: includes/libraries/aihrus-framework/requirements.php:30
|
807 |
+
msgid "`aihr_check_aihrus_framework` requires $file argument"
|
808 |
+
msgstr ""
|
809 |
+
|
810 |
+
#: includes/libraries/aihrus-framework/requirements.php:75
|
811 |
+
#: includes/requirements.php:49
|
812 |
+
msgid "<a href=\"%1$s\">Update plugins</a>. <a href=\"%2$s\">More information</a>."
|
813 |
+
msgstr ""
|
814 |
+
|
815 |
+
#: includes/libraries/aihrus-framework/requirements.php:86
|
816 |
+
msgid "Plugin \"%1$s\" is causing the out of date issue."
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: includes/libraries/aihrus-framework/requirements.php:91
|
820 |
+
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"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/libraries/aihrus-framework/requirements.php:100
|
824 |
+
msgid "`aihr_check_php` requires $file argument"
|
825 |
+
msgstr ""
|
826 |
+
|
827 |
+
#: includes/libraries/aihrus-framework/requirements.php:141
|
828 |
+
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>."
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: includes/libraries/aihrus-framework/requirements.php:150
|
832 |
+
msgid "`aihr_check_wp` requires $file argument"
|
833 |
+
msgstr ""
|
834 |
+
|
835 |
+
#: includes/libraries/aihrus-framework/requirements.php:195
|
836 |
+
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>."
|
837 |
+
msgstr ""
|
838 |
+
|
839 |
+
#: includes/libraries/aihrus-framework/requirements.php:225
|
840 |
+
msgid "<a href=\"%1$s\">update to</a>"
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#: includes/libraries/aihrus-framework/requirements.php:230
|
844 |
+
msgid "<a href=\"%1$s\">install</a>"
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: includes/libraries/aihrus-framework/requirements.php:233
|
848 |
+
msgid "<a href=\"%1$s\">activate</a>"
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: includes/libraries/aihrus-framework/requirements.php:237
|
852 |
+
msgid "Plugin \"%3$s\" has been deactivated. Please %1$s \"%4$s\" version %2$s or newer before activating \"%3$s\"."
|
853 |
+
msgstr ""
|
854 |
+
|
855 |
+
#: includes/libraries/aihrus-framework/requirements.php:250
|
856 |
+
msgid "<a href=\"%1$s\">%2$s > Settings</a>, <em>Premium</em> tab, <em>License Key</em> entry"
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
+
#: includes/libraries/aihrus-framework/requirements.php:255
|
860 |
+
msgid "<a href=\"%s\">Where's my license key?</a>"
|
861 |
+
msgstr ""
|
862 |
+
|
863 |
+
#: includes/libraries/aihrus-framework/requirements.php:260
|
864 |
+
msgid "<a href=\"%1$s\">%2$s</a>"
|
865 |
+
msgstr ""
|
866 |
+
|
867 |
+
#: includes/libraries/aihrus-framework/requirements.php:264
|
868 |
+
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\"."
|
869 |
+
msgstr ""
|
870 |
+
|
871 |
+
#: includes/requirements.php:51
|
872 |
+
msgid "Plugin \"%1$s\" has been deactivated as it requires a current Aihrus Framework. Once corrected, \"%1$s\" can be activated. %2$s"
|
873 |
+
msgstr ""
|
874 |
#. Plugin Name of the plugin/theme
|
875 |
msgid "Testimonials by Aihrus"
|
876 |
msgstr ""
|
lib/aihrus/.gitignore
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
000-code-qa.txt
|
2 |
-
diff.txt
|
|
|
|
lib/aihrus/TODO.md
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
# TODO Aihrus Framework
|
2 |
-
|
3 |
-
* TBD
|
|
|
|
|
|
phpcs.ruleset.xml
DELETED
@@ -1,31 +0,0 @@
|
|
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
DELETED
@@ -1,21 +0,0 @@
|
|
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 |
|
@@ -72,6 +72,7 @@ The single testimonial view supports image, source, title, location, email, comp
|
|
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 |
|
@@ -168,8 +169,7 @@ Testimonials Premium adds onto the best WordPress testimonials plugin there is,
|
|
168 |
|
169 |
**[[testimonialswidget_widget]]**
|
170 |
|
171 |
-
* `[[testimonialswidget_widget category=product order=asc
|
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,9 +182,9 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
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
|
@@ -304,8 +304,8 @@ Further, global settings are the baseline for shortcodes. If you want to alter t
|
|
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
|
309 |
|
310 |
|
311 |
== Installation ==
|
@@ -406,6 +406,10 @@ See [Changelog](https://github.com/michael-cannon/testimonials-widget/blob/maste
|
|
406 |
|
407 |
== Upgrade Notice ==
|
408 |
|
|
|
|
|
|
|
|
|
409 |
= 2.16.0 =
|
410 |
|
411 |
* [Requires PHP 5.3+](https://aihrus.zendesk.com/entries/30678006)
|
@@ -512,6 +516,11 @@ Version 2.0.0 of Testimonials is a complete rewrite based upon a composite of id
|
|
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
|
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.18.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
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 |
+
* [Testimonials by WooThemes](http://wordpress.org/plugins/wootheme-testimonials-to-testimonials/)
|
76 |
|
77 |
= Testimonials Premium =
|
78 |
|
169 |
|
170 |
**[[testimonialswidget_widget]]**
|
171 |
|
172 |
+
* `[[testimonialswidget_widget category=product order=asc]]` - Show rotating testimonials, of the product category, lowest post ids first
|
|
|
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 |
+
* Default Reviewed Item? - Name of thing being referenced in testimonials
|
186 |
* `item_reviewed` - default "Site Title"
|
187 |
+
* Default 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
|
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 and corrupts microdata parsing
|
308 |
+
* `remove_hentry` - default true; remove_hentry=false
|
309 |
|
310 |
|
311 |
== Installation ==
|
406 |
|
407 |
== Upgrade Notice ==
|
408 |
|
409 |
+
= 2.18.0 =
|
410 |
+
|
411 |
+
* `remove_hentry` is now true by default
|
412 |
+
|
413 |
= 2.16.0 =
|
414 |
|
415 |
* [Requires PHP 5.3+](https://aihrus.zendesk.com/entries/30678006)
|
516 |
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).
|
517 |
|
518 |
|
519 |
+
== Conflicts ==
|
520 |
+
|
521 |
+
* [ReOrder Post Within Categories](http://wordpress.org/plugins/reorder-post-within-categories/) – Uses custom ordering table
|
522 |
+
|
523 |
+
|
524 |
== Localization ==
|
525 |
|
526 |
* Dutch by Bjorn Robijns
|
testimonials-widget-ie7.css
DELETED
@@ -1,15 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
testimonials-widget.php
CHANGED
@@ -3,10 +3,12 @@
|
|
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 |
*/
|
11 |
|
12 |
|
@@ -27,2033 +29,19 @@
|
|
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( '
|
|
|
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.
|
34 |
|
35 |
-
require_once
|
36 |
|
37 |
if ( ! tw_requirements_check() ) {
|
38 |
return false;
|
39 |
}
|
40 |
|
41 |
-
require_once
|
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,31 +52,41 @@ add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
|
2064 |
* @SuppressWarnings(PHPMD.LongVariable)
|
2065 |
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
2066 |
*/
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
|
|
2072 |
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
|
|
2076 |
}
|
2077 |
}
|
2078 |
|
2079 |
|
2080 |
-
|
2081 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2082 |
|
2083 |
-
|
|
|
2084 |
}
|
2085 |
|
2086 |
|
2087 |
-
|
2088 |
-
|
|
|
2089 |
|
2090 |
-
|
|
|
2091 |
}
|
2092 |
|
2093 |
-
|
2094 |
?>
|
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.18.0
|
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 |
|
29 |
define( 'TW_AIHR_VERSION', '1.0.1' );
|
30 |
define( 'TW_BASE', plugin_basename( __FILE__ ) );
|
31 |
define( 'TW_DIR', plugin_dir_path( __FILE__ ) );
|
32 |
+
define( 'TW_DIR_INC', TW_DIR . 'includes/' );
|
33 |
+
define( 'TW_DIR_LIB', TW_DIR_INC . 'libraries/' );
|
34 |
define( 'TW_NAME', 'Testimonials by Aihrus' );
|
35 |
define( 'TW_PREMIUM_LINK', '<a href="http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/">Purchase Testimonials Premium</a>' );
|
36 |
+
define( 'TW_VERSION', '2.18.0' );
|
37 |
|
38 |
+
require_once TW_DIR_INC . 'requirements.php';
|
39 |
|
40 |
if ( ! tw_requirements_check() ) {
|
41 |
return false;
|
42 |
}
|
43 |
|
44 |
+
require_once TW_DIR_INC . 'class-testimonials-widget.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
47 |
|
52 |
* @SuppressWarnings(PHPMD.LongVariable)
|
53 |
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
54 |
*/
|
55 |
+
if ( ! function_exists( 'testimonialswidget_init' ) ) {
|
56 |
+
function testimonialswidget_init() {
|
57 |
+
if ( Testimonials_Widget::version_check() ) {
|
58 |
+
global $Testimonials_Widget_Settings;
|
59 |
+
if ( is_null( $Testimonials_Widget_Settings ) )
|
60 |
+
$Testimonials_Widget_Settings = new Testimonials_Widget_Settings();
|
61 |
|
62 |
+
global $Testimonials_Widget;
|
63 |
+
if ( is_null( $Testimonials_Widget ) )
|
64 |
+
$Testimonials_Widget = new Testimonials_Widget();
|
65 |
+
}
|
66 |
}
|
67 |
}
|
68 |
|
69 |
|
70 |
+
register_activation_hook( __FILE__, array( 'Testimonials_Widget', 'activation' ) );
|
71 |
+
register_deactivation_hook( __FILE__, array( 'Testimonials_Widget', 'deactivation' ) );
|
72 |
+
register_uninstall_hook( __FILE__, array( 'Testimonials_Widget', 'uninstall' ) );
|
73 |
+
|
74 |
+
|
75 |
+
if ( ! function_exists( 'testimonialswidget_list' ) ) {
|
76 |
+
function testimonialswidget_list( $atts = array() ) {
|
77 |
+
global $Testimonials_Widget;
|
78 |
|
79 |
+
return $Testimonials_Widget->testimonialswidget_list( $atts );
|
80 |
+
}
|
81 |
}
|
82 |
|
83 |
|
84 |
+
if ( ! function_exists( 'testimonialswidget_widget' ) ) {
|
85 |
+
function testimonialswidget_widget( $atts = array(), $widget_number = null ) {
|
86 |
+
global $Testimonials_Widget;
|
87 |
|
88 |
+
return $Testimonials_Widget->testimonialswidget_widget( $atts, $widget_number );
|
89 |
+
}
|
90 |
}
|
91 |
|
|
|
92 |
?>
|