Version Description
- 2017-11-06
Download this release
Release Info
Developer | codeinwp |
Plugin | WP Product Review Lite |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.0 to 3.2.0
- CHANGELOG.md +11 -0
- assets/css/admin.css +0 -2
- assets/css/chosen.min.css +3 -0
- assets/css/circle.css +900 -0
- assets/css/cwppos-widget.css +42 -90
- assets/css/dashboard_styles.css +0 -6
- assets/css/frontpage.css +84 -57
- assets/css/jquery-ui.css +0 -1
- assets/css/pro_dashboard_styles.css +0 -7
- assets/css/upsell.css +5 -4
- assets/img/chosen-sprite.png +0 -0
- assets/img/chosen-sprite@2x.png +0 -0
- assets/js/chosen.jquery.min.js +2 -0
- assets/js/main.js +0 -94
- assets/js/pie-chart.js +0 -401
- assets/js/widget-admin.js +81 -1
- class-wppr-autoloader.php +31 -20
- includes/admin/class-wppr-admin.php +50 -1
- includes/admin/class-wppr-global-settings.php +83 -49
- includes/admin/controllers/class-wppr-admin-render-controller.php +1 -1
- includes/admin/helpers/class-wppr-html-fields.php +15 -11
- includes/admin/layouts/upsell-tpl.php +24 -13
- includes/admin/layouts/widget-admin-tpl.php +56 -12
- includes/admin/models/class-wppr-editor-model.php +3 -3
- includes/admin/models/class-wppr-query-model.php +15 -8
- includes/admin/models/class-wppr-review-model.php +20 -20
- includes/admin/widgets/abstract/class-wppr-widget-abstract.php +63 -14
- includes/admin/widgets/class-wppr-latest-products-widget.php +22 -0
- includes/admin/widgets/class-wppr-top-products-widget.php +62 -0
- includes/class-wppr.php +2 -1
- includes/legacy.php +1 -1
- includes/public/class-wppr-public.php +118 -101
- includes/public/layouts/default.php +92 -83
- includes/public/layouts/rating-tpl.php +9 -8
- includes/public/layouts/score-tpl.php +1 -0
- includes/public/layouts/widget/default.php +36 -27
- languages/wp-product-review.pot +88 -76
- readme.md +473 -0
- readme.txt +9 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php +11 -11
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php +3 -3
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php +29 -5
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php +983 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php +6 -6
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +6 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php +12 -5
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php +20 -34
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +155 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php +223 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php +9 -0
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php +1 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php +2 -2
- vendor/codeinwp/themeisle-sdk/load.php +1 -1
- vendor/codeinwp/themeisle-sdk/start.php +2 -0
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/installed.json +4 -4
- wp-product-review.php +2 -2
CHANGELOG.md
CHANGED
@@ -1,4 +1,15 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v3.1.0 - 2017-09-22
|
3 |
**Changes:**
|
4 |
* Fix for some edge cases when the review box was gone.
|
1 |
|
2 |
+
### v3.2.0 - 2017-11-16
|
3 |
+
**Changes:**
|
4 |
+
* Adds compatibility with WordPress 4.9
|
5 |
+
|
6 |
+
### v3.2.0 - 2017-11-06
|
7 |
+
**Changes:**
|
8 |
+
* Adds support for custom post-type and taxonomies in widgets.
|
9 |
+
* Adds control for time-frame in top reviews widget.
|
10 |
+
* Improves responsiveness and removes dependency of pie-chart.js
|
11 |
+
* Improves notifications when Disqus and Jetpack comments are used.
|
12 |
+
|
13 |
### v3.1.0 - 2017-09-22
|
14 |
**Changes:**
|
15 |
* Fix for some edge cases when the review box was gone.
|
assets/css/admin.css
CHANGED
@@ -4,7 +4,6 @@
|
|
4 |
|
5 |
#wppr_top_tabs a:focus {
|
6 |
outline: none;
|
7 |
-
-webkit-box-shadow: none;
|
8 |
box-shadow: none;
|
9 |
}
|
10 |
|
@@ -159,6 +158,5 @@
|
|
159 |
display: block;
|
160 |
padding: 10px;
|
161 |
background: #cae9ff;
|
162 |
-
line-height: 7px;
|
163 |
text-align: center;
|
164 |
}
|
4 |
|
5 |
#wppr_top_tabs a:focus {
|
6 |
outline: none;
|
|
|
7 |
box-shadow: none;
|
8 |
}
|
9 |
|
158 |
display: block;
|
159 |
padding: 10px;
|
160 |
background: #cae9ff;
|
|
|
161 |
text-align: center;
|
162 |
}
|
assets/css/chosen.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container .search-choice .group-name,.chosen-container .chosen-single .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .search-choice .group-name:after,.chosen-container .chosen-single .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(../img/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(../img/chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(../img/chosen-sprite.png) no-repeat 100% -20px;background:url(../img/chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../img/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(../img/chosen-sprite.png) no-repeat -30px -20px;background:url(../img/chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(../img/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
|
assets/css/circle.css
ADDED
@@ -0,0 +1,900 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/****************************************************************
|
2 |
+
*
|
3 |
+
* CSS Percentage Circle
|
4 |
+
* Author: Andre Firchow
|
5 |
+
*
|
6 |
+
*****************************************************************/
|
7 |
+
.rect-auto,
|
8 |
+
.c100.p51 .slice,
|
9 |
+
.c100.p52 .slice,
|
10 |
+
.c100.p53 .slice,
|
11 |
+
.c100.p54 .slice,
|
12 |
+
.c100.p55 .slice,
|
13 |
+
.c100.p56 .slice,
|
14 |
+
.c100.p57 .slice,
|
15 |
+
.c100.p58 .slice,
|
16 |
+
.c100.p59 .slice,
|
17 |
+
.c100.p60 .slice,
|
18 |
+
.c100.p61 .slice,
|
19 |
+
.c100.p62 .slice,
|
20 |
+
.c100.p63 .slice,
|
21 |
+
.c100.p64 .slice,
|
22 |
+
.c100.p65 .slice,
|
23 |
+
.c100.p66 .slice,
|
24 |
+
.c100.p67 .slice,
|
25 |
+
.c100.p68 .slice,
|
26 |
+
.c100.p69 .slice,
|
27 |
+
.c100.p70 .slice,
|
28 |
+
.c100.p71 .slice,
|
29 |
+
.c100.p72 .slice,
|
30 |
+
.c100.p73 .slice,
|
31 |
+
.c100.p74 .slice,
|
32 |
+
.c100.p75 .slice,
|
33 |
+
.c100.p76 .slice,
|
34 |
+
.c100.p77 .slice,
|
35 |
+
.c100.p78 .slice,
|
36 |
+
.c100.p79 .slice,
|
37 |
+
.c100.p80 .slice,
|
38 |
+
.c100.p81 .slice,
|
39 |
+
.c100.p82 .slice,
|
40 |
+
.c100.p83 .slice,
|
41 |
+
.c100.p84 .slice,
|
42 |
+
.c100.p85 .slice,
|
43 |
+
.c100.p86 .slice,
|
44 |
+
.c100.p87 .slice,
|
45 |
+
.c100.p88 .slice,
|
46 |
+
.c100.p89 .slice,
|
47 |
+
.c100.p90 .slice,
|
48 |
+
.c100.p91 .slice,
|
49 |
+
.c100.p92 .slice,
|
50 |
+
.c100.p93 .slice,
|
51 |
+
.c100.p94 .slice,
|
52 |
+
.c100.p95 .slice,
|
53 |
+
.c100.p96 .slice,
|
54 |
+
.c100.p97 .slice,
|
55 |
+
.c100.p98 .slice,
|
56 |
+
.c100.p99 .slice,
|
57 |
+
.c100.p100 .slice {
|
58 |
+
clip: rect(auto, auto, auto, auto);
|
59 |
+
}
|
60 |
+
|
61 |
+
.pie,
|
62 |
+
.c100 .bar,
|
63 |
+
.c100.p51 .fill,
|
64 |
+
.c100.p52 .fill,
|
65 |
+
.c100.p53 .fill,
|
66 |
+
.c100.p54 .fill,
|
67 |
+
.c100.p55 .fill,
|
68 |
+
.c100.p56 .fill,
|
69 |
+
.c100.p57 .fill,
|
70 |
+
.c100.p58 .fill,
|
71 |
+
.c100.p59 .fill,
|
72 |
+
.c100.p60 .fill,
|
73 |
+
.c100.p61 .fill,
|
74 |
+
.c100.p62 .fill,
|
75 |
+
.c100.p63 .fill,
|
76 |
+
.c100.p64 .fill,
|
77 |
+
.c100.p65 .fill,
|
78 |
+
.c100.p66 .fill,
|
79 |
+
.c100.p67 .fill,
|
80 |
+
.c100.p68 .fill,
|
81 |
+
.c100.p69 .fill,
|
82 |
+
.c100.p70 .fill,
|
83 |
+
.c100.p71 .fill,
|
84 |
+
.c100.p72 .fill,
|
85 |
+
.c100.p73 .fill,
|
86 |
+
.c100.p74 .fill,
|
87 |
+
.c100.p75 .fill,
|
88 |
+
.c100.p76 .fill,
|
89 |
+
.c100.p77 .fill,
|
90 |
+
.c100.p78 .fill,
|
91 |
+
.c100.p79 .fill,
|
92 |
+
.c100.p80 .fill,
|
93 |
+
.c100.p81 .fill,
|
94 |
+
.c100.p82 .fill,
|
95 |
+
.c100.p83 .fill,
|
96 |
+
.c100.p84 .fill,
|
97 |
+
.c100.p85 .fill,
|
98 |
+
.c100.p86 .fill,
|
99 |
+
.c100.p87 .fill,
|
100 |
+
.c100.p88 .fill,
|
101 |
+
.c100.p89 .fill,
|
102 |
+
.c100.p90 .fill,
|
103 |
+
.c100.p91 .fill,
|
104 |
+
.c100.p92 .fill,
|
105 |
+
.c100.p93 .fill,
|
106 |
+
.c100.p94 .fill,
|
107 |
+
.c100.p95 .fill,
|
108 |
+
.c100.p96 .fill,
|
109 |
+
.c100.p97 .fill,
|
110 |
+
.c100.p98 .fill,
|
111 |
+
.c100.p99 .fill,
|
112 |
+
.c100.p100 .fill {
|
113 |
+
clip: rect(0em, 0.5em, 1em, 0em);
|
114 |
+
position: absolute;
|
115 |
+
box-sizing: border-box;
|
116 |
+
width: 100%;
|
117 |
+
height: 100%;
|
118 |
+
border: 15px solid #333;
|
119 |
+
border-radius: 50%;
|
120 |
+
-webkit-transform: rotate(0deg);
|
121 |
+
-ms-transform: rotate(0deg);
|
122 |
+
transform: rotate(0deg);
|
123 |
+
}
|
124 |
+
|
125 |
+
.pie-fill,
|
126 |
+
.c100.p51 .bar:after,
|
127 |
+
.c100.p51 .fill,
|
128 |
+
.c100.p52 .bar:after,
|
129 |
+
.c100.p52 .fill,
|
130 |
+
.c100.p53 .bar:after,
|
131 |
+
.c100.p53 .fill,
|
132 |
+
.c100.p54 .bar:after,
|
133 |
+
.c100.p54 .fill,
|
134 |
+
.c100.p55 .bar:after,
|
135 |
+
.c100.p55 .fill,
|
136 |
+
.c100.p56 .bar:after,
|
137 |
+
.c100.p56 .fill,
|
138 |
+
.c100.p57 .bar:after,
|
139 |
+
.c100.p57 .fill,
|
140 |
+
.c100.p58 .bar:after,
|
141 |
+
.c100.p58 .fill,
|
142 |
+
.c100.p59 .bar:after,
|
143 |
+
.c100.p59 .fill,
|
144 |
+
.c100.p60 .bar:after,
|
145 |
+
.c100.p60 .fill,
|
146 |
+
.c100.p61 .bar:after,
|
147 |
+
.c100.p61 .fill,
|
148 |
+
.c100.p62 .bar:after,
|
149 |
+
.c100.p62 .fill,
|
150 |
+
.c100.p63 .bar:after,
|
151 |
+
.c100.p63 .fill,
|
152 |
+
.c100.p64 .bar:after,
|
153 |
+
.c100.p64 .fill,
|
154 |
+
.c100.p65 .bar:after,
|
155 |
+
.c100.p65 .fill,
|
156 |
+
.c100.p66 .bar:after,
|
157 |
+
.c100.p66 .fill,
|
158 |
+
.c100.p67 .bar:after,
|
159 |
+
.c100.p67 .fill,
|
160 |
+
.c100.p68 .bar:after,
|
161 |
+
.c100.p68 .fill,
|
162 |
+
.c100.p69 .bar:after,
|
163 |
+
.c100.p69 .fill,
|
164 |
+
.c100.p70 .bar:after,
|
165 |
+
.c100.p70 .fill,
|
166 |
+
.c100.p71 .bar:after,
|
167 |
+
.c100.p71 .fill,
|
168 |
+
.c100.p72 .bar:after,
|
169 |
+
.c100.p72 .fill,
|
170 |
+
.c100.p73 .bar:after,
|
171 |
+
.c100.p73 .fill,
|
172 |
+
.c100.p74 .bar:after,
|
173 |
+
.c100.p74 .fill,
|
174 |
+
.c100.p75 .bar:after,
|
175 |
+
.c100.p75 .fill,
|
176 |
+
.c100.p76 .bar:after,
|
177 |
+
.c100.p76 .fill,
|
178 |
+
.c100.p77 .bar:after,
|
179 |
+
.c100.p77 .fill,
|
180 |
+
.c100.p78 .bar:after,
|
181 |
+
.c100.p78 .fill,
|
182 |
+
.c100.p79 .bar:after,
|
183 |
+
.c100.p79 .fill,
|
184 |
+
.c100.p80 .bar:after,
|
185 |
+
.c100.p80 .fill,
|
186 |
+
.c100.p81 .bar:after,
|
187 |
+
.c100.p81 .fill,
|
188 |
+
.c100.p82 .bar:after,
|
189 |
+
.c100.p82 .fill,
|
190 |
+
.c100.p83 .bar:after,
|
191 |
+
.c100.p83 .fill,
|
192 |
+
.c100.p84 .bar:after,
|
193 |
+
.c100.p84 .fill,
|
194 |
+
.c100.p85 .bar:after,
|
195 |
+
.c100.p85 .fill,
|
196 |
+
.c100.p86 .bar:after,
|
197 |
+
.c100.p86 .fill,
|
198 |
+
.c100.p87 .bar:after,
|
199 |
+
.c100.p87 .fill,
|
200 |
+
.c100.p88 .bar:after,
|
201 |
+
.c100.p88 .fill,
|
202 |
+
.c100.p89 .bar:after,
|
203 |
+
.c100.p89 .fill,
|
204 |
+
.c100.p90 .bar:after,
|
205 |
+
.c100.p90 .fill,
|
206 |
+
.c100.p91 .bar:after,
|
207 |
+
.c100.p91 .fill,
|
208 |
+
.c100.p92 .bar:after,
|
209 |
+
.c100.p92 .fill,
|
210 |
+
.c100.p93 .bar:after,
|
211 |
+
.c100.p93 .fill,
|
212 |
+
.c100.p94 .bar:after,
|
213 |
+
.c100.p94 .fill,
|
214 |
+
.c100.p95 .bar:after,
|
215 |
+
.c100.p95 .fill,
|
216 |
+
.c100.p96 .bar:after,
|
217 |
+
.c100.p96 .fill,
|
218 |
+
.c100.p97 .bar:after,
|
219 |
+
.c100.p97 .fill,
|
220 |
+
.c100.p98 .bar:after,
|
221 |
+
.c100.p98 .fill,
|
222 |
+
.c100.p99 .bar:after,
|
223 |
+
.c100.p99 .fill,
|
224 |
+
.c100.p100 .bar:after,
|
225 |
+
.c100.p100 .fill {
|
226 |
+
-webkit-transform: rotate(180deg);
|
227 |
+
-ms-transform: rotate(180deg);
|
228 |
+
transform: rotate(180deg);
|
229 |
+
}
|
230 |
+
|
231 |
+
.c100 {
|
232 |
+
display: inline-block;
|
233 |
+
position: absolute;
|
234 |
+
top: 50%;
|
235 |
+
left: 50%;
|
236 |
+
width: 100%;
|
237 |
+
min-width: 100px;
|
238 |
+
max-width: 120px;
|
239 |
+
height: 100%;
|
240 |
+
min-height: 100px;
|
241 |
+
max-height: 120px;
|
242 |
+
border-radius: 50%;
|
243 |
+
background-color: #ebebeb;
|
244 |
+
font-size: 120px;
|
245 |
+
-webkit-transform: translate(-50%,-50%);
|
246 |
+
-ms-transform: translate(-50%,-50%);
|
247 |
+
transform: translate(-50%,-50%);
|
248 |
+
}
|
249 |
+
|
250 |
+
.c100.center {
|
251 |
+
float: none;
|
252 |
+
margin: 0 auto;
|
253 |
+
}
|
254 |
+
|
255 |
+
.c100 > span {
|
256 |
+
display: block;
|
257 |
+
position: absolute;
|
258 |
+
z-index: 1;
|
259 |
+
top: 0;
|
260 |
+
left: 0;
|
261 |
+
width: 100%;
|
262 |
+
width: 100%;
|
263 |
+
color: #333;
|
264 |
+
font-family: "Lato";
|
265 |
+
font-size: 33px;
|
266 |
+
font-weight: 900;
|
267 |
+
line-height: 120px;
|
268 |
+
text-align: center;
|
269 |
+
white-space: nowrap;
|
270 |
+
-webkit-transition-timing-function: ease-out;
|
271 |
+
transition-timing-function: ease-out;
|
272 |
+
-webkit-transition-duration: 0.2s;
|
273 |
+
transition-duration: 0.2s;
|
274 |
+
-webkit-transition-property: all;
|
275 |
+
transition-property: all;
|
276 |
+
}
|
277 |
+
|
278 |
+
.c100 .slice-center {
|
279 |
+
display: block;
|
280 |
+
box-sizing: border-box;
|
281 |
+
width: 100%;
|
282 |
+
height: 100%;
|
283 |
+
padding: 15px;
|
284 |
+
}
|
285 |
+
|
286 |
+
.c100 .slice-center:after {
|
287 |
+
display: block;
|
288 |
+
width: 100%;
|
289 |
+
height: 100%;
|
290 |
+
border-radius: 50%;
|
291 |
+
background-color: #fff;
|
292 |
+
content: " ";
|
293 |
+
}
|
294 |
+
|
295 |
+
.c100 .slice {
|
296 |
+
clip: rect(0em, 1em, 1em, 0.5em);
|
297 |
+
position: absolute;
|
298 |
+
width: 100%;
|
299 |
+
height: 100%;
|
300 |
+
}
|
301 |
+
|
302 |
+
.c100.p1 .bar {
|
303 |
+
-webkit-transform: rotate(3.6deg);
|
304 |
+
-ms-transform: rotate(3.6deg);
|
305 |
+
transform: rotate(3.6deg);
|
306 |
+
}
|
307 |
+
|
308 |
+
.c100.p2 .bar {
|
309 |
+
-webkit-transform: rotate(7.2deg);
|
310 |
+
-ms-transform: rotate(7.2deg);
|
311 |
+
transform: rotate(7.2deg);
|
312 |
+
}
|
313 |
+
|
314 |
+
.c100.p3 .bar {
|
315 |
+
-webkit-transform: rotate(10.8deg);
|
316 |
+
-ms-transform: rotate(10.8deg);
|
317 |
+
transform: rotate(10.8deg);
|
318 |
+
}
|
319 |
+
|
320 |
+
.c100.p4 .bar {
|
321 |
+
-webkit-transform: rotate(14.4deg);
|
322 |
+
-ms-transform: rotate(14.4deg);
|
323 |
+
transform: rotate(14.4deg);
|
324 |
+
}
|
325 |
+
|
326 |
+
.c100.p5 .bar {
|
327 |
+
-webkit-transform: rotate(18deg);
|
328 |
+
-ms-transform: rotate(18deg);
|
329 |
+
transform: rotate(18deg);
|
330 |
+
}
|
331 |
+
|
332 |
+
.c100.p6 .bar {
|
333 |
+
-webkit-transform: rotate(21.6deg);
|
334 |
+
-ms-transform: rotate(21.6deg);
|
335 |
+
transform: rotate(21.6deg);
|
336 |
+
}
|
337 |
+
|
338 |
+
.c100.p7 .bar {
|
339 |
+
-webkit-transform: rotate(25.2deg);
|
340 |
+
-ms-transform: rotate(25.2deg);
|
341 |
+
transform: rotate(25.2deg);
|
342 |
+
}
|
343 |
+
|
344 |
+
.c100.p8 .bar {
|
345 |
+
-webkit-transform: rotate(28.8deg);
|
346 |
+
-ms-transform: rotate(28.8deg);
|
347 |
+
transform: rotate(28.8deg);
|
348 |
+
}
|
349 |
+
|
350 |
+
.c100.p9 .bar {
|
351 |
+
-webkit-transform: rotate(32.4deg);
|
352 |
+
-ms-transform: rotate(32.4deg);
|
353 |
+
transform: rotate(32.4deg);
|
354 |
+
}
|
355 |
+
|
356 |
+
.c100.p10 .bar {
|
357 |
+
-webkit-transform: rotate(36deg);
|
358 |
+
-ms-transform: rotate(36deg);
|
359 |
+
transform: rotate(36deg);
|
360 |
+
}
|
361 |
+
|
362 |
+
.c100.p11 .bar {
|
363 |
+
-webkit-transform: rotate(39.6deg);
|
364 |
+
-ms-transform: rotate(39.6deg);
|
365 |
+
transform: rotate(39.6deg);
|
366 |
+
}
|
367 |
+
|
368 |
+
.c100.p12 .bar {
|
369 |
+
-webkit-transform: rotate(43.2deg);
|
370 |
+
-ms-transform: rotate(43.2deg);
|
371 |
+
transform: rotate(43.2deg);
|
372 |
+
}
|
373 |
+
|
374 |
+
.c100.p13 .bar {
|
375 |
+
-webkit-transform: rotate(46.8deg);
|
376 |
+
-ms-transform: rotate(46.8deg);
|
377 |
+
transform: rotate(46.8deg);
|
378 |
+
}
|
379 |
+
|
380 |
+
.c100.p14 .bar {
|
381 |
+
-webkit-transform: rotate(50.4deg);
|
382 |
+
-ms-transform: rotate(50.4deg);
|
383 |
+
transform: rotate(50.4deg);
|
384 |
+
}
|
385 |
+
|
386 |
+
.c100.p15 .bar {
|
387 |
+
-webkit-transform: rotate(54deg);
|
388 |
+
-ms-transform: rotate(54deg);
|
389 |
+
transform: rotate(54deg);
|
390 |
+
}
|
391 |
+
|
392 |
+
.c100.p16 .bar {
|
393 |
+
-webkit-transform: rotate(57.6deg);
|
394 |
+
-ms-transform: rotate(57.6deg);
|
395 |
+
transform: rotate(57.6deg);
|
396 |
+
}
|
397 |
+
|
398 |
+
.c100.p17 .bar {
|
399 |
+
-webkit-transform: rotate(61.2deg);
|
400 |
+
-ms-transform: rotate(61.2deg);
|
401 |
+
transform: rotate(61.2deg);
|
402 |
+
}
|
403 |
+
|
404 |
+
.c100.p18 .bar {
|
405 |
+
-webkit-transform: rotate(64.8deg);
|
406 |
+
-ms-transform: rotate(64.8deg);
|
407 |
+
transform: rotate(64.8deg);
|
408 |
+
}
|
409 |
+
|
410 |
+
.c100.p19 .bar {
|
411 |
+
-webkit-transform: rotate(68.4deg);
|
412 |
+
-ms-transform: rotate(68.4deg);
|
413 |
+
transform: rotate(68.4deg);
|
414 |
+
}
|
415 |
+
|
416 |
+
.c100.p20 .bar {
|
417 |
+
-webkit-transform: rotate(72deg);
|
418 |
+
-ms-transform: rotate(72deg);
|
419 |
+
transform: rotate(72deg);
|
420 |
+
}
|
421 |
+
|
422 |
+
.c100.p21 .bar {
|
423 |
+
-webkit-transform: rotate(75.6deg);
|
424 |
+
-ms-transform: rotate(75.6deg);
|
425 |
+
transform: rotate(75.6deg);
|
426 |
+
}
|
427 |
+
|
428 |
+
.c100.p22 .bar {
|
429 |
+
-webkit-transform: rotate(79.2deg);
|
430 |
+
-ms-transform: rotate(79.2deg);
|
431 |
+
transform: rotate(79.2deg);
|
432 |
+
}
|
433 |
+
|
434 |
+
.c100.p23 .bar {
|
435 |
+
-webkit-transform: rotate(82.8deg);
|
436 |
+
-ms-transform: rotate(82.8deg);
|
437 |
+
transform: rotate(82.8deg);
|
438 |
+
}
|
439 |
+
|
440 |
+
.c100.p24 .bar {
|
441 |
+
-webkit-transform: rotate(86.4deg);
|
442 |
+
-ms-transform: rotate(86.4deg);
|
443 |
+
transform: rotate(86.4deg);
|
444 |
+
}
|
445 |
+
|
446 |
+
.c100.p25 .bar {
|
447 |
+
-webkit-transform: rotate(90deg);
|
448 |
+
-ms-transform: rotate(90deg);
|
449 |
+
transform: rotate(90deg);
|
450 |
+
}
|
451 |
+
|
452 |
+
.c100.p26 .bar {
|
453 |
+
-webkit-transform: rotate(93.6deg);
|
454 |
+
-ms-transform: rotate(93.6deg);
|
455 |
+
transform: rotate(93.6deg);
|
456 |
+
}
|
457 |
+
|
458 |
+
.c100.p27 .bar {
|
459 |
+
-webkit-transform: rotate(97.2deg);
|
460 |
+
-ms-transform: rotate(97.2deg);
|
461 |
+
transform: rotate(97.2deg);
|
462 |
+
}
|
463 |
+
|
464 |
+
.c100.p28 .bar {
|
465 |
+
-webkit-transform: rotate(100.8deg);
|
466 |
+
-ms-transform: rotate(100.8deg);
|
467 |
+
transform: rotate(100.8deg);
|
468 |
+
}
|
469 |
+
|
470 |
+
.c100.p29 .bar {
|
471 |
+
-webkit-transform: rotate(104.4deg);
|
472 |
+
-ms-transform: rotate(104.4deg);
|
473 |
+
transform: rotate(104.4deg);
|
474 |
+
}
|
475 |
+
|
476 |
+
.c100.p30 .bar {
|
477 |
+
-webkit-transform: rotate(108deg);
|
478 |
+
-ms-transform: rotate(108deg);
|
479 |
+
transform: rotate(108deg);
|
480 |
+
}
|
481 |
+
|
482 |
+
.c100.p31 .bar {
|
483 |
+
-webkit-transform: rotate(111.6deg);
|
484 |
+
-ms-transform: rotate(111.6deg);
|
485 |
+
transform: rotate(111.6deg);
|
486 |
+
}
|
487 |
+
|
488 |
+
.c100.p32 .bar {
|
489 |
+
-webkit-transform: rotate(115.2deg);
|
490 |
+
-ms-transform: rotate(115.2deg);
|
491 |
+
transform: rotate(115.2deg);
|
492 |
+
}
|
493 |
+
|
494 |
+
.c100.p33 .bar {
|
495 |
+
-webkit-transform: rotate(118.8deg);
|
496 |
+
-ms-transform: rotate(118.8deg);
|
497 |
+
transform: rotate(118.8deg);
|
498 |
+
}
|
499 |
+
|
500 |
+
.c100.p34 .bar {
|
501 |
+
-webkit-transform: rotate(122.4deg);
|
502 |
+
-ms-transform: rotate(122.4deg);
|
503 |
+
transform: rotate(122.4deg);
|
504 |
+
}
|
505 |
+
|
506 |
+
.c100.p35 .bar {
|
507 |
+
-webkit-transform: rotate(126deg);
|
508 |
+
-ms-transform: rotate(126deg);
|
509 |
+
transform: rotate(126deg);
|
510 |
+
}
|
511 |
+
|
512 |
+
.c100.p36 .bar {
|
513 |
+
-webkit-transform: rotate(129.6deg);
|
514 |
+
-ms-transform: rotate(129.6deg);
|
515 |
+
transform: rotate(129.6deg);
|
516 |
+
}
|
517 |
+
|
518 |
+
.c100.p37 .bar {
|
519 |
+
-webkit-transform: rotate(133.2deg);
|
520 |
+
-ms-transform: rotate(133.2deg);
|
521 |
+
transform: rotate(133.2deg);
|
522 |
+
}
|
523 |
+
|
524 |
+
.c100.p38 .bar {
|
525 |
+
-webkit-transform: rotate(136.8deg);
|
526 |
+
-ms-transform: rotate(136.8deg);
|
527 |
+
transform: rotate(136.8deg);
|
528 |
+
}
|
529 |
+
|
530 |
+
.c100.p39 .bar {
|
531 |
+
-webkit-transform: rotate(140.4deg);
|
532 |
+
-ms-transform: rotate(140.4deg);
|
533 |
+
transform: rotate(140.4deg);
|
534 |
+
}
|
535 |
+
|
536 |
+
.c100.p40 .bar {
|
537 |
+
-webkit-transform: rotate(144deg);
|
538 |
+
-ms-transform: rotate(144deg);
|
539 |
+
transform: rotate(144deg);
|
540 |
+
}
|
541 |
+
|
542 |
+
.c100.p41 .bar {
|
543 |
+
-webkit-transform: rotate(147.6deg);
|
544 |
+
-ms-transform: rotate(147.6deg);
|
545 |
+
transform: rotate(147.6deg);
|
546 |
+
}
|
547 |
+
|
548 |
+
.c100.p42 .bar {
|
549 |
+
-webkit-transform: rotate(151.2deg);
|
550 |
+
-ms-transform: rotate(151.2deg);
|
551 |
+
transform: rotate(151.2deg);
|
552 |
+
}
|
553 |
+
|
554 |
+
.c100.p43 .bar {
|
555 |
+
-webkit-transform: rotate(154.8deg);
|
556 |
+
-ms-transform: rotate(154.8deg);
|
557 |
+
transform: rotate(154.8deg);
|
558 |
+
}
|
559 |
+
|
560 |
+
.c100.p44 .bar {
|
561 |
+
-webkit-transform: rotate(158.4deg);
|
562 |
+
-ms-transform: rotate(158.4deg);
|
563 |
+
transform: rotate(158.4deg);
|
564 |
+
}
|
565 |
+
|
566 |
+
.c100.p45 .bar {
|
567 |
+
-webkit-transform: rotate(162deg);
|
568 |
+
-ms-transform: rotate(162deg);
|
569 |
+
transform: rotate(162deg);
|
570 |
+
}
|
571 |
+
|
572 |
+
.c100.p46 .bar {
|
573 |
+
-webkit-transform: rotate(165.6deg);
|
574 |
+
-ms-transform: rotate(165.6deg);
|
575 |
+
transform: rotate(165.6deg);
|
576 |
+
}
|
577 |
+
|
578 |
+
.c100.p47 .bar {
|
579 |
+
-webkit-transform: rotate(169.2deg);
|
580 |
+
-ms-transform: rotate(169.2deg);
|
581 |
+
transform: rotate(169.2deg);
|
582 |
+
}
|
583 |
+
|
584 |
+
.c100.p48 .bar {
|
585 |
+
-webkit-transform: rotate(172.8deg);
|
586 |
+
-ms-transform: rotate(172.8deg);
|
587 |
+
transform: rotate(172.8deg);
|
588 |
+
}
|
589 |
+
|
590 |
+
.c100.p49 .bar {
|
591 |
+
-webkit-transform: rotate(176.4deg);
|
592 |
+
-ms-transform: rotate(176.4deg);
|
593 |
+
transform: rotate(176.4deg);
|
594 |
+
}
|
595 |
+
|
596 |
+
.c100.p50 .bar {
|
597 |
+
-webkit-transform: rotate(180deg);
|
598 |
+
-ms-transform: rotate(180deg);
|
599 |
+
transform: rotate(180deg);
|
600 |
+
}
|
601 |
+
|
602 |
+
.c100.p51 .bar {
|
603 |
+
-webkit-transform: rotate(183.6deg);
|
604 |
+
-ms-transform: rotate(183.6deg);
|
605 |
+
transform: rotate(183.6deg);
|
606 |
+
}
|
607 |
+
|
608 |
+
.c100.p52 .bar {
|
609 |
+
-webkit-transform: rotate(187.2deg);
|
610 |
+
-ms-transform: rotate(187.2deg);
|
611 |
+
transform: rotate(187.2deg);
|
612 |
+
}
|
613 |
+
|
614 |
+
.c100.p53 .bar {
|
615 |
+
-webkit-transform: rotate(190.8deg);
|
616 |
+
-ms-transform: rotate(190.8deg);
|
617 |
+
transform: rotate(190.8deg);
|
618 |
+
}
|
619 |
+
|
620 |
+
.c100.p54 .bar {
|
621 |
+
-webkit-transform: rotate(194.4deg);
|
622 |
+
-ms-transform: rotate(194.4deg);
|
623 |
+
transform: rotate(194.4deg);
|
624 |
+
}
|
625 |
+
|
626 |
+
.c100.p55 .bar {
|
627 |
+
-webkit-transform: rotate(198deg);
|
628 |
+
-ms-transform: rotate(198deg);
|
629 |
+
transform: rotate(198deg);
|
630 |
+
}
|
631 |
+
|
632 |
+
.c100.p56 .bar {
|
633 |
+
-webkit-transform: rotate(201.6deg);
|
634 |
+
-ms-transform: rotate(201.6deg);
|
635 |
+
transform: rotate(201.6deg);
|
636 |
+
}
|
637 |
+
|
638 |
+
.c100.p57 .bar {
|
639 |
+
-webkit-transform: rotate(205.2deg);
|
640 |
+
-ms-transform: rotate(205.2deg);
|
641 |
+
transform: rotate(205.2deg);
|
642 |
+
}
|
643 |
+
|
644 |
+
.c100.p58 .bar {
|
645 |
+
-webkit-transform: rotate(208.8deg);
|
646 |
+
-ms-transform: rotate(208.8deg);
|
647 |
+
transform: rotate(208.8deg);
|
648 |
+
}
|
649 |
+
|
650 |
+
.c100.p59 .bar {
|
651 |
+
-webkit-transform: rotate(212.4deg);
|
652 |
+
-ms-transform: rotate(212.4deg);
|
653 |
+
transform: rotate(212.4deg);
|
654 |
+
}
|
655 |
+
|
656 |
+
.c100.p60 .bar {
|
657 |
+
-webkit-transform: rotate(216deg);
|
658 |
+
-ms-transform: rotate(216deg);
|
659 |
+
transform: rotate(216deg);
|
660 |
+
}
|
661 |
+
|
662 |
+
.c100.p61 .bar {
|
663 |
+
-webkit-transform: rotate(219.6deg);
|
664 |
+
-ms-transform: rotate(219.6deg);
|
665 |
+
transform: rotate(219.6deg);
|
666 |
+
}
|
667 |
+
|
668 |
+
.c100.p62 .bar {
|
669 |
+
-webkit-transform: rotate(223.2deg);
|
670 |
+
-ms-transform: rotate(223.2deg);
|
671 |
+
transform: rotate(223.2deg);
|
672 |
+
}
|
673 |
+
|
674 |
+
.c100.p63 .bar {
|
675 |
+
-webkit-transform: rotate(226.8deg);
|
676 |
+
-ms-transform: rotate(226.8deg);
|
677 |
+
transform: rotate(226.8deg);
|
678 |
+
}
|
679 |
+
|
680 |
+
.c100.p64 .bar {
|
681 |
+
-webkit-transform: rotate(230.4deg);
|
682 |
+
-ms-transform: rotate(230.4deg);
|
683 |
+
transform: rotate(230.4deg);
|
684 |
+
}
|
685 |
+
|
686 |
+
.c100.p65 .bar {
|
687 |
+
-webkit-transform: rotate(234deg);
|
688 |
+
-ms-transform: rotate(234deg);
|
689 |
+
transform: rotate(234deg);
|
690 |
+
}
|
691 |
+
|
692 |
+
.c100.p66 .bar {
|
693 |
+
-webkit-transform: rotate(237.6deg);
|
694 |
+
-ms-transform: rotate(237.6deg);
|
695 |
+
transform: rotate(237.6deg);
|
696 |
+
}
|
697 |
+
|
698 |
+
.c100.p67 .bar {
|
699 |
+
-webkit-transform: rotate(241.2deg);
|
700 |
+
-ms-transform: rotate(241.2deg);
|
701 |
+
transform: rotate(241.2deg);
|
702 |
+
}
|
703 |
+
|
704 |
+
.c100.p68 .bar {
|
705 |
+
-webkit-transform: rotate(244.8deg);
|
706 |
+
-ms-transform: rotate(244.8deg);
|
707 |
+
transform: rotate(244.8deg);
|
708 |
+
}
|
709 |
+
|
710 |
+
.c100.p69 .bar {
|
711 |
+
-webkit-transform: rotate(248.4deg);
|
712 |
+
-ms-transform: rotate(248.4deg);
|
713 |
+
transform: rotate(248.4deg);
|
714 |
+
}
|
715 |
+
|
716 |
+
.c100.p70 .bar {
|
717 |
+
-webkit-transform: rotate(252deg);
|
718 |
+
-ms-transform: rotate(252deg);
|
719 |
+
transform: rotate(252deg);
|
720 |
+
}
|
721 |
+
|
722 |
+
.c100.p71 .bar {
|
723 |
+
-webkit-transform: rotate(255.6deg);
|
724 |
+
-ms-transform: rotate(255.6deg);
|
725 |
+
transform: rotate(255.6deg);
|
726 |
+
}
|
727 |
+
|
728 |
+
.c100.p72 .bar {
|
729 |
+
-webkit-transform: rotate(259.2deg);
|
730 |
+
-ms-transform: rotate(259.2deg);
|
731 |
+
transform: rotate(259.2deg);
|
732 |
+
}
|
733 |
+
|
734 |
+
.c100.p73 .bar {
|
735 |
+
-webkit-transform: rotate(262.8deg);
|
736 |
+
-ms-transform: rotate(262.8deg);
|
737 |
+
transform: rotate(262.8deg);
|
738 |
+
}
|
739 |
+
|
740 |
+
.c100.p74 .bar {
|
741 |
+
-webkit-transform: rotate(266.4deg);
|
742 |
+
-ms-transform: rotate(266.4deg);
|
743 |
+
transform: rotate(266.4deg);
|
744 |
+
}
|
745 |
+
|
746 |
+
.c100.p75 .bar {
|
747 |
+
-webkit-transform: rotate(270deg);
|
748 |
+
-ms-transform: rotate(270deg);
|
749 |
+
transform: rotate(270deg);
|
750 |
+
}
|
751 |
+
|
752 |
+
.c100.p76 .bar {
|
753 |
+
-webkit-transform: rotate(273.6deg);
|
754 |
+
-ms-transform: rotate(273.6deg);
|
755 |
+
transform: rotate(273.6deg);
|
756 |
+
}
|
757 |
+
|
758 |
+
.c100.p77 .bar {
|
759 |
+
-webkit-transform: rotate(277.2deg);
|
760 |
+
-ms-transform: rotate(277.2deg);
|
761 |
+
transform: rotate(277.2deg);
|
762 |
+
}
|
763 |
+
|
764 |
+
.c100.p78 .bar {
|
765 |
+
-webkit-transform: rotate(280.8deg);
|
766 |
+
-ms-transform: rotate(280.8deg);
|
767 |
+
transform: rotate(280.8deg);
|
768 |
+
}
|
769 |
+
|
770 |
+
.c100.p79 .bar {
|
771 |
+
-webkit-transform: rotate(284.4deg);
|
772 |
+
-ms-transform: rotate(284.4deg);
|
773 |
+
transform: rotate(284.4deg);
|
774 |
+
}
|
775 |
+
|
776 |
+
.c100.p80 .bar {
|
777 |
+
-webkit-transform: rotate(288deg);
|
778 |
+
-ms-transform: rotate(288deg);
|
779 |
+
transform: rotate(288deg);
|
780 |
+
}
|
781 |
+
|
782 |
+
.c100.p81 .bar {
|
783 |
+
-webkit-transform: rotate(291.6deg);
|
784 |
+
-ms-transform: rotate(291.6deg);
|
785 |
+
transform: rotate(291.6deg);
|
786 |
+
}
|
787 |
+
|
788 |
+
.c100.p82 .bar {
|
789 |
+
-webkit-transform: rotate(295.2deg);
|
790 |
+
-ms-transform: rotate(295.2deg);
|
791 |
+
transform: rotate(295.2deg);
|
792 |
+
}
|
793 |
+
|
794 |
+
.c100.p83 .bar {
|
795 |
+
-webkit-transform: rotate(298.8deg);
|
796 |
+
-ms-transform: rotate(298.8deg);
|
797 |
+
transform: rotate(298.8deg);
|
798 |
+
}
|
799 |
+
|
800 |
+
.c100.p84 .bar {
|
801 |
+
-webkit-transform: rotate(302.4deg);
|
802 |
+
-ms-transform: rotate(302.4deg);
|
803 |
+
transform: rotate(302.4deg);
|
804 |
+
}
|
805 |
+
|
806 |
+
.c100.p85 .bar {
|
807 |
+
-webkit-transform: rotate(306deg);
|
808 |
+
-ms-transform: rotate(306deg);
|
809 |
+
transform: rotate(306deg);
|
810 |
+
}
|
811 |
+
|
812 |
+
.c100.p86 .bar {
|
813 |
+
-webkit-transform: rotate(309.6deg);
|
814 |
+
-ms-transform: rotate(309.6deg);
|
815 |
+
transform: rotate(309.6deg);
|
816 |
+
}
|
817 |
+
|
818 |
+
.c100.p87 .bar {
|
819 |
+
-webkit-transform: rotate(313.2deg);
|
820 |
+
-ms-transform: rotate(313.2deg);
|
821 |
+
transform: rotate(313.2deg);
|
822 |
+
}
|
823 |
+
|
824 |
+
.c100.p88 .bar {
|
825 |
+
-webkit-transform: rotate(316.8deg);
|
826 |
+
-ms-transform: rotate(316.8deg);
|
827 |
+
transform: rotate(316.8deg);
|
828 |
+
}
|
829 |
+
|
830 |
+
.c100.p89 .bar {
|
831 |
+
-webkit-transform: rotate(320.4deg);
|
832 |
+
-ms-transform: rotate(320.4deg);
|
833 |
+
transform: rotate(320.4deg);
|
834 |
+
}
|
835 |
+
|
836 |
+
.c100.p90 .bar {
|
837 |
+
-webkit-transform: rotate(324deg);
|
838 |
+
-ms-transform: rotate(324deg);
|
839 |
+
transform: rotate(324deg);
|
840 |
+
}
|
841 |
+
|
842 |
+
.c100.p91 .bar {
|
843 |
+
-webkit-transform: rotate(327.6deg);
|
844 |
+
-ms-transform: rotate(327.6deg);
|
845 |
+
transform: rotate(327.6deg);
|
846 |
+
}
|
847 |
+
|
848 |
+
.c100.p92 .bar {
|
849 |
+
-webkit-transform: rotate(331.2deg);
|
850 |
+
-ms-transform: rotate(331.2deg);
|
851 |
+
transform: rotate(331.2deg);
|
852 |
+
}
|
853 |
+
|
854 |
+
.c100.p93 .bar {
|
855 |
+
-webkit-transform: rotate(334.8deg);
|
856 |
+
-ms-transform: rotate(334.8deg);
|
857 |
+
transform: rotate(334.8deg);
|
858 |
+
}
|
859 |
+
|
860 |
+
.c100.p94 .bar {
|
861 |
+
-webkit-transform: rotate(338.4deg);
|
862 |
+
-ms-transform: rotate(338.4deg);
|
863 |
+
transform: rotate(338.4deg);
|
864 |
+
}
|
865 |
+
|
866 |
+
.c100.p95 .bar {
|
867 |
+
-webkit-transform: rotate(342deg);
|
868 |
+
-ms-transform: rotate(342deg);
|
869 |
+
transform: rotate(342deg);
|
870 |
+
}
|
871 |
+
|
872 |
+
.c100.p96 .bar {
|
873 |
+
-webkit-transform: rotate(345.6deg);
|
874 |
+
-ms-transform: rotate(345.6deg);
|
875 |
+
transform: rotate(345.6deg);
|
876 |
+
}
|
877 |
+
|
878 |
+
.c100.p97 .bar {
|
879 |
+
-webkit-transform: rotate(349.2deg);
|
880 |
+
-ms-transform: rotate(349.2deg);
|
881 |
+
transform: rotate(349.2deg);
|
882 |
+
}
|
883 |
+
|
884 |
+
.c100.p98 .bar {
|
885 |
+
-webkit-transform: rotate(352.8deg);
|
886 |
+
-ms-transform: rotate(352.8deg);
|
887 |
+
transform: rotate(352.8deg);
|
888 |
+
}
|
889 |
+
|
890 |
+
.c100.p99 .bar {
|
891 |
+
-webkit-transform: rotate(356.4deg);
|
892 |
+
-ms-transform: rotate(356.4deg);
|
893 |
+
transform: rotate(356.4deg);
|
894 |
+
}
|
895 |
+
|
896 |
+
.c100.p100 .bar {
|
897 |
+
-webkit-transform: rotate(360deg);
|
898 |
+
-ms-transform: rotate(360deg);
|
899 |
+
transform: rotate(360deg);
|
900 |
+
}
|
assets/css/cwppos-widget.css
CHANGED
@@ -1,80 +1,46 @@
|
|
1 |
/* Sidebar Popular Reviews Widget */
|
2 |
|
3 |
-
.
|
4 |
-
|
5 |
-
margin: 0;
|
6 |
-
padding: 15px 0 !important;
|
7 |
-
border-bottom: 1px solid #ddd;
|
8 |
-
list-style: none;
|
9 |
-
}
|
10 |
-
|
11 |
-
.cwp-popular-review .cwp-review-chart canvas,
|
12 |
-
.cwp-popular-review .cwp-review-chart span {
|
13 |
-
width: 40px!important;
|
14 |
-
height: 40px!important;
|
15 |
-
line-height: 2.3;
|
16 |
-
}
|
17 |
-
|
18 |
-
.cwp-popular-review .cwp-review-chart .cwp-review-percentage {
|
19 |
-
top: -1px;
|
20 |
-
left: -1px;
|
21 |
-
width: 40px!important;
|
22 |
-
height: 40px !important;
|
23 |
-
}
|
24 |
-
|
25 |
-
.cwp-popular-review .cwp-review-chart {
|
26 |
-
top: 56%;
|
27 |
width: 40px;
|
28 |
height: 40px;
|
29 |
-
margin-top: -22px;
|
30 |
-
border: 0 solid #fff;
|
31 |
-
}
|
32 |
-
|
33 |
-
/* Review Pie Chart Styles */
|
34 |
-
.cwp-review-chart {
|
35 |
-
float: left;
|
36 |
-
position: absolute;
|
37 |
-
top: 0;
|
38 |
-
right: 0;
|
39 |
-
margin: 10px 0 10px 10px;
|
40 |
-
border: 3px solid #fff;
|
41 |
-
border-radius: 50%;
|
42 |
}
|
43 |
|
44 |
-
.
|
45 |
-
display: block;
|
46 |
-
border-radius: 50%;
|
47 |
-
background: #fff;
|
48 |
-
font-family: "Lato";
|
49 |
-
font-size: 17px;
|
50 |
-
font-weight: 900;
|
51 |
-
}
|
52 |
-
|
53 |
-
.cwp_easyPieChart {
|
54 |
position: relative;
|
55 |
-
text-align: center;
|
56 |
-
}
|
57 |
-
|
58 |
-
.cwp_easyPieChart canvas {
|
59 |
-
position: absolute;
|
60 |
top: 0;
|
61 |
left: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
-
.
|
65 |
-
|
|
|
66 |
}
|
67 |
|
68 |
-
.
|
69 |
-
|
|
|
70 |
}
|
71 |
|
72 |
-
.
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
.widget_cwp_top_products_widget ul,
|
@@ -96,42 +62,28 @@
|
|
96 |
border: none!important;
|
97 |
}
|
98 |
|
99 |
-
.
|
100 |
-
|
101 |
-
width: 15%;
|
102 |
}
|
103 |
|
104 |
-
.
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
white-space: nowrap;
|
109 |
-
text-overflow: ellipsis;
|
110 |
-
;
|
111 |
}
|
112 |
|
113 |
-
.
|
114 |
-
|
115 |
-
top: 40%;
|
116 |
-
margin-right: -60px;
|
117 |
-
-webkit-transform: translateY(40%);
|
118 |
-
-ms-transform: translateY(40%);
|
119 |
-
transform: translateY(40%);
|
120 |
}
|
121 |
|
122 |
-
.
|
123 |
-
|
124 |
-
float: left;
|
125 |
}
|
126 |
|
127 |
-
.
|
128 |
-
|
129 |
-
display: table;
|
130 |
-
clear: both;
|
131 |
-
position: relative !important;
|
132 |
-
content: "";
|
133 |
}
|
134 |
|
135 |
-
.
|
136 |
-
|
137 |
}
|
1 |
/* Sidebar Popular Reviews Widget */
|
2 |
|
3 |
+
.review-grade-widget .review-wu-grade-content {
|
4 |
+
float: right;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
width: 40px;
|
6 |
height: 40px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
|
9 |
+
.review-grade-widget .review-wu-grade-content .c100 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
11 |
top: 0;
|
12 |
left: 0;
|
13 |
+
min-width: 40px;
|
14 |
+
max-width: 40px;
|
15 |
+
min-height: 40px;
|
16 |
+
max-height: 40px;
|
17 |
+
font-size: 40px;
|
18 |
+
-webkit-transform: none;
|
19 |
+
-ms-transform: none;
|
20 |
+
transform: none;
|
21 |
}
|
22 |
|
23 |
+
.review-grade-widget .review-wu-grade-content .c100 > span {
|
24 |
+
font-size: 14px;
|
25 |
+
line-height: 40px;
|
26 |
}
|
27 |
|
28 |
+
.review-grade-widget .review-wu-grade-content .c100 .bar,
|
29 |
+
.review-grade-widget .review-wu-grade-content .c100 .fill {
|
30 |
+
border-width: 4px;
|
31 |
}
|
32 |
|
33 |
+
.review-grade-widget .review-wu-grade-content .c100 .slice-center {
|
34 |
+
padding: 4px;
|
35 |
+
}
|
36 |
+
|
37 |
+
.cwp-popular-review {
|
38 |
+
display: table;
|
39 |
+
width: 100%;
|
40 |
+
margin: 0;
|
41 |
+
padding: 15px 0 !important;
|
42 |
+
border-bottom: 1px solid #ddd;
|
43 |
+
list-style: none;
|
44 |
}
|
45 |
|
46 |
.widget_cwp_top_products_widget ul,
|
62 |
border: none!important;
|
63 |
}
|
64 |
|
65 |
+
.widget_cwp_top_products_widget {
|
66 |
+
overflow: hidden;
|
|
|
67 |
}
|
68 |
|
69 |
+
.cwp-popular-review .wppr-col {
|
70 |
+
display: table-cell;
|
71 |
+
width: auto;
|
72 |
+
vertical-align: middle;
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
+
.cwp-popular-review .wppr-post-title {
|
76 |
+
padding: 0 15px;
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
+
.cwp-popular-review .wppr-post-title.wppr-no-image {
|
80 |
+
padding-left: 0;
|
|
|
81 |
}
|
82 |
|
83 |
+
.cwp-popular-review .cwp_rev_image {
|
84 |
+
width: 50px;
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
|
87 |
+
.cwp-popular-review .review-grade-widget {
|
88 |
+
width: 40px;
|
89 |
}
|
assets/css/dashboard_styles.css
CHANGED
@@ -140,7 +140,6 @@ img.theme_options_logo {
|
|
140 |
margin-top: -250px;
|
141 |
margin-left: -300px;
|
142 |
background: #fff;
|
143 |
-
-webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
144 |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
145 |
}
|
146 |
|
@@ -238,7 +237,6 @@ img.theme_options_logo {
|
|
238 |
background-image: -webkit-gradient( linear, left bottom, left top, from(#7fbf4d), to(#63a62f));
|
239 |
background-image: -webkit-linear-gradient( bottom, #7fbf4d, #63a62f);
|
240 |
background-image: linear-gradient( to top, #7fbf4d, #63a62f);
|
241 |
-
-webkit-box-shadow: inset 0 1px 0 0 #96ca6d;
|
242 |
box-shadow: inset 0 1px 0 0 #96ca6d;
|
243 |
text-shadow: 0 -1px 0 #4c9021;
|
244 |
font: bold 20px/1;
|
@@ -253,7 +251,6 @@ img.theme_options_logo {
|
|
253 |
background-image: -webkit-gradient( linear, left bottom, left top, from(#76b347), to(#5e9e2e));
|
254 |
background-image: -webkit-linear-gradient( bottom, #76b347, #5e9e2e);
|
255 |
background-image: linear-gradient( to top, #76b347, #5e9e2e);
|
256 |
-
-webkit-box-shadow: inset 0 1px 0 0 #8dbf67;
|
257 |
box-shadow: inset 0 1px 0 0 #8dbf67;
|
258 |
cursor: pointer;
|
259 |
}
|
@@ -324,7 +321,6 @@ a.preload_info_upsell {
|
|
324 |
background-image: -webkit-gradient(linear, left bottom, left top, from(#7fbf4d), to(#63a62f));
|
325 |
background-image: -webkit-linear-gradient(bottom, #7fbf4d, #63a62f);
|
326 |
background-image: linear-gradient(to top, #7fbf4d, #63a62f);
|
327 |
-
-webkit-box-shadow: inset 0 1px 0 0 #96ca6d;
|
328 |
box-shadow: inset 0 1px 0 0 #96ca6d;
|
329 |
text-shadow: 0 -1px 0 #4c9021;
|
330 |
font: bold 20px/1;
|
@@ -342,7 +338,6 @@ a.preload_info_upsell:hover {
|
|
342 |
background-image: -webkit-gradient(linear, left bottom, left top, from(#76b347), to(#5e9e2e));
|
343 |
background-image: -webkit-linear-gradient(bottom, #76b347, #5e9e2e);
|
344 |
background-image: linear-gradient(to top, #76b347, #5e9e2e);
|
345 |
-
-webkit-box-shadow: inset 0 1px 0 0 #8dbf67;
|
346 |
box-shadow: inset 0 1px 0 0 #8dbf67;
|
347 |
cursor: pointer;
|
348 |
}
|
@@ -365,7 +360,6 @@ a.preload_info_upsell:hover {
|
|
365 |
padding: 20px;
|
366 |
border-radius: 3px;
|
367 |
background: #fff;
|
368 |
-
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
369 |
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
370 |
}
|
371 |
|
140 |
margin-top: -250px;
|
141 |
margin-left: -300px;
|
142 |
background: #fff;
|
|
|
143 |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
144 |
}
|
145 |
|
237 |
background-image: -webkit-gradient( linear, left bottom, left top, from(#7fbf4d), to(#63a62f));
|
238 |
background-image: -webkit-linear-gradient( bottom, #7fbf4d, #63a62f);
|
239 |
background-image: linear-gradient( to top, #7fbf4d, #63a62f);
|
|
|
240 |
box-shadow: inset 0 1px 0 0 #96ca6d;
|
241 |
text-shadow: 0 -1px 0 #4c9021;
|
242 |
font: bold 20px/1;
|
251 |
background-image: -webkit-gradient( linear, left bottom, left top, from(#76b347), to(#5e9e2e));
|
252 |
background-image: -webkit-linear-gradient( bottom, #76b347, #5e9e2e);
|
253 |
background-image: linear-gradient( to top, #76b347, #5e9e2e);
|
|
|
254 |
box-shadow: inset 0 1px 0 0 #8dbf67;
|
255 |
cursor: pointer;
|
256 |
}
|
321 |
background-image: -webkit-gradient(linear, left bottom, left top, from(#7fbf4d), to(#63a62f));
|
322 |
background-image: -webkit-linear-gradient(bottom, #7fbf4d, #63a62f);
|
323 |
background-image: linear-gradient(to top, #7fbf4d, #63a62f);
|
|
|
324 |
box-shadow: inset 0 1px 0 0 #96ca6d;
|
325 |
text-shadow: 0 -1px 0 #4c9021;
|
326 |
font: bold 20px/1;
|
338 |
background-image: -webkit-gradient(linear, left bottom, left top, from(#76b347), to(#5e9e2e));
|
339 |
background-image: -webkit-linear-gradient(bottom, #76b347, #5e9e2e);
|
340 |
background-image: linear-gradient(to top, #76b347, #5e9e2e);
|
|
|
341 |
box-shadow: inset 0 1px 0 0 #8dbf67;
|
342 |
cursor: pointer;
|
343 |
}
|
360 |
padding: 20px;
|
361 |
border-radius: 3px;
|
362 |
background: #fff;
|
|
|
363 |
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
364 |
}
|
365 |
|
assets/css/frontpage.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 3.
|
3 |
*/
|
4 |
#review-statistics {
|
5 |
width: 100%;
|
@@ -7,6 +7,10 @@
|
|
7 |
font-family: FontAwesome;
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
10 |
.cwp-item-price {
|
11 |
float: right;
|
12 |
font-family: "Lato", Helvetica, sans-serif;
|
@@ -151,8 +155,6 @@
|
|
151 |
|
152 |
#review-statistics .review-wrap-up {
|
153 |
margin-top: 20px;
|
154 |
-
border: 1px solid #e6e6e6;
|
155 |
-
border-top: none;
|
156 |
}
|
157 |
|
158 |
#review-statistics .review-wu-bars h3,
|
@@ -178,12 +180,9 @@
|
|
178 |
|
179 |
#review-statistics .review-wu-bars {
|
180 |
float: left;
|
181 |
-
width:
|
182 |
-
padding:
|
183 |
border-top: 1px solid #e6e6e6;
|
184 |
-
border-right: 1px solid #e6e6e6;
|
185 |
-
border-bottom: none;
|
186 |
-
border-left: none;
|
187 |
}
|
188 |
|
189 |
#review-statistics .review-wu-bars ul {
|
@@ -216,6 +215,17 @@
|
|
216 |
text-align: center;
|
217 |
}
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
#review-statistics .rev-option.customBarIcon h3,
|
220 |
#review-statistics .rev-option.customBarIcon span {
|
221 |
padding: 0 4px;
|
@@ -232,7 +242,16 @@
|
|
232 |
#review-statistics .review-wrap-up .cwpr-review-top {
|
233 |
padding: 20px;
|
234 |
border-top: 5px solid #3baeda;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
border-bottom: 1px solid #e6e6e6;
|
|
|
236 |
}
|
237 |
|
238 |
#review-statistics .review-wrap-up .cwpr-review-top .cwp-item {
|
@@ -265,9 +284,15 @@
|
|
265 |
}
|
266 |
|
267 |
#review-statistics .review-wrap-up .review-wu-left {
|
268 |
-
|
269 |
-
width:
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
273 |
.wppr-review-container.wppr-review-no-pros.wppr-review-no-cons #review-statistics .review-wrap-up .review-wu-left {
|
@@ -275,34 +300,42 @@
|
|
275 |
}
|
276 |
|
277 |
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image {
|
278 |
-
|
279 |
overflow: hidden;
|
280 |
-
width:
|
281 |
-
|
282 |
-
|
283 |
-
padding: 0;
|
284 |
-
border-top: none;
|
285 |
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
286 |
}
|
287 |
|
288 |
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image img {
|
|
|
289 |
width: 100%;
|
290 |
height: auto;
|
291 |
-
-webkit-box-shadow: none;
|
292 |
box-shadow: none;
|
293 |
}
|
294 |
|
295 |
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
display: block;
|
297 |
-
float: left;
|
298 |
position: relative;
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
border: 1px solid #e6e6e6;
|
303 |
-
border-top: none;
|
304 |
-
border-bottom: none;
|
305 |
-
text-align: center;
|
306 |
}
|
307 |
|
308 |
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart {
|
@@ -317,10 +350,12 @@
|
|
317 |
}
|
318 |
|
319 |
#review-statistics .review-wrap-up .review-wu-right {
|
320 |
-
|
321 |
-
width:
|
322 |
-
|
323 |
-
|
|
|
|
|
324 |
}
|
325 |
|
326 |
#review-statistics .review-wrap-up .review-wu-right h2 {
|
@@ -365,13 +400,6 @@
|
|
365 |
padding-left: 0 !important;
|
366 |
}
|
367 |
|
368 |
-
.review-wu-bars,
|
369 |
-
.review-wu-right {
|
370 |
-
-webkit-box-sizing: content-box !important;
|
371 |
-
box-sizing: content-box !important;
|
372 |
-
text-align: left;
|
373 |
-
}
|
374 |
-
|
375 |
#review-statistics .rev-option {
|
376 |
margin-top: 10px;
|
377 |
}
|
@@ -460,7 +488,6 @@
|
|
460 |
margin-top: 5px !important;
|
461 |
border: none;
|
462 |
background: #f3f3f3;
|
463 |
-
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
|
464 |
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
|
465 |
}
|
466 |
|
@@ -475,7 +502,6 @@
|
|
475 |
}
|
476 |
|
477 |
#wppr-slider-comment .wppr-comment-form-meta .wppr-comment-meta-slider .ui-slider-handle:hover {
|
478 |
-
-webkit-box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.3);
|
479 |
box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.3);
|
480 |
cursor: pointer;
|
481 |
}
|
@@ -534,7 +560,6 @@
|
|
534 |
height: 5px;
|
535 |
border-radius: 32px;
|
536 |
background: #ebedef;
|
537 |
-
-webkit-box-shadow: none;
|
538 |
box-shadow: none;
|
539 |
}
|
540 |
|
@@ -565,7 +590,6 @@
|
|
565 |
height: 5px;
|
566 |
border-radius: 32px;
|
567 |
background: #ebedef;
|
568 |
-
-webkit-box-shadow: none;
|
569 |
box-shadow: none;
|
570 |
}
|
571 |
|
@@ -606,33 +630,36 @@
|
|
606 |
}
|
607 |
}
|
608 |
|
609 |
-
@media (
|
610 |
-
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image,
|
611 |
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
|
612 |
-
|
613 |
}
|
614 |
|
615 |
-
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade
|
616 |
-
|
|
|
617 |
}
|
618 |
|
619 |
-
#review-statistics .review-
|
620 |
-
font-size:
|
621 |
}
|
622 |
-
}
|
623 |
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
height: 130px;
|
628 |
}
|
|
|
629 |
|
630 |
-
|
631 |
-
|
|
|
|
|
|
|
|
|
632 |
}
|
633 |
|
634 |
-
#review-statistics .review-wrap-up .review-wu-
|
635 |
-
|
636 |
}
|
637 |
}
|
638 |
|
1 |
/*
|
2 |
+
Version: 3.2.0
|
3 |
*/
|
4 |
#review-statistics {
|
5 |
width: 100%;
|
7 |
font-family: FontAwesome;
|
8 |
}
|
9 |
|
10 |
+
#review-statistics div {
|
11 |
+
box-sizing: border-box;
|
12 |
+
}
|
13 |
+
|
14 |
.cwp-item-price {
|
15 |
float: right;
|
16 |
font-family: "Lato", Helvetica, sans-serif;
|
155 |
|
156 |
#review-statistics .review-wrap-up {
|
157 |
margin-top: 20px;
|
|
|
|
|
158 |
}
|
159 |
|
160 |
#review-statistics .review-wu-bars h3,
|
180 |
|
181 |
#review-statistics .review-wu-bars {
|
182 |
float: left;
|
183 |
+
width: 100%;
|
184 |
+
padding: 15px;
|
185 |
border-top: 1px solid #e6e6e6;
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
#review-statistics .review-wu-bars ul {
|
215 |
text-align: center;
|
216 |
}
|
217 |
|
218 |
+
#review-statistics .review-wu-bars ul.wppr-custom-icon li {
|
219 |
+
display: inline-block;
|
220 |
+
height: auto;
|
221 |
+
background: transparent !important;
|
222 |
+
font-family: FontAwesome;
|
223 |
+
font-size: 22px;
|
224 |
+
-webkit-font-smoothing: antialiased;
|
225 |
+
text-align: center;
|
226 |
+
text-rendering: auto;
|
227 |
+
}
|
228 |
+
|
229 |
#review-statistics .rev-option.customBarIcon h3,
|
230 |
#review-statistics .rev-option.customBarIcon span {
|
231 |
padding: 0 4px;
|
242 |
#review-statistics .review-wrap-up .cwpr-review-top {
|
243 |
padding: 20px;
|
244 |
border-top: 5px solid #3baeda;
|
245 |
+
border-right: 1px solid #e6e6e6;
|
246 |
+
border-left: 1px solid #e6e6e6;
|
247 |
+
}
|
248 |
+
|
249 |
+
#review-statistics .review-wrap-up .review-wu-content {
|
250 |
+
display: table;
|
251 |
+
width: 100%;
|
252 |
+
border-top: 1px solid #e6e6e6;
|
253 |
border-bottom: 1px solid #e6e6e6;
|
254 |
+
border-left: 1px solid #e6e6e6;
|
255 |
}
|
256 |
|
257 |
#review-statistics .review-wrap-up .cwpr-review-top .cwp-item {
|
284 |
}
|
285 |
|
286 |
#review-statistics .review-wrap-up .review-wu-left {
|
287 |
+
display: table-cell;
|
288 |
+
width: 50%;
|
289 |
+
border-right: 1px solid #e6e6e6;
|
290 |
+
vertical-align: top;
|
291 |
+
}
|
292 |
+
|
293 |
+
#review-statistics .review-wrap-up .review-wu-left-top {
|
294 |
+
display: table;
|
295 |
+
width: 100%;
|
296 |
}
|
297 |
|
298 |
.wppr-review-container.wppr-review-no-pros.wppr-review-no-cons #review-statistics .review-wrap-up .review-wu-left {
|
300 |
}
|
301 |
|
302 |
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image {
|
303 |
+
display: table-cell;
|
304 |
overflow: hidden;
|
305 |
+
width: auto;
|
306 |
+
padding: 15px;
|
307 |
+
border-right: 1px solid #e6e6e6;
|
|
|
|
|
308 |
text-align: center;
|
309 |
+
vertical-align: middle;
|
310 |
+
}
|
311 |
+
|
312 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image a {
|
313 |
+
display: inline-block;
|
314 |
}
|
315 |
|
316 |
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image img {
|
317 |
+
display: inline-block;
|
318 |
width: 100%;
|
319 |
height: auto;
|
|
|
320 |
box-shadow: none;
|
321 |
}
|
322 |
|
323 |
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
|
324 |
+
display: table-cell;
|
325 |
+
width: auto;
|
326 |
+
min-width: 120px;
|
327 |
+
max-width: 50%;
|
328 |
+
padding: 15px;
|
329 |
+
text-align: center;
|
330 |
+
vertical-align: middle;
|
331 |
+
}
|
332 |
+
|
333 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade-content {
|
334 |
display: block;
|
|
|
335 |
position: relative;
|
336 |
+
width: 120px;
|
337 |
+
height: 120px;
|
338 |
+
margin: 0 auto;
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
|
341 |
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart {
|
350 |
}
|
351 |
|
352 |
#review-statistics .review-wrap-up .review-wu-right {
|
353 |
+
display: table-cell;
|
354 |
+
width: 50%;
|
355 |
+
height: 100%;
|
356 |
+
padding: 15px;
|
357 |
+
border-right: 1px solid #e6e6e6;
|
358 |
+
vertical-align: top;
|
359 |
}
|
360 |
|
361 |
#review-statistics .review-wrap-up .review-wu-right h2 {
|
400 |
padding-left: 0 !important;
|
401 |
}
|
402 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
#review-statistics .rev-option {
|
404 |
margin-top: 10px;
|
405 |
}
|
488 |
margin-top: 5px !important;
|
489 |
border: none;
|
490 |
background: #f3f3f3;
|
|
|
491 |
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
|
492 |
}
|
493 |
|
502 |
}
|
503 |
|
504 |
#wppr-slider-comment .wppr-comment-form-meta .wppr-comment-meta-slider .ui-slider-handle:hover {
|
|
|
505 |
box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.3);
|
506 |
cursor: pointer;
|
507 |
}
|
560 |
height: 5px;
|
561 |
border-radius: 32px;
|
562 |
background: #ebedef;
|
|
|
563 |
box-shadow: none;
|
564 |
}
|
565 |
|
590 |
height: 5px;
|
591 |
border-radius: 32px;
|
592 |
background: #ebedef;
|
|
|
593 |
box-shadow: none;
|
594 |
}
|
595 |
|
630 |
}
|
631 |
}
|
632 |
|
633 |
+
@media (max-width: 480px) {
|
|
|
634 |
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
|
635 |
+
width: 100px;
|
636 |
}
|
637 |
|
638 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade-content {
|
639 |
+
width: 100px;
|
640 |
+
height: 100px;
|
641 |
}
|
642 |
|
643 |
+
#review-statistics .review-wu-grade .c100 {
|
644 |
+
font-size: 100px;
|
645 |
}
|
|
|
646 |
|
647 |
+
#review-statistics .review-wu-grade .c100 span {
|
648 |
+
font-size: 28px;
|
649 |
+
line-height: 100px;
|
|
|
650 |
}
|
651 |
+
}
|
652 |
|
653 |
+
@media (max-width: 768px) {
|
654 |
+
#review-statistics .review-wrap-up .review-wu-left,
|
655 |
+
#review-statistics .review-wrap-up .review-wu-right {
|
656 |
+
display: block;
|
657 |
+
float: left;
|
658 |
+
width: 100%;
|
659 |
}
|
660 |
|
661 |
+
#review-statistics .review-wrap-up .review-wu-right {
|
662 |
+
border-top: 1px solid #e6e6e6;
|
663 |
}
|
664 |
}
|
665 |
|
assets/css/jquery-ui.css
CHANGED
@@ -940,7 +940,6 @@ button.ui-button::-moz-focus-inner {
|
|
940 |
z-index: 9999;
|
941 |
max-width: 300px;
|
942 |
padding: 8px;
|
943 |
-
-webkit-box-shadow: 0 0 5px #aaa;
|
944 |
box-shadow: 0 0 5px #aaa;
|
945 |
}
|
946 |
|
940 |
z-index: 9999;
|
941 |
max-width: 300px;
|
942 |
padding: 8px;
|
|
|
943 |
box-shadow: 0 0 5px #aaa;
|
944 |
}
|
945 |
|
assets/css/pro_dashboard_styles.css
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
.cwp-cta {
|
2 |
-
display: none!important;
|
3 |
-
}
|
4 |
-
|
5 |
-
.cwp_addons_wrap .announcement {
|
6 |
-
display: none;
|
7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/upsell.css
CHANGED
@@ -42,7 +42,6 @@
|
|
42 |
|
43 |
#wppr-admin .slogan a:focus {
|
44 |
outline: none;
|
45 |
-
-webkit-box-shadow: none;
|
46 |
box-shadow: none;
|
47 |
}
|
48 |
|
@@ -82,8 +81,6 @@
|
|
82 |
#wppr-admin .pro-feature {
|
83 |
display: block;
|
84 |
margin: 10px;
|
85 |
-
background-color: #fff;
|
86 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
|
87 |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
|
88 |
}
|
89 |
|
@@ -95,7 +92,6 @@
|
|
95 |
}
|
96 |
|
97 |
#wppr-admin .pro-feature .pro-feature-features {
|
98 |
-
-webkit-box-sizing: border-box;
|
99 |
box-sizing: border-box;
|
100 |
padding: 30px;
|
101 |
}
|
@@ -174,3 +170,8 @@
|
|
174 |
width: 100%;
|
175 |
}
|
176 |
}
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
#wppr-admin .slogan a:focus {
|
44 |
outline: none;
|
|
|
45 |
box-shadow: none;
|
46 |
}
|
47 |
|
81 |
#wppr-admin .pro-feature {
|
82 |
display: block;
|
83 |
margin: 10px;
|
|
|
|
|
84 |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
|
85 |
}
|
86 |
|
92 |
}
|
93 |
|
94 |
#wppr-admin .pro-feature .pro-feature-features {
|
|
|
95 |
box-sizing: border-box;
|
96 |
padding: 30px;
|
97 |
}
|
170 |
width: 100%;
|
171 |
}
|
172 |
}
|
173 |
+
#wppr-admin .pro-feature .pro-feature-inner{
|
174 |
+
display: table;
|
175 |
+
background: #fff;
|
176 |
+
width:100%;
|
177 |
+
}
|
assets/img/chosen-sprite.png
ADDED
Binary file
|
assets/img/chosen-sprite@2x.png
ADDED
Binary file
|
assets/js/chosen.jquery.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
|
2 |
+
(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
|
assets/js/main.js
CHANGED
@@ -4,100 +4,6 @@
|
|
4 |
*/
|
5 |
jQuery(document).ready(function ($) {
|
6 |
|
7 |
-
var initPieChart = function () {
|
8 |
-
returnColor = function (percent) {
|
9 |
-
if (percent > 0 && percent <= 25) {
|
10 |
-
return c1;
|
11 |
-
} else if (percent > 25 && percent <= 50) {
|
12 |
-
return c2;
|
13 |
-
} else if (percent > 50 && percent <= 75) {
|
14 |
-
return c3;
|
15 |
-
} else if (percent > 75) {
|
16 |
-
return c4;
|
17 |
-
}
|
18 |
-
};
|
19 |
-
if (typeof trackcolor !== 'undefined') {
|
20 |
-
trackColorRight = trackcolor.toUpperCase();
|
21 |
-
} else {
|
22 |
-
trackColorRight = '#ebebeb';
|
23 |
-
}
|
24 |
-
jQuery('.review-wu-grade, .review-grade-widget').each(function () {
|
25 |
-
var box = $(this);
|
26 |
-
var rating = box.find('.cwp-review-percentage');
|
27 |
-
var box_width = rating.attr('data-box-size');;
|
28 |
-
box_width = parseInt(box_width);
|
29 |
-
if (isNaN(box_width)) {
|
30 |
-
var p_image_width = box.closest('.review-wrap-up').find('.rev-wu-image').width();
|
31 |
-
if (p_image_width == 0 || p_image_width == null) {
|
32 |
-
p_image_width = 50;
|
33 |
-
}
|
34 |
-
box_width = p_image_width;
|
35 |
-
}
|
36 |
-
var line_width = 15 * Math.min(box_width, 150) / 140;
|
37 |
-
box_width = Math.min(box_width, 150) * 0.8;
|
38 |
-
rating.cwp_easyPieChart({
|
39 |
-
barColor: function (percent) {
|
40 |
-
return returnColor(percent);
|
41 |
-
},
|
42 |
-
trackColor: trackColorRight,
|
43 |
-
scaleColor: false,
|
44 |
-
lineCap: 'butt',
|
45 |
-
rotate: 0,
|
46 |
-
lineWidth: line_width,
|
47 |
-
animate: 1,
|
48 |
-
size: box_width,
|
49 |
-
onStep: function (value) {
|
50 |
-
var c = returnColor(value);
|
51 |
-
|
52 |
-
this.$el.find('span').text(~~value / 10);
|
53 |
-
this.$el.find('span').css({
|
54 |
-
color: c
|
55 |
-
});
|
56 |
-
}
|
57 |
-
});
|
58 |
-
});
|
59 |
-
};
|
60 |
-
|
61 |
-
initPieChart();
|
62 |
-
|
63 |
-
function wuReview() {
|
64 |
-
|
65 |
-
if (!(typeof(cwpCustomBarIcon) === "undefined") && !(cwpCustomBarIcon === "") && isSetToPro) {
|
66 |
-
$(".rev-option").each(function () {
|
67 |
-
var grade = $(this).attr("data-value");
|
68 |
-
$(this).addClass("customBarIcon");
|
69 |
-
var x = 10;
|
70 |
-
if ($(this).children("ul").find("li").length == 0) {
|
71 |
-
for (var i = 0; i < x; i++) {
|
72 |
-
$(this).children("ul").append("<li><i class='fa fa-fw'>&" + cwpCustomBarIcon + "</i></li>");
|
73 |
-
}
|
74 |
-
}
|
75 |
-
$(this).children("ul").children("li:nth-child(-n+" + Math.ceil(grade / 10) + ")").css("color", returnColor(grade));
|
76 |
-
$(this).children("div").children("span").text(grade / 10 + "/10");
|
77 |
-
});
|
78 |
-
} else {
|
79 |
-
$(".rev-option").each(function () {
|
80 |
-
var grade = $(this).attr("data-value");
|
81 |
-
var x = 10;
|
82 |
-
if ($(this).children("ul").find("li").length == 0) {
|
83 |
-
for (var i = 0; i < x; i++) {
|
84 |
-
$(this).children("ul").append("<li style='margin-right: 2%;'></li>");
|
85 |
-
}
|
86 |
-
}
|
87 |
-
$(this).children("ul").children("li:nth-child(-n+" + Math.ceil(grade / 10) + ")").css("background", returnColor(grade));
|
88 |
-
$(this).children("div").children("span").text(grade / 10 + "/10");
|
89 |
-
});
|
90 |
-
}
|
91 |
-
|
92 |
-
}
|
93 |
-
|
94 |
-
$(".comment-meta-option .comment-meta-grade").each(function () {
|
95 |
-
var theBarWidth = (100 * parseFloat($(this).css('width')) / parseFloat($(this).parent().css('width')));
|
96 |
-
$(this).css("background", returnColor(theBarWidth));
|
97 |
-
});
|
98 |
-
|
99 |
-
wuReview();
|
100 |
-
|
101 |
$(".wppr-comment-meta-slider").each(function () {
|
102 |
var comm_meta_input = $(this).parent(".wppr-comment-form-meta").children("input");
|
103 |
$(this).slider({
|
4 |
*/
|
5 |
jQuery(document).ready(function ($) {
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
$(".wppr-comment-meta-slider").each(function () {
|
8 |
var comm_meta_input = $(this).parent(".wppr-comment-form-meta").children("input");
|
9 |
$(this).slider({
|
assets/js/pie-chart.js
DELETED
@@ -1,401 +0,0 @@
|
|
1 |
-
/* jshint ignore:start */
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Easy pie chart is a jquery plugin to display simple animated pie charts for only one value
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
Dual licensed under the MIT (http:
|
10 |
-
|
11 |
-
and GPL (http:
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
Built on top of the jQuery library (http:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
@source: http:
|
20 |
-
|
21 |
-
@autor: Robert Fleischmann
|
22 |
-
|
23 |
-
@version: 1.2.5
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
Inspired by: http:
|
28 |
-
|
29 |
-
Thanks to Philip Thrasher for the jquery plugin boilerplate for coffee script
|
30 |
-
|
31 |
-
*/
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
(function($) {
|
36 |
-
|
37 |
-
$.cwp_easyPieChart = function(el, options) {
|
38 |
-
|
39 |
-
var addScaleLine, animateLine, drawLine, easeInOutQuad, rAF, renderBackground, renderScale, renderTrack,
|
40 |
-
|
41 |
-
_this = this;
|
42 |
-
|
43 |
-
this.el = el;
|
44 |
-
|
45 |
-
this.$el = $( el );
|
46 |
-
|
47 |
-
this.$el.data( "cwp_easyPieChart", this );
|
48 |
-
|
49 |
-
this.init = function() {
|
50 |
-
|
51 |
-
var percent, scaleBy;
|
52 |
-
|
53 |
-
_this.options = $.extend( {}, $.cwp_easyPieChart.defaultOptions, options );
|
54 |
-
|
55 |
-
percent = parseInt( _this.$el.data( 'percent' ), 10 );
|
56 |
-
|
57 |
-
_this.percentage = 0;
|
58 |
-
|
59 |
-
_this.canvas = $( "<canvas width='" + _this.options.size + "' height='" + _this.options.size + "'></canvas>" ).get( 0 );
|
60 |
-
|
61 |
-
_this.$el.append( _this.canvas );
|
62 |
-
|
63 |
-
if (typeof G_vmlCanvasManager !== "undefined" && G_vmlCanvasManager !== null) {
|
64 |
-
|
65 |
-
G_vmlCanvasManager.initElement( _this.canvas );
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
_this.ctx = _this.canvas.getContext( '2d' );
|
70 |
-
|
71 |
-
if (window.devicePixelRatio > 1) {
|
72 |
-
|
73 |
-
scaleBy = window.devicePixelRatio;
|
74 |
-
|
75 |
-
$( _this.canvas ).css({
|
76 |
-
|
77 |
-
width: _this.options.size,
|
78 |
-
|
79 |
-
height: _this.options.size
|
80 |
-
|
81 |
-
});
|
82 |
-
|
83 |
-
_this.canvas.width *= scaleBy;
|
84 |
-
|
85 |
-
_this.canvas.height *= scaleBy;
|
86 |
-
|
87 |
-
_this.ctx.scale( scaleBy, scaleBy );
|
88 |
-
|
89 |
-
_this.ctx.imageSmoothingEnabled = true;
|
90 |
-
|
91 |
-
}
|
92 |
-
|
93 |
-
_this.ctx.translate( _this.options.size / 2, _this.options.size / 2 );
|
94 |
-
|
95 |
-
_this.ctx.rotate( _this.options.rotate * Math.PI / 180 );
|
96 |
-
|
97 |
-
_this.$el.addClass( 'cwp_easyPieChart' );
|
98 |
-
|
99 |
-
_this.$el.css({
|
100 |
-
|
101 |
-
width: _this.options.size,
|
102 |
-
|
103 |
-
height: _this.options.size,
|
104 |
-
|
105 |
-
lineHeight: "" + _this.options.size + "px"
|
106 |
-
|
107 |
-
});
|
108 |
-
|
109 |
-
_this.update( percent );
|
110 |
-
|
111 |
-
return _this;
|
112 |
-
|
113 |
-
};
|
114 |
-
|
115 |
-
this.update = function(percent) {
|
116 |
-
|
117 |
-
percent = parseFloat( percent ) || 0;
|
118 |
-
|
119 |
-
if (_this.options.animate === false) {
|
120 |
-
|
121 |
-
drawLine( percent );
|
122 |
-
|
123 |
-
} else {
|
124 |
-
|
125 |
-
if (_this.options.delay) {
|
126 |
-
|
127 |
-
animateLine( _this.percentage, 0 );
|
128 |
-
|
129 |
-
setTimeout(function() {
|
130 |
-
|
131 |
-
return animateLine( _this.percentage, percent );
|
132 |
-
|
133 |
-
}, _this.options.delay);
|
134 |
-
|
135 |
-
} else {
|
136 |
-
|
137 |
-
animateLine( _this.percentage, percent );
|
138 |
-
|
139 |
-
}
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
return _this;
|
144 |
-
|
145 |
-
};
|
146 |
-
|
147 |
-
renderScale = function() {
|
148 |
-
|
149 |
-
var i, _i, _results;
|
150 |
-
|
151 |
-
_this.ctx.fillStyle = _this.options.scaleColor;
|
152 |
-
|
153 |
-
_this.ctx.lineWidth = 1;
|
154 |
-
|
155 |
-
_results = [];
|
156 |
-
|
157 |
-
for (i = _i = 0; _i <= 24; i = ++_i) {
|
158 |
-
|
159 |
-
_results.push( addScaleLine( i ) );
|
160 |
-
|
161 |
-
}
|
162 |
-
|
163 |
-
return _results;
|
164 |
-
|
165 |
-
};
|
166 |
-
|
167 |
-
addScaleLine = function(i) {
|
168 |
-
|
169 |
-
var offset;
|
170 |
-
|
171 |
-
offset = i % 6 === 0 ? 0 : _this.options.size * 0.017;
|
172 |
-
|
173 |
-
_this.ctx.save();
|
174 |
-
|
175 |
-
_this.ctx.rotate( i * Math.PI / 12 );
|
176 |
-
|
177 |
-
_this.ctx.fillRect( _this.options.size / 2 - offset, 0, -_this.options.size * 0.05 + offset, 1 );
|
178 |
-
|
179 |
-
_this.ctx.restore();
|
180 |
-
|
181 |
-
};
|
182 |
-
|
183 |
-
renderTrack = function() {
|
184 |
-
|
185 |
-
var offset;
|
186 |
-
|
187 |
-
offset = _this.options.size / 2 - _this.options.lineWidth / 2;
|
188 |
-
|
189 |
-
if (_this.options.scaleColor !== false) {
|
190 |
-
|
191 |
-
offset -= _this.options.size * 0.08;
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
_this.ctx.beginPath();
|
196 |
-
|
197 |
-
_this.ctx.arc( 0, 0, offset, 0, Math.PI * 2, true );
|
198 |
-
|
199 |
-
_this.ctx.closePath();
|
200 |
-
|
201 |
-
_this.ctx.strokeStyle = _this.options.trackColor;
|
202 |
-
|
203 |
-
_this.ctx.lineWidth = _this.options.lineWidth;
|
204 |
-
|
205 |
-
_this.ctx.stroke();
|
206 |
-
|
207 |
-
};
|
208 |
-
|
209 |
-
renderBackground = function() {
|
210 |
-
|
211 |
-
if (_this.options.scaleColor !== false) {
|
212 |
-
|
213 |
-
renderScale();
|
214 |
-
|
215 |
-
}
|
216 |
-
|
217 |
-
if (_this.options.trackColor !== false) {
|
218 |
-
|
219 |
-
renderTrack();
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
};
|
224 |
-
|
225 |
-
drawLine = function(percent) {
|
226 |
-
|
227 |
-
var offset;
|
228 |
-
|
229 |
-
renderBackground();
|
230 |
-
|
231 |
-
_this.ctx.strokeStyle = $.isFunction( _this.options.barColor ) ? _this.options.barColor( percent ) : _this.options.barColor;
|
232 |
-
|
233 |
-
_this.ctx.lineCap = _this.options.lineCap;
|
234 |
-
|
235 |
-
_this.ctx.lineWidth = _this.options.lineWidth;
|
236 |
-
|
237 |
-
offset = _this.options.size / 2 - _this.options.lineWidth / 2;
|
238 |
-
|
239 |
-
if (_this.options.scaleColor !== false) {
|
240 |
-
|
241 |
-
offset -= _this.options.size * 0.08;
|
242 |
-
|
243 |
-
}
|
244 |
-
|
245 |
-
_this.ctx.save();
|
246 |
-
|
247 |
-
_this.ctx.rotate( -Math.PI / 2 );
|
248 |
-
|
249 |
-
_this.ctx.beginPath();
|
250 |
-
|
251 |
-
_this.ctx.arc( 0, 0, offset, 0, Math.PI * 2 * percent / 100, false );
|
252 |
-
|
253 |
-
_this.ctx.stroke();
|
254 |
-
|
255 |
-
_this.ctx.restore();
|
256 |
-
|
257 |
-
};
|
258 |
-
|
259 |
-
rAF = (function() {
|
260 |
-
|
261 |
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
|
262 |
-
|
263 |
-
return window.setTimeout( callback, 1000 / 60 );
|
264 |
-
|
265 |
-
};
|
266 |
-
|
267 |
-
})();
|
268 |
-
|
269 |
-
animateLine = function(from, to) {
|
270 |
-
|
271 |
-
var anim, startTime;
|
272 |
-
|
273 |
-
_this.options.onStart.call( _this );
|
274 |
-
|
275 |
-
_this.percentage = to;
|
276 |
-
|
277 |
-
Date.now || (Date.now = function() {
|
278 |
-
|
279 |
-
return + (new Date);
|
280 |
-
|
281 |
-
});
|
282 |
-
|
283 |
-
startTime = Date.now();
|
284 |
-
|
285 |
-
anim = function() {
|
286 |
-
|
287 |
-
var currentValue, process;
|
288 |
-
|
289 |
-
process = Math.min( Date.now() - startTime, _this.options.animate );
|
290 |
-
|
291 |
-
_this.ctx.clearRect( -_this.options.size / 2, -_this.options.size / 2, _this.options.size, _this.options.size );
|
292 |
-
|
293 |
-
renderBackground.call( _this );
|
294 |
-
|
295 |
-
currentValue = [easeInOutQuad( process, from, to - from, _this.options.animate )];
|
296 |
-
|
297 |
-
_this.options.onStep.call( _this, currentValue );
|
298 |
-
|
299 |
-
drawLine.call( _this, currentValue );
|
300 |
-
|
301 |
-
if (process >= _this.options.animate) {
|
302 |
-
|
303 |
-
return _this.options.onStop.call( _this, currentValue, to );
|
304 |
-
|
305 |
-
} else {
|
306 |
-
|
307 |
-
return rAF( anim );
|
308 |
-
|
309 |
-
}
|
310 |
-
|
311 |
-
};
|
312 |
-
|
313 |
-
rAF( anim );
|
314 |
-
|
315 |
-
};
|
316 |
-
|
317 |
-
easeInOutQuad = function(t, b, c, d) {
|
318 |
-
|
319 |
-
var easeIn, easing;
|
320 |
-
|
321 |
-
easeIn = function(t) {
|
322 |
-
|
323 |
-
return Math.pow( t, 2 );
|
324 |
-
|
325 |
-
};
|
326 |
-
|
327 |
-
easing = function(t) {
|
328 |
-
|
329 |
-
if (t < 1) {
|
330 |
-
|
331 |
-
return easeIn( t );
|
332 |
-
|
333 |
-
} else {
|
334 |
-
|
335 |
-
return 2 - easeIn( (t / 2) * -2 + 2 );
|
336 |
-
|
337 |
-
}
|
338 |
-
|
339 |
-
};
|
340 |
-
|
341 |
-
t /= d / 2;
|
342 |
-
|
343 |
-
return c / 2 * easing( t ) + b;
|
344 |
-
|
345 |
-
};
|
346 |
-
|
347 |
-
return this.init();
|
348 |
-
|
349 |
-
};
|
350 |
-
|
351 |
-
$.cwp_easyPieChart.defaultOptions = {
|
352 |
-
|
353 |
-
barColor: '#ef1e25',
|
354 |
-
|
355 |
-
trackColor: '#f2f2f2',
|
356 |
-
|
357 |
-
scaleColor: '#dfe0e0',
|
358 |
-
|
359 |
-
lineCap: 'round',
|
360 |
-
|
361 |
-
rotate: 0,
|
362 |
-
|
363 |
-
size: 110,
|
364 |
-
|
365 |
-
lineWidth: 3,
|
366 |
-
|
367 |
-
animate: false,
|
368 |
-
|
369 |
-
delay: false,
|
370 |
-
|
371 |
-
onStart: $.noop,
|
372 |
-
|
373 |
-
onStop: $.noop,
|
374 |
-
|
375 |
-
onStep: $.noop
|
376 |
-
|
377 |
-
};
|
378 |
-
|
379 |
-
$.fn.cwp_easyPieChart = function(options) {
|
380 |
-
|
381 |
-
return $.each(this, function(i, el) {
|
382 |
-
|
383 |
-
var $el, instanceOptions;
|
384 |
-
|
385 |
-
$el = $( el );
|
386 |
-
|
387 |
-
if ( ! $el.data( 'cwp_easyPieChart' )) {
|
388 |
-
|
389 |
-
instanceOptions = $.extend( {}, options, $el.data() );
|
390 |
-
|
391 |
-
return $el.data( 'cwp_easyPieChart', new $.cwp_easyPieChart( el, instanceOptions ) );
|
392 |
-
|
393 |
-
}
|
394 |
-
|
395 |
-
});
|
396 |
-
|
397 |
-
};
|
398 |
-
|
399 |
-
return void 0;
|
400 |
-
|
401 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/widget-admin.js
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
/* jshint ignore:start */
|
2 |
(function ($, w) {
|
3 |
$(document).ready(function () {
|
|
|
|
|
|
|
|
|
4 |
var widget_selector = $('.widget');
|
5 |
if (widget_selector.length > 0) {
|
6 |
widget_selector.each(function () {
|
@@ -15,7 +19,83 @@
|
|
15 |
} else {
|
16 |
toggleCustomFields(true, "wpcontent");
|
17 |
}
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
function toggleCustomFields(deflt, widgetID) {
|
21 |
var val = getWidgetStyle(widgetID);
|
1 |
/* jshint ignore:start */
|
2 |
(function ($, w) {
|
3 |
$(document).ready(function () {
|
4 |
+
initAll();
|
5 |
+
});
|
6 |
+
|
7 |
+
function initAll() {
|
8 |
var widget_selector = $('.widget');
|
9 |
if (widget_selector.length > 0) {
|
10 |
widget_selector.each(function () {
|
19 |
} else {
|
20 |
toggleCustomFields(true, "wpcontent");
|
21 |
}
|
22 |
+
|
23 |
+
|
24 |
+
$('.wppr-range-slider').each(function(){
|
25 |
+
$(this).slider({
|
26 |
+
range : true,
|
27 |
+
step : 1,
|
28 |
+
min : parseInt($(this).attr('data-wppr-min')),
|
29 |
+
max : parseInt($(this).attr('data-wppr-max')),
|
30 |
+
values : JSON.parse('[' + $(this).attr('data-wppr-value') + ']'),
|
31 |
+
slide : function( event, ui ) {
|
32 |
+
var $desc = $('#' + $(this).attr('data-wppr-desc'));
|
33 |
+
$desc.find('input').val(ui.values[0] + ',' + ui.values[1]);
|
34 |
+
$desc.find('span.wppr-range-min').html(Math.abs(ui.values[0]));
|
35 |
+
$desc.find('span.wppr-range-max').html(Math.abs(ui.values[1]));
|
36 |
+
}
|
37 |
+
});
|
38 |
+
});
|
39 |
+
|
40 |
+
$(document).on('widget-updated widget-added', function (e, widget) {
|
41 |
+
initEvents(widget);
|
42 |
+
});
|
43 |
+
|
44 |
+
initEvents(null);
|
45 |
+
}
|
46 |
+
|
47 |
+
function initEvents(widget) {
|
48 |
+
if(widget){
|
49 |
+
widget.find( '.chosen-container' ).remove();
|
50 |
+
widget.find('select.wppr-chosen').chosen({
|
51 |
+
width : '100%',
|
52 |
+
search_contains : true
|
53 |
+
});
|
54 |
+
widget.find('.wppr-post-types').on('change', function(evt, params) {
|
55 |
+
get_categories(params, $(this), $('#' + $(this).attr('data-wppr-cat-combo')));
|
56 |
+
});
|
57 |
+
}else{
|
58 |
+
$('select.wppr-chosen').chosen({
|
59 |
+
width : '100%',
|
60 |
+
search_contains : true
|
61 |
+
});
|
62 |
+
$('.wppr-post-types').on('change', function(evt, params) {
|
63 |
+
get_categories(params, $(this), $('#' + $(this).attr('data-wppr-cat-combo')));
|
64 |
+
});
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
function get_categories(params, types, categories){
|
70 |
+
if(params.selected){
|
71 |
+
$('.wppr-cat-spinner').css('visibility', 'visible').show();
|
72 |
+
$.ajax({
|
73 |
+
url : ajaxurl,
|
74 |
+
method : 'post',
|
75 |
+
data : {
|
76 |
+
action : 'get_categories',
|
77 |
+
nonce : w.ajax.nonce,
|
78 |
+
type : params.selected
|
79 |
+
},
|
80 |
+
success : function(data){
|
81 |
+
if(data.data.categories){
|
82 |
+
var $group = '<optgroup label="' + types.find('option[value="' + params.selected + '"]').text() + '">';
|
83 |
+
$.each(data.data.categories, function(slug, name){
|
84 |
+
$group += '<option value="' + slug + '">' + name + '</option>';
|
85 |
+
});
|
86 |
+
$group += '</optgroup>';
|
87 |
+
categories.append($group);
|
88 |
+
categories.trigger("chosen:updated");
|
89 |
+
}
|
90 |
+
$('.wppr-cat-spinner').css('visibility', 'hidden').hide();
|
91 |
+
}
|
92 |
+
});
|
93 |
+
}else{
|
94 |
+
categories.find('optgroup[label="' + types.find('option[value="' + params.deselected + '"]').text() + '"]').remove();
|
95 |
+
categories.trigger("chosen:updated");
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
|
100 |
function toggleCustomFields(deflt, widgetID) {
|
101 |
var val = getWidgetStyle(widgetID);
|
class-wppr-autoloader.php
CHANGED
@@ -70,24 +70,6 @@ class WPPR_Autoloader {
|
|
70 |
*/
|
71 |
protected static $file_iterator = null;
|
72 |
|
73 |
-
/**
|
74 |
-
* Method to check in allowed namespaces.
|
75 |
-
*
|
76 |
-
* @since 3.0.0
|
77 |
-
* @access protected
|
78 |
-
* @param string $class_name the class name to check with the namespaces.
|
79 |
-
* @return bool
|
80 |
-
*/
|
81 |
-
protected static function check_namespaces( $class_name ) {
|
82 |
-
$found = false;
|
83 |
-
foreach ( static::$namespaces as $namespace ) {
|
84 |
-
if ( substr( $class_name, 0, strlen( $namespace ) ) == $namespace ) {
|
85 |
-
$found = true;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
return $found;
|
89 |
-
}
|
90 |
-
|
91 |
/**
|
92 |
* Autoload function for registration with spl_autoload_register
|
93 |
*
|
@@ -96,7 +78,9 @@ class WPPR_Autoloader {
|
|
96 |
*
|
97 |
* @since 3.0.0
|
98 |
* @access public
|
|
|
99 |
* @param string $class_name The class name requested.
|
|
|
100 |
* @return mixed
|
101 |
*/
|
102 |
public static function loader( $class_name ) {
|
@@ -111,8 +95,8 @@ class WPPR_Autoloader {
|
|
111 |
$directory = new RecursiveDirectoryIterator( static::$path_top . DIRECTORY_SEPARATOR . 'includes', RecursiveDirectoryIterator::SKIP_DOTS );
|
112 |
|
113 |
if ( is_null( static::$file_iterator ) ) {
|
114 |
-
$Iterator
|
115 |
-
$Regex
|
116 |
static::$file_iterator = iterator_to_array( $Regex, false );
|
117 |
}
|
118 |
|
@@ -120,16 +104,39 @@ class WPPR_Autoloader {
|
|
120 |
foreach ( static::$file_iterator as $file ) {
|
121 |
if ( strtolower( $file->getFileName() ) === strtolower( $filename ) && is_readable( $file->getPathName() ) ) {
|
122 |
require( $file->getPathName() );
|
|
|
123 |
return true;
|
124 |
}
|
125 |
}
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
/**
|
129 |
* Sets the $file_ext property
|
130 |
*
|
131 |
* @since 3.0.0
|
132 |
* @access public
|
|
|
133 |
* @param string $file_ext The file extension used for class files. Default is "php".
|
134 |
*/
|
135 |
public static function set_file_ext( $file_ext ) {
|
@@ -141,6 +148,7 @@ class WPPR_Autoloader {
|
|
141 |
*
|
142 |
* @since 3.0.0
|
143 |
* @access public
|
|
|
144 |
* @param string $path The path representing the top level where recursion should
|
145 |
* begin for plugins. Defaults to empty ( does not look in plugins ).
|
146 |
*/
|
@@ -153,6 +161,7 @@ class WPPR_Autoloader {
|
|
153 |
*
|
154 |
* @since 3.0.0
|
155 |
* @access public
|
|
|
156 |
* @param string $path The path representing the top level where recursion should
|
157 |
* begin. Defaults to the current directory.
|
158 |
*/
|
@@ -165,6 +174,7 @@ class WPPR_Autoloader {
|
|
165 |
*
|
166 |
* @since 3.0.0
|
167 |
* @access public
|
|
|
168 |
* @param string $file_name The file name to exclude from autoload.
|
169 |
*/
|
170 |
public static function exclude_file( $file_name ) {
|
@@ -176,6 +186,7 @@ class WPPR_Autoloader {
|
|
176 |
*
|
177 |
* @since 3.0.0
|
178 |
* @access public
|
|
|
179 |
* @param array $namespaces The namespaces to use.
|
180 |
*/
|
181 |
public static function define_namespaces( $namespaces = array() ) {
|
70 |
*/
|
71 |
protected static $file_iterator = null;
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
/**
|
74 |
* Autoload function for registration with spl_autoload_register
|
75 |
*
|
78 |
*
|
79 |
* @since 3.0.0
|
80 |
* @access public
|
81 |
+
*
|
82 |
* @param string $class_name The class name requested.
|
83 |
+
*
|
84 |
* @return mixed
|
85 |
*/
|
86 |
public static function loader( $class_name ) {
|
95 |
$directory = new RecursiveDirectoryIterator( static::$path_top . DIRECTORY_SEPARATOR . 'includes', RecursiveDirectoryIterator::SKIP_DOTS );
|
96 |
|
97 |
if ( is_null( static::$file_iterator ) ) {
|
98 |
+
$Iterator = new RecursiveIteratorIterator( $directory );
|
99 |
+
$Regex = new RegexIterator( $Iterator, '/^.+\.php$/i', RecursiveRegexIterator::MATCH );
|
100 |
static::$file_iterator = iterator_to_array( $Regex, false );
|
101 |
}
|
102 |
|
104 |
foreach ( static::$file_iterator as $file ) {
|
105 |
if ( strtolower( $file->getFileName() ) === strtolower( $filename ) && is_readable( $file->getPathName() ) ) {
|
106 |
require( $file->getPathName() );
|
107 |
+
|
108 |
return true;
|
109 |
}
|
110 |
}
|
111 |
}
|
112 |
|
113 |
+
/**
|
114 |
+
* Method to check in allowed namespaces.
|
115 |
+
*
|
116 |
+
* @since 3.0.0
|
117 |
+
* @access protected
|
118 |
+
*
|
119 |
+
* @param string $class_name the class name to check with the namespaces.
|
120 |
+
*
|
121 |
+
* @return bool
|
122 |
+
*/
|
123 |
+
protected static function check_namespaces( $class_name ) {
|
124 |
+
$found = false;
|
125 |
+
foreach ( static::$namespaces as $namespace ) {
|
126 |
+
if ( substr( $class_name, 0, strlen( $namespace ) ) == $namespace ) {
|
127 |
+
$found = true;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
return $found;
|
132 |
+
}
|
133 |
+
|
134 |
/**
|
135 |
* Sets the $file_ext property
|
136 |
*
|
137 |
* @since 3.0.0
|
138 |
* @access public
|
139 |
+
*
|
140 |
* @param string $file_ext The file extension used for class files. Default is "php".
|
141 |
*/
|
142 |
public static function set_file_ext( $file_ext ) {
|
148 |
*
|
149 |
* @since 3.0.0
|
150 |
* @access public
|
151 |
+
*
|
152 |
* @param string $path The path representing the top level where recursion should
|
153 |
* begin for plugins. Defaults to empty ( does not look in plugins ).
|
154 |
*/
|
161 |
*
|
162 |
* @since 3.0.0
|
163 |
* @access public
|
164 |
+
*
|
165 |
* @param string $path The path representing the top level where recursion should
|
166 |
* begin. Defaults to the current directory.
|
167 |
*/
|
174 |
*
|
175 |
* @since 3.0.0
|
176 |
* @access public
|
177 |
+
*
|
178 |
* @param string $file_name The file name to exclude from autoload.
|
179 |
*/
|
180 |
public static function exclude_file( $file_name ) {
|
186 |
*
|
187 |
* @since 3.0.0
|
188 |
* @access public
|
189 |
+
*
|
190 |
* @param array $namespaces The namespaces to use.
|
191 |
*/
|
192 |
public static function define_namespaces( $namespaces = array() ) {
|
includes/admin/class-wppr-admin.php
CHANGED
@@ -185,7 +185,7 @@ class WPPR_Admin {
|
|
185 |
if ( $nonce['name'] != 'wppr_nonce_settings' ) {
|
186 |
die( 'invalid nonce name' );
|
187 |
}
|
188 |
-
if ( wp_verify_nonce( $nonce['value'],'wppr_save_global_settings' ) != 1 ) {
|
189 |
die( 'invalid nonce value' );
|
190 |
}
|
191 |
|
@@ -195,4 +195,53 @@ class WPPR_Admin {
|
|
195 |
die();
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
185 |
if ( $nonce['name'] != 'wppr_nonce_settings' ) {
|
186 |
die( 'invalid nonce name' );
|
187 |
}
|
188 |
+
if ( wp_verify_nonce( $nonce['value'], 'wppr_save_global_settings' ) != 1 ) {
|
189 |
die( 'invalid nonce value' );
|
190 |
}
|
191 |
|
195 |
die();
|
196 |
}
|
197 |
|
198 |
+
/**
|
199 |
+
* Method called from AJAX request to populate categories of specified post types.
|
200 |
+
*
|
201 |
+
* @since 3.0.0
|
202 |
+
* @access public
|
203 |
+
*/
|
204 |
+
public function get_categories() {
|
205 |
+
check_ajax_referer( WPPR_SLUG, 'nonce' );
|
206 |
+
|
207 |
+
if ( isset( $_POST['type'] ) ) {
|
208 |
+
echo wp_send_json_success( array( 'categories' => self::get_category_for_post_type( $_POST['type'] ) ) );
|
209 |
+
}
|
210 |
+
wp_die();
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Method that returns the categories of specified post types.
|
215 |
+
*
|
216 |
+
* @since 3.0.0
|
217 |
+
* @access public
|
218 |
+
*/
|
219 |
+
public static function get_category_for_post_type( $post_type ) {
|
220 |
+
$categories = array();
|
221 |
+
if ( $post_type ) {
|
222 |
+
$taxonomies = get_taxonomies(
|
223 |
+
array( 'object_type' => array( $post_type ),
|
224 |
+
'hierarchical' => true,
|
225 |
+
), 'objects'
|
226 |
+
);
|
227 |
+
if ( $taxonomies ) {
|
228 |
+
foreach ( $taxonomies as $tax ) {
|
229 |
+
$terms = get_terms(
|
230 |
+
$tax->name, array(
|
231 |
+
'hide_empty' => false,
|
232 |
+
)
|
233 |
+
);
|
234 |
+
if ( empty( $terms ) ) {
|
235 |
+
continue;
|
236 |
+
}
|
237 |
+
foreach ( $terms as $term ) {
|
238 |
+
$categories[ $term->slug ] = $term->name;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
return $categories;
|
245 |
+
}
|
246 |
+
|
247 |
}
|
includes/admin/class-wppr-global-settings.php
CHANGED
@@ -68,34 +68,35 @@ class WPPR_Global_Settings {
|
|
68 |
'wppr_settings_fields', array(
|
69 |
'general' => array(
|
70 |
'cwppos_show_reviewbox' => array(
|
71 |
-
'id'
|
72 |
-
'name'
|
73 |
-
'description'
|
74 |
-
'type'
|
75 |
-
'options'
|
76 |
'yes' => __( 'After content', 'wp-product-review' ),
|
77 |
'no' => __( 'Before content', 'wp-product-review' ),
|
78 |
'manual' => __( 'Manually placed', 'wp-product-review' ),
|
79 |
),
|
80 |
-
'default'
|
81 |
),
|
82 |
'cwppos_show_userreview' => array(
|
83 |
-
'id'
|
84 |
-
'name'
|
85 |
-
'description'
|
86 |
-
'type'
|
87 |
-
'options'
|
88 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
89 |
'no' => __( 'No', 'wp-product-review' ),
|
90 |
),
|
91 |
-
'
|
|
|
92 |
),
|
93 |
'cwppos_infl_userreview' => array(
|
94 |
-
'id'
|
95 |
-
'name'
|
96 |
-
'description'
|
97 |
-
'type'
|
98 |
-
'options'
|
99 |
'0' => 'No influence',
|
100 |
'10' => '10%',
|
101 |
'20' => '20%',
|
@@ -108,14 +109,14 @@ class WPPR_Global_Settings {
|
|
108 |
'90' => '90%',
|
109 |
'100' => '100%',
|
110 |
),
|
111 |
-
'default'
|
112 |
),
|
113 |
'cwppos_option_nr' => array(
|
114 |
-
'id'
|
115 |
-
'name'
|
116 |
-
'description'
|
117 |
-
'type'
|
118 |
-
'options'
|
119 |
'3' => '3',
|
120 |
'4' => '4',
|
121 |
'5' => '5',
|
@@ -125,14 +126,14 @@ class WPPR_Global_Settings {
|
|
125 |
'9' => '9',
|
126 |
'10' => '10',
|
127 |
),
|
128 |
-
'default'
|
129 |
),
|
130 |
'cwppos_widget_size' => array(
|
131 |
'type' => 'input_text',
|
132 |
'name' => __( 'Content width', 'wp-product-review' ),
|
133 |
'description' => __( 'Write your content width in pixels in this format : 600 if you want to limit the review box width.', 'wp-product-review' ),
|
134 |
'id' => 'widget_size',
|
135 |
-
'default'
|
136 |
),
|
137 |
'cwppos_lighbox' => array(
|
138 |
'type' => 'select',
|
@@ -143,7 +144,7 @@ class WPPR_Global_Settings {
|
|
143 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
144 |
'no' => __( 'No', 'wp-product-review' ),
|
145 |
),
|
146 |
-
'default'
|
147 |
),
|
148 |
'cwppos_fontawesome' => array(
|
149 |
'type' => 'select',
|
@@ -154,9 +155,9 @@ class WPPR_Global_Settings {
|
|
154 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
155 |
'no' => __( 'No', 'wp-product-review' ),
|
156 |
),
|
157 |
-
'default'
|
158 |
),
|
159 |
-
'wppr_rich_snippet'
|
160 |
'type' => 'select',
|
161 |
'name' => __( 'Enable Rich Snippets', 'wp-product-review' ),
|
162 |
'description' => __( 'Enable rich snippets on the product page.', 'wp-product-review' ),
|
@@ -165,7 +166,7 @@ class WPPR_Global_Settings {
|
|
165 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
166 |
'no' => __( 'No', 'wp-product-review' ),
|
167 |
),
|
168 |
-
'default'
|
169 |
),
|
170 |
),
|
171 |
'rating' => array(
|
@@ -174,42 +175,42 @@ class WPPR_Global_Settings {
|
|
174 |
'name' => __( 'Rating options default color', 'wp-product-review' ),
|
175 |
'description' => __( 'Select the color to be used by default on rating.', 'wp-product-review' ),
|
176 |
'id' => 'rating_default',
|
177 |
-
'default'
|
178 |
),
|
179 |
'cwppos_rating_chart_default' => array(
|
180 |
'type' => 'color',
|
181 |
'name' => __( 'Rating chart default color', 'wp-product-review' ),
|
182 |
'description' => __( 'Select the color to be used by default on rating chart.', 'wp-product-review' ),
|
183 |
'id' => 'rating_chart_default',
|
184 |
-
'default'
|
185 |
),
|
186 |
'cwppos_rating_weak' => array(
|
187 |
'type' => 'color',
|
188 |
'name' => __( 'Weak rating', 'wp-product-review' ),
|
189 |
'description' => __( 'Select the color to be used when the rating is weak. ( < 2.5)', 'wp-product-review' ),
|
190 |
'id' => 'rating_weak',
|
191 |
-
'default'
|
192 |
),
|
193 |
'cwppos_rating_notbad' => array(
|
194 |
'type' => 'color',
|
195 |
'name' => __( 'Not bad rating', 'wp-product-review' ),
|
196 |
'description' => __( 'Select the color to be used when the rating is not bad. ( > 2.5 and < 5)', 'wp-product-review' ),
|
197 |
'id' => 'rating_notbad',
|
198 |
-
'default'
|
199 |
),
|
200 |
-
'cwppos_rating_good'
|
201 |
'type' => 'color',
|
202 |
'name' => __( 'Good rating', 'wp-product-review' ),
|
203 |
'description' => __( 'Select the color to be used when the rating is good. ( >5 and <7.5)', 'wp-product-review' ),
|
204 |
'id' => 'rating_good',
|
205 |
-
'default'
|
206 |
),
|
207 |
-
'cwppos_rating_very_good'
|
208 |
'type' => 'color',
|
209 |
'name' => __( 'Very good rating', 'wp-product-review' ),
|
210 |
'description' => __( 'Select the color to be used when the rating is very good. ( 7.5 < and <10)', 'wp-product-review' ),
|
211 |
'id' => 'rating_very_good',
|
212 |
-
'default'
|
213 |
),
|
214 |
|
215 |
),
|
@@ -219,35 +220,35 @@ class WPPR_Global_Settings {
|
|
219 |
'name' => __( 'Font color', 'wp-product-review' ),
|
220 |
'description' => __( 'Select the color to be used on the font.', 'wp-product-review' ),
|
221 |
'id' => 'font_color',
|
222 |
-
'default'
|
223 |
),
|
224 |
'cwppos_pros_color' => array(
|
225 |
'type' => 'color',
|
226 |
'name' => __( 'Pros text color', 'wp-product-review' ),
|
227 |
'description' => __( 'Select the color to be used on the \'Pros\' text.', 'wp-product-review' ),
|
228 |
'id' => 'pros_color',
|
229 |
-
'default'
|
230 |
),
|
231 |
'cwppos_cons_color' => array(
|
232 |
'type' => 'color',
|
233 |
'name' => __( 'Cons text color', 'wp-product-review' ),
|
234 |
'description' => __( 'Select the color to be used on the Cons text.', 'wp-product-review' ),
|
235 |
'id' => 'cons_color',
|
236 |
-
'default'
|
237 |
),
|
238 |
'cwppos_pros_text' => array(
|
239 |
'type' => 'text',
|
240 |
'name' => __( 'Pros text', 'wp-product-review' ),
|
241 |
'description' => __( 'Specify text for pros heading', 'wp-product-review' ),
|
242 |
'id' => 'pros_text',
|
243 |
-
'default'
|
244 |
),
|
245 |
'cwppos_cons_text' => array(
|
246 |
'type' => 'text',
|
247 |
'name' => __( 'Cons text', 'wp-product-review' ),
|
248 |
'description' => __( 'Specify text for cons heading', 'wp-product-review' ),
|
249 |
'id' => 'cons_text',
|
250 |
-
'default'
|
251 |
),
|
252 |
'cwppos_reviewboxbd_color' => array(
|
253 |
'type' => 'color',
|
@@ -274,49 +275,49 @@ class WPPR_Global_Settings {
|
|
274 |
'yes' => 'Yes',
|
275 |
'no' => 'No',
|
276 |
),
|
277 |
-
'default'
|
278 |
),
|
279 |
'cwppos_buttonbd_color' => array(
|
280 |
'type' => 'color',
|
281 |
'name' => __( 'Button border', 'wp-product-review' ),
|
282 |
'description' => __( 'Select the border color to be used on the buy button for the default state', 'wp-product-review' ),
|
283 |
'id' => 'buttonbd_color',
|
284 |
-
'default'
|
285 |
),
|
286 |
'cwppos_buttonbh_color' => array(
|
287 |
'type' => 'color',
|
288 |
'name' => __( 'Button border hover', 'wp-product-review' ),
|
289 |
'description' => __( 'Select the border color to be used on the buy button for the hover state', 'wp-product-review' ),
|
290 |
'id' => 'buttonbh_color',
|
291 |
-
'default'
|
292 |
),
|
293 |
'cwppos_buttonbkd_color' => array(
|
294 |
'type' => 'color',
|
295 |
'name' => __( 'Button background', 'wp-product-review' ),
|
296 |
'description' => __( 'Select the background color to be used on the buy button for the default state', 'wp-product-review' ),
|
297 |
'id' => 'buttonbkd_color',
|
298 |
-
'default'
|
299 |
),
|
300 |
'cwppos_buttonbkh_color' => array(
|
301 |
'type' => 'color',
|
302 |
'name' => __( 'Button background hover', 'wp-product-review' ),
|
303 |
'description' => __( 'Select the background color to be used on the buy button for the hover state', 'wp-product-review' ),
|
304 |
'id' => 'buttonbkh_color',
|
305 |
-
'default'
|
306 |
),
|
307 |
'cwppos_buttontxtd_color' => array(
|
308 |
'type' => 'color',
|
309 |
'name' => __( 'Button text color', 'wp-product-review' ),
|
310 |
'description' => __( 'Select the text color to be used on the buy button for the default state', 'wp-product-review' ),
|
311 |
'id' => 'buttontxtd_color',
|
312 |
-
'default'
|
313 |
),
|
314 |
'cwppos_buttontxth_color' => array(
|
315 |
'type' => 'color',
|
316 |
'name' => __( 'Button text color hover', 'wp-product-review' ),
|
317 |
'description' => __( 'Select the text color to be used on the buy button for the hover state', 'wp-product-review' ),
|
318 |
'id' => 'buttontxth_color',
|
319 |
-
'default'
|
320 |
),
|
321 |
),
|
322 |
)
|
@@ -327,6 +328,38 @@ class WPPR_Global_Settings {
|
|
327 |
return self::$instance;
|
328 |
}
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
/**
|
331 |
* Return the section array.
|
332 |
*
|
@@ -363,6 +396,7 @@ class WPPR_Global_Settings {
|
|
363 |
$fields[ $field_key ] = $field_values;
|
364 |
}
|
365 |
}
|
|
|
366 |
return $fields;
|
367 |
}
|
368 |
}
|
68 |
'wppr_settings_fields', array(
|
69 |
'general' => array(
|
70 |
'cwppos_show_reviewbox' => array(
|
71 |
+
'id' => 'review_position',
|
72 |
+
'name' => __( 'Position of the review box', 'wp-product-review' ),
|
73 |
+
'description' => __( 'You display the review using the shortcode available in the pro version <code> [P_REVIEW post_id=3067 visual=\'full\']</code>', 'wp-product-review' ),
|
74 |
+
'type' => 'select',
|
75 |
+
'options' => array(
|
76 |
'yes' => __( 'After content', 'wp-product-review' ),
|
77 |
'no' => __( 'Before content', 'wp-product-review' ),
|
78 |
'manual' => __( 'Manually placed', 'wp-product-review' ),
|
79 |
),
|
80 |
+
'default' => 'yes',
|
81 |
),
|
82 |
'cwppos_show_userreview' => array(
|
83 |
+
'id' => 'show_review',
|
84 |
+
'name' => __( 'Show review comment', 'wp-product-review' ),
|
85 |
+
'description' => self::enable_user_comments() ? __( 'Activate comment review user', 'wp-product-review' ) : self::disable_user_comments_msg(),
|
86 |
+
'type' => 'select',
|
87 |
+
'options' => array(
|
88 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
89 |
'no' => __( 'No', 'wp-product-review' ),
|
90 |
),
|
91 |
+
'disabled' => ! self::enable_user_comments(),
|
92 |
+
'default' => 'no',
|
93 |
),
|
94 |
'cwppos_infl_userreview' => array(
|
95 |
+
'id' => 'comment_influence',
|
96 |
+
'name' => __( 'Visitor Review Influence', 'wp-product-review' ),
|
97 |
+
'description' => __( 'Select how much visitors rating will affect the main one', 'wp-product-review' ),
|
98 |
+
'type' => 'select',
|
99 |
+
'options' => array(
|
100 |
'0' => 'No influence',
|
101 |
'10' => '10%',
|
102 |
'20' => '20%',
|
109 |
'90' => '90%',
|
110 |
'100' => '100%',
|
111 |
),
|
112 |
+
'default' => '0',
|
113 |
),
|
114 |
'cwppos_option_nr' => array(
|
115 |
+
'id' => 'options_no',
|
116 |
+
'name' => __( 'Number of options/pros/cons', 'wp-product-review' ),
|
117 |
+
'description' => __( 'You can select the default number of options / pros/ cons (3-10)', 'wp-product-review' ),
|
118 |
+
'type' => 'select',
|
119 |
+
'options' => array(
|
120 |
'3' => '3',
|
121 |
'4' => '4',
|
122 |
'5' => '5',
|
126 |
'9' => '9',
|
127 |
'10' => '10',
|
128 |
),
|
129 |
+
'default' => '5',
|
130 |
),
|
131 |
'cwppos_widget_size' => array(
|
132 |
'type' => 'input_text',
|
133 |
'name' => __( 'Content width', 'wp-product-review' ),
|
134 |
'description' => __( 'Write your content width in pixels in this format : 600 if you want to limit the review box width.', 'wp-product-review' ),
|
135 |
'id' => 'widget_size',
|
136 |
+
'default' => '',
|
137 |
),
|
138 |
'cwppos_lighbox' => array(
|
139 |
'type' => 'select',
|
144 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
145 |
'no' => __( 'No', 'wp-product-review' ),
|
146 |
),
|
147 |
+
'default' => 'no',
|
148 |
),
|
149 |
'cwppos_fontawesome' => array(
|
150 |
'type' => 'select',
|
155 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
156 |
'no' => __( 'No', 'wp-product-review' ),
|
157 |
),
|
158 |
+
'default' => 'no',
|
159 |
),
|
160 |
+
'wppr_rich_snippet' => array(
|
161 |
'type' => 'select',
|
162 |
'name' => __( 'Enable Rich Snippets', 'wp-product-review' ),
|
163 |
'description' => __( 'Enable rich snippets on the product page.', 'wp-product-review' ),
|
166 |
'yes' => __( 'Yes', 'wp-product-review' ),
|
167 |
'no' => __( 'No', 'wp-product-review' ),
|
168 |
),
|
169 |
+
'default' => 'yes',
|
170 |
),
|
171 |
),
|
172 |
'rating' => array(
|
175 |
'name' => __( 'Rating options default color', 'wp-product-review' ),
|
176 |
'description' => __( 'Select the color to be used by default on rating.', 'wp-product-review' ),
|
177 |
'id' => 'rating_default',
|
178 |
+
'default' => '#E1E2E0',
|
179 |
),
|
180 |
'cwppos_rating_chart_default' => array(
|
181 |
'type' => 'color',
|
182 |
'name' => __( 'Rating chart default color', 'wp-product-review' ),
|
183 |
'description' => __( 'Select the color to be used by default on rating chart.', 'wp-product-review' ),
|
184 |
'id' => 'rating_chart_default',
|
185 |
+
'default' => '#ebebeb',
|
186 |
),
|
187 |
'cwppos_rating_weak' => array(
|
188 |
'type' => 'color',
|
189 |
'name' => __( 'Weak rating', 'wp-product-review' ),
|
190 |
'description' => __( 'Select the color to be used when the rating is weak. ( < 2.5)', 'wp-product-review' ),
|
191 |
'id' => 'rating_weak',
|
192 |
+
'default' => '#FF7F66',
|
193 |
),
|
194 |
'cwppos_rating_notbad' => array(
|
195 |
'type' => 'color',
|
196 |
'name' => __( 'Not bad rating', 'wp-product-review' ),
|
197 |
'description' => __( 'Select the color to be used when the rating is not bad. ( > 2.5 and < 5)', 'wp-product-review' ),
|
198 |
'id' => 'rating_notbad',
|
199 |
+
'default' => '#FFCE55',
|
200 |
),
|
201 |
+
'cwppos_rating_good' => array(
|
202 |
'type' => 'color',
|
203 |
'name' => __( 'Good rating', 'wp-product-review' ),
|
204 |
'description' => __( 'Select the color to be used when the rating is good. ( >5 and <7.5)', 'wp-product-review' ),
|
205 |
'id' => 'rating_good',
|
206 |
+
'default' => '#50C1E9',
|
207 |
),
|
208 |
+
'cwppos_rating_very_good' => array(
|
209 |
'type' => 'color',
|
210 |
'name' => __( 'Very good rating', 'wp-product-review' ),
|
211 |
'description' => __( 'Select the color to be used when the rating is very good. ( 7.5 < and <10)', 'wp-product-review' ),
|
212 |
'id' => 'rating_very_good',
|
213 |
+
'default' => '#8DC153',
|
214 |
),
|
215 |
|
216 |
),
|
220 |
'name' => __( 'Font color', 'wp-product-review' ),
|
221 |
'description' => __( 'Select the color to be used on the font.', 'wp-product-review' ),
|
222 |
'id' => 'font_color',
|
223 |
+
'default' => '#3D3D3D',
|
224 |
),
|
225 |
'cwppos_pros_color' => array(
|
226 |
'type' => 'color',
|
227 |
'name' => __( 'Pros text color', 'wp-product-review' ),
|
228 |
'description' => __( 'Select the color to be used on the \'Pros\' text.', 'wp-product-review' ),
|
229 |
'id' => 'pros_color',
|
230 |
+
'default' => '#8DC153',
|
231 |
),
|
232 |
'cwppos_cons_color' => array(
|
233 |
'type' => 'color',
|
234 |
'name' => __( 'Cons text color', 'wp-product-review' ),
|
235 |
'description' => __( 'Select the color to be used on the Cons text.', 'wp-product-review' ),
|
236 |
'id' => 'cons_color',
|
237 |
+
'default' => '#C15353',
|
238 |
),
|
239 |
'cwppos_pros_text' => array(
|
240 |
'type' => 'text',
|
241 |
'name' => __( 'Pros text', 'wp-product-review' ),
|
242 |
'description' => __( 'Specify text for pros heading', 'wp-product-review' ),
|
243 |
'id' => 'pros_text',
|
244 |
+
'default' => 'Pros',
|
245 |
),
|
246 |
'cwppos_cons_text' => array(
|
247 |
'type' => 'text',
|
248 |
'name' => __( 'Cons text', 'wp-product-review' ),
|
249 |
'description' => __( 'Specify text for cons heading', 'wp-product-review' ),
|
250 |
'id' => 'cons_text',
|
251 |
+
'default' => 'Cons',
|
252 |
),
|
253 |
'cwppos_reviewboxbd_color' => array(
|
254 |
'type' => 'color',
|
275 |
'yes' => 'Yes',
|
276 |
'no' => 'No',
|
277 |
),
|
278 |
+
'default' => 'yes',
|
279 |
),
|
280 |
'cwppos_buttonbd_color' => array(
|
281 |
'type' => 'color',
|
282 |
'name' => __( 'Button border', 'wp-product-review' ),
|
283 |
'description' => __( 'Select the border color to be used on the buy button for the default state', 'wp-product-review' ),
|
284 |
'id' => 'buttonbd_color',
|
285 |
+
'default' => '#3BAEDA',
|
286 |
),
|
287 |
'cwppos_buttonbh_color' => array(
|
288 |
'type' => 'color',
|
289 |
'name' => __( 'Button border hover', 'wp-product-review' ),
|
290 |
'description' => __( 'Select the border color to be used on the buy button for the hover state', 'wp-product-review' ),
|
291 |
'id' => 'buttonbh_color',
|
292 |
+
'default' => '#3BAEDA',
|
293 |
),
|
294 |
'cwppos_buttonbkd_color' => array(
|
295 |
'type' => 'color',
|
296 |
'name' => __( 'Button background', 'wp-product-review' ),
|
297 |
'description' => __( 'Select the background color to be used on the buy button for the default state', 'wp-product-review' ),
|
298 |
'id' => 'buttonbkd_color',
|
299 |
+
'default' => '#ffffff',
|
300 |
),
|
301 |
'cwppos_buttonbkh_color' => array(
|
302 |
'type' => 'color',
|
303 |
'name' => __( 'Button background hover', 'wp-product-review' ),
|
304 |
'description' => __( 'Select the background color to be used on the buy button for the hover state', 'wp-product-review' ),
|
305 |
'id' => 'buttonbkh_color',
|
306 |
+
'default' => '#3BAEDA',
|
307 |
),
|
308 |
'cwppos_buttontxtd_color' => array(
|
309 |
'type' => 'color',
|
310 |
'name' => __( 'Button text color', 'wp-product-review' ),
|
311 |
'description' => __( 'Select the text color to be used on the buy button for the default state', 'wp-product-review' ),
|
312 |
'id' => 'buttontxtd_color',
|
313 |
+
'default' => '#3BAEDA',
|
314 |
),
|
315 |
'cwppos_buttontxth_color' => array(
|
316 |
'type' => 'color',
|
317 |
'name' => __( 'Button text color hover', 'wp-product-review' ),
|
318 |
'description' => __( 'Select the text color to be used on the buy button for the hover state', 'wp-product-review' ),
|
319 |
'id' => 'buttontxth_color',
|
320 |
+
'default' => '#FFFFFF',
|
321 |
),
|
322 |
),
|
323 |
)
|
328 |
return self::$instance;
|
329 |
}
|
330 |
|
331 |
+
/**
|
332 |
+
* When Disqus or Jetpack Comments are enabled, the user review doesn't work.
|
333 |
+
*/
|
334 |
+
private static function enable_user_comments() {
|
335 |
+
if ( ! is_admin() ) {
|
336 |
+
return true;
|
337 |
+
}
|
338 |
+
if ( is_plugin_active( 'disqus-comment-system/disqus.php' ) || ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'comments' ) ) ) {
|
339 |
+
return false;
|
340 |
+
}
|
341 |
+
|
342 |
+
return true;
|
343 |
+
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* When Disqus or Jetpack Comments are enabled, show this to the user.
|
347 |
+
*/
|
348 |
+
private static function disable_user_comments_msg() {
|
349 |
+
$active = array();
|
350 |
+
if ( is_plugin_active( 'disqus-comment-system/disqus.php' ) ) {
|
351 |
+
$active[] = 'Disqus';
|
352 |
+
}
|
353 |
+
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'comments' ) ) {
|
354 |
+
$active[] = 'Jetpack Comments';
|
355 |
+
}
|
356 |
+
if ( $active ) {
|
357 |
+
return sprintf( __( 'We see %s active, so user feedback is disabled', 'wp-product-review' ), implode( ',', $active ) );
|
358 |
+
}
|
359 |
+
|
360 |
+
return '';
|
361 |
+
}
|
362 |
+
|
363 |
/**
|
364 |
* Return the section array.
|
365 |
*
|
396 |
$fields[ $field_key ] = $field_values;
|
397 |
}
|
398 |
}
|
399 |
+
|
400 |
return $fields;
|
401 |
}
|
402 |
}
|
includes/admin/controllers/class-wppr-admin-render-controller.php
CHANGED
@@ -50,7 +50,7 @@ class WPPR_Admin_Render_Controller {
|
|
50 |
*/
|
51 |
public function __construct( $plugin_name, $version ) {
|
52 |
$this->plugin_name = $plugin_name;
|
53 |
-
$this->version
|
54 |
$this->html_helper = new WPPR_Html_Fields();
|
55 |
}
|
56 |
|
50 |
*/
|
51 |
public function __construct( $plugin_name, $version ) {
|
52 |
$this->plugin_name = $plugin_name;
|
53 |
+
$this->version = $version;
|
54 |
$this->html_helper = new WPPR_Html_Fields();
|
55 |
}
|
56 |
|
includes/admin/helpers/class-wppr-html-fields.php
CHANGED
@@ -36,11 +36,11 @@ class WPPR_Html_Fields {
|
|
36 |
*/
|
37 |
private function define_defaults( $specific_defaults ) {
|
38 |
$general_defaults = array(
|
39 |
-
'id'
|
40 |
-
'name'
|
41 |
-
'value'
|
42 |
-
'class'
|
43 |
-
'default'
|
44 |
'placeholder' => '',
|
45 |
'disabled' => false,
|
46 |
);
|
@@ -63,7 +63,7 @@ class WPPR_Html_Fields {
|
|
63 |
)
|
64 |
);
|
65 |
$args = wp_parse_args( $args, $defaults );
|
66 |
-
$class
|
67 |
$disabled = '';
|
68 |
if ( ! empty( $args['options']['disabled'] ) ) {
|
69 |
$disabled .= ' disabled="disabled"';
|
@@ -118,7 +118,7 @@ class WPPR_Html_Fields {
|
|
118 |
public function image( $args ) {
|
119 |
$defaults = $this->define_defaults(
|
120 |
array(
|
121 |
-
'class'
|
122 |
'action' => __( 'Choose image', 'wp-product-review' ),
|
123 |
)
|
124 |
);
|
@@ -131,7 +131,7 @@ class WPPR_Html_Fields {
|
|
131 |
if ( is_null( $args['id'] ) ) {
|
132 |
$args['id'] = $args['name'];
|
133 |
}
|
134 |
-
$output
|
135 |
$output .= '<input type="button" id="' . esc_attr( $args['id'] ) . '-button" class="wppr-image-button button" value="' . esc_attr( $args['action'] ) . '"/>';
|
136 |
|
137 |
return apply_filters( 'wppr_field', $output, $args );
|
@@ -156,13 +156,17 @@ class WPPR_Html_Fields {
|
|
156 |
if ( $args['value'] == null ) {
|
157 |
$args['value'] = $args['default'];
|
158 |
}
|
|
|
|
|
|
|
|
|
159 |
$options = array();
|
160 |
foreach ( $args['options'] as $ov => $op ) {
|
161 |
$options[ esc_attr( $ov ) ] = esc_html( $op );
|
162 |
}
|
163 |
-
$output = '<select class="' . $class . '" name="' . esc_attr( $args['name'] ) . '" > ';
|
164 |
foreach ( $options as $k => $v ) {
|
165 |
-
$output .= "<option value='" . $k . "' " . ( ( isset( $args['value'] ) && $args['value'] == $k ) ? 'selected' : '') . '>' . $v . '</option>';
|
166 |
}
|
167 |
$output .= '</select>';
|
168 |
|
@@ -231,7 +235,7 @@ class WPPR_Html_Fields {
|
|
231 |
';
|
232 |
|
233 |
if ( ! class_exists( 'WPPR_PRO' ) ) {
|
234 |
-
$output = '<span style="color:red;">' . __( 'You need the PRO <a style="color:red;" href="http://bit.ly/2bhylar" target="_blank" >add-on</a> in order to change the review icons.','wp-product-review' ) . '</span>';
|
235 |
}
|
236 |
|
237 |
return apply_filters( 'wppr_field', $output, $args );
|
36 |
*/
|
37 |
private function define_defaults( $specific_defaults ) {
|
38 |
$general_defaults = array(
|
39 |
+
'id' => null,
|
40 |
+
'name' => null,
|
41 |
+
'value' => null,
|
42 |
+
'class' => '',
|
43 |
+
'default' => '',
|
44 |
'placeholder' => '',
|
45 |
'disabled' => false,
|
46 |
);
|
63 |
)
|
64 |
);
|
65 |
$args = wp_parse_args( $args, $defaults );
|
66 |
+
$class = $this->validate_class( $args['class'] );
|
67 |
$disabled = '';
|
68 |
if ( ! empty( $args['options']['disabled'] ) ) {
|
69 |
$disabled .= ' disabled="disabled"';
|
118 |
public function image( $args ) {
|
119 |
$defaults = $this->define_defaults(
|
120 |
array(
|
121 |
+
'class' => 'wppr-image',
|
122 |
'action' => __( 'Choose image', 'wp-product-review' ),
|
123 |
)
|
124 |
);
|
131 |
if ( is_null( $args['id'] ) ) {
|
132 |
$args['id'] = $args['name'];
|
133 |
}
|
134 |
+
$output = '<input type="text" ' . $disabled . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" class="' . $class . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" />';
|
135 |
$output .= '<input type="button" id="' . esc_attr( $args['id'] ) . '-button" class="wppr-image-button button" value="' . esc_attr( $args['action'] ) . '"/>';
|
136 |
|
137 |
return apply_filters( 'wppr_field', $output, $args );
|
156 |
if ( $args['value'] == null ) {
|
157 |
$args['value'] = $args['default'];
|
158 |
}
|
159 |
+
$disabled = '';
|
160 |
+
if ( ! empty( $args['disabled'] ) ) {
|
161 |
+
$disabled .= ' disabled="disabled"';
|
162 |
+
}
|
163 |
$options = array();
|
164 |
foreach ( $args['options'] as $ov => $op ) {
|
165 |
$options[ esc_attr( $ov ) ] = esc_html( $op );
|
166 |
}
|
167 |
+
$output = '<select class="' . $class . '" name="' . esc_attr( $args['name'] ) . '"' . $disabled . ' > ';
|
168 |
foreach ( $options as $k => $v ) {
|
169 |
+
$output .= "<option value='" . $k . "' " . ( ( isset( $args['value'] ) && $args['value'] == $k ) ? 'selected' : '' ) . '>' . $v . '</option>';
|
170 |
}
|
171 |
$output .= '</select>';
|
172 |
|
235 |
';
|
236 |
|
237 |
if ( ! class_exists( 'WPPR_PRO' ) ) {
|
238 |
+
$output = '<span style="color:red;">' . __( 'You need the PRO <a style="color:red;" href="http://bit.ly/2bhylar" target="_blank" >add-on</a> in order to change the review icons.', 'wp-product-review' ) . '</span>';
|
239 |
}
|
240 |
|
241 |
return apply_filters( 'wppr_field', $output, $args );
|
includes/admin/layouts/upsell-tpl.php
CHANGED
@@ -17,24 +17,30 @@
|
|
17 |
?>
|
18 |
|
19 |
<div class="pro-feature">
|
20 |
-
<div class="pro-feature-
|
21 |
-
<
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
</div>
|
33 |
-
<div class="clear"></div>
|
34 |
</div>
|
35 |
<div class="clear"></div>
|
36 |
|
37 |
<div class="pro-feature">
|
|
|
38 |
<div class="pro-feature-features">
|
39 |
<h2>Shortcodes</h2>
|
40 |
<p>Position the review box anywhere in the post with the help of shortcodes. Add as many reviews as you want
|
@@ -43,10 +49,12 @@
|
|
43 |
</div>
|
44 |
<div class="pro-feature-image"><img src="<?php echo WPPR_URL; ?>/assets/img/wppr-shortcodes.jpg"></div>
|
45 |
<div class="clear"></div>
|
|
|
46 |
</div>
|
47 |
<div class="clear"></div>
|
48 |
|
49 |
<div class="pro-feature">
|
|
|
50 |
<div class="pro-feature-features">
|
51 |
<h2>Comparison Table</h2>
|
52 |
<p>Our powerful ranking table add-on is also included in the bundle and by using it you can automatically
|
@@ -54,10 +62,12 @@
|
|
54 |
</div>
|
55 |
<div class="pro-feature-image"><img src="<?php echo WPPR_URL; ?>/assets/img/wppr-review-comparison.jpg"></div>
|
56 |
<div class="clear"></div>
|
|
|
57 |
</div>
|
58 |
<div class="clear"></div>
|
59 |
|
60 |
<div class="pro-feature">
|
|
|
61 |
<div class="pro-feature-features">
|
62 |
<h2>Import</h2>
|
63 |
<p>No need to set up each product review separately. You can import options from other reviews you’ve
|
@@ -66,6 +76,7 @@
|
|
66 |
</div>
|
67 |
<div class="pro-feature-image"><img src="<?php echo WPPR_URL; ?>/assets/img/wppr-import.jpg"></div>
|
68 |
<div class="clear"></div>
|
|
|
69 |
</div>
|
70 |
<div class="clear"></div>
|
71 |
</div>
|
17 |
?>
|
18 |
|
19 |
<div class="pro-feature">
|
20 |
+
<div class="pro-feature-inner">
|
21 |
+
<div class="pro-feature-features">
|
22 |
+
<h2>Amazon Integration</h2>
|
23 |
+
<h4>Connects your site with Amazon in just a click</h4>
|
24 |
+
<p>If you want the Amazon data to be imported to your site, you don't have to do it manually. Add the
|
25 |
+
product ID and, by just clicking a button, the name, image, affiliate link, and price will be
|
26 |
+
transferred. Saves a lot of time.</p>
|
27 |
+
<h4>Synchronizes the prices with Amazon</h4>
|
28 |
+
<p>The add-on automatically synchronizes the prices with the ones from Amazon, so you won't have to do
|
29 |
+
it
|
30 |
+
manually everytime they change. Because prices vary all the time and you probably have better stuff
|
31 |
+
to
|
32 |
+
do instead of tracking them.</p>
|
33 |
+
</div>
|
34 |
+
<div class="pro-feature-image"><img
|
35 |
+
src="<?php echo WPPR_URL; ?>/assets/img/wppr-amazon-integration-and-support.jpg">
|
36 |
+
</div>
|
37 |
+
<div class="clear"></div>
|
38 |
</div>
|
|
|
39 |
</div>
|
40 |
<div class="clear"></div>
|
41 |
|
42 |
<div class="pro-feature">
|
43 |
+
<div class="pro-feature-inner">
|
44 |
<div class="pro-feature-features">
|
45 |
<h2>Shortcodes</h2>
|
46 |
<p>Position the review box anywhere in the post with the help of shortcodes. Add as many reviews as you want
|
49 |
</div>
|
50 |
<div class="pro-feature-image"><img src="<?php echo WPPR_URL; ?>/assets/img/wppr-shortcodes.jpg"></div>
|
51 |
<div class="clear"></div>
|
52 |
+
</div>
|
53 |
</div>
|
54 |
<div class="clear"></div>
|
55 |
|
56 |
<div class="pro-feature">
|
57 |
+
<div class="pro-feature-inner">
|
58 |
<div class="pro-feature-features">
|
59 |
<h2>Comparison Table</h2>
|
60 |
<p>Our powerful ranking table add-on is also included in the bundle and by using it you can automatically
|
62 |
</div>
|
63 |
<div class="pro-feature-image"><img src="<?php echo WPPR_URL; ?>/assets/img/wppr-review-comparison.jpg"></div>
|
64 |
<div class="clear"></div>
|
65 |
+
</div>
|
66 |
</div>
|
67 |
<div class="clear"></div>
|
68 |
|
69 |
<div class="pro-feature">
|
70 |
+
<div class="pro-feature-inner">
|
71 |
<div class="pro-feature-features">
|
72 |
<h2>Import</h2>
|
73 |
<p>No need to set up each product review separately. You can import options from other reviews you’ve
|
76 |
</div>
|
77 |
<div class="pro-feature-image"><img src="<?php echo WPPR_URL; ?>/assets/img/wppr-import.jpg"></div>
|
78 |
<div class="clear"></div>
|
79 |
+
</div>
|
80 |
</div>
|
81 |
<div class="clear"></div>
|
82 |
</div>
|
includes/admin/layouts/widget-admin-tpl.php
CHANGED
@@ -20,21 +20,65 @@
|
|
20 |
<input id="<?php echo $this->get_field_id( 'no_items' ); ?>" name="<?php echo $this->get_field_name( 'no_items' ); ?>" size="3" type="text" value="<?php echo esc_attr( $instance['no_items'] ); ?>" />
|
21 |
</p>
|
22 |
<p>
|
23 |
-
<?php $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<label for="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>"><?php _e( 'Category:', 'wp-product-review' ); ?></label>
|
25 |
-
<select id="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>" name="<?php echo $this->get_field_name( 'cwp_tp_category' ); ?>">
|
26 |
-
|
27 |
-
<?php
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
</select>
|
|
|
37 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
<p>
|
39 |
<?php $cwp_tp_layout = esc_attr( $instance['cwp_tp_layout'] ); ?>
|
40 |
<label for="<?php echo $this->get_field_id( 'cwp_tp_layout' ); ?>"><?php _e( 'Layout:', 'wp-product-review' ); ?></label>
|
20 |
<input id="<?php echo $this->get_field_id( 'no_items' ); ?>" name="<?php echo $this->get_field_name( 'no_items' ); ?>" size="3" type="text" value="<?php echo esc_attr( $instance['no_items'] ); ?>" />
|
21 |
</p>
|
22 |
<p>
|
23 |
+
<label for="<?php echo $this->get_field_id( 'cwp_tp_post_types' ); ?>"><?php _e( 'Post Types:', 'wp-product-review' ); ?></label>
|
24 |
+
<select id="<?php echo $this->get_field_id( 'cwp_tp_post_types' ); ?>" name="<?php echo $this->get_field_name( 'cwp_tp_post_types' ); ?>[]" class="wppr-chosen wppr-post-types" data-wppr-cat-combo="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>" multiple>
|
25 |
+
<?php
|
26 |
+
foreach( get_post_types( '', 'objects' ) as $post_type ) {
|
27 |
+
?>
|
28 |
+
<option value="<?php echo $post_type->name;?>" <?php echo in_array($post_type->name, $instance['cwp_tp_post_types']) ? 'selected' : '';?>><?php echo $post_type->label;?></option>
|
29 |
+
<?php
|
30 |
+
}
|
31 |
+
?>
|
32 |
+
</select>
|
33 |
+
</p>
|
34 |
+
|
35 |
+
<p>
|
36 |
+
<?php $all_cats = isset( $instance['cwp_tp_all_categories'] ) ? $instance['cwp_tp_all_categories'] : ''; ?>
|
37 |
<label for="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>"><?php _e( 'Category:', 'wp-product-review' ); ?></label>
|
38 |
+
<select id="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>" name="<?php echo $this->get_field_name( 'cwp_tp_category' ); ?>" class="wppr-chosen wppr-cats">
|
39 |
+
<option>All</option>
|
40 |
+
<?php
|
41 |
+
if ( $all_cats ) {
|
42 |
+
foreach ( $all_cats as $post_type => $cats ) {
|
43 |
+
?>
|
44 |
+
<optgroup label='<?php echo $post_type;?>'>
|
45 |
+
<?php
|
46 |
+
foreach ( $cats as $k => $v ) {
|
47 |
+
?>
|
48 |
+
<option value="<?php echo $k;?>" <?php selected($k, $instance['cwp_tp_category'])?>><?php echo $v;?></option>
|
49 |
+
<?php
|
50 |
+
}
|
51 |
+
?>
|
52 |
+
</optgroup>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
}
|
56 |
+
?>
|
57 |
</select>
|
58 |
+
<div class="spinner wppr-cat-spinner"></div>
|
59 |
</p>
|
60 |
+
<?php
|
61 |
+
if ( 'cwp_top_products_widget' === $this->id_base ) {
|
62 |
+
$timespan = $instance['cwp_timespan'];
|
63 |
+
$min = 0;
|
64 |
+
$max = 0;
|
65 |
+
if ( ! empty( $timespan ) && false !== $timespan ) {
|
66 |
+
$min_max = explode( ',', $timespan );
|
67 |
+
$min = reset( $min_max );
|
68 |
+
$max = end( $min_max );
|
69 |
+
}
|
70 |
+
?>
|
71 |
+
<p>
|
72 |
+
<label for="<?php echo $this->get_field_id( 'cwp_timespan' ); ?>"><?php _e( 'Timespan (weeks):', 'wp-product-review' ); ?></label>
|
73 |
+
<div data-wppr-value="<?php echo $timespan; ?>" data-wppr-min="-52" data-wppr-max="0" class="wppr-timespan wppr-range-slider" data-wppr-desc="<?php echo $this->get_field_id( 'cwp_timespan_desc' ); ?>"></div>
|
74 |
+
<div class="wppr-timespan-desc" id="<?php echo $this->get_field_id( 'cwp_timespan_desc' ); ?>">
|
75 |
+
<input type="hidden" id="<?php echo $this->get_field_id( 'cwp_timespan' ); ?>" name="<?php echo $this->get_field_name( 'cwp_timespan' ); ?>" value="<?php echo $timespan; ?>">
|
76 |
+
<?php echo sprintf(__( 'Posts published between %s%d%s and %s%d%s week(s) ago', 'wp-product-review' ), '<span class="wppr-range-min">', abs($min), '</span>', '<span class="wppr-range-max">', abs($max), '</span>');?>
|
77 |
+
</div>
|
78 |
+
</p>
|
79 |
+
<?php
|
80 |
+
}
|
81 |
+
?>
|
82 |
<p>
|
83 |
<?php $cwp_tp_layout = esc_attr( $instance['cwp_tp_layout'] ); ?>
|
84 |
<label for="<?php echo $this->get_field_id( 'cwp_tp_layout' ); ?>"><?php _e( 'Layout:', 'wp-product-review' ); ?></label>
|
includes/admin/models/class-wppr-editor-model.php
CHANGED
@@ -181,14 +181,14 @@ class WPPR_Editor_Model extends WPPR_Model_Abstract {
|
|
181 |
|
182 |
$review->activate();
|
183 |
$name = isset( $data['wppr-editor-product-name'] ) ? sanitize_text_field( $data['wppr-editor-product-name'] ) : '';
|
184 |
-
$image = isset( $data['wppr-editor-image'] ) ?
|
185 |
$click = isset( $data['wppr-editor-link'] ) ? strval( sanitize_text_field( $data['wppr-editor-link'] ) ) : 'image';
|
186 |
|
187 |
// TODO Setup links as array.
|
188 |
$link = isset( $data['wppr-editor-button-text'] ) ? strval( sanitize_text_field( $data['wppr-editor-button-text'] ) ) : '';
|
189 |
-
$text = isset( $data['wppr-editor-button-link'] ) ? strval(
|
190 |
$link2 = isset( $data['wppr-editor-button-text-2'] ) ? strval( sanitize_text_field( $data['wppr-editor-button-text-2'] ) ) : '';
|
191 |
-
$text2 = isset( $data['wppr-editor-button-link-2'] ) ? strval(
|
192 |
$price = isset( $data['wppr-editor-price'] ) ? sanitize_text_field( $data['wppr-editor-price'] ) : 0;
|
193 |
$options_names = isset( $data['wppr-editor-options-name'] ) ? $data['wppr-editor-options-name'] : array();
|
194 |
$options_values = isset( $data['wppr-editor-options-value'] ) ? $data['wppr-editor-options-value'] : array();
|
181 |
|
182 |
$review->activate();
|
183 |
$name = isset( $data['wppr-editor-product-name'] ) ? sanitize_text_field( $data['wppr-editor-product-name'] ) : '';
|
184 |
+
$image = isset( $data['wppr-editor-image'] ) ? esc_url( $data['wppr-editor-image'] ) : '';
|
185 |
$click = isset( $data['wppr-editor-link'] ) ? strval( sanitize_text_field( $data['wppr-editor-link'] ) ) : 'image';
|
186 |
|
187 |
// TODO Setup links as array.
|
188 |
$link = isset( $data['wppr-editor-button-text'] ) ? strval( sanitize_text_field( $data['wppr-editor-button-text'] ) ) : '';
|
189 |
+
$text = isset( $data['wppr-editor-button-link'] ) ? strval( esc_url( $data['wppr-editor-button-link'] ) ) : '';
|
190 |
$link2 = isset( $data['wppr-editor-button-text-2'] ) ? strval( sanitize_text_field( $data['wppr-editor-button-text-2'] ) ) : '';
|
191 |
+
$text2 = isset( $data['wppr-editor-button-link-2'] ) ? strval( esc_url( $data['wppr-editor-button-link-2'] ) ) : '';
|
192 |
$price = isset( $data['wppr-editor-price'] ) ? sanitize_text_field( $data['wppr-editor-price'] ) : 0;
|
193 |
$options_names = isset( $data['wppr-editor-options-name'] ) ? $data['wppr-editor-options-name'] : array();
|
194 |
$options_values = isset( $data['wppr-editor-options-value'] ) ? $data['wppr-editor-options-value'] : array();
|
includes/admin/models/class-wppr-query-model.php
CHANGED
@@ -88,9 +88,10 @@ class WPPR_Query_Model extends WPPR_Model_Abstract {
|
|
88 |
*/
|
89 |
public function find(
|
90 |
$post = array(
|
91 |
-
'category_id'
|
92 |
-
'category_name'
|
93 |
-
'post_type'
|
|
|
94 |
),
|
95 |
$limit = 20,
|
96 |
$filter = array(
|
@@ -129,7 +130,7 @@ class WPPR_Query_Model extends WPPR_Model_Abstract {
|
|
129 |
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'cwp_meta_box_check', `meta_value`, '' ) SEPARATOR '' ) AS 'check',
|
130 |
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'cwp_rev_product_name', `meta_value`, '' ) SEPARATOR '' ) AS 'name',
|
131 |
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'cwp_rev_price', FORMAT( `meta_value`, 2 ), '' ) SEPARATOR '' ) AS 'price',
|
132 |
-
|
133 |
FROM {$this->db->postmeta} m INNER JOIN {$this->db->posts} p on p.ID = m.post_ID
|
134 |
|
135 |
{$sub_query_posts}
|
@@ -169,7 +170,7 @@ class WPPR_Query_Model extends WPPR_Model_Abstract {
|
|
169 |
return '';
|
170 |
}
|
171 |
$sub_selection_query = "INNER JOIN {$this->db->term_relationships } wtr ON wtr.object_id = p.ID
|
172 |
-
INNER JOIN {$this->db->term_taxonomy} wtt on wtt.term_taxonomy_id = wtr.term_taxonomy_id
|
173 |
INNER JOIN {$this->db->terms} wt
|
174 |
ON wt.term_id = wtt.term_id";
|
175 |
|
@@ -253,12 +254,18 @@ class WPPR_Query_Model extends WPPR_Model_Abstract {
|
|
253 |
}
|
254 |
// TODO Check against available post_types.
|
255 |
if ( isset( $post['post_type'] ) && is_array( $post['post_type'] ) ) {
|
256 |
-
$filter_post_type
|
257 |
-
$filter_post_type
|
258 |
-
$filter_post_type
|
259 |
$sub_query_conditions .= $this->db->prepare( $filter_post_type, $post['post_type'] );
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
return $sub_query_conditions;
|
263 |
}
|
264 |
|
88 |
*/
|
89 |
public function find(
|
90 |
$post = array(
|
91 |
+
'category_id' => false,
|
92 |
+
'category_name' => false,
|
93 |
+
'post_type' => array( 'post', 'page' ),
|
94 |
+
'post_date_range_weeks' => false,
|
95 |
),
|
96 |
$limit = 20,
|
97 |
$filter = array(
|
130 |
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'cwp_meta_box_check', `meta_value`, '' ) SEPARATOR '' ) AS 'check',
|
131 |
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'cwp_rev_product_name', `meta_value`, '' ) SEPARATOR '' ) AS 'name',
|
132 |
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'cwp_rev_price', FORMAT( `meta_value`, 2 ), '' ) SEPARATOR '' ) AS 'price',
|
133 |
+
GROUP_CONCAT( DISTINCT IF( `meta_key` = 'wppr_rating', IF(FORMAT(`meta_value`, 2) = '100.00','99.99',FORMAT(`meta_value`,2) ),'') SEPARATOR '' ) AS 'rating'
|
134 |
FROM {$this->db->postmeta} m INNER JOIN {$this->db->posts} p on p.ID = m.post_ID
|
135 |
|
136 |
{$sub_query_posts}
|
170 |
return '';
|
171 |
}
|
172 |
$sub_selection_query = "INNER JOIN {$this->db->term_relationships } wtr ON wtr.object_id = p.ID
|
173 |
+
INNER JOIN {$this->db->term_taxonomy} wtt on wtt.term_taxonomy_id = wtr.term_taxonomy_id AND wtt.taxonomy = 'category'
|
174 |
INNER JOIN {$this->db->terms} wt
|
175 |
ON wt.term_id = wtt.term_id";
|
176 |
|
254 |
}
|
255 |
// TODO Check against available post_types.
|
256 |
if ( isset( $post['post_type'] ) && is_array( $post['post_type'] ) ) {
|
257 |
+
$filter_post_type = array_fill( 0, count( $post['post_type'] ), ' p.post_type = %s ' );
|
258 |
+
$filter_post_type = implode( ' OR ', $filter_post_type );
|
259 |
+
$filter_post_type = ' AND ( ' . $filter_post_type . ' ) ';
|
260 |
$sub_query_conditions .= $this->db->prepare( $filter_post_type, $post['post_type'] );
|
261 |
}
|
262 |
|
263 |
+
if ( isset( $post['post_date_range_weeks'] ) && ! is_bool( $post['post_date_range_weeks'] ) && is_array( $post['post_date_range_weeks'] ) ) {
|
264 |
+
$min = reset( $post['post_date_range_weeks'] );
|
265 |
+
$max = end( $post['post_date_range_weeks'] );
|
266 |
+
$sub_query_conditions .= $this->db->prepare( ' AND p.post_date >= DATE_ADD(now(), INTERVAL %d WEEK) AND p.post_date <= DATE_ADD(now(), INTERVAL %d WEEK) ', $min, $max );
|
267 |
+
}
|
268 |
+
|
269 |
return $sub_query_conditions;
|
270 |
}
|
271 |
|
includes/admin/models/class-wppr-review-model.php
CHANGED
@@ -564,7 +564,7 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
564 |
* @return string
|
565 |
*/
|
566 |
public function get_currency() {
|
567 |
-
return apply_filters( 'wppr_currency', empty( $this->currency ) ? '$' : $this->currency, $this->ID, $this );
|
568 |
}
|
569 |
|
570 |
/**
|
@@ -649,7 +649,7 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
649 |
global $wpdb;
|
650 |
// filter for image size;
|
651 |
$size = apply_filters( 'wppr_review_image_size', 'thumbnail', $this->ID, $this );
|
652 |
-
$attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid
|
653 |
$image_id = isset( $attachment[0] ) ? $attachment[0] : '';
|
654 |
$image_thumb = '';
|
655 |
if ( ! empty( $image_id ) ) {
|
@@ -1075,24 +1075,7 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
1075 |
return '';
|
1076 |
}
|
1077 |
|
1078 |
-
|
1079 |
-
* Prevent infinite loop by removing the wppr shortcodes from content.
|
1080 |
-
*/
|
1081 |
-
$wppr_shortcodes = apply_filters(
|
1082 |
-
'wppr_shortcodes', array(
|
1083 |
-
'P_REVIEW' => '',
|
1084 |
-
'wpr_landing' => '',
|
1085 |
-
'wpr_listing' => '',
|
1086 |
-
)
|
1087 |
-
);
|
1088 |
-
global $shortcode_tags;
|
1089 |
-
$temp_shortcode_tags = $shortcode_tags;
|
1090 |
-
$shortcode_tags = $wppr_shortcodes;
|
1091 |
-
$regex = '/' . get_shortcode_regex() . '/s';
|
1092 |
-
$shortcode_tags = $temp_shortcode_tags;
|
1093 |
-
$content = preg_replace( $regex, '', $content );
|
1094 |
-
$content = do_shortcode( $content );
|
1095 |
-
$content = wp_strip_all_tags( $content );
|
1096 |
|
1097 |
return apply_filters( 'wppr_content', $content, $this->ID, $this );
|
1098 |
}
|
@@ -1126,4 +1109,21 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
1126 |
|
1127 |
}
|
1128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1129 |
}
|
564 |
* @return string
|
565 |
*/
|
566 |
public function get_currency() {
|
567 |
+
return apply_filters( 'wppr_currency_code', apply_filters( 'wppr_currency', empty( $this->currency ) ? '$' : $this->currency, $this->ID, $this ) );
|
568 |
}
|
569 |
|
570 |
/**
|
649 |
global $wpdb;
|
650 |
// filter for image size;
|
651 |
$size = apply_filters( 'wppr_review_image_size', 'thumbnail', $this->ID, $this );
|
652 |
+
$attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid=%s", $this->image ) );
|
653 |
$image_id = isset( $attachment[0] ) ? $attachment[0] : '';
|
654 |
$image_thumb = '';
|
655 |
if ( ! empty( $image_id ) ) {
|
1075 |
return '';
|
1076 |
}
|
1077 |
|
1078 |
+
$content = wp_strip_all_tags( strip_shortcodes( $content ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1079 |
|
1080 |
return apply_filters( 'wppr_content', $content, $this->ID, $this );
|
1081 |
}
|
1109 |
|
1110 |
}
|
1111 |
|
1112 |
+
/**
|
1113 |
+
* Return css class based on the rating.
|
1114 |
+
*
|
1115 |
+
* @return string CSS class for the rating.
|
1116 |
+
*/
|
1117 |
+
public function get_rating_class( $value = - 1 ) {
|
1118 |
+
$element = ( $value < 0 ) ? $this->get_rating() : $value;
|
1119 |
+
if ( $element >= 75 ) {
|
1120 |
+
return 'wppr-very-good';
|
1121 |
+
} elseif ( $element < 75 && $element >= 50 ) {
|
1122 |
+
return 'wppr-good';
|
1123 |
+
} elseif ( $element < 50 && $element >= 25 ) {
|
1124 |
+
return 'wppr-not-bad';
|
1125 |
+
} else {
|
1126 |
+
return 'wppr-weak';
|
1127 |
+
}
|
1128 |
+
}
|
1129 |
}
|
includes/admin/widgets/abstract/class-wppr-widget-abstract.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
/**
|
13 |
* Class WPPR_Widget_Abstract
|
14 |
*/
|
15 |
-
class WPPR_Widget_Abstract extends WP_Widget {
|
16 |
const RESTRICT_TITLE_CHARS = 100;
|
17 |
|
18 |
/**
|
@@ -22,15 +22,27 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
22 |
* @access public
|
23 |
*/
|
24 |
public function assets( $review_object ) {
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
$plugin = new WPPR();
|
29 |
$public = new Wppr_Public( $plugin->get_plugin_name(), $plugin->get_version() );
|
30 |
|
31 |
$public->load_review_assets( $review_object );
|
32 |
}
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* Method for displaying the widget on the front end.
|
36 |
*
|
@@ -43,9 +55,15 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
43 |
* @return array
|
44 |
*/
|
45 |
public function widget( $args, $instance ) {
|
46 |
-
$instance['title']
|
47 |
-
$instance['no_items']
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
if ( isset( $instance['title_type'] ) ) {
|
50 |
$instance['post_type'] = apply_filters( 'widget_content', $instance['title_type'] );
|
51 |
} else {
|
@@ -95,7 +113,7 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
95 |
}
|
96 |
|
97 |
if ( ! isset( $instance['cwp_tp_category'] ) ) {
|
98 |
-
$instance['cwp_tp_category'] = 'Select Category';
|
99 |
}
|
100 |
|
101 |
if ( ! isset( $instance['title_type'] ) ) {
|
@@ -124,9 +142,21 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
124 |
$instance['cwp_tp_rating_type'] = 'star';
|
125 |
}
|
126 |
|
127 |
-
$instance['
|
128 |
-
|
129 |
-
$instance['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
|
132 |
return $instance;
|
@@ -151,7 +181,8 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
151 |
|
152 |
$instance['no_items'] = ( ! empty( $new_instance['no_items'] ) ) ? strip_tags( $new_instance['no_items'] ) : '';
|
153 |
|
154 |
-
$instance['
|
|
|
155 |
|
156 |
$instance['title_type'] = ( isset( $new_instance['title_type'] ) ) ? (bool) $new_instance['title_type'] : false;
|
157 |
$instance['show_image'] = ( isset( $new_instance['show_image'] ) ) ? (bool) $new_instance['show_image'] : false;
|
@@ -172,15 +203,33 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
172 |
*/
|
173 |
public function adminAssets() {
|
174 |
if ( is_admin() ) {
|
175 |
-
wp_enqueue_style( WPPR_SLUG . '-widget-admin-css', WPPR_URL . '/assets/css/cwppos-widget-admin.css', array(), WPPR_LITE_VERSION );
|
176 |
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
wp_localize_script(
|
179 |
WPPR_SLUG . '-widget-script', 'wppr_widget', array(
|
180 |
'names' => array( 'cwp_top_products_widget', 'cwp_latest_products_widget' ),
|
|
|
|
|
|
|
181 |
)
|
182 |
);
|
183 |
wp_enqueue_script( WPPR_SLUG . '-widget-script' );
|
|
|
184 |
}
|
185 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
12 |
/**
|
13 |
* Class WPPR_Widget_Abstract
|
14 |
*/
|
15 |
+
abstract class WPPR_Widget_Abstract extends WP_Widget {
|
16 |
const RESTRICT_TITLE_CHARS = 100;
|
17 |
|
18 |
/**
|
22 |
* @access public
|
23 |
*/
|
24 |
public function assets( $review_object ) {
|
25 |
+
|
26 |
+
$dependencies = $this->load_assets();
|
27 |
+
|
28 |
+
wp_enqueue_style( WPPR_SLUG . '-pac-widget-stylesheet', WPPR_URL . '/assets/css/cwppos-widget.css', isset( $dependencies['css'] ) ? $dependencies['css'] : array(), WPPR_LITE_VERSION );
|
29 |
+
wp_enqueue_style( WPPR_SLUG . '-widget-stylesheet-one', WPPR_URL . '/assets/css/cwppos-widget-style1.css', array( WPPR_SLUG . '-pac-widget-stylesheet' ), WPPR_LITE_VERSION );
|
30 |
+
wp_enqueue_style( WPPR_SLUG . '-widget-rating', WPPR_URL . '/assets/css/cwppos-widget-rating.css', array( WPPR_SLUG . '-pac-widget-stylesheet' ), WPPR_LITE_VERSION );
|
31 |
+
|
32 |
$plugin = new WPPR();
|
33 |
$public = new Wppr_Public( $plugin->get_plugin_name(), $plugin->get_version() );
|
34 |
|
35 |
$public->load_review_assets( $review_object );
|
36 |
}
|
37 |
|
38 |
+
/**
|
39 |
+
* Load public assets specific to this widget.
|
40 |
+
*
|
41 |
+
* @since 3.0.0
|
42 |
+
* @access public
|
43 |
+
*/
|
44 |
+
public abstract function load_assets();
|
45 |
+
|
46 |
/**
|
47 |
* Method for displaying the widget on the front end.
|
48 |
*
|
55 |
* @return array
|
56 |
*/
|
57 |
public function widget( $args, $instance ) {
|
58 |
+
$instance['title'] = apply_filters( 'widget_title', $instance['title'] );
|
59 |
+
$instance['no_items'] = apply_filters( 'widget_content', $instance['no_items'] );
|
60 |
+
|
61 |
+
if ( ! isset( $instance['cwp_tp_post_types'] ) || empty( $instance['cwp_tp_post_types'] ) ) {
|
62 |
+
$instance['cwp_tp_post_types'] = array( 'post', 'page' );
|
63 |
+
}
|
64 |
+
|
65 |
+
$instance['cwp_tp_post_types'] = apply_filters( 'widget_content', $instance['cwp_tp_post_types'] );
|
66 |
+
$instance['cwp_tp_category'] = apply_filters( 'widget_content', $instance['cwp_tp_category'] );
|
67 |
if ( isset( $instance['title_type'] ) ) {
|
68 |
$instance['post_type'] = apply_filters( 'widget_content', $instance['title_type'] );
|
69 |
} else {
|
113 |
}
|
114 |
|
115 |
if ( ! isset( $instance['cwp_tp_category'] ) ) {
|
116 |
+
$instance['cwp_tp_category'] = __( 'Select Category', 'wp-product-review' );
|
117 |
}
|
118 |
|
119 |
if ( ! isset( $instance['title_type'] ) ) {
|
142 |
$instance['cwp_tp_rating_type'] = 'star';
|
143 |
}
|
144 |
|
145 |
+
if ( ! isset( $instance['cwp_tp_post_types'] ) || empty( $instance['cwp_tp_post_types'] ) ) {
|
146 |
+
// backward compatibility with previous versions where you could not select post types
|
147 |
+
$instance['cwp_tp_post_types'] = array( 'post', 'page' );
|
148 |
+
}
|
149 |
+
|
150 |
+
if ( isset( $instance['cwp_tp_post_types'] ) && ! empty( $instance['cwp_tp_post_types'] ) ) {
|
151 |
+
$categories = array();
|
152 |
+
foreach ( $instance['cwp_tp_post_types'] as $type ) {
|
153 |
+
$post_type = get_post_type_object( $type );
|
154 |
+
$cats = WPPR_Admin::get_category_for_post_type( $type );
|
155 |
+
if ( $cats ) {
|
156 |
+
$categories[ $post_type->label ] = $cats;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
$instance['cwp_tp_all_categories'] = $categories;
|
160 |
}
|
161 |
|
162 |
return $instance;
|
181 |
|
182 |
$instance['no_items'] = ( ! empty( $new_instance['no_items'] ) ) ? strip_tags( $new_instance['no_items'] ) : '';
|
183 |
|
184 |
+
$instance['cwp_tp_post_types'] = ( ! empty( $new_instance['cwp_tp_post_types'] ) ) ? esc_sql( $new_instance['cwp_tp_post_types'] ) : '';
|
185 |
+
$instance['cwp_tp_category'] = ( ! empty( $new_instance['cwp_tp_category'] ) ) ? strip_tags( $new_instance['cwp_tp_category'] ) : '';
|
186 |
|
187 |
$instance['title_type'] = ( isset( $new_instance['title_type'] ) ) ? (bool) $new_instance['title_type'] : false;
|
188 |
$instance['show_image'] = ( isset( $new_instance['show_image'] ) ) ? (bool) $new_instance['show_image'] : false;
|
203 |
*/
|
204 |
public function adminAssets() {
|
205 |
if ( is_admin() ) {
|
|
|
206 |
|
207 |
+
$dependencies = $this->load_admin_assets();
|
208 |
+
|
209 |
+
wp_enqueue_style( WPPR_SLUG . '-widget-admin-css', WPPR_URL . '/assets/css/cwppos-widget-admin.css', isset( $dependencies['css'] ) ? $dependencies['css'] : array(), WPPR_LITE_VERSION );
|
210 |
+
wp_enqueue_style( WPPR_SLUG . '-chosen', WPPR_URL . '/assets/css/chosen.min.css', array(), WPPR_LITE_VERSION );
|
211 |
+
|
212 |
+
wp_enqueue_script( WPPR_SLUG . '-chosen', WPPR_URL . '/assets/js/chosen.jquery.min.js', array( 'jquery' ), WPPR_LITE_VERSION );
|
213 |
+
wp_register_script( WPPR_SLUG . '-widget-script', WPPR_URL . '/assets/js/widget-admin.js', array_merge( array( WPPR_SLUG . '-chosen' ), isset( $dependencies['js'] ) ? $dependencies['js'] : array() ), WPPR_LITE_VERSION );
|
214 |
+
|
215 |
wp_localize_script(
|
216 |
WPPR_SLUG . '-widget-script', 'wppr_widget', array(
|
217 |
'names' => array( 'cwp_top_products_widget', 'cwp_latest_products_widget' ),
|
218 |
+
'ajax' => array(
|
219 |
+
'nonce' => wp_create_nonce( WPPR_SLUG ),
|
220 |
+
),
|
221 |
)
|
222 |
);
|
223 |
wp_enqueue_script( WPPR_SLUG . '-widget-script' );
|
224 |
+
|
225 |
}
|
226 |
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Load admin assets specific to this widget.
|
230 |
+
*
|
231 |
+
* @since 3.0.0
|
232 |
+
* @access public
|
233 |
+
*/
|
234 |
+
public abstract function load_admin_assets();
|
235 |
}
|
includes/admin/widgets/class-wppr-latest-products-widget.php
CHANGED
@@ -59,6 +59,9 @@ class WPPR_Latest_Products_Widget extends WPPR_Widget_Abstract {
|
|
59 |
if ( isset( $instance['cwp_tp_category'] ) && trim( $instance['cwp_tp_category'] ) != '' ) {
|
60 |
$post['category_name'] = $instance['cwp_tp_category'];
|
61 |
}
|
|
|
|
|
|
|
62 |
$order = array();
|
63 |
$order['date'] = 'DESC';
|
64 |
|
@@ -108,4 +111,23 @@ class WPPR_Latest_Products_Widget extends WPPR_Widget_Abstract {
|
|
108 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
59 |
if ( isset( $instance['cwp_tp_category'] ) && trim( $instance['cwp_tp_category'] ) != '' ) {
|
60 |
$post['category_name'] = $instance['cwp_tp_category'];
|
61 |
}
|
62 |
+
if ( isset( $instance['cwp_tp_post_types'] ) && ! empty( $instance['cwp_tp_post_types'] ) ) {
|
63 |
+
$post['post_type'] = $instance['cwp_tp_post_types'];
|
64 |
+
}
|
65 |
$order = array();
|
66 |
$order['date'] = 'DESC';
|
67 |
|
111 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
112 |
}
|
113 |
|
114 |
+
/**
|
115 |
+
* Load public assets specific to this widget.
|
116 |
+
*
|
117 |
+
* @since 3.0.0
|
118 |
+
* @access public
|
119 |
+
*/
|
120 |
+
public function load_assets() {
|
121 |
+
// empty.
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Load admin assets specific to this widget.
|
126 |
+
*
|
127 |
+
* @since 3.0.0
|
128 |
+
* @access public
|
129 |
+
*/
|
130 |
+
public function load_admin_assets() {
|
131 |
+
// empty.
|
132 |
+
}
|
133 |
}
|
includes/admin/widgets/class-wppr-top-products-widget.php
CHANGED
@@ -74,6 +74,20 @@ class WPPR_Top_Products_Widget extends WPPR_Widget_Abstract {
|
|
74 |
if ( isset( $instance['cwp_tp_category'] ) && trim( $instance['cwp_tp_category'] ) != '' ) {
|
75 |
$post['category_name'] = $instance['cwp_tp_category'];
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$order = array();
|
78 |
$order['rating'] = 'DESC';
|
79 |
|
@@ -117,10 +131,58 @@ class WPPR_Top_Products_Widget extends WPPR_Widget_Abstract {
|
|
117 |
if ( ! isset( $instance['title'] ) ) {
|
118 |
$instance['title'] = __( 'Top Products', 'wp-product-review' );
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
120 |
$instance = parent::form( $instance );
|
121 |
|
122 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
}
|
74 |
if ( isset( $instance['cwp_tp_category'] ) && trim( $instance['cwp_tp_category'] ) != '' ) {
|
75 |
$post['category_name'] = $instance['cwp_tp_category'];
|
76 |
}
|
77 |
+
|
78 |
+
if ( isset( $instance['cwp_timespan'] ) && trim( $instance['cwp_timespan'] ) != '' ) {
|
79 |
+
$min_max = explode( ',', $instance['cwp_timespan'] );
|
80 |
+
$min = intval( reset( $min_max ) );
|
81 |
+
$max = intval( end( $min_max ) );
|
82 |
+
if ( 0 === $min && 0 === $max ) {
|
83 |
+
$post['post_date_range_weeks'] = false;
|
84 |
+
} else {
|
85 |
+
$post['post_date_range_weeks'] = array( $min, $max );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
if ( isset( $instance['cwp_tp_post_types'] ) && ! empty( $instance['cwp_tp_post_types'] ) ) {
|
89 |
+
$post['post_type'] = $instance['cwp_tp_post_types'];
|
90 |
+
}
|
91 |
$order = array();
|
92 |
$order['rating'] = 'DESC';
|
93 |
|
131 |
if ( ! isset( $instance['title'] ) ) {
|
132 |
$instance['title'] = __( 'Top Products', 'wp-product-review' );
|
133 |
}
|
134 |
+
|
135 |
+
if ( ! isset( $instance['cwp_timespan'] ) || empty( $instance['cwp_timespan'] ) ) {
|
136 |
+
$instance['cwp_timespan'] = '0,0';
|
137 |
+
}
|
138 |
+
|
139 |
$instance = parent::form( $instance );
|
140 |
|
141 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
142 |
}
|
143 |
|
144 |
+
/**
|
145 |
+
* Load public assets specific to this widget.
|
146 |
+
*
|
147 |
+
* @since 3.0.0
|
148 |
+
* @access public
|
149 |
+
*/
|
150 |
+
public function load_assets() {
|
151 |
+
// empty.
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Load admin assets specific to this widget.
|
156 |
+
*
|
157 |
+
* @since 3.0.0
|
158 |
+
* @access public
|
159 |
+
*/
|
160 |
+
public function load_admin_assets() {
|
161 |
+
wp_enqueue_script( 'jquery-ui-slider' );
|
162 |
+
wp_enqueue_style( WPPR_SLUG . '-jqueryui', WPPR_URL . '/assets/css/jquery-ui.css', array(), WPPR_LITE_VERSION );
|
163 |
+
|
164 |
+
$deps = array();
|
165 |
+
$deps['js'] = array( 'jquery-ui-slider' );
|
166 |
+
$deps['css'] = array( WPPR_SLUG . '-jqueryui' );
|
167 |
+
return $deps;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Method to update widget data.
|
172 |
+
*
|
173 |
+
* @since 3.0.0
|
174 |
+
* @access public
|
175 |
+
*
|
176 |
+
* @param array $new_instance The new instance array for the widget.
|
177 |
+
* @param array $old_instance The old instance array of the widget.
|
178 |
+
*
|
179 |
+
* @return array
|
180 |
+
*/
|
181 |
+
public function update( $new_instance, $old_instance ) {
|
182 |
+
$instance = parent::update( $new_instance, $old_instance );
|
183 |
+
|
184 |
+
$instance['cwp_timespan'] = ( ! empty( $new_instance['cwp_timespan'] ) ) ? strip_tags( $new_instance['cwp_timespan'] ) : '';
|
185 |
+
return $instance;
|
186 |
+
}
|
187 |
|
188 |
}
|
includes/class-wppr.php
CHANGED
@@ -67,7 +67,7 @@ class WPPR {
|
|
67 |
*/
|
68 |
public function __construct() {
|
69 |
$this->plugin_name = 'wppr';
|
70 |
-
$this->version = '3.
|
71 |
|
72 |
$this->load_dependencies();
|
73 |
$this->set_locale();
|
@@ -123,6 +123,7 @@ class WPPR {
|
|
123 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
124 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
125 |
$this->loader->add_action( 'wp_ajax_update_options', $plugin_admin, 'update_options' );
|
|
|
126 |
|
127 |
$plugin_editor = new WPPR_Editor( $this->get_plugin_name(), $this->get_version() );
|
128 |
$this->loader->add_action( 'add_meta_boxes', $plugin_editor, 'set_editor' );
|
67 |
*/
|
68 |
public function __construct() {
|
69 |
$this->plugin_name = 'wppr';
|
70 |
+
$this->version = '3.2.0';
|
71 |
|
72 |
$this->load_dependencies();
|
73 |
$this->set_locale();
|
123 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
124 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
125 |
$this->loader->add_action( 'wp_ajax_update_options', $plugin_admin, 'update_options' );
|
126 |
+
$this->loader->add_action( 'wp_ajax_get_categories', $plugin_admin, 'get_categories' );
|
127 |
|
128 |
$plugin_editor = new WPPR_Editor( $this->get_plugin_name(), $this->get_version() );
|
129 |
$this->loader->add_action( 'add_meta_boxes', $plugin_editor, 'set_editor' );
|
includes/legacy.php
CHANGED
@@ -23,7 +23,7 @@ function cwppos_show_review( $post_id ) {
|
|
23 |
$output = '';
|
24 |
if ( $review_object->is_active() ) {
|
25 |
$template = new WPPR_Template();
|
26 |
-
$output
|
27 |
'default', array(
|
28 |
'review_object' => $review_object,
|
29 |
), false
|
23 |
$output = '';
|
24 |
if ( $review_object->is_active() ) {
|
25 |
$template = new WPPR_Template();
|
26 |
+
$output .= $template->render(
|
27 |
'default', array(
|
28 |
'review_object' => $review_object,
|
29 |
), false
|
includes/public/class-wppr-public.php
CHANGED
@@ -96,50 +96,32 @@ class Wppr_Public {
|
|
96 |
return;
|
97 |
}
|
98 |
|
99 |
-
wp_enqueue_script( $this->plugin_name . '-pie-chart-js', WPPR_URL . '/assets/js/pie-chart.js', array( 'jquery' ), $this->version, true );
|
100 |
-
wp_enqueue_script(
|
101 |
-
$this->plugin_name . '-frontpage-js', WPPR_URL . '/assets/js/main.js', array(
|
102 |
-
'jquery',
|
103 |
-
$this->plugin_name . '-pie-chart-js',
|
104 |
-
), $this->version, true
|
105 |
-
);
|
106 |
if ( $review->wppr_get_option( 'cwppos_lighbox' ) == 'no' ) {
|
107 |
wp_enqueue_script( $this->plugin_name . '-lightbox-js', WPPR_URL . '/assets/js/lightbox.min.js', array( 'jquery' ), $this->version, true );
|
|
|
108 |
}
|
109 |
|
110 |
if ( $review->wppr_get_option( 'cwppos_show_userreview' ) == 'yes' ) {
|
111 |
wp_enqueue_script( 'jquery-ui-slider' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
|
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
wp_enqueue_style( $this->plugin_name . '-lightbox-css', WPPR_URL . '/assets/css/lightbox.css', array(), $this->version );
|
117 |
-
}
|
118 |
-
if ( $review->wppr_get_option( 'cwppos_show_userreview' ) == 'yes' ) {
|
119 |
-
|
120 |
-
wp_enqueue_style( $this->plugin_name . 'jqueryui', WPPR_URL . '/assets/css/jquery-ui.css', array(), $this->version );
|
121 |
-
}
|
122 |
-
|
123 |
-
global $content_width;
|
124 |
-
if ( $review->wppr_get_option( 'cwppos_widget_size' ) != '' ) {
|
125 |
-
$width = $review->wppr_get_option( 'cwppos_widget_size' );
|
126 |
-
} else {
|
127 |
-
$width = $content_width;
|
128 |
-
}
|
129 |
-
if ( $width < 200 ) {
|
130 |
-
$width = 600;
|
131 |
-
}
|
132 |
-
$img_size = min( 180, $width * 0.51 * 0.4 );
|
133 |
-
$height_left = $img_size + 10;
|
134 |
-
|
135 |
-
$conditional_media_styles = '';
|
136 |
-
if ( $review->wppr_get_option( 'cwppos_widget_size' ) != '' ) {
|
137 |
-
$conditional_media_styles = '
|
138 |
-
#review-statistics {
|
139 |
-
width: ' . $review->wppr_get_option( 'cwppos_widget_size' ) . 'px;
|
140 |
-
}
|
141 |
-
';
|
142 |
}
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
$conditional_styles = '';
|
145 |
if ( $review->wppr_get_option( 'cwppos_show_icon' ) == 'yes' ) {
|
@@ -162,25 +144,96 @@ class Wppr_Public {
|
|
162 |
';
|
163 |
}
|
164 |
|
165 |
-
$style = '
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
#review-statistics .review-wrap-up div.cwpr-review-top {
|
185 |
border-top: ' . $review->wppr_get_option( 'cwppos_reviewboxbd_width' ) . 'px solid ' . $review->wppr_get_option( 'cwppos_reviewboxbd_color' ) . ';
|
186 |
}
|
@@ -188,13 +241,17 @@ class Wppr_Public {
|
|
188 |
.user-comments-grades .comment-meta-grade-bar,
|
189 |
#review-statistics .review-wu-bars ul li {
|
190 |
background: ' . $review->wppr_get_option( 'cwppos_rating_default' ) . ';
|
|
|
191 |
}
|
192 |
|
193 |
#review-statistics .rev-option.customBarIcon ul li {
|
194 |
color: ' . $review->wppr_get_option( 'cwppos_rating_default' ) . ';
|
195 |
}
|
196 |
|
197 |
-
#review-statistics .review-wrap-up .review-wu-right ul li,
|
|
|
|
|
|
|
198 |
color: ' . $review->wppr_get_option( 'cwppos_font_color' ) . ';
|
199 |
}
|
200 |
|
@@ -233,49 +290,8 @@ class Wppr_Public {
|
|
233 |
' . $conditional_styles . '
|
234 |
|
235 |
';
|
236 |
-
|
237 |
-
$script = '
|
238 |
-
var c1 = "' . $review->wppr_get_option( 'cwppos_rating_weak' ) . '";
|
239 |
-
var c2 = "' . $review->wppr_get_option( 'cwppos_rating_notbad' ) . '";
|
240 |
-
var c3 = "' . $review->wppr_get_option( 'cwppos_rating_good' ) . '";
|
241 |
-
var c4 = "' . $review->wppr_get_option( 'cwppos_rating_very_good' ) . '";
|
242 |
-
|
243 |
-
';
|
244 |
-
|
245 |
-
if ( class_exists( 'WPPR_Pro' ) ) {
|
246 |
-
$isSetToPro = true;
|
247 |
-
} else {
|
248 |
-
$isSetToPro = false;
|
249 |
-
}
|
250 |
-
|
251 |
-
if ( $isSetToPro ) {
|
252 |
-
$uni_font = $review->wppr_get_option( 'cwppos_change_bar_icon' );
|
253 |
-
} else {
|
254 |
-
$uni_font = '';
|
255 |
-
}
|
256 |
-
$track = $review->wppr_get_option( 'cwppos_rating_chart_default' );
|
257 |
-
if ( is_array( $uni_font ) ) {
|
258 |
-
$uni_font = $uni_font[0];
|
259 |
-
} elseif ( substr( $uni_font, 0, 1 ) == '#' ) {
|
260 |
-
$uni_font = $uni_font;
|
261 |
-
} else {
|
262 |
-
$uni_font = '';
|
263 |
-
}
|
264 |
-
|
265 |
-
if ( ! empty( $uni_font ) ) {
|
266 |
-
if ( $isSetToPro ) {
|
267 |
-
if ( $review->wppr_get_option( 'cwppos_fontawesome' ) === 'no' ) {
|
268 |
-
wp_enqueue_style( 'cwp-pac-fontawesome-stylesheet', WPPR_URL . '/assets/css/font-awesome.min.css' );
|
269 |
-
}
|
270 |
-
}
|
271 |
-
}
|
272 |
-
$script .= "
|
273 |
-
var cwpCustomBarIcon = '" . $uni_font . "';
|
274 |
-
var isSetToPro = '" . $isSetToPro . "';
|
275 |
-
var trackcolor = '" . $track . "';
|
276 |
-
";
|
277 |
wp_add_inline_style( $this->plugin_name . '-frontpage-stylesheet', $style );
|
278 |
-
wp_add_inline_script( $this->plugin_name . '-frontpage-js', $script );
|
279 |
}
|
280 |
|
281 |
/**
|
@@ -418,15 +434,16 @@ class Wppr_Public {
|
|
418 |
if ( empty( $options ) ) {
|
419 |
return $text;
|
420 |
}
|
421 |
-
$return
|
422 |
$return .= '<div class="user-comments-grades">';
|
423 |
foreach ( $options as $k => $option ) {
|
424 |
-
$
|
|
|
425 |
<p class="comment-meta-option-name">' . $option['name'] . '</p>
|
426 |
<p class="comment-meta-option-grade">' . $option['value'] . '</p>
|
427 |
<div class="cwpr_clearfix"></div>
|
428 |
-
<div class="comment-meta-grade-bar">
|
429 |
-
<div class="comment-meta-grade" style="width: ' .
|
430 |
</div><!-- end .comment-meta-grade-bar -->
|
431 |
</div><!-- end .comment-meta-option -->
|
432 |
';
|
96 |
return;
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
if ( $review->wppr_get_option( 'cwppos_lighbox' ) == 'no' ) {
|
100 |
wp_enqueue_script( $this->plugin_name . '-lightbox-js', WPPR_URL . '/assets/js/lightbox.min.js', array( 'jquery' ), $this->version, true );
|
101 |
+
wp_enqueue_style( $this->plugin_name . '-lightbox-css', WPPR_URL . '/assets/css/lightbox.css', array(), $this->version );
|
102 |
}
|
103 |
|
104 |
if ( $review->wppr_get_option( 'cwppos_show_userreview' ) == 'yes' ) {
|
105 |
wp_enqueue_script( 'jquery-ui-slider' );
|
106 |
+
wp_enqueue_script(
|
107 |
+
$this->plugin_name . '-frontpage-js', WPPR_URL . '/assets/js/main.js', array(
|
108 |
+
'jquery',
|
109 |
+
), $this->version, true
|
110 |
+
);
|
111 |
+
if ( $review->wppr_get_option( 'cwppos_show_userreview' ) == 'yes' ) {
|
112 |
+
wp_enqueue_style( $this->plugin_name . 'jqueryui', WPPR_URL . '/assets/css/jquery-ui.css', array(), $this->version );
|
113 |
+
}
|
114 |
}
|
115 |
+
$icon = $review->wppr_get_option( 'cwppos_change_bar_icon' );
|
116 |
|
117 |
+
if ( ! empty( $icon ) && $review->wppr_get_option( 'cwppos_fontawesome' ) == 'no' ) {
|
118 |
+
wp_enqueue_style( $this->plugin_name . 'font-awesome', WPPR_URL . '/assets/css/font-awesome.min.css', array(), $this->version );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
+
wp_enqueue_style( $this->plugin_name . '-frontpage-stylesheet', WPPR_URL . '/assets/css/frontpage.css', array(), $this->version );
|
121 |
+
wp_enqueue_style(
|
122 |
+
$this->plugin_name . '-percentage-circle', WPPR_URL . '/assets/css/circle.css', array(),
|
123 |
+
$this->version
|
124 |
+
);
|
125 |
|
126 |
$conditional_styles = '';
|
127 |
if ( $review->wppr_get_option( 'cwppos_show_icon' ) == 'yes' ) {
|
144 |
';
|
145 |
}
|
146 |
|
147 |
+
$style = '
|
148 |
+
#review-statistics .review-wu-grade .c100,
|
149 |
+
.review-grade-widget .c100 {
|
150 |
+
background-color: ' . $review->wppr_get_option( 'cwppos_rating_chart_default' ) . ';
|
151 |
+
}
|
152 |
+
|
153 |
+
#review-statistics .review-wu-grade .c100.wppr-weak span,
|
154 |
+
.review-grade-widget .c100.wppr-weak span {
|
155 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_weak' ) . ';
|
156 |
+
}
|
157 |
+
|
158 |
+
#review-statistics .review-wu-grade .c100.wppr-weak .fill,
|
159 |
+
#review-statistics .review-wu-grade .c100.wppr-weak .bar,
|
160 |
+
.review-grade-widget .c100.wppr-weak .fill,
|
161 |
+
.review-grade-widget .c100.wppr-weak .bar {
|
162 |
+
border-color: ' . $review->wppr_get_option( 'cwppos_rating_weak' ) . ';
|
163 |
+
}
|
164 |
+
|
165 |
+
.user-comments-grades .comment-meta-grade-bar.wppr-weak .comment-meta-grade {
|
166 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_weak' ) . ';
|
167 |
+
}
|
168 |
+
|
169 |
+
#review-statistics .review-wu-grade .c100.wppr-not-bad span,
|
170 |
+
.review-grade-widget .c100.wppr-not-bad span {
|
171 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_notbad' ) . ';
|
172 |
+
}
|
173 |
+
|
174 |
+
#review-statistics .review-wu-grade .c100.wppr-not-bad .fill,
|
175 |
+
#review-statistics .review-wu-grade .c100.wppr-not-bad .bar,
|
176 |
+
.review-grade-widget .c100.wppr-not-bad .fill,
|
177 |
+
.review-grade-widget .c100.wppr-not-bad .bar {
|
178 |
+
border-color: ' . $review->wppr_get_option( 'cwppos_rating_notbad' ) . ';
|
179 |
+
}
|
180 |
+
|
181 |
+
.user-comments-grades .comment-meta-grade-bar.wppr-not-bad .comment-meta-grade {
|
182 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_notbad' ) . ';
|
183 |
+
}
|
184 |
+
|
185 |
+
#review-statistics .review-wu-grade .c100.wppr-good span,
|
186 |
+
.review-grade-widget .c100.wppr-good span {
|
187 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_good' ) . ';
|
188 |
+
}
|
189 |
+
|
190 |
+
#review-statistics .review-wu-grade .c100.wppr-good .fill,
|
191 |
+
#review-statistics .review-wu-grade .c100.wppr-good .bar,
|
192 |
+
.review-grade-widget .c100.wppr-good .fill,
|
193 |
+
.review-grade-widget .c100.wppr-good .bar {
|
194 |
+
border-color: ' . $review->wppr_get_option( 'cwppos_rating_good' ) . ';
|
195 |
+
}
|
196 |
+
|
197 |
+
.user-comments-grades .comment-meta-grade-bar.wppr-good .comment-meta-grade {
|
198 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_good' ) . ';
|
199 |
+
}
|
200 |
+
|
201 |
+
#review-statistics .review-wu-grade .c100.wppr-very-good span,
|
202 |
+
.review-grade-widget .c100.wppr-very-good span {
|
203 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_very_good' ) . ';
|
204 |
+
}
|
205 |
+
|
206 |
+
#review-statistics .review-wu-grade .c100.wppr-very-good .fill,
|
207 |
+
#review-statistics .review-wu-grade .c100.wppr-very-good .bar,
|
208 |
+
.review-grade-widget .c100.wppr-very-good .fill,
|
209 |
+
.review-grade-widget .c100.wppr-very-good .bar {
|
210 |
+
border-color: ' . $review->wppr_get_option( 'cwppos_rating_very_good' ) . ';
|
211 |
+
}
|
212 |
+
|
213 |
+
.user-comments-grades .comment-meta-grade-bar.wppr-very-good .comment-meta-grade {
|
214 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_very_good' ) . ';
|
215 |
+
}
|
216 |
+
|
217 |
+
#review-statistics .review-wu-bars ul.wppr-weak li.colored {
|
218 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_weak' ) . ';
|
219 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_weak' ) . ';
|
220 |
+
}
|
221 |
+
|
222 |
+
#review-statistics .review-wu-bars ul.wppr-not-bad li.colored {
|
223 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_notbad' ) . ';
|
224 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_notbad' ) . ';
|
225 |
+
}
|
226 |
+
|
227 |
+
#review-statistics .review-wu-bars ul.wppr-good li.colored {
|
228 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_good' ) . ';
|
229 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_good' ) . ';
|
230 |
+
}
|
231 |
+
|
232 |
+
#review-statistics .review-wu-bars ul.wppr-very-good li.colored {
|
233 |
+
background: ' . $review->wppr_get_option( 'cwppos_rating_very_good' ) . ';
|
234 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_very_good' ) . ';
|
235 |
+
}
|
236 |
+
|
237 |
#review-statistics .review-wrap-up div.cwpr-review-top {
|
238 |
border-top: ' . $review->wppr_get_option( 'cwppos_reviewboxbd_width' ) . 'px solid ' . $review->wppr_get_option( 'cwppos_reviewboxbd_color' ) . ';
|
239 |
}
|
241 |
.user-comments-grades .comment-meta-grade-bar,
|
242 |
#review-statistics .review-wu-bars ul li {
|
243 |
background: ' . $review->wppr_get_option( 'cwppos_rating_default' ) . ';
|
244 |
+
color: ' . $review->wppr_get_option( 'cwppos_rating_default' ) . ';
|
245 |
}
|
246 |
|
247 |
#review-statistics .rev-option.customBarIcon ul li {
|
248 |
color: ' . $review->wppr_get_option( 'cwppos_rating_default' ) . ';
|
249 |
}
|
250 |
|
251 |
+
#review-statistics .review-wrap-up .review-wu-right ul li,
|
252 |
+
#review-statistics .review-wu-bars h3,
|
253 |
+
.review-wu-bars span,
|
254 |
+
#review-statistics .review-wrap-up .cwpr-review-top .cwp-item-category a {
|
255 |
color: ' . $review->wppr_get_option( 'cwppos_font_color' ) . ';
|
256 |
}
|
257 |
|
290 |
' . $conditional_styles . '
|
291 |
|
292 |
';
|
293 |
+
$style = apply_filters( 'wppr_global_style', $style );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
wp_add_inline_style( $this->plugin_name . '-frontpage-stylesheet', $style );
|
|
|
295 |
}
|
296 |
|
297 |
/**
|
434 |
if ( empty( $options ) ) {
|
435 |
return $text;
|
436 |
}
|
437 |
+
$return = '';
|
438 |
$return .= '<div class="user-comments-grades">';
|
439 |
foreach ( $options as $k => $option ) {
|
440 |
+
$intGrade = intval( $option['value'] * 10 );
|
441 |
+
$return .= '<div class="comment-meta-option">
|
442 |
<p class="comment-meta-option-name">' . $option['name'] . '</p>
|
443 |
<p class="comment-meta-option-grade">' . $option['value'] . '</p>
|
444 |
<div class="cwpr_clearfix"></div>
|
445 |
+
<div class="comment-meta-grade-bar ' . $this->review->get_rating_class( $intGrade ) . '">
|
446 |
+
<div class="comment-meta-grade" style="width: ' . $intGrade . '%"></div>
|
447 |
</div><!-- end .comment-meta-grade-bar -->
|
448 |
</div><!-- end .comment-meta-option -->
|
449 |
';
|
includes/public/layouts/default.php
CHANGED
@@ -29,6 +29,7 @@ if ( $review_object->get_click() == 'image' ) {
|
|
29 |
$pros = $review_object->get_pros();
|
30 |
$cons = $review_object->get_cons();
|
31 |
|
|
|
32 |
?>
|
33 |
<div id="wppr-review-<?php echo $review_object->get_ID(); ?>"
|
34 |
class="wppr-review-container <?php echo( empty( $pros ) ? 'wppr-review-no-pros' : '' ); ?> <?php echo( empty( $cons ) ? 'wppr-review-no-cons' : '' ); ?>">
|
@@ -37,100 +38,108 @@ $cons = $review_object->get_cons();
|
|
37 |
<div class="cwpr-review-top cwpr_clearfix">
|
38 |
<span><h2 class="cwp-item"><?php echo esc_html( $review_object->get_name() ); ?></h2></span>
|
39 |
<span class="cwp-item-price cwp-item"><span>
|
40 |
-
|
41 |
-
</span></span>
|
42 |
</div><!-- end .cwpr-review-top -->
|
43 |
-
<div class="review-wu-
|
44 |
-
<div class="
|
45 |
-
<
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
<div class="review-wu-bars">
|
62 |
-
<?php
|
63 |
-
foreach ( $review_object->get_options() as $option ) {
|
64 |
-
?>
|
65 |
-
<div class="rev-option" data-value="<?php echo $option['value']; ?>">
|
66 |
-
<div class="cwpr_clearfix">
|
67 |
-
<h3><?php echo esc_html( apply_filters( 'wppr_option_name_html', $option['name'] ) ); ?></h3>
|
68 |
-
<span><?php echo esc_html( round( $option['value'] / 10 ) ); ?>/10 </span>
|
69 |
</div>
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
)
|
90 |
-
)
|
91 |
-
);
|
92 |
-
?>
|
93 |
-
</h2>
|
94 |
-
<ul>
|
95 |
-
<?php
|
96 |
-
foreach ( $pros as $pro ) {
|
97 |
?>
|
98 |
-
|
|
|
99 |
<?php
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
106 |
if ( ! empty( $cons ) ) :
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
)
|
116 |
)
|
117 |
-
)
|
118 |
-
|
119 |
-
</h2>
|
120 |
-
<ul>
|
121 |
-
<?php
|
122 |
-
foreach ( $cons as $con ) {
|
123 |
?>
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
-
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
|
131 |
-
<?php endif; ?>
|
132 |
-
|
133 |
-
|
|
|
134 |
</div><!-- end .review-wrap-up -->
|
135 |
</section>
|
136 |
<?php
|
29 |
$pros = $review_object->get_pros();
|
30 |
$cons = $review_object->get_cons();
|
31 |
|
32 |
+
|
33 |
?>
|
34 |
<div id="wppr-review-<?php echo $review_object->get_ID(); ?>"
|
35 |
class="wppr-review-container <?php echo( empty( $pros ) ? 'wppr-review-no-pros' : '' ); ?> <?php echo( empty( $cons ) ? 'wppr-review-no-cons' : '' ); ?>">
|
38 |
<div class="cwpr-review-top cwpr_clearfix">
|
39 |
<span><h2 class="cwp-item"><?php echo esc_html( $review_object->get_name() ); ?></h2></span>
|
40 |
<span class="cwp-item-price cwp-item"><span>
|
41 |
+
<span><?php echo esc_html( empty( $price_raw ) ? '' : $price_raw ); ?></span>
|
|
|
42 |
</div><!-- end .cwpr-review-top -->
|
43 |
+
<div class="review-wu-content cwpr_clearfix">
|
44 |
+
<div class="review-wu-left">
|
45 |
+
<div class="review-wu-left-top">
|
46 |
+
<div class="rev-wu-image">
|
47 |
+
<a href="<?php echo esc_url( $image_link ); ?>" <?php echo $lightbox; ?> rel="nofollow"
|
48 |
+
target="_blank"><img src="<?php echo esc_attr( $review_object->get_small_thumbnail() ); ?>" alt="<?php echo esc_attr( $review_object->get_name() ); ?>" class="photo photo-wrapup wppr-product-image"/></a>
|
49 |
+
</div><!-- end .rev-wu-image -->
|
50 |
+
|
51 |
+
<div class="review-wu-grade">
|
52 |
+
<div class="review-wu-grade-content">
|
53 |
+
<div class="c100 p<?php echo esc_attr( round( $review_object->get_rating() ) ) . ' ' . $review_object->get_rating_class(); ?>">
|
54 |
+
<span><?php echo esc_html( round( $review_object->get_rating(), 0 ) / 10 ); ?></span>
|
55 |
+
<div class="slice">
|
56 |
+
<div class="bar"></div>
|
57 |
+
<div class="fill"></div>
|
58 |
+
</div>
|
59 |
+
<div class="slice-center"></div>
|
60 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
</div>
|
62 |
+
</div><!-- end .review-wu-grade -->
|
63 |
+
</div><!-- end .review-wu-left-top -->
|
64 |
+
|
65 |
+
<div class="review-wu-bars">
|
66 |
+
<?php foreach ( $review_object->get_options() as $option ) { ?>
|
67 |
+
<div class="rev-option" data-value="
|
68 |
+
<?php echo $option['value']; ?>">
|
69 |
+
<div class="cwpr_clearfix">
|
70 |
+
<h3><?php echo esc_html( apply_filters( 'wppr_option_name_html', $option['name'] ) ); ?></h3>
|
71 |
+
<span><?php echo esc_html( round( $option['value'] / 10 ) ); ?>/10 </span>
|
72 |
+
</div>
|
73 |
+
<ul class="cwpr_clearfix <?php echo $review_object->get_rating_class( $option['value'] ) . apply_filters( 'wppr_option_custom_icon', '' ); ?>">
|
74 |
+
<?php for ( $i = 1; $i <= 10; $i++ ) { ?>
|
75 |
+
<li
|
76 |
+
<?php
|
77 |
+
echo $i <= round( $option['value'] / 10 ) ? ' class="colored"' : '';
|
78 |
+
?>
|
79 |
+
></li>
|
80 |
+
<?php } ?>
|
81 |
+
</ul>
|
82 |
+
</div>
|
83 |
+
<?php } ?>
|
84 |
+
</div><!-- end .review-wu-bars -->
|
85 |
+
</div><!-- end .review-wu-left -->
|
86 |
+
|
87 |
+
<?php if ( ! empty( $pros ) || ! empty( $cons ) ) : ?>
|
88 |
+
<div class="review-wu-right">
|
89 |
+
<?php if ( ! empty( $pros ) ) : ?>
|
90 |
+
<div class="pros">
|
91 |
+
<h2>
|
92 |
+
<?php
|
93 |
+
echo esc_html(
|
94 |
+
apply_filters(
|
95 |
+
'wppr_review_pros_text', $review_object->wppr_get_option(
|
96 |
+
'cwppos_pros_text'
|
97 |
+
)
|
98 |
)
|
99 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
?>
|
101 |
+
</h2>
|
102 |
+
<ul>
|
103 |
<?php
|
104 |
+
foreach ( $pros as $pro ) {
|
105 |
+
?>
|
106 |
+
<li><?php echo esc_html( $pro ); ?></li>
|
107 |
+
<?php
|
108 |
+
}
|
109 |
+
?>
|
110 |
+
</ul>
|
111 |
+
</div><!-- end .pros -->
|
112 |
+
<?php
|
113 |
+
endif;
|
114 |
if ( ! empty( $cons ) ) :
|
115 |
+
?>
|
116 |
+
<div class="cons">
|
117 |
+
<h2>
|
118 |
+
<?php
|
119 |
+
echo esc_html(
|
120 |
+
apply_filters(
|
121 |
+
'wppr_review_cons_text', $review_object->wppr_get_option(
|
122 |
+
'cwppos_cons_text'
|
|
|
123 |
)
|
124 |
+
)
|
125 |
+
);
|
|
|
|
|
|
|
|
|
126 |
?>
|
127 |
+
</h2>
|
128 |
+
<ul>
|
129 |
+
<?php
|
130 |
+
foreach ( $cons as $con ) {
|
131 |
+
?>
|
132 |
|
133 |
+
<li><?php echo esc_html( $con ); ?></li>
|
134 |
|
135 |
+
<?php } ?>
|
136 |
+
</ul>
|
137 |
+
</div>
|
138 |
|
139 |
+
<?php endif; ?>
|
140 |
+
</div><!-- end .review-wu-right -->
|
141 |
+
<?php endif; ?>
|
142 |
+
</div><!-- end .review-wu-content -->
|
143 |
</div><!-- end .review-wrap-up -->
|
144 |
</section>
|
145 |
<?php
|
includes/public/layouts/rating-tpl.php
CHANGED
@@ -9,16 +9,17 @@
|
|
9 |
* @since 3.0.0
|
10 |
* @deprecated
|
11 |
*/
|
12 |
-
|
13 |
-
$review
|
14 |
$sub_title_info = '';
|
15 |
-
$sub_title_info
|
16 |
if ( $sub_title_info != '' ) {
|
17 |
$is_disabled = apply_filters( 'wppr_disable_price_richsnippet', false );
|
18 |
-
$currency
|
19 |
if ( ! $is_disabled ) {
|
|
|
20 |
$sub_title_info = '<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
21 |
-
<span itemprop="priceCurrency">' . $currency . '</span>
|
22 |
<span itemprop="price">' . $review['price'] . '</span>
|
23 |
</span>';
|
24 |
}
|
@@ -28,15 +29,15 @@ $lightbox = '';
|
|
28 |
if ( $review_object->wppr_get_option( 'cwppos_lighbox' ) == 'no' ) {
|
29 |
$lightbox = 'data-lightbox="' . $review['image']['full'] . '"';
|
30 |
}
|
31 |
-
$image_link_url
|
32 |
$multiple_affiliates_class = 'affiliate-button';
|
33 |
-
$display_links_count
|
34 |
foreach ( $review['links'] as $title => $link ) {
|
35 |
if ( $title != '' && $link != '' ) {
|
36 |
if ( $review['click'] != 'image' ) {
|
37 |
$image_link_url = $link;
|
38 |
}
|
39 |
-
$display_links_count++;
|
40 |
}
|
41 |
}
|
42 |
if ( $display_links_count > 1 ) {
|
9 |
* @since 3.0.0
|
10 |
* @deprecated
|
11 |
*/
|
12 |
+
_deprecated_file( __FILE__, '3.1.0', 'Bundle version', ' The shortcode is no longer supported using this version. You need to update to the latest premium and lite in order to use this feature.' );
|
13 |
+
$review = $review_object->get_review_data();
|
14 |
$sub_title_info = '';
|
15 |
+
$sub_title_info = $review['price'];
|
16 |
if ( $sub_title_info != '' ) {
|
17 |
$is_disabled = apply_filters( 'wppr_disable_price_richsnippet', false );
|
18 |
+
$currency = preg_replace( '/[0-9.,]/', '', $review['price'] );
|
19 |
if ( ! $is_disabled ) {
|
20 |
+
$country_iso = apply_filters( 'wppr_currency_code', $currency );
|
21 |
$sub_title_info = '<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
22 |
+
<span itemprop="priceCurrency" content="' . $country_iso . '">' . $currency . '</span>
|
23 |
<span itemprop="price">' . $review['price'] . '</span>
|
24 |
</span>';
|
25 |
}
|
29 |
if ( $review_object->wppr_get_option( 'cwppos_lighbox' ) == 'no' ) {
|
30 |
$lightbox = 'data-lightbox="' . $review['image']['full'] . '"';
|
31 |
}
|
32 |
+
$image_link_url = $review['image']['full'];
|
33 |
$multiple_affiliates_class = 'affiliate-button';
|
34 |
+
$display_links_count = 0;
|
35 |
foreach ( $review['links'] as $title => $link ) {
|
36 |
if ( $title != '' && $link != '' ) {
|
37 |
if ( $review['click'] != 'image' ) {
|
38 |
$image_link_url = $link;
|
39 |
}
|
40 |
+
$display_links_count ++;
|
41 |
}
|
42 |
}
|
43 |
if ( $display_links_count > 1 ) {
|
includes/public/layouts/score-tpl.php
CHANGED
@@ -10,4 +10,5 @@
|
|
10 |
* @deprecated
|
11 |
*/
|
12 |
|
|
|
13 |
$output = number_format( floor( $review_object->get_rating() ) / 10, 1 );
|
10 |
* @deprecated
|
11 |
*/
|
12 |
|
13 |
+
_deprecated_file( __FILE__, '3.1.0', 'Bundle version', ' The shortcode is no longer supported using this version. You need to update to the latest premium and lite in order to use this feature.' );
|
14 |
$output = number_format( floor( $review_object->get_rating() ) / 10, 1 );
|
includes/public/layouts/widget/default.php
CHANGED
@@ -13,45 +13,54 @@
|
|
13 |
<ul>
|
14 |
<?php
|
15 |
foreach ( $results as $review ) :
|
16 |
-
$review_object
|
17 |
$product_title_display = ( $instance['post_type'] == true ) ? $review_object->get_name() : get_the_title( $review['ID'] );
|
18 |
-
$product_image
|
19 |
|
20 |
if ( strlen( $product_title_display ) > $title_length ) {
|
21 |
$product_title_display = substr( $product_title_display, 0, $title_length ) . '...';
|
22 |
}
|
23 |
?>
|
24 |
-
<li class="cwp-popular-review
|
|
|
25 |
<?php
|
|
|
26 |
if ( $instance['show_image'] == true && ! empty( $product_image ) ) {
|
27 |
-
echo ' wppr-cols-3';
|
28 |
-
} else {
|
29 |
-
echo ' wppr-cols-2';
|
30 |
-
}
|
31 |
?>
|
32 |
-
|
33 |
-
|
34 |
-
if ( $instance['show_image'] == true && ! empty( $product_image ) ) {
|
35 |
-
?>
|
36 |
-
<img class="cwp_rev_image wppr-col" src="<?php echo $product_image; ?>"
|
37 |
alt="<?php echo $review_object->get_name(); ?>">
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
41 |
<?php echo $product_title_display; ?>
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
</div>
|
53 |
-
|
54 |
-
</
|
|
|
|
|
55 |
<?php
|
56 |
endforeach;
|
57 |
?>
|
13 |
<ul>
|
14 |
<?php
|
15 |
foreach ( $results as $review ) :
|
16 |
+
$review_object = new WPPR_Review_Model( $review['ID'] );
|
17 |
$product_title_display = ( $instance['post_type'] == true ) ? $review_object->get_name() : get_the_title( $review['ID'] );
|
18 |
+
$product_image = $review_object->get_small_thumbnail();
|
19 |
|
20 |
if ( strlen( $product_title_display ) > $title_length ) {
|
21 |
$product_title_display = substr( $product_title_display, 0, $title_length ) . '...';
|
22 |
}
|
23 |
?>
|
24 |
+
<li class="cwp-popular-review">
|
25 |
+
|
26 |
<?php
|
27 |
+
$wppr_image = false;
|
28 |
if ( $instance['show_image'] == true && ! empty( $product_image ) ) {
|
|
|
|
|
|
|
|
|
29 |
?>
|
30 |
+
<div class="cwp_rev_image wppr-col">
|
31 |
+
<img src="<?php echo $product_image; ?>"
|
|
|
|
|
|
|
32 |
alt="<?php echo $review_object->get_name(); ?>">
|
33 |
+
</div>
|
34 |
+
<?php
|
35 |
+
$wppr_image = true;
|
36 |
+
}
|
37 |
+
?>
|
38 |
+
|
39 |
+
<div class="wppr-post-title wppr-col<?php echo ( $wppr_image ) ? '' : ' wppr-no-image'; ?>">
|
40 |
+
<a href="<?php echo get_the_permalink( $review['ID'] ); ?>" class="wppr-col" title="<?php echo $review_object->get_name(); ?>">
|
41 |
<?php echo $product_title_display; ?>
|
42 |
+
</a>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<?php
|
46 |
+
$review_score = $review_object->get_rating();
|
47 |
+
$review_class = $review_object->get_rating_class();
|
48 |
+
if ( ! empty( $review_score ) ) {
|
49 |
+
?>
|
50 |
+
<div class="review-grade-widget wppr-col">
|
51 |
+
<div class="review-wu-grade-content">
|
52 |
+
<div class="c100 p<?php echo esc_attr( round( $review_score ) ) . ' ' . esc_attr( $review_class ); ?>">
|
53 |
+
<span><?php echo esc_html( round( $review_score, 0 ) / 10 ); ?></span>
|
54 |
+
<div class="slice">
|
55 |
+
<div class="bar"></div>
|
56 |
+
<div class="fill"></div>
|
57 |
+
</div>
|
58 |
+
<div class="slice-center"></div>
|
59 |
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<?php } ?>
|
63 |
+
</li>
|
64 |
<?php
|
65 |
endforeach;
|
66 |
?>
|
languages/wp-product-review.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the no.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP Product Review Lite 3.0
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/wp-product-review/issues\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -24,7 +24,7 @@ msgstr ""
|
|
24 |
"X-Poedit-Bookmarks: \n"
|
25 |
"X-Textdomain-Support: yes\n"
|
26 |
|
27 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
28 |
msgid "10"
|
29 |
msgstr ""
|
30 |
|
@@ -95,250 +95,254 @@ msgid "Activate comment review user"
|
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/admin/class-wppr-global-settings.php:88
|
98 |
-
#: includes/admin/class-wppr-global-settings.php:
|
99 |
-
#: includes/admin/class-wppr-global-settings.php:
|
100 |
-
#: includes/admin/class-wppr-global-settings.php:
|
101 |
#: includes/admin/layouts/editor-default-tpl.php:32
|
102 |
msgid "Yes"
|
103 |
msgstr ""
|
104 |
|
105 |
#: includes/admin/class-wppr-global-settings.php:89
|
106 |
-
#: includes/admin/class-wppr-global-settings.php:
|
107 |
-
#: includes/admin/class-wppr-global-settings.php:
|
108 |
-
#: includes/admin/class-wppr-global-settings.php:
|
109 |
#: includes/admin/layouts/editor-default-tpl.php:44
|
110 |
msgid "No"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/admin/class-wppr-global-settings.php:
|
114 |
msgid "Visitor Review Influence"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/admin/class-wppr-global-settings.php:
|
118 |
msgid "Select how much visitors rating will affect the main one"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/admin/class-wppr-global-settings.php:
|
122 |
msgid "Number of options/pros/cons"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/admin/class-wppr-global-settings.php:
|
126 |
msgid "You can select the default number of options / pros/ cons (3-10)"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: includes/admin/class-wppr-global-settings.php:
|
130 |
msgid "Content width"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/admin/class-wppr-global-settings.php:
|
134 |
msgid ""
|
135 |
"Write your content width in pixels in this format : 600 if you want to "
|
136 |
"limit the review box width."
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: includes/admin/class-wppr-global-settings.php:
|
140 |
msgid "Disable Lighbox images"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: includes/admin/class-wppr-global-settings.php:
|
144 |
msgid "Disable lightbox effect on product images (increase loading speed)"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: includes/admin/class-wppr-global-settings.php:
|
148 |
msgid "Disable Font Awesome"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: includes/admin/class-wppr-global-settings.php:
|
152 |
msgid ""
|
153 |
"Disable Font Awesome for websites that already are including it (increase "
|
154 |
"loading speed)"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/admin/class-wppr-global-settings.php:
|
158 |
msgid "Enable Rich Snippets"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: includes/admin/class-wppr-global-settings.php:
|
162 |
msgid "Enable rich snippets on the product page."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: includes/admin/class-wppr-global-settings.php:
|
166 |
msgid "Rating options default color"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/admin/class-wppr-global-settings.php:
|
170 |
msgid "Select the color to be used by default on rating."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: includes/admin/class-wppr-global-settings.php:
|
174 |
msgid "Rating chart default color"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: includes/admin/class-wppr-global-settings.php:
|
178 |
msgid "Select the color to be used by default on rating chart."
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: includes/admin/class-wppr-global-settings.php:
|
182 |
msgid "Weak rating"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: includes/admin/class-wppr-global-settings.php:
|
186 |
msgid "Select the color to be used when the rating is weak. ( < 2.5)"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: includes/admin/class-wppr-global-settings.php:
|
190 |
msgid "Not bad rating"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: includes/admin/class-wppr-global-settings.php:
|
194 |
msgid "Select the color to be used when the rating is not bad. ( > 2.5 and < 5)"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: includes/admin/class-wppr-global-settings.php:
|
198 |
msgid "Good rating"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: includes/admin/class-wppr-global-settings.php:
|
202 |
msgid "Select the color to be used when the rating is good. ( >5 and <7.5)"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: includes/admin/class-wppr-global-settings.php:
|
206 |
msgid "Very good rating"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: includes/admin/class-wppr-global-settings.php:
|
210 |
msgid "Select the color to be used when the rating is very good. ( 7.5 < and <10)"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/admin/class-wppr-global-settings.php:
|
214 |
msgid "Font color"
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: includes/admin/class-wppr-global-settings.php:
|
218 |
msgid "Select the color to be used on the font."
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: includes/admin/class-wppr-global-settings.php:
|
222 |
msgid "Pros text color"
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: includes/admin/class-wppr-global-settings.php:
|
226 |
msgid "Select the color to be used on the 'Pros' text."
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: includes/admin/class-wppr-global-settings.php:
|
230 |
msgid "Cons text color"
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: includes/admin/class-wppr-global-settings.php:
|
234 |
msgid "Select the color to be used on the Cons text."
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: includes/admin/class-wppr-global-settings.php:
|
238 |
msgid "Pros text"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: includes/admin/class-wppr-global-settings.php:
|
242 |
msgid "Specify text for pros heading"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: includes/admin/class-wppr-global-settings.php:
|
246 |
msgid "Cons text"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: includes/admin/class-wppr-global-settings.php:
|
250 |
msgid "Specify text for cons heading"
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: includes/admin/class-wppr-global-settings.php:
|
254 |
msgid "Review box border"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: includes/admin/class-wppr-global-settings.php:
|
258 |
msgid "Select the border color to be used on the review box"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: includes/admin/class-wppr-global-settings.php:
|
262 |
msgid "Review box border width"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: includes/admin/class-wppr-global-settings.php:
|
266 |
msgid "Select the width in pixels of the top border of the review box"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: includes/admin/class-wppr-global-settings.php:
|
270 |
msgid "Show button icon"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: includes/admin/class-wppr-global-settings.php:
|
274 |
msgid "Show icon on the cart icon on button."
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: includes/admin/class-wppr-global-settings.php:
|
278 |
msgid "Button border"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: includes/admin/class-wppr-global-settings.php:
|
282 |
msgid "Select the border color to be used on the buy button for the default state"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: includes/admin/class-wppr-global-settings.php:
|
286 |
msgid "Button border hover"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: includes/admin/class-wppr-global-settings.php:
|
290 |
msgid "Select the border color to be used on the buy button for the hover state"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: includes/admin/class-wppr-global-settings.php:
|
294 |
msgid "Button background"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: includes/admin/class-wppr-global-settings.php:
|
298 |
msgid ""
|
299 |
"Select the background color to be used on the buy button for the default "
|
300 |
"state"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: includes/admin/class-wppr-global-settings.php:
|
304 |
msgid "Button background hover"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: includes/admin/class-wppr-global-settings.php:
|
308 |
msgid ""
|
309 |
"Select the background color to be used on the buy button for the hover "
|
310 |
"state"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: includes/admin/class-wppr-global-settings.php:
|
314 |
msgid "Button text color"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: includes/admin/class-wppr-global-settings.php:
|
318 |
msgid "Select the text color to be used on the buy button for the default state"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: includes/admin/class-wppr-global-settings.php:
|
322 |
msgid "Button text color hover"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: includes/admin/class-wppr-global-settings.php:
|
326 |
msgid "Select the text color to be used on the buy button for the hover state"
|
327 |
msgstr ""
|
328 |
|
|
|
|
|
|
|
|
|
329 |
#: includes/admin/helpers/class-wppr-html-fields.php:122
|
330 |
msgid "Choose image"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: includes/admin/helpers/class-wppr-html-fields.php:
|
334 |
msgid ". Use Default Styling"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/admin/helpers/class-wppr-html-fields.php:
|
338 |
msgid "* Currently set to the default styling"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: includes/admin/helpers/class-wppr-html-fields.php:
|
342 |
msgid ""
|
343 |
"You need the PRO <a style=\"color:red;\" href=\"http://bit.ly/2bhylar\" "
|
344 |
"target=\"_blank\" >add-on</a> in order to change the review icons."
|
@@ -475,27 +479,31 @@ msgstr ""
|
|
475 |
msgid "Number of posts to show:"
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: includes/admin/layouts/widget-admin-tpl.php:
|
|
|
|
|
|
|
|
|
479 |
msgid "Category:"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: includes/admin/layouts/widget-admin-tpl.php:
|
483 |
msgid "Layout:"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: includes/admin/layouts/widget-admin-tpl.php:
|
487 |
msgid "Buy Now text:"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: includes/admin/layouts/widget-admin-tpl.php:
|
491 |
msgid "Read Review text:"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: includes/admin/layouts/widget-admin-tpl.php:
|
495 |
msgid "Display Product Titles :"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: includes/admin/layouts/widget-admin-tpl.php:
|
499 |
msgid "Display Product Image :"
|
500 |
msgstr ""
|
501 |
|
@@ -507,16 +515,20 @@ msgstr ""
|
|
507 |
msgid "Attach the image"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
511 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
512 |
msgid "Buy Now"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
516 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
517 |
msgid "Read Review"
|
518 |
msgstr ""
|
519 |
|
|
|
|
|
|
|
|
|
520 |
#: includes/admin/widgets/class-wppr-latest-products-widget.php:26
|
521 |
msgid "Latest Products Widget"
|
522 |
msgstr ""
|
@@ -525,7 +537,7 @@ msgstr ""
|
|
525 |
msgid "This widget displays the latest products based on their rating."
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: includes/admin/widgets/class-wppr-latest-products-widget.php:
|
529 |
msgid "Latest Products"
|
530 |
msgstr ""
|
531 |
|
@@ -537,7 +549,7 @@ msgstr ""
|
|
537 |
msgid "This widget displays the top products based on their rating."
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: includes/admin/widgets/class-wppr-top-products-widget.php:
|
541 |
msgid "Top Products"
|
542 |
msgstr ""
|
543 |
|
2 |
# This file is distributed under the no.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP Product Review Lite 3.2.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/wp-product-review/issues\n"
|
7 |
+
"POT-Creation-Date: 2017-11-06 14:40:53+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
24 |
"X-Poedit-Bookmarks: \n"
|
25 |
"X-Textdomain-Support: yes\n"
|
26 |
|
27 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:101
|
28 |
msgid "10"
|
29 |
msgstr ""
|
30 |
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/admin/class-wppr-global-settings.php:88
|
98 |
+
#: includes/admin/class-wppr-global-settings.php:144
|
99 |
+
#: includes/admin/class-wppr-global-settings.php:155
|
100 |
+
#: includes/admin/class-wppr-global-settings.php:166
|
101 |
#: includes/admin/layouts/editor-default-tpl.php:32
|
102 |
msgid "Yes"
|
103 |
msgstr ""
|
104 |
|
105 |
#: includes/admin/class-wppr-global-settings.php:89
|
106 |
+
#: includes/admin/class-wppr-global-settings.php:145
|
107 |
+
#: includes/admin/class-wppr-global-settings.php:156
|
108 |
+
#: includes/admin/class-wppr-global-settings.php:167
|
109 |
#: includes/admin/layouts/editor-default-tpl.php:44
|
110 |
msgid "No"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/admin/class-wppr-global-settings.php:96
|
114 |
msgid "Visitor Review Influence"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/admin/class-wppr-global-settings.php:97
|
118 |
msgid "Select how much visitors rating will affect the main one"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/admin/class-wppr-global-settings.php:116
|
122 |
msgid "Number of options/pros/cons"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/admin/class-wppr-global-settings.php:117
|
126 |
msgid "You can select the default number of options / pros/ cons (3-10)"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/admin/class-wppr-global-settings.php:133
|
130 |
msgid "Content width"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/admin/class-wppr-global-settings.php:134
|
134 |
msgid ""
|
135 |
"Write your content width in pixels in this format : 600 if you want to "
|
136 |
"limit the review box width."
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: includes/admin/class-wppr-global-settings.php:140
|
140 |
msgid "Disable Lighbox images"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: includes/admin/class-wppr-global-settings.php:141
|
144 |
msgid "Disable lightbox effect on product images (increase loading speed)"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/admin/class-wppr-global-settings.php:151
|
148 |
msgid "Disable Font Awesome"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: includes/admin/class-wppr-global-settings.php:152
|
152 |
msgid ""
|
153 |
"Disable Font Awesome for websites that already are including it (increase "
|
154 |
"loading speed)"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/admin/class-wppr-global-settings.php:162
|
158 |
msgid "Enable Rich Snippets"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: includes/admin/class-wppr-global-settings.php:163
|
162 |
msgid "Enable rich snippets on the product page."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: includes/admin/class-wppr-global-settings.php:175
|
166 |
msgid "Rating options default color"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/admin/class-wppr-global-settings.php:176
|
170 |
msgid "Select the color to be used by default on rating."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: includes/admin/class-wppr-global-settings.php:182
|
174 |
msgid "Rating chart default color"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: includes/admin/class-wppr-global-settings.php:183
|
178 |
msgid "Select the color to be used by default on rating chart."
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: includes/admin/class-wppr-global-settings.php:189
|
182 |
msgid "Weak rating"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: includes/admin/class-wppr-global-settings.php:190
|
186 |
msgid "Select the color to be used when the rating is weak. ( < 2.5)"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: includes/admin/class-wppr-global-settings.php:196
|
190 |
msgid "Not bad rating"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: includes/admin/class-wppr-global-settings.php:197
|
194 |
msgid "Select the color to be used when the rating is not bad. ( > 2.5 and < 5)"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: includes/admin/class-wppr-global-settings.php:203
|
198 |
msgid "Good rating"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: includes/admin/class-wppr-global-settings.php:204
|
202 |
msgid "Select the color to be used when the rating is good. ( >5 and <7.5)"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: includes/admin/class-wppr-global-settings.php:210
|
206 |
msgid "Very good rating"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: includes/admin/class-wppr-global-settings.php:211
|
210 |
msgid "Select the color to be used when the rating is very good. ( 7.5 < and <10)"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: includes/admin/class-wppr-global-settings.php:220
|
214 |
msgid "Font color"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: includes/admin/class-wppr-global-settings.php:221
|
218 |
msgid "Select the color to be used on the font."
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: includes/admin/class-wppr-global-settings.php:227
|
222 |
msgid "Pros text color"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: includes/admin/class-wppr-global-settings.php:228
|
226 |
msgid "Select the color to be used on the 'Pros' text."
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: includes/admin/class-wppr-global-settings.php:234
|
230 |
msgid "Cons text color"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: includes/admin/class-wppr-global-settings.php:235
|
234 |
msgid "Select the color to be used on the Cons text."
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: includes/admin/class-wppr-global-settings.php:241
|
238 |
msgid "Pros text"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: includes/admin/class-wppr-global-settings.php:242
|
242 |
msgid "Specify text for pros heading"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: includes/admin/class-wppr-global-settings.php:248
|
246 |
msgid "Cons text"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: includes/admin/class-wppr-global-settings.php:249
|
250 |
msgid "Specify text for cons heading"
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: includes/admin/class-wppr-global-settings.php:255
|
254 |
msgid "Review box border"
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: includes/admin/class-wppr-global-settings.php:256
|
258 |
msgid "Select the border color to be used on the review box"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: includes/admin/class-wppr-global-settings.php:262
|
262 |
msgid "Review box border width"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: includes/admin/class-wppr-global-settings.php:263
|
266 |
msgid "Select the width in pixels of the top border of the review box"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: includes/admin/class-wppr-global-settings.php:271
|
270 |
msgid "Show button icon"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: includes/admin/class-wppr-global-settings.php:272
|
274 |
msgid "Show icon on the cart icon on button."
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: includes/admin/class-wppr-global-settings.php:282
|
278 |
msgid "Button border"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: includes/admin/class-wppr-global-settings.php:283
|
282 |
msgid "Select the border color to be used on the buy button for the default state"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: includes/admin/class-wppr-global-settings.php:289
|
286 |
msgid "Button border hover"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/admin/class-wppr-global-settings.php:290
|
290 |
msgid "Select the border color to be used on the buy button for the hover state"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: includes/admin/class-wppr-global-settings.php:296
|
294 |
msgid "Button background"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: includes/admin/class-wppr-global-settings.php:297
|
298 |
msgid ""
|
299 |
"Select the background color to be used on the buy button for the default "
|
300 |
"state"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: includes/admin/class-wppr-global-settings.php:303
|
304 |
msgid "Button background hover"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: includes/admin/class-wppr-global-settings.php:304
|
308 |
msgid ""
|
309 |
"Select the background color to be used on the buy button for the hover "
|
310 |
"state"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: includes/admin/class-wppr-global-settings.php:310
|
314 |
msgid "Button text color"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: includes/admin/class-wppr-global-settings.php:311
|
318 |
msgid "Select the text color to be used on the buy button for the default state"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: includes/admin/class-wppr-global-settings.php:317
|
322 |
msgid "Button text color hover"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: includes/admin/class-wppr-global-settings.php:318
|
326 |
msgid "Select the text color to be used on the buy button for the hover state"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: includes/admin/class-wppr-global-settings.php:357
|
330 |
+
msgid "We see %s active, so user feedback is disabled"
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
#: includes/admin/helpers/class-wppr-html-fields.php:122
|
334 |
msgid "Choose image"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: includes/admin/helpers/class-wppr-html-fields.php:224
|
338 |
msgid ". Use Default Styling"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/admin/helpers/class-wppr-html-fields.php:227
|
342 |
msgid "* Currently set to the default styling"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/admin/helpers/class-wppr-html-fields.php:238
|
346 |
msgid ""
|
347 |
"You need the PRO <a style=\"color:red;\" href=\"http://bit.ly/2bhylar\" "
|
348 |
"target=\"_blank\" >add-on</a> in order to change the review icons."
|
479 |
msgid "Number of posts to show:"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/admin/layouts/widget-admin-tpl.php:23
|
483 |
+
msgid "Post Types:"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: includes/admin/layouts/widget-admin-tpl.php:37
|
487 |
msgid "Category:"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: includes/admin/layouts/widget-admin-tpl.php:62
|
491 |
msgid "Layout:"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: includes/admin/layouts/widget-admin-tpl.php:86
|
495 |
msgid "Buy Now text:"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: includes/admin/layouts/widget-admin-tpl.php:91
|
499 |
msgid "Read Review text:"
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: includes/admin/layouts/widget-admin-tpl.php:95
|
503 |
msgid "Display Product Titles :"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: includes/admin/layouts/widget-admin-tpl.php:99
|
507 |
msgid "Display Product Image :"
|
508 |
msgstr ""
|
509 |
|
515 |
msgid "Attach the image"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:71
|
519 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:117
|
520 |
msgid "Buy Now"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:74
|
524 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:121
|
525 |
msgid "Read Review"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:105
|
529 |
+
msgid "Select Category"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
#: includes/admin/widgets/class-wppr-latest-products-widget.php:26
|
533 |
msgid "Latest Products Widget"
|
534 |
msgstr ""
|
537 |
msgid "This widget displays the latest products based on their rating."
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/admin/widgets/class-wppr-latest-products-widget.php:106
|
541 |
msgid "Latest Products"
|
542 |
msgstr ""
|
543 |
|
549 |
msgid "This widget displays the top products based on their rating."
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: includes/admin/widgets/class-wppr-top-products-widget.php:121
|
553 |
msgid "Top Products"
|
554 |
msgstr ""
|
555 |
|
readme.md
ADDED
@@ -0,0 +1,473 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WP Product Review Lite #
|
2 |
+
**Contributors:** [codeinwp](https://profiles.wordpress.org/codeinwp), [marius2012](https://profiles.wordpress.org/marius2012), [marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [themeisle](https://profiles.wordpress.org/themeisle), [Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle)
|
3 |
+
**Tags:** review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
|
4 |
+
**Author URI:** http://themeisle.com
|
5 |
+
**Requires at least:** 3.5
|
6 |
+
**Tested up to:** 4.9
|
7 |
+
**Stable tag:** trunk
|
8 |
+
**License:** GPLv2 or later
|
9 |
+
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
|
12 |
+
Easily turn your basic posts into in-depth reviews with ratings, pros and cons, affiliate links, rich snippets and user reviews.
|
13 |
+
## Description ##
|
14 |
+
|
15 |
+
### User Review Enabled
|
16 |
+
|
17 |
+
1. This review plugin helps you to interact with your users with improved comments, you can expose your reviews in a easier to read way and will help you generate money by adding a buy now button in your post. Rich snippets are also supported.
|
18 |
+
|
19 |
+
1. After you install the plugin, go on a post admin page and you should be able to see a checkbox called : "Is this post a review ?", once this is checked you can add review details and those will appear on the post page.
|
20 |
+
|
21 |
+
1. If you want to to edit the colors, enable/disable the affiliate button, change icons go on the plugin options page.
|
22 |
+
|
23 |
+
1. All the plugin settings/colors are fully customizable, and you can read more about it <a rel="nofollow" href="https://themeisle.com/plugins/wp-product-review-lite/?utm_source=wpreadme&utm_medium=readme&utm_campaign=wporg">here</a>
|
24 |
+
|
25 |
+
1. For updates follow https://twitter.com/themeisle.
|
26 |
+
|
27 |
+
> **Time-saving features available in the Pro version:**
|
28 |
+
>
|
29 |
+
> * Shortcodes
|
30 |
+
> * Custom Rating Icons
|
31 |
+
> * Product Review Listings
|
32 |
+
> * Comparison Table
|
33 |
+
> * Amazon Integration
|
34 |
+
> * Priority email support from the developer of the plugin
|
35 |
+
> * Support and updates for 12 months
|
36 |
+
>
|
37 |
+
> **[Learn more about WP Product Review](http://themeisle.com/plugins/wp-product-review/)**
|
38 |
+
|
39 |
+
|
40 |
+
If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-wordpress-hosting/" rel="nofollow">fastest WordPress hosting</a> or which <a href="http://www.codeinwp.com/blog/15-best-wordpress-review-themes/" rel="nofollow">review themes</a> are playing nice with WP Product review, checkout our blog.
|
41 |
+
|
42 |
+
= See how WP Product Review can integrate with your website =
|
43 |
+
|
44 |
+
* [Default review](https://demo.themeisle.com/wp-product-review/sample-review/)
|
45 |
+
* [Custom icons ratings](https://demo.themeisle.com/wp-product-review/custom-icons/)
|
46 |
+
* [Comparision table](https://demo.themeisle.com/wp-product-review/comparison-table/)
|
47 |
+
* [Shortcode reviews](https://demo.themeisle.com/wp-product-review/shortcode-review/)
|
48 |
+
* [Listing table](https://demo.themeisle.com/wp-product-review/listing-table/)
|
49 |
+
* [Reviews by visitors](https://demo.themeisle.com/wp-product-review/review-with-comments/)
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
**WP Product Review provides following features**
|
56 |
+
|
57 |
+
- Create a top products review widget
|
58 |
+
- Easily update all the colors of the widget from theme options
|
59 |
+
- Add a download button in the posts
|
60 |
+
- Add an awesome wrap-up widget at the end of your articles
|
61 |
+
- Add specific user review options to wordpress comments
|
62 |
+
- Add rich snippet ( schema ) to your posts
|
63 |
+
|
64 |
+
### Translations ###
|
65 |
+
|
66 |
+
* sk_SK translation by Patrik Žec (PATWIST) of http://patwist.com
|
67 |
+
* fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
|
68 |
+
|
69 |
+
## Changelog ##
|
70 |
+
### 3.2.0 - 2017-11-06 ###
|
71 |
+
|
72 |
+
* Adds support for custom post-type and taxonomies in widgets.
|
73 |
+
* Adds control for time-frame in top reviews widget.
|
74 |
+
* Improves responsiveness and removes dependency of pie-chart.js
|
75 |
+
* Improves notifications when Disqus and Jetpack comments are used.
|
76 |
+
|
77 |
+
|
78 |
+
### 3.1.0 - 2017-09-22 ###
|
79 |
+
|
80 |
+
* Fix for some edge cases when the review box was gone.
|
81 |
+
* Improvements assets loading, removed redundant files.
|
82 |
+
* Improvements perfomance of review query.
|
83 |
+
* Various bug fixes reported by clients.
|
84 |
+
|
85 |
+
|
86 |
+
### 3.0.12 - 2017-09-17 ###
|
87 |
+
|
88 |
+
* Fix for review box issues.
|
89 |
+
|
90 |
+
|
91 |
+
### 3.0.11 - 2017-09-15 ###
|
92 |
+
|
93 |
+
* Fix for issue of hidden review box and widget area.
|
94 |
+
|
95 |
+
|
96 |
+
### 3.0.10 - 2017-09-12 ###
|
97 |
+
|
98 |
+
* Fix for decimal separator in rich snippet.
|
99 |
+
* Improvements for template engine, allowing overwriting in child themes also.
|
100 |
+
* Added review content and excerpt proprieties.
|
101 |
+
|
102 |
+
|
103 |
+
### 3.0.9 - 2017-09-07 ###
|
104 |
+
|
105 |
+
* Improved JSON-LD scheme.
|
106 |
+
* Fix for image lightbox link.
|
107 |
+
* FIx for json-ld description when html tags are present.
|
108 |
+
* Fix for widget layout margin when image is used.
|
109 |
+
* Improvements compatibility with various themes.
|
110 |
+
|
111 |
+
|
112 |
+
### 3.0.8 - 2017-09-01 ###
|
113 |
+
|
114 |
+
* Fix for out of memory errors.
|
115 |
+
* Fix for options saving when there is no value for each option.
|
116 |
+
* Fix for compatibility with Bookrev.
|
117 |
+
* Fix for rich snippet reviewer author.
|
118 |
+
|
119 |
+
|
120 |
+
### 3.0.7 - 2017-08-29 ###
|
121 |
+
|
122 |
+
* Fixed empty links for reviews.
|
123 |
+
* Fixed widget and reviews query.
|
124 |
+
|
125 |
+
|
126 |
+
### 3.0.6 - 2017-08-29 ###
|
127 |
+
|
128 |
+
* Fix for category name matching when filtering reviews.
|
129 |
+
* Fix for is_active error on null object.
|
130 |
+
|
131 |
+
|
132 |
+
### 3.0.5 - 2017-08-26 ###
|
133 |
+
|
134 |
+
* Fix for review links opening issue.
|
135 |
+
* Fix for comments legacy import.
|
136 |
+
|
137 |
+
|
138 |
+
### 3.0.4 - 2017-08-25 ###
|
139 |
+
|
140 |
+
* Fix for rich snippets schema.
|
141 |
+
* Fix post update white screen of death.
|
142 |
+
* Fix for thumbnails in widgets.
|
143 |
+
* Fix for duplicate title for widgets list.
|
144 |
+
* Fix for link of the review in the widgets.
|
145 |
+
* Fix for click link behavior on review picture.
|
146 |
+
* Fix widget titles default values.
|
147 |
+
* Fix review rating when comments influence is on.
|
148 |
+
* Improved security.
|
149 |
+
|
150 |
+
|
151 |
+
### 3.0.3 - 2017-08-24 ###
|
152 |
+
|
153 |
+
* Fixed widget assets loading error.
|
154 |
+
|
155 |
+
|
156 |
+
### 3.0.2 - 2017-08-24 ###
|
157 |
+
|
158 |
+
* Fixed fatal error with is_active method.
|
159 |
+
* Fixed query reviews class.
|
160 |
+
* Fixed widget assets loading when there is no review on the page.
|
161 |
+
|
162 |
+
|
163 |
+
### 3.0.1 - 2017-08-23 ###
|
164 |
+
|
165 |
+
* Fixed backwards compatibility when using cwppos_show_review.
|
166 |
+
* Fixed undefined index error in widgets.
|
167 |
+
|
168 |
+
|
169 |
+
### 3.0.0 - 2017-08-23 ###
|
170 |
+
|
171 |
+
* Major code refactor ( Please test before update )
|
172 |
+
* Added JSON-LD support
|
173 |
+
* Improved compatibility with themes
|
174 |
+
|
175 |
+
|
176 |
+
|
177 |
+
**New in 2.9.8**
|
178 |
+
|
179 |
+
- Added more features page
|
180 |
+
|
181 |
+
**New in 2.9.6**
|
182 |
+
|
183 |
+
- Fixed undefined notices
|
184 |
+
- Fixed sanitization issues
|
185 |
+
|
186 |
+
**New in 2.9.5**
|
187 |
+
|
188 |
+
- Added amazon integration support
|
189 |
+
- Fixed some design issue with review
|
190 |
+
|
191 |
+
**New in 2.9.3**
|
192 |
+
|
193 |
+
- Added dashes for pro/cons list
|
194 |
+
- Added filters for nofollow links in widgets area
|
195 |
+
|
196 |
+
**New in 2.9.2**
|
197 |
+
|
198 |
+
- Fixed shortcode compatibility with pro version
|
199 |
+
|
200 |
+
**New in 2.9.1**
|
201 |
+
|
202 |
+
- Fixed undefined notice on plugin activation
|
203 |
+
- Removed review buttons on links when the values are empty for widgets
|
204 |
+
|
205 |
+
**New in 2.9.0**
|
206 |
+
|
207 |
+
- Added shortcode support on all review fields
|
208 |
+
- Removed addons page
|
209 |
+
|
210 |
+
|
211 |
+
**New in 2.8.7**
|
212 |
+
|
213 |
+
- Fixed img tag closing tag issue
|
214 |
+
- Fixed rich snippet problem when comment influence is off
|
215 |
+
|
216 |
+
**New in 2.8.6**
|
217 |
+
|
218 |
+
- Added compatibility with new pro addons
|
219 |
+
- Fixed layout issues with the review
|
220 |
+
- Fixed responsiveness bugs
|
221 |
+
|
222 |
+
**New in 2.8.1**
|
223 |
+
|
224 |
+
- Added different style for widgets
|
225 |
+
- Fixed some layout bugs for widgets
|
226 |
+
|
227 |
+
**New in 2.8.0**
|
228 |
+
|
229 |
+
- Added a filter for price issues
|
230 |
+
|
231 |
+
**New in 2.7.9**
|
232 |
+
|
233 |
+
- Added support for amazon import in the pro version
|
234 |
+
|
235 |
+
**New in 2.7.8**
|
236 |
+
|
237 |
+
- Fixed price issues when . is present
|
238 |
+
|
239 |
+
**New in 2.7.7**
|
240 |
+
|
241 |
+
- Re-worked rich snippets (Added main Thing Object as Product, added Offers and improved review / aggregateRating)
|
242 |
+
|
243 |
+
**New in 2.7.6**
|
244 |
+
|
245 |
+
- Fixed empty inputs on comments and saving of non-reviews post metas
|
246 |
+
- Fixed circles widget issue
|
247 |
+
|
248 |
+
**New in 2.7.5**
|
249 |
+
|
250 |
+
- Fixed WP_query issue in the wp backed
|
251 |
+
- Added a minium content_width, since some themes set this wrong
|
252 |
+
- Fixed responsive issues when content_width is set
|
253 |
+
- Fixed circles widget issue
|
254 |
+
|
255 |
+
**New in 2.7.3**
|
256 |
+
|
257 |
+
- Improved layout based on $content_width so make sure this is set correctly
|
258 |
+
- Improved some settings description
|
259 |
+
- Fixed lightbox image logic
|
260 |
+
- Open image affiliate link in new tab
|
261 |
+
- Fixed various issues with comment sliders
|
262 |
+
- Pre-fill features from the latest edited post in the same category
|
263 |
+
- Pre-fill image settings and aff_button text from latest edited post in the same category
|
264 |
+
- Optimize the space on post review metaboxes
|
265 |
+
|
266 |
+
**New in 2.7.2**
|
267 |
+
|
268 |
+
- Fixed design issues in comments slider
|
269 |
+
- Fixed enque of media files when review is not available
|
270 |
+
- Fixed alt tags for images in the widgets
|
271 |
+
|
272 |
+
**New in 2.7.1**
|
273 |
+
|
274 |
+
- Fixed some design issues.
|
275 |
+
- Fixed rating problem on some instalation when display the numerator greater than denominator
|
276 |
+
- Added wppr_review_image_size for filter the image size;
|
277 |
+
|
278 |
+
|
279 |
+
**New in 2.7**
|
280 |
+
|
281 |
+
- Fixed responsive design bugs.
|
282 |
+
- Fixed border color and width customization for the review box
|
283 |
+
|
284 |
+
**New in 2.6.9**
|
285 |
+
|
286 |
+
- Improved design of the featured image
|
287 |
+
- Added filters heading tags for review name, option name, pros headings and cons headings.
|
288 |
+
|
289 |
+
**New in 2.6.8**
|
290 |
+
|
291 |
+
- Improved responsive design of the review
|
292 |
+
|
293 |
+
**New in 2.6.7**
|
294 |
+
|
295 |
+
- Fixed issue with rating value when visitator influence is off
|
296 |
+
- Fixed issue with auto optimization plugins
|
297 |
+
|
298 |
+
|
299 |
+
**New in v.2.6.6**
|
300 |
+
|
301 |
+
- Added option to remove loading of Font Awesome for websites that already enque it.
|
302 |
+
- Fixed microtags when is 0% visitator influence.
|
303 |
+
- Fixed multiple display of review where <!--nextpage--> quick tag is used.
|
304 |
+
|
305 |
+
|
306 |
+
**New in v.2.6.4**
|
307 |
+
|
308 |
+
- Fixed layout problem with widgets on some themes
|
309 |
+
- Added new image size for widgets 'wppr_widget_image' for 50x50. ( Requires thumbnail regeneration to use it )
|
310 |
+
|
311 |
+
**New in v.2.6.3**
|
312 |
+
|
313 |
+
- Fixed custom icons bug
|
314 |
+
- Fixed sorting order to top products widget
|
315 |
+
- Added 100% influence on visitators rating
|
316 |
+
- Added rel="nofollow" for img link
|
317 |
+
- Fixed bug for password protected reviews.
|
318 |
+
- Fixed long text for product titles in widgets
|
319 |
+
- Removed unecessary css
|
320 |
+
|
321 |
+
|
322 |
+
**New in v.2.6.2**
|
323 |
+
|
324 |
+
- Added thumbnails for reviews
|
325 |
+
- Fixed bug when no image is set for reviews
|
326 |
+
- Fixed reset button for product options
|
327 |
+
- Added option to disable lightbox for review image
|
328 |
+
|
329 |
+
|
330 |
+
|
331 |
+
**New in v.2.6.1**
|
332 |
+
|
333 |
+
- Fixed rich snippet bug
|
334 |
+
- Fixed loading of the assets files where the plugin is not used
|
335 |
+
|
336 |
+
|
337 |
+
**New in v2.5.2**
|
338 |
+
|
339 |
+
- Added multiple addons including ranking chart
|
340 |
+
- Fixed image in post issue
|
341 |
+
- Improved preloader logic
|
342 |
+
|
343 |
+
- Fixed issue with more than 5 options
|
344 |
+
- Added ability to modify the chart color
|
345 |
+
|
346 |
+
**New in v2.4.7**
|
347 |
+
|
348 |
+
- Fixed issue with more than 5 options
|
349 |
+
- Added ability to modify the chart color
|
350 |
+
|
351 |
+
**New in v2.4.5**
|
352 |
+
|
353 |
+
- Fixed the image affiliate link issue
|
354 |
+
- Improved responsive for the review box
|
355 |
+
- Now you can place the review box manually using php or shortcode
|
356 |
+
|
357 |
+
**New in v2.4.3**
|
358 |
+
|
359 |
+
- Added multiple options/ pros/ cons
|
360 |
+
- Fixed rich snippet issue
|
361 |
+
- Improved image linking
|
362 |
+
- Removed sticky posts
|
363 |
+
- Fixed Aff button2 link/text
|
364 |
+
- Fixed js errors
|
365 |
+
|
366 |
+
**New in v2.4.2**
|
367 |
+
|
368 |
+
- Fixed latest widget issue
|
369 |
+
- Added possibility of having 2 affiliate buttons
|
370 |
+
|
371 |
+
- Fixed js errors
|
372 |
+
|
373 |
+
**New in v2.4.1**
|
374 |
+
|
375 |
+
- Fixed division by zero
|
376 |
+
|
377 |
+
**New in v2.4**
|
378 |
+
|
379 |
+
- Added image and product title options in widget
|
380 |
+
- Added lightbox on product review image, that preload image from the featured image
|
381 |
+
- User is now able to select in admin how much user reviews will influence the main rating
|
382 |
+
- Added [P_REVIEW post_id=3067 visual="yes"] shortcode in the PRO version, without visual attribute only the rating is displayed
|
383 |
+
|
384 |
+
**New in v2.3**
|
385 |
+
|
386 |
+
- Fixed js errors
|
387 |
+
|
388 |
+
**New in v2.29**
|
389 |
+
|
390 |
+
- Fixed upgrade to pro issue
|
391 |
+
|
392 |
+
**New in v2.28**
|
393 |
+
|
394 |
+
- Fixed translation issues
|
395 |
+
- Added custom icons
|
396 |
+
- Added price attribute
|
397 |
+
|
398 |
+
## Installation ##
|
399 |
+
|
400 |
+
Following are the steps to install the WP Product Review
|
401 |
+
|
402 |
+
1. Download the latest version of the WP Product Review to your computer from here.
|
403 |
+
2. With an FTP program, access your site?s server.
|
404 |
+
3. Upload (copy) the Plugin file(s) or folder to the /wp-content/plugins folder.
|
405 |
+
4. In your WordPress Administration Panels, click on Plugins from the menu.
|
406 |
+
5. You should see WP Product Review Plugin listed. If not, with your FTP program, check the folder to see if it is installed. If it isn?t, upload the file(s) again. If it is, delete the files and upload them again.
|
407 |
+
6. To turn the WP Product Review on, click Activate.
|
408 |
+
7. Check your Administration Panels or WordPress blog to see if the Plugin is working.
|
409 |
+
8. You can change the plugin options from WP Product Review under settings menu.
|
410 |
+
|
411 |
+
Alternatively you can also follow the following steps to install the WP Product Review plugin
|
412 |
+
|
413 |
+
1. In your WordPress Administration Panels, click on Add New option under Plugins from the menu.
|
414 |
+
2. Click on upload at the top.
|
415 |
+
3. Browse the location and select the WP Product Review Plugin and click install now.
|
416 |
+
4. To turn the WP Product Review Plugin on, click Activate.
|
417 |
+
5. Check your Administration Panels or WordPress blog to see if the Plugin is working.
|
418 |
+
6. You can change the plugin options from WP Product Review under settings menu.
|
419 |
+
|
420 |
+
## Frequently Asked Questions ##
|
421 |
+
|
422 |
+
|
423 |
+
### How to activate user reviews ###
|
424 |
+
|
425 |
+
By default user reviews are disabled since not all the themes are compatible with this option due to different designs for the comment box. You can easily activate them from General Settings
|
426 |
+
|
427 |
+
If you have any questions please get in touch with us at,
|
428 |
+
https://themeisle.com/contact
|
429 |
+
|
430 |
+
### How to change the html format of the review name ###
|
431 |
+
[http://docs.themeisle.com/article/130-how-to-change-the-html-format-of-the-review-name](http://docs.themeisle.com/article/130-how-to-change-the-html-format-of-the-review-name)
|
432 |
+
|
433 |
+
### How to change dynamically the image size for review ###
|
434 |
+
[http://docs.themeisle.com/article/135-how-to-change-dynamically-the-image-size-for-review](http://docs.themeisle.com/article/135-how-to-change-dynamically-the-image-size-for-review)
|
435 |
+
|
436 |
+
### How to change dynamically the pros/cons heading text ###
|
437 |
+
[http://docs.themeisle.com/article/133-how-to-change-dynamically-the-pros-cons-heading-text](http://docs.themeisle.com/article/133-how-to-change-dynamically-the-pros-cons-heading-text)
|
438 |
+
|
439 |
+
### How to change dynamically the name of the review ###
|
440 |
+
[http://docs.themeisle.com/article/131-how-to-change-dynamically-the-name-of-the-review](http://docs.themeisle.com/article/131-how-to-change-dynamically-the-name-of-the-review)
|
441 |
+
|
442 |
+
### How to change dynamically the option name format ###
|
443 |
+
[http://docs.themeisle.com/article/132-how-to-change-dynamically-the-option-name-format](http://docs.themeisle.com/article/132-how-to-change-dynamically-the-option-name-format)
|
444 |
+
|
445 |
+
### How to make Comment Review option work in any theme ###
|
446 |
+
[http://docs.themeisle.com/article/54-why-comment-review-option-is-not-working-with-my-theme](http://docs.themeisle.com/article/54-why-comment-review-option-is-not-working-with-my-theme)
|
447 |
+
|
448 |
+
### How to fix the review boxes issue ###
|
449 |
+
[http://docs.themeisle.com/article/210-how-to-fix-the-review-boxes-issue](http://docs.themeisle.com/article/210-how-to-fix-the-review-boxes-issue)
|
450 |
+
|
451 |
+
### Price in WP Product Review is messed up ###
|
452 |
+
[http://docs.themeisle.com/article/216-price-in-wp-product-review-is-messed-up](http://docs.themeisle.com/article/216-price-in-wp-product-review-is-messed-up)
|
453 |
+
|
454 |
+
### Prevent users from posting multiple review on a single post in WP Product Review ###
|
455 |
+
[http://docs.themeisle.com/article/578-prevent-users-from-posting-multiple-review-on-a-single-post-in-wp-product-review](http://docs.themeisle.com/article/578-prevent-users-from-posting-multiple-review-on-a-single-post-in-wp-product-review)
|
456 |
+
|
457 |
+
## Upgrade Notice ##
|
458 |
+
|
459 |
+
### 3.0 ###
|
460 |
+
3.0 is a major update. It is important that you make backups and ensure themes are 3.0 compatible before upgrading.
|
461 |
+
|
462 |
+
## Screenshots ##
|
463 |
+
|
464 |
+
1. Screenshot 1 Wrap-up review widget that is added at the end of the posts
|
465 |
+
2. Screenshot 2 User Review Options added to wp comments
|
466 |
+
3. Screenshot 3 Fully configurable theme options
|
467 |
+
4. Screenshot 4 Rich Snippets displayed in Google
|
468 |
+
|
469 |
+
for more you can check out
|
470 |
+
|
471 |
+
https://themeisle.com/plugins/wp-product-review-lite/
|
472 |
+
|
473 |
+
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madali
|
|
3 |
Tags: review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
|
4 |
Author URI: http://themeisle.com
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -67,6 +67,14 @@ If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-
|
|
67 |
* fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
|
68 |
|
69 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
= 3.1.0 - 2017-09-22 =
|
71 |
|
72 |
* Fix for some edge cases when the review box was gone.
|
3 |
Tags: review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
|
4 |
Author URI: http://themeisle.com
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.9
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
67 |
* fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
|
68 |
|
69 |
== Changelog ==
|
70 |
+
= 3.2.0 - 2017-11-06 =
|
71 |
+
|
72 |
+
* Adds support for custom post-type and taxonomies in widgets.
|
73 |
+
* Adds control for time-frame in top reviews widget.
|
74 |
+
* Improves responsiveness and removes dependency of pie-chart.js
|
75 |
+
* Improves notifications when Disqus and Jetpack comments are used.
|
76 |
+
|
77 |
+
|
78 |
= 3.1.0 - 2017-09-22 =
|
79 |
|
80 |
* Fix for some edge cases when the review box was gone.
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit7c19dbcfed32f90ea0d8f2991fa0488b::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit7a0dbf136752ea627d74f4be1cb79941::getLoader();
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php
CHANGED
@@ -22,21 +22,21 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
22 |
* @var array $options_plugin The main options list for plugins.
|
23 |
*/
|
24 |
private $options_plugin = array(
|
25 |
-
'I only needed the plugin for a short period'
|
26 |
'id' => 1,
|
27 |
),
|
28 |
-
'The plugin broke my site'
|
29 |
'id' => 2,
|
30 |
),
|
31 |
-
'I found a better plugin'
|
32 |
'id' => 3,
|
33 |
'type' => 'text',
|
34 |
'placeholder' => 'What\'s the plugin\'s name?',
|
35 |
),
|
36 |
-
'The plugin suddenly stopped working'
|
37 |
'id' => 4,
|
38 |
),
|
39 |
-
'I no longer need the plugin'
|
40 |
'id' => 5,
|
41 |
'type' => 'textarea',
|
42 |
'placeholder' => 'If you could improve one thing about our product, what would it be?',
|
@@ -50,13 +50,13 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
50 |
* @var array $options_theme The main options list for themes.
|
51 |
*/
|
52 |
private $options_theme = array(
|
53 |
-
'I don\'t know how to make it look like demo'
|
54 |
'id' => 7,
|
55 |
),
|
56 |
-
'It lacks options'
|
57 |
'id' => 8,
|
58 |
),
|
59 |
-
'Is not working with a plugin that I need'
|
60 |
'id' => 9,
|
61 |
'type' => 'text',
|
62 |
'placeholder' => 'What is the name of the plugin',
|
@@ -409,10 +409,10 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
409 |
|
410 |
$list = '';
|
411 |
foreach ( $options as $title => $attributes ) {
|
412 |
-
$id
|
413 |
$list .= '<li ti-option-id="' . $id . '"><input type="radio" name="ti-deactivate-option" id="' . $key . $id . '"><label for="' . $key . $id . '">' . str_replace( '{theme}', $this->product->get_name(), $title ) . '</label>';
|
414 |
if ( array_key_exists( 'type', $attributes ) ) {
|
415 |
-
$list
|
416 |
$placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
|
417 |
switch ( $attributes['type'] ) {
|
418 |
case 'text':
|
@@ -431,7 +431,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
431 |
. '<ul class="ti-list">' . $list . '</ul>'
|
432 |
. '<div class="actions">'
|
433 |
. get_submit_button(
|
434 |
-
$button_submit_before
|
435 |
'data-after-text' => $button_submit,
|
436 |
)
|
437 |
)
|
22 |
* @var array $options_plugin The main options list for plugins.
|
23 |
*/
|
24 |
private $options_plugin = array(
|
25 |
+
'I only needed the plugin for a short period' => array(
|
26 |
'id' => 1,
|
27 |
),
|
28 |
+
'The plugin broke my site' => array(
|
29 |
'id' => 2,
|
30 |
),
|
31 |
+
'I found a better plugin' => array(
|
32 |
'id' => 3,
|
33 |
'type' => 'text',
|
34 |
'placeholder' => 'What\'s the plugin\'s name?',
|
35 |
),
|
36 |
+
'The plugin suddenly stopped working' => array(
|
37 |
'id' => 4,
|
38 |
),
|
39 |
+
'I no longer need the plugin' => array(
|
40 |
'id' => 5,
|
41 |
'type' => 'textarea',
|
42 |
'placeholder' => 'If you could improve one thing about our product, what would it be?',
|
50 |
* @var array $options_theme The main options list for themes.
|
51 |
*/
|
52 |
private $options_theme = array(
|
53 |
+
'I don\'t know how to make it look like demo' => array(
|
54 |
'id' => 7,
|
55 |
),
|
56 |
+
'It lacks options' => array(
|
57 |
'id' => 8,
|
58 |
),
|
59 |
+
'Is not working with a plugin that I need' => array(
|
60 |
'id' => 9,
|
61 |
'type' => 'text',
|
62 |
'placeholder' => 'What is the name of the plugin',
|
409 |
|
410 |
$list = '';
|
411 |
foreach ( $options as $title => $attributes ) {
|
412 |
+
$id = $attributes['id'];
|
413 |
$list .= '<li ti-option-id="' . $id . '"><input type="radio" name="ti-deactivate-option" id="' . $key . $id . '"><label for="' . $key . $id . '">' . str_replace( '{theme}', $this->product->get_name(), $title ) . '</label>';
|
414 |
if ( array_key_exists( 'type', $attributes ) ) {
|
415 |
+
$list .= '<div>';
|
416 |
$placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
|
417 |
switch ( $attributes['type'] ) {
|
418 |
case 'text':
|
431 |
. '<ul class="ti-list">' . $list . '</ul>'
|
432 |
. '<div class="actions">'
|
433 |
. get_submit_button(
|
434 |
+
$button_submit_before, 'secondary', $this->product->get_key() . 'ti-deactivate-yes', false, array(
|
435 |
'data-after-text' => $button_submit,
|
436 |
)
|
437 |
)
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php
CHANGED
@@ -21,7 +21,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
|
|
21 |
/**
|
22 |
* @var array $instances collection of the instances that are registered with the factory
|
23 |
*/
|
24 |
-
private $_instances
|
25 |
|
26 |
/**
|
27 |
* ThemeIsle_SDK_Feedback_Factory constructor.
|
@@ -32,8 +32,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
|
|
32 |
public function __construct( $product_object, $feedback_types ) {
|
33 |
if ( $product_object instanceof ThemeIsle_SDK_Product && $feedback_types && is_array( $feedback_types ) ) {
|
34 |
foreach ( $feedback_types as $type ) {
|
35 |
-
$class
|
36 |
-
$instance
|
37 |
$this->_instances[ $type ] = $instance;
|
38 |
$instance->setup_hooks();
|
39 |
}
|
21 |
/**
|
22 |
* @var array $instances collection of the instances that are registered with the factory
|
23 |
*/
|
24 |
+
private $_instances = array();
|
25 |
|
26 |
/**
|
27 |
* ThemeIsle_SDK_Feedback_Factory constructor.
|
32 |
public function __construct( $product_object, $feedback_types ) {
|
33 |
if ( $product_object instanceof ThemeIsle_SDK_Product && $feedback_types && is_array( $feedback_types ) ) {
|
34 |
foreach ( $feedback_types as $type ) {
|
35 |
+
$class = 'ThemeIsle_SDK_Feedback_' . ucwords( $type );
|
36 |
+
$instance = new $class( $product_object );
|
37 |
$this->_instances[ $type ] = $instance;
|
38 |
$instance->setup_hooks();
|
39 |
}
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php
CHANGED
@@ -21,7 +21,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
21 |
/**
|
22 |
* @var string $heading The heading of the modal
|
23 |
*/
|
24 |
-
private $heading = 'Hey, it’s great to see you have {product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}';
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
/**
|
27 |
* @var string $button_cancel The text of the cancel button
|
@@ -56,9 +61,11 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
56 |
}
|
57 |
|
58 |
/**
|
59 |
-
*
|
|
|
|
|
60 |
*/
|
61 |
-
function
|
62 |
if ( ! $this->product->is_wordpress_available() ) {
|
63 |
$this->disable();
|
64 |
|
@@ -68,11 +75,26 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
68 |
if ( 'no' === $show ) {
|
69 |
return false;
|
70 |
}
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
return true;
|
74 |
}
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
/**
|
77 |
* Shows the admin notice
|
78 |
*/
|
@@ -144,15 +166,17 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
144 |
$heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
|
145 |
$heading = str_replace(
|
146 |
array( '{product}' ),
|
147 |
-
|
148 |
);
|
149 |
$heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
|
150 |
|
151 |
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
|
152 |
$button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
|
|
|
153 |
|
154 |
return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
|
155 |
. '<p>' . $heading . '</p>'
|
|
|
156 |
. '<div class="actions">'
|
157 |
. '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
|
158 |
. get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
|
21 |
/**
|
22 |
* @var string $heading The heading of the modal
|
23 |
*/
|
24 |
+
private $heading = 'Hey, it’s great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var string $msg The text of the modal
|
28 |
+
*/
|
29 |
+
private $msg = '';
|
30 |
|
31 |
/**
|
32 |
* @var string $button_cancel The text of the cancel button
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
+
* Either we can notify or not.
|
65 |
+
*
|
66 |
+
* @return bool Notification available or not.
|
67 |
*/
|
68 |
+
public function can_notify() {
|
69 |
if ( ! $this->product->is_wordpress_available() ) {
|
70 |
$this->disable();
|
71 |
|
75 |
if ( 'no' === $show ) {
|
76 |
return false;
|
77 |
}
|
78 |
+
$finally_show = apply_filters( $this->product->get_key() . '_feedback_review_trigger', true );
|
79 |
+
if ( false !== $finally_show ) {
|
80 |
+
if ( is_array( $finally_show ) && ! empty( $finally_show ) ) {
|
81 |
+
$this->heading = $finally_show['heading'];
|
82 |
+
$this->msg = $finally_show['msg'];
|
83 |
+
}
|
84 |
+
} else {
|
85 |
+
return false;
|
86 |
+
}
|
87 |
|
88 |
return true;
|
89 |
}
|
90 |
|
91 |
+
/**
|
92 |
+
* Shows the notification
|
93 |
+
*/
|
94 |
+
function show_notification() {
|
95 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
96 |
+
}
|
97 |
+
|
98 |
/**
|
99 |
* Shows the admin notice
|
100 |
*/
|
166 |
$heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
|
167 |
$heading = str_replace(
|
168 |
array( '{product}' ),
|
169 |
+
$this->product->get_friendly_name(), $heading
|
170 |
);
|
171 |
$heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
|
172 |
|
173 |
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
|
174 |
$button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
|
175 |
+
$msg = apply_filters( $this->product->get_key() . '_feedback_review_message', $this->msg );
|
176 |
|
177 |
return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
|
178 |
. '<p>' . $heading . '</p>'
|
179 |
+
. ( $msg ? '<p>' . $msg . '</p>' : '' )
|
180 |
. '<div class="actions">'
|
181 |
. '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
|
182 |
. get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php
ADDED
@@ -0,0 +1,983 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Translate feedback model class for ThemeIsle SDK
|
4 |
+
*
|
5 |
+
* @package ThemeIsleSDK
|
6 |
+
* @subpackage Feedback
|
7 |
+
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
+
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
+
* @since 1.0.0
|
10 |
+
*/
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Translate' ) ) :
|
16 |
+
/**
|
17 |
+
* Translate feedback model for ThemeIsle SDK.
|
18 |
+
*/
|
19 |
+
class ThemeIsle_SDK_Feedback_Translate extends ThemeIsle_SDK_Feedback {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var string $heading The heading of the modal
|
23 |
+
*/
|
24 |
+
private $heading = 'Improve {product}';
|
25 |
+
/**
|
26 |
+
* @var string The message.
|
27 |
+
*/
|
28 |
+
private $msg = 'Translating <b>{product}</b> into as many languages as possible is a huge project. We still need help with a lot of them, so if you are good at translating into <b>{language}</b>, it would be greatly appreciated.
|
29 |
+
The process is easy, and you can join by following the link below!';
|
30 |
+
/**
|
31 |
+
* @var string $button_cancel The text of the cancel button
|
32 |
+
*/
|
33 |
+
private $button_cancel = 'No, thanks.';
|
34 |
+
/**
|
35 |
+
* @var string $button_already The text of the already did it button
|
36 |
+
*/
|
37 |
+
private $button_do = 'Ok, I will gladly help.';
|
38 |
+
/**
|
39 |
+
* @var array Array of available locals.
|
40 |
+
*/
|
41 |
+
private $locales = array(
|
42 |
+
'af' => array(
|
43 |
+
'slug' => 'af',
|
44 |
+
'name' => 'Afrikaans',
|
45 |
+
),
|
46 |
+
'ak' => array(
|
47 |
+
'slug' => 'ak',
|
48 |
+
'name' => 'Akan',
|
49 |
+
),
|
50 |
+
'am' => array(
|
51 |
+
'slug' => 'am',
|
52 |
+
'name' => 'Amharic',
|
53 |
+
),
|
54 |
+
'ar' => array(
|
55 |
+
'slug' => 'ar',
|
56 |
+
'name' => 'Arabic',
|
57 |
+
),
|
58 |
+
'arq' => array(
|
59 |
+
'slug' => 'arq',
|
60 |
+
'name' => 'Algerian Arabic',
|
61 |
+
),
|
62 |
+
'ary' => array(
|
63 |
+
'slug' => 'ary',
|
64 |
+
'name' => 'Moroccan Arabic',
|
65 |
+
),
|
66 |
+
'as' => array(
|
67 |
+
'slug' => 'as',
|
68 |
+
'name' => 'Assamese',
|
69 |
+
),
|
70 |
+
'ast' => array(
|
71 |
+
'slug' => 'ast',
|
72 |
+
'name' => 'Asturian',
|
73 |
+
),
|
74 |
+
'az' => array(
|
75 |
+
'slug' => 'az',
|
76 |
+
'name' => 'Azerbaijani',
|
77 |
+
),
|
78 |
+
'azb' => array(
|
79 |
+
'slug' => 'azb',
|
80 |
+
'name' => 'South Azerbaijani',
|
81 |
+
),
|
82 |
+
'az_TR' => array(
|
83 |
+
'slug' => 'az-tr',
|
84 |
+
'name' => 'Azerbaijani (Turkey)',
|
85 |
+
),
|
86 |
+
'ba' => array(
|
87 |
+
'slug' => 'ba',
|
88 |
+
'name' => 'Bashkir',
|
89 |
+
),
|
90 |
+
'bal' => array(
|
91 |
+
'slug' => 'bal',
|
92 |
+
'name' => 'Catalan (Balear)',
|
93 |
+
),
|
94 |
+
'bcc' => array(
|
95 |
+
'slug' => 'bcc',
|
96 |
+
'name' => 'Balochi Southern',
|
97 |
+
),
|
98 |
+
'bel' => array(
|
99 |
+
'slug' => 'bel',
|
100 |
+
'name' => 'Belarusian',
|
101 |
+
),
|
102 |
+
'bg_BG' => array(
|
103 |
+
'slug' => 'bg',
|
104 |
+
'name' => 'Bulgarian',
|
105 |
+
),
|
106 |
+
'bn_BD' => array(
|
107 |
+
'slug' => 'bn',
|
108 |
+
'name' => 'Bengali',
|
109 |
+
),
|
110 |
+
'bo' => array(
|
111 |
+
'slug' => 'bo',
|
112 |
+
'name' => 'Tibetan',
|
113 |
+
),
|
114 |
+
'bre' => array(
|
115 |
+
'slug' => 'br',
|
116 |
+
'name' => 'Breton',
|
117 |
+
),
|
118 |
+
'bs_BA' => array(
|
119 |
+
'slug' => 'bs',
|
120 |
+
'name' => 'Bosnian',
|
121 |
+
),
|
122 |
+
'ca' => array(
|
123 |
+
'slug' => 'ca',
|
124 |
+
'name' => 'Catalan',
|
125 |
+
),
|
126 |
+
'ceb' => array(
|
127 |
+
'slug' => 'ceb',
|
128 |
+
'name' => 'Cebuano',
|
129 |
+
),
|
130 |
+
'ckb' => array(
|
131 |
+
'slug' => 'ckb',
|
132 |
+
'name' => 'Kurdish (Sorani)',
|
133 |
+
),
|
134 |
+
'co' => array(
|
135 |
+
'slug' => 'co',
|
136 |
+
'name' => 'Corsican',
|
137 |
+
),
|
138 |
+
'cs_CZ' => array(
|
139 |
+
'slug' => 'cs',
|
140 |
+
'name' => 'Czech',
|
141 |
+
),
|
142 |
+
'cy' => array(
|
143 |
+
'slug' => 'cy',
|
144 |
+
'name' => 'Welsh',
|
145 |
+
),
|
146 |
+
'da_DK' => array(
|
147 |
+
'slug' => 'da',
|
148 |
+
'name' => 'Danish',
|
149 |
+
),
|
150 |
+
'de_DE' => array(
|
151 |
+
'slug' => 'de',
|
152 |
+
'name' => 'German',
|
153 |
+
),
|
154 |
+
'de_CH' => array(
|
155 |
+
'slug' => 'de-ch',
|
156 |
+
'name' => 'German (Switzerland)',
|
157 |
+
),
|
158 |
+
'dv' => array(
|
159 |
+
'slug' => 'dv',
|
160 |
+
'name' => 'Dhivehi',
|
161 |
+
),
|
162 |
+
'dzo' => array(
|
163 |
+
'slug' => 'dzo',
|
164 |
+
'name' => 'Dzongkha',
|
165 |
+
),
|
166 |
+
'el' => array(
|
167 |
+
'slug' => 'el',
|
168 |
+
'name' => 'Greek',
|
169 |
+
),
|
170 |
+
'art_xemoji' => array(
|
171 |
+
'slug' => 'art-xemoji',
|
172 |
+
'name' => 'Emoji',
|
173 |
+
),
|
174 |
+
'en_US' => array(
|
175 |
+
'slug' => 'en',
|
176 |
+
'name' => 'English',
|
177 |
+
),
|
178 |
+
'en_AU' => array(
|
179 |
+
'slug' => 'en-au',
|
180 |
+
'name' => 'English (Australia)',
|
181 |
+
),
|
182 |
+
'en_CA' => array(
|
183 |
+
'slug' => 'en-ca',
|
184 |
+
'name' => 'English (Canada)',
|
185 |
+
),
|
186 |
+
'en_GB' => array(
|
187 |
+
'slug' => 'en-gb',
|
188 |
+
'name' => 'English (UK)',
|
189 |
+
),
|
190 |
+
'en_NZ' => array(
|
191 |
+
'slug' => 'en-nz',
|
192 |
+
'name' => 'English (New Zealand)',
|
193 |
+
),
|
194 |
+
'en_ZA' => array(
|
195 |
+
'slug' => 'en-za',
|
196 |
+
'name' => 'English (South Africa)',
|
197 |
+
),
|
198 |
+
'eo' => array(
|
199 |
+
'slug' => 'eo',
|
200 |
+
'name' => 'Esperanto',
|
201 |
+
),
|
202 |
+
'es_ES' => array(
|
203 |
+
'slug' => 'es',
|
204 |
+
'name' => 'Spanish (Spain)',
|
205 |
+
),
|
206 |
+
'es_AR' => array(
|
207 |
+
'slug' => 'es-ar',
|
208 |
+
'name' => 'Spanish (Argentina)',
|
209 |
+
),
|
210 |
+
'es_CL' => array(
|
211 |
+
'slug' => 'es-cl',
|
212 |
+
'name' => 'Spanish (Chile)',
|
213 |
+
),
|
214 |
+
'es_CO' => array(
|
215 |
+
'slug' => 'es-co',
|
216 |
+
'name' => 'Spanish (Colombia)',
|
217 |
+
),
|
218 |
+
'es_CR' => array(
|
219 |
+
'slug' => 'es-cr',
|
220 |
+
'name' => 'Spanish (Costa Rica)',
|
221 |
+
),
|
222 |
+
'es_GT' => array(
|
223 |
+
'slug' => 'es-gt',
|
224 |
+
'name' => 'Spanish (Guatemala)',
|
225 |
+
),
|
226 |
+
'es_MX' => array(
|
227 |
+
'slug' => 'es-mx',
|
228 |
+
'name' => 'Spanish (Mexico)',
|
229 |
+
),
|
230 |
+
'es_PE' => array(
|
231 |
+
'slug' => 'es-pe',
|
232 |
+
'name' => 'Spanish (Peru)',
|
233 |
+
),
|
234 |
+
'es_PR' => array(
|
235 |
+
'slug' => 'es-pr',
|
236 |
+
'name' => 'Spanish (Puerto Rico)',
|
237 |
+
),
|
238 |
+
'es_VE' => array(
|
239 |
+
'slug' => 'es-ve',
|
240 |
+
'name' => 'Spanish (Venezuela)',
|
241 |
+
),
|
242 |
+
'et' => array(
|
243 |
+
'slug' => 'et',
|
244 |
+
'name' => 'Estonian',
|
245 |
+
),
|
246 |
+
'eu' => array(
|
247 |
+
'slug' => 'eu',
|
248 |
+
'name' => 'Basque',
|
249 |
+
),
|
250 |
+
'fa_IR' => array(
|
251 |
+
'slug' => 'fa',
|
252 |
+
'name' => 'Persian',
|
253 |
+
),
|
254 |
+
'fa_AF' => array(
|
255 |
+
'slug' => 'fa-af',
|
256 |
+
'name' => 'Persian (Afghanistan)',
|
257 |
+
),
|
258 |
+
'fuc' => array(
|
259 |
+
'slug' => 'fuc',
|
260 |
+
'name' => 'Fulah',
|
261 |
+
),
|
262 |
+
'fi' => array(
|
263 |
+
'slug' => 'fi',
|
264 |
+
'name' => 'Finnish',
|
265 |
+
),
|
266 |
+
'fo' => array(
|
267 |
+
'slug' => 'fo',
|
268 |
+
'name' => 'Faroese',
|
269 |
+
),
|
270 |
+
'fr_FR' => array(
|
271 |
+
'slug' => 'fr',
|
272 |
+
'name' => 'French (France)',
|
273 |
+
),
|
274 |
+
'fr_BE' => array(
|
275 |
+
'slug' => 'fr-be',
|
276 |
+
'name' => 'French (Belgium)',
|
277 |
+
),
|
278 |
+
'fr_CA' => array(
|
279 |
+
'slug' => 'fr-ca',
|
280 |
+
'name' => 'French (Canada)',
|
281 |
+
),
|
282 |
+
'frp' => array(
|
283 |
+
'slug' => 'frp',
|
284 |
+
'name' => 'Arpitan',
|
285 |
+
),
|
286 |
+
'fur' => array(
|
287 |
+
'slug' => 'fur',
|
288 |
+
'name' => 'Friulian',
|
289 |
+
),
|
290 |
+
'fy' => array(
|
291 |
+
'slug' => 'fy',
|
292 |
+
'name' => 'Frisian',
|
293 |
+
),
|
294 |
+
'ga' => array(
|
295 |
+
'slug' => 'ga',
|
296 |
+
'name' => 'Irish',
|
297 |
+
),
|
298 |
+
'gd' => array(
|
299 |
+
'slug' => 'gd',
|
300 |
+
'name' => 'Scottish Gaelic',
|
301 |
+
),
|
302 |
+
'gl_ES' => array(
|
303 |
+
'slug' => 'gl',
|
304 |
+
'name' => 'Galician',
|
305 |
+
),
|
306 |
+
'gn' => array(
|
307 |
+
'slug' => 'gn',
|
308 |
+
'name' => 'Guaraní',
|
309 |
+
),
|
310 |
+
'gsw' => array(
|
311 |
+
'slug' => 'gsw',
|
312 |
+
'name' => 'Swiss German',
|
313 |
+
),
|
314 |
+
'gu' => array(
|
315 |
+
'slug' => 'gu',
|
316 |
+
'name' => 'Gujarati',
|
317 |
+
),
|
318 |
+
'hat' => array(
|
319 |
+
'slug' => 'hat',
|
320 |
+
'name' => 'Haitian Creole',
|
321 |
+
),
|
322 |
+
'hau' => array(
|
323 |
+
'slug' => 'hau',
|
324 |
+
'name' => 'Hausa',
|
325 |
+
),
|
326 |
+
'haw_US' => array(
|
327 |
+
'slug' => 'haw',
|
328 |
+
'name' => 'Hawaiian',
|
329 |
+
),
|
330 |
+
'haz' => array(
|
331 |
+
'slug' => 'haz',
|
332 |
+
'name' => 'Hazaragi',
|
333 |
+
),
|
334 |
+
'he_IL' => array(
|
335 |
+
'slug' => 'he',
|
336 |
+
'name' => 'Hebrew',
|
337 |
+
),
|
338 |
+
'hi_IN' => array(
|
339 |
+
'slug' => 'hi',
|
340 |
+
'name' => 'Hindi',
|
341 |
+
),
|
342 |
+
'hr' => array(
|
343 |
+
'slug' => 'hr',
|
344 |
+
'name' => 'Croatian',
|
345 |
+
),
|
346 |
+
'hu_HU' => array(
|
347 |
+
'slug' => 'hu',
|
348 |
+
'name' => 'Hungarian',
|
349 |
+
),
|
350 |
+
'hy' => array(
|
351 |
+
'slug' => 'hy',
|
352 |
+
'name' => 'Armenian',
|
353 |
+
),
|
354 |
+
'id_ID' => array(
|
355 |
+
'slug' => 'id',
|
356 |
+
'name' => 'Indonesian',
|
357 |
+
),
|
358 |
+
'ido' => array(
|
359 |
+
'slug' => 'ido',
|
360 |
+
'name' => 'Ido',
|
361 |
+
),
|
362 |
+
'is_IS' => array(
|
363 |
+
'slug' => 'is',
|
364 |
+
'name' => 'Icelandic',
|
365 |
+
),
|
366 |
+
'it_IT' => array(
|
367 |
+
'slug' => 'it',
|
368 |
+
'name' => 'Italian',
|
369 |
+
),
|
370 |
+
'ja' => array(
|
371 |
+
'slug' => 'ja',
|
372 |
+
'name' => 'Japanese',
|
373 |
+
),
|
374 |
+
'jv_ID' => array(
|
375 |
+
'slug' => 'jv',
|
376 |
+
'name' => 'Javanese',
|
377 |
+
),
|
378 |
+
'ka_GE' => array(
|
379 |
+
'slug' => 'ka',
|
380 |
+
'name' => 'Georgian',
|
381 |
+
),
|
382 |
+
'kab' => array(
|
383 |
+
'slug' => 'kab',
|
384 |
+
'name' => 'Kabyle',
|
385 |
+
),
|
386 |
+
'kal' => array(
|
387 |
+
'slug' => 'kal',
|
388 |
+
'name' => 'Greenlandic',
|
389 |
+
),
|
390 |
+
'kin' => array(
|
391 |
+
'slug' => 'kin',
|
392 |
+
'name' => 'Kinyarwanda',
|
393 |
+
),
|
394 |
+
'kk' => array(
|
395 |
+
'slug' => 'kk',
|
396 |
+
'name' => 'Kazakh',
|
397 |
+
),
|
398 |
+
'km' => array(
|
399 |
+
'slug' => 'km',
|
400 |
+
'name' => 'Khmer',
|
401 |
+
),
|
402 |
+
'kn' => array(
|
403 |
+
'slug' => 'kn',
|
404 |
+
'name' => 'Kannada',
|
405 |
+
),
|
406 |
+
'ko_KR' => array(
|
407 |
+
'slug' => 'ko',
|
408 |
+
'name' => 'Korean',
|
409 |
+
),
|
410 |
+
'kir' => array(
|
411 |
+
'slug' => 'kir',
|
412 |
+
'name' => 'Kyrgyz',
|
413 |
+
),
|
414 |
+
'lb_LU' => array(
|
415 |
+
'slug' => 'lb',
|
416 |
+
'name' => 'Luxembourgish',
|
417 |
+
),
|
418 |
+
'li' => array(
|
419 |
+
'slug' => 'li',
|
420 |
+
'name' => 'Limburgish',
|
421 |
+
),
|
422 |
+
'lin' => array(
|
423 |
+
'slug' => 'lin',
|
424 |
+
'name' => 'Lingala',
|
425 |
+
),
|
426 |
+
'lo' => array(
|
427 |
+
'slug' => 'lo',
|
428 |
+
'name' => 'Lao',
|
429 |
+
),
|
430 |
+
'lt_LT' => array(
|
431 |
+
'slug' => 'lt',
|
432 |
+
'name' => 'Lithuanian',
|
433 |
+
),
|
434 |
+
'lv' => array(
|
435 |
+
'slug' => 'lv',
|
436 |
+
'name' => 'Latvian',
|
437 |
+
),
|
438 |
+
'me_ME' => array(
|
439 |
+
'slug' => 'me',
|
440 |
+
'name' => 'Montenegrin',
|
441 |
+
),
|
442 |
+
'mg_MG' => array(
|
443 |
+
'slug' => 'mg',
|
444 |
+
'name' => 'Malagasy',
|
445 |
+
),
|
446 |
+
'mk_MK' => array(
|
447 |
+
'slug' => 'mk',
|
448 |
+
'name' => 'Macedonian',
|
449 |
+
),
|
450 |
+
'ml_IN' => array(
|
451 |
+
'slug' => 'ml',
|
452 |
+
'name' => 'Malayalam',
|
453 |
+
),
|
454 |
+
'mlt' => array(
|
455 |
+
'slug' => 'mlt',
|
456 |
+
'name' => 'Maltese',
|
457 |
+
),
|
458 |
+
'mn' => array(
|
459 |
+
'slug' => 'mn',
|
460 |
+
'name' => 'Mongolian',
|
461 |
+
),
|
462 |
+
'mr' => array(
|
463 |
+
'slug' => 'mr',
|
464 |
+
'name' => 'Marathi',
|
465 |
+
),
|
466 |
+
'mri' => array(
|
467 |
+
'slug' => 'mri',
|
468 |
+
'name' => 'Maori',
|
469 |
+
),
|
470 |
+
'ms_MY' => array(
|
471 |
+
'slug' => 'ms',
|
472 |
+
'name' => 'Malay',
|
473 |
+
),
|
474 |
+
'my_MM' => array(
|
475 |
+
'slug' => 'mya',
|
476 |
+
'name' => 'Myanmar (Burmese)',
|
477 |
+
),
|
478 |
+
'ne_NP' => array(
|
479 |
+
'slug' => 'ne',
|
480 |
+
'name' => 'Nepali',
|
481 |
+
),
|
482 |
+
'nb_NO' => array(
|
483 |
+
'slug' => 'nb',
|
484 |
+
'name' => 'Norwegian (Bokmål)',
|
485 |
+
),
|
486 |
+
'nl_NL' => array(
|
487 |
+
'slug' => 'nl',
|
488 |
+
'name' => 'Dutch',
|
489 |
+
),
|
490 |
+
'nl_BE' => array(
|
491 |
+
'slug' => 'nl-be',
|
492 |
+
'name' => 'Dutch (Belgium)',
|
493 |
+
),
|
494 |
+
'nn_NO' => array(
|
495 |
+
'slug' => 'nn',
|
496 |
+
'name' => 'Norwegian (Nynorsk)',
|
497 |
+
),
|
498 |
+
'oci' => array(
|
499 |
+
'slug' => 'oci',
|
500 |
+
'name' => 'Occitan',
|
501 |
+
),
|
502 |
+
'ory' => array(
|
503 |
+
'slug' => 'ory',
|
504 |
+
'name' => 'Oriya',
|
505 |
+
),
|
506 |
+
'os' => array(
|
507 |
+
'slug' => 'os',
|
508 |
+
'name' => 'Ossetic',
|
509 |
+
),
|
510 |
+
'pa_IN' => array(
|
511 |
+
'slug' => 'pa',
|
512 |
+
'name' => 'Punjabi',
|
513 |
+
),
|
514 |
+
'pl_PL' => array(
|
515 |
+
'slug' => 'pl',
|
516 |
+
'name' => 'Polish',
|
517 |
+
),
|
518 |
+
'pt_BR' => array(
|
519 |
+
'slug' => 'pt-br',
|
520 |
+
'name' => 'Portuguese (Brazil)',
|
521 |
+
),
|
522 |
+
'pt_PT' => array(
|
523 |
+
'slug' => 'pt',
|
524 |
+
'name' => 'Portuguese (Portugal)',
|
525 |
+
),
|
526 |
+
'ps' => array(
|
527 |
+
'slug' => 'ps',
|
528 |
+
'name' => 'Pashto',
|
529 |
+
),
|
530 |
+
'rhg' => array(
|
531 |
+
'slug' => 'rhg',
|
532 |
+
'name' => 'Rohingya',
|
533 |
+
),
|
534 |
+
'ro_RO' => array(
|
535 |
+
'slug' => 'ro',
|
536 |
+
'name' => 'Romanian',
|
537 |
+
),
|
538 |
+
'roh' => array(
|
539 |
+
'slug' => 'roh',
|
540 |
+
'name' => 'Romansh',
|
541 |
+
),
|
542 |
+
'ru_RU' => array(
|
543 |
+
'slug' => 'ru',
|
544 |
+
'name' => 'Russian',
|
545 |
+
),
|
546 |
+
'rue' => array(
|
547 |
+
'slug' => 'rue',
|
548 |
+
'name' => 'Rusyn',
|
549 |
+
),
|
550 |
+
'rup_MK' => array(
|
551 |
+
'slug' => 'rup',
|
552 |
+
'name' => 'Aromanian',
|
553 |
+
),
|
554 |
+
'sah' => array(
|
555 |
+
'slug' => 'sah',
|
556 |
+
'name' => 'Sakha',
|
557 |
+
),
|
558 |
+
'sa_IN' => array(
|
559 |
+
'slug' => 'sa-in',
|
560 |
+
'name' => 'Sanskrit',
|
561 |
+
),
|
562 |
+
'scn' => array(
|
563 |
+
'slug' => 'scn',
|
564 |
+
'name' => 'Sicilian',
|
565 |
+
),
|
566 |
+
'si_LK' => array(
|
567 |
+
'slug' => 'si',
|
568 |
+
'name' => 'Sinhala',
|
569 |
+
),
|
570 |
+
'sk_SK' => array(
|
571 |
+
'slug' => 'sk',
|
572 |
+
'name' => 'Slovak',
|
573 |
+
),
|
574 |
+
'sl_SI' => array(
|
575 |
+
'slug' => 'sl',
|
576 |
+
'name' => 'Slovenian',
|
577 |
+
),
|
578 |
+
'sna' => array(
|
579 |
+
'slug' => 'sna',
|
580 |
+
'name' => 'Shona',
|
581 |
+
),
|
582 |
+
'snd' => array(
|
583 |
+
'slug' => 'snd',
|
584 |
+
'name' => 'Sindhi',
|
585 |
+
),
|
586 |
+
'so_SO' => array(
|
587 |
+
'slug' => 'so',
|
588 |
+
'name' => 'Somali',
|
589 |
+
),
|
590 |
+
'sq' => array(
|
591 |
+
'slug' => 'sq',
|
592 |
+
'name' => 'Albanian',
|
593 |
+
),
|
594 |
+
'sq_XK' => array(
|
595 |
+
'slug' => 'sq-xk',
|
596 |
+
'name' => 'Shqip (Kosovo)',
|
597 |
+
),
|
598 |
+
'sr_RS' => array(
|
599 |
+
'slug' => 'sr',
|
600 |
+
'name' => 'Serbian',
|
601 |
+
),
|
602 |
+
'srd' => array(
|
603 |
+
'slug' => 'srd',
|
604 |
+
'name' => 'Sardinian',
|
605 |
+
),
|
606 |
+
'su_ID' => array(
|
607 |
+
'slug' => 'su',
|
608 |
+
'name' => 'Sundanese',
|
609 |
+
),
|
610 |
+
'sv_SE' => array(
|
611 |
+
'slug' => 'sv',
|
612 |
+
'name' => 'Swedish',
|
613 |
+
),
|
614 |
+
'sw' => array(
|
615 |
+
'slug' => 'sw',
|
616 |
+
'name' => 'Swahili',
|
617 |
+
),
|
618 |
+
'syr' => array(
|
619 |
+
'slug' => 'syr',
|
620 |
+
'name' => 'Syriac',
|
621 |
+
),
|
622 |
+
'szl' => array(
|
623 |
+
'slug' => 'szl',
|
624 |
+
'name' => 'Silesian',
|
625 |
+
),
|
626 |
+
'ta_IN' => array(
|
627 |
+
'slug' => 'ta',
|
628 |
+
'name' => 'Tamil',
|
629 |
+
),
|
630 |
+
'ta_LK' => array(
|
631 |
+
'slug' => 'ta-lk',
|
632 |
+
'name' => 'Tamil (Sri Lanka)',
|
633 |
+
),
|
634 |
+
'tah' => array(
|
635 |
+
'slug' => 'tah',
|
636 |
+
'name' => 'Tahitian',
|
637 |
+
),
|
638 |
+
'te' => array(
|
639 |
+
'slug' => 'te',
|
640 |
+
'name' => 'Telugu',
|
641 |
+
),
|
642 |
+
'tg' => array(
|
643 |
+
'slug' => 'tg',
|
644 |
+
'name' => 'Tajik',
|
645 |
+
),
|
646 |
+
'th' => array(
|
647 |
+
'slug' => 'th',
|
648 |
+
'name' => 'Thai',
|
649 |
+
),
|
650 |
+
'tir' => array(
|
651 |
+
'slug' => 'tir',
|
652 |
+
'name' => 'Tigrinya',
|
653 |
+
),
|
654 |
+
'tl' => array(
|
655 |
+
'slug' => 'tl',
|
656 |
+
'name' => 'Tagalog',
|
657 |
+
),
|
658 |
+
'tr_TR' => array(
|
659 |
+
'slug' => 'tr',
|
660 |
+
'name' => 'Turkish',
|
661 |
+
),
|
662 |
+
'tt_RU' => array(
|
663 |
+
'slug' => 'tt',
|
664 |
+
'name' => 'Tatar',
|
665 |
+
),
|
666 |
+
'tuk' => array(
|
667 |
+
'slug' => 'tuk',
|
668 |
+
'name' => 'Turkmen',
|
669 |
+
),
|
670 |
+
'twd' => array(
|
671 |
+
'slug' => 'twd',
|
672 |
+
'name' => 'Tweants',
|
673 |
+
),
|
674 |
+
'tzm' => array(
|
675 |
+
'slug' => 'tzm',
|
676 |
+
'name' => 'Tamazight (Central Atlas)',
|
677 |
+
),
|
678 |
+
'ug_CN' => array(
|
679 |
+
'slug' => 'ug',
|
680 |
+
'name' => 'Uighur',
|
681 |
+
),
|
682 |
+
'uk' => array(
|
683 |
+
'slug' => 'uk',
|
684 |
+
'name' => 'Ukrainian',
|
685 |
+
),
|
686 |
+
'ur' => array(
|
687 |
+
'slug' => 'ur',
|
688 |
+
'name' => 'Urdu',
|
689 |
+
),
|
690 |
+
'uz_UZ' => array(
|
691 |
+
'slug' => 'uz',
|
692 |
+
'name' => 'Uzbek',
|
693 |
+
),
|
694 |
+
'vi' => array(
|
695 |
+
'slug' => 'vi',
|
696 |
+
'name' => 'Vietnamese',
|
697 |
+
),
|
698 |
+
'wa' => array(
|
699 |
+
'slug' => 'wa',
|
700 |
+
'name' => 'Walloon',
|
701 |
+
),
|
702 |
+
'xho' => array(
|
703 |
+
'slug' => 'xho',
|
704 |
+
'name' => 'Xhosa',
|
705 |
+
),
|
706 |
+
'xmf' => array(
|
707 |
+
'slug' => 'xmf',
|
708 |
+
'name' => 'Mingrelian',
|
709 |
+
),
|
710 |
+
'yor' => array(
|
711 |
+
'slug' => 'yor',
|
712 |
+
'name' => 'Yoruba',
|
713 |
+
),
|
714 |
+
'zh_CN' => array(
|
715 |
+
'slug' => 'zh-cn',
|
716 |
+
'name' => 'Chinese (China)',
|
717 |
+
),
|
718 |
+
'zh_HK' => array(
|
719 |
+
'slug' => 'zh-hk',
|
720 |
+
'name' => 'Chinese (Hong Kong)',
|
721 |
+
),
|
722 |
+
'zh_TW' => array(
|
723 |
+
'slug' => 'zh-tw',
|
724 |
+
'name' => 'Chinese (Taiwan)',
|
725 |
+
),
|
726 |
+
'de_DE_formal' => array(
|
727 |
+
'slug' => 'de/formal',
|
728 |
+
'name' => 'German (Formal)',
|
729 |
+
),
|
730 |
+
'nl_NL_formal' => array(
|
731 |
+
'slug' => 'nl/formal',
|
732 |
+
'name' => 'Dutch (Formal)',
|
733 |
+
),
|
734 |
+
'de_CH_informal' => array(
|
735 |
+
'slug' => 'de-ch/informal',
|
736 |
+
'name' => 'Chinese (Taiwan)',
|
737 |
+
),
|
738 |
+
'pt_PT_ao90' => array(
|
739 |
+
'slug' => 'pt/ao90',
|
740 |
+
'name' => 'Portuguese (Portugal, AO90)',
|
741 |
+
),
|
742 |
+
);
|
743 |
+
|
744 |
+
/**
|
745 |
+
* ThemeIsle_SDK_Feedback_Translate constructor.
|
746 |
+
*
|
747 |
+
* @param ThemeIsle_SDK_Product $product_object The product object.
|
748 |
+
*/
|
749 |
+
public function __construct( $product_object ) {
|
750 |
+
parent::__construct( $product_object );
|
751 |
+
}
|
752 |
+
|
753 |
+
/**
|
754 |
+
* Return the locale path.
|
755 |
+
*
|
756 |
+
* @param string $locale Locale code.
|
757 |
+
*
|
758 |
+
* @return string Locale path.
|
759 |
+
*/
|
760 |
+
private function get_locale_paths( $locale ) {
|
761 |
+
if ( empty( $locale ) ) {
|
762 |
+
return '';
|
763 |
+
}
|
764 |
+
|
765 |
+
$slug = isset( $this->locales[ $locale ] ) ? $this->locales[ $locale ]['slug'] : '';
|
766 |
+
if ( empty( $slug ) ) {
|
767 |
+
return '';
|
768 |
+
}
|
769 |
+
if ( strpos( $slug, '/' ) === false ) {
|
770 |
+
$slug .= '/default';
|
771 |
+
}
|
772 |
+
$url = 'https://translate.wordpress.org/projects/wp-' . $this->product->get_type() . 's/' . $this->product->get_slug() . '/' . ( $this->product->get_type() === 'plugin' ? 'dev/' : '' ) . $slug . '?filters%5Bstatus%5D=untranslated&sort%5Bby%5D=random';
|
773 |
+
|
774 |
+
return $url;
|
775 |
+
}
|
776 |
+
|
777 |
+
/**
|
778 |
+
* Registers the hooks
|
779 |
+
*/
|
780 |
+
public function setup_hooks_child() {
|
781 |
+
add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
|
782 |
+
}
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Either we should show the notification or not.
|
786 |
+
*
|
787 |
+
* @return bool Valid notification.
|
788 |
+
*/
|
789 |
+
function can_notify() {
|
790 |
+
if ( ! $this->product->is_wordpress_available() ) {
|
791 |
+
$this->disable();
|
792 |
+
return false;
|
793 |
+
}
|
794 |
+
$show = get_option( $this->product->get_key() . '_translate_flag', 'yes' );
|
795 |
+
if ( 'no' === $show ) {
|
796 |
+
return false;
|
797 |
+
}
|
798 |
+
$lang = $this->get_user_locale();
|
799 |
+
if ( 'en_US' === $lang ) {
|
800 |
+
return false;
|
801 |
+
}
|
802 |
+
$languages = $this->get_translations();
|
803 |
+
if ( ! is_array( $languages ) ) {
|
804 |
+
return false;
|
805 |
+
}
|
806 |
+
if ( ! isset( $languages['translations'] ) ) {
|
807 |
+
return false;
|
808 |
+
}
|
809 |
+
|
810 |
+
$languages = $languages['translations'];
|
811 |
+
$available = wp_list_pluck( $languages, 'language' );
|
812 |
+
if ( in_array( $lang, $available ) ) {
|
813 |
+
return false;
|
814 |
+
}
|
815 |
+
if ( ! isset( $this->locales[ $lang ] ) ) {
|
816 |
+
return false;
|
817 |
+
}
|
818 |
+
|
819 |
+
return true;
|
820 |
+
}
|
821 |
+
|
822 |
+
/**
|
823 |
+
* Get the user's locale.
|
824 |
+
*/
|
825 |
+
private function get_user_locale() {
|
826 |
+
global $wp_version;
|
827 |
+
if ( version_compare( $wp_version, '4.7.0', '>=' ) ) {
|
828 |
+
return get_user_locale();
|
829 |
+
}
|
830 |
+
$user = wp_get_current_user();
|
831 |
+
if ( $user ) {
|
832 |
+
$locale = $user->locale;
|
833 |
+
}
|
834 |
+
return $locale ? $locale : get_locale();
|
835 |
+
}
|
836 |
+
|
837 |
+
/**
|
838 |
+
* Shows the notification
|
839 |
+
*/
|
840 |
+
function show_notification() {
|
841 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
842 |
+
}
|
843 |
+
|
844 |
+
/**
|
845 |
+
* Shows the admin notice
|
846 |
+
*/
|
847 |
+
function admin_notices() {
|
848 |
+
$id = $this->product->get_key() . '_translate';
|
849 |
+
|
850 |
+
$this->add_css( $this->product->get_key() );
|
851 |
+
$this->add_js( $this->product->get_key() );
|
852 |
+
$html = $this->get_html( $this->product->get_key() );
|
853 |
+
|
854 |
+
if ( $html ) {
|
855 |
+
echo '<div class="notice notice-success is-dismissible" id="' . $id . '" ><div class="themeisle-translate-box">' . $html . '</div></div>';
|
856 |
+
}
|
857 |
+
}
|
858 |
+
|
859 |
+
/**
|
860 |
+
* Loads the css
|
861 |
+
*
|
862 |
+
* @param string $key The product key.
|
863 |
+
*/
|
864 |
+
function add_css( $key ) {
|
865 |
+
?>
|
866 |
+
<style type="text/css" id="<?php echo $key; ?>ti-translate-css">
|
867 |
+
</style>
|
868 |
+
<?php
|
869 |
+
}
|
870 |
+
|
871 |
+
/**
|
872 |
+
* Loads the js
|
873 |
+
*
|
874 |
+
* @param string $key The product key.
|
875 |
+
*/
|
876 |
+
function add_js( $key ) {
|
877 |
+
?>
|
878 |
+
<script type="text/javascript" id="<?php echo $key; ?>ti-translate-js">
|
879 |
+
(function ($) {
|
880 |
+
$(document).ready(function () {
|
881 |
+
$('#<?php echo $key; ?>_translate').on('click', '.translate-dismiss', function (e) {
|
882 |
+
|
883 |
+
$.ajax({
|
884 |
+
url: ajaxurl,
|
885 |
+
method: "post",
|
886 |
+
data: {
|
887 |
+
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
888 |
+
'action': '<?php echo $this->product->get_key() . __CLASS__; ?>'
|
889 |
+
},
|
890 |
+
success: function () {
|
891 |
+
$('#<?php echo $key; ?>_translate').hide();
|
892 |
+
}
|
893 |
+
});
|
894 |
+
});
|
895 |
+
});
|
896 |
+
})(jQuery);
|
897 |
+
</script>
|
898 |
+
<?php
|
899 |
+
}
|
900 |
+
|
901 |
+
/**
|
902 |
+
* Fetch translations from api.
|
903 |
+
*
|
904 |
+
* @return mixed Translation array.
|
905 |
+
*/
|
906 |
+
private function get_translations() {
|
907 |
+
$cache_key = $this->product->get_key() . '_all_languages';
|
908 |
+
$translations = get_transient( $cache_key );
|
909 |
+
|
910 |
+
if ( $translations === false ) {
|
911 |
+
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
|
912 |
+
$translations = translations_api(
|
913 |
+
$this->product->get_type() . 's',
|
914 |
+
array(
|
915 |
+
'slug' => $this->product->get_slug(),
|
916 |
+
'version' => $this->product->get_version(),
|
917 |
+
)
|
918 |
+
);
|
919 |
+
set_transient( $cache_key, $translations, WEEK_IN_SECONDS );
|
920 |
+
}
|
921 |
+
|
922 |
+
return $translations;
|
923 |
+
|
924 |
+
}
|
925 |
+
|
926 |
+
/**
|
927 |
+
* Generates the HTML
|
928 |
+
*
|
929 |
+
* @param string $key The product key.
|
930 |
+
*
|
931 |
+
* @return void|string Html code of the notification.
|
932 |
+
*/
|
933 |
+
function get_html( $key ) {
|
934 |
+
$lang = $this->get_user_locale();
|
935 |
+
$link = $this->get_locale_paths( $lang );
|
936 |
+
$heading = apply_filters( $this->product->get_key() . '_feedback_translate_heading', $this->heading );
|
937 |
+
$product = $this->product->get_friendly_name();
|
938 |
+
$heading = str_replace(
|
939 |
+
array( '{product}' ),
|
940 |
+
$product, $heading
|
941 |
+
);
|
942 |
+
|
943 |
+
$message = apply_filters( $this->product->get_key() . '_feedback_translation', $this->msg );
|
944 |
+
$language_meta = $this->locales[ $lang ];
|
945 |
+
$message = str_replace( '{language}', $language_meta['name'], $message );
|
946 |
+
$message = str_replace( '{product}', $product, $message );
|
947 |
+
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_translate_button_cancel', $this->button_cancel );
|
948 |
+
$button_do = apply_filters( $this->product->get_key() . '_feedback_translate_button_do', $this->button_do );
|
949 |
+
|
950 |
+
return '<div id="' . $this->product->get_key() . '-translate-notification" class="themeisle-sdk-translate-box">'
|
951 |
+
. '<h2>' . $heading . '</h2>'
|
952 |
+
. '<p>' . $message . '</p>'
|
953 |
+
. '<div class="actions">'
|
954 |
+
. '<a href="' . $link . '" target="_blank" class="button button-primary translate-dismiss"> ' . $button_do . '</a> '
|
955 |
+
. get_submit_button( $button_cancel, 'translate-dismiss ' . $this->product->get_key() . '-ti-translate', $this->product->get_key() . 'ti-translate-no', false )
|
956 |
+
. '</div></br></div>';
|
957 |
+
}
|
958 |
+
|
959 |
+
/**
|
960 |
+
* Called when the either button is clicked
|
961 |
+
*/
|
962 |
+
function dismiss() {
|
963 |
+
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
964 |
+
|
965 |
+
$this->disable();
|
966 |
+
}
|
967 |
+
|
968 |
+
/**
|
969 |
+
* Disables the notification
|
970 |
+
*/
|
971 |
+
protected function disable() {
|
972 |
+
|
973 |
+
update_option( $this->product->get_key() . '_translate_flag', 'no' );
|
974 |
+
}
|
975 |
+
|
976 |
+
/**
|
977 |
+
* Enables the notification
|
978 |
+
*/
|
979 |
+
protected function enable() {
|
980 |
+
update_option( $this->product->get_key() . '_translate_flag', 'yes' );
|
981 |
+
}
|
982 |
+
}
|
983 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php
CHANGED
@@ -34,7 +34,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
|
|
34 |
*/
|
35 |
public function __construct( $product_object ) {
|
36 |
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
37 |
-
$this->product
|
38 |
}
|
39 |
$this->setup_hooks();
|
40 |
}
|
@@ -52,12 +52,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
|
|
52 |
* @param string $attributes The attributes of the post body.
|
53 |
*/
|
54 |
protected function call_api( $attributes ) {
|
55 |
-
$slug
|
56 |
$version = $this->product->get_version();
|
57 |
-
$attributes['slug']
|
58 |
$attributes['version'] = $version;
|
59 |
|
60 |
-
$response
|
61 |
$this->feedback_url, array(
|
62 |
'body' => $attributes,
|
63 |
)
|
@@ -70,8 +70,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
|
|
70 |
* @param array $options The options array.
|
71 |
*/
|
72 |
function randomize_options( $options ) {
|
73 |
-
$new
|
74 |
-
$keys
|
75 |
shuffle( $keys );
|
76 |
|
77 |
foreach ( $keys as $key ) {
|
34 |
*/
|
35 |
public function __construct( $product_object ) {
|
36 |
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
37 |
+
$this->product = $product_object;
|
38 |
}
|
39 |
$this->setup_hooks();
|
40 |
}
|
52 |
* @param string $attributes The attributes of the post body.
|
53 |
*/
|
54 |
protected function call_api( $attributes ) {
|
55 |
+
$slug = $this->product->get_slug();
|
56 |
$version = $this->product->get_version();
|
57 |
+
$attributes['slug'] = $slug;
|
58 |
$attributes['version'] = $version;
|
59 |
|
60 |
+
$response = wp_remote_post(
|
61 |
$this->feedback_url, array(
|
62 |
'body' => $attributes,
|
63 |
)
|
70 |
* @param array $options The options array.
|
71 |
*/
|
72 |
function randomize_options( $options ) {
|
73 |
+
$new = array();
|
74 |
+
$keys = array_keys( $options );
|
75 |
shuffle( $keys );
|
76 |
|
77 |
foreach ( $keys as $key ) {
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
CHANGED
@@ -66,11 +66,16 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
|
|
66 |
if ( array_key_exists( 'review', $instances ) ) {
|
67 |
$notifications[] = $instances['review'];
|
68 |
}
|
|
|
|
|
|
|
69 |
new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
|
70 |
if ( ! $product_object->is_external_author() ) {
|
71 |
new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
|
72 |
}
|
73 |
-
|
|
|
|
|
74 |
return self::$instance;
|
75 |
}
|
76 |
|
66 |
if ( array_key_exists( 'review', $instances ) ) {
|
67 |
$notifications[] = $instances['review'];
|
68 |
}
|
69 |
+
if ( array_key_exists( 'translate', $instances ) ) {
|
70 |
+
$notifications[] = $instances['translate'];
|
71 |
+
}
|
72 |
new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
|
73 |
if ( ! $product_object->is_external_author() ) {
|
74 |
new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
|
75 |
}
|
76 |
+
if ( ! $product_object->is_external_author() ) {
|
77 |
+
new ThemeIsle_SDK_Rollback( $product_object );
|
78 |
+
}
|
79 |
return self::$instance;
|
80 |
}
|
81 |
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php
CHANGED
@@ -37,7 +37,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
37 |
/**
|
38 |
* @var string $heading The heading of the modal
|
39 |
*/
|
40 |
-
private $heading = 'Do you enjoy {product}
|
41 |
|
42 |
/**
|
43 |
* @var string $button_submit The text of the submit button
|
@@ -110,20 +110,27 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
-
*
|
|
|
|
|
114 |
*/
|
115 |
-
function
|
116 |
$show = $this->product->is_logger_active();
|
117 |
$checked = get_option( $this->product->logger_option, '' );
|
118 |
if ( ! $show && $checked == '' ) {
|
119 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
120 |
-
|
121 |
return true;
|
122 |
}
|
123 |
|
124 |
return false;
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
/**
|
128 |
* Shows the admin notice
|
129 |
*/
|
37 |
/**
|
38 |
* @var string $heading The heading of the modal
|
39 |
*/
|
40 |
+
private $heading = 'Do you enjoy <b>{product}</b>? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.';
|
41 |
|
42 |
/**
|
43 |
* @var string $button_submit The text of the submit button
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
+
* Either we should show the notification or not.
|
114 |
+
*
|
115 |
+
* @return bool Valida notification.
|
116 |
*/
|
117 |
+
function can_notify() {
|
118 |
$show = $this->product->is_logger_active();
|
119 |
$checked = get_option( $this->product->logger_option, '' );
|
120 |
if ( ! $show && $checked == '' ) {
|
|
|
|
|
121 |
return true;
|
122 |
}
|
123 |
|
124 |
return false;
|
125 |
}
|
126 |
|
127 |
+
/**
|
128 |
+
* Shows the notification
|
129 |
+
*/
|
130 |
+
function show_notification() {
|
131 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
132 |
+
}
|
133 |
+
|
134 |
/**
|
135 |
* Shows the admin notice
|
136 |
*/
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php
CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
|
|
24 |
/**
|
25 |
* @var array Notifications for the current product.
|
26 |
*/
|
27 |
-
private $notifications = array();
|
28 |
/**
|
29 |
* @var ThemeIsle_SDK_Product Current product.
|
30 |
*/
|
@@ -57,7 +57,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
|
|
57 |
if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
|
58 |
if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
|
59 |
foreach ( $this->callbacks as $instance ) {
|
60 |
-
|
61 |
}
|
62 |
}
|
63 |
}
|
@@ -75,45 +75,31 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
|
|
75 |
* Shows the notification
|
76 |
*/
|
77 |
function show_notification() {
|
78 |
-
|
79 |
-
$hidden = get_option( 'themeisle_sdk_notification_hidden', array() );
|
80 |
-
$instances = $this->notifications;
|
81 |
if ( empty( $instances ) ) {
|
82 |
return;
|
83 |
}
|
84 |
|
85 |
-
|
86 |
-
$
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
if ( ( time() - $old ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
|
92 |
-
// Get hidden notifications key.
|
93 |
-
$hidden_ones = wp_list_pluck( $hidden, 'key' );
|
94 |
-
// Get the non-hidden notifications.
|
95 |
-
$available_notifications = array_diff( array_keys( $instances ), $hidden_ones );
|
96 |
-
if ( empty( $available_notifications ) ) {
|
97 |
-
return;
|
98 |
-
}
|
99 |
-
// Get the first notification available.
|
100 |
-
$new_one = reset( $available_notifications );
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
} else {
|
113 |
-
$instance = $this->notifications[ $key ];
|
114 |
}
|
115 |
}
|
116 |
-
|
117 |
}
|
118 |
}
|
119 |
endif;
|
24 |
/**
|
25 |
* @var array Notifications for the current product.
|
26 |
*/
|
27 |
+
static private $notifications = array();
|
28 |
/**
|
29 |
* @var ThemeIsle_SDK_Product Current product.
|
30 |
*/
|
57 |
if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
|
58 |
if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
|
59 |
foreach ( $this->callbacks as $instance ) {
|
60 |
+
self::$notifications[ $this->product->get_key() . get_class( $instance ) ] = $instance;
|
61 |
}
|
62 |
}
|
63 |
}
|
75 |
* Shows the notification
|
76 |
*/
|
77 |
function show_notification() {
|
78 |
+
$instances = self::$notifications;
|
|
|
|
|
79 |
if ( empty( $instances ) ) {
|
80 |
return;
|
81 |
}
|
82 |
|
83 |
+
$available = array_keys( $instances );
|
84 |
+
$active = get_option( 'themeisle_sdk_active_notification', array() );
|
85 |
+
|
86 |
+
foreach ( $available as $key ) {
|
87 |
+
$instance = $instances[ $key ];
|
88 |
+
if ( $instance->can_notify() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
+
// Detect notification switch.
|
91 |
+
if ( empty( $active['key'] ) || ( $active['key'] != $key ) ) {
|
92 |
+
$active['key'] = $key;
|
93 |
+
$active['time'] = time();
|
94 |
+
update_option( 'themeisle_sdk_active_notification', $active );
|
95 |
+
}
|
96 |
+
if ( ( time() - $active['time'] ) > ( self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) ) {
|
97 |
+
$instance->show_notification();
|
98 |
+
}
|
99 |
+
break;
|
|
|
|
|
100 |
}
|
101 |
}
|
102 |
+
|
103 |
}
|
104 |
}
|
105 |
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php
CHANGED
@@ -60,7 +60,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
60 |
/**
|
61 |
* @var array $allowed_authors The allowed authors.
|
62 |
*/
|
63 |
-
private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com' );
|
64 |
/**
|
65 |
* @var bool $requires_license Either user needs to activate it with license.
|
66 |
*/
|
@@ -154,6 +154,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
154 |
}
|
155 |
if ( $this->is_wordpress_available() ) {
|
156 |
$this->feedback_types[] = 'review';
|
|
|
157 |
}
|
158 |
}
|
159 |
|
@@ -247,6 +248,147 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
247 |
return $this->wordpress_available;
|
248 |
}
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
/**
|
251 |
* Return the product key.
|
252 |
*
|
@@ -256,6 +398,18 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
256 |
return $this->key;
|
257 |
}
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
/**
|
260 |
* Either the product requires license or not.
|
261 |
*
|
60 |
/**
|
61 |
* @var array $allowed_authors The allowed authors.
|
62 |
*/
|
63 |
+
private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com' );
|
64 |
/**
|
65 |
* @var bool $requires_license Either user needs to activate it with license.
|
66 |
*/
|
154 |
}
|
155 |
if ( $this->is_wordpress_available() ) {
|
156 |
$this->feedback_types[] = 'review';
|
157 |
+
$this->feedback_types[] = 'translate';
|
158 |
}
|
159 |
}
|
160 |
|
248 |
return $this->wordpress_available;
|
249 |
}
|
250 |
|
251 |
+
/**
|
252 |
+
* @return array Array of available versions.
|
253 |
+
*/
|
254 |
+
private function get_plugin_versions() {
|
255 |
+
|
256 |
+
$url = sprintf( 'https://api.wordpress.org/plugins/info/1.0/%s', $this->get_slug() );
|
257 |
+
$response = wp_remote_get( $url );
|
258 |
+
if ( is_wp_error( $response ) ) {
|
259 |
+
return array();
|
260 |
+
}
|
261 |
+
$response = wp_remote_retrieve_body( $response );
|
262 |
+
$response = maybe_unserialize( $response );
|
263 |
+
|
264 |
+
if ( ! is_object( $response ) ) {
|
265 |
+
return array();
|
266 |
+
}
|
267 |
+
if ( ! isset( $response->versions ) ) {
|
268 |
+
return array();
|
269 |
+
}
|
270 |
+
$versions = array();
|
271 |
+
foreach ( $response->versions as $version => $zip ) {
|
272 |
+
$versions[] = array(
|
273 |
+
'version' => $version,
|
274 |
+
'url' => $zip,
|
275 |
+
);
|
276 |
+
}
|
277 |
+
|
278 |
+
return $versions;
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Return theme versions.
|
283 |
+
*
|
284 |
+
* @return array Theme versions array.
|
285 |
+
*/
|
286 |
+
public function get_theme_versions() {
|
287 |
+
$url = sprintf( 'https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=%s&request[fields][versions]=true', $this->get_slug() );
|
288 |
+
$response = wp_remote_get( $url );
|
289 |
+
if ( is_wp_error( $response ) ) {
|
290 |
+
return array();
|
291 |
+
}
|
292 |
+
$response = wp_remote_retrieve_body( $response );
|
293 |
+
$response = json_decode( $response );
|
294 |
+
|
295 |
+
if ( ! is_object( $response ) ) {
|
296 |
+
return array();
|
297 |
+
}
|
298 |
+
if ( ! isset( $response->versions ) ) {
|
299 |
+
return array();
|
300 |
+
}
|
301 |
+
$versions = array();
|
302 |
+
foreach ( $response->versions as $version => $zip ) {
|
303 |
+
$versions[] = array(
|
304 |
+
'version' => $version,
|
305 |
+
'url' => $zip,
|
306 |
+
);
|
307 |
+
}
|
308 |
+
|
309 |
+
return $versions;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Get versions array from wp.org
|
314 |
+
*
|
315 |
+
* @return array Array of versions.
|
316 |
+
*/
|
317 |
+
private function get_api_versions() {
|
318 |
+
if ( ! $this->is_wordpress_available() ) {
|
319 |
+
return array();
|
320 |
+
}
|
321 |
+
|
322 |
+
$cache_key = $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions';
|
323 |
+
$cache_versions = get_transient( $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions' );
|
324 |
+
if ( false == $cache_versions ) {
|
325 |
+
$versions = array();
|
326 |
+
if ( $this->get_type() === 'plugin' ) {
|
327 |
+
$versions = $this->get_plugin_versions();
|
328 |
+
}
|
329 |
+
|
330 |
+
if ( $this->get_type() === 'theme' ) {
|
331 |
+
$versions = $this->get_theme_versions();
|
332 |
+
}
|
333 |
+
set_transient( $cache_key, $versions, MONTH_IN_SECONDS );
|
334 |
+
} else {
|
335 |
+
$versions = is_array( $cache_versions ) ? $cache_versions : array();
|
336 |
+
}
|
337 |
+
|
338 |
+
return $versions;
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Get the last rollback for this product.
|
343 |
+
*
|
344 |
+
* @return array The rollback version.
|
345 |
+
*/
|
346 |
+
public function get_rollback() {
|
347 |
+
$rollback = array();
|
348 |
+
$versions = $this->get_api_versions();
|
349 |
+
$versions = apply_filters( $this->get_key() . '_rollbacks', $versions );
|
350 |
+
|
351 |
+
if ( $versions ) {
|
352 |
+
usort( $versions, array( $this, 'sort_rollback_array' ) );
|
353 |
+
foreach ( $versions as $version ) {
|
354 |
+
if ( isset( $version['version'] ) && isset( $version['url'] ) && version_compare( $this->version, $version['version'], '>' ) ) {
|
355 |
+
$rollback = $version;
|
356 |
+
break;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
}
|
360 |
+
|
361 |
+
return $rollback;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Sort the rollbacks array in descending order.
|
366 |
+
*/
|
367 |
+
public function sort_rollback_array( $a, $b ) {
|
368 |
+
return version_compare( $a['version'], $b['version'], '<' ) > 0;
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* If product can be rolled back.
|
373 |
+
*
|
374 |
+
* @return bool Can the product be rolled back or not.
|
375 |
+
*/
|
376 |
+
public function can_rollback() {
|
377 |
+
if ( $this->get_type() === 'theme' ) {
|
378 |
+
if ( ! current_user_can( 'switch_themes' ) ) {
|
379 |
+
return false;
|
380 |
+
}
|
381 |
+
}
|
382 |
+
if ( $this->get_type() === 'plugin' ) {
|
383 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
384 |
+
return false;
|
385 |
+
}
|
386 |
+
}
|
387 |
+
$rollback = $this->get_rollback();
|
388 |
+
|
389 |
+
return ! empty( $rollback );
|
390 |
+
}
|
391 |
+
|
392 |
/**
|
393 |
* Return the product key.
|
394 |
*
|
398 |
return $this->key;
|
399 |
}
|
400 |
|
401 |
+
/**
|
402 |
+
* Return friendly name.
|
403 |
+
*
|
404 |
+
* @return string Friendly name.
|
405 |
+
*/
|
406 |
+
public function get_friendly_name() {
|
407 |
+
$name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
|
408 |
+
$name = rtrim( $name, '- ' );
|
409 |
+
|
410 |
+
return $name;
|
411 |
+
}
|
412 |
+
|
413 |
/**
|
414 |
* Either the product requires license or not.
|
415 |
*
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The rollback class for ThemeIsle SDK
|
4 |
+
*
|
5 |
+
* @package ThemeIsleSDK
|
6 |
+
* @subpackage Rollback
|
7 |
+
* @copyright Copyright (c) 2017, Marius Cristea
|
8 |
+
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
9 |
+
* @since 1.0.0
|
10 |
+
*/
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
if ( ! class_exists( 'ThemeIsle_SDK_Rollback' ) ) :
|
16 |
+
/**
|
17 |
+
* Rollback for ThemeIsle SDK.
|
18 |
+
*/
|
19 |
+
class ThemeIsle_SDK_Rollback {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var ThemeIsle_SDK_Product $product Themeisle Product.
|
23 |
+
*/
|
24 |
+
protected $product;
|
25 |
+
|
26 |
+
|
27 |
+
/**
|
28 |
+
* ThemeIsle_SDK_Rollback constructor.
|
29 |
+
*
|
30 |
+
* @param ThemeIsle_SDK_Product $product_object Product Object.
|
31 |
+
*/
|
32 |
+
public function __construct( $product_object ) {
|
33 |
+
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
34 |
+
$this->product = $product_object;
|
35 |
+
}
|
36 |
+
if ( $this->product->can_rollback() ) {
|
37 |
+
$this->show_link();
|
38 |
+
$this->add_hooks();
|
39 |
+
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Add js scripts for themes rollback.
|
45 |
+
*/
|
46 |
+
public function add_footer() {
|
47 |
+
$screen = get_current_screen();
|
48 |
+
if ( ! isset( $screen->parent_file ) ) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
if ( $screen->parent_file !== 'themes.php' ) {
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
if ( $this->product->get_type() === 'plugin' ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
+
$version = $this->product->get_rollback();
|
59 |
+
?>
|
60 |
+
<script type="text/javascript">
|
61 |
+
jQuery(document).ready(function ($) {
|
62 |
+
setInterval(checkTheme, 500);
|
63 |
+
|
64 |
+
function checkTheme() {
|
65 |
+
var theme = '<?php echo esc_attr( $this->product->get_slug() ); ?>-action';
|
66 |
+
|
67 |
+
if (jQuery('#' + theme).length > 0) {
|
68 |
+
if (jQuery('.theme-overlay.active').is(':visible')) {
|
69 |
+
if (jQuery('#' + theme + '-rollback').length === 0) {
|
70 |
+
jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) ); ?>">Rollback to v<?php echo esc_attr( $version['version'] ); ?></a>')
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
75 |
+
}
|
76 |
+
})
|
77 |
+
|
78 |
+
</script>
|
79 |
+
<?php
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Set the rollback hook. Strangely, this does not work if placed in the ThemeIsle_SDK_Rollback class, so it is being called from there instead.
|
85 |
+
*/
|
86 |
+
public function add_hooks() {
|
87 |
+
add_action( 'admin_post_' . $this->product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
|
88 |
+
add_action( 'admin_footer', array( $this, 'add_footer' ) );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* If product can be rolled back, show the link to rollback.
|
93 |
+
*/
|
94 |
+
private function show_link() {
|
95 |
+
add_filter(
|
96 |
+
'plugin_action_links_' . plugin_basename( $this->product->get_basefile() ), array(
|
97 |
+
$this,
|
98 |
+
'add_rollback_link',
|
99 |
+
)
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Show the rollback links in the plugin page.
|
105 |
+
*
|
106 |
+
* @return array The links.
|
107 |
+
*/
|
108 |
+
public function add_rollback_link( $links ) {
|
109 |
+
$version = $this->product->get_rollback();
|
110 |
+
$links[] = '<a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) . '">' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', 'Rollback to v%s' ), $version['version'] ) . '</a>';
|
111 |
+
|
112 |
+
return $links;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Start the rollback operation.
|
117 |
+
*/
|
118 |
+
public function start_rollback() {
|
119 |
+
if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) {
|
120 |
+
wp_nonce_ays( '' );
|
121 |
+
}
|
122 |
+
|
123 |
+
if ( $this->product->get_type() === 'plugin' ) {
|
124 |
+
$this->start_rollback_plugin();
|
125 |
+
} elseif ( $this->product->get_type() === 'theme' ) {
|
126 |
+
$this->start_rollback_theme();
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Alter links and remove duplicate customize message.
|
132 |
+
*
|
133 |
+
* @param array $links Array of old links.
|
134 |
+
*
|
135 |
+
* @return mixed Array of links.
|
136 |
+
*/
|
137 |
+
public function alter_links_theme_upgrade( $links ) {
|
138 |
+
if ( isset( $links['preview'] ) ) {
|
139 |
+
$links['preview'] = str_replace( '<span aria-hidden="true">Customize</span>', '', $links['preview'] );
|
140 |
+
}
|
141 |
+
|
142 |
+
return $links;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Start the rollback operation for the theme.
|
147 |
+
*/
|
148 |
+
private function start_rollback_theme() {
|
149 |
+
add_filter( 'update_theme_complete_actions', array( $this, 'alter_links_theme_upgrade' ) );
|
150 |
+
$rollback = $this->product->get_rollback();
|
151 |
+
$transient = get_site_transient( 'update_themes' );
|
152 |
+
$folder = $this->product->get_slug();
|
153 |
+
$version = $rollback['version'];
|
154 |
+
$temp_array = array(
|
155 |
+
'new_version' => $version,
|
156 |
+
'package' => $rollback['url'],
|
157 |
+
);
|
158 |
+
|
159 |
+
$transient->response[ $folder . '/style.css' ] = $temp_array;
|
160 |
+
set_site_transient( 'update_themes', $transient );
|
161 |
+
|
162 |
+
$transient = get_transient( $this->product->get_key() . '_warning_rollback' );
|
163 |
+
|
164 |
+
if ( false === $transient ) {
|
165 |
+
set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
|
166 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
167 |
+
$title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
|
168 |
+
$theme = $folder . '/style.css';
|
169 |
+
$nonce = 'upgrade-theme_' . $theme;
|
170 |
+
$url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
|
171 |
+
|
172 |
+
$upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
|
173 |
+
$upgrader->upgrade( $theme );
|
174 |
+
delete_transient( $this->product->get_key() . '_warning_rollback' );
|
175 |
+
wp_die(
|
176 |
+
'', $title, array(
|
177 |
+
'response' => 200,
|
178 |
+
)
|
179 |
+
);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Start the rollback operation for the plugin.
|
185 |
+
*/
|
186 |
+
private function start_rollback_plugin() {
|
187 |
+
$rollback = $this->product->get_rollback();
|
188 |
+
$plugin_transient = get_site_transient( 'update_plugins' );
|
189 |
+
$plugin_folder = $this->product->get_slug();
|
190 |
+
$plugin_file = $this->product->get_file();
|
191 |
+
$version = $rollback['version'];
|
192 |
+
$temp_array = array(
|
193 |
+
'slug' => $plugin_folder,
|
194 |
+
'new_version' => $version,
|
195 |
+
'package' => $rollback['url'],
|
196 |
+
);
|
197 |
+
|
198 |
+
$temp_object = (object) $temp_array;
|
199 |
+
$plugin_transient->response[ $plugin_folder . '/' . $plugin_file ] = $temp_object;
|
200 |
+
set_site_transient( 'update_plugins', $plugin_transient );
|
201 |
+
|
202 |
+
$transient = get_transient( $this->product->get_key() . '_warning_rollback' );
|
203 |
+
|
204 |
+
if ( false === $transient ) {
|
205 |
+
set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
|
206 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
207 |
+
$title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
|
208 |
+
$plugin = $plugin_folder . '/' . $plugin_file;
|
209 |
+
$nonce = 'upgrade-plugin_' . $plugin;
|
210 |
+
$url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
|
211 |
+
$upgrader_skin = new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) );
|
212 |
+
$upgrader = new Plugin_Upgrader( $upgrader_skin );
|
213 |
+
$upgrader->upgrade( $plugin );
|
214 |
+
delete_transient( $this->product->get_key() . '_warning_rollback' );
|
215 |
+
wp_die(
|
216 |
+
'', $title, array(
|
217 |
+
'response' => 200,
|
218 |
+
)
|
219 |
+
);
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
endif;
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php
CHANGED
@@ -170,6 +170,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
|
170 |
color: #72777c;
|
171 |
}
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
</style>
|
174 |
<ul>
|
175 |
<?php
|
@@ -231,6 +237,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
|
231 |
(<a class="thickbox open-plugin-details-modal"
|
232 |
href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
|
233 |
</li>
|
|
|
|
|
|
|
234 |
|
235 |
<?php
|
236 |
}
|
170 |
color: #72777c;
|
171 |
}
|
172 |
|
173 |
+
.ti-dw-powered-by {
|
174 |
+
font-style: italic;
|
175 |
+
text-align: right;
|
176 |
+
margin-top:3px;
|
177 |
+
}
|
178 |
+
|
179 |
</style>
|
180 |
<ul>
|
181 |
<?php
|
237 |
(<a class="thickbox open-plugin-details-modal"
|
238 |
href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
|
239 |
</li>
|
240 |
+
<li class="ti-dw-powered-by">
|
241 |
+
Powered by <?php echo esc_attr( $this->product->get_friendly_name() ); ?>
|
242 |
+
</li>
|
243 |
|
244 |
<?php
|
245 |
}
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php
CHANGED
@@ -29,7 +29,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget' ) ) :
|
|
29 |
*/
|
30 |
public function __construct( $product_object ) {
|
31 |
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
32 |
-
$this->product
|
33 |
}
|
34 |
$this->setup_hooks();
|
35 |
}
|
29 |
*/
|
30 |
public function __construct( $product_object ) {
|
31 |
if ( $product_object instanceof ThemeIsle_SDK_Product ) {
|
32 |
+
$this->product = $product_object;
|
33 |
}
|
34 |
$this->setup_hooks();
|
35 |
}
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php
CHANGED
@@ -27,8 +27,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widgets_Factory' ) ) :
|
|
27 |
public function __construct( $product_object, $widgets ) {
|
28 |
if ( $product_object instanceof ThemeIsle_SDK_Product && $widgets && is_array( $widgets ) ) {
|
29 |
foreach ( $widgets as $widget ) {
|
30 |
-
$class
|
31 |
-
$instance
|
32 |
$instance->setup_hooks();
|
33 |
}
|
34 |
}
|
27 |
public function __construct( $product_object, $widgets ) {
|
28 |
if ( $product_object instanceof ThemeIsle_SDK_Product && $widgets && is_array( $widgets ) ) {
|
29 |
foreach ( $widgets as $widget ) {
|
30 |
+
$class = 'ThemeIsle_SDK_Widget_' . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $widget ) ) );
|
31 |
+
$instance = new $class( $product_object );
|
32 |
$instance->setup_hooks();
|
33 |
}
|
34 |
}
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
-
$themeisle_sdk_version = '1.
|
15 |
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
|
17 |
global $themeisle_sdk_max_version;
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
+
$themeisle_sdk_version = '1.9.1';
|
15 |
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
|
17 |
global $themeisle_sdk_max_version;
|
vendor/codeinwp/themeisle-sdk/start.php
CHANGED
@@ -14,10 +14,12 @@ $files_to_load = array(
|
|
14 |
'class-themeisle-sdk-product.php',
|
15 |
'class-themeisle-sdk-logger.php',
|
16 |
'class-themeisle-sdk-licenser.php',
|
|
|
17 |
'class-themeisle-sdk-feedback-factory.php',
|
18 |
'class-themeisle-sdk-feedback.php',
|
19 |
'class-themeisle-sdk-feedback-deactivate.php',
|
20 |
'class-themeisle-sdk-feedback-review.php',
|
|
|
21 |
'class-themeisle-sdk-notification-manager.php',
|
22 |
'class-themeisle-sdk-widget.php',
|
23 |
'class-themeisle-sdk-widget-dashboard-blog.php',
|
14 |
'class-themeisle-sdk-product.php',
|
15 |
'class-themeisle-sdk-logger.php',
|
16 |
'class-themeisle-sdk-licenser.php',
|
17 |
+
'class-themeisle-sdk-rollback.php',
|
18 |
'class-themeisle-sdk-feedback-factory.php',
|
19 |
'class-themeisle-sdk-feedback.php',
|
20 |
'class-themeisle-sdk-feedback-deactivate.php',
|
21 |
'class-themeisle-sdk-feedback-review.php',
|
22 |
+
'class-themeisle-sdk-feedback-translate.php',
|
23 |
'class-themeisle-sdk-notification-manager.php',
|
24 |
'class-themeisle-sdk-widget.php',
|
25 |
'class-themeisle-sdk-widget-dashboard-blog.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitbe7a15632f2c4db5c700871b54200d84
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInitbe7a15632f2c4db5c700871b54200d84
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit7c19dbcfed32f90ea0d8f2991fa0488b
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit7c19dbcfed32f90ea0d8f2991fa0488b', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit7c19dbcfed32f90ea0d8f2991fa0488b', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
+
composerRequire7c19dbcfed32f90ea0d8f2991fa0488b($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequire7c19dbcfed32f90ea0d8f2991fa0488b($fileIdentifier, $file)
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit9b24882ae844c9dc599896d1806a28e4 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit7a0dbf136752ea627d74f4be1cb79941 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit7a0dbf136752ea627d74f4be1cb79941', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit7a0dbf136752ea627d74f4be1cb79941', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
vendor/composer/installed.json
CHANGED
@@ -39,15 +39,15 @@
|
|
39 |
"source": {
|
40 |
"type": "git",
|
41 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
42 |
-
"reference": "
|
43 |
},
|
44 |
"dist": {
|
45 |
"type": "zip",
|
46 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
47 |
-
"reference": "
|
48 |
"shasum": ""
|
49 |
},
|
50 |
-
"time": "2017-
|
51 |
"type": "library",
|
52 |
"installation-source": "dist",
|
53 |
"autoload": {
|
39 |
"source": {
|
40 |
"type": "git",
|
41 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
42 |
+
"reference": "a05ab89594381a935573300f0aafdae8c28cefe5"
|
43 |
},
|
44 |
"dist": {
|
45 |
"type": "zip",
|
46 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/a05ab89594381a935573300f0aafdae8c28cefe5",
|
47 |
+
"reference": "a05ab89594381a935573300f0aafdae8c28cefe5",
|
48 |
"shasum": ""
|
49 |
},
|
50 |
+
"time": "2017-11-13 10:52:46",
|
51 |
"type": "library",
|
52 |
"installation-source": "dist",
|
53 |
"autoload": {
|
wp-product-review.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: WP Product Review Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/wp-product-review/
|
17 |
* Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
|
18 |
-
* Version: 3.
|
19 |
* Author: ThemeIsle
|
20 |
* Author URI: https://themeisle.com/
|
21 |
* Requires at least: 3.5
|
@@ -67,7 +67,7 @@ register_deactivation_hook( __FILE__, 'deactivate_wppr' );
|
|
67 |
*/
|
68 |
function run_wppr() {
|
69 |
|
70 |
-
define( 'WPPR_LITE_VERSION', '3.
|
71 |
define( 'WPPR_PATH', dirname( __FILE__ ) );
|
72 |
define( 'WPPR_SLUG', 'wppr' );
|
73 |
define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );
|
15 |
* Plugin Name: WP Product Review Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/wp-product-review/
|
17 |
* Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
|
18 |
+
* Version: 3.2.0
|
19 |
* Author: ThemeIsle
|
20 |
* Author URI: https://themeisle.com/
|
21 |
* Requires at least: 3.5
|
67 |
*/
|
68 |
function run_wppr() {
|
69 |
|
70 |
+
define( 'WPPR_LITE_VERSION', '3.2.0' );
|
71 |
define( 'WPPR_PATH', dirname( __FILE__ ) );
|
72 |
define( 'WPPR_SLUG', 'wppr' );
|
73 |
define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );
|