Comments – wpDiscuz - Version 7.3.1

Version Description

Download this release

Release Info

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

Code changes from version 7.3.0 to 7.3.1

class.WpdiscuzCore.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: wpDiscuz
4
  * Description: #1 WordPress Comment Plugin. Innovative, modern and feature-rich comment system to supercharge your website comment section.
5
- * Version: 7.3.0
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
2
  /*
3
  * Plugin Name: wpDiscuz
4
  * Description: #1 WordPress Comment Plugin. Innovative, modern and feature-rich comment system to supercharge your website comment section.
5
+ * Version: 7.3.1
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
forms/wpDiscuzForm.php CHANGED
@@ -233,7 +233,7 @@ class wpDiscuzForm implements wpdFormConst {
233
  }
234
 
235
  private function canManageOptions() {
236
- if (!current_user_can("manage_options")) {
237
  wp_die(esc_html__("Permission Denied !!!", "wpdiscuz"));
238
  }
239
  }
233
  }
234
 
235
  private function canManageOptions() {
236
+ if (is_admin() && !current_user_can("manage_options")) {
237
  wp_die(esc_html__("Permission Denied !!!", "wpdiscuz"));
238
  }
239
  }
forms/wpdFormAttr/Form.php CHANGED
@@ -456,7 +456,6 @@ class Form {
456
  "metakey" => "all",
457
  "show-label" => true,
458
  "show-lable" => true,
459
- "show-count" => true,
460
  "show-average" => true,
461
  "itemprop" => !!$this->wpdOptions->rating["enablePostRatingSchema"],
462
  "post_id" => null,
456
  "metakey" => "all",
457
  "show-label" => true,
458
  "show-lable" => true,
 
459
  "show-average" => true,
460
  "itemprop" => !!$this->wpdOptions->rating["enablePostRatingSchema"],
461
  "post_id" => null,
includes/class.WpdiscuzDBManager.php CHANGED
@@ -41,22 +41,22 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
41
  $this->initDB();
42
  require_once(ABSPATH . "wp-admin/includes/upgrade.php");
43
  $charset_collate = $this->db->get_charset_collate();
44
- $sql = "CREATE TABLE `{$this->usersVoted}`(`id` INT(11) NOT NULL AUTO_INCREMENT,`user_id` VARCHAR(32) NOT NULL, `comment_id` INT(11) NOT NULL, `vote_type` INT(11) DEFAULT NULL, `is_guest` TINYINT(1) DEFAULT 0, `post_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `comment_id` (`comment_id`), KEY `vote_type` (`vote_type`), KEY `is_guest` (`is_guest`), KEY `post_id` (`post_id`)) {$charset_collate};";
45
  maybe_create_table($this->usersVoted, $sql);
46
 
47
- $sql = "CREATE TABLE `{$this->phrases}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `phrase_key` VARCHAR(100) NOT NULL, `phrase_value` TEXT NOT NULL, PRIMARY KEY (`id`), KEY `phrase_key` (`phrase_key`)) {$charset_collate};";
48
  maybe_create_table($this->phrases, $sql);
49
 
50
- $sql = "CREATE TABLE `{$this->emailNotification}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `email` VARCHAR(100) NOT NULL, `subscribtion_id` INT(11) NOT NULL, `post_id` INT(11) NOT NULL, `subscribtion_type` VARCHAR(20) NOT NULL, `activation_key` VARCHAR(32) NOT NULL, `confirm` TINYINT DEFAULT 0, `subscription_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `imported_from` VARCHAR(25) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `subscribtion_id` (`subscribtion_id`), KEY `post_id` (`post_id`), KEY `confirm`(`confirm`), UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`,`post_id`)) {$charset_collate};";
51
  maybe_create_table($this->emailNotification, $sql);
52
 
53
- $sql = "CREATE TABLE `{$this->followUsers}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `user_email` varchar(100) NOT NULL, `user_name` varchar(255) NOT NULL, `follower_id` int(11) NOT NULL DEFAULT '0', `follower_email` varchar(100) NOT NULL, `follower_name` varchar(255) NOT NULL, `activation_key` varchar(32) NOT NULL, `confirm` tinyint(1) NOT NULL DEFAULT '0', `follow_timestamp` int(11) NOT NULL, `follow_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`), KEY `user_email` (`user_email`), KEY `follower_id` (`follower_id`), KEY `follower_email` (`follower_email`), KEY `confirm` (`confirm`), KEY `follow_timestamp` (`follow_timestamp`), UNIQUE KEY `follow_unique_key` (`user_email`, `follower_email`)) {$charset_collate};";
54
  maybe_create_table($this->followUsers, $sql);
55
 
56
- $sql = "CREATE TABLE `{$this->feedbackForms}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `unique_id` VARCHAR(15) NOT NULL, `question` varchar(255) NOT NULL, `opened` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0, `content` LONGTEXT NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_id` (`unique_id`), KEY `post_id` (`post_id`)) {$charset_collate};";
57
  maybe_create_table($this->feedbackForms, $sql);
58
 
59
- $sql = "CREATE TABLE `{$this->usersRated}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `user_id` int(11) NOT NULL DEFAULT 0, `user_ip` VARCHAR(32) NOT NULL DEFAULT '', `rating` int(11) NOT NULL, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`)) {$charset_collate};";
60
  maybe_create_table($this->usersRated, $sql);
61
  }
62
 
41
  $this->initDB();
42
  require_once(ABSPATH . "wp-admin/includes/upgrade.php");
43
  $charset_collate = $this->db->get_charset_collate();
44
+ $sql = "CREATE TABLE IF NOT EXISTS `{$this->usersVoted}`(`id` INT(11) NOT NULL AUTO_INCREMENT,`user_id` VARCHAR(32) NOT NULL, `comment_id` INT(11) NOT NULL, `vote_type` INT(11) DEFAULT NULL, `is_guest` TINYINT(1) DEFAULT 0, `post_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `comment_id` (`comment_id`), KEY `vote_type` (`vote_type`), KEY `is_guest` (`is_guest`), KEY `post_id` (`post_id`)) {$charset_collate};";
45
  maybe_create_table($this->usersVoted, $sql);
46
 
47
+ $sql = "CREATE TABLE IF NOT EXISTS `{$this->phrases}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `phrase_key` VARCHAR(100) NOT NULL, `phrase_value` TEXT NOT NULL, PRIMARY KEY (`id`), KEY `phrase_key` (`phrase_key`)) {$charset_collate};";
48
  maybe_create_table($this->phrases, $sql);
49
 
50
+ $sql = "CREATE TABLE IF NOT EXISTS `{$this->emailNotification}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `email` VARCHAR(100) NOT NULL, `subscribtion_id` INT(11) NOT NULL, `post_id` INT(11) NOT NULL, `subscribtion_type` VARCHAR(20) NOT NULL, `activation_key` VARCHAR(32) NOT NULL, `confirm` TINYINT DEFAULT 0, `subscription_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `imported_from` VARCHAR(25) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `subscribtion_id` (`subscribtion_id`), KEY `post_id` (`post_id`), KEY `confirm`(`confirm`), UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`,`post_id`)) {$charset_collate};";
51
  maybe_create_table($this->emailNotification, $sql);
52
 
53
+ $sql = "CREATE TABLE IF NOT EXISTS `{$this->followUsers}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `user_email` varchar(100) NOT NULL, `user_name` varchar(255) NOT NULL, `follower_id` int(11) NOT NULL DEFAULT '0', `follower_email` varchar(100) NOT NULL, `follower_name` varchar(255) NOT NULL, `activation_key` varchar(32) NOT NULL, `confirm` tinyint(1) NOT NULL DEFAULT '0', `follow_timestamp` int(11) NOT NULL, `follow_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`), KEY `user_email` (`user_email`), KEY `follower_id` (`follower_id`), KEY `follower_email` (`follower_email`), KEY `confirm` (`confirm`), KEY `follow_timestamp` (`follow_timestamp`), UNIQUE KEY `follow_unique_key` (`user_email`, `follower_email`)) {$charset_collate};";
54
  maybe_create_table($this->followUsers, $sql);
55
 
56
+ $sql = "CREATE TABLE IF NOT EXISTS `{$this->feedbackForms}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `unique_id` VARCHAR(15) NOT NULL, `question` varchar(255) NOT NULL, `opened` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0, `content` LONGTEXT NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_id` (`unique_id`), KEY `post_id` (`post_id`)) {$charset_collate};";
57
  maybe_create_table($this->feedbackForms, $sql);
58
 
59
+ $sql = "CREATE TABLE IF NOT EXISTS `{$this->usersRated}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `user_id` int(11) NOT NULL DEFAULT 0, `user_ip` VARCHAR(32) NOT NULL DEFAULT '', `rating` int(11) NOT NULL, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`)) {$charset_collate};";
60
  maybe_create_table($this->usersRated, $sql);
61
  }
62
 
options/class.WpdiscuzOptions.php CHANGED
@@ -1017,7 +1017,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1017
  "bubbleHintHideTimeout" => 10,
1018
  "commentListUpdateType" => 0,
1019
  "liveUpdateGuests" => 0,
1020
- "commentListUpdateTimer" => 30,
1021
  ],
1022
  self::TAB_INLINE => [
1023
  "showInlineFilterButton" => 1,
1017
  "bubbleHintHideTimeout" => 10,
1018
  "commentListUpdateType" => 0,
1019
  "liveUpdateGuests" => 0,
1020
+ "commentListUpdateTimer" => 60,
1021
  ],
1022
  self::TAB_INLINE => [
1023
  "showInlineFilterButton" => 1,
options/options-layouts/html-live.php CHANGED
@@ -176,9 +176,7 @@ if (!defined("ABSPATH")) {
176
  <p class="wpd-desc"><?php echo $setting["options"]["commentListUpdateTimer"]["description"] ?></p>
177
  </div>
178
  <div class="wpd-opt-input">
179
- <select id="commentListUpdateTimer" name="<?php echo esc_attr(WpdiscuzCore::TAB_LIVE); ?>[commentListUpdateTimer]">
180
- <option value="10" <?php selected($this->live["commentListUpdateTimer"], 10); ?>>10 <?php esc_html_e("Seconds", "wpdiscuz"); ?></option>
181
- <option value="20" <?php selected($this->live["commentListUpdateTimer"], 20); ?>>20 <?php esc_html_e("Seconds", "wpdiscuz"); ?></option>
182
  <option value="30" <?php selected($this->live["commentListUpdateTimer"], 30); ?>>30 <?php esc_html_e("Seconds", "wpdiscuz"); ?></option>
183
  <option value="60" <?php selected($this->live["commentListUpdateTimer"], 60); ?>>1 <?php esc_html_e("Minute", "wpdiscuz"); ?></option>
184
  <option value="180" <?php selected($this->live["commentListUpdateTimer"], 180); ?>>3 <?php esc_html_e("Minutes", "wpdiscuz"); ?></option>
176
  <p class="wpd-desc"><?php echo $setting["options"]["commentListUpdateTimer"]["description"] ?></p>
177
  </div>
178
  <div class="wpd-opt-input">
179
+ <select id="commentListUpdateTimer" name="<?php echo esc_attr(WpdiscuzCore::TAB_LIVE); ?>[commentListUpdateTimer]">
 
 
180
  <option value="30" <?php selected($this->live["commentListUpdateTimer"], 30); ?>>30 <?php esc_html_e("Seconds", "wpdiscuz"); ?></option>
181
  <option value="60" <?php selected($this->live["commentListUpdateTimer"], 60); ?>>1 <?php esc_html_e("Minute", "wpdiscuz"); ?></option>
182
  <option value="180" <?php selected($this->live["commentListUpdateTimer"], 180); ?>>3 <?php esc_html_e("Minutes", "wpdiscuz"); ?></option>
options/tools-layouts/tool-images.php CHANGED
@@ -1,96 +1,96 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
-
6
- $wmuIsActive = apply_filters("wpdiscuz_mu_isactive", false);
7
-
8
- $cirComments = [];
9
- $cirImagesCount = 0;
10
- $cirDisabled = "disabled";
11
- $dcoComments = [];
12
- $dcoImagesCount = 0;
13
- $dcoDisabled = "disabled";
14
-
15
- if ($wmuIsActive) {
16
-
17
- /* ===== Comment Images Reloaded ===== */
18
- $cirComments = get_comments(
19
- [
20
- "count" => true,
21
- "meta_query" => [
22
- [
23
- "key" => "comment_image_reloaded",
24
- "value" => "",
25
- "compare" => "!="
26
- ]
27
- ]
28
- ]
29
- );
30
- $cirImagesCount = intval($cirComments);
31
- $cirDisabled = $cirImagesCount ? "" : "disabled";
32
-
33
- /* ===== DCO Comment Attachment ===== */
34
- $dcoComments = get_comments(
35
- [
36
- "count" => true,
37
- "meta_query" => [
38
- [
39
- "key" => "attachment_id",
40
- "value" => "",
41
- "compare" => "!="
42
- ]
43
- ]
44
- ]
45
- );
46
- $dcoImagesCount = intval($dcoComments);
47
- $dcoDisabled = $dcoImagesCount ? "" : "disabled='disabled'";
48
- }
49
- ?>
50
- <div class="wpdtool-accordion-item">
51
-
52
- <div class="fas wpdtool-accordion-title" data-wpdtool-selector="wpdtool-<?php echo $tool["selector"]; ?>">
53
- <p><?php esc_html_e("Import Comment Images", "wpdiscuz"); ?></p>
54
- </div>
55
-
56
- <div class="wpdtool-accordion-content">
57
- <?php if (!$wmuIsActive) { ?>
58
- <div class="wpdtool wpdtool-import-cir-images">
59
- <p class="wpdtool-desc"><?php _e("These tools are available only in <a href='https://gvectors.com/product/wpdiscuz-media-uploader/'><strong><i>wpDiscuz Media Uploader</i></strong></a> addon! Please install and activate it to use importer!", "wpdiscuz"); ?></p>
60
- </div>
61
- <?php } ?>
62
-
63
- <div class="wpdtool wpdtool-import-cir-images">
64
- <p class="wpdtool-desc"><?php _e("Here you can import comments' images from <strong><i>Comment Images Reloaded</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
65
- <form action="" method="post" class="wc-tools-settings-form wc-form">
66
- <?php wp_nonce_field("wc_tools_form", "wpd-cir-images"); ?>
67
- <div class="wpdtool-block">
68
- <button type="submit" class="button button-secondary import-cir" <?php echo $cirDisabled; ?>>
69
- <?php esc_html_e("Import images", "wpdiscuz"); ?>&nbsp;
70
- <i class="fas wc-hidden"></i>
71
- </button>
72
- <span class="cir-import-progress">&nbsp;</span>
73
- <input type="hidden" name="cir-images-count" value="<?php echo esc_attr($cirImagesCount); ?>" class="cir-images-count" />
74
- <input type="hidden" name="cir-step" value="0" class="cir-step"/>
75
- </div>
76
- </form>
77
- </div>
78
-
79
- <div class="wpdtool wpdtool-import-dco-images">
80
- <p class="wpdtool-desc"><?php _e("Here you can import comments' images from <strong><i>DCO Comment Attachment</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
81
- <form action="" method="post" class="wc-tools-settings-form wc-form">
82
- <?php wp_nonce_field("wc_tools_form", "wpd-dco-images"); ?>
83
- <div class="wpdtool-block">
84
- <button type="submit" class="button button-secondary import-dco" <?php echo $dcoDisabled; ?>>
85
- <?php esc_html_e("Import images", "wpdiscuz"); ?>&nbsp;
86
- <i class="fas wc-hidden"></i>
87
- </button>
88
- <span class="dco-import-progress">&nbsp;</span>
89
- <input type="hidden" name="dco-images-count" value="<?php echo esc_attr($dcoImagesCount); ?>" class="dco-images-count" />
90
- <input type="hidden" name="dco-step" value="0" class="dco-step"/>
91
- </div>
92
- </form>
93
- </div>
94
-
95
- </div>
96
  </div>
1
+ <?php
2
+ if (!defined("ABSPATH")) {
3
+ exit();
4
+ }
5
+
6
+ $wmuIsActive = apply_filters("wpdiscuz_mu_isactive", false);
7
+
8
+ $cirComments = [];
9
+ $cirImagesCount = 0;
10
+ $cirDisabled = "disabled";
11
+ $dcoComments = [];
12
+ $dcoImagesCount = 0;
13
+ $dcoDisabled = "disabled";
14
+
15
+ if ($wmuIsActive) {
16
+
17
+ /* ===== Comment Images Reloaded ===== */
18
+ $cirComments = get_comments(
19
+ [
20
+ "count" => true,
21
+ "meta_query" => [
22
+ [
23
+ "key" => "comment_image_reloaded",
24
+ "value" => "",
25
+ "compare" => "!="
26
+ ]
27
+ ]
28
+ ]
29
+ );
30
+ $cirImagesCount = intval($cirComments);
31
+ $cirDisabled = $cirImagesCount ? "" : "disabled";
32
+
33
+ /* ===== DCO Comment Attachment ===== */
34
+ $dcoComments = get_comments(
35
+ [
36
+ "count" => true,
37
+ "meta_query" => [
38
+ [
39
+ "key" => "attachment_id",
40
+ "value" => "",
41
+ "compare" => "!="
42
+ ]
43
+ ]
44
+ ]
45
+ );
46
+ $dcoImagesCount = intval($dcoComments);
47
+ $dcoDisabled = $dcoImagesCount ? "" : "disabled='disabled'";
48
+ }
49
+ ?>
50
+ <div class="wpdtool-accordion-item">
51
+
52
+ <div class="fas wpdtool-accordion-title" data-wpdtool-selector="wpdtool-<?php echo $tool["selector"]; ?>">
53
+ <p><?php esc_html_e("Import Comment Images", "wpdiscuz"); ?></p>
54
+ </div>
55
+
56
+ <div class="wpdtool-accordion-content">
57
+ <?php if (!$wmuIsActive) { ?>
58
+ <div class="wpdtool wpdtool-import-cir-images">
59
+ <p class="wpdtool-desc"><?php _e("These tools are available only in <a href='https://gvectors.com/product/wpdiscuz-media-uploader/'><strong><i>wpDiscuz Media Uploader</i></strong></a> addon! Please install and activate it to use importer!", "wpdiscuz"); ?></p>
60
+ </div>
61
+ <?php } ?>
62
+
63
+ <div class="wpdtool wpdtool-import-cir-images">
64
+ <p class="wpdtool-desc"><?php _e("Here you can import comments' images from <strong><i>Comment Images Reloaded</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
65
+ <form action="" method="post" class="wc-tools-settings-form wc-form">
66
+ <?php wp_nonce_field("wc_tools_form", "wpd-cir-images"); ?>
67
+ <div class="wpdtool-block">
68
+ <button type="submit" class="button button-secondary import-cir" <?php echo $cirDisabled; ?>>
69
+ <?php esc_html_e("Import images", "wpdiscuz"); ?>&nbsp;
70
+ <i class="fas wc-hidden"></i>
71
+ </button>
72
+ <span class="cir-import-progress">&nbsp;</span>
73
+ <input type="hidden" name="cir-images-count" value="<?php echo esc_attr($cirImagesCount); ?>" class="cir-images-count" />
74
+ <input type="hidden" name="cir-step" value="0" class="cir-step"/>
75
+ </div>
76
+ </form>
77
+ </div>
78
+
79
+ <div class="wpdtool wpdtool-import-dco-images">
80
+ <p class="wpdtool-desc"><?php _e("Here you can import comments' images from <strong><i>DCO Comment Attachment</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
81
+ <form action="" method="post" class="wc-tools-settings-form wc-form">
82
+ <?php wp_nonce_field("wc_tools_form", "wpd-dco-images"); ?>
83
+ <div class="wpdtool-block">
84
+ <button type="submit" class="button button-secondary import-dco" <?php echo $dcoDisabled; ?>>
85
+ <?php esc_html_e("Import images", "wpdiscuz"); ?>&nbsp;
86
+ <i class="fas wc-hidden"></i>
87
+ </button>
88
+ <span class="dco-import-progress">&nbsp;</span>
89
+ <input type="hidden" name="dco-images-count" value="<?php echo esc_attr($dcoImagesCount); ?>" class="dco-images-count" />
90
+ <input type="hidden" name="dco-step" value="0" class="dco-step"/>
91
+ </div>
92
+ </form>
93
+ </div>
94
+
95
+ </div>
96
  </div>
options/tools-layouts/tool-options.php CHANGED
@@ -1,51 +1,51 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div class="wpdtool-accordion-item">
7
- <div class="fas wpdtool-accordion-title" data-wpdtool-selector="wpdtool-<?php echo $tool["selector"]; ?>">
8
- <p><?php esc_html_e("Export / Import options", "wpdiscuz"); ?></p>
9
- </div>
10
-
11
- <div class="wpdtool-accordion-content">
12
-
13
- <div class="wpdtool wpdtool-export-options">
14
- <p class="wpdtool-desc"><?php esc_html_e("Using this tool you can backup wpDiscuz options or migrate them from one WordPress to another.", "wpdiscuz"); ?></p>
15
- <form action="" method="post" class="wc-tools-settings-form wc-form">
16
- <?php wp_nonce_field("wc_tools_form", "wpd-options-export"); ?>
17
- <div class="wpdtool-block">
18
- <?php if (file_exists($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt")) { ?>
19
- <div class="wpdtool-left">
20
- <a href="<?php echo esc_url_raw($wpdiscuzOptionsUrl . self::OPTIONS_FILENAME . ".txt"); ?>" download="<?php echo esc_attr(self::OPTIONS_FILENAME . ".txt"); ?>" class="button button-secondary">
21
- <?php esc_html_e("Download Options", "wpdiscuz"); ?>
22
- </a>
23
- </div>
24
- <?php } ?>
25
- <div class="wpdtool-right">
26
- <input type="submit" name="wpdiscuz-export-submit" class="button button-primary" value="<?php esc_attr_e("Backup Options", "wpdiscuz"); ?>">
27
- </div>
28
- <div class="clearfix"></div>
29
- <input type="hidden" name="tools-action" value="export-options" />
30
- </div>
31
- </form>
32
- </div>
33
-
34
- <div class="wpdtool wpdtool-import-options">
35
- <p class="wpdtool-desc"><?php esc_html_e("Here you can import and restore wpDiscuz options. You just need to choose backup file and click import options.", "wpdiscuz"); ?></p>
36
- <form action="" method="post" class="wc-tools-settings-form wc-form" enctype="multipart/form-data">
37
- <?php wp_nonce_field("wc_tools_form", "wpd-options-import"); ?>
38
- <div class="wpdtool-block wpdtool-alignleft111">
39
- <div class="wpdtool-left">
40
- <input type="file" name="wpdiscuz-options-file" class="" style="vertical-align: top;"/>
41
- </div>
42
- <div class="wpdtool-right">
43
- <input type="submit" name="wpdiscuz-import-submit" class="button button-primary" value="<?php esc_attr_e("Import Options", "wpdiscuz"); ?>">
44
- </div>
45
- <div class="clearfix"></div>
46
- <input type="hidden" name="tools-action" value="import-options" />
47
- </div>
48
- </form>
49
- </div>
50
- </div>
51
  </div>
1
+ <?php
2
+ if (!defined("ABSPATH")) {
3
+ exit();
4
+ }
5
+ ?>
6
+ <div class="wpdtool-accordion-item">
7
+ <div class="fas wpdtool-accordion-title" data-wpdtool-selector="wpdtool-<?php echo $tool["selector"]; ?>">
8
+ <p><?php esc_html_e("Export / Import options", "wpdiscuz"); ?></p>
9
+ </div>
10
+
11
+ <div class="wpdtool-accordion-content">
12
+
13
+ <div class="wpdtool wpdtool-export-options">
14
+ <p class="wpdtool-desc"><?php esc_html_e("Using this tool you can backup wpDiscuz options or migrate them from one WordPress to another.", "wpdiscuz"); ?></p>
15
+ <form action="" method="post" class="wc-tools-settings-form wc-form">
16
+ <?php wp_nonce_field("wc_tools_form", "wpd-options-export"); ?>
17
+ <div class="wpdtool-block">
18
+ <?php if (file_exists($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt")) { ?>
19
+ <div class="wpdtool-left">
20
+ <a href="<?php echo esc_url_raw($wpdiscuzOptionsUrl . self::OPTIONS_FILENAME . ".txt"); ?>" download="<?php echo esc_attr(self::OPTIONS_FILENAME . ".txt"); ?>" class="button button-secondary">
21
+ <?php esc_html_e("Download Options", "wpdiscuz"); ?>
22
+ </a>
23
+ </div>
24
+ <?php } ?>
25
+ <div class="wpdtool-right">
26
+ <input type="submit" name="wpdiscuz-export-submit" class="button button-primary" value="<?php esc_attr_e("Backup Options", "wpdiscuz"); ?>">
27
+ </div>
28
+ <div class="clearfix"></div>
29
+ <input type="hidden" name="tools-action" value="export-options" />
30
+ </div>
31
+ </form>
32
+ </div>
33
+
34
+ <div class="wpdtool wpdtool-import-options">
35
+ <p class="wpdtool-desc"><?php esc_html_e("Here you can import and restore wpDiscuz options. You just need to choose backup file and click import options.", "wpdiscuz"); ?></p>
36
+ <form action="" method="post" class="wc-tools-settings-form wc-form" enctype="multipart/form-data">
37
+ <?php wp_nonce_field("wc_tools_form", "wpd-options-import"); ?>
38
+ <div class="wpdtool-block wpdtool-alignleft111">
39
+ <div class="wpdtool-left">
40
+ <input type="file" name="wpdiscuz-options-file" class="" style="vertical-align: top;"/>
41
+ </div>
42
+ <div class="wpdtool-right">
43
+ <input type="submit" name="wpdiscuz-import-submit" class="button button-primary" value="<?php esc_attr_e("Import Options", "wpdiscuz"); ?>">
44
+ </div>
45
+ <div class="clearfix"></div>
46
+ <input type="hidden" name="tools-action" value="import-options" />
47
+ </div>
48
+ </form>
49
+ </div>
50
+ </div>
51
  </div>
options/tools-layouts/tool-phrases.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div class="wpdtool-accordion-item">
7
- <div class="fas wpdtool-accordion-title" data-wpdtool-selector="wpdtool-<?php echo $tool["selector"]; ?>">
8
- <p><?php esc_html_e("Export / Import phrases", "wpdiscuz"); ?></p>
9
- </div>
10
-
11
-
12
- <div class="wpdtool-accordion-content">
13
-
14
- <div class="wpdtool wpdtool-export-phrases">
15
- <p class="wpdtool-desc"><?php esc_html_e("Using this tool you can backup wpDiscuz phrases or migrate them from one WordPress to another.", "wpdiscuz"); ?></p>
16
- <form action="" method="post" class="wc-tools-settings-form wc-form">
17
- <?php wp_nonce_field("wc_tools_form", "wpd-phrases-export"); ?>
18
- <div class="wpdtool-block">
19
- <?php if (file_exists($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt")) { ?>
20
- <div class="wpdtool-left">
21
- <a href="<?php echo esc_url_raw($wpdiscuzOptionsUrl . self::PHRASES_FILENAME . ".txt"); ?>" download="<?php echo esc_attr(self::PHRASES_FILENAME . ".txt"); ?>" class="button button-secondary">
22
- <?php esc_html_e("Download Phrases", "wpdiscuz"); ?>
23
- </a>
24
- </div>
25
- <?php } ?>
26
- <div class="wpdtool-right">
27
- <input type="submit" name="wpdiscuz-export-submit" class="button button-primary" value="<?php esc_attr_e("Backup Phrases", "wpdiscuz"); ?>">
28
- </div>
29
- <div class="clearfix"></div>
30
- <input type="hidden" name="tools-action" value="export-phrases" />
31
- </div>
32
- </form>
33
- </div>
34
-
35
- <div class="wpdtool wpdtool-import-phrases">
36
- <p class="wpdtool-desc"><?php esc_html_e("Here you can import and restore wpDiscuz phrases. You just need to choose backup file and click import phrases.", "wpdiscuz"); ?></p>
37
- <form action="" method="post" class="wc-tools-settings-form wc-form" enctype="multipart/form-data">
38
- <?php wp_nonce_field("wc_tools_form", "wpd-phrases-import"); ?>
39
- <div class="wpdtool-block">
40
- <div class="wpdtool-left">
41
- <input type="file" name="wpdiscuz-phrases-file" class=""/>
42
- </div>
43
- <div class="wpdtool-right">
44
- <input type="submit" name="wpdiscuz-import-submit" class="button button-primary" value="<?php esc_attr_e("Import Phrases", "wpdiscuz"); ?>">
45
- </div>
46
- <div class="clearfix"></div>
47
- <input type="hidden" name="tools-action" value="import-phrases" />
48
- </div>
49
- </form>
50
- </div>
51
-
52
- </div>
53
  </div>
1
+ <?php
2
+ if (!defined("ABSPATH")) {
3
+ exit();
4
+ }
5
+ ?>
6
+ <div class="wpdtool-accordion-item">
7
+ <div class="fas wpdtool-accordion-title" data-wpdtool-selector="wpdtool-<?php echo $tool["selector"]; ?>">
8
+ <p><?php esc_html_e("Export / Import phrases", "wpdiscuz"); ?></p>
9
+ </div>
10
+
11
+
12
+ <div class="wpdtool-accordion-content">
13
+
14
+ <div class="wpdtool wpdtool-export-phrases">
15
+ <p class="wpdtool-desc"><?php esc_html_e("Using this tool you can backup wpDiscuz phrases or migrate them from one WordPress to another.", "wpdiscuz"); ?></p>
16
+ <form action="" method="post" class="wc-tools-settings-form wc-form">
17
+ <?php wp_nonce_field("wc_tools_form", "wpd-phrases-export"); ?>
18
+ <div class="wpdtool-block">
19
+ <?php if (file_exists($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt")) { ?>
20
+ <div class="wpdtool-left">
21
+ <a href="<?php echo esc_url_raw($wpdiscuzOptionsUrl . self::PHRASES_FILENAME . ".txt"); ?>" download="<?php echo esc_attr(self::PHRASES_FILENAME . ".txt"); ?>" class="button button-secondary">
22
+ <?php esc_html_e("Download Phrases", "wpdiscuz"); ?>
23
+ </a>
24
+ </div>
25
+ <?php } ?>
26
+ <div class="wpdtool-right">
27
+ <input type="submit" name="wpdiscuz-export-submit" class="button button-primary" value="<?php esc_attr_e("Backup Phrases", "wpdiscuz"); ?>">
28
+ </div>
29
+ <div class="clearfix"></div>
30
+ <input type="hidden" name="tools-action" value="export-phrases" />
31
+ </div>
32
+ </form>
33
+ </div>
34
+
35
+ <div class="wpdtool wpdtool-import-phrases">
36
+ <p class="wpdtool-desc"><?php esc_html_e("Here you can import and restore wpDiscuz phrases. You just need to choose backup file and click import phrases.", "wpdiscuz"); ?></p>
37
+ <form action="" method="post" class="wc-tools-settings-form wc-form" enctype="multipart/form-data">
38
+ <?php wp_nonce_field("wc_tools_form", "wpd-phrases-import"); ?>
39
+ <div class="wpdtool-block">
40
+ <div class="wpdtool-left">
41
+ <input type="file" name="wpdiscuz-phrases-file" class=""/>
42
+ </div>
43
+ <div class="wpdtool-right">
44
+ <input type="submit" name="wpdiscuz-import-submit" class="button button-primary" value="<?php esc_attr_e("Import Phrases", "wpdiscuz"); ?>">
45
+ </div>
46
+ <div class="clearfix"></div>
47
+ <input type="hidden" name="tools-action" value="import-phrases" />
48
+ </div>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
  </div>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: gVectors Team
3
  Tags: comment, comments, ajax comments, comment form, comment fields
4
  Requires at least: 5.0
5
- Tested up to: 5.7
6
- Stable tag: 7.3.0
7
  Requires PHP: 5.6 and higher
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -183,6 +183,13 @@ Nothing will be lost! **Comments - wpDiscuz** will show all old comments.
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
186
  = Comments - wpDiscuz v7.3.0 =
187
 
188
  * Boosted: Fast loading based on built-in cache
@@ -199,10 +206,6 @@ Nothing will be lost! **Comments - wpDiscuz** will show all old comments.
199
  * Fixed Bug: Many small bugs are fixed
200
  * New Addon: [wpDiscuz - Voice Commenting](https://gvectors.com/product/wpdiscuz-voice-commenting/)
201
 
202
- **IMPORTANT!**
203
- * Please don't forget delete all caches and purge CDN after the update.
204
-
205
-
206
  = Comments - wpDiscuz v7.2.2 =
207
 
208
  * Added: Comment bubble compatibility on WooCommerce product page
2
  Contributors: gVectors Team
3
  Tags: comment, comments, ajax comments, comment form, comment fields
4
  Requires at least: 5.0
5
+ Tested up to: 5.8
6
+ Stable tag: 7.3.1
7
  Requires PHP: 5.6 and higher
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
183
 
184
  == Changelog ==
185
 
186
+ = Comments - wpDiscuz v7.3.1 =
187
+
188
+ * Phrase Hardening: Filtering some phrases to avoid inserting JS code by the website Administrators. So, we've fixed the "security issue" which could only be caused by website Administrators.
189
+
190
+ **IMPORTANT!**
191
+ * Please don't forget delete all caches and purge CDN after the update.
192
+
193
  = Comments - wpDiscuz v7.3.0 =
194
 
195
  * Boosted: Fast loading based on built-in cache
206
  * Fixed Bug: Many small bugs are fixed
207
  * New Addon: [wpDiscuz - Voice Commenting](https://gvectors.com/product/wpdiscuz-voice-commenting/)
208
 
 
 
 
 
209
  = Comments - wpDiscuz v7.2.2 =
210
 
211
  * Added: Comment bubble compatibility on WooCommerce product page
themes/default/class.WpdiscuzWalker.php CHANGED
@@ -239,10 +239,10 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
239
  if ($args["can_user_follow"] && $args["current_user_email"] !== $comment->comment_author_email) {
240
  if (is_array($args["user_follows"]) && in_array($comment->comment_author_email, $args["user_follows"])) {
241
  $followClass = "wpd-unfollow wpd-follow-active";
242
- $followTip = $this->options->getPhrase("wc_unfollow_user", ["comment" => $comment]);
243
  } else {
244
  $followClass = "wpd-follow";
245
- $followTip = $this->options->getPhrase("wc_follow_user", ["comment" => $comment]);
246
  }
247
  $showFollow = true;
248
  $search[] = "{FOLLOW_WRAPPER_CLASSES}";
239
  if ($args["can_user_follow"] && $args["current_user_email"] !== $comment->comment_author_email) {
240
  if (is_array($args["user_follows"]) && in_array($comment->comment_author_email, $args["user_follows"])) {
241
  $followClass = "wpd-unfollow wpd-follow-active";
242
+ $followTip = esc_html($this->options->getPhrase("wc_unfollow_user", ["comment" => $comment]));
243
  } else {
244
  $followClass = "wpd-follow";
245
+ $followTip = esc_html($this->options->getPhrase("wc_follow_user", ["comment" => $comment]));
246
  }
247
  $showFollow = true;
248
  $search[] = "{FOLLOW_WRAPPER_CLASSES}";
utils/class.WpdiscuzHelperUpload.php CHANGED
@@ -344,7 +344,7 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
344
  $file["type"] = $mimeType;
345
  } else {
346
  $error = true;
347
- $response["errors"][] = $file["name"] . " " . (current_user_can("manage_options") ? "(mimetype - " . $mimeType . ") " : "") . "- " . $this->options->getPhrase("wmuPhraseNotAllowedFile");
348
  }
349
 
350
  do_action("wpdiscuz_mu_preupload", $file);
@@ -370,7 +370,7 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
370
  $response["attachmentsHtml"] .= "</div>";
371
  $response["previewsData"] = $attachmentsData;
372
  if ($allowedCount == 1) {
373
- $response["tooltip"] = $this->options->getPhrase("wmuChangeImage", ["unique_id" => $uniqueId]);
374
  }
375
  }
376
 
@@ -462,7 +462,7 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
462
  $response["attachmentsHtml"] .= "<input class='wmu-attachments-data' type='hidden' value='" . esc_attr(json_encode($attachmentsData)) . "'/>";
463
  $response["attachmentsHtml"] .= "</div>";
464
  } else {
465
- $response["tooltip"] = $this->options->getPhrase("wmuAttachImage", ["unique_id" => $uniqueId]);
466
  }
467
  wp_send_json_success($response);
468
  }
344
  $file["type"] = $mimeType;
345
  } else {
346
  $error = true;
347
+ $response["errors"][] = $file["name"] . " " . (current_user_can("manage_options") ? "(mimetype - " . $mimeType . ") " : "") . "- " . esc_html($this->options->getPhrase("wmuPhraseNotAllowedFile"));
348
  }
349
 
350
  do_action("wpdiscuz_mu_preupload", $file);
370
  $response["attachmentsHtml"] .= "</div>";
371
  $response["previewsData"] = $attachmentsData;
372
  if ($allowedCount == 1) {
373
+ $response["tooltip"] = esc_html($this->options->getPhrase("wmuChangeImage", ["unique_id" => $uniqueId]));
374
  }
375
  }
376
 
462
  $response["attachmentsHtml"] .= "<input class='wmu-attachments-data' type='hidden' value='" . esc_attr(json_encode($attachmentsData)) . "'/>";
463
  $response["attachmentsHtml"] .= "</div>";
464
  } else {
465
+ $response["tooltip"] = esc_html($this->options->getPhrase("wmuAttachImage", ["unique_id" => $uniqueId]));
466
  }
467
  wp_send_json_success($response);
468
  }