Version Description
- 2017-08-25
Download this release
Release Info
Developer | codeinwp |
Plugin | WP Product Review Lite |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- CHANGELOG.md +12 -0
- assets/css/frontpage.css +1 -1
- includes/admin/class-wppr-admin.php +12 -1
- includes/admin/layouts/settings-tpl.php +11 -7
- includes/admin/models/abstract/class-wppr-model-abstract.php +1 -1
- includes/admin/models/class-wppr-review-model.php +59 -32
- includes/admin/widgets/abstract/class-wppr-widget-abstract.php +0 -3
- includes/admin/widgets/class-wppr-latest-products-widget.php +3 -1
- includes/admin/widgets/class-wppr-top-products-widget.php +3 -2
- includes/class-wppr.php +1 -1
- includes/public/class-wppr-public.php +13 -1
- includes/public/layouts/default-tpl.php +35 -64
- includes/public/layouts/rich-json-ld.php +44 -26
- includes/public/layouts/widget/default.php +3 -2
- includes/public/layouts/widget/style 1.php +27 -27
- languages/wp-product-review.pot +11 -12
- readme.txt +13 -0
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
- wp-product-review.php +2 -2
CHANGELOG.md
CHANGED
@@ -1,4 +1,16 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v3.0.3 - 2017-08-24
|
3 |
**Changes:**
|
4 |
* Fixed widget assets loading error.
|
1 |
|
2 |
+
### v3.0.4 - 2017-08-25
|
3 |
+
**Changes:**
|
4 |
+
* Fix for rich snippets schema.
|
5 |
+
* Fix post update white screen of death.
|
6 |
+
* Fix for thumbnails in widgets.
|
7 |
+
* Fix for duplicate title for widgets list.
|
8 |
+
* Fix for link of the review in the widgets.
|
9 |
+
* Fix for click link behavior on review picture.
|
10 |
+
* Fix widget titles default values.
|
11 |
+
* Fix review rating when comments influence is on.
|
12 |
+
* Improved security.
|
13 |
+
|
14 |
### v3.0.3 - 2017-08-24
|
15 |
**Changes:**
|
16 |
* Fixed widget assets loading error.
|
assets/css/frontpage.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 3.0.
|
3 |
*/
|
4 |
#review-statistics {
|
5 |
width: 100%;
|
1 |
/*
|
2 |
+
Version: 3.0.4
|
3 |
*/
|
4 |
#review-statistics {
|
5 |
width: 100%;
|
includes/admin/class-wppr-admin.php
CHANGED
@@ -178,8 +178,19 @@ class WPPR_Admin {
|
|
178 |
public function update_options() {
|
179 |
$model = new WPPR_Options_Model();
|
180 |
$data = $_POST['cwppos_options'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
foreach ( $data as $option ) {
|
182 |
-
$option['value'];
|
183 |
$model->wppr_set_option( $option['name'], $option['value'] );
|
184 |
}
|
185 |
die();
|
178 |
public function update_options() {
|
179 |
$model = new WPPR_Options_Model();
|
180 |
$data = $_POST['cwppos_options'];
|
181 |
+
|
182 |
+
$nonce = $data[ count( $data ) - 1 ];
|
183 |
+
if ( ! isset( $nonce['name'] ) ) {
|
184 |
+
die( 'invalid nonce field' );
|
185 |
+
}
|
186 |
+
if ( $nonce['name'] != 'wppr_nonce_settings' ) {
|
187 |
+
die( 'invalid nonce name' );
|
188 |
+
}
|
189 |
+
if ( wp_verify_nonce( $nonce['value'],'wppr_save_global_settings' ) != 1 ) {
|
190 |
+
die( 'invalid nonce value' );
|
191 |
+
}
|
192 |
+
|
193 |
foreach ( $data as $option ) {
|
|
|
194 |
$model->wppr_set_option( $option['name'], $option['value'] );
|
195 |
}
|
196 |
die();
|
includes/admin/layouts/settings-tpl.php
CHANGED
@@ -10,8 +10,8 @@
|
|
10 |
*/
|
11 |
|
12 |
$global_settings = WPPR_Global_Settings::instance();
|
13 |
-
$sections
|
14 |
-
$fields
|
15 |
|
16 |
?>
|
17 |
<div id="wppr-admin">
|
@@ -37,14 +37,16 @@ $fields = $global_settings->get_fields();
|
|
37 |
<?php foreach ( $sections as $section_key => $section_name ) : ?>
|
38 |
<div id="wppr-tab-<?php echo $section_key; ?>" class="wppr-tab-content">
|
39 |
<?php if ( ! shortcode_exists( 'P_REVIEW' ) ) : ?>
|
40 |
-
<label class="wppr-upsell-label"> You can use the shortcode <b>[P_REVIEW]</b> to show a review you
|
41 |
-
|
|
|
|
|
42 |
target="_blank" href="<?php echo WPPR_UPSELL_LINK; ?>">Pro Bundle</a><br/><br/></label>
|
43 |
<?php endif; ?>
|
44 |
<?php
|
45 |
foreach ( $fields[ $section_key ] as $name => $field ) {
|
46 |
$field['title'] = $field['name'];
|
47 |
-
$field['name']
|
48 |
$field['value'] = $model->wppr_get_option( $name );
|
49 |
$this->add_element( $field );
|
50 |
}
|
@@ -54,9 +56,11 @@ $fields = $global_settings->get_fields();
|
|
54 |
<?php endforeach; ?>
|
55 |
|
56 |
<div id="info_bar">
|
57 |
-
<button
|
58 |
-
|
|
|
59 |
</div><!--.info_bar-->
|
|
|
60 |
</form>
|
61 |
<?php do_action( 'wppr_admin_page_after' ); ?>
|
62 |
</div>
|
10 |
*/
|
11 |
|
12 |
$global_settings = WPPR_Global_Settings::instance();
|
13 |
+
$sections = $global_settings->get_sections();
|
14 |
+
$fields = $global_settings->get_fields();
|
15 |
|
16 |
?>
|
17 |
<div id="wppr-admin">
|
37 |
<?php foreach ( $sections as $section_key => $section_name ) : ?>
|
38 |
<div id="wppr-tab-<?php echo $section_key; ?>" class="wppr-tab-content">
|
39 |
<?php if ( ! shortcode_exists( 'P_REVIEW' ) ) : ?>
|
40 |
+
<label class="wppr-upsell-label"> You can use the shortcode <b>[P_REVIEW]</b> to show a review you
|
41 |
+
already made or
|
42 |
+
<b>[wpr_landing]</b> to display a comparision table of them. The shortcodes are available on the
|
43 |
+
<a
|
44 |
target="_blank" href="<?php echo WPPR_UPSELL_LINK; ?>">Pro Bundle</a><br/><br/></label>
|
45 |
<?php endif; ?>
|
46 |
<?php
|
47 |
foreach ( $fields[ $section_key ] as $name => $field ) {
|
48 |
$field['title'] = $field['name'];
|
49 |
+
$field['name'] = $name;
|
50 |
$field['value'] = $model->wppr_get_option( $name );
|
51 |
$this->add_element( $field );
|
52 |
}
|
56 |
<?php endforeach; ?>
|
57 |
|
58 |
<div id="info_bar">
|
59 |
+
<button type="button"
|
60 |
+
class="button-primary cwp_save"><?php _e( 'Save All Changes', 'wp-product-review' ); ?></button>
|
61 |
+
<span class="spinner"></span>
|
62 |
</div><!--.info_bar-->
|
63 |
+
<?php wp_nonce_field( 'wppr_save_global_settings', 'wppr_nonce_settings', false ); ?>
|
64 |
</form>
|
65 |
<?php do_action( 'wppr_admin_page_after' ); ?>
|
66 |
</div>
|
includes/admin/models/abstract/class-wppr-model-abstract.php
CHANGED
@@ -134,7 +134,7 @@ class WPPR_Model_Abstract {
|
|
134 |
* @return bool|mixed
|
135 |
*/
|
136 |
protected function set_var( $key, $value = '' ) {
|
137 |
-
$this->logger->notice( 'Setting value for ' . $key . ' with ' . print_r( $value ) );
|
138 |
if ( ! array_key_exists( $key, $this->options ) ) {
|
139 |
$this->options[ $key ] = '';
|
140 |
}
|
134 |
* @return bool|mixed
|
135 |
*/
|
136 |
protected function set_var( $key, $value = '' ) {
|
137 |
+
$this->logger->notice( 'Setting value for ' . $key . ' with ' . print_r( $value, true ) );
|
138 |
if ( ! array_key_exists( $key, $this->options ) ) {
|
139 |
$this->options[ $key ] = '';
|
140 |
}
|
includes/admin/models/class-wppr-review-model.php
CHANGED
@@ -446,7 +446,7 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
446 |
'id' => $this->get_ID(),
|
447 |
'name' => $this->get_name(),
|
448 |
'price' => $this->get_price(),
|
449 |
-
'price_raw'
|
450 |
'currency' => $this->get_currency(),
|
451 |
'click' => $this->get_click(),
|
452 |
'image' => array(
|
@@ -545,6 +545,17 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
545 |
return false;
|
546 |
}
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
/**
|
549 |
* Returns the currency price.
|
550 |
*
|
@@ -666,7 +677,9 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
666 |
$rating = $this->score;
|
667 |
if ( $comment_influence > 0 ) {
|
668 |
$comments_rating = $this->get_comments_rating();
|
669 |
-
|
|
|
|
|
670 |
}
|
671 |
|
672 |
return apply_filters( 'wppr_rating', $rating, $this->ID, $this );
|
@@ -680,23 +693,11 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
680 |
* @return float|int
|
681 |
*/
|
682 |
public function get_comments_rating() {
|
683 |
-
|
684 |
-
$this->logger->error( 'Can not get comments rating, id is not set' );
|
685 |
-
|
686 |
-
return 0;
|
687 |
-
}
|
688 |
-
$comments_query = new WP_Comment_Query;
|
689 |
-
$comments = $comments_query->query(
|
690 |
-
array(
|
691 |
-
'fields' => 'ids',
|
692 |
-
'status' => 'approve',
|
693 |
-
'post_id' => $this->ID,
|
694 |
-
)
|
695 |
-
);
|
696 |
if ( $comments ) {
|
697 |
$options = array();
|
698 |
foreach ( $comments as $comment ) {
|
699 |
-
$options = array_merge( $options, $
|
700 |
}
|
701 |
|
702 |
if ( count( $options ) != 0 ) {
|
@@ -710,6 +711,35 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
710 |
|
711 |
}
|
712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
/**
|
714 |
* Return the options values and names associated with the comment.
|
715 |
*
|
@@ -723,17 +753,25 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
723 |
public function get_comment_options( $comment_id ) {
|
724 |
$options = array();
|
725 |
if ( $this->wppr_get_option( 'cwppos_show_userreview' ) === 'yes' ) {
|
726 |
-
$options_names
|
|
|
|
|
727 |
foreach ( $options_names as $k => $name ) {
|
728 |
$value = get_comment_meta( $comment_id, 'meta_option_' . $k, true );
|
729 |
-
|
730 |
-
|
731 |
-
}
|
732 |
-
$options[] = array(
|
733 |
'name' => $name,
|
734 |
'value' => number_format( (float) $value, 2 ),
|
735 |
);
|
|
|
|
|
|
|
736 |
}
|
|
|
|
|
|
|
|
|
|
|
737 |
}
|
738 |
|
739 |
return $options;
|
@@ -922,15 +960,4 @@ class WPPR_Review_Model extends WPPR_Model_Abstract {
|
|
922 |
return false;
|
923 |
}
|
924 |
|
925 |
-
/**
|
926 |
-
* Returns the raw price.
|
927 |
-
*
|
928 |
-
* @since 3.0.0
|
929 |
-
* @access public
|
930 |
-
* @return string
|
931 |
-
*/
|
932 |
-
public function get_price_raw() {
|
933 |
-
return apply_filters( 'wppr_price_raw', $this->price_raw, $this->ID, $this );
|
934 |
-
}
|
935 |
-
|
936 |
}
|
446 |
'id' => $this->get_ID(),
|
447 |
'name' => $this->get_name(),
|
448 |
'price' => $this->get_price(),
|
449 |
+
'price_raw' => $this->get_price_raw(),
|
450 |
'currency' => $this->get_currency(),
|
451 |
'click' => $this->get_click(),
|
452 |
'image' => array(
|
545 |
return false;
|
546 |
}
|
547 |
|
548 |
+
/**
|
549 |
+
* Returns the raw price.
|
550 |
+
*
|
551 |
+
* @since 3.0.0
|
552 |
+
* @access public
|
553 |
+
* @return string
|
554 |
+
*/
|
555 |
+
public function get_price_raw() {
|
556 |
+
return apply_filters( 'wppr_price_raw', $this->price_raw, $this->ID, $this );
|
557 |
+
}
|
558 |
+
|
559 |
/**
|
560 |
* Returns the currency price.
|
561 |
*
|
677 |
$rating = $this->score;
|
678 |
if ( $comment_influence > 0 ) {
|
679 |
$comments_rating = $this->get_comments_rating();
|
680 |
+
if ( $comments_rating > 0 ) {
|
681 |
+
$rating = $comments_rating * 10 * ( $comment_influence / 100 ) + $rating * ( ( 100 - $comment_influence ) / 100 );
|
682 |
+
}
|
683 |
}
|
684 |
|
685 |
return apply_filters( 'wppr_rating', $rating, $this->ID, $this );
|
693 |
* @return float|int
|
694 |
*/
|
695 |
public function get_comments_rating() {
|
696 |
+
$comments = $this->get_comments_options();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
if ( $comments ) {
|
698 |
$options = array();
|
699 |
foreach ( $comments as $comment ) {
|
700 |
+
$options = array_merge( $options, $comment );
|
701 |
}
|
702 |
|
703 |
if ( count( $options ) != 0 ) {
|
711 |
|
712 |
}
|
713 |
|
714 |
+
/**
|
715 |
+
* Get all comments associated with the review.
|
716 |
+
*
|
717 |
+
* @return array|int The list of comments..
|
718 |
+
*/
|
719 |
+
public function get_comments_options() {
|
720 |
+
if ( $this->ID === 0 ) {
|
721 |
+
$this->logger->error( 'Can not get comments rating, id is not set' );
|
722 |
+
|
723 |
+
return array();
|
724 |
+
}
|
725 |
+
$comments_query = new WP_Comment_Query;
|
726 |
+
$comments = $comments_query->query(
|
727 |
+
array(
|
728 |
+
'fields' => 'ids',
|
729 |
+
'status' => 'approve',
|
730 |
+
'post_id' => $this->ID,
|
731 |
+
)
|
732 |
+
);
|
733 |
+
$valid = array();
|
734 |
+
foreach ( $comments as $comment ) {
|
735 |
+
$options = $this->get_comment_options( $comment );
|
736 |
+
if ( ! empty( $options ) ) {
|
737 |
+
$valid[] = $options;
|
738 |
+
}
|
739 |
+
}
|
740 |
+
return $valid;
|
741 |
+
}
|
742 |
+
|
743 |
/**
|
744 |
* Return the options values and names associated with the comment.
|
745 |
*
|
753 |
public function get_comment_options( $comment_id ) {
|
754 |
$options = array();
|
755 |
if ( $this->wppr_get_option( 'cwppos_show_userreview' ) === 'yes' ) {
|
756 |
+
$options_names = wp_list_pluck( $this->options, 'name' );
|
757 |
+
$comment_options = array();
|
758 |
+
$valid_comment = false;
|
759 |
foreach ( $options_names as $k => $name ) {
|
760 |
$value = get_comment_meta( $comment_id, 'meta_option_' . $k, true );
|
761 |
+
|
762 |
+
$comment_options[] = array(
|
|
|
|
|
763 |
'name' => $name,
|
764 |
'value' => number_format( (float) $value, 2 ),
|
765 |
);
|
766 |
+
if ( is_numeric( $value ) ) {
|
767 |
+
$valid_comment = true;
|
768 |
+
}
|
769 |
}
|
770 |
+
if ( ! $valid_comment ) {
|
771 |
+
return array();
|
772 |
+
}
|
773 |
+
|
774 |
+
$options = $comment_options;
|
775 |
}
|
776 |
|
777 |
return $options;
|
960 |
return false;
|
961 |
}
|
962 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
963 |
}
|
includes/admin/widgets/abstract/class-wppr-widget-abstract.php
CHANGED
@@ -74,9 +74,6 @@ class WPPR_Widget_Abstract extends WP_Widget {
|
|
74 |
* @return array
|
75 |
*/
|
76 |
public function form( $instance ) {
|
77 |
-
if ( ! isset( $instance['title'] ) ) {
|
78 |
-
$instance['title'] = __( 'Latest Products', 'wp-product-review' );
|
79 |
-
}
|
80 |
|
81 |
if ( ! isset( $instance['no_items'] ) ) {
|
82 |
$instance['no_items'] = __( '10', 'wp-product-review' );
|
74 |
* @return array
|
75 |
*/
|
76 |
public function form( $instance ) {
|
|
|
|
|
|
|
77 |
|
78 |
if ( ! isset( $instance['no_items'] ) ) {
|
79 |
$instance['no_items'] = __( '10', 'wp-product-review' );
|
includes/admin/widgets/class-wppr-latest-products-widget.php
CHANGED
@@ -93,9 +93,11 @@ class WPPR_Latest_Products_Widget extends WPPR_Widget_Abstract {
|
|
93 |
*/
|
94 |
public function form( $instance ) {
|
95 |
$this->adminAssets();
|
|
|
|
|
|
|
96 |
|
97 |
$instance = parent::form( $instance );
|
98 |
-
$instance['title'] = __( 'Latest Products', 'wp-product-review' );
|
99 |
|
100 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
101 |
}
|
93 |
*/
|
94 |
public function form( $instance ) {
|
95 |
$this->adminAssets();
|
96 |
+
if ( ! isset( $instance['title'] ) ) {
|
97 |
+
$instance['title'] = __( 'Latest Products', 'wp-product-review' );
|
98 |
+
}
|
99 |
|
100 |
$instance = parent::form( $instance );
|
|
|
101 |
|
102 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
103 |
}
|
includes/admin/widgets/class-wppr-top-products-widget.php
CHANGED
@@ -108,9 +108,10 @@ class WPPR_Top_Products_Widget extends WPPR_Widget_Abstract {
|
|
108 |
*/
|
109 |
public function form( $instance ) {
|
110 |
$this->adminAssets();
|
111 |
-
|
|
|
|
|
112 |
$instance = parent::form( $instance );
|
113 |
-
$instance['title'] = __( 'Top Products', 'wp-product-review' );
|
114 |
|
115 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
116 |
}
|
108 |
*/
|
109 |
public function form( $instance ) {
|
110 |
$this->adminAssets();
|
111 |
+
if ( ! isset( $instance['title'] ) ) {
|
112 |
+
$instance['title'] = __( 'Top Products', 'wp-product-review' );
|
113 |
+
}
|
114 |
$instance = parent::form( $instance );
|
|
|
115 |
|
116 |
include( WPPR_PATH . '/includes/admin/layouts/widget-admin-tpl.php' );
|
117 |
}
|
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.0.
|
71 |
|
72 |
$this->load_dependencies();
|
73 |
$this->set_locale();
|
67 |
*/
|
68 |
public function __construct() {
|
69 |
$this->plugin_name = 'wppr';
|
70 |
+
$this->version = '3.0.4';
|
71 |
|
72 |
$this->load_dependencies();
|
73 |
$this->set_locale();
|
includes/public/class-wppr-public.php
CHANGED
@@ -367,10 +367,23 @@ class Wppr_Public {
|
|
367 |
|
368 |
$options = $review->get_options();
|
369 |
$option_names = wp_list_pluck( $options, 'name' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
foreach ( $option_names as $k => $value ) {
|
371 |
if ( isset( $_POST[ 'wppr-slider-option-' . $k ] ) ) {
|
|
|
372 |
$option_value = wp_filter_nohtml_kses( $_POST[ 'wppr-slider-option-' . $k ] );
|
|
|
373 |
update_comment_meta( $comment_id, 'meta_option_' . $k, $option_value );
|
|
|
374 |
}
|
375 |
}
|
376 |
}
|
@@ -399,7 +412,6 @@ class Wppr_Public {
|
|
399 |
$return = '';
|
400 |
$return .= '<div class="user-comments-grades">';
|
401 |
foreach ( $options as $k => $option ) {
|
402 |
-
$comment_meta_score = $option['value'] * 10;
|
403 |
$return .= '<div class="comment-meta-option">
|
404 |
<p class="comment-meta-option-name">' . $option['name'] . '</p>
|
405 |
<p class="comment-meta-option-grade">' . $option['value'] . '</p>
|
367 |
|
368 |
$options = $review->get_options();
|
369 |
$option_names = wp_list_pluck( $options, 'name' );
|
370 |
+
$valid_review = false;
|
371 |
+
foreach ( $option_names as $k => $value ) {
|
372 |
+
if ( isset( $_POST[ 'wppr-slider-option-' . $k ] ) && ! empty( $_POST[ 'wppr-slider-option-' . $k ] ) ) {
|
373 |
+
$valid_review = true;
|
374 |
+
break;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
if ( ! $valid_review ) {
|
378 |
+
return;
|
379 |
+
}
|
380 |
foreach ( $option_names as $k => $value ) {
|
381 |
if ( isset( $_POST[ 'wppr-slider-option-' . $k ] ) ) {
|
382 |
+
|
383 |
$option_value = wp_filter_nohtml_kses( $_POST[ 'wppr-slider-option-' . $k ] );
|
384 |
+
$option_value = empty( $value ) ? 0 : $option_value;
|
385 |
update_comment_meta( $comment_id, 'meta_option_' . $k, $option_value );
|
386 |
+
|
387 |
}
|
388 |
}
|
389 |
}
|
412 |
$return = '';
|
413 |
$return .= '<div class="user-comments-grades">';
|
414 |
foreach ( $options as $k => $option ) {
|
|
|
415 |
$return .= '<div class="comment-meta-option">
|
416 |
<p class="comment-meta-option-name">' . $option['name'] . '</p>
|
417 |
<p class="comment-meta-option-grade">' . $option['value'] . '</p>
|
includes/public/layouts/default-tpl.php
CHANGED
@@ -4,78 +4,53 @@
|
|
4 |
*
|
5 |
* @package WPPR
|
6 |
* @subpackage Layouts
|
|
|
7 |
* @copyright Copyright (c) 2017, Bogdan Preda
|
8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
* @since 3.0.0
|
10 |
*/
|
11 |
|
12 |
-
$
|
13 |
-
$sub_title_info = '';
|
14 |
-
$sub_title_info = $review['price'];
|
15 |
-
if ( $sub_title_info != '' ) {
|
16 |
-
$is_disabled = apply_filters( 'wppr_disable_price_richsnippet', false );
|
17 |
-
if ( ! $is_disabled ) {
|
18 |
-
$sub_title_info = '<span>
|
19 |
-
<span>' . esc_html( $review['price_raw'] ) . '</span>
|
20 |
-
</span>';
|
21 |
-
}
|
22 |
-
}
|
23 |
|
24 |
$lightbox = '';
|
25 |
-
if ( $review_object->
|
26 |
-
$lightbox = 'data-lightbox="' . $
|
27 |
-
}
|
28 |
-
$image_link_url = $review['image']['full'];
|
29 |
-
$multiple_affiliates_class = 'affiliate-button';
|
30 |
-
$display_links_count = 0;
|
31 |
-
foreach ( $review['links'] as $title => $link ) {
|
32 |
-
if ( $title != '' && $link != '' ) {
|
33 |
-
if ( $review['click'] != 'image' ) {
|
34 |
-
$image_link_url = $link;
|
35 |
-
}
|
36 |
-
$display_links_count ++;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
if ( $display_links_count > 1 ) {
|
40 |
-
$multiple_affiliates_class = 'affiliate-button2 affiliate-button';
|
41 |
}
|
42 |
|
43 |
-
$extra_class = '';
|
44 |
-
|
45 |
$output = '
|
46 |
<section id="review-statistics" class="article-section">
|
47 |
<div class="review-wrap-up cwpr_clearfix" >
|
48 |
<div class="cwpr-review-top cwpr_clearfix">
|
49 |
-
<span><h2 class="cwp-item">' . $
|
50 |
-
<span class="cwp-item-price cwp-item"
|
|
|
|
|
51 |
</div><!-- end .cwpr-review-top -->
|
52 |
<div class="review-wu-left">
|
53 |
<div class="rev-wu-image">
|
54 |
-
<a href="' . $
|
55 |
</div><!-- end .rev-wu-image -->
|
56 |
<div class="review-wu-grade">
|
57 |
-
<div class="cwp-review-chart
|
58 |
<span>
|
59 |
-
<div class="cwp-review-percentage" data-percent="' . $
|
60 |
-
<span class="cwp-review-rating">' . $
|
61 |
</div>
|
62 |
</span>
|
63 |
</div><!-- end .chart -->
|
64 |
</div><!-- end .review-wu-grade -->
|
65 |
<div class="review-wu-bars">
|
66 |
';
|
67 |
-
|
68 |
-
|
69 |
-
$output .= '
|
70 |
<div class="rev-option" data-value=' . $option['value'] . '>
|
71 |
<div class="cwpr_clearfix">
|
72 |
-
<h3>' . apply_filters( 'wppr_option_name_html', $option['name'] ) . '</h3>
|
73 |
-
<span>' . round( $option['value'] / 10 ) . '/10</span>
|
74 |
</div>
|
75 |
<ul class="cwpr_clearfix"></ul>
|
76 |
</div>
|
77 |
';
|
78 |
-
}
|
79 |
}
|
80 |
$output .= '
|
81 |
</div><!-- end .review-wu-bars -->
|
@@ -83,46 +58,42 @@ $output .= '
|
|
83 |
<div class="review-wu-right">
|
84 |
<div class="pros">
|
85 |
<h2>' .
|
86 |
-
|
87 |
-
apply_filters( 'wppr_review_pros_text', __( $review_object->wppr_get_option( 'cwppos_pros_text' ), 'wp-product-review' ) )
|
88 |
-
// @codingStandardsIgnoreEnd
|
89 |
. '</h2>
|
90 |
<ul>';
|
91 |
-
|
92 |
-
|
93 |
-
$output .= '<li>' . $pro . '</li>';
|
94 |
-
}
|
95 |
}
|
96 |
$output .= '
|
97 |
</ul>
|
98 |
</div><!-- end .pros -->
|
99 |
<div class="cons">
|
100 |
<h2>' .
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
. '</h2>
|
105 |
<ul>';
|
106 |
-
|
107 |
-
|
108 |
-
$output .= '<li>' . $con . '</li>';
|
109 |
-
}
|
110 |
}
|
111 |
-
$output
|
112 |
</ul>
|
113 |
</div>
|
114 |
</div><!-- end .review-wu-right -->
|
115 |
</div><!-- end .review-wrap-up -->
|
116 |
</section><!-- end #review-statistics -->
|
117 |
';
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
124 |
</div><!-- end .affiliate-button -->
|
125 |
';
|
126 |
-
}
|
127 |
}
|
128 |
}
|
4 |
*
|
5 |
* @package WPPR
|
6 |
* @subpackage Layouts
|
7 |
+
* @global WPPR_Review_Model $review_object The inherited review object.
|
8 |
* @copyright Copyright (c) 2017, Bogdan Preda
|
9 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
* @since 3.0.0
|
11 |
*/
|
12 |
|
13 |
+
$price_raw = $review_object->get_price_raw();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
$lightbox = '';
|
16 |
+
if ( $review_object->get_click() == 'image' ) {
|
17 |
+
$lightbox = 'data-lightbox="' . esc_url( $review_object->get_small_thumbnail() ) . '"';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
|
|
|
|
20 |
$output = '
|
21 |
<section id="review-statistics" class="article-section">
|
22 |
<div class="review-wrap-up cwpr_clearfix" >
|
23 |
<div class="cwpr-review-top cwpr_clearfix">
|
24 |
+
<span><h2 class="cwp-item">' . esc_html( $review_object->get_name() ) . '</h2></span>
|
25 |
+
<span class="cwp-item-price cwp-item"><span>
|
26 |
+
<span>' . esc_html( empty( $price_raw ) ? '' : $price_raw ) . '</span>
|
27 |
+
</span></span>
|
28 |
</div><!-- end .cwpr-review-top -->
|
29 |
<div class="review-wu-left">
|
30 |
<div class="rev-wu-image">
|
31 |
+
<a href="' . esc_url( $review_object->get_image() ) . '" ' . $lightbox . ' rel="nofollow" target="_blank"><img src="' . esc_attr( $review_object->get_small_thumbnail() ) . '" alt="' . esc_attr( $review_object->get_name() ) . '" class="photo photo-wrapup wppr-product-image" /></a>
|
32 |
</div><!-- end .rev-wu-image -->
|
33 |
<div class="review-wu-grade">
|
34 |
+
<div class="cwp-review-chart ">
|
35 |
<span>
|
36 |
+
<div class="cwp-review-percentage" data-percent="' . esc_attr( $review_object->get_rating() ) . '">
|
37 |
+
<span class="cwp-review-rating">' . esc_html( $review_object->get_rating() ) . '</span>
|
38 |
</div>
|
39 |
</span>
|
40 |
</div><!-- end .chart -->
|
41 |
</div><!-- end .review-wu-grade -->
|
42 |
<div class="review-wu-bars">
|
43 |
';
|
44 |
+
foreach ( $review_object->get_options() as $option ) {
|
45 |
+
$output .= '
|
|
|
46 |
<div class="rev-option" data-value=' . $option['value'] . '>
|
47 |
<div class="cwpr_clearfix">
|
48 |
+
<h3>' . esc_html( apply_filters( 'wppr_option_name_html', $option['name'] ) ) . '</h3>
|
49 |
+
<span>' . esc_html( round( $option['value'] / 10 ) ) . '/10</span>
|
50 |
</div>
|
51 |
<ul class="cwpr_clearfix"></ul>
|
52 |
</div>
|
53 |
';
|
|
|
54 |
}
|
55 |
$output .= '
|
56 |
</div><!-- end .review-wu-bars -->
|
58 |
<div class="review-wu-right">
|
59 |
<div class="pros">
|
60 |
<h2>' .
|
61 |
+
esc_html( apply_filters( 'wppr_review_pros_text', $review_object->wppr_get_option( 'cwppos_pros_text' ) ) )
|
|
|
|
|
62 |
. '</h2>
|
63 |
<ul>';
|
64 |
+
foreach ( $review_object->get_pros() as $pro ) {
|
65 |
+
$output .= '<li>' . esc_html( $pro ) . '</li>';
|
|
|
|
|
66 |
}
|
67 |
$output .= '
|
68 |
</ul>
|
69 |
</div><!-- end .pros -->
|
70 |
<div class="cons">
|
71 |
<h2>' .
|
72 |
+
esc_html( apply_filters( 'wppr_review_cons_text', $review_object->wppr_get_option( 'cwppos_cons_text' ) ) )
|
73 |
+
.
|
74 |
+
'</h2>
|
|
|
75 |
<ul>';
|
76 |
+
foreach ( $review_object->get_cons() as $con ) {
|
77 |
+
$output .= '<li>' . esc_html( $con ) . '</li>';
|
|
|
|
|
78 |
}
|
79 |
+
$output .= '
|
80 |
</ul>
|
81 |
</div>
|
82 |
</div><!-- end .review-wu-right -->
|
83 |
</div><!-- end .review-wrap-up -->
|
84 |
</section><!-- end #review-statistics -->
|
85 |
';
|
86 |
+
$links = $review_object->get_links();
|
87 |
+
$multiple_affiliates_class = 'affiliate-button';
|
88 |
+
if ( count( $links ) > 1 ) {
|
89 |
+
$multiple_affiliates_class = 'affiliate-button2 affiliate-button';
|
90 |
+
}
|
91 |
+
foreach ( $links as $title => $link ) {
|
92 |
+
if ( ! empty( $title ) && ! empty( $link ) ) {
|
93 |
+
$output .= '
|
94 |
+
<div class="' . esc_attr( $multiple_affiliates_class ) . '">
|
95 |
+
<a href="' . esc_url( $link ) . '" rel="nofollow" target="_blank"><span>' . esc_html( $title ) . '</span> </a>
|
96 |
</div><!-- end .affiliate-button -->
|
97 |
';
|
|
|
98 |
}
|
99 |
}
|
includes/public/layouts/rich-json-ld.php
CHANGED
@@ -4,39 +4,57 @@
|
|
4 |
*
|
5 |
* @package WPPR
|
6 |
* @subpackage Layouts
|
|
|
7 |
* @copyright Copyright (c) 2017, Bogdan Preda
|
8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
* @since 3.0.0
|
10 |
*/
|
11 |
|
12 |
if ( $review_object->wppr_get_option( 'wppr_rich_snippet' ) == 'yes' ) {
|
13 |
-
$review = $review_object->get_review_data();
|
14 |
-
$currency = $review['currency'];
|
15 |
$output .= '
|
16 |
<script type="application/ld+json">
|
17 |
{
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
4 |
*
|
5 |
* @package WPPR
|
6 |
* @subpackage Layouts
|
7 |
+
* @global WPPR_Review_Model $review_object The review object.
|
8 |
* @copyright Copyright (c) 2017, Bogdan Preda
|
9 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
* @since 3.0.0
|
11 |
*/
|
12 |
|
13 |
if ( $review_object->wppr_get_option( 'wppr_rich_snippet' ) == 'yes' ) {
|
|
|
|
|
14 |
$output .= '
|
15 |
<script type="application/ld+json">
|
16 |
{
|
17 |
+
"@context": "http://schema.org/",
|
18 |
+
"@type": "Product",
|
19 |
+
"name": "' . $review_object->get_name() . '",
|
20 |
+
"image": "' . $review_object->get_small_thumbnail() . '",
|
21 |
+
"description": "' . get_the_excerpt( $review_object->get_ID() ) . '",';
|
22 |
+
$comments = $review_object->get_comments_options();
|
23 |
+
if ( intval( $review_object->wppr_get_option( 'cwppos_infl_userreview' ) ) > 0 && count( $comments ) > 0 ) {
|
24 |
+
$output .= '"aggregateRating": {
|
25 |
+
"@type": "AggregateRating",
|
26 |
+
"bestRating": "10",
|
27 |
+
"worstRating": "1",
|
28 |
+
"ratingValue": "' . number_format( ( $review_object->get_rating() / 10 ), 2 ) . '",
|
29 |
+
"reviewCount": "' . count( $comments ) . '"
|
30 |
+
},';
|
31 |
+
} else {
|
32 |
+
$output .= '
|
33 |
+
"review": {
|
34 |
+
"@type": "Review",
|
35 |
+
"reviewRating": {
|
36 |
+
"@type": "Rating",
|
37 |
+
"bestRating": "10",
|
38 |
+
"worstRating": "1",
|
39 |
+
"ratingValue": "' . number_format( ( $review_object->get_rating() / 10 ), 2 ) . '"
|
40 |
+
},
|
41 |
+
"name": "' . $review_object->get_name() . '",
|
42 |
+
"author": {
|
43 |
+
"@type": "Person",
|
44 |
+
"name": "' . get_the_author() . '"
|
45 |
+
},
|
46 |
+
"datePublished": "' . get_the_time( 'Y-m-d', $review_object->get_ID() ) . '"
|
47 |
+
},';
|
48 |
+
}
|
49 |
+
$output .= '
|
50 |
+
"offers": {
|
51 |
+
"@type": "Offer",
|
52 |
+
"price": "' . number_format( $review_object->get_price(), 2 ) . '",
|
53 |
+
"priceCurrency": "' . $review_object->get_currency() . '",
|
54 |
+
"seller": {
|
55 |
+
"@type": "Organization",
|
56 |
+
"name": "' . get_the_author() . '"
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}</script>';
|
60 |
}
|
includes/public/layouts/widget/default.php
CHANGED
@@ -11,8 +11,9 @@
|
|
11 |
|
12 |
echo '<ul>';
|
13 |
foreach ( $results as $review ) :
|
14 |
-
$
|
15 |
-
$
|
|
|
16 |
|
17 |
if ( strlen( $product_title_display ) > self::RESTRICT_TITLE_CHARS ) {
|
18 |
$product_title_display = substr( $product_title_display, 0, self::RESTRICT_TITLE_CHARS ) . '...';
|
11 |
|
12 |
echo '<ul>';
|
13 |
foreach ( $results as $review ) :
|
14 |
+
$rview_obj = new WPPR_Review_Model( $review['ID'] );
|
15 |
+
$product_title_display = ( $instance['post_type'] == true ) ? $review['cwp_rev_product_name'] : get_the_title( $review['ID'] );
|
16 |
+
$product_image = $rview_obj->get_small_thumbnail();
|
17 |
|
18 |
if ( strlen( $product_title_display ) > self::RESTRICT_TITLE_CHARS ) {
|
19 |
$product_title_display = substr( $product_title_display, 0, self::RESTRICT_TITLE_CHARS ) . '...';
|
includes/public/layouts/widget/style 1.php
CHANGED
@@ -22,62 +22,62 @@
|
|
22 |
}
|
23 |
|
24 |
$affiliate_link = reset( $review['wppr_links'] );
|
25 |
-
$review_link = get_the_permalink();
|
26 |
|
27 |
$showingImg = $instance['show_image'] == true && ! empty( $product_image );
|
28 |
?>
|
29 |
|
30 |
-
|
31 |
<?php if ( $showingImg ) { ?>
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
<?php
|
39 |
}
|
40 |
?>
|
41 |
-
|
42 |
-
|
43 |
<?php
|
44 |
$review_score = $review['wppr_rating'];
|
45 |
|
46 |
if ( ! empty( $review_score ) ) {
|
47 |
if ( $instance['cwp_tp_rating_type'] == 'round' ) {
|
48 |
?>
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
<?php
|
57 |
} else {
|
58 |
?>
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
<?php
|
63 |
}
|
64 |
}
|
65 |
?>
|
66 |
-
|
67 |
<?php
|
68 |
$link = "<a href='{$affiliate_link}' rel='nofollow' target='_blank' class='wppr-bttn'>" . __( $instance['cwp_tp_buynow'], 'wp-product-review' ) . '</a>';
|
69 |
if ( ! empty( $instance['cwp_tp_buynow'] ) ) {
|
70 |
-
echo apply_filters( 'wppr_widget_style1_buynow_link', $link,
|
71 |
}
|
72 |
|
73 |
$link = "<a href='{$review_link}' rel='nofollow' target='_blank' class='wppr-bttn'>" . __( $instance['cwp_tp_readreview'], 'wp-product-review' ) . '</a>';
|
74 |
if ( ! empty( $instance['cwp_tp_readreview'] ) ) {
|
75 |
-
echo apply_filters( 'wppr_widget_style1_readreview_link', $link,
|
76 |
}
|
77 |
?>
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
<?php endforeach; ?>
|
83 |
</div>
|
22 |
}
|
23 |
|
24 |
$affiliate_link = reset( $review['wppr_links'] );
|
25 |
+
$review_link = get_the_permalink($review['ID']);
|
26 |
|
27 |
$showingImg = $instance['show_image'] == true && ! empty( $product_image );
|
28 |
?>
|
29 |
|
30 |
+
<div class="wppr-prodrow">
|
31 |
<?php if ( $showingImg ) { ?>
|
32 |
+
<div class="wppr-prodrowleft">
|
33 |
+
<a href="<?php echo $review_link; ?>" class="wppr-col" title="<?php echo $product_title; ?>">
|
34 |
+
<img class="cwp_rev_image wppr-col" src="<?php echo $product_image; ?>"
|
35 |
+
alt="<?php echo $product_title; ?>"/>
|
36 |
+
</a>
|
37 |
+
</div>
|
38 |
<?php
|
39 |
}
|
40 |
?>
|
41 |
+
<div class="wppr-prodrowright <?php echo $showingImg ? 'wppr-prodrowrightadjust' : '' ?>">
|
42 |
+
<p><strong><?php echo $product_title_display; ?></strong></p>
|
43 |
<?php
|
44 |
$review_score = $review['wppr_rating'];
|
45 |
|
46 |
if ( ! empty( $review_score ) ) {
|
47 |
if ( $instance['cwp_tp_rating_type'] == 'round' ) {
|
48 |
?>
|
49 |
+
<div class="review-grade-widget wppr-col">
|
50 |
+
<div class="cwp-review-chart relative">
|
51 |
+
<div class="cwp-review-percentage" data-percent="<?php echo $review_score; ?>">
|
52 |
+
<span></span></div>
|
53 |
+
</div><!-- end .chart -->
|
54 |
+
</div>
|
55 |
+
<div class="clear"></div>
|
56 |
<?php
|
57 |
} else {
|
58 |
?>
|
59 |
+
<div class="wppr-rating">
|
60 |
+
<div style="width:<?php echo $review_score; ?>%;"> <?php echo $review_score; ?></div>
|
61 |
+
</div>
|
62 |
<?php
|
63 |
}
|
64 |
}
|
65 |
?>
|
66 |
+
<p class="wppr-style1-buttons">
|
67 |
<?php
|
68 |
$link = "<a href='{$affiliate_link}' rel='nofollow' target='_blank' class='wppr-bttn'>" . __( $instance['cwp_tp_buynow'], 'wp-product-review' ) . '</a>';
|
69 |
if ( ! empty( $instance['cwp_tp_buynow'] ) ) {
|
70 |
+
echo apply_filters( 'wppr_widget_style1_buynow_link', $link, $review['ID'], $affiliate_link, $instance['cwp_tp_buynow'] );
|
71 |
}
|
72 |
|
73 |
$link = "<a href='{$review_link}' rel='nofollow' target='_blank' class='wppr-bttn'>" . __( $instance['cwp_tp_readreview'], 'wp-product-review' ) . '</a>';
|
74 |
if ( ! empty( $instance['cwp_tp_readreview'] ) ) {
|
75 |
+
echo apply_filters( 'wppr_widget_style1_readreview_link', $link, $review['ID'], $review_link, $instance['cwp_tp_readreview'] );
|
76 |
}
|
77 |
?>
|
78 |
+
</p>
|
79 |
+
</div>
|
80 |
+
<div class="clear"></div>
|
81 |
+
</div>
|
82 |
<?php endforeach; ?>
|
83 |
</div>
|
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-08-
|
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 |
|
@@ -464,7 +464,7 @@ msgstr ""
|
|
464 |
msgid "Insert product's cons features below."
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: includes/admin/layouts/settings-tpl.php:
|
468 |
msgid "Save All Changes"
|
469 |
msgstr ""
|
470 |
|
@@ -501,20 +501,15 @@ msgid "Display Product Image :"
|
|
501 |
msgstr ""
|
502 |
|
503 |
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:59
|
504 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
505 |
msgid "Buy Now"
|
506 |
msgstr ""
|
507 |
|
508 |
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:60
|
509 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:
|
510 |
msgid "Read Review"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:78
|
514 |
-
#: includes/admin/widgets/class-wppr-latest-products-widget.php:101
|
515 |
-
msgid "Latest Products"
|
516 |
-
msgstr ""
|
517 |
-
|
518 |
#: includes/admin/widgets/class-wppr-latest-products-widget.php:26
|
519 |
msgid "Latest Products Widget"
|
520 |
msgstr ""
|
@@ -523,6 +518,10 @@ msgstr ""
|
|
523 |
msgid "This widget displays the latest products based on their rating."
|
524 |
msgstr ""
|
525 |
|
|
|
|
|
|
|
|
|
526 |
#: includes/admin/widgets/class-wppr-top-products-widget.php:26
|
527 |
msgid "Top Products Widget"
|
528 |
msgstr ""
|
@@ -531,7 +530,7 @@ msgstr ""
|
|
531 |
msgid "This widget displays the top products based on their rating."
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: includes/admin/widgets/class-wppr-top-products-widget.php:
|
535 |
msgid "Top Products"
|
536 |
msgstr ""
|
537 |
|
2 |
# This file is distributed under the no.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP Product Review Lite 3.0.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/wp-product-review/issues\n"
|
7 |
+
"POT-Creation-Date: 2017-08-25 13:45:59+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:79
|
28 |
msgid "10"
|
29 |
msgstr ""
|
30 |
|
464 |
msgid "Insert product's cons features below."
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: includes/admin/layouts/settings-tpl.php:60
|
468 |
msgid "Save All Changes"
|
469 |
msgstr ""
|
470 |
|
501 |
msgstr ""
|
502 |
|
503 |
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:59
|
504 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:95
|
505 |
msgid "Buy Now"
|
506 |
msgstr ""
|
507 |
|
508 |
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:60
|
509 |
+
#: includes/admin/widgets/abstract/class-wppr-widget-abstract.php:99
|
510 |
msgid "Read Review"
|
511 |
msgstr ""
|
512 |
|
|
|
|
|
|
|
|
|
|
|
513 |
#: includes/admin/widgets/class-wppr-latest-products-widget.php:26
|
514 |
msgid "Latest Products Widget"
|
515 |
msgstr ""
|
518 |
msgid "This widget displays the latest products based on their rating."
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: includes/admin/widgets/class-wppr-latest-products-widget.php:97
|
522 |
+
msgid "Latest Products"
|
523 |
+
msgstr ""
|
524 |
+
|
525 |
#: includes/admin/widgets/class-wppr-top-products-widget.php:26
|
526 |
msgid "Top Products Widget"
|
527 |
msgstr ""
|
530 |
msgid "This widget displays the top products based on their rating."
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: includes/admin/widgets/class-wppr-top-products-widget.php:112
|
534 |
msgid "Top Products"
|
535 |
msgstr ""
|
536 |
|
readme.txt
CHANGED
@@ -67,6 +67,19 @@ 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.0.3 - 2017-08-24 =
|
71 |
|
72 |
* Fixed widget assets loading error.
|
67 |
* fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
|
68 |
|
69 |
== Changelog ==
|
70 |
+
= 3.0.4 - 2017-08-25 =
|
71 |
+
|
72 |
+
* Fix for rich snippets schema.
|
73 |
+
* Fix post update white screen of death.
|
74 |
+
* Fix for thumbnails in widgets.
|
75 |
+
* Fix for duplicate title for widgets list.
|
76 |
+
* Fix for link of the review in the widgets.
|
77 |
+
* Fix for click link behavior on review picture.
|
78 |
+
* Fix widget titles default values.
|
79 |
+
* Fix review rating when comments influence is on.
|
80 |
+
* Improved security.
|
81 |
+
|
82 |
+
|
83 |
= 3.0.3 - 2017-08-24 =
|
84 |
|
85 |
* Fixed widget assets loading error.
|
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 ComposerAutoloaderInitc168ee91d26996c9139336b5c6a09a15::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 ComposerAutoloaderInitb0d44e7593879a2135d8f28bab187641::getLoader();
|
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 ComposerAutoloaderInit263e60cf1b67c8c1b6a71909fbdba015
|
|
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 ComposerAutoloaderInit263e60cf1b67c8c1b6a71909fbdba015
|
|
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 ComposerAutoloaderInitc168ee91d26996c9139336b5c6a09a15
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitc168ee91d26996c9139336b5c6a09a15', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitc168ee91d26996c9139336b5c6a09a15', '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 |
+
composerRequirec168ee91d26996c9139336b5c6a09a15($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequirec168ee91d26996c9139336b5c6a09a15($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 ComposerAutoloaderInit5743ef8947d850ef37d3a3885096af06 {
|
|
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 ComposerAutoloaderInitb0d44e7593879a2135d8f28bab187641 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitb0d44e7593879a2135d8f28bab187641', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb0d44e7593879a2135d8f28bab187641', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
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.0.
|
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.0.
|
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.0.4
|
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.0.4' );
|
71 |
define( 'WPPR_PATH', dirname( __FILE__ ) );
|
72 |
define( 'WPPR_SLUG', 'wppr' );
|
73 |
define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );
|