Comments – wpDiscuz - Version 2.2.5

Version Description

  • Fixed Bug: Comment author profile image issue when using Gravatar
  • Fixed Bug: Conditional php session start (optimized).

IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.

Download this release

Release Info

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

Code changes from version 2.2.4 to 2.2.5

comment-form/form.php CHANGED
@@ -5,6 +5,7 @@ get_currentuserinfo();
5
  error_reporting(0);
6
  $wc_core->wc_options_serialized->init_phrases_on_load();
7
  $wc_comment_list_update_type = $wc_core->wc_options_serialized->wc_comment_list_update_type;
 
8
  ?>
9
  <script type="text/javascript">
10
  // initialize the wpdiscuzValidator function
@@ -51,8 +52,6 @@ $header_text .= ($post->comment_count > 1) ? $wc_core->wc_options_serialized->wc
51
  $header_text .= ' ' . $wc_core->wc_options_serialized->wc_phrases['wc_header_on_text'];
52
  $header_text .= ' "' . get_the_title($post) . '"';
53
 
54
- $wc_main_form_comment_object = (object) array('user_id' => $current_user->ID, 'comment_author_email' => $current_user->user_email, 'comment_type' => '');
55
-
56
  $wc_is_name_field_required = ($wc_core->wc_options_serialized->wc_is_name_field_required) ? 'required="required"' : '';
57
  $wc_is_email_field_required = ($wc_core->wc_options_serialized->wc_is_email_field_required) ? 'required="required"' : '';
58
 
