Comments – wpDiscuz - Version 4.0.12

Version Description

  • Fixed Bug: Facebook share button conflict with Social Login buttons
  • Fixed Bug: Problem with Twitter share button
  • Fixed Bug: Unable to change some options in custom fields (phone number, etc...)

IMPORTANT:

  • If you have JetPack installed please deactivate Jetpack comments, it affects wpDiscuz
  • If you have a Cache Plugin, please delete all caches after wpDiscuz update.
  • If you use CDN and found some issue please purge it.
  • If your server PHP version is lower than 5.4, please change it to hogher
Download this release

Release Info

Developer AdvancedCoding
Plugin Icon 128x128 Comments – wpDiscuz
Version 4.0.12
Comparing to
See all releases

Code changes from version 4.0.11 to 4.0.12

class.WpdiscuzCore.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: WordPress Comments Plugin – wpDiscuz
5
  * Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
- * Version: 4.0.11
7
  * Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  * Author URI: https://gvectors.com/
9
  * Plugin URI: http://wpdiscuz.com/
3
  /*
4
  * Plugin Name: WordPress Comments Plugin – wpDiscuz
5
  * Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
+ * Version: 4.0.12
7
  * Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  * Author URI: https://gvectors.com/
9
  * Plugin URI: http://wpdiscuz.com/
forms/wpdFormAttr/Field/NumberField.php CHANGED
@@ -65,8 +65,8 @@ class NumberField extends Field {
65
  <?php
66
  }
67
 
68
- public function editCommentHtml($key, $value, $data,$comment) {
69
- if($comment->comment_parent && !$data['is_show_sform']){
70
  return '';
71
  }
72
  $html = '<tr><td class="first">';
@@ -82,8 +82,8 @@ class NumberField extends Field {
82
  return $html;
83
  }
84
 
85
- public function frontFormHtml($name, $args, $options, $currentUser, $uniqueId,$isMainForm) {
86
- if(!$isMainForm && !$args['is_show_sform']){
87
  return;
88
  }
89
  $hasIcon = $args['icon'] ? true : false;
@@ -107,17 +107,17 @@ class NumberField extends Field {
107
  }
108
 
109
  public function frontHtml($value, $args) {
110
- if(!$args['is_show_on_comment']){
111
  return '';
112
  }
113
  $html = '<div class="wpd-custom-field wpd-cf-text">';
114
- $html .= '<div class="wpd-cf-label">' . $args['name'] . '</div> <div class="wpd-cf-value"> ' . apply_filters('wpdiscuz_custom_field_number', $value , $args) . '</div>';
115
  $html .= '</div>';
116
  return $html;
117
  }
118
 
119
  public function validateFieldData($fieldName, $args, $options, $currentUser) {
120
- if(!$this->isCommentParentZero() && !$args['is_show_sform']){
121
  return '';
122
  }
123
  $value = filter_input(INPUT_POST, $fieldName, FILTER_SANITIZE_NUMBER_INT);
@@ -125,13 +125,13 @@ class NumberField extends Field {
125
  wp_die(__($args['name'], 'wpdiscuz') . ' : ' . __('field is required!', 'wpdiscuz'));
126
  }
127
  $value = intval($value);
128
- if (is_int($args['min']) && $value < $args['min']) {
129
  wp_die(__($args['name'], 'wpdiscuz') . ' : ' . __('value can not be less than', 'wpdiscuz') . ' ' . $args['min']);
130
  }
131
  if (is_int($args['max']) && $value > $args['max']) {
132
  wp_die(__($args['name'], 'wpdiscuz') . ' : ' . __('value can not be more than', 'wpdiscuz') . ' ' . $args['max']);
133
  }
134
-
135
  return $value;
136
  }
137
 
@@ -145,32 +145,38 @@ class NumberField extends Field {
145
  if (isset($data['desc'])) {
146
  $cleanData['desc'] = trim(strip_tags($data['desc']));
147
  }
148
-
149
  if (isset($data['values'])) {
150
  $values = array_filter(explode("\n", trim(strip_tags($data['values']))));
151
  foreach ($values as $value) {
152
  $cleanData['values'][] = trim($value);
153
  }
154
  }
155
-
156
  if (isset($data['icon'])) {
157
  $cleanData['icon'] = trim(strip_tags($data['icon']));
158
  }
159
  if (isset($data['required'])) {
160
  $cleanData['required'] = intval($data['required']);
161
  }
162
-
163
  if (isset($data['min']) && trim($data['min']) != '') {
164
  $cleanData['min'] = intval($data['min']);
165
  } else {
166
  $cleanData['min'] = '';
167
  }
168
-
169
  if (isset($data['max']) && trim($data['max']) != '') {
170
  $cleanData['max'] = intval($data['max']);
171
  } else {
172
  $cleanData['max'] = '';
173
  }
 
 
 
 
 
 
 
 
 
 
174
 
175
  return wp_parse_args($cleanData, $this->fieldDefaultData);
176
  }
65
  <?php
66
  }
67
 
68
+ public function editCommentHtml($key, $value, $data, $comment) {
69
+ if ($comment->comment_parent && !$data['is_show_sform']) {
70
  return '';
71
  }
72
  $html = '<tr><td class="first">';
82
  return $html;
83
  }
84
 
85
+ public function frontFormHtml($name, $args, $options, $currentUser, $uniqueId, $isMainForm) {
86
+ if (!$isMainForm && !$args['is_show_sform']) {
87
  return;
88
  }
89
  $hasIcon = $args['icon'] ? true : false;
107
  }
108
 
109
  public function frontHtml($value, $args) {
110
+ if (!$args['is_show_on_comment']) {
111
  return '';
112
  }
113
  $html = '<div class="wpd-custom-field wpd-cf-text">';
114
+ $html .= '<div class="wpd-cf-label">' . $args['name'] . '</div> <div class="wpd-cf-value"> ' . apply_filters('wpdiscuz_custom_field_number', $value, $args) . '</div>';
115
  $html .= '</div>';
116
  return $html;
117
  }
118
 
119
  public function validateFieldData($fieldName, $args, $options, $currentUser) {
120
+ if (!$this->isCommentParentZero() && !$args['is_show_sform']) {
121
  return '';
122
  }
123
  $value = filter_input(INPUT_POST, $fieldName, FILTER_SANITIZE_NUMBER_INT);
125
  wp_die(__($args['name'], 'wpdiscuz') . ' : ' . __('field is required!', 'wpdiscuz'));
126
  }
127
  $value = intval($value);
128
+ if (is_int($args['min']) && $value < $args['min']) {
129
  wp_die(__($args['name'], 'wpdiscuz') . ' : ' . __('value can not be less than', 'wpdiscuz') . ' ' . $args['min']);
130
  }
131
  if (is_int($args['max']) && $value > $args['max']) {
132
  wp_die(__($args['name'], 'wpdiscuz') . ' : ' . __('value can not be more than', 'wpdiscuz') . ' ' . $args['max']);
133
  }
134
+
135
  return $value;
136
  }
137
 
145
  if (isset($data['desc'])) {
146
  $cleanData['desc'] = trim(strip_tags($data['desc']));
147
  }
 
148
  if (isset($data['values'])) {
149
  $values = array_filter(explode("\n", trim(strip_tags($data['values']))));
150
  foreach ($values as $value) {
151
  $cleanData['values'][] = trim($value);
152
  }
153
  }
 
154
  if (isset($data['icon'])) {
155
  $cleanData['icon'] = trim(strip_tags($data['icon']));
156
  }
157
  if (isset($data['required'])) {
158
  $cleanData['required'] = intval($data['required']);
159
  }
 
160
  if (isset($data['min']) && trim($data['min']) != '') {
161
  $cleanData['min'] = intval($data['min']);
162
  } else {
163
  $cleanData['min'] = '';
164
  }
 
165
  if (isset($data['max']) && trim($data['max']) != '') {
166
  $cleanData['max'] = intval($data['max']);
167
  } else {
168
  $cleanData['max'] = '';
169
  }
170
+ if (isset($data['is_show_on_comment'])) {
171
+ $cleanData['is_show_on_comment'] = intval($data['is_show_on_comment']);
172
+ } else {
173
+ $cleanData['is_show_on_comment'] = 0;
174
+ }
175
+ if (isset($data['is_show_sform'])) {
176
+ $cleanData['is_show_sform'] = intval($data['is_show_sform']);
177
+ } else {
178
+ $cleanData['is_show_sform'] = 0;
179
+ }
180
 
181
  return wp_parse_args($cleanData, $this->fieldDefaultData);
182
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
3
  Tags: wordpress comments, ajax comments, ajax, custom form, custom fields, live update, live comments, realtime chat, chat, realtime commenting, Lazy load, Lazy load comments, mobile commenting, post comments, advanced comment, comments box, community, discussion, discuss, disqus, discuz, Disqus alternative, Livefyre alternative, Jetpack comments alternative, Facebook comments alternative, comment form, commenting, reply, comments, better comments, discussions, comment notifications, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, email commenting, social login, boost comments, native comments
4
  Requires at least: 3.8.0
5
  Tested up to: 4.8
6
- Stable tag: 4.0.11
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -140,9 +140,11 @@ Support Forum: https://gvectors.com/forum/
140
 
141
  == Changelog ==
142
 
143
- = 4.0.11 =
144
 
145
- * Fixed Bug: Parse error: syntax error on some servers
 
 
146
 
147
  IMPORTANT:
148
 
@@ -151,6 +153,9 @@ IMPORTANT:
151
  - If you use CDN and found some issue please purge it.
152
  - If your server PHP version is lower than 5.4, [please change it to hogher](https://wordpress.org/support/topic/wpdiscuz-4-requires-php-5-4-and-higher/)
153
 
 
 
 
154
 
155
  = 4.0.10 =
156
 
3
  Tags: wordpress comments, ajax comments, ajax, custom form, custom fields, live update, live comments, realtime chat, chat, realtime commenting, Lazy load, Lazy load comments, mobile commenting, post comments, advanced comment, comments box, community, discussion, discuss, disqus, discuz, Disqus alternative, Livefyre alternative, Jetpack comments alternative, Facebook comments alternative, comment form, commenting, reply, comments, better comments, discussions, comment notifications, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, email commenting, social login, boost comments, native comments
4
  Requires at least: 3.8.0
5
  Tested up to: 4.8
6
+ Stable tag: 4.0.12
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
140
 
141
  == Changelog ==
142
 
143
+ = 4.0.12 =
144
 
145
+ * Fixed Bug: Facebook share button conflict with Social Login buttons
146
+ * Fixed Bug: Problem with Twitter share button
147
+ * Fixed Bug: Unable to change some options in custom fields (phone number, etc...)
148
 
149
  IMPORTANT:
150
 
153
  - If you use CDN and found some issue please purge it.
154
  - If your server PHP version is lower than 5.4, [please change it to hogher](https://wordpress.org/support/topic/wpdiscuz-4-requires-php-5-4-and-higher/)
155
 
156
+ = 4.0.11 =
157
+
158
+ * Fixed Bug: Parse error: syntax error on some servers
159
 
160
  = 4.0.10 =
161
 
templates/comment/class.WpdiscuzWalker.php CHANGED
@@ -151,8 +151,7 @@ class WpdiscuzWalker extends Walker_Comment {
151
 
152
  $commentContentClass = '';
153
  // begin printing comment template
154
- $wpCommentClasses = implode(' ', get_comment_class());
155
- $output .= '<div id="wc-comm-' . $uniqueId . '" class="' . $commentWrapperClass . ' ' . $authorClass . ' wc_comment_level-' . $depth . ' ' . $wpCommentClasses . '">';
156
  if ($this->optionsSerialized->wordpressShowAvatars) {
157
  $commentLeftClass = apply_filters('wpdiscuz_comment_left_class', '');
158
  $output .= '<div class="wc-comment-left ' . $commentLeftClass . '">' . $commentAuthorAvatar;
151
 
152
  $commentContentClass = '';
153
  // begin printing comment template
154
+ $output .= '<div id="wc-comm-' . $uniqueId . '" class="' . $commentWrapperClass . ' ' . $authorClass . ' wc_comment_level-' . $depth . '">';
 
155
  if ($this->optionsSerialized->wordpressShowAvatars) {
156
  $commentLeftClass = apply_filters('wpdiscuz_comment_left_class', '');
157
  $output .= '<div class="wc-comment-left ' . $commentLeftClass . '">' . $commentAuthorAvatar;