Version Description
= 2.16.0 =
- Requires PHP 5.3+
= 2.15.0 =
- If upgrading, bxSlider will not be enabled by default. You must enable it in your widget and global settings. CSS customizations must be reviewed to have the
.active
and.display-none
classes removed. The main.testimonials-widget-testimonial
class also need thedisplay: none;
andclear: left;
removed.
= 2.14.0 =
- 60 modifications See Changelog
- CSS wp_register_style and wp_enqueue_style slug changed from 'testimonials-widget' to 'Testimonials_Widget'
- Gravatar image size now based upon Thumbnail size in Media Settings
- Scripts
ksort
removed. Usearray_unshift
in yourtestimonials_widget_testimonials_js
filters instead. - Testimonials > Settings, General tab, option Enable Review Schema? is enabled by default.
= 2.13.6 =
- IE 7 CSS moved to separate file. Include via Testimonials > Settings if needed
= 2.12.0 =
- CSS and JavaScript renaming
-
bottom_text
renamed tobottom-text
-
close_quote
renamed toclose-quote
-
display_none
renamed todisplay-none
-
join_location
renamed tojoin-location
-
join_title
renamed tojoin-title
-
open_quote
renamed toopen-quote
-
testimonialswidget_testimonial
renamed totestimonials-widget-testimonial
-
testimonialswidget_testimonials
renamed totestimonials-widget-testimonials
-
= 2.11.3 =
- Correct filter name
testimonials_widget_next_posts_link
totestimonials_widget_next_posts_link_text
= 2.11.0 =
- CSS class names are simplified. For the most part, other than
testimonialswidget_testimonial
removetestimonialswidget_
from the CSS class name in your CSS customizations.- Ex:
.testimonialswidget_join
becomes.join
- Ex:
.testimonialswidget_author
becomes.author
- Ex:
- Testimonials are now formatted using
blockquote
thanq
for HTML5 compliance. If you needq
tag formatting, enable it at WP Admin > Testimonials > Settings, Compatibility & Reset tab-
cite
is nowdiv.credit
-
= 2.8.0 =
- Deprecated
-
hide_author
nowhide_source
-
- Removed filters
testimonials_widget_options_update
,testimonials_widget_options_form
- Use
testimonials_widget_validate_settings
andtestimonials_widget_settings
instead
- Use
- Renamed variable and related class
widget_text
tobottom_text
= 2.7.3 =
- Quotes are no longer handled via
q
,p:before
, orp:after
CSS. It's handled via.testimonialswidget_testimonial .testimonialswidget_open_quote:before
and.testimonialswidget_testimonial .testimonialswidget_close_quote:after
- This change was made to keep consistency in how quotes were managed and to reduce the number of exception cases. In the end, this is simpler.
= 2.7.0 =
- Quotes with
keep_whitespace=true
aren't applied via CSS.testimonialswidget_testimonial q
tag anymore, but.testimonialswidget_testimonial q p:first-child:before
and.testimonialswidget_testimonial q p:last-child:after
- Widget testimonial
p
tags are no longer CSSdisplay: inline
,display: block
as expected
= 2.4.1 =
- Paging is on by default, except for widgets
= 2.0.0 =
- CSS
- Class
testimonialswidget_company
replacestestimonialswidget_source
- Class
testimonialswidget_source
replacestestimonialswidget_author
- The tighten widget display up, p tags within q are displayed inline.
- Class
- JavaScript
- The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires
wp_footer()
in the footer.
- The JavaScript for rotating testimonials is moved to the footer. As such, your theme requires
- Shortcode options
-
hide_source
replaced byhide_url
-
hide_author
replaced byhide_source
-
- Testimonials
- Migration from the old custom table to new custom post type is automatically done. Import might take a few moments to complete.
- Company, URL and email details are attempted to be identified and placed properly based upon the original author and source fields. The company is "guessed" from the
author
field when there's a ", " or " of " context. If thesource
is an email, it's saved as such. Otherwise, it's assumed to be a URL. - Public testimonials are saved as Published. Non-public testimonials are marked as Private.
- Widget options
- "Show author" and "Show source" options are replaced by "Hide source" and "Hide URL" respectively. There's no backwards compatibility for these changes.
- Default
min-height
is now 250px than 150px.
Download this release
Release Info
Developer | comprock |
Plugin | Testimonials Widget |
Version | 2.16.3 |
Comparing to | |
See all releases |
Code changes from version 2.16.2 to 2.16.3
- .travis.yml +0 -40
- CHANGELOG.md +6 -0
- TODO.md +2 -0
- ci/bin/install-wp-tests.sh +0 -32
- ci/phpcs.ruleset.xml +0 -37
- ci/phpcs.travis.ruleset.xml +0 -44
- ci/phpmd.ruleset.xml +0 -21
- ci/tests/bootstrap.php +0 -13
- ci/tests/class.sample-test.php +0 -34
- languages/testimonials-widget.pot +107 -167
- lib/aihrus/.travis.yml +0 -42
- lib/aihrus/CHANGELOG.md +12 -5
- lib/aihrus/README.md +5 -1
- lib/aihrus/TODO.md +1 -1
- lib/aihrus/ci/bin/install-wp-tests.sh +0 -32
- lib/aihrus/ci/phpcs.ruleset.xml +0 -35
- lib/aihrus/ci/phpcs.travis.ruleset.xml +0 -41
- lib/aihrus/ci/phpmd.ruleset.xml +0 -21
- lib/aihrus/ci/tests/bootstrap.php +0 -13
- lib/aihrus/ci/tests/class.sample-test.php +0 -34
- lib/aihrus/class-aihrus-common.php +235 -2
- lib/aihrus/class-aihrus-settings.php +4 -2
- lib/aihrus/class-aihrus-widget.php +2 -38
- lib/class-testimonials-widget-settings.php +38 -38
- phpunit.xml +0 -14
- readme.txt +5 -1
- testimonials-widget.php +216 -293
.travis.yml
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
language:
|
2 |
-
- php
|
3 |
-
|
4 |
-
php:
|
5 |
-
- 5.3
|
6 |
-
# - 5.4
|
7 |
-
|
8 |
-
env:
|
9 |
-
- WP_VERSION=master WP_MULTISITE=1
|
10 |
-
# - WP_VERSION=master WP_MULTISITE=0
|
11 |
-
# - WP_VERSION=3.5.2 WP_MULTISITE=1
|
12 |
-
# - WP_VERSION=3.5.2 WP_MULTISITE=0
|
13 |
-
|
14 |
-
before_install:
|
15 |
-
- git submodule update --init --recursive
|
16 |
-
|
17 |
-
before_script:
|
18 |
-
- pear config-set auto_discover 1
|
19 |
-
- pear install PHP_CodeSniffer
|
20 |
-
- pear install phpunit/phpcpd
|
21 |
-
- pear channel-discover pear.phpmd.org
|
22 |
-
- pear channel-discover pear.pdepend.org
|
23 |
-
- pear install phpmd/PHP_PMD
|
24 |
-
- phpenv rehash
|
25 |
-
- git clone git://github.com/mrchrisadams/WordPress-Coding-Standards.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/WordPress
|
26 |
-
# - export WP_TESTS_DIR=/tmp/wordpress-tests/
|
27 |
-
# - bash ci/bin/install-wp-tests.sh wordpress_test root '' ${WP_VERSION}
|
28 |
-
- export PWD=`pwd`
|
29 |
-
- export DIR_CI="${PWD}/ci"
|
30 |
-
|
31 |
-
script:
|
32 |
-
- find . -name '*.php' -exec php -l {} \;
|
33 |
-
- phpcs -s -n --standard=${DIR_CI}/phpcs.travis.ruleset.xml .
|
34 |
-
- phpcpd .
|
35 |
-
- phpmd . --exclude class-redrokk-metabox-class.php text ${DIR_CI}/phpmd.ruleset.xml
|
36 |
-
# - phpunit
|
37 |
-
|
38 |
-
notifications:
|
39 |
-
email:
|
40 |
-
on_failure: change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2 |
|
3 |
## master
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
## 2.16.2
|
6 |
* **Version 2.16.0 requires PHP 5.3+**
|
7 |
|
2 |
|
3 |
## master
|
4 |
|
5 |
+
## 2.16.3
|
6 |
+
* Check for PHP 5.3
|
7 |
+
* Move helper methods to Aihrus_Common
|
8 |
+
* Restore pre-2.0.0 auto-migration
|
9 |
+
* Use Aihrus_Common::add_media
|
10 |
+
|
11 |
## 2.16.2
|
12 |
* **Version 2.16.0 requires PHP 5.3+**
|
13 |
|
TODO.md
CHANGED
@@ -2,6 +2,8 @@
|
|
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 |
* Consolidate schema by testimonial item
|
6 |
* Move suggest JS to footer
|
7 |
* On widget expand/collaspe switch labels
|
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
|
ci/bin/install-wp-tests.sh
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
#!/usr/bin/env bash
|
2 |
-
|
3 |
-
if [ $# -lt 3 ]; then
|
4 |
-
echo "usage: ${0} <db-name> <db-user> <db-pass> [wp-version]"
|
5 |
-
exit 1
|
6 |
-
fi
|
7 |
-
|
8 |
-
DB_NAME=${1}
|
9 |
-
DB_USER=${2}
|
10 |
-
DB_PASS=${3}
|
11 |
-
WP_VERSION=${4-master}
|
12 |
-
|
13 |
-
set -ex
|
14 |
-
|
15 |
-
# set up a WP install
|
16 |
-
WP_CORE_DIR=/tmp/wordpress/
|
17 |
-
mkdir -p ${WP_CORE_DIR}
|
18 |
-
wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/${WP_VERSION}
|
19 |
-
tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C ${WP_CORE_DIR}
|
20 |
-
|
21 |
-
# set up testing suite
|
22 |
-
svn co --ignore-externals --quiet http://unit-tests.svn.wordpress.org/trunk/ ${WP_TESTS_DIR}
|
23 |
-
|
24 |
-
cd ${WP_TESTS_DIR}
|
25 |
-
cp wp-tests-config-sample.php wp-tests-config.php
|
26 |
-
sed -i "s:dirname( __FILE__ ) . '/wordpress/':'${WP_CORE_DIR}':" wp-tests-config.php
|
27 |
-
sed -i "s/yourdbnamehere/${DB_NAME}/" wp-tests-config.php
|
28 |
-
sed -i "s/yourusernamehere/${DB_USER}/" wp-tests-config.php
|
29 |
-
sed -i "s/yourpasswordhere/${DB_PASS}/" wp-tests-config.php
|
30 |
-
|
31 |
-
# create database
|
32 |
-
mysqladmin create ${DB_NAME} --user="${DB_USER}" --password="${DB_PASS}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ci/phpcs.ruleset.xml
DELETED
@@ -1,37 +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>js/jquery.bxslider.js</exclude-pattern>
|
8 |
-
<exclude-pattern>js/jquery.easing.1.3.js</exclude-pattern>
|
9 |
-
<exclude-pattern>js/jquery.fitvids.js</exclude-pattern>
|
10 |
-
<exclude-pattern>lib/Akismet.class.php</exclude-pattern>
|
11 |
-
<exclude-pattern>lib/class-redrokk-metabox-class.php</exclude-pattern>
|
12 |
-
|
13 |
-
<rule ref="Generic">
|
14 |
-
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found" />
|
15 |
-
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
16 |
-
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
17 |
-
<exclude name="Generic.Files.LineLength.MaxExceeded" />
|
18 |
-
<exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
|
19 |
-
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
|
20 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
|
21 |
-
<exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
|
22 |
-
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
|
23 |
-
<exclude name="Generic.PHP.CharacterBeforePHPOpeningTag.Found" />
|
24 |
-
<exclude name="Generic.PHP.UpperCaseConstant.Found" />
|
25 |
-
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
|
26 |
-
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
27 |
-
</rule>
|
28 |
-
|
29 |
-
<rule ref="Squiz.PHP.CommentedOutCode"/>
|
30 |
-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
31 |
-
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
|
32 |
-
</rule>
|
33 |
-
|
34 |
-
<rule ref="WordPress">
|
35 |
-
<exclude name="WordPress.XSS.EscapeOutput" />
|
36 |
-
</rule>
|
37 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ci/phpcs.travis.ruleset.xml
DELETED
@@ -1,44 +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>ci/</exclude-pattern>
|
8 |
-
<exclude-pattern>js/jquery.bxslider.js</exclude-pattern>
|
9 |
-
<exclude-pattern>js/jquery.easing.1.3.js</exclude-pattern>
|
10 |
-
<exclude-pattern>js/jquery.fitvids.js</exclude-pattern>
|
11 |
-
<exclude-pattern>lib/Akismet.class.php</exclude-pattern>
|
12 |
-
<exclude-pattern>lib/class-redrokk-metabox-class.php</exclude-pattern>
|
13 |
-
|
14 |
-
<rule ref="Generic">
|
15 |
-
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found" />
|
16 |
-
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
17 |
-
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
18 |
-
<exclude name="Generic.Files.LineLength.MaxExceeded" />
|
19 |
-
<exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
|
20 |
-
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
|
21 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
|
22 |
-
<exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
|
23 |
-
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
|
24 |
-
<exclude name="Generic.PHP.CharacterBeforePHPOpeningTag.Found" />
|
25 |
-
<exclude name="Generic.PHP.UpperCaseConstant.Found" />
|
26 |
-
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
|
27 |
-
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
28 |
-
</rule>
|
29 |
-
|
30 |
-
<rule ref="Squiz.PHP.CommentedOutCode">
|
31 |
-
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
|
32 |
-
</rule>
|
33 |
-
|
34 |
-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
35 |
-
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
|
36 |
-
</rule>
|
37 |
-
|
38 |
-
<rule ref="WordPress">
|
39 |
-
<exclude name="WordPress.XSS.EscapeOutput" />
|
40 |
-
<!-- travis-ci.org is puking on switch/case indentation -->
|
41 |
-
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
|
42 |
-
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
|
43 |
-
</rule>
|
44 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ci/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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ci/tests/bootstrap.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php';
|
4 |
-
|
5 |
-
function _manually_load_plugin() {
|
6 |
-
require dirname( __FILE__ ) . '/../../testimonials-widget.php';
|
7 |
-
}
|
8 |
-
|
9 |
-
|
10 |
-
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
11 |
-
|
12 |
-
require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
|
13 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ci/tests/class.sample-test.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class SampleTest extends WP_UnitTestCase {
|
3 |
-
function test_sample() {
|
4 |
-
// replace this with some actual testing code
|
5 |
-
$this->assertTrue( true );
|
6 |
-
}
|
7 |
-
|
8 |
-
|
9 |
-
/**
|
10 |
-
*
|
11 |
-
*
|
12 |
-
* @SuppressWarnings(PHPMD.Superglobals)
|
13 |
-
*/
|
14 |
-
|
15 |
-
|
16 |
-
function set_post( $key, $value ) {
|
17 |
-
$_POST[$key] = $_REQUEST[$key] = addslashes( $value );
|
18 |
-
}
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
*
|
23 |
-
*
|
24 |
-
* @SuppressWarnings(PHPMD.Superglobals)
|
25 |
-
*/
|
26 |
-
function unset_post( $key ) {
|
27 |
-
unset( $_POST[$key], $_REQUEST[$key] );
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/testimonials-widget.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Testimonials package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Testimonials 2.16.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,48 +12,44 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: lib/aihrus/class-aihrus-common.php:
|
|
|
|
|
|
|
|
|
16 |
msgid "<a href=\"%1$s\">update to</a>"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: lib/aihrus/class-aihrus-common.php:
|
20 |
msgid "<a href=\"%1$s\">install</a>"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: lib/aihrus/class-aihrus-common.php:
|
24 |
msgid "<a href=\"%1$s\">activate</a>"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: lib/aihrus/class-aihrus-common.php:
|
28 |
-
msgid ""
|
29 |
-
"Plugin %3$s has been deactivated. Please %1$s %4$s version %2$s or newer "
|
30 |
-
"before activating %3$s."
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: lib/aihrus/class-aihrus-common.php:
|
34 |
-
msgid ""
|
35 |
-
"<a href=\"%1$s\">%2$s > Settings</a>, <em>Premium</em> tab, <em>License "
|
36 |
-
"Key</em> entry"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: lib/aihrus/class-aihrus-common.php:
|
40 |
msgid "<a href=\"%s\">Where's my license key?</a>"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: lib/aihrus/class-aihrus-common.php:
|
44 |
msgid "<a href=\"%1$s\">%2$s</a>"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: lib/aihrus/class-aihrus-common.php:
|
48 |
-
msgid ""
|
49 |
-
"Plugin %1$s requires license activation before updating will work. Please "
|
50 |
-
"activate the license key via %2$s. No license key? See %3$s or purchase %4$s."
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: lib/aihrus/class-aihrus-common.php:
|
54 |
-
msgid ""
|
55 |
-
"Please donate $5 towards ongoing support and development of the %1$s plugin. "
|
56 |
-
"%2$s"
|
57 |
msgstr ""
|
58 |
|
59 |
#: lib/aihrus/class-aihrus-settings.php:61
|
@@ -69,9 +65,7 @@ msgid "Export Settings"
|
|
69 |
msgstr ""
|
70 |
|
71 |
#: lib/aihrus/class-aihrus-settings.php:82
|
72 |
-
msgid ""
|
73 |
-
"These are your current settings in a serialized format. Copy the contents to "
|
74 |
-
"make a backup of your settings."
|
75 |
msgstr ""
|
76 |
|
77 |
#: lib/aihrus/class-aihrus-settings.php:90
|
@@ -79,66 +73,50 @@ msgid "Import Settings"
|
|
79 |
msgstr ""
|
80 |
|
81 |
#: lib/aihrus/class-aihrus-settings.php:92
|
82 |
-
msgid ""
|
83 |
-
"Paste new serialized settings here to overwrite your current configuration."
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
87 |
-
msgid "
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
91 |
-
msgid ""
|
92 |
-
"Delete all WordPress Starter data and options from database on plugin "
|
93 |
-
"deletion"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
97 |
msgid "Reset to Defaults?"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
101 |
msgid "Check this box to reset options to their defaults"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
105 |
-
msgid ""
|
106 |
-
"<img class=\"alignright size-medium\" src=\"%1$s/media/michael-cannon-red-"
|
107 |
-
"square-300x2251.jpg\" alt=\"Michael in Red Square, Moscow, Russia\" width="
|
108 |
-
"\"300\" height=\"225\" /><a href=\"%2$s\">%3$s</a> is by <a href=\"%4$s"
|
109 |
-
"\">Michael Cannon</a>. He's <a href=\"%5$s\">Peichi’s</a> smiling man, an "
|
110 |
-
"adventurous <a href=\"%6$s\" target=\"_blank\">water-rat</a>, <a href=\"%7$s"
|
111 |
-
"\">chief people officer</a>, <a href=\"%8$s\">cyclist</a>, <a href=\"%9$s"
|
112 |
-
"\">full stack developer</a>, <a href=\"%10$s\">poet</a>, <a href=\"%11$s"
|
113 |
-
"\">WWOOF’er</a> and <a href=\"%12$s\">world traveler</a>."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
117 |
msgid "Save Changes"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
121 |
-
msgid ""
|
122 |
-
"If you like this plugin, please <a href=\"%1$s\" title=\"Donate for Good "
|
123 |
-
"Karma\"><img src=\"%2$s\" border=\"0\" alt=\"Donate for Good Karma\" /></a> "
|
124 |
-
"or <a href=\"%3$s\" title=\"purchase premium WordPress plugins from Aihrus "
|
125 |
-
"\">purchase the Premium version</a> to help fund further development and <a "
|
126 |
-
"href=\"%4$s\" title=\"Support forums\">support</a>."
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
130 |
msgid "Copyright ©%1$s <a href=\"%2$s\">Aihrus</a>."
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: lib/aihrus/class-aihrus-settings.php:
|
134 |
msgid "Required"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: lib/aihrus/class-aihrus-widget.php:
|
138 |
msgid "Expand/Collapse All Options"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: lib/aihrus/class-aihrus-widget.php:
|
142 |
msgid "Expand/Collapse"
|
143 |
msgstr ""
|
144 |
|
@@ -146,7 +124,7 @@ msgstr ""
|
|
146 |
msgid "Testimonials Settings"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: lib/class-testimonials-widget-settings.php:89 testimonials-widget.php:
|
150 |
msgid "Settings"
|
151 |
msgstr ""
|
152 |
|
@@ -179,11 +157,9 @@ msgstr ""
|
|
179 |
msgid "Widget Title"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#. #-#-#-#-# testimonials-widget.pot (Testimonials 2.16.2) #-#-#-#-#
|
183 |
-
#. Plugin Name of the plugin/theme
|
184 |
#: lib/class-testimonials-widget-settings.php:127
|
185 |
-
#: lib/class-testimonials-widget-widget.php:29 testimonials-widget.php:
|
186 |
-
#: testimonials-widget.php:
|
187 |
msgid "Testimonials"
|
188 |
msgstr ""
|
189 |
|
@@ -192,9 +168,7 @@ msgid "Title Link"
|
|
192 |
msgstr ""
|
193 |
|
194 |
#: lib/class-testimonials-widget-settings.php:134
|
195 |
-
msgid ""
|
196 |
-
"URL, path, or post ID to link widget title to. Ex: http://example.com/"
|
197 |
-
"stuff, /testimonials, 123 or "
|
198 |
msgstr ""
|
199 |
|
200 |
#: lib/class-testimonials-widget-settings.php:140
|
@@ -210,9 +184,7 @@ msgid "Rotation Speed"
|
|
210 |
msgstr ""
|
211 |
|
212 |
#: lib/class-testimonials-widget-settings.php:148
|
213 |
-
msgid ""
|
214 |
-
"Number of seconds between testimonial rotations or 0 for no rotation at all "
|
215 |
-
"refresh"
|
216 |
msgstr ""
|
217 |
|
218 |
#: lib/class-testimonials-widget-settings.php:160
|
@@ -276,10 +248,7 @@ msgid "General Options"
|
|
276 |
msgstr ""
|
277 |
|
278 |
#: lib/class-testimonials-widget-settings.php:221
|
279 |
-
msgid ""
|
280 |
-
"Adds HTML tag markup per the <a href=\"%s\">Review schema</a> to "
|
281 |
-
"testimonials. Search engines including Bing, Google, Yahoo! and Yandex rely "
|
282 |
-
"on this markup to improve the display of search results."
|
283 |
msgstr ""
|
284 |
|
285 |
#: lib/class-testimonials-widget-settings.php:224
|
@@ -456,9 +425,7 @@ msgid "Random Order?"
|
|
456 |
msgstr ""
|
457 |
|
458 |
#: lib/class-testimonials-widget-settings.php:422
|
459 |
-
msgid ""
|
460 |
-
"If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets "
|
461 |
-
"are random by default automatically"
|
462 |
msgstr ""
|
463 |
|
464 |
#: lib/class-testimonials-widget-settings.php:429
|
@@ -477,7 +444,7 @@ msgstr ""
|
|
477 |
msgid "Author"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: lib/class-testimonials-widget-settings.php:435 testimonials-widget.php:
|
481 |
msgid "Date"
|
482 |
msgstr ""
|
483 |
|
@@ -485,7 +452,7 @@ msgstr ""
|
|
485 |
msgid "Menu Order"
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: lib/class-testimonials-widget-settings.php:437 testimonials-widget.php:
|
489 |
msgid "Source"
|
490 |
msgstr ""
|
491 |
|
@@ -498,37 +465,35 @@ msgid "ORDER BY meta_key"
|
|
498 |
msgstr ""
|
499 |
|
500 |
#: lib/class-testimonials-widget-settings.php:447
|
501 |
-
msgid ""
|
502 |
-
"Used when \"Random Order\" is disabled and sorting by a testimonials meta "
|
503 |
-
"key is needed. Overrides ORDER BY"
|
504 |
msgstr ""
|
505 |
|
506 |
#: lib/class-testimonials-widget-settings.php:450
|
507 |
msgid "None"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: lib/class-testimonials-widget-settings.php:451 testimonials-widget.php:
|
511 |
-
#: testimonials-widget.php:
|
512 |
msgid "Job Title"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: lib/class-testimonials-widget-settings.php:452 testimonials-widget.php:
|
516 |
-
#: testimonials-widget.php:
|
517 |
msgid "Email"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: lib/class-testimonials-widget-settings.php:453 testimonials-widget.php:
|
521 |
-
#: testimonials-widget.php:
|
522 |
msgid "Location"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: lib/class-testimonials-widget-settings.php:454 testimonials-widget.php:
|
526 |
-
#: testimonials-widget.php:
|
527 |
msgid "Company"
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: lib/class-testimonials-widget-settings.php:455 testimonials-widget.php:
|
531 |
-
#: testimonials-widget.php:
|
532 |
msgid "URL"
|
533 |
msgstr ""
|
534 |
|
@@ -549,9 +514,7 @@ msgid "Allow Comments?"
|
|
549 |
msgstr ""
|
550 |
|
551 |
#: lib/class-testimonials-widget-settings.php:481
|
552 |
-
msgid ""
|
553 |
-
"Only affects the Testimonials post edit page. Your theme controls the front-"
|
554 |
-
"end view."
|
555 |
msgstr ""
|
556 |
|
557 |
#: lib/class-testimonials-widget-settings.php:487
|
@@ -563,9 +526,7 @@ msgid "Archive Page URL"
|
|
563 |
msgstr ""
|
564 |
|
565 |
#: lib/class-testimonials-widget-settings.php:500
|
566 |
-
msgid ""
|
567 |
-
"URL slug-name for testimonial view pages. Shouldn't be the same as the "
|
568 |
-
"Archive Page URL nor should it match a page URL slug."
|
569 |
msgstr ""
|
570 |
|
571 |
#: lib/class-testimonials-widget-settings.php:504
|
@@ -601,9 +562,7 @@ msgid "Disable Animation?"
|
|
601 |
msgstr ""
|
602 |
|
603 |
#: lib/class-testimonials-widget-settings.php:551
|
604 |
-
msgid ""
|
605 |
-
"Pre 2.15.0, Disable animation between testimonial transitions. Useful when "
|
606 |
-
"stacking widgets."
|
607 |
msgstr ""
|
608 |
|
609 |
#: lib/class-testimonials-widget-settings.php:559
|
@@ -612,9 +571,7 @@ msgstr ""
|
|
612 |
|
613 |
#: lib/class-testimonials-widget-settings.php:560
|
614 |
#: lib/class-testimonials-widget-settings.php:568
|
615 |
-
msgid ""
|
616 |
-
"Pre 2.15.0, Transition duration in milliseconds; higher values indicate "
|
617 |
-
"slower animations, not faster ones."
|
618 |
msgstr ""
|
619 |
|
620 |
#: lib/class-testimonials-widget-settings.php:567
|
@@ -626,9 +583,7 @@ msgid "Height"
|
|
626 |
msgstr ""
|
627 |
|
628 |
#: lib/class-testimonials-widget-settings.php:576
|
629 |
-
msgid ""
|
630 |
-
"Pre 2.15.0, Testimonials height, in pixels. Overrides minimum and maximum "
|
631 |
-
"height"
|
632 |
msgstr ""
|
633 |
|
634 |
#: lib/class-testimonials-widget-settings.php:582
|
@@ -676,18 +631,11 @@ msgid "Remove `.hentry` CSS?"
|
|
676 |
msgstr ""
|
677 |
|
678 |
#: lib/class-testimonials-widget-settings.php:634
|
679 |
-
msgid ""
|
680 |
-
"Pre 2.6.4, some themes use class `.hentry` in a manner that breaks "
|
681 |
-
"Testimonials' CSS"
|
682 |
msgstr ""
|
683 |
|
684 |
#: lib/class-testimonials-widget-settings.php:858
|
685 |
-
msgid ""
|
686 |
-
"These Testimonials Settings establish the default option values for "
|
687 |
-
"shortcodes, theme functions, and widget instances. Widgets, once created no "
|
688 |
-
"longer inherit these global settings. Therefore, you'll need to update each "
|
689 |
-
"widget with the new settings. It might be easier to delete the widget and "
|
690 |
-
"then recreate it."
|
691 |
msgstr ""
|
692 |
|
693 |
#: lib/class-testimonials-widget-settings.php:860
|
@@ -738,151 +686,145 @@ msgstr ""
|
|
738 |
msgid "This widget's unique CSS class for styling"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: testimonials-widget.php:
|
742 |
msgid "Testimonials Shortcode Examples"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: testimonials-widget.php:
|
746 |
msgid "E.g. Shortcodes"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: testimonials-widget.php:
|
750 |
-
msgid ""
|
751 |
-
"If your Testimonials display has gone to funky town, please <a href=\"%s"
|
752 |
-
"\">read the FAQ</a> about possible CSS fixes."
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: testimonials-widget.php:
|
756 |
msgid "ID"
|
757 |
msgstr ""
|
758 |
|
759 |
-
#: testimonials-widget.php:
|
760 |
msgid "Image"
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: testimonials-widget.php:
|
764 |
msgid "Shortcodes"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: testimonials-widget.php:
|
768 |
msgid "Published by"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: testimonials-widget.php:
|
772 |
msgid "Category"
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: testimonials-widget.php:
|
776 |
msgid "Tags"
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: testimonials-widget.php:
|
780 |
msgid "Add New"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: testimonials-widget.php:
|
784 |
msgid "Add New Testimonial"
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: testimonials-widget.php:
|
788 |
msgid "Edit Testimonial"
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: testimonials-widget.php:
|
792 |
msgid "No testimonials found"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: testimonials-widget.php:
|
796 |
msgid "No testimonials found in Trash"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: testimonials-widget.php:
|
800 |
msgid "Search Testimonials"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: testimonials-widget.php:
|
804 |
msgid "Testimonial"
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: testimonials-widget.php:
|
808 |
msgid "View Testimonial"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: testimonials-widget.php:
|
812 |
msgid "…"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: testimonials-widget.php:
|
816 |
msgid "«"
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: testimonials-widget.php:
|
820 |
msgid "»"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: testimonials-widget.php:
|
824 |
msgid "Testimonial Data"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: testimonials-widget.php:
|
828 |
msgid "Enter title here"
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: testimonials-widget.php:
|
832 |
msgid "Enter testimonial source here"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: testimonials-widget.php:
|
836 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: testimonials-widget.php:
|
840 |
msgid "Custom field updated."
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: testimonials-widget.php:
|
844 |
msgid "Custom field deleted."
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: testimonials-widget.php:
|
848 |
msgid "Testimonial updated."
|
849 |
msgstr ""
|
850 |
|
851 |
#. translators: %s: date and time of the revision
|
852 |
-
|
|
|
853 |
msgid "Testimonial restored to revision from %s"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: testimonials-widget.php:
|
857 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: testimonials-widget.php:
|
861 |
msgid "Testimonial saved."
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: testimonials-widget.php:
|
865 |
-
msgid ""
|
866 |
-
"Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</"
|
867 |
-
"a>"
|
868 |
msgstr ""
|
869 |
|
870 |
-
#: testimonials-widget.php:
|
871 |
-
msgid ""
|
872 |
-
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
873 |
-
"\"%2$s\">Preview testimonial</a>"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: testimonials-widget.php:
|
877 |
-
msgid ""
|
878 |
-
"Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview "
|
879 |
-
"testimonial</a>"
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: testimonials-widget.php:
|
883 |
-
msgid ""
|
884 |
-
|
885 |
-
|
|
|
886 |
msgstr ""
|
887 |
|
888 |
#. Plugin URI of the plugin/theme
|
@@ -890,9 +832,7 @@ msgid "http://wordpress.org/plugins/testimonials-widget/"
|
|
890 |
msgstr ""
|
891 |
|
892 |
#. Description of the plugin/theme
|
893 |
-
msgid ""
|
894 |
-
"Testimonials lets you randomly slide or list selected portfolios, quotes, "
|
895 |
-
"reviews, or text with images or videos on your WordPress site."
|
896 |
msgstr ""
|
897 |
|
898 |
#. Author of the plugin/theme
|
2 |
# This file is distributed under the same license as the Testimonials package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Testimonials 2.16.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-widget\n"
|
7 |
+
"POT-Creation-Date: 2013-12-05 03:18:42+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: lib/aihrus/class-aihrus-common.php:50
|
16 |
+
msgid "Plugin \"%1$s\" requires at least PHP %2$s, you're running PHP %4$s. See <a href=\"%3$s\">possible solutions</a>. Once fixed, \"%1$s\" can be activated again.."
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: lib/aihrus/class-aihrus-common.php:160
|
20 |
msgid "<a href=\"%1$s\">update to</a>"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: lib/aihrus/class-aihrus-common.php:165
|
24 |
msgid "<a href=\"%1$s\">install</a>"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: lib/aihrus/class-aihrus-common.php:168
|
28 |
msgid "<a href=\"%1$s\">activate</a>"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: lib/aihrus/class-aihrus-common.php:172
|
32 |
+
msgid "Plugin %3$s has been deactivated. Please %1$s %4$s version %2$s or newer before activating %3$s."
|
|
|
|
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: lib/aihrus/class-aihrus-common.php:184
|
36 |
+
msgid "<a href=\"%1$s\">%2$s > Settings</a>, <em>Premium</em> tab, <em>License Key</em> entry"
|
|
|
|
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: lib/aihrus/class-aihrus-common.php:189
|
40 |
msgid "<a href=\"%s\">Where's my license key?</a>"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: lib/aihrus/class-aihrus-common.php:194
|
44 |
msgid "<a href=\"%1$s\">%2$s</a>"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: lib/aihrus/class-aihrus-common.php:198
|
48 |
+
msgid "Plugin %1$s requires license activation before updating will work. Please activate the license key via %2$s. No license key? See %3$s or purchase %4$s."
|
|
|
|
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: lib/aihrus/class-aihrus-common.php:244
|
52 |
+
msgid "Please donate $5 towards ongoing free support and development of the %1$s plugin. %2$s"
|
|
|
|
|
53 |
msgstr ""
|
54 |
|
55 |
#: lib/aihrus/class-aihrus-settings.php:61
|
65 |
msgstr ""
|
66 |
|
67 |
#: lib/aihrus/class-aihrus-settings.php:82
|
68 |
+
msgid "These are your current settings in a serialized format. Copy the contents to make a backup of your settings."
|
|
|
|
|
69 |
msgstr ""
|
70 |
|
71 |
#: lib/aihrus/class-aihrus-settings.php:90
|
73 |
msgstr ""
|
74 |
|
75 |
#: lib/aihrus/class-aihrus-settings.php:92
|
76 |
+
msgid "Paste new serialized settings here to overwrite your current configuration."
|
|
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: lib/aihrus/class-aihrus-settings.php:96
|
80 |
+
msgid "Delete all %s data and options from database on plugin deletion"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: lib/aihrus/class-aihrus-settings.php:100
|
84 |
+
msgid "Remove Plugin Data on Deletion?"
|
|
|
|
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: lib/aihrus/class-aihrus-settings.php:109
|
88 |
msgid "Reset to Defaults?"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: lib/aihrus/class-aihrus-settings.php:112
|
92 |
msgid "Check this box to reset options to their defaults"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: lib/aihrus/class-aihrus-settings.php:236
|
96 |
+
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>."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: lib/aihrus/class-aihrus-settings.php:278
|
100 |
msgid "Save Changes"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: lib/aihrus/class-aihrus-settings.php:286
|
104 |
+
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>."
|
|
|
|
|
|
|
|
|
|
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: lib/aihrus/class-aihrus-settings.php:297
|
108 |
msgid "Copyright ©%1$s <a href=\"%2$s\">Aihrus</a>."
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: lib/aihrus/class-aihrus-settings.php:598
|
112 |
msgid "Required"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: lib/aihrus/class-aihrus-widget.php:141
|
116 |
msgid "Expand/Collapse All Options"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: lib/aihrus/class-aihrus-widget.php:150
|
120 |
msgid "Expand/Collapse"
|
121 |
msgstr ""
|
122 |
|
124 |
msgid "Testimonials Settings"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: lib/class-testimonials-widget-settings.php:89 testimonials-widget.php:125
|
128 |
msgid "Settings"
|
129 |
msgstr ""
|
130 |
|
157 |
msgid "Widget Title"
|
158 |
msgstr ""
|
159 |
|
|
|
|
|
160 |
#: lib/class-testimonials-widget-settings.php:127
|
161 |
+
#: lib/class-testimonials-widget-widget.php:29 testimonials-widget.php:585
|
162 |
+
#: testimonials-widget.php:630
|
163 |
msgid "Testimonials"
|
164 |
msgstr ""
|
165 |
|
168 |
msgstr ""
|
169 |
|
170 |
#: lib/class-testimonials-widget-settings.php:134
|
171 |
+
msgid "URL, path, or post ID to link widget title to. Ex: http://example.com/stuff, /testimonials, 123 or "
|
|
|
|
|
172 |
msgstr ""
|
173 |
|
174 |
#: lib/class-testimonials-widget-settings.php:140
|
184 |
msgstr ""
|
185 |
|
186 |
#: lib/class-testimonials-widget-settings.php:148
|
187 |
+
msgid "Number of seconds between testimonial rotations or 0 for no rotation at all refresh"
|
|
|
|
|
188 |
msgstr ""
|
189 |
|
190 |
#: lib/class-testimonials-widget-settings.php:160
|
248 |
msgstr ""
|
249 |
|
250 |
#: lib/class-testimonials-widget-settings.php:221
|
251 |
+
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."
|
|
|
|
|
|
|
252 |
msgstr ""
|
253 |
|
254 |
#: lib/class-testimonials-widget-settings.php:224
|
425 |
msgstr ""
|
426 |
|
427 |
#: lib/class-testimonials-widget-settings.php:422
|
428 |
+
msgid "If checked, ignores ORDER BY, ORDER BY meta_key, and ORDER BY Order. Widgets are random by default automatically"
|
|
|
|
|
429 |
msgstr ""
|
430 |
|
431 |
#: lib/class-testimonials-widget-settings.php:429
|
444 |
msgid "Author"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: lib/class-testimonials-widget-settings.php:435 testimonials-widget.php:562
|
448 |
msgid "Date"
|
449 |
msgstr ""
|
450 |
|
452 |
msgid "Menu Order"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: lib/class-testimonials-widget-settings.php:437 testimonials-widget.php:554
|
456 |
msgid "Source"
|
457 |
msgstr ""
|
458 |
|
465 |
msgstr ""
|
466 |
|
467 |
#: lib/class-testimonials-widget-settings.php:447
|
468 |
+
msgid "Used when \"Random Order\" is disabled and sorting by a testimonials meta key is needed. Overrides ORDER BY"
|
|
|
|
|
469 |
msgstr ""
|
470 |
|
471 |
#: lib/class-testimonials-widget-settings.php:450
|
472 |
msgid "None"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: lib/class-testimonials-widget-settings.php:451 testimonials-widget.php:556
|
476 |
+
#: testimonials-widget.php:1621
|
477 |
msgid "Job Title"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: lib/class-testimonials-widget-settings.php:452 testimonials-widget.php:558
|
481 |
+
#: testimonials-widget.php:1633
|
482 |
msgid "Email"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: lib/class-testimonials-widget-settings.php:453 testimonials-widget.php:557
|
486 |
+
#: testimonials-widget.php:1627
|
487 |
msgid "Location"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: lib/class-testimonials-widget-settings.php:454 testimonials-widget.php:559
|
491 |
+
#: testimonials-widget.php:1639
|
492 |
msgid "Company"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: lib/class-testimonials-widget-settings.php:455 testimonials-widget.php:560
|
496 |
+
#: testimonials-widget.php:1645
|
497 |
msgid "URL"
|
498 |
msgstr ""
|
499 |
|
514 |
msgstr ""
|
515 |
|
516 |
#: lib/class-testimonials-widget-settings.php:481
|
517 |
+
msgid "Only affects the Testimonials post edit page. Your theme controls the front-end view."
|
|
|
|
|
518 |
msgstr ""
|
519 |
|
520 |
#: lib/class-testimonials-widget-settings.php:487
|
526 |
msgstr ""
|
527 |
|
528 |
#: lib/class-testimonials-widget-settings.php:500
|
529 |
+
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."
|
|
|
|
|
530 |
msgstr ""
|
531 |
|
532 |
#: lib/class-testimonials-widget-settings.php:504
|
562 |
msgstr ""
|
563 |
|
564 |
#: lib/class-testimonials-widget-settings.php:551
|
565 |
+
msgid "Pre 2.15.0, Disable animation between testimonial transitions. Useful when stacking widgets."
|
|
|
|
|
566 |
msgstr ""
|
567 |
|
568 |
#: lib/class-testimonials-widget-settings.php:559
|
571 |
|
572 |
#: lib/class-testimonials-widget-settings.php:560
|
573 |
#: lib/class-testimonials-widget-settings.php:568
|
574 |
+
msgid "Pre 2.15.0, Transition duration in milliseconds; higher values indicate slower animations, not faster ones."
|
|
|
|
|
575 |
msgstr ""
|
576 |
|
577 |
#: lib/class-testimonials-widget-settings.php:567
|
583 |
msgstr ""
|
584 |
|
585 |
#: lib/class-testimonials-widget-settings.php:576
|
586 |
+
msgid "Pre 2.15.0, Testimonials height, in pixels. Overrides minimum and maximum height"
|
|
|
|
|
587 |
msgstr ""
|
588 |
|
589 |
#: lib/class-testimonials-widget-settings.php:582
|
631 |
msgstr ""
|
632 |
|
633 |
#: lib/class-testimonials-widget-settings.php:634
|
634 |
+
msgid "Pre 2.6.4, some themes use class `.hentry` in a manner that breaks Testimonials' CSS"
|
|
|
|
|
635 |
msgstr ""
|
636 |
|
637 |
#: lib/class-testimonials-widget-settings.php:858
|
638 |
+
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."
|
|
|
|
|
|
|
|
|
|
|
639 |
msgstr ""
|
640 |
|
641 |
#: lib/class-testimonials-widget-settings.php:860
|
686 |
msgid "This widget's unique CSS class for styling"
|
687 |
msgstr ""
|
688 |
|
689 |
+
#: testimonials-widget.php:142 testimonials-widget.php:1973
|
690 |
msgid "Testimonials Shortcode Examples"
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: testimonials-widget.php:142
|
694 |
msgid "E.g. Shortcodes"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: testimonials-widget.php:341
|
698 |
+
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible CSS fixes."
|
|
|
|
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: testimonials-widget.php:552
|
702 |
msgid "ID"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: testimonials-widget.php:553
|
706 |
msgid "Image"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: testimonials-widget.php:555
|
710 |
msgid "Shortcodes"
|
711 |
msgstr ""
|
712 |
|
713 |
+
#: testimonials-widget.php:561
|
714 |
msgid "Published by"
|
715 |
msgstr ""
|
716 |
|
717 |
+
#: testimonials-widget.php:567 testimonials-widget.php:570
|
718 |
msgid "Category"
|
719 |
msgstr ""
|
720 |
|
721 |
+
#: testimonials-widget.php:568 testimonials-widget.php:571
|
722 |
msgid "Tags"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: testimonials-widget.php:582
|
726 |
msgid "Add New"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: testimonials-widget.php:583 testimonials-widget.php:586
|
730 |
msgid "Add New Testimonial"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: testimonials-widget.php:584
|
734 |
msgid "Edit Testimonial"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: testimonials-widget.php:587 testimonials-widget.php:994
|
738 |
msgid "No testimonials found"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: testimonials-widget.php:588
|
742 |
msgid "No testimonials found in Trash"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: testimonials-widget.php:590
|
746 |
msgid "Search Testimonials"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: testimonials-widget.php:591 testimonials-widget.php:1733
|
750 |
msgid "Testimonial"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: testimonials-widget.php:592
|
754 |
msgid "View Testimonial"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: testimonials-widget.php:1143
|
758 |
msgid "…"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: testimonials-widget.php:1352
|
762 |
msgid "«"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: testimonials-widget.php:1361
|
766 |
msgid "»"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: testimonials-widget.php:1657
|
770 |
msgid "Testimonial Data"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: testimonials-widget.php:1682
|
774 |
msgid "Enter title here"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: testimonials-widget.php:1683
|
778 |
msgid "Enter testimonial source here"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: testimonials-widget.php:1708
|
782 |
msgid "Testimonial updated. <a href=\"%s\">View testimonial</a>"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: testimonials-widget.php:1709
|
786 |
msgid "Custom field updated."
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: testimonials-widget.php:1710
|
790 |
msgid "Custom field deleted."
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: testimonials-widget.php:1711
|
794 |
msgid "Testimonial updated."
|
795 |
msgstr ""
|
796 |
|
797 |
#. translators: %s: date and time of the revision
|
798 |
+
|
799 |
+
#: testimonials-widget.php:1713
|
800 |
msgid "Testimonial restored to revision from %s"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: testimonials-widget.php:1714
|
804 |
msgid "Testimonial published. <a href=\"%s\">View testimonial</a>"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: testimonials-widget.php:1715
|
808 |
msgid "Testimonial saved."
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: testimonials-widget.php:1716
|
812 |
+
msgid "Testimonial submitted. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
|
|
|
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: testimonials-widget.php:1717
|
816 |
+
msgid "Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview testimonial</a>"
|
|
|
|
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: testimonials-widget.php:1718
|
820 |
+
msgid "Testimonial draft updated. <a target=\"_blank\" href=\"%s\">Preview testimonial</a>"
|
|
|
|
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: testimonials-widget.php:1964
|
824 |
+
msgid "If your Testimonials display has gone to funky town, please <a href=\"%s\">read the FAQ</a> about possible fixes."
|
825 |
+
msgstr ""
|
826 |
+
#. Plugin Name of the plugin/theme
|
827 |
+
msgid "Testimonials"
|
828 |
msgstr ""
|
829 |
|
830 |
#. Plugin URI of the plugin/theme
|
832 |
msgstr ""
|
833 |
|
834 |
#. Description of the plugin/theme
|
835 |
+
msgid "Testimonials lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site."
|
|
|
|
|
836 |
msgstr ""
|
837 |
|
838 |
#. Author of the plugin/theme
|
lib/aihrus/.travis.yml
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
language:
|
2 |
-
- php
|
3 |
-
|
4 |
-
php:
|
5 |
-
- 5.3
|
6 |
-
- 5.4
|
7 |
-
- 5.5
|
8 |
-
|
9 |
-
env:
|
10 |
-
- WP_VERSION=master WP_MULTISITE=1
|
11 |
-
- WP_VERSION=master WP_MULTISITE=0
|
12 |
-
- WP_VERSION=3.7.1 WP_MULTISITE=1
|
13 |
-
- WP_VERSION=3.7.1 WP_MULTISITE=0
|
14 |
-
|
15 |
-
before_install:
|
16 |
-
- sudo apt-get update
|
17 |
-
- git submodule update --init --recursive
|
18 |
-
|
19 |
-
before_script:
|
20 |
-
- pear config-set auto_discover 1
|
21 |
-
- pear install PHP_CodeSniffer
|
22 |
-
- pear install phpunit/phpcpd
|
23 |
-
- pear channel-discover pear.phpmd.org
|
24 |
-
- pear channel-discover pear.pdepend.org
|
25 |
-
- pear install phpmd/PHP_PMD
|
26 |
-
- phpenv rehash
|
27 |
-
- git clone git://github.com/mrchrisadams/WordPress-Coding-Standards.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/WordPress
|
28 |
-
- export PHPMD_EXCLUDE="Akismet.class.php,class-redrokk-metabox-class.php,video-quick-edit.php,inc.flickr.php,screen-meta-links.php,EDD_License_Handler.php,EDD_SL_Plugin_Updater.php,jquery.cookie.js,jquery.bxslider.js,jquery.easing.1.3.js,jquery.fitvids.js"
|
29 |
-
# - export WP_TESTS_DIR=/tmp/wordpress-tests/
|
30 |
-
# - bash ci/bin/install-wp-tests.sh wordpress_test root '' ${WP_VERSION}
|
31 |
-
|
32 |
-
script:
|
33 |
-
- find . \( -name '*.php' -o -name '*.inc' \) -exec php -lf {} \;
|
34 |
-
- phpcs -s -n --standard=ci/phpcs.travis.ruleset.xml .
|
35 |
-
- phpcpd .
|
36 |
-
- phpmd . --exclude ${PHPMD_EXCLUDE} text ci/phpmd.ruleset.xml
|
37 |
-
# - phpunit
|
38 |
-
|
39 |
-
notifications:
|
40 |
-
email:
|
41 |
-
on_success: change
|
42 |
-
on_failure: change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/CHANGELOG.md
CHANGED
@@ -1,18 +1,25 @@
|
|
1 |
# CHANGELOG Aihrus Framework
|
2 |
|
3 |
## master
|
4 |
-
*
|
5 |
* Add TODO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
* Add abstract class Aihrus_Settings
|
7 |
* Add abstract class Aihrus_Widget
|
8 |
-
* Add is_true, terms, url validate cases
|
9 |
-
* Add method `create_link( $link )`
|
10 |
-
* Add method `create_nonce( $action )`
|
11 |
-
* Add method `verify_nonce( $nonce, $action )`
|
12 |
* Add shortcode id helpers
|
13 |
* Allow reset_defaults in widget
|
|
|
14 |
* Rename no_code to show_code
|
15 |
* Settings link with null post_type
|
|
|
16 |
|
17 |
## 0.0.0
|
18 |
* Initial code release
|
1 |
# CHANGELOG Aihrus Framework
|
2 |
|
3 |
## master
|
4 |
+
* Check for PHP 5.3
|
5 |
* Add TODO
|
6 |
+
* Add `add_media` post attachment helper
|
7 |
+
* Add `clean_string` trim, strip_shortcodes, and strip_tags a string
|
8 |
+
* Add `create_link( $link )`
|
9 |
+
* Add `create_nonce( $action )`
|
10 |
+
* Add `file_get_contents_curl`
|
11 |
+
* Add `get_image_src`
|
12 |
+
* Add `is_true`, terms, url validate cases
|
13 |
+
* Add `truncate`
|
14 |
+
* Add `verify_nonce( $nonce, $action )`
|
15 |
* Add abstract class Aihrus_Settings
|
16 |
* Add abstract class Aihrus_Widget
|
|
|
|
|
|
|
|
|
17 |
* Add shortcode id helpers
|
18 |
* Allow reset_defaults in widget
|
19 |
+
* BUGFIX Method version not static
|
20 |
* Rename no_code to show_code
|
21 |
* Settings link with null post_type
|
22 |
+
* Widget title uses create_link
|
23 |
|
24 |
## 0.0.0
|
25 |
* Initial code release
|
lib/aihrus/README.md
CHANGED
@@ -4,10 +4,14 @@ A helper library for WordPress plugins by Aihrus.
|
|
4 |
|
5 |
## Features
|
6 |
|
|
|
7 |
* Donation links
|
8 |
-
*
|
9 |
* Licensing
|
|
|
|
|
10 |
* Notifications
|
|
|
11 |
|
12 |
## Usage
|
13 |
|
4 |
|
5 |
## Features
|
6 |
|
7 |
+
* Content truncation helper methods
|
8 |
* Donation links
|
9 |
+
* Image source and media attachment helper methods
|
10 |
* Licensing
|
11 |
+
* Link creation helper methods
|
12 |
+
* Nonce helper methods
|
13 |
* Notifications
|
14 |
+
* Validation helper methods
|
15 |
|
16 |
## Usage
|
17 |
|
lib/aihrus/TODO.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
# TODO Aihrus Framework
|
2 |
|
3 |
-
*
|
1 |
# TODO Aihrus Framework
|
2 |
|
3 |
+
* TBD
|
lib/aihrus/ci/bin/install-wp-tests.sh
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
#!/usr/bin/env bash
|
2 |
-
|
3 |
-
if [ $# -lt 3 ]; then
|
4 |
-
echo "usage: ${0} <db-name> <db-user> <db-pass> [wp-version]"
|
5 |
-
exit 1
|
6 |
-
fi
|
7 |
-
|
8 |
-
DB_NAME=${1}
|
9 |
-
DB_USER=${2}
|
10 |
-
DB_PASS=${3}
|
11 |
-
WP_VERSION=${4-master}
|
12 |
-
|
13 |
-
set -ex
|
14 |
-
|
15 |
-
# set up a WP install
|
16 |
-
WP_CORE_DIR=/tmp/wordpress/
|
17 |
-
mkdir -p ${WP_CORE_DIR}
|
18 |
-
wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/${WP_VERSION}
|
19 |
-
tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C ${WP_CORE_DIR}
|
20 |
-
|
21 |
-
# set up testing suite
|
22 |
-
svn co --ignore-externals --quiet http://unit-tests.svn.wordpress.org/trunk/ ${WP_TESTS_DIR}
|
23 |
-
|
24 |
-
cd ${WP_TESTS_DIR}
|
25 |
-
cp wp-tests-config-sample.php wp-tests-config.php
|
26 |
-
sed -i "s:dirname( __FILE__ ) . '/wordpress/':'${WP_CORE_DIR}':" wp-tests-config.php
|
27 |
-
sed -i "s/yourdbnamehere/${DB_NAME}/" wp-tests-config.php
|
28 |
-
sed -i "s/yourusernamehere/${DB_USER}/" wp-tests-config.php
|
29 |
-
sed -i "s/yourpasswordhere/${DB_PASS}/" wp-tests-config.php
|
30 |
-
|
31 |
-
# create database
|
32 |
-
mysqladmin create ${DB_NAME} --user="${DB_USER}" --password="${DB_PASS}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/ci/phpcs.ruleset.xml
DELETED
@@ -1,35 +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/screen-meta-links.php</exclude-pattern>
|
8 |
-
<exclude-pattern>jquery-ui-1.10.3.custom.css</exclude-pattern>
|
9 |
-
<exclude-pattern>jquery-ui-1.10.3.custom.min.css</exclude-pattern>
|
10 |
-
|
11 |
-
<rule ref="Generic">
|
12 |
-
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found" />
|
13 |
-
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
14 |
-
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
15 |
-
<exclude name="Generic.Files.LineLength.MaxExceeded" />
|
16 |
-
<exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
|
17 |
-
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
|
18 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
|
19 |
-
<exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
|
20 |
-
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
|
21 |
-
<exclude name="Generic.PHP.CharacterBeforePHPOpeningTag.Found" />
|
22 |
-
<exclude name="Generic.PHP.UpperCaseConstant.Found" />
|
23 |
-
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
|
24 |
-
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
25 |
-
</rule>
|
26 |
-
|
27 |
-
<rule ref="Squiz.PHP.CommentedOutCode"/>
|
28 |
-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
29 |
-
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
|
30 |
-
</rule>
|
31 |
-
|
32 |
-
<rule ref="WordPress">
|
33 |
-
<exclude name="WordPress.XSS.EscapeOutput" />
|
34 |
-
</rule>
|
35 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/ci/phpcs.travis.ruleset.xml
DELETED
@@ -1,41 +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/screen-meta-links.php</exclude-pattern>
|
8 |
-
<exclude-pattern>jquery-ui-1.10.3.custom.css</exclude-pattern>
|
9 |
-
<exclude-pattern>jquery-ui-1.10.3.custom.min.css</exclude-pattern>
|
10 |
-
|
11 |
-
<rule ref="Generic">
|
12 |
-
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found" />
|
13 |
-
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
14 |
-
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
15 |
-
<exclude name="Generic.Files.LineLength.MaxExceeded" />
|
16 |
-
<exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
|
17 |
-
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound" />
|
18 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
|
19 |
-
<exclude name="Generic.Metrics.CyclomaticComplexity.MaxExceeded" />
|
20 |
-
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
|
21 |
-
<exclude name="Generic.PHP.CharacterBeforePHPOpeningTag.Found" />
|
22 |
-
<exclude name="Generic.PHP.UpperCaseConstant.Found" />
|
23 |
-
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
|
24 |
-
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
25 |
-
</rule>
|
26 |
-
|
27 |
-
<rule ref="Squiz.PHP.CommentedOutCode">
|
28 |
-
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
|
29 |
-
</rule>
|
30 |
-
|
31 |
-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
32 |
-
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" />
|
33 |
-
</rule>
|
34 |
-
|
35 |
-
<rule ref="WordPress">
|
36 |
-
<exclude name="WordPress.XSS.EscapeOutput" />
|
37 |
-
<!-- travis-ci.org is puking on switch/case indentation -->
|
38 |
-
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
|
39 |
-
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
|
40 |
-
</rule>
|
41 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/ci/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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/ci/tests/bootstrap.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php';
|
4 |
-
|
5 |
-
function _manually_load_plugin() {
|
6 |
-
require dirname( __FILE__ ) . '/../../wordpress-starter.php';
|
7 |
-
}
|
8 |
-
|
9 |
-
|
10 |
-
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
11 |
-
|
12 |
-
require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
|
13 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/ci/tests/class.sample-test.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class SampleTest extends WP_UnitTestCase {
|
3 |
-
function test_sample() {
|
4 |
-
// replace this with some actual testing code
|
5 |
-
$this->assertTrue( true );
|
6 |
-
}
|
7 |
-
|
8 |
-
|
9 |
-
/**
|
10 |
-
*
|
11 |
-
*
|
12 |
-
* @SuppressWarnings(PHPMD.Superglobals)
|
13 |
-
*/
|
14 |
-
|
15 |
-
|
16 |
-
function set_post( $key, $value ) {
|
17 |
-
$_POST[$key] = $_REQUEST[$key] = addslashes( $value );
|
18 |
-
}
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
*
|
23 |
-
*
|
24 |
-
* @SuppressWarnings(PHPMD.Superglobals)
|
25 |
-
*/
|
26 |
-
function unset_post( $key ) {
|
27 |
-
unset( $_POST[$key], $_REQUEST[$key] );
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/aihrus/class-aihrus-common.php
CHANGED
@@ -16,6 +16,50 @@
|
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
if ( class_exists( 'Aihrus_Common' ) )
|
20 |
return;
|
21 |
|
@@ -197,7 +241,7 @@ EOD;
|
|
197 |
if ( $disable_donate )
|
198 |
return;
|
199 |
|
200 |
-
$text = sprintf( esc_html__( 'Please donate $5 towards ongoing support and development of the %1$s plugin. %2$s', 'testimonials-widget' ), $item_name, self::$donate_button );
|
201 |
|
202 |
self::notice_updated( $text );
|
203 |
}
|
@@ -271,7 +315,7 @@ EOD;
|
|
271 |
/**
|
272 |
* If incoming link is empty, then get_site_url() is used instead.
|
273 |
*/
|
274 |
-
public static function create_link( $link ) {
|
275 |
if ( empty( $link ) )
|
276 |
$link = get_site_url();
|
277 |
|
@@ -305,6 +349,9 @@ EOD;
|
|
305 |
$tag .= '</a>';
|
306 |
}
|
307 |
|
|
|
|
|
|
|
308 |
return array(
|
309 |
'link' => $permalink,
|
310 |
'tag' => $tag,
|
@@ -312,6 +359,192 @@ EOD;
|
|
312 |
}
|
313 |
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
}
|
316 |
|
317 |
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
*/
|
18 |
|
19 |
+
if ( ! function_exists( 'af_php_version_check' ) ) {
|
20 |
+
function af_php_version_check( $file = __FILE__, $php_min = '5.3.0' ) {
|
21 |
+
$check_okay = version_compare( PHP_VERSION, $php_min, '>' );
|
22 |
+
|
23 |
+
if ( ! $check_okay && __FILE__ != $file ) {
|
24 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
25 |
+
|
26 |
+
deactivate_plugins( $file );
|
27 |
+
|
28 |
+
if ( ! defined( 'AF_PHP_VERSION_FILE' ) )
|
29 |
+
define( 'AF_PHP_VERSION_FILE', $file );
|
30 |
+
|
31 |
+
if ( ! defined( 'AF_PHP_VERSION_MIN' ) )
|
32 |
+
define( 'AF_PHP_VERSION_MIN', $php_min );
|
33 |
+
|
34 |
+
add_action( 'admin_notices', 'af_notice_php_version' );
|
35 |
+
}
|
36 |
+
|
37 |
+
return $check_okay;
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
function af_notice_php_version() {
|
42 |
+
$base = basename( dirname( AF_PHP_VERSION_FILE ) );
|
43 |
+
$base = str_replace( '-', ' ', $base );
|
44 |
+
$base = ucwords( $base );
|
45 |
+
|
46 |
+
$help_url = esc_url( 'https://aihrus.zendesk.com/entries/30678006-Most-Aihrus-Plugins-Require-PHP-5-3-' );
|
47 |
+
|
48 |
+
$php_min = basename( AF_PHP_VERSION_MIN );
|
49 |
+
|
50 |
+
$text = sprintf( __( 'Plugin "%1$s" requires at least PHP %2$s, you\'re running PHP %4$s. See <a href="%3$s">possible solutions</a>. Once fixed, "%1$s" can be activated again..', 'testimonials-widget' ), $base, $php_min, $help_url, PHP_VERSION );
|
51 |
+
|
52 |
+
$content = '<div class="error"><p>';
|
53 |
+
$content .= $text;
|
54 |
+
$content .= '</p></div>';
|
55 |
+
|
56 |
+
echo $content;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( ! af_php_version_check( __FILE__ ) )
|
61 |
+
return;
|
62 |
+
|
63 |
if ( class_exists( 'Aihrus_Common' ) )
|
64 |
return;
|
65 |
|
241 |
if ( $disable_donate )
|
242 |
return;
|
243 |
|
244 |
+
$text = sprintf( esc_html__( 'Please donate $5 towards ongoing free support and development of the %1$s plugin. %2$s', 'testimonials-widget' ), $item_name, self::$donate_button );
|
245 |
|
246 |
self::notice_updated( $text );
|
247 |
}
|
315 |
/**
|
316 |
* If incoming link is empty, then get_site_url() is used instead.
|
317 |
*/
|
318 |
+
public static function create_link( $link, $target = null ) {
|
319 |
if ( empty( $link ) )
|
320 |
$link = get_site_url();
|
321 |
|
349 |
$tag .= '</a>';
|
350 |
}
|
351 |
|
352 |
+
if ( ! empty( $target ) && is_string( $target ) )
|
353 |
+
$tag = links_add_target( $tag, $target );
|
354 |
+
|
355 |
return array(
|
356 |
'link' => $permalink,
|
357 |
'tag' => $tag,
|
359 |
}
|
360 |
|
361 |
|
362 |
+
public static function add_media( $post_id, $media_src, $media_name = null, $featured_image = true ) {
|
363 |
+
require_once ABSPATH . 'wp-admin/includes/image.php';
|
364 |
+
|
365 |
+
if ( empty( $media_name ) )
|
366 |
+
$media_name = basename( $media_src );
|
367 |
+
|
368 |
+
$wp_filetype = wp_check_filetype( $media_name, null );
|
369 |
+
$attachment = array(
|
370 |
+
'post_mime_type' => $wp_filetype['type'],
|
371 |
+
'post_status' => 'inherit',
|
372 |
+
'post_title' => $media_name,
|
373 |
+
);
|
374 |
+
|
375 |
+
$file_move = wp_upload_bits( $media_name, null, self::file_get_contents_curl( $media_src ) );
|
376 |
+
$file_name = $file_move['file'];
|
377 |
+
|
378 |
+
$image_id = wp_insert_attachment( $attachment, $file_name, $post_id );
|
379 |
+
$metadata = wp_generate_attachment_metadata( $image_id, $file_name );
|
380 |
+
wp_update_attachment_metadata( $image_id, $metadata );
|
381 |
+
|
382 |
+
if ( $featured_image )
|
383 |
+
update_post_meta( $post_id, '_thumbnail_id', $image_id );
|
384 |
+
|
385 |
+
return $image_id;
|
386 |
+
}
|
387 |
+
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Thank you Tobylewis
|
391 |
+
*
|
392 |
+
* file_get_contents support on some shared systems is turned off
|
393 |
+
*
|
394 |
+
* @ref http://wordpress.org/support/topic/plugin-flickr-shortcode-importer-file_get_contents-with-url-isp-does-not-support?replies=2#post-2878241
|
395 |
+
*/
|
396 |
+
public static function file_get_contents_curl( $url ) {
|
397 |
+
$ch = curl_init();
|
398 |
+
|
399 |
+
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
|
400 |
+
curl_setopt( $ch, CURLOPT_HEADER, 0 );
|
401 |
+
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
402 |
+
curl_setopt( $ch, CURLOPT_URL, $url );
|
403 |
+
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
404 |
+
|
405 |
+
$data = curl_exec( $ch );
|
406 |
+
curl_close( $ch );
|
407 |
+
|
408 |
+
return $data;
|
409 |
+
}
|
410 |
+
|
411 |
+
|
412 |
+
public static function get_image_src( $image ) {
|
413 |
+
$doc = new DOMDocument();
|
414 |
+
$doc->loadHTML( $image );
|
415 |
+
$xpath = new DOMXPath( $doc );
|
416 |
+
$src = $xpath->evaluate( 'string(//img/@src)' );
|
417 |
+
|
418 |
+
return $src;
|
419 |
+
}
|
420 |
+
|
421 |
+
|
422 |
+
public static function clean_string( $string ) {
|
423 |
+
if ( ! is_string( $string ) )
|
424 |
+
return $string;
|
425 |
+
|
426 |
+
return trim( strip_shortcodes( strip_tags( $string ) ) );
|
427 |
+
}
|
428 |
+
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Truncate HTML, close opened tags. UTF-8 aware, and aware of unpaired tags
|
432 |
+
* (which don't need a matching closing tag)
|
433 |
+
*
|
434 |
+
* @param string $html
|
435 |
+
* @param int $max_length Maximum length of the characters of the string
|
436 |
+
* @param string $indicator Suffix to use if string was truncated.
|
437 |
+
* @param boolean $force_indicator Suffix to use if string was truncated.
|
438 |
+
* @return string
|
439 |
+
*
|
440 |
+
* @ref http://pastie.org/3084080
|
441 |
+
*/
|
442 |
+
public static function truncate( $html, $max_length, $indicator = '…', $force_indicator = false ) {
|
443 |
+
$output_length = 0; // number of counted characters stored so far in $output
|
444 |
+
$position = 0; // character offset within input string after last tag/entity
|
445 |
+
$tag_stack = array(); // stack of tags we've encountered but not closed
|
446 |
+
$output = '';
|
447 |
+
$truncated = false;
|
448 |
+
|
449 |
+
/**
|
450 |
+
* these tags don't have matching closing elements, in HTML (in XHTML they
|
451 |
+
* theoretically need a closing /> )
|
452 |
+
*
|
453 |
+
* @see http://www.netstrider.com/tutorials/HTMLRef/a_d.html
|
454 |
+
* @see http://www.w3schools.com/tags/default.asp
|
455 |
+
* @see http://stackoverflow.com/questions/3741896/what-do-you-call-tags-that-need-no-ending-tag
|
456 |
+
*/
|
457 |
+
$unpaired_tags = array(
|
458 |
+
'doctype',
|
459 |
+
'!doctype',
|
460 |
+
'area',
|
461 |
+
'base',
|
462 |
+
'basefont',
|
463 |
+
'bgsound',
|
464 |
+
'br',
|
465 |
+
'col',
|
466 |
+
'embed',
|
467 |
+
'frame',
|
468 |
+
'hr',
|
469 |
+
'img',
|
470 |
+
'input',
|
471 |
+
'link',
|
472 |
+
'meta',
|
473 |
+
'param',
|
474 |
+
'sound',
|
475 |
+
'spacer',
|
476 |
+
'wbr',
|
477 |
+
);
|
478 |
+
|
479 |
+
$func_strcut = function_exists( 'mb_strcut' ) ? 'mb_strcut' : 'substr';
|
480 |
+
$func_strlen = function_exists( 'mb_strlen' ) ? 'mb_strlen' : 'strlen';
|
481 |
+
|
482 |
+
// loop through, splitting at HTML entities or tags
|
483 |
+
while ( $output_length < $max_length && preg_match( '{</?([a-z]+)[^>]*>|&#?[a-zA-Z0-9]+;}', $html, $match, PREG_OFFSET_CAPTURE, $position ) ) {
|
484 |
+
list( $tag, $tag_position ) = $match[0];
|
485 |
+
|
486 |
+
// get text leading up to the tag, and store it – up to max_length
|
487 |
+
$text = $func_strcut( $html, $position, $tag_position - $position );
|
488 |
+
if ( $output_length + $func_strlen( $text ) > $max_length ) {
|
489 |
+
$output .= $func_strcut( $text, 0, $max_length - $output_length );
|
490 |
+
$truncated = true;
|
491 |
+
$output_length = $max_length;
|
492 |
+
break;
|
493 |
+
}
|
494 |
+
|
495 |
+
// store everything, it wasn't too long
|
496 |
+
$output .= $text;
|
497 |
+
$output_length += $func_strlen( $text );
|
498 |
+
|
499 |
+
if ( $tag[0] == '&' ) {
|
500 |
+
// Handle HTML entity by copying straight through
|
501 |
+
$output .= $tag;
|
502 |
+
$output_length++; // only counted as one character
|
503 |
+
} else {
|
504 |
+
// Handle HTML tag
|
505 |
+
$tag_inner = $match[1][0];
|
506 |
+
if ( $tag[1] == '/' ) {
|
507 |
+
// This is a closing tag.
|
508 |
+
$output .= $tag;
|
509 |
+
// If input tags aren't balanced, we leave the popped tag
|
510 |
+
// on the stack so hopefully we're not introducing more
|
511 |
+
// problems.
|
512 |
+
|
513 |
+
if ( end( $tag_stack ) == $tag_inner )
|
514 |
+
array_pop( $tag_stack );
|
515 |
+
} elseif ( $tag[$func_strlen( $tag ) - 2] == '/' || in_array( strtolower( $tag_inner ), $unpaired_tags ) ) {
|
516 |
+
// Self-closing or unpaired tag
|
517 |
+
$output .= $tag;
|
518 |
+
} else {
|
519 |
+
// Opening tag.
|
520 |
+
$output .= $tag;
|
521 |
+
$tag_stack[] = $tag_inner; // push tag onto the stack
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
// Continue after the tag we just found
|
526 |
+
$position = $tag_position + $func_strlen( $tag );
|
527 |
+
}
|
528 |
+
|
529 |
+
// Print any remaining text after the last tag, if there's room
|
530 |
+
|
531 |
+
if ( $output_length < $max_length && $position < $func_strlen( $html ) )
|
532 |
+
$output .= $func_strcut( $html, $position, $max_length - $output_length );
|
533 |
+
|
534 |
+
$truncated = $func_strlen( $html ) - $position > $max_length - $output_length;
|
535 |
+
|
536 |
+
// add terminator if it was truncated in loop or just above here
|
537 |
+
if ( $truncated || $force_indicator )
|
538 |
+
$output .= $indicator;
|
539 |
+
|
540 |
+
// Close any open tags
|
541 |
+
while ( ! empty( $tag_stack ) )
|
542 |
+
$output .= '</'.array_pop( $tag_stack ).'>';
|
543 |
+
|
544 |
+
return $output;
|
545 |
+
}
|
546 |
+
|
547 |
+
|
548 |
}
|
549 |
|
550 |
|
lib/aihrus/class-aihrus-settings.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
-
*
|
21 |
*
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
@@ -93,12 +93,14 @@ abstract class Aihrus_Settings {
|
|
93 |
'widget' => 0,
|
94 |
);
|
95 |
|
|
|
|
|
96 |
static::$settings['delete_data'] = array(
|
97 |
'section' => 'reset',
|
98 |
'title' => esc_html__( 'Remove Plugin Data on Deletion?', 'testimonials-widget' ),
|
99 |
'type' => 'checkbox',
|
100 |
'class' => 'warning',
|
101 |
-
'desc' =>
|
102 |
'widget' => 0,
|
103 |
);
|
104 |
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
+
* Aihrus Framework settings helper class
|
21 |
*
|
22 |
* Based upon http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
|
23 |
*/
|
93 |
'widget' => 0,
|
94 |
);
|
95 |
|
96 |
+
$desc = esc_html__( 'Delete all %s data and options from database on plugin deletion', 'testimonials-widget' );
|
97 |
+
|
98 |
static::$settings['delete_data'] = array(
|
99 |
'section' => 'reset',
|
100 |
'title' => esc_html__( 'Remove Plugin Data on Deletion?', 'testimonials-widget' ),
|
101 |
'type' => 'checkbox',
|
102 |
'class' => 'warning',
|
103 |
+
'desc' => sprintf( $desc, static::ITEM_NAME ),
|
104 |
'widget' => 0,
|
105 |
);
|
106 |
|
lib/aihrus/class-aihrus-widget.php
CHANGED
@@ -64,44 +64,8 @@ abstract class Aihrus_Widget extends WP_Widget implements Aihrus_Widget_Interfac
|
|
64 |
// Display the widget title if one was input (before and after defined by themes)
|
65 |
if ( ! empty( $title ) ) {
|
66 |
if ( ! empty( $instance['title_link'] ) ) {
|
67 |
-
|
68 |
-
$
|
69 |
-
|
70 |
-
if ( preg_match( '#^\d+$#', $title_link ) ) {
|
71 |
-
$new_title = '<a href="';
|
72 |
-
$new_title .= get_permalink( $title_link );
|
73 |
-
$new_title .= '" title="';
|
74 |
-
$new_title .= get_the_title( $title_link );
|
75 |
-
$new_title .= '">';
|
76 |
-
$new_title .= $title;
|
77 |
-
$new_title .= '</a>';
|
78 |
-
|
79 |
-
$title = $new_title;
|
80 |
-
} else {
|
81 |
-
$do_http = true;
|
82 |
-
|
83 |
-
if ( 0 === strpos( $title_link, '/' ) )
|
84 |
-
$do_http = false;
|
85 |
-
|
86 |
-
if ( $do_http && 0 === preg_match( '#https?://#', $title_link ) ) {
|
87 |
-
$title_link = 'http://' . $title_link;
|
88 |
-
}
|
89 |
-
|
90 |
-
$new_title = '<a href="';
|
91 |
-
$new_title .= $title_link;
|
92 |
-
$new_title .= '" title="';
|
93 |
-
$new_title .= $title;
|
94 |
-
$new_title .= '"';
|
95 |
-
|
96 |
-
$new_title .= '>';
|
97 |
-
$new_title .= $title;
|
98 |
-
$new_title .= '</a>';
|
99 |
-
|
100 |
-
$title = $new_title;
|
101 |
-
|
102 |
-
if ( ! empty( $instance['target'] ) )
|
103 |
-
$title = links_add_target( $title, $instance['target'] );
|
104 |
-
}
|
105 |
}
|
106 |
|
107 |
echo $before_title . $title . $after_title;
|
64 |
// Display the widget title if one was input (before and after defined by themes)
|
65 |
if ( ! empty( $title ) ) {
|
66 |
if ( ! empty( $instance['title_link'] ) ) {
|
67 |
+
$target = ! empty( $instance['target'] ) ? $instance['target'] : null;
|
68 |
+
$title = Aihrus_Common::create_link( $instance['title_link'], $target );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
echo $before_title . $title . $after_title;
|
lib/class-testimonials-widget-settings.php
CHANGED
@@ -674,42 +674,42 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
674 |
public static function display_setting( $args = array(), $do_echo = true, $input = null ) {
|
675 |
$content = '';
|
676 |
switch ( $args['type'] ) {
|
677 |
-
|
678 |
-
|
679 |
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
|
687 |
-
|
688 |
-
|
689 |
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
|
694 |
-
|
695 |
|
696 |
-
|
697 |
|
698 |
-
|
699 |
|
700 |
-
|
701 |
-
|
702 |
|
703 |
-
|
704 |
-
|
705 |
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
}
|
714 |
|
715 |
if ( empty( $content ) )
|
@@ -924,21 +924,21 @@ class Testimonials_Widget_Settings extends Aihrus_Settings {
|
|
924 |
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
925 |
|
926 |
switch ( $id ) {
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
|
933 |
-
|
934 |
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
|
941 |
-
|
942 |
}
|
943 |
|
944 |
$ajax_url = site_url() . '/wp-admin/admin-ajax.php';
|
674 |
public static function display_setting( $args = array(), $do_echo = true, $input = null ) {
|
675 |
$content = '';
|
676 |
switch ( $args['type'] ) {
|
677 |
+
case 'text':
|
678 |
+
extract( $args );
|
679 |
|
680 |
+
if ( is_null( $input ) )
|
681 |
+
$options = get_option( self::ID );
|
682 |
+
else {
|
683 |
+
$options = array();
|
684 |
+
$options[$id] = $input;
|
685 |
+
}
|
686 |
|
687 |
+
if ( ! isset( $options[$id] ) )
|
688 |
+
$options[$id] = $std;
|
689 |
|
690 |
+
$field_class = '';
|
691 |
+
if ( ! empty( $class ) )
|
692 |
+
$field_class = ' ' . $class;
|
693 |
|
694 |
+
$field_class = esc_attr( $field_class );
|
695 |
|
696 |
+
$suggest_id = 'suggest_' . self::$suggest_id++;
|
697 |
|
698 |
+
$content .= '<input class="regular-text' . $field_class . ' ' . $suggest_id . '" type="text" id="' . $id . '" name="' . self::ID . '[' . $id . ']" placeholder="' . $std . '" value="' . $options[$id] . '" />';
|
699 |
|
700 |
+
if ( ! empty( $suggest ) )
|
701 |
+
$content .= self::get_suggest( $id, $suggest_id );
|
702 |
|
703 |
+
if ( ! empty( $desc ) )
|
704 |
+
$content .= '<br /><span class="description">' . $desc . '</span>';
|
705 |
|
706 |
+
if ( $show_code )
|
707 |
+
$content .= '<br /><code>' . $id . '</code>';
|
708 |
+
break;
|
709 |
|
710 |
+
default:
|
711 |
+
$content = apply_filters( 'testimonials_widget_display_setting', $content, $args, $input );
|
712 |
+
break;
|
713 |
}
|
714 |
|
715 |
if ( empty( $content ) )
|
924 |
$use_cpt_taxonomy = tw_get_option( 'use_cpt_taxonomy', false );
|
925 |
|
926 |
switch ( $id ) {
|
927 |
+
case 'category':
|
928 |
+
if ( ! $use_cpt_taxonomy )
|
929 |
+
$taxonomy = 'category';
|
930 |
+
else
|
931 |
+
$taxonomy = Testimonials_Widget::$cpt_category;
|
932 |
|
933 |
+
break;
|
934 |
|
935 |
+
case 'tags':
|
936 |
+
if ( ! $use_cpt_taxonomy )
|
937 |
+
$taxonomy = 'post_tag';
|
938 |
+
else
|
939 |
+
$taxonomy = Testimonials_Widget::$cpt_tags;
|
940 |
|
941 |
+
break;
|
942 |
}
|
943 |
|
944 |
$ajax_url = site_url() . '/wp-admin/admin-ajax.php';
|
phpunit.xml
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<phpunit
|
2 |
-
bootstrap="ci/tests/bootstrap.php"
|
3 |
-
backupGlobals="false"
|
4 |
-
colors="true"
|
5 |
-
convertErrorsToExceptions="true"
|
6 |
-
convertNoticesToExceptions="true"
|
7 |
-
convertWarningsToExceptions="true"
|
8 |
-
>
|
9 |
-
<testsuites>
|
10 |
-
<testsuite name="tests">
|
11 |
-
<directory prefix="test-" suffix=".php">./ci/tests/</directory>
|
12 |
-
</testsuite>
|
13 |
-
</testsuites>
|
14 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.8.0
|
8 |
-
Stable tag: 2.16.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -87,6 +87,10 @@ Testimonials Premium adds onto the best WordPress testimonials plugin there is,
|
|
87 |
|
88 |
[Buy Testimonials Premium](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/) plugin for WordPress.
|
89 |
|
|
|
|
|
|
|
|
|
90 |
= Additional Features =
|
91 |
|
92 |
* Adjustable animation speed
|
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.8.0
|
8 |
+
Stable tag: 2.16.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
87 |
|
88 |
[Buy Testimonials Premium](http://aihr.us/downloads/testimonials-widget-premium-wordpress-plugin/) plugin for WordPress.
|
89 |
|
90 |
+
= Migration Helpers =
|
91 |
+
* Testimonials Widget pre 2.0.0 - Upgrading is automatic
|
92 |
+
* [GC Testimonials](http://wordpress.org/plugins/gc-testimonials-to-testimonials/)
|
93 |
+
|
94 |
= Additional Features =
|
95 |
|
96 |
* Adjustable animation speed
|
testimonials-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Testimonials
|
4 |
* Plugin URI: http://wordpress.org/plugins/testimonials-widget/
|
5 |
* Description: Testimonials lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site.
|
6 |
-
* Version: 2.16.
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/resume/
|
9 |
* License: GPLv2 or later
|
@@ -23,6 +23,7 @@
|
|
23 |
* along with this program; if not, write to the Free Software
|
24 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
|
|
26 |
if ( ! defined( 'TW_PLUGIN_DIR' ) )
|
27 |
define( 'TW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
28 |
|
@@ -31,14 +32,20 @@ if ( ! defined( 'TW_PLUGIN_DIR_LIB' ) )
|
|
31 |
|
32 |
require_once TW_PLUGIN_DIR_LIB . '/aihrus/class-aihrus-common.php';
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
class Testimonials_Widget extends Aihrus_Common {
|
36 |
const ID = 'testimonials-widget-testimonials';
|
37 |
const ITEM_NAME = 'Testimonials';
|
|
|
38 |
const PLUGIN_BASE = 'testimonials-widget/testimonials-widget.php';
|
39 |
const PT = 'testimonials-widget';
|
40 |
const SLUG = 'tw_';
|
41 |
-
const VERSION = '2.16.
|
42 |
|
43 |
private static $found_posts = 0;
|
44 |
private static $max_num_pages = 0;
|
@@ -268,6 +275,7 @@ class Testimonials_Widget extends Aihrus_Common {
|
|
268 |
require_once TW_PLUGIN_DIR_LIB . '/class-testimonials-widget-settings.php';
|
269 |
$delete_data = tw_get_option( 'delete_data', false );
|
270 |
if ( $delete_data ) {
|
|
|
271 |
delete_option( Testimonials_Widget_Settings::ID );
|
272 |
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->options . '`' );
|
273 |
|
@@ -364,6 +372,100 @@ class Testimonials_Widget extends Aihrus_Common {
|
|
364 |
self::set_notice( 'notice_donate' );
|
365 |
tw_set_option( 'donate_version', self::VERSION );
|
366 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
}
|
368 |
|
369 |
|
@@ -382,59 +484,58 @@ class Testimonials_Widget extends Aihrus_Common {
|
|
382 |
$result = false;
|
383 |
|
384 |
switch ( $column ) {
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
case 'shortcode':
|
390 |
-
$result = '[testimonialswidget_list ids="';
|
391 |
-
$result .= $post_id;
|
392 |
-
$result .= '"]';
|
393 |
-
$result .= '<br />';
|
394 |
-
$result .= '[testimonialswidget_widget ids="';
|
395 |
-
$result .= $post_id;
|
396 |
-
$result .= '"]';
|
397 |
-
break;
|
398 |
-
|
399 |
-
case 'testimonials-widget-company':
|
400 |
-
case 'testimonials-widget-location':
|
401 |
-
case 'testimonials-widget-title':
|
402 |
-
$result = get_post_meta( $post_id, $column, true );
|
403 |
-
break;
|
404 |
-
|
405 |
-
case 'testimonials-widget-email':
|
406 |
-
case 'testimonials-widget-url':
|
407 |
-
$url = get_post_meta( $post_id, $column, true );
|
408 |
-
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
409 |
-
$url = 'http://' . $url;
|
410 |
|
411 |
-
|
412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
|
414 |
-
|
415 |
-
|
|
|
|
|
|
|
416 |
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
$
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
}
|
439 |
|
440 |
$result = apply_filters( 'testimonials_widget_posts_custom_column', $result, $column, $post_id );
|
@@ -694,39 +795,39 @@ class Testimonials_Widget extends Aihrus_Common {
|
|
694 |
$id_base = self::ID . $widget_number;
|
695 |
|
696 |
switch ( $atts['type'] ) {
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
|
709 |
-
|
710 |
-
|
711 |
<style>
|
712 |
.$id_base {
|
713 |
min-height: {$min_height}px;
|
714 |
}
|
715 |
</style>
|
716 |
EOF;
|
717 |
-
|
718 |
|
719 |
-
|
720 |
-
|
721 |
<style>
|
722 |
.$id_base {
|
723 |
max-height: {$max_height}px;
|
724 |
}
|
725 |
</style>
|
726 |
EOF;
|
|
|
727 |
}
|
728 |
-
|
729 |
-
break;
|
730 |
}
|
731 |
|
732 |
$css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
|
@@ -747,28 +848,28 @@ EOF;
|
|
747 |
$id_base = $id . $widget_number;
|
748 |
|
749 |
switch ( $atts['type'] ) {
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
|
755 |
-
|
756 |
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
|
768 |
-
|
769 |
|
770 |
-
|
771 |
-
|
772 |
var {$slider_var} = null;
|
773 |
|
774 |
jQuery(document).ready(function() {
|
@@ -786,23 +887,23 @@ jQuery(document).ready(function() {
|
|
786 |
});
|
787 |
|
788 |
EOF;
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
function nextTestimonial{$widget_number}() {
|
807 |
if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
|
808 |
var active = jQuery('.{$id_base} .active');
|
@@ -834,9 +935,9 @@ jQuery(document).ready(function() {
|
|
834 |
});
|
835 |
|
836 |
EOF;
|
837 |
-
|
838 |
|
839 |
-
|
840 |
if ( {$enable_animation} ) {
|
841 |
var {$tw_wrapper} = jQuery('.{$id_base}');
|
842 |
var {$tw_padding} = 0;
|
@@ -850,12 +951,12 @@ if ( {$enable_animation} ) {
|
|
850 |
});
|
851 |
}
|
852 |
EOF;
|
853 |
-
|
854 |
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
}
|
860 |
|
861 |
$scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
|
@@ -1187,124 +1288,6 @@ EOF;
|
|
1187 |
}
|
1188 |
|
1189 |
|
1190 |
-
/**
|
1191 |
-
* Truncate HTML, close opened tags. UTF-8 aware, and aware of unpaired tags
|
1192 |
-
* (which don't need a matching closing tag)
|
1193 |
-
*
|
1194 |
-
* @param string $html
|
1195 |
-
* @param int $max_length Maximum length of the characters of the string
|
1196 |
-
* @param string $indicator Suffix to use if string was truncated.
|
1197 |
-
* @param boolean $force_indicator Suffix to use if string was truncated.
|
1198 |
-
* @return string
|
1199 |
-
*
|
1200 |
-
* @ref http://pastie.org/3084080
|
1201 |
-
*/
|
1202 |
-
public static function truncate( $html, $max_length, $indicator = '…', $force_indicator = false ) {
|
1203 |
-
$output_length = 0; // number of counted characters stored so far in $output
|
1204 |
-
$position = 0; // character offset within input string after last tag/entity
|
1205 |
-
$tag_stack = array(); // stack of tags we've encountered but not closed
|
1206 |
-
$output = '';
|
1207 |
-
$truncated = false;
|
1208 |
-
|
1209 |
-
/**
|
1210 |
-
* these tags don't have matching closing elements, in HTML (in XHTML they
|
1211 |
-
* theoretically need a closing /> )
|
1212 |
-
*
|
1213 |
-
* @see http://www.netstrider.com/tutorials/HTMLRef/a_d.html
|
1214 |
-
* @see http://www.w3schools.com/tags/default.asp
|
1215 |
-
* @see http://stackoverflow.com/questions/3741896/what-do-you-call-tags-that-need-no-ending-tag
|
1216 |
-
*/
|
1217 |
-
$unpaired_tags = array(
|
1218 |
-
'doctype',
|
1219 |
-
'!doctype',
|
1220 |
-
'area',
|
1221 |
-
'base',
|
1222 |
-
'basefont',
|
1223 |
-
'bgsound',
|
1224 |
-
'br',
|
1225 |
-
'col',
|
1226 |
-
'embed',
|
1227 |
-
'frame',
|
1228 |
-
'hr',
|
1229 |
-
'img',
|
1230 |
-
'input',
|
1231 |
-
'link',
|
1232 |
-
'meta',
|
1233 |
-
'param',
|
1234 |
-
'sound',
|
1235 |
-
'spacer',
|
1236 |
-
'wbr',
|
1237 |
-
);
|
1238 |
-
|
1239 |
-
$func_strcut = function_exists( 'mb_strcut' ) ? 'mb_strcut' : 'substr';
|
1240 |
-
$func_strlen = function_exists( 'mb_strlen' ) ? 'mb_strlen' : 'strlen';
|
1241 |
-
|
1242 |
-
// loop through, splitting at HTML entities or tags
|
1243 |
-
while ( $output_length < $max_length && preg_match( '{</?([a-z]+)[^>]*>|&#?[a-zA-Z0-9]+;}', $html, $match, PREG_OFFSET_CAPTURE, $position ) ) {
|
1244 |
-
list( $tag, $tag_position ) = $match[0];
|
1245 |
-
|
1246 |
-
// get text leading up to the tag, and store it – up to max_length
|
1247 |
-
$text = $func_strcut( $html, $position, $tag_position - $position );
|
1248 |
-
if ( $output_length + $func_strlen( $text ) > $max_length ) {
|
1249 |
-
$output .= $func_strcut( $text, 0, $max_length - $output_length );
|
1250 |
-
$truncated = true;
|
1251 |
-
$output_length = $max_length;
|
1252 |
-
break;
|
1253 |
-
}
|
1254 |
-
|
1255 |
-
// store everything, it wasn't too long
|
1256 |
-
$output .= $text;
|
1257 |
-
$output_length += $func_strlen( $text );
|
1258 |
-
|
1259 |
-
if ( $tag[0] == '&' ) {
|
1260 |
-
// Handle HTML entity by copying straight through
|
1261 |
-
$output .= $tag;
|
1262 |
-
$output_length++; // only counted as one character
|
1263 |
-
} else {
|
1264 |
-
// Handle HTML tag
|
1265 |
-
$tag_inner = $match[1][0];
|
1266 |
-
if ( $tag[1] == '/' ) {
|
1267 |
-
// This is a closing tag.
|
1268 |
-
$output .= $tag;
|
1269 |
-
// If input tags aren't balanced, we leave the popped tag
|
1270 |
-
// on the stack so hopefully we're not introducing more
|
1271 |
-
// problems.
|
1272 |
-
|
1273 |
-
if ( end( $tag_stack ) == $tag_inner )
|
1274 |
-
array_pop( $tag_stack );
|
1275 |
-
} elseif ( $tag[$func_strlen( $tag ) - 2] == '/' || in_array( strtolower( $tag_inner ), $unpaired_tags ) ) {
|
1276 |
-
// Self-closing or unpaired tag
|
1277 |
-
$output .= $tag;
|
1278 |
-
} else {
|
1279 |
-
// Opening tag.
|
1280 |
-
$output .= $tag;
|
1281 |
-
$tag_stack[] = $tag_inner; // push tag onto the stack
|
1282 |
-
}
|
1283 |
-
}
|
1284 |
-
|
1285 |
-
// Continue after the tag we just found
|
1286 |
-
$position = $tag_position + $func_strlen( $tag );
|
1287 |
-
}
|
1288 |
-
|
1289 |
-
// Print any remaining text after the last tag, if there's room
|
1290 |
-
|
1291 |
-
if ( $output_length < $max_length && $position < $func_strlen( $html ) )
|
1292 |
-
$output .= $func_strcut( $html, $position, $max_length - $output_length );
|
1293 |
-
|
1294 |
-
$truncated = $func_strlen( $html ) - $position > $max_length - $output_length;
|
1295 |
-
|
1296 |
-
// add terminator if it was truncated in loop or just above here
|
1297 |
-
if ( $truncated || $force_indicator )
|
1298 |
-
$output .= $indicator;
|
1299 |
-
|
1300 |
-
// Close any open tags
|
1301 |
-
while ( ! empty( $tag_stack ) )
|
1302 |
-
$output .= '</'.array_pop( $tag_stack ).'>';
|
1303 |
-
|
1304 |
-
return $output;
|
1305 |
-
}
|
1306 |
-
|
1307 |
-
|
1308 |
public static function format_content( $content, $widget_number, $atts ) {
|
1309 |
if ( empty ( $content ) )
|
1310 |
return $content;
|
@@ -1696,9 +1679,9 @@ EOF;
|
|
1696 |
|
1697 |
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1698 |
switch ( $translation ) {
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
}
|
1703 |
}
|
1704 |
|
@@ -1761,14 +1744,6 @@ EOF;
|
|
1761 |
}
|
1762 |
|
1763 |
|
1764 |
-
public static function clean_string( $string ) {
|
1765 |
-
if ( ! is_string( $string ) )
|
1766 |
-
return $string;
|
1767 |
-
|
1768 |
-
return trim( strip_shortcodes( strip_tags( $string ) ) );
|
1769 |
-
}
|
1770 |
-
|
1771 |
-
|
1772 |
/**
|
1773 |
*
|
1774 |
*
|
@@ -1981,56 +1956,7 @@ EOF;
|
|
1981 |
$src = self::get_image_src( $image );
|
1982 |
$file = sanitize_title( $email ) . '.jpeg';
|
1983 |
|
1984 |
-
|
1985 |
-
$filename = $file_move['file'];
|
1986 |
-
|
1987 |
-
$wp_filetype = wp_check_filetype( $file, null );
|
1988 |
-
$attachment = array(
|
1989 |
-
'post_mime_type' => $wp_filetype['type'],
|
1990 |
-
'post_status' => 'inherit',
|
1991 |
-
'post_title' => $file,
|
1992 |
-
);
|
1993 |
-
|
1994 |
-
require_once ABSPATH . 'wp-admin/includes/image.php';
|
1995 |
-
|
1996 |
-
$image_id = wp_insert_attachment( $attachment, $filename, $post_id );
|
1997 |
-
$metadata = wp_generate_attachment_metadata( $image_id, $filename );
|
1998 |
-
|
1999 |
-
wp_update_attachment_metadata( $image_id, $metadata );
|
2000 |
-
update_post_meta( $post_id, '_thumbnail_id', $image_id );
|
2001 |
-
}
|
2002 |
-
|
2003 |
-
|
2004 |
-
public static function get_image_src( $image ) {
|
2005 |
-
$doc = new DOMDocument();
|
2006 |
-
$doc->loadHTML( $image );
|
2007 |
-
$xpath = new DOMXPath( $doc );
|
2008 |
-
$src = $xpath->evaluate( 'string(//img/@src)' );
|
2009 |
-
|
2010 |
-
return $src;
|
2011 |
-
}
|
2012 |
-
|
2013 |
-
|
2014 |
-
/**
|
2015 |
-
* Thank you Tobylewis
|
2016 |
-
*
|
2017 |
-
* file_get_contents support on some shared systems is turned off
|
2018 |
-
*
|
2019 |
-
* @ref http://wordpress.org/support/topic/plugin-flickr-shortcode-importer-file_get_contents-with-url-isp-does-not-support?replies=2#post-2878241
|
2020 |
-
*/
|
2021 |
-
public static function file_get_contents_curl( $url ) {
|
2022 |
-
$ch = curl_init();
|
2023 |
-
|
2024 |
-
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
|
2025 |
-
curl_setopt( $ch, CURLOPT_HEADER, 0 );
|
2026 |
-
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
2027 |
-
curl_setopt( $ch, CURLOPT_URL, $url );
|
2028 |
-
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
2029 |
-
|
2030 |
-
$data = curl_exec( $ch );
|
2031 |
-
curl_close( $ch );
|
2032 |
-
|
2033 |
-
return $data;
|
2034 |
}
|
2035 |
|
2036 |
|
@@ -2123,9 +2049,6 @@ EOD;
|
|
2123 |
}
|
2124 |
|
2125 |
|
2126 |
-
add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
2127 |
-
|
2128 |
-
|
2129 |
/**
|
2130 |
*
|
2131 |
*
|
3 |
* Plugin Name: Testimonials
|
4 |
* Plugin URI: http://wordpress.org/plugins/testimonials-widget/
|
5 |
* Description: Testimonials lets you randomly slide or list selected portfolios, quotes, reviews, or text with images or videos on your WordPress site.
|
6 |
+
* Version: 2.16.3
|
7 |
* Author: Michael Cannon
|
8 |
* Author URI: http://aihr.us/resume/
|
9 |
* License: GPLv2 or later
|
23 |
* along with this program; if not, write to the Free Software
|
24 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
+
|
27 |
if ( ! defined( 'TW_PLUGIN_DIR' ) )
|
28 |
define( 'TW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
29 |
|
32 |
|
33 |
require_once TW_PLUGIN_DIR_LIB . '/aihrus/class-aihrus-common.php';
|
34 |
|
35 |
+
if ( af_php_version_check( __FILE__ ) )
|
36 |
+
add_action( 'plugins_loaded', 'testimonialswidget_init', 99 );
|
37 |
+
else
|
38 |
+
return;
|
39 |
+
|
40 |
|
41 |
class Testimonials_Widget extends Aihrus_Common {
|
42 |
const ID = 'testimonials-widget-testimonials';
|
43 |
const ITEM_NAME = 'Testimonials';
|
44 |
+
const OLD_NAME = 'testimonialswidget';
|
45 |
const PLUGIN_BASE = 'testimonials-widget/testimonials-widget.php';
|
46 |
const PT = 'testimonials-widget';
|
47 |
const SLUG = 'tw_';
|
48 |
+
const VERSION = '2.16.3';
|
49 |
|
50 |
private static $found_posts = 0;
|
51 |
private static $max_num_pages = 0;
|
275 |
require_once TW_PLUGIN_DIR_LIB . '/class-testimonials-widget-settings.php';
|
276 |
$delete_data = tw_get_option( 'delete_data', false );
|
277 |
if ( $delete_data ) {
|
278 |
+
delete_option( self::OLD_NAME );
|
279 |
delete_option( Testimonials_Widget_Settings::ID );
|
280 |
$wpdb->query( 'OPTIMIZE TABLE `' . $wpdb->options . '`' );
|
281 |
|
372 |
self::set_notice( 'notice_donate' );
|
373 |
tw_set_option( 'donate_version', self::VERSION );
|
374 |
}
|
375 |
+
|
376 |
+
$options = get_option( self::OLD_NAME );
|
377 |
+
if ( true !== $options['migrated'] )
|
378 |
+
self::migrate();
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
public static function migrate() {
|
383 |
+
global $wpdb;
|
384 |
+
|
385 |
+
$table_name = $wpdb->prefix . self::OLD_NAME;
|
386 |
+
$meta_key = '_' . self::PT . ':testimonial_id';
|
387 |
+
$has_table_query = "SELECT table_name FROM information_schema.tables WHERE table_schema='{$wpdb->dbname}' AND table_name='{$table_name}'";
|
388 |
+
$has_table_result = $wpdb->get_col( $has_table_query );
|
389 |
+
|
390 |
+
if ( ! empty( $has_table_result ) ) {
|
391 |
+
// check that db table exists and has entries
|
392 |
+
$query = 'SELECT `testimonial_id`, `testimonial`, `author`, `source`, `tags`, `public`, `time_added`, `time_updated` FROM `' . $table_name . '`';
|
393 |
+
|
394 |
+
// ignore already imported
|
395 |
+
$done_import_query = 'SELECT meta_value FROM ' . $wpdb->postmeta . ' WHERE meta_key = "' . $meta_key . '"';
|
396 |
+
$done_import = $wpdb->get_col( $done_import_query );
|
397 |
+
|
398 |
+
if ( ! empty( $done_import ) ) {
|
399 |
+
$done_import = array_unique( $done_import );
|
400 |
+
$query .= ' WHERE testimonial_id NOT IN ( ' . implode( ',', $done_import ) . ' )';
|
401 |
+
}
|
402 |
+
|
403 |
+
$results = $wpdb->get_results( $query );
|
404 |
+
if ( ! empty( $results ) ) {
|
405 |
+
foreach ( $results as $result ) {
|
406 |
+
// author can contain title and company details
|
407 |
+
$author = $result->author;
|
408 |
+
$company = false;
|
409 |
+
|
410 |
+
// ex: First Last of Company!
|
411 |
+
$author = str_replace( ' of ', ', ', $author );
|
412 |
+
// now ex: First Last, Company!
|
413 |
+
|
414 |
+
// ex: First Last, Company
|
415 |
+
// ex: First Last, Web Development Manager, Topcon Positioning Systems, Inc.
|
416 |
+
// ex: First Last, Owner, Company, LLC
|
417 |
+
$author = str_replace( ' of ', ', ', $author );
|
418 |
+
$temp_comma = '^^^';
|
419 |
+
$author = str_replace( ', LLC', $temp_comma . ' LLC', $author );
|
420 |
+
|
421 |
+
// now ex: First Last, Owner, Company^^^ LLC
|
422 |
+
$author = str_replace( ', Inc', $temp_comma . ' Inc', $author );
|
423 |
+
|
424 |
+
// ex: First Last, Web Development Manager, Company^^^ Inc.
|
425 |
+
// it's possible to have "Michael Cannon, Senior Developer" and "Senior Developer" become the company. Okay for now
|
426 |
+
$author = explode( ', ', $author );
|
427 |
+
|
428 |
+
if ( 1 < count( $author ) ) {
|
429 |
+
$company = array_pop( $author );
|
430 |
+
$company = str_replace( $temp_comma, ',', $company );
|
431 |
+
}
|
432 |
+
|
433 |
+
$author = implode( ', ', $author );
|
434 |
+
$author = str_replace( $temp_comma, ',', $author );
|
435 |
+
|
436 |
+
$post_data = array(
|
437 |
+
'post_type' => self::PT,
|
438 |
+
'post_status' => ( 'yes' == $result->public ) ? 'publish' : 'private',
|
439 |
+
'post_date' => $result->time_added,
|
440 |
+
'post_modified' => $result->time_updated,
|
441 |
+
'post_title' => $author,
|
442 |
+
'post_content' => $result->testimonial,
|
443 |
+
'tags_input' => $result->tags,
|
444 |
+
);
|
445 |
+
|
446 |
+
$post_id = wp_insert_post( $post_data, true );
|
447 |
+
|
448 |
+
// track/link testimonial import to new post
|
449 |
+
add_post_meta( $post_id, $meta_key, $result->testimonial_id );
|
450 |
+
|
451 |
+
if ( ! empty( $company ) )
|
452 |
+
add_post_meta( $post_id, 'testimonials-widget-company', $company );
|
453 |
+
|
454 |
+
$source = $result->source;
|
455 |
+
if ( ! empty( $source ) ) {
|
456 |
+
if ( is_email( $source ) ) {
|
457 |
+
add_post_meta( $post_id, 'testimonials-widget-email', $source );
|
458 |
+
} else {
|
459 |
+
add_post_meta( $post_id, 'testimonials-widget-url', $source );
|
460 |
+
}
|
461 |
+
}
|
462 |
+
}
|
463 |
+
}
|
464 |
+
}
|
465 |
+
|
466 |
+
$options['migrated'] = true;
|
467 |
+
delete_option( self::OLD_NAME );
|
468 |
+
add_option( self::OLD_NAME, $options, '', 'no' );
|
469 |
}
|
470 |
|
471 |
|
484 |
$result = false;
|
485 |
|
486 |
switch ( $column ) {
|
487 |
+
case 'id':
|
488 |
+
$result = $post_id;
|
489 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
|
491 |
+
case 'shortcode':
|
492 |
+
$result = '[testimonialswidget_list ids="';
|
493 |
+
$result .= $post_id;
|
494 |
+
$result .= '"]';
|
495 |
+
$result .= '<br />';
|
496 |
+
$result .= '[testimonialswidget_widget ids="';
|
497 |
+
$result .= $post_id;
|
498 |
+
$result .= '"]';
|
499 |
+
break;
|
500 |
|
501 |
+
case 'testimonials-widget-company':
|
502 |
+
case 'testimonials-widget-location':
|
503 |
+
case 'testimonials-widget-title':
|
504 |
+
$result = get_post_meta( $post_id, $column, true );
|
505 |
+
break;
|
506 |
|
507 |
+
case 'testimonials-widget-email':
|
508 |
+
case 'testimonials-widget-url':
|
509 |
+
$url = get_post_meta( $post_id, $column, true );
|
510 |
+
if ( ! empty( $url ) && ! is_email( $url ) && 0 === preg_match( '#https?://#', $url ) )
|
511 |
+
$url = 'http://' . $url;
|
512 |
+
|
513 |
+
$result = make_clickable( $url );
|
514 |
+
break;
|
515 |
+
|
516 |
+
case 'thumbnail':
|
517 |
+
$email = get_post_meta( $post_id, 'testimonials-widget-email', true );
|
518 |
+
|
519 |
+
if ( has_post_thumbnail( $post_id ) )
|
520 |
+
$result = get_the_post_thumbnail( $post_id, 'thumbnail' );
|
521 |
+
elseif ( is_email( $email ) )
|
522 |
+
$result = get_avatar( $email );
|
523 |
+
else
|
524 |
+
$result = false;
|
525 |
+
break;
|
526 |
+
|
527 |
+
case self::$cpt_category:
|
528 |
+
case self::$cpt_tags:
|
529 |
+
$terms = get_the_terms( $post_id, $column );
|
530 |
+
$result = '';
|
531 |
+
if ( ! empty( $terms ) ) {
|
532 |
+
$out = array();
|
533 |
+
foreach ( $terms as $term )
|
534 |
+
$out[] = '<a href="' . admin_url( 'edit-tags.php?action=edit&taxonomy=' . $column . '&tag_ID=' . $term->term_id . '&post_type=' . self::PT ) . '">' . $term->name . '</a>';
|
535 |
+
|
536 |
+
$result = join( ', ', $out );
|
537 |
+
}
|
538 |
+
break;
|
539 |
}
|
540 |
|
541 |
$result = apply_filters( 'testimonials_widget_posts_custom_column', $result, $column, $post_id );
|
795 |
$id_base = self::ID . $widget_number;
|
796 |
|
797 |
switch ( $atts['type'] ) {
|
798 |
+
case 'testimonialswidget_widget':
|
799 |
+
$use_bxslider = $atts['use_bxslider'];
|
800 |
+
if ( ! $use_bxslider ) {
|
801 |
+
$height = $atts['height'];
|
802 |
+
$max_height = $atts['max_height'];
|
803 |
+
$min_height = $atts['min_height'];
|
804 |
+
|
805 |
+
if ( $height ) {
|
806 |
+
$max_height = $height;
|
807 |
+
$min_height = $height;
|
808 |
+
}
|
809 |
|
810 |
+
if ( $min_height ) {
|
811 |
+
$css[] = <<<EOF
|
812 |
<style>
|
813 |
.$id_base {
|
814 |
min-height: {$min_height}px;
|
815 |
}
|
816 |
</style>
|
817 |
EOF;
|
818 |
+
}
|
819 |
|
820 |
+
if ( $max_height ) {
|
821 |
+
$css[] = <<<EOF
|
822 |
<style>
|
823 |
.$id_base {
|
824 |
max-height: {$max_height}px;
|
825 |
}
|
826 |
</style>
|
827 |
EOF;
|
828 |
+
}
|
829 |
}
|
830 |
+
break;
|
|
|
831 |
}
|
832 |
|
833 |
$css = apply_filters( 'testimonials_widget_testimonials_css', $css, $atts, $widget_number );
|
848 |
$id_base = $id . $widget_number;
|
849 |
|
850 |
switch ( $atts['type'] ) {
|
851 |
+
case 'testimonialswidget_widget':
|
852 |
+
$javascript = '';
|
853 |
+
if ( 1 < count( $testimonials ) ) {
|
854 |
+
$refresh_interval = $atts['refresh_interval'];
|
855 |
|
856 |
+
$javascript .= '<script type="text/javascript">' . "\n";
|
857 |
|
858 |
+
$use_bxslider = $atts['use_bxslider'];
|
859 |
+
if ( $use_bxslider ) {
|
860 |
+
$enable_video = $atts['enable_video'];
|
861 |
+
$show_start_stop = $atts['show_start_stop'];
|
862 |
+
$transition_mode = $atts['transition_mode'];
|
863 |
|
864 |
+
$auto = $refresh_interval ? 'true' : 'false';
|
865 |
+
$pager = ! $refresh_interval ? 'pager: true' : 'pager: false';
|
866 |
+
$pause = $refresh_interval * 1000;
|
867 |
+
$video = $enable_video ? "video: true,\nuseCSS: false" : 'video: false';
|
868 |
|
869 |
+
$autoControls = $show_start_stop ? 'autoControls: true,' : '';
|
870 |
|
871 |
+
$slider_var = self::SLUG . $widget_number;
|
872 |
+
$javascript .= <<<EOF
|
873 |
var {$slider_var} = null;
|
874 |
|
875 |
jQuery(document).ready(function() {
|
887 |
});
|
888 |
|
889 |
EOF;
|
890 |
+
} else {
|
891 |
+
$tw_padding = 'tw_padding' . $widget_number;
|
892 |
+
$tw_wrapper = 'tw_wrapper' . $widget_number;
|
893 |
+
|
894 |
+
$disable_animation = $atts['disable_animation'];
|
895 |
+
$fade_in_speed = $atts['fade_in_speed'];
|
896 |
+
$fade_out_speed = $atts['fade_out_speed'];
|
897 |
+
$height = $atts['height'];
|
898 |
+
$max_height = $atts['max_height'];
|
899 |
+
$min_height = $atts['min_height'];
|
900 |
+
|
901 |
+
$enable_animation = 1;
|
902 |
+
if ( $disable_animation || $height || $max_height || $min_height )
|
903 |
+
$enable_animation = 0;
|
904 |
+
|
905 |
+
if ( $refresh_interval ) {
|
906 |
+
$javascript .= <<<EOF
|
907 |
function nextTestimonial{$widget_number}() {
|
908 |
if ( ! jQuery('.{$id_base}').first().hasClass('hovered') ) {
|
909 |
var active = jQuery('.{$id_base} .active');
|
935 |
});
|
936 |
|
937 |
EOF;
|
938 |
+
}
|
939 |
|
940 |
+
$javascript .= <<<EOF
|
941 |
if ( {$enable_animation} ) {
|
942 |
var {$tw_wrapper} = jQuery('.{$id_base}');
|
943 |
var {$tw_padding} = 0;
|
951 |
});
|
952 |
}
|
953 |
EOF;
|
954 |
+
}
|
955 |
|
956 |
+
$javascript .= "\n" . '</script>';
|
957 |
+
$scripts[ $id_base ] = $javascript;
|
958 |
+
}
|
959 |
+
break;
|
960 |
}
|
961 |
|
962 |
$scripts = apply_filters( 'testimonials_widget_testimonials_js', $scripts, $testimonials, $atts, $widget_number );
|
1288 |
}
|
1289 |
|
1290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1291 |
public static function format_content( $content, $widget_number, $atts ) {
|
1292 |
if ( empty ( $content ) )
|
1293 |
return $content;
|
1679 |
|
1680 |
if ( is_object( $post ) && self::PT == $post->post_type ) {
|
1681 |
switch ( $translation ) {
|
1682 |
+
case esc_html__( 'Enter title here', 'testimonials-widget' ):
|
1683 |
+
return esc_html__( 'Enter testimonial source here', 'testimonials-widget' );
|
1684 |
+
break;
|
1685 |
}
|
1686 |
}
|
1687 |
|
1744 |
}
|
1745 |
|
1746 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1747 |
/**
|
1748 |
*
|
1749 |
*
|
1956 |
$src = self::get_image_src( $image );
|
1957 |
$file = sanitize_title( $email ) . '.jpeg';
|
1958 |
|
1959 |
+
self::add_media( $post_id, $src, $file );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1960 |
}
|
1961 |
|
1962 |
|
2049 |
}
|
2050 |
|
2051 |
|
|
|
|
|
|
|
2052 |
/**
|
2053 |
*
|
2054 |
*
|