@@ -126,7 +125,7 @@ $wc_validate_comment_text_length = (intval($wc_core->wc_options_serialized->wc_c
126
  <div class="wc-field-comment">
127
  <?php if (!$wc_core->wc_options_serialized->wc_avatar_show_hide) { ?>
128
  <div class="wc-field-avatararea">
129
- <?php echo $wc_core->wc_helper->get_comment_author_avatar($wc_main_form_comment_object); ?>
130
  </div>
131
  <?php } ?>
132
  <div class="wpdiscuz-item wc-field-textarea" <?php
@@ -183,7 +182,7 @@ $wc_validate_comment_text_length = (intval($wc_core->wc_options_serialized->wc_c
183
 
184
  if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) {
185
  ?>
186
- <input id="wc_notification_new_comment-<?php echo $unique_id; ?>" class="wc_notification_new_comment" value="wc_notification_new_comment" <?php echo $post_sub_status; ?> type="checkbox" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-<?php echo $unique_id; ?>"><?php _e('Participate in this discussion via email', 'Postmatic'); ?></label>
187
  <?php
188
  } else {
189
  if ($current_user->ID && $wc_core->wc_db_helper->wc_has_post_notification($post->ID, $current_user->user_email)) {
5
  error_reporting(0);
6
  $wc_core->wc_options_serialized->init_phrases_on_load();
7
  $wc_comment_list_update_type = $wc_core->wc_options_serialized->wc_comment_list_update_type;
8
+ $wc_form_avatar = $wc_core->wc_helper->get_comment_author_avatar();
9
  ?>
10
  <script type="text/javascript">
11
  // initialize the wpdiscuzValidator function
52
  $header_text .= ' ' . $wc_core->wc_options_serialized->wc_phrases['wc_header_on_text'];
53
  $header_text .= ' "' . get_the_title($post) . '"';
54
 
 
 
55
  $wc_is_name_field_required = ($wc_core->wc_options_serialized->wc_is_name_field_required) ? 'required="required"' : '';
56
  $wc_is_email_field_required = ($wc_core->wc_options_serialized->wc_is_email_field_required) ? 'required="required"' : '';
57
 
125
  <div class="wc-field-comment">
126
  <?php if (!$wc_core->wc_options_serialized->wc_avatar_show_hide) { ?>
127
  <div class="wc-field-avatararea">
128
+ <?php echo $wc_form_avatar; ?>
129
  </div>
130
  <?php } ?>
131
  <div class="wpdiscuz-item wc-field-textarea" <?php
182
 
183
  if (class_exists('Prompt_Comment_Form_Handling') && $wc_core->wc_options_serialized->wc_use_postmatic_for_comment_notification) {
184
  ?>
185
+ <input id="wc_notification_new_comment-<?php echo $unique_id; ?>" class="wc_notification_new_comment" value="wc_notification_new_comment" <?php echo $post_sub_status; ?> type="checkbox" name="wc_comment_reply_notification-<?php echo $unique_id; ?>"/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-<?php echo $unique_id; ?>"><?php _e('Participate in this discussion via email', WC_Core::$TEXT_DOMAIN); ?></label>
186
  <?php
187
  } else {
188
  if ($current_user->ID && $wc_core->wc_db_helper->wc_has_post_notification($post->ID, $current_user->user_email)) {
comment-form/tpl-comment.php CHANGED
@@ -79,7 +79,6 @@ class WC_Comment_Template_Builder {
79
  $unique_id = $this->get_unique_id($comment);
80
 
81
  $wc_author_name = $this->get_author_name($comment);
82
- $wc_comm_author_avatar = $this->wc_helper->get_comment_author_avatar($comment);
83
  $wc_profile_url = $this->get_profile_url($user);
84
 
85
  if ($wc_profile_url) {
@@ -199,8 +198,7 @@ class WC_Comment_Template_Builder {
199
  $output_form .= '<div class="wc-secondary-forms-social-content" id="wc-secondary-forms-social-content-' . $unique_id . '"></div>';
200
  $output_form .= '<form action="" method="post" id="wc_comm_form-' . $unique_id . '" class="wc_comm_form wc_secondary_form"><div class="wc-field-comment">';
201
  if (!$this->wc_options_serialized->wc_avatar_show_hide) {
202
- $wc_reply_form_comment_object = (object) array('user_id' => $current_user->ID, 'comment_author_email' => $current_user->user_email, 'comment_type' => '');
203
- $output_form .= '<div class="wc-field-avatararea">' . get_avatar($wc_reply_form_comment_object) . '</div>';
204
  }
205
  $output_form .= '<div class="wc-field-textarea wpdiscuz-item" ' . $hide_avatar_style . '><textarea ' . $this->wc_validate_comment_text_length . ' id="wc_comment-' . $unique_id . '" class="wc_comment wc_field_input" name="wc_comment" required="required" placeholder="' . $textarea_placeholder . '"></textarea></div><div style="clear:both"></div></div>';
206
 
@@ -262,7 +260,7 @@ class WC_Comment_Template_Builder {
262
  }
263
 
264
  if (class_exists('Prompt_Comment_Form_Handling') && $this->wc_options_serialized->wc_use_postmatic_for_comment_notification) {
265
- $output_form .= '<input id="wc_notification_new_comment-' . $unique_id . '" class="wc_notification_new_comment" value="wc_notification_new_comment" ' . $post_sub_status . 'type="checkbox" name="wc_comment_reply_notification-' . $unique_id . '"/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-' . $unique_id . '">' . __('Participate in this discussion via email', 'Postmatic') . '</label>';
266
  } else {
267
  if ($current_user->ID && $this->wc_db_helper->wc_has_post_notification($comment->comment_post_ID, $current_user->user_email)) {
268
  $wc_confirmation_phrase = ($wc_is_user_subscription_confirmed == 1) ? $this->wc_options_serialized->wc_phrases['wc_subscribed_on_post'] : $this->wc_options_serialized->wc_phrases['wc_confirm_email'];
79
  $unique_id = $this->get_unique_id($comment);
80
 
81
  $wc_author_name = $this->get_author_name($comment);
 
82
  $wc_profile_url = $this->get_profile_url($user);
83
 
84
  if ($wc_profile_url) {
198
  $output_form .= '<div class="wc-secondary-forms-social-content" id="wc-secondary-forms-social-content-' . $unique_id . '"></div>';
199
  $output_form .= '<form action="" method="post" id="wc_comm_form-' . $unique_id . '" class="wc_comm_form wc_secondary_form"><div class="wc-field-comment">';
200
  if (!$this->wc_options_serialized->wc_avatar_show_hide) {
201
+ $output_form .= '<div class="wc-field-avatararea">' . $this->wc_helper->wc_form_avatar . '</div>';
 
202
  }
203
  $output_form .= '<div class="wc-field-textarea wpdiscuz-item" ' . $hide_avatar_style . '><textarea ' . $this->wc_validate_comment_text_length . ' id="wc_comment-' . $unique_id . '" class="wc_comment wc_field_input" name="wc_comment" required="required" placeholder="' . $textarea_placeholder . '"></textarea></div><div style="clear:both"></div></div>';
204
 
260
  }
261
 
262
  if (class_exists('Prompt_Comment_Form_Handling') && $this->wc_options_serialized->wc_use_postmatic_for_comment_notification) {
263
+ $output_form .= '<input id="wc_notification_new_comment-' . $unique_id . '" class="wc_notification_new_comment" value="wc_notification_new_comment" ' . $post_sub_status . 'type="checkbox" name="wc_comment_reply_notification-' . $unique_id . '"/> <label class="wc-label-comment-notify" for="wc_notification_new_comment-' . $unique_id . '">' . __('Participate in this discussion via email', WC_Core::$TEXT_DOMAIN) . '</label>';
264
  } else {
265
  if ($current_user->ID && $this->wc_db_helper->wc_has_post_notification($comment->comment_post_ID, $current_user->user_email)) {
266
  $wc_confirmation_phrase = ($wc_is_user_subscription_confirmed == 1) ? $this->wc_options_serialized->wc_phrases['wc_subscribed_on_post'] : $this->wc_options_serialized->wc_phrases['wc_confirm_email'];
includes/wc-helper.php CHANGED
@@ -16,29 +16,30 @@ class WC_Helper {
16
  public static $second = 'wc_second_text';
17
  public static $seconds = 'wc_second_text_plural';
18
  private $wc_options_serialized;
 
19
  public $wc_allowed_tags = array(
20
- 'br' => array(),
21
- 'a' => array('href' => array(), 'title' => array(), 'target' => array(), 'rel' => array(), 'download' => array(), 'hreflang' => array(), 'media' => array(), 'type' => array()),
22
- 'i' => array(),
23
- 'b' => array(),
24
- 'u' => array(),
25
- 'strong' => array(),
26
- 's' => array(),
27
- 'p' => array(),
28
- 'img' => array('src' => array(), 'width' => array(), 'height' => array(), 'alt' => array()),
29
- 'blockquote' => array('cite'=>array()),
30
- 'ul'=> array(),
31
- 'li'=> array(),
32
- 'ol'=> array(),
33
- 'code'=> array(),
34
- 'em'=> array(),
35
- 'abbr'=>array('title'=>array()),
36
- 'q'=>array('cite'=>array()),
37
- 'acronym'=>array('title'=>array()),
38
- 'cite'=>array(),
39
- 'strike'=>array(),
40
- 'del'=>array('datetime'=>array()),
41
- );
42
 
43
  function __construct($wc_options_serialize) {
44
  $this->wc_options_serialized = $wc_options_serialize;
@@ -124,16 +125,15 @@ class WC_Helper {
124
  public function get_comment_author_avatar($comment = null) {
125
  global $current_user;
126
  get_currentuserinfo();
127
-
128
  $comm_auth_user_email = $current_user->user_email;
 
129
  if ($comment) {
130
- $comm_auth_avatar = get_avatar($comment, 48);
131
  } else {
132
- if ($comm_auth_user_email) {
133
- $comm_auth_avatar = get_avatar($comm_auth_user_email, 48);
134
- } else {
135
- $comm_auth_avatar = '<img width="48" height="48" class="avatar avatar-48 photo avatar-default" src="' . plugins_url(WC_Core::$PLUGIN_DIRECTORY . '/files/img/avatar_default.png') . '" alt=""/>';
136
- }
137
  }
138
  return $comm_auth_avatar;
139
  }
16
  public static $second = 'wc_second_text';
17
  public static $seconds = 'wc_second_text_plural';
18
  private $wc_options_serialized;
19
+ public $wc_form_avatar;
20
  public $wc_allowed_tags = array(
21
+ 'br' => array(),
22
+ 'a' => array('href' => array(), 'title' => array(), 'target' => array(), 'rel' => array(), 'download' => array(), 'hreflang' => array(), 'media' => array(), 'type' => array()),
23
+ 'i' => array(),
24
+ 'b' => array(),
25
+ 'u' => array(),
26
+ 'strong' => array(),
27
+ 's' => array(),
28
+ 'p' => array(),
29
+ 'img' => array('src' => array(), 'width' => array(), 'height' => array(), 'alt' => array()),
30
+ 'blockquote' => array('cite' => array()),
31
+ 'ul' => array(),
32
+ 'li' => array(),
33
+ 'ol' => array(),
34
+ 'code' => array(),
35
+ 'em' => array(),
36
+ 'abbr' => array('title' => array()),
37
+ 'q' => array('cite' => array()),
38
+ 'acronym' => array('title' => array()),
39
+ 'cite' => array(),
40
+ 'strike' => array(),
41
+ 'del' => array('datetime' => array()),
42
+ );
43
 
44
  function __construct($wc_options_serialize) {
45
  $this->wc_options_serialized = $wc_options_serialize;
125
  public function get_comment_author_avatar($comment = null) {
126
  global $current_user;
127
  get_currentuserinfo();
 
128
  $comm_auth_user_email = $current_user->user_email;
129
+
130
  if ($comment) {
131
+ $comm_auth_avatar = get_avatar($comment->comment_author_email, 48);
132
  } else {
133
+ $comm_auth_avatar = get_avatar($comm_auth_user_email, 48);
134
+ }
135
+ if (!$this->wc_form_avatar) {
136
+ $this->wc_form_avatar = get_avatar($comm_auth_user_email, 48);
 
137
  }
138
  return $comm_auth_avatar;
139
  }
languages/wpdiscuz-en.mo CHANGED
Binary file
languages/wpdiscuz-en.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: wpDiscuz - Wordpress Comments\n"
4
- "POT-Creation-Date: 2015-05-25 21:34+0400\n"
5
- "PO-Revision-Date: 2015-05-25 21:34+0400\n"
6
  "Last-Translator: advancedcoding <advancedcoding@mail.ru>\n"
7
  "Language-Team: advancedcoding <advancedcoding@mail.ru>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: wc.php\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -20,21 +20,21 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
- #: comment-form/form.php:186 comment-form/tpl-comment.php:265
24
  msgid "Participate in this discussion via email"
25
  msgstr ""
26
 
27
- #: comment-form/form.php:324
28
  msgid "Connect with"
29
  msgstr ""
30
 
31
- #: comment-form/tpl-comment.php:175
32
  #: options/phrases-layout/phrases-comment.php:27
33
  #: options/wc-options-serialize.php:439
34
  msgid "Edit"
35
  msgstr ""
36
 
37
- #: comment-form/tpl-comment.php:387 wc.php:319
38
  msgid "Anonymous"
39
  msgstr ""
40
 
@@ -302,7 +302,7 @@ msgstr ""
302
 
303
  #: options/options-layouts/settings-social.php:10
304
  #: options/options-layouts/settings-social.php:12
305
- #: options/options-layouts/settings-social.php:14 wc.php:1015
306
  msgid "Settings"
307
  msgstr ""
308
 
@@ -639,7 +639,7 @@ msgid "Subscribe Confirmation Email Subject"
639
  msgstr ""
640
 
641
  #: options/phrases-layout/phrases-email.php:96
642
- #: options/wc-options-serialize.php:463 wc.php:938
643
  msgid "Subscribe Confirmation"
644
  msgstr ""
645
 
@@ -648,7 +648,7 @@ msgid "Subscribe Confirmation Email Content"
648
  msgstr ""
649
 
650
  #: options/phrases-layout/phrases-email.php:107
651
- #: options/wc-options-serialize.php:464 wc.php:939
652
  msgid ""
653
  "Hi, <br/> You just subscribed for new comments on our website. This means "
654
  "you will receive an email when new comments are posted according to "
@@ -1182,7 +1182,7 @@ msgstr ""
1182
  msgid "Notification"
1183
  msgstr ""
1184
 
1185
- #: wc.php:1017
1186
  msgid "Phrases"
1187
  msgstr ""
1188
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: wpDiscuz - Wordpress Comments\n"
4
+ "POT-Creation-Date: 2015-05-28 23:58+0400\n"
5
+ "PO-Revision-Date: 2015-05-28 23:58+0400\n"
6
  "Last-Translator: advancedcoding <advancedcoding@mail.ru>\n"
7
  "Language-Team: advancedcoding <advancedcoding@mail.ru>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: wc.php\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
+ #: comment-form/form.php:185 comment-form/tpl-comment.php:263
24
  msgid "Participate in this discussion via email"
25
  msgstr ""
26
 
27
+ #: comment-form/form.php:323
28
  msgid "Connect with"
29
  msgstr ""
30
 
31
+ #: comment-form/tpl-comment.php:174
32
  #: options/phrases-layout/phrases-comment.php:27
33
  #: options/wc-options-serialize.php:439
34
  msgid "Edit"
35
  msgstr ""
36
 
37
+ #: comment-form/tpl-comment.php:385 wc.php:321
38
  msgid "Anonymous"
39
  msgstr ""
40
 
302
 
303
  #: options/options-layouts/settings-social.php:10
304
  #: options/options-layouts/settings-social.php:12
305
+ #: options/options-layouts/settings-social.php:14 wc.php:1018
306
  msgid "Settings"
307
  msgstr ""
308
 
639
  msgstr ""
640
 
641
  #: options/phrases-layout/phrases-email.php:96
642
+ #: options/wc-options-serialize.php:463 wc.php:941
643
  msgid "Subscribe Confirmation"
644
  msgstr ""
645
 
648
  msgstr ""
649
 
650
  #: options/phrases-layout/phrases-email.php:107
651
+ #: options/wc-options-serialize.php:464 wc.php:942
652
  msgid ""
653
  "Hi, <br/> You just subscribed for new comments on our website. This means "
654
  "you will receive an email when new comments are posted according to "
1182
  msgid "Notification"
1183
  msgstr ""
1184
 
1185
+ #: wc.php:1020
1186
  msgid "Phrases"
1187
  msgstr ""
1188
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: wordpress comments, ajax comments, ajax, live update, theme, post comments, comments box, community, discussion, discuss, comment form, reply, comments, discussions, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, social login
5
  Requires at least: 2.7
6
  Tested up to: 4.2.2
7
- Stable tag: 2.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -130,11 +130,15 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
130
 
131
  == Changelog ==
132
 
133
- = 2.2.4 =
134
- * Fixed Bug: CSS/Layout issue. Breaks some theme layout.
 
135
 
136
  IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
137
 
 
 
 
138
  = 2.2.3 =
139
  * Added: Option to hide/show user avatars on comment form and list
140
  * Added: Option to hide/show comment form header text
@@ -319,4 +323,4 @@ http://www.gvectors.com/questions/wpdiscuz-comment-form-is-missing/
319
  * Fixed Bug : Layout Issues with some themes
320
 
321
  = 1.0.0 =
322
- Initial version
4
  Tags: wordpress comments, ajax comments, ajax, live update, theme, post comments, comments box, community, discussion, discuss, comment form, reply, comments, discussions, comment template, activity, comment author, comment system, redirect, comment redirect, first commenter, social login
5
  Requires at least: 2.7
6
  Tested up to: 4.2.2
7
+ Stable tag: 2.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
130
 
131
  == Changelog ==
132
 
133
+ = 2.2.5 =
134
+ * Fixed Bug: Comment author profile image issue when using Gravatar
135
+ * Fixed Bug: Conditional php session start (optimized).
136
 
137
  IMPORTANT: If you have a Cache Plugin, please delete all caches after wpDiscuz update.
138
 
139
+ = 2.2.4 =
140
+ * Fixed Bug: CSS/Layout issue. Breaks some theme layout.
141
+
142
  = 2.2.3 =
143
  * Added: Option to hide/show user avatars on comment form and list
144
  * Added: Option to hide/show comment form header text
323
  * Fixed Bug : Layout Issues with some themes
324
 
325
  = 1.0.0 =
326
+ Initial version
wc.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: wpDiscuz - Wordpress Comments
5
  Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
- Version: 2.2.4
7
  Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  Author URI: http://www.gvectors.com/
9
  Plugin URI: http://www.gvectors.com/wpdiscuz/
@@ -49,8 +49,10 @@ class WC_Core {
49
  $this->wc_helper = new WC_Helper($this->wc_options_serialized);
50
  $this->wc_css = new WC_CSS($this->wc_options_serialized);
51
  $this->comment_tpl_builder = new WC_Comment_Template_Builder($this->wc_helper, $this->wc_db_helper, $this->wc_options, $this->wc_options_serialized);
52
-
53
- add_action('init', array(&$this, 'register_session'), 2);
 
 
54
  add_action('admin_init', array(&$this, 'wc_plugin_new_version'), 2);
55
 
56
  add_action('admin_enqueue_scripts', array(&$this, 'admin_page_styles_scripts'), 2315);
@@ -120,11 +122,11 @@ class WC_Core {
120
  } else {
121
  update_option($this->wc_version_slug, $wc_plugin_data['Version']);
122
  }
123
- if (version_compare($wc_version, '2.1.2', '<=')) {
124
  $this->wc_db_helper->wc_alter_phrases_table();
125
  }
126
 
127
- if (version_compare($wc_version, '2.1.7', '<=')) {
128
  $this->wc_db_helper->wc_alter_voting_table();
129
  }
130
  }
@@ -151,7 +153,7 @@ class WC_Core {
151
  */
152
 
153
  public function register_session() {
154
- if (!session_id()) {
155
  @session_start();
156
  }
157
  }
@@ -792,6 +794,7 @@ class WC_Core {
792
  $post_id = intval($_POST['wc_post_id']);
793
  $message_array = array();
794
  if ($post_id) {
 
795
  $wc_limit = $c_offset ? $c_offset * $this->wc_options_serialized->wc_comment_count : $this->wc_db_helper->get_comments_count($post_id);
796
  $wc_last_comment_id = isset($_POST['wc_last_comment_id']) ? $_POST['wc_last_comment_id'] : 0;
797
  $wc_curr_user_comment_count = isset($_POST['wc_curr_user_comment_count']) ? $_POST['wc_curr_user_comment_count'] : 0;
@@ -1083,7 +1086,7 @@ class WC_Core {
1083
  $message_array['code'] = -1;
1084
  $message_array['phrase_message'] = $this->wc_options_serialized->wc_phrases['wc_comment_edit_not_possible'];
1085
  }
1086
-
1087
  echo json_encode($message_array);
1088
  exit;
1089
  }
3
  /*
4
  Plugin Name: wpDiscuz - Wordpress Comments
5
  Description: Better comment system. Wordpress post comments and discussion plugin. Allows your visitors discuss, vote for comments and share.
6
+ Version: 2.2.5
7
  Author: gVectors Team (A. Chakhoyan, G. Zakaryan, H. Martirosyan)
8
  Author URI: http://www.gvectors.com/
9
  Plugin URI: http://www.gvectors.com/wpdiscuz/
49
  $this->wc_helper = new WC_Helper($this->wc_options_serialized);
50
  $this->wc_css = new WC_CSS($this->wc_options_serialized);
51
  $this->comment_tpl_builder = new WC_Comment_Template_Builder($this->wc_helper, $this->wc_db_helper, $this->wc_options, $this->wc_options_serialized);
52
+
53
+ if (!$this->wc_options_serialized->wc_captcha_show_hide) {
54
+ add_action('init', array(&$this, 'register_session'), 2);
55
+ }
56
  add_action('admin_init', array(&$this, 'wc_plugin_new_version'), 2);
57
 
58
  add_action('admin_enqueue_scripts', array(&$this, 'admin_page_styles_scripts'), 2315);
122
  } else {
123
  update_option($this->wc_version_slug, $wc_plugin_data['Version']);
124
  }
125
+ if (version_compare($wc_version, '2.1.2', '<=') && version_compare($wc_version, '1.0.0', '!=')) {
126
  $this->wc_db_helper->wc_alter_phrases_table();
127
  }
128
 
129
+ if (version_compare($wc_version, '2.1.7', '<=') && version_compare($wc_version, '1.0.0', '!=')) {
130
  $this->wc_db_helper->wc_alter_voting_table();
131
  }
132
  }
153
  */
154
 
155
  public function register_session() {
156
+ if (!session_id() && !is_user_logged_in()) {
157
  @session_start();
158
  }
159
  }
794
  $post_id = intval($_POST['wc_post_id']);
795
  $message_array = array();
796
  if ($post_id) {
797
+ $this->wc_helper->get_comment_author_avatar();
798
  $wc_limit = $c_offset ? $c_offset * $this->wc_options_serialized->wc_comment_count : $this->wc_db_helper->get_comments_count($post_id);
799
  $wc_last_comment_id = isset($_POST['wc_last_comment_id']) ? $_POST['wc_last_comment_id'] : 0;
800
  $wc_curr_user_comment_count = isset($_POST['wc_curr_user_comment_count']) ? $_POST['wc_curr_user_comment_count'] : 0;
1086
  $message_array['code'] = -1;
1087
  $message_array['phrase_message'] = $this->wc_options_serialized->wc_phrases['wc_comment_edit_not_possible'];
1088
  }
1089
+
1090
  echo json_encode($message_array);
1091
  exit;
1092
  }