Comments – wpDiscuz - Version 7.3.9

Version Description

Download this release

Release Info

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

Code changes from version 7.3.8 to 7.3.9

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.8
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
@@ -782,6 +782,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
782
  }
783
 
784
  $commentData["comment_list"] = wp_list_comments($commentListArgs, $commentList);
 
785
  $this->commentsArgs["caller"] = "";
786
 
787
  return $commentData;
@@ -789,6 +790,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
789
 
790
  public function _getWPComments(&$commentListArgs, &$commentData) {
791
  if ($this->options->wp["isPaginate"]) {// PAGINATION
 
792
  $page = get_query_var("cpage");
793
  $this->commentsArgs["number"] = $this->options->wp["commentPerPage"];
794
  $this->commentsArgs["order"] = "asc";
@@ -812,6 +814,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
812
  $commentList = $this->getChildren($commentList, $commentListArgs);
813
  }
814
  $this->getStickyComments(true, $commentList, $commentListArgs);
 
815
  } else {
816
  $limitBefore = $this->commentsArgs["number"];
817
  if ($this->commentsArgs["number"]) {
@@ -1703,7 +1706,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
1703
 
1704
  public function addNewRoles() {
1705
  global $wp_roles;
1706
- $roles = apply_filters("editable_roles", $wp_roles->roles);
1707
  $newBlogRoles = [];
1708
  $newBlogRoleLabels = [];
1709
  $newRolePhrases = [];
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.9
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
782
  }
783
 
784
  $commentData["comment_list"] = wp_list_comments($commentListArgs, $commentList);
785
+ $commentData["comment_list"] .= $commentCache ? "<!-- // From wpDiscuz's Caches // -->" : "";
786
  $this->commentsArgs["caller"] = "";
787
 
788
  return $commentData;
790
 
791
  public function _getWPComments(&$commentListArgs, &$commentData) {
792
  if ($this->options->wp["isPaginate"]) {// PAGINATION
793
+ $oldOrder = $this->commentsArgs["order"];
794
  $page = get_query_var("cpage");
795
  $this->commentsArgs["number"] = $this->options->wp["commentPerPage"];
796
  $this->commentsArgs["order"] = "asc";
814
  $commentList = $this->getChildren($commentList, $commentListArgs);
815
  }
816
  $this->getStickyComments(true, $commentList, $commentListArgs);
817
+ $this->commentsArgs["order"] = $oldOrder;
818
  } else {
819
  $limitBefore = $this->commentsArgs["number"];
820
  if ($this->commentsArgs["number"]) {
1706
 
1707
  public function addNewRoles() {
1708
  global $wp_roles;
1709
+ $roles = empty($wp_roles->roles) ? [] : $wp_roles->roles;
1710
  $newBlogRoles = [];
1711
  $newBlogRoleLabels = [];
1712
  $newRolePhrases = [];
forms/a.txt ADDED
File without changes
forms/wpDiscuzForm.php CHANGED
@@ -264,7 +264,7 @@ class wpDiscuzForm implements wpdFormConst {
264
  }
265
  return $content;
266
  }
267
-
268
  public function afterReadMore($output, $comment) {
269
  return $this->renderFrontCommentMetaHtml($output, $comment);
270
  }
264
  }
265
  return $content;
266
  }
267
+
268
  public function afterReadMore($output, $comment) {
269
  return $this->renderFrontCommentMetaHtml($output, $comment);
270
  }
forms/wpdFormAttr/Form.php CHANGED
@@ -37,11 +37,13 @@ class Form {
37
  }
38
 
39
  public function initFormMeta() {
40
- if (!$this->generalOptions) {
41
- $this->generalOptions = get_post_meta($this->formID, wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS, true);
42
- }
43
- if (!$this->formeStructure) {
44
- $this->formeStructure = get_post_meta($this->formID, wpdFormConst::WPDISCUZ_META_FORMS_STRUCTURE, true);
 
 
45
  }
46
  if (!$this->formPostTypes) {
47
  $this->formPostTypes = isset($this->generalOptions[wpdFormConst::WPDISCUZ_META_FORMS_POSTE_TYPES]) ? $this->generalOptions[wpdFormConst::WPDISCUZ_META_FORMS_POSTE_TYPES] : [];
@@ -81,7 +83,7 @@ class Form {
81
  return;
82
  }
83
  $form = get_post($formID);
84
- if ($form && $form->post_status === "publish" && $form->post_type === wpdFormConst::WPDISCUZ_FORMS_CONTENT_TYPE) {
85
  $this->formID = $formID;
86
  do_action("wpdiscuz_form_init", $this);
87
  } else {
@@ -263,7 +265,7 @@ class Form {
263
  $postID = $comment->comment_post_ID;
264
  if (!(class_exists("WooCommerce") && get_post_type($postID) === "product") && $oldCommentRating && $commentApproved === "1") {
265
  $postRatingMeta = get_post_meta($postID, wpdFormConst::WPDISCUZ_RATING_COUNT, true);
266
- $postRatingMeta = is_array($postRatingMeta) ? $postRatingMeta : [];
267
  $oldCommentRatingCount = $postRatingMeta[$mettaKey][$oldCommentRating] - 1;
268
  if ($oldCommentRatingCount > 0) {
269
  $postRatingMeta[$mettaKey][$oldCommentRating] = $oldCommentRatingCount;
@@ -333,7 +335,7 @@ class Form {
333
  }
334
  }
335
  update_post_meta($postID, wpdFormConst::WPDISCUZ_RATING_COUNT, $wpdiscuzRatingCount);
336
- $this->updateSeparateRatingMeta($wpdiscuzRatingCount, $postID);
337
  }
338
  }
339
 
@@ -492,7 +494,7 @@ class Form {
492
  foreach (array_unique($this->ratingsFieldsKey) as $key => $field) {
493
  $avg = floatval(get_post_meta($post->ID, wpdFormConst::WPDISCUZ_RATING_SEPARATE_AVG . $field, true));
494
  $c = intval(get_post_meta($post->ID, wpdFormConst::WPDISCUZ_RATING_SEPARATE_COUNT . $field, true));
495
- $ratingList[$field]["average"] = $avg ? $avg : 0;
496
  $ratingList[$field]["count"] = $c ? $c : 0;
497
  }
498
  if ($ratingList) {
@@ -842,7 +844,7 @@ class Form {
842
  <label style="display: none;" for="wc-textarea-<?php echo esc_attr($uniqueId); ?>">Label</label>
843
  <textarea id="wc-textarea-<?php echo esc_attr($uniqueId); ?>" required name="wc_comment" class="wc_comment wpd-field"></textarea>
844
  <div id="wpd-editor-<?php echo esc_attr($uniqueId); ?>"></div>
845
- <?php $this->renderTextEditorButtons($uniqueId); ?>
846
  </div>
847
  <?php
848
  } else {
@@ -852,12 +854,12 @@ class Form {
852
  $textarea_placeholder = $this->wpdOptions->getPhrase("wc_be_the_first_text", ["unique_id" => $uniqueId]);
853
  }
854
  if (strrchr($uniqueId, "_") === "_0") {
855
- $commentTextMinLength = intval($this->wpdOptions->content["commentTextMinLength"]);
856
- $commentTextMaxLength = intval($this->wpdOptions->content["commentTextMaxLength"]);
857
- } else {
858
- $commentTextMinLength = intval($this->wpdOptions->content["replyTextMinLength"]);
859
- $commentTextMaxLength = intval($this->wpdOptions->content["replyTextMaxLength"]);
860
- }
861
  $commentTextLengthRange = ($commentTextMinLength && $commentTextMaxLength) ? 'pattern=".{' . $commentTextMinLength . ',' . $commentTextMaxLength . '}"' : '';
862
  $textareaMaxLength = $commentTextMaxLength ? "maxlength=$commentTextMaxLength" : '';
863
  ?>
@@ -994,8 +996,38 @@ class Form {
994
  $this->initFormMeta();
995
  $blogRoles = get_editable_roles();
996
  ?>
997
- <style>.wpd-form-table td{ position: relative;} .wpd-form-table td i.fa-question-circle{ font-size: 16px; right: 15px; top: 15px; position: absolute;} .wpdiscuz-form-builder-help{text-align: right; padding: 5px; font-size: 16px; margin-top: -15px;}</style>
998
- <style>[dir=rtl] .wpd-form-table td{ position: relative; padding-left: 25px;} [dir=rtl] .wpd-form-table td i.fa-question-circle{ font-size: 16px; right:auto; left: 0px; top: 15px; position: absolute;} [dir=rtl] .wpdiscuz-form-builder-help{text-align: left; padding: 5px; font-size: 16px; margin-top: -15px;}</style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
999
  <div class="wpdiscuz-wrapper">
1000
  <div class="wpd-form-options" style="width:100%;">
1001
  <table class="wpd-form-table" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:10px 0px 20px 0px;">
@@ -1146,7 +1178,7 @@ class Form {
1146
  }
1147
  $checked = array_key_exists($typeKey, $this->formPostTypes) ? "checked" : "";
1148
  $formRelExistsClass = "";
1149
- if (!$checked && isset($formContentTypeRel[$typeKey][$lang])) {
1150
  $formRelExistsClass = "wpd-form-rel-exixts";
1151
  $hasForm = true;
1152
  }
@@ -1292,20 +1324,20 @@ class Form {
1292
  $post = get_post($postId);
1293
  }
1294
  $this->initFormMeta();
1295
- $this->isUserCanSeeComments = true;
1296
  if ($currentUser && $currentUser->ID) {
1297
  if ($post->post_author && $post->post_author != $currentUser->ID && $currentUser->roles && is_array($currentUser->roles)) {
1298
  $this->generalOptions["roles_cannot_see_comments"] = isset($this->generalOptions["roles_cannot_see_comments"]) ? $this->generalOptions["roles_cannot_see_comments"] : [];
1299
  foreach ($currentUser->roles as $k => $role) {
1300
  if (in_array($role, $this->generalOptions["roles_cannot_see_comments"])) {
1301
  //Filter hook to add extra conditions in user role dependent restriction.
1302
- $this->isUserCanSeeComments = apply_filters("wpdiscuz_user_role_can_see_comments", false, $role);
1303
  break;
1304
  }
1305
  }
1306
  }
1307
  } else {
1308
- $this->isUserCanSeeComments = $this->generalOptions["guest_can_see_comments"] = isset($this->generalOptions["guest_can_see_comments"]) ? $this->generalOptions["guest_can_see_comments"] : 1;
1309
  }
1310
  return $this->isUserCanSeeComments;
1311
  }
@@ -1332,7 +1364,7 @@ class Form {
1332
  }
1333
  }
1334
  } else {
1335
- $this->generalOptions["guest_can_see_comments"] = isset($this->generalOptions["guest_can_see_comments"]) ? $this->generalOptions["guest_can_see_comments"] : 1;
1336
  $user_can_comment = $this->generalOptions["guest_can_see_comments"] && $this->generalOptions["guest_can_comment"];
1337
  }
1338
  if ($user_can_comment && class_exists("WooCommerce") && get_post_type($postId) === "product") {
@@ -1543,10 +1575,10 @@ class Form {
1543
  foreach ($values as $rating => $count) {
1544
  $avg += $rating * $count;
1545
  $c += $count;
1546
- }
1547
  update_post_meta($post_id, wpdFormConst::WPDISCUZ_RATING_SEPARATE_AVG . $key, ($c === 0 ? 0 : round($avg / $c, 1)));
1548
  update_post_meta($post_id, wpdFormConst::WPDISCUZ_RATING_SEPARATE_COUNT . $key, $c);
1549
- }
1550
- }
1551
 
1552
  }
37
  }
38
 
39
  public function initFormMeta() {
40
+ if ((int) $this->formID) {
41
+ if (!$this->generalOptions) {
42
+ $this->generalOptions = get_post_meta($this->formID, wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS, true);
43
+ }
44
+ if (!$this->formeStructure) {
45
+ $this->formeStructure = get_post_meta($this->formID, wpdFormConst::WPDISCUZ_META_FORMS_STRUCTURE, true);
46
+ }
47
  }
48
  if (!$this->formPostTypes) {
49
  $this->formPostTypes = isset($this->generalOptions[wpdFormConst::WPDISCUZ_META_FORMS_POSTE_TYPES]) ? $this->generalOptions[wpdFormConst::WPDISCUZ_META_FORMS_POSTE_TYPES] : [];
83
  return;
84
  }
85
  $form = get_post($formID);
86
+ if ($form && $form->post_type === wpdFormConst::WPDISCUZ_FORMS_CONTENT_TYPE) {
87
  $this->formID = $formID;
88
  do_action("wpdiscuz_form_init", $this);
89
  } else {
265
  $postID = $comment->comment_post_ID;
266
  if (!(class_exists("WooCommerce") && get_post_type($postID) === "product") && $oldCommentRating && $commentApproved === "1") {
267
  $postRatingMeta = get_post_meta($postID, wpdFormConst::WPDISCUZ_RATING_COUNT, true);
268
+ $postRatingMeta = is_array($postRatingMeta) ? $postRatingMeta : [];
269
  $oldCommentRatingCount = $postRatingMeta[$mettaKey][$oldCommentRating] - 1;
270
  if ($oldCommentRatingCount > 0) {
271
  $postRatingMeta[$mettaKey][$oldCommentRating] = $oldCommentRatingCount;
335
  }
336
  }
337
  update_post_meta($postID, wpdFormConst::WPDISCUZ_RATING_COUNT, $wpdiscuzRatingCount);
338
+ $this->updateSeparateRatingMeta($wpdiscuzRatingCount, $postID);
339
  }
340
  }
341
 
494
  foreach (array_unique($this->ratingsFieldsKey) as $key => $field) {
495
  $avg = floatval(get_post_meta($post->ID, wpdFormConst::WPDISCUZ_RATING_SEPARATE_AVG . $field, true));
496
  $c = intval(get_post_meta($post->ID, wpdFormConst::WPDISCUZ_RATING_SEPARATE_COUNT . $field, true));
497
+ $ratingList[$field]["average"] = $avg ? $avg : 0;
498
  $ratingList[$field]["count"] = $c ? $c : 0;
499
  }
500
  if ($ratingList) {
844
  <label style="display: none;" for="wc-textarea-<?php echo esc_attr($uniqueId); ?>">Label</label>
845
  <textarea id="wc-textarea-<?php echo esc_attr($uniqueId); ?>" required name="wc_comment" class="wc_comment wpd-field"></textarea>
846
  <div id="wpd-editor-<?php echo esc_attr($uniqueId); ?>"></div>
847
+ <?php $this->renderTextEditorButtons($uniqueId); ?>
848
  </div>
849
  <?php
850
  } else {
854
  $textarea_placeholder = $this->wpdOptions->getPhrase("wc_be_the_first_text", ["unique_id" => $uniqueId]);
855
  }
856
  if (strrchr($uniqueId, "_") === "_0") {
857
+ $commentTextMinLength = intval($this->wpdOptions->content["commentTextMinLength"]);
858
+ $commentTextMaxLength = intval($this->wpdOptions->content["commentTextMaxLength"]);
859
+ } else {
860
+ $commentTextMinLength = intval($this->wpdOptions->content["replyTextMinLength"]);
861
+ $commentTextMaxLength = intval($this->wpdOptions->content["replyTextMaxLength"]);
862
+ }
863
  $commentTextLengthRange = ($commentTextMinLength && $commentTextMaxLength) ? 'pattern=".{' . $commentTextMinLength . ',' . $commentTextMaxLength . '}"' : '';
864
  $textareaMaxLength = $commentTextMaxLength ? "maxlength=$commentTextMaxLength" : '';
865
  ?>
996
  $this->initFormMeta();
997
  $blogRoles = get_editable_roles();
998
  ?>
999
+ <style>.wpd-form-table td{
1000
+ position: relative;
1001
+ }
1002
+ .wpd-form-table td i.fa-question-circle{
1003
+ font-size: 16px;
1004
+ right: 15px;
1005
+ top: 15px;
1006
+ position: absolute;
1007
+ }
1008
+ .wpdiscuz-form-builder-help{
1009
+ text-align: right;
1010
+ padding: 5px;
1011
+ font-size: 16px;
1012
+ margin-top: -15px;
1013
+ }</style>
1014
+ <style>[dir=rtl] .wpd-form-table td{
1015
+ position: relative;
1016
+ padding-left: 25px;
1017
+ }
1018
+ [dir=rtl] .wpd-form-table td i.fa-question-circle{
1019
+ font-size: 16px;
1020
+ right:auto;
1021
+ left: 0px;
1022
+ top: 15px;
1023
+ position: absolute;
1024
+ }
1025
+ [dir=rtl] .wpdiscuz-form-builder-help{
1026
+ text-align: left;
1027
+ padding: 5px;
1028
+ font-size: 16px;
1029
+ margin-top: -15px;
1030
+ }</style>
1031
  <div class="wpdiscuz-wrapper">
1032
  <div class="wpd-form-options" style="width:100%;">
1033
  <table class="wpd-form-table" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:10px 0px 20px 0px;">
1178
  }
1179
  $checked = array_key_exists($typeKey, $this->formPostTypes) ? "checked" : "";
1180
  $formRelExistsClass = "";
1181
+ if (!$checked && !empty($formContentTypeRel[$typeKey][$lang])) {
1182
  $formRelExistsClass = "wpd-form-rel-exixts";
1183
  $hasForm = true;
1184
  }
1324
  $post = get_post($postId);
1325
  }
1326
  $this->initFormMeta();
1327
+ $this->isUserCanSeeComments = true;
1328
  if ($currentUser && $currentUser->ID) {
1329
  if ($post->post_author && $post->post_author != $currentUser->ID && $currentUser->roles && is_array($currentUser->roles)) {
1330
  $this->generalOptions["roles_cannot_see_comments"] = isset($this->generalOptions["roles_cannot_see_comments"]) ? $this->generalOptions["roles_cannot_see_comments"] : [];
1331
  foreach ($currentUser->roles as $k => $role) {
1332
  if (in_array($role, $this->generalOptions["roles_cannot_see_comments"])) {
1333
  //Filter hook to add extra conditions in user role dependent restriction.
1334
+ $this->isUserCanSeeComments = apply_filters("wpdiscuz_user_role_can_see_comments", false, $role);
1335
  break;
1336
  }
1337
  }
1338
  }
1339
  } else {
1340
+ $this->isUserCanSeeComments = $this->generalOptions["guest_can_see_comments"] = isset($this->generalOptions["guest_can_see_comments"]) ? $this->generalOptions["guest_can_see_comments"] : 1;
1341
  }
1342
  return $this->isUserCanSeeComments;
1343
  }
1364
  }
1365
  }
1366
  } else {
1367
+ $this->generalOptions["guest_can_see_comments"] = isset($this->generalOptions["guest_can_see_comments"]) ? $this->generalOptions["guest_can_see_comments"] : 1;
1368
  $user_can_comment = $this->generalOptions["guest_can_see_comments"] && $this->generalOptions["guest_can_comment"];
1369
  }
1370
  if ($user_can_comment && class_exists("WooCommerce") && get_post_type($postId) === "product") {
1575
  foreach ($values as $rating => $count) {
1576
  $avg += $rating * $count;
1577
  $c += $count;
1578
+ }
1579
  update_post_meta($post_id, wpdFormConst::WPDISCUZ_RATING_SEPARATE_AVG . $key, ($c === 0 ? 0 : round($avg / $c, 1)));
1580
  update_post_meta($post_id, wpdFormConst::WPDISCUZ_RATING_SEPARATE_COUNT . $key, $c);
1581
+ }
1582
+ }
1583
 
1584
  }
options/class.WpdiscuzOptions.php CHANGED
@@ -2,1185 +2,1185 @@
2
 
3
  class WpdiscuzOptions implements WpDiscuzConstants {
4
 
5
- public $form = [];
6
- public $recaptcha = [];
7
- public $login = [];
8
- public $social = [];
9
- public $rating = [];
10
- public $thread_display = [];
11
- public $thread_layouts = [];
12
- public $thread_styles = [];
13
- public $subscription = [];
14
- public $labels = [];
15
- public $moderation = [];
16
- public $content = [];
17
- public $live = [];
18
- public $inline = [];
19
- public $general = [];
20
- public $wp = [];
21
- public $wmuUploadMaxFileSize;
22
- public $wmuPostMaxSize;
23
 
24
- /**
25
- * Type - HTML elements array
26
- * Available Values - Text
27
- * Description - Phrases for form elements texts
28
- * Default Value -
29
- */
30
- public $phrases;
31
 
32
- /**
33
- * helper class for database operations
34
- */
35
- public $dbManager;
36
 
37
- /* === CACHE === */
38
- public $isGoodbyeCaptchaActive;
39
- public $goodbyeCaptchaTocken;
40
- public $formContentTypeRel;
41
- public $formPostRel;
42
- private $addons;
43
- private $tips;
44
 
45
- public function __construct($dbManager) {
46
- $this->dbManager = $dbManager;
47
- $this->wmuUploadMaxFileSize = $this->getSizeInBytes(ini_get('upload_max_filesize'));
48
- $this->wmuPostMaxSize = $this->getSizeInBytes(ini_get('post_max_size'));
49
- $this->initAddons();
50
- $this->initTips();
51
- add_option(self::OPTION_SLUG_HASH_KEY, md5(time() . uniqid()), "", "no");
52
- $this->initPhrases();
53
- $this->addOptions();
54
- $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
55
- $this->wp["dateFormat"] = get_option("date_format");
56
- $this->wp["timeFormat"] = get_option("time_format");
57
- $this->wp["threadComments"] = get_option("thread_comments");
58
- $this->wp["threadCommentsDepth"] = get_option("thread_comments_depth");
59
- $this->wp["isPaginate"] = get_option("page_comments");
60
- $wordpressCommentOrder = strtolower(get_option("comment_order"));
61
- $this->wp["commentOrder"] = in_array($wordpressCommentOrder, ["asc", "desc",]) ? $wordpressCommentOrder : "desc";
62
- $this->wp["commentPerPage"] = get_option("comments_per_page");
63
- $this->wp["showAvatars"] = get_option("show_avatars");
64
- $this->wp["defaultCommentsPage"] = get_option("default_comments_page");
65
- $this->general["humanReadableNumbers"] = apply_filters("wpdiscuz_enable_human_readable_numbers", true);
66
- $this->initFormRelations();
67
- $this->initGoodbyeCaptchaField();
68
- add_action("init", [&$this, "initPhrasesOnLoad"], 2126);
69
- add_action("admin_init", [&$this, "saveAndResetOptionsAndPhrases"], 1);
70
- add_action("wp_ajax_dismiss_wpdiscuz_addon_note", [&$this, "dismissAddonNote"]);
71
- add_action("admin_notices", [&$this, "adminNotices"]);
72
- }
73
 
74
- public function initOptions($serialize_options) {
75
- $options = maybe_unserialize($serialize_options);
76
- $defaultOptions = $this->getDefaultOptions();
77
- /* form */
78
- $this->form["commentFormView"] = isset($options[self::TAB_FORM]["commentFormView"]) ? $options[self::TAB_FORM]["commentFormView"] : $defaultOptions[self::TAB_FORM]["commentFormView"];
79
- $this->form["enableDropAnimation"] = isset($options[self::TAB_FORM]["enableDropAnimation"]) ? $options[self::TAB_FORM]["enableDropAnimation"] : $defaultOptions[self::TAB_FORM]["enableDropAnimation"];
80
- $this->form["richEditor"] = isset($options[self::TAB_FORM]["richEditor"]) ? $options[self::TAB_FORM]["richEditor"] : $defaultOptions[self::TAB_FORM]["richEditor"];
81
- $this->form["boldButton"] = isset($options[self::TAB_FORM]["boldButton"]) ? $options[self::TAB_FORM]["boldButton"] : $defaultOptions[self::TAB_FORM]["boldButton"];
82
- $this->form["italicButton"] = isset($options[self::TAB_FORM]["italicButton"]) ? $options[self::TAB_FORM]["italicButton"] : $defaultOptions[self::TAB_FORM]["italicButton"];
83
- $this->form["underlineButton"] = isset($options[self::TAB_FORM]["underlineButton"]) ? $options[self::TAB_FORM]["underlineButton"] : $defaultOptions[self::TAB_FORM]["underlineButton"];
84
- $this->form["strikeButton"] = isset($options[self::TAB_FORM]["strikeButton"]) ? $options[self::TAB_FORM]["strikeButton"] : $defaultOptions[self::TAB_FORM]["strikeButton"];
85
- $this->form["olButton"] = isset($options[self::TAB_FORM]["olButton"]) ? $options[self::TAB_FORM]["olButton"] : $defaultOptions[self::TAB_FORM]["olButton"];
86
- $this->form["ulButton"] = isset($options[self::TAB_FORM]["ulButton"]) ? $options[self::TAB_FORM]["ulButton"] : $defaultOptions[self::TAB_FORM]["ulButton"];
87
- $this->form["blockquoteButton"] = isset($options[self::TAB_FORM]["blockquoteButton"]) ? $options[self::TAB_FORM]["blockquoteButton"] : $defaultOptions[self::TAB_FORM]["blockquoteButton"];
88
- $this->form["codeblockButton"] = isset($options[self::TAB_FORM]["codeblockButton"]) ? $options[self::TAB_FORM]["codeblockButton"] : $defaultOptions[self::TAB_FORM]["codeblockButton"];
89
- $this->form["linkButton"] = isset($options[self::TAB_FORM]["linkButton"]) ? $options[self::TAB_FORM]["linkButton"] : $defaultOptions[self::TAB_FORM]["linkButton"];
90
- $this->form["sourcecodeButton"] = isset($options[self::TAB_FORM]["sourcecodeButton"]) ? $options[self::TAB_FORM]["sourcecodeButton"] : $defaultOptions[self::TAB_FORM]["sourcecodeButton"];
91
- $this->form["spoilerButton"] = isset($options[self::TAB_FORM]["spoilerButton"]) ? $options[self::TAB_FORM]["spoilerButton"] : $defaultOptions[self::TAB_FORM]["spoilerButton"];
92
- $this->form["enableQuickTags"] = isset($options[self::TAB_FORM]["enableQuickTags"]) ? $options[self::TAB_FORM]["enableQuickTags"] : $defaultOptions[self::TAB_FORM]["enableQuickTags"];
93
- $this->form["commenterNameMinLength"] = isset($options[self::TAB_FORM]["commenterNameMinLength"]) ? $options[self::TAB_FORM]["commenterNameMinLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMinLength"];
94
- $this->form["commenterNameMaxLength"] = isset($options[self::TAB_FORM]["commenterNameMaxLength"]) ? $options[self::TAB_FORM]["commenterNameMaxLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMaxLength"];
95
- $this->form["storeCommenterData"] = isset($options[self::TAB_FORM]["storeCommenterData"]) ? $options[self::TAB_FORM]["storeCommenterData"] : $defaultOptions[self::TAB_FORM]["storeCommenterData"];
96
- /* recaptcha */
97
- $this->recaptcha["version"] = "2.0";
98
- $this->recaptcha["score"] = "";
99
- $this->recaptcha["siteKey"] = isset($options[self::TAB_RECAPTCHA]["siteKey"]) ? $options[self::TAB_RECAPTCHA]["siteKey"] : $defaultOptions[self::TAB_RECAPTCHA]["siteKey"];
100
- $this->recaptcha["secretKey"] = isset($options[self::TAB_RECAPTCHA]["secretKey"]) ? $options[self::TAB_RECAPTCHA]["secretKey"] : $defaultOptions[self::TAB_RECAPTCHA]["secretKey"];
101
- $this->recaptcha["theme"] = isset($options[self::TAB_RECAPTCHA]["theme"]) ? $options[self::TAB_RECAPTCHA]["theme"] : $defaultOptions[self::TAB_RECAPTCHA]["theme"];
102
- $this->recaptcha["lang"] = isset($options[self::TAB_RECAPTCHA]["lang"]) ? $options[self::TAB_RECAPTCHA]["lang"] : $defaultOptions[self::TAB_RECAPTCHA]["lang"];
103
- $this->recaptcha["requestMethod"] = isset($options[self::TAB_RECAPTCHA]["requestMethod"]) ? $options[self::TAB_RECAPTCHA]["requestMethod"] : $defaultOptions[self::TAB_RECAPTCHA]["requestMethod"];
104
- $this->recaptcha["showForGuests"] = isset($options[self::TAB_RECAPTCHA]["showForGuests"]) ? $options[self::TAB_RECAPTCHA]["showForGuests"] : $defaultOptions[self::TAB_RECAPTCHA]["showForGuests"];
105
- $this->recaptcha["showForUsers"] = isset($options[self::TAB_RECAPTCHA]["showForUsers"]) ? $options[self::TAB_RECAPTCHA]["showForUsers"] : $defaultOptions[self::TAB_RECAPTCHA]["showForUsers"];
106
- $this->recaptcha["isShowOnSubscribeForm"] = isset($options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? $options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"] : $defaultOptions[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"];
107
- $lang = $this->recaptcha["lang"] ? "&hl=" . $this->recaptcha["lang"] : "";
108
- $this->recaptcha["reCaptchaUrl"] = "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit$lang";
109
- /* login */
110
- $this->login["showLoggedInUsername"] = isset($options[self::TAB_LOGIN]["showLoggedInUsername"]) ? $options[self::TAB_LOGIN]["showLoggedInUsername"] : $defaultOptions[self::TAB_LOGIN]["showLoggedInUsername"];
111
- $this->login["showLoginLinkForGuests"] = isset($options[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? $options[self::TAB_LOGIN]["showLoginLinkForGuests"] : $defaultOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
112
- $this->login["showActivityTab"] = isset($options[self::TAB_LOGIN]["showActivityTab"]) ? $options[self::TAB_LOGIN]["showActivityTab"] : $defaultOptions[self::TAB_LOGIN]["showActivityTab"];
113
- $this->login["showSubscriptionsTab"] = isset($options[self::TAB_LOGIN]["showSubscriptionsTab"]) ? $options[self::TAB_LOGIN]["showSubscriptionsTab"] : $defaultOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
114
- $this->login["showFollowsTab"] = isset($options[self::TAB_LOGIN]["showFollowsTab"]) ? $options[self::TAB_LOGIN]["showFollowsTab"] : $defaultOptions[self::TAB_LOGIN]["showFollowsTab"];
115
- $this->login["enableProfileURLs"] = isset($options[self::TAB_LOGIN]["enableProfileURLs"]) ? $options[self::TAB_LOGIN]["enableProfileURLs"] : $defaultOptions[self::TAB_LOGIN]["enableProfileURLs"];
116
- $this->login["websiteAsProfileUrl"] = isset($options[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? $options[self::TAB_LOGIN]["websiteAsProfileUrl"] : $defaultOptions[self::TAB_LOGIN]["websiteAsProfileUrl"];
117
- $this->login["isUserByEmail"] = isset($options[self::TAB_LOGIN]["isUserByEmail"]) ? $options[self::TAB_LOGIN]["isUserByEmail"] : $defaultOptions[self::TAB_LOGIN]["isUserByEmail"];
118
- $this->login["loginUrl"] = isset($options[self::TAB_LOGIN]["loginUrl"]) ? $options[self::TAB_LOGIN]["loginUrl"] : $defaultOptions[self::TAB_LOGIN]["loginUrl"];
119
- /* social */
120
- $this->social["socialLoginAgreementCheckbox"] = isset($options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? $options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
121
- $this->social["socialLoginInSecondaryForm"] = isset($options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? $options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
122
- $this->social["displayIconOnAvatar"] = isset($options[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? $options[self::TAB_SOCIAL]["displayIconOnAvatar"] : $defaultOptions[self::TAB_SOCIAL]["displayIconOnAvatar"];
123
- $this->social["rememberLoggedinUser"] = isset($options[self::TAB_SOCIAL]["rememberLoggedinUser"]) ? $options[self::TAB_SOCIAL]["rememberLoggedinUser"] : $defaultOptions[self::TAB_SOCIAL]["rememberLoggedinUser"];
124
- // fb
125
- $this->social["enableFbLogin"] = isset($options[self::TAB_SOCIAL]["enableFbLogin"]) ? $options[self::TAB_SOCIAL]["enableFbLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableFbLogin"];
126
- $this->social["enableFbShare"] = isset($options[self::TAB_SOCIAL]["enableFbShare"]) ? $options[self::TAB_SOCIAL]["enableFbShare"] : $defaultOptions[self::TAB_SOCIAL]["enableFbShare"];
127
- $this->social["fbAppID"] = isset($options[self::TAB_SOCIAL]["fbAppID"]) ? $options[self::TAB_SOCIAL]["fbAppID"] : $defaultOptions[self::TAB_SOCIAL]["fbAppID"];
128
- $this->social["fbAppSecret"] = isset($options[self::TAB_SOCIAL]["fbAppSecret"]) ? $options[self::TAB_SOCIAL]["fbAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["fbAppSecret"];
129
- $this->social["fbUseOAuth2"] = isset($options[self::TAB_SOCIAL]["fbUseOAuth2"]) ? $options[self::TAB_SOCIAL]["fbUseOAuth2"] : $defaultOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
130
- // twitter
131
- $this->social["enableTwitterLogin"] = isset($options[self::TAB_SOCIAL]["enableTwitterLogin"]) ? $options[self::TAB_SOCIAL]["enableTwitterLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
132
- $this->social["enableTwitterShare"] = isset($options[self::TAB_SOCIAL]["enableTwitterShare"]) ? $options[self::TAB_SOCIAL]["enableTwitterShare"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterShare"];
133
- $this->social["twitterAppID"] = isset($options[self::TAB_SOCIAL]["twitterAppID"]) ? $options[self::TAB_SOCIAL]["twitterAppID"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppID"];
134
- $this->social["twitterAppSecret"] = isset($options[self::TAB_SOCIAL]["twitterAppSecret"]) ? $options[self::TAB_SOCIAL]["twitterAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppSecret"];
135
- // google
136
- $this->social["enableGoogleLogin"] = isset($options[self::TAB_SOCIAL]["enableGoogleLogin"]) ? $options[self::TAB_SOCIAL]["enableGoogleLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
137
- $this->social["googleClientID"] = isset($options[self::TAB_SOCIAL]["googleClientID"]) ? $options[self::TAB_SOCIAL]["googleClientID"] : $defaultOptions[self::TAB_SOCIAL]["googleClientID"];
138
- $this->social["googleClientSecret"] = isset($options[self::TAB_SOCIAL]["googleClientSecret"]) ? $options[self::TAB_SOCIAL]["googleClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["googleClientSecret"];
139
- // disqus
140
- $this->social["enableDisqusLogin"] = isset($options[self::TAB_SOCIAL]["enableDisqusLogin"]) ? $options[self::TAB_SOCIAL]["enableDisqusLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableDisqusLogin"];
141
- $this->social["disqusPublicKey"] = isset($options[self::TAB_SOCIAL]["disqusPublicKey"]) ? $options[self::TAB_SOCIAL]["disqusPublicKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusPublicKey"];
142
- $this->social["disqusSecretKey"] = isset($options[self::TAB_SOCIAL]["disqusSecretKey"]) ? $options[self::TAB_SOCIAL]["disqusSecretKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusSecretKey"];
143
- // wordpress
144
- $this->social["enableWordpressLogin"] = isset($options[self::TAB_SOCIAL]["enableWordpressLogin"]) ? $options[self::TAB_SOCIAL]["enableWordpressLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWordpressLogin"];
145
- $this->social["wordpressClientID"] = isset($options[self::TAB_SOCIAL]["wordpressClientID"]) ? $options[self::TAB_SOCIAL]["wordpressClientID"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientID"];
146
- $this->social["wordpressClientSecret"] = isset($options[self::TAB_SOCIAL]["wordpressClientSecret"]) ? $options[self::TAB_SOCIAL]["wordpressClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientSecret"];
147
- // instagram
148
- $this->social["enableInstagramLogin"] = isset($options[self::TAB_SOCIAL]["enableInstagramLogin"]) ? $options[self::TAB_SOCIAL]["enableInstagramLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableInstagramLogin"];
149
- $this->social["instagramAppID"] = isset($options[self::TAB_SOCIAL]["instagramAppID"]) ? $options[self::TAB_SOCIAL]["instagramAppID"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppID"];
150
- $this->social["instagramAppSecret"] = isset($options[self::TAB_SOCIAL]["instagramAppSecret"]) ? $options[self::TAB_SOCIAL]["instagramAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppSecret"];
151
- // linkedin
152
- $this->social["enableLinkedinLogin"] = isset($options[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? $options[self::TAB_SOCIAL]["enableLinkedinLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableLinkedinLogin"];
153
- $this->social["linkedinClientID"] = isset($options[self::TAB_SOCIAL]["linkedinClientID"]) ? $options[self::TAB_SOCIAL]["linkedinClientID"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientID"];
154
- $this->social["linkedinClientSecret"] = isset($options[self::TAB_SOCIAL]["linkedinClientSecret"]) ? $options[self::TAB_SOCIAL]["linkedinClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientSecret"];
155
- // whatsapp
156
- $this->social["enableWhatsappShare"] = isset($options[self::TAB_SOCIAL]["enableWhatsappShare"]) ? $options[self::TAB_SOCIAL]["enableWhatsappShare"] : $defaultOptions[self::TAB_SOCIAL]["enableWhatsappShare"];
157
- // yandex
158
- $this->social["enableYandexLogin"] = isset($options[self::TAB_SOCIAL]["enableYandexLogin"]) ? $options[self::TAB_SOCIAL]["enableYandexLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableYandexLogin"];
159
- $this->social["yandexID"] = isset($options[self::TAB_SOCIAL]["yandexID"]) ? $options[self::TAB_SOCIAL]["yandexID"] : $defaultOptions[self::TAB_SOCIAL]["yandexID"];
160
- $this->social["yandexPassword"] = isset($options[self::TAB_SOCIAL]["yandexPassword"]) ? $options[self::TAB_SOCIAL]["yandexPassword"] : $defaultOptions[self::TAB_SOCIAL]["yandexPassword"];
161
- // mail.ru
162
- $this->social["enableMailruLogin"] = isset($options[self::TAB_SOCIAL]["enableMailruLogin"]) ? $options[self::TAB_SOCIAL]["enableMailruLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableMailruLogin"];
163
- $this->social["mailruClientID"] = isset($options[self::TAB_SOCIAL]["mailruClientID"]) ? $options[self::TAB_SOCIAL]["mailruClientID"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientID"];
164
- $this->social["mailruClientSecret"] = isset($options[self::TAB_SOCIAL]["mailruClientSecret"]) ? $options[self::TAB_SOCIAL]["mailruClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientSecret"];
165
- // weibo
166
- $this->social["enableWeiboLogin"] = isset($options[self::TAB_SOCIAL]["enableWeiboLogin"]) ? $options[self::TAB_SOCIAL]["enableWeiboLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWeiboLogin"];
167
- $this->social["weiboKey"] = isset($options[self::TAB_SOCIAL]["weiboKey"]) ? $options[self::TAB_SOCIAL]["weiboKey"] : $defaultOptions[self::TAB_SOCIAL]["weiboKey"];
168
- $this->social["weiboSecret"] = isset($options[self::TAB_SOCIAL]["weiboSecret"]) ? $options[self::TAB_SOCIAL]["weiboSecret"] : $defaultOptions[self::TAB_SOCIAL]["weiboSecret"];
169
- // wechat
170
- $this->social["enableWechatLogin"] = isset($options[self::TAB_SOCIAL]["enableWechatLogin"]) ? $options[self::TAB_SOCIAL]["enableWechatLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWechatLogin"];
171
- $this->social["wechatAppID"] = isset($options[self::TAB_SOCIAL]["wechatAppID"]) ? $options[self::TAB_SOCIAL]["wechatAppID"] : $defaultOptions[self::TAB_SOCIAL]["wechatAppID"];
172
- $this->social["wechatSecret"] = isset($options[self::TAB_SOCIAL]["wechatSecret"]) ? $options[self::TAB_SOCIAL]["wechatSecret"] : $defaultOptions[self::TAB_SOCIAL]["wechatSecret"];
173
- // qq
174
- $this->social["enableQQLogin"] = isset($options[self::TAB_SOCIAL]["enableQQLogin"]) ? $options[self::TAB_SOCIAL]["enableQQLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableQQLogin"];
175
- $this->social["qqAppID"] = isset($options[self::TAB_SOCIAL]["qqAppID"]) ? $options[self::TAB_SOCIAL]["qqAppID"] : $defaultOptions[self::TAB_SOCIAL]["qqAppID"];
176
- $this->social["qqSecret"] = isset($options[self::TAB_SOCIAL]["qqSecret"]) ? $options[self::TAB_SOCIAL]["qqSecret"] : $defaultOptions[self::TAB_SOCIAL]["qqSecret"];
177
- // baidu
178
- $this->social["enableBaiduLogin"] = isset($options[self::TAB_SOCIAL]["enableBaiduLogin"]) ? $options[self::TAB_SOCIAL]["enableBaiduLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableBaiduLogin"];
179
- $this->social["baiduAppID"] = isset($options[self::TAB_SOCIAL]["baiduAppID"]) ? $options[self::TAB_SOCIAL]["baiduAppID"] : $defaultOptions[self::TAB_SOCIAL]["baiduAppID"];
180
- $this->social["baiduSecret"] = isset($options[self::TAB_SOCIAL]["baiduSecret"]) ? $options[self::TAB_SOCIAL]["baiduSecret"] : $defaultOptions[self::TAB_SOCIAL]["baiduSecret"];
181
- // vk
182
- $this->social["enableVkLogin"] = isset($options[self::TAB_SOCIAL]["enableVkLogin"]) ? $options[self::TAB_SOCIAL]["enableVkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableVkLogin"];
183
- $this->social["enableVkShare"] = isset($options[self::TAB_SOCIAL]["enableVkShare"]) ? $options[self::TAB_SOCIAL]["enableVkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableVkShare"];
184
- $this->social["vkAppID"] = isset($options[self::TAB_SOCIAL]["vkAppID"]) ? $options[self::TAB_SOCIAL]["vkAppID"] : $defaultOptions[self::TAB_SOCIAL]["vkAppID"];
185
- $this->social["vkAppSecret"] = isset($options[self::TAB_SOCIAL]["vkAppSecret"]) ? $options[self::TAB_SOCIAL]["vkAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["vkAppSecret"];
186
- // ok
187
- $this->social["enableOkLogin"] = isset($options[self::TAB_SOCIAL]["enableOkLogin"]) ? $options[self::TAB_SOCIAL]["enableOkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableOkLogin"];
188
- $this->social["enableOkShare"] = isset($options[self::TAB_SOCIAL]["enableOkShare"]) ? $options[self::TAB_SOCIAL]["enableOkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableOkShare"];
189
- $this->social["okAppID"] = isset($options[self::TAB_SOCIAL]["okAppID"]) ? $options[self::TAB_SOCIAL]["okAppID"] : $defaultOptions[self::TAB_SOCIAL]["okAppID"];
190
- $this->social["okAppKey"] = isset($options[self::TAB_SOCIAL]["okAppKey"]) ? $options[self::TAB_SOCIAL]["okAppKey"] : $defaultOptions[self::TAB_SOCIAL]["okAppKey"];
191
- $this->social["okAppSecret"] = isset($options[self::TAB_SOCIAL]["okAppSecret"]) ? $options[self::TAB_SOCIAL]["okAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["okAppSecret"];
192
- /* rating */
193
- $this->rating["enablePostRatingSchema"] = isset($options[self::TAB_RATING]["enablePostRatingSchema"]) ? $options[self::TAB_RATING]["enablePostRatingSchema"] : $defaultOptions[self::TAB_RATING]["enablePostRatingSchema"];
194
- $this->rating["displayRatingOnPost"] = isset($options[self::TAB_RATING]["displayRatingOnPost"]) ? $options[self::TAB_RATING]["displayRatingOnPost"] : $defaultOptions[self::TAB_RATING]["displayRatingOnPost"];
195
- $this->rating["ratingCssOnNoneSingular"] = isset($options[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? $options[self::TAB_RATING]["ratingCssOnNoneSingular"] : $defaultOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
196
- $this->rating["ratingHoverColor"] = isset($options[self::TAB_RATING]["ratingHoverColor"]) ? $options[self::TAB_RATING]["ratingHoverColor"] : $defaultOptions[self::TAB_RATING]["ratingHoverColor"];
197
- $this->rating["ratingInactiveColor"] = isset($options[self::TAB_RATING]["ratingInactiveColor"]) ? $options[self::TAB_RATING]["ratingInactiveColor"] : $defaultOptions[self::TAB_RATING]["ratingInactiveColor"];
198
- $this->rating["ratingActiveColor"] = isset($options[self::TAB_RATING]["ratingActiveColor"]) ? $options[self::TAB_RATING]["ratingActiveColor"] : $defaultOptions[self::TAB_RATING]["ratingActiveColor"];
199
- /* thread_display */
200
- $this->thread_display["firstLoadWithAjax"] = isset($options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? $options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"];
201
- $this->thread_display["commentListLoadType"] = isset($options[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? $options[self::TAB_THREAD_DISPLAY]["commentListLoadType"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
202
- $this->thread_display["isLoadOnlyParentComments"] = isset($options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? $options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
203
- $this->thread_display["showReactedFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"];
204
- $this->thread_display["showHottestFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"];
205
- $this->thread_display["showSortingButtons"] = isset($options[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? $options[self::TAB_THREAD_DISPLAY]["showSortingButtons"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
206
- $this->thread_display["mostVotedByDefault"] = isset($options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? $options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
207
- $this->thread_display["reverseChildren"] = isset($options[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? $options[self::TAB_THREAD_DISPLAY]["reverseChildren"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
208
- $this->thread_display["highlightUnreadComments"] = isset($options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? $options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
209
- $this->thread_display["scrollToComment"] = isset($options[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? $options[self::TAB_THREAD_DISPLAY]["scrollToComment"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["scrollToComment"];
210
- $this->thread_display["orderCommentsBy"] = isset($options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) ? $options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["orderCommentsBy"];
211
- /* thread_layouts */
212
- $this->thread_layouts["showCommentLink"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentLink"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentLink"];
213
- $this->thread_layouts["showCommentDate"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentDate"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
214
- $this->thread_layouts["showVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
215
- $this->thread_layouts["votingButtonsIcon"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
216
- $this->thread_layouts["votingButtonsStyle"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
217
- $this->thread_layouts["enableDislikeButton"] = isset($options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? $options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"];
218
- $this->thread_layouts["isGuestCanVote"] = isset($options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? $options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
219
- $this->thread_layouts["highlightVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"];
220
- $this->thread_layouts["showAvatars"] = isset($options[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? $options[self::TAB_THREAD_LAYOUTS]["showAvatars"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showAvatars"];
221
- $this->thread_layouts["defaultAvatarUrlForUser"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"];
222
- $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"];
223
- $this->thread_layouts["changeAvatarsEverywhere"] = isset($options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? $options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"];
224
- /* thread_styles */
225
- $this->thread_styles["theme"] = isset($options[self::TAB_THREAD_STYLES]["theme"]) ? $options[self::TAB_THREAD_STYLES]["theme"] : $defaultOptions[self::TAB_THREAD_STYLES]["theme"];
226
- $this->thread_styles["primaryColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryColor"];
227
- $this->thread_styles["newLoadedCommentBGColor"] = isset($options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? $options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
228
- $this->thread_styles["primaryButtonColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
229
- $this->thread_styles["primaryButtonBG"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
230
- $this->thread_styles["bubbleColors"] = isset($options[self::TAB_THREAD_STYLES]["bubbleColors"]) ? $options[self::TAB_THREAD_STYLES]["bubbleColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["bubbleColors"];
231
- $this->thread_styles["inlineFeedbackColors"] = isset($options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? $options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["inlineFeedbackColors"];
232
- $this->thread_styles["defaultCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"];
233
- $this->thread_styles["defaultCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentTextColor"];
234
- $this->thread_styles["defaultCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"];
235
- $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"];
236
- $this->thread_styles["defaultCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"];
237
- $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"];
238
- $this->thread_styles["darkCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentAreaBG"];
239
- $this->thread_styles["darkCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentTextColor"];
240
- $this->thread_styles["darkCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"];
241
- $this->thread_styles["darkCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"];
242
- $this->thread_styles["darkCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"];
243
- $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"];
244
- $this->thread_styles["commentTextSize"] = isset($options[self::TAB_THREAD_STYLES]["commentTextSize"]) ? $options[self::TAB_THREAD_STYLES]["commentTextSize"] : $defaultOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
245
- $this->thread_styles["enableFontAwesome"] = isset($options[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? $options[self::TAB_THREAD_STYLES]["enableFontAwesome"] : $defaultOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
246
- $this->thread_styles["customCss"] = isset($options[self::TAB_THREAD_STYLES]["customCss"]) ? $options[self::TAB_THREAD_STYLES]["customCss"] : $defaultOptions[self::TAB_THREAD_STYLES]["customCss"];
247
- /* subscription */
248
- $this->subscription["enableUserMentioning"] = isset($options[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? $options[self::TAB_SUBSCRIPTION]["enableUserMentioning"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableUserMentioning"];
249
- $this->subscription["sendMailToMentionedUsers"] = isset($options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? $options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"];
250
- $this->subscription["isNotifyOnCommentApprove"] = isset($options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? $options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
251
- $this->subscription["enableMemberConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
252
- $this->subscription["enableGuestsConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
253
- $this->subscription["subscriptionType"] = isset($options[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? $options[self::TAB_SUBSCRIPTION]["subscriptionType"] : $defaultOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
254
- $this->subscription["showReplyCheckbox"] = isset($options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? $options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] : $defaultOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
255
- $this->subscription["isReplyDefaultChecked"] = isset($options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? $options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
256
- $this->subscription["usePostmaticForCommentNotification"] = isset($options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? $options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] : $defaultOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
257
- $this->subscription["isFollowActive"] = isset($options[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? $options[self::TAB_SUBSCRIPTION]["isFollowActive"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
258
- $this->subscription["disableFollowConfirmForUsers"] = isset($options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? $options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
259
- /* labels */
260
- $this->labels["blogRoleLabels"] = isset($options[self::TAB_LABELS]["blogRoleLabels"]) ? $options[self::TAB_LABELS]["blogRoleLabels"] : $defaultOptions[self::TAB_LABELS]["blogRoleLabels"];
261
- $this->labels["blogRoles"] = isset($options[self::TAB_LABELS]["blogRoles"]) ? $options[self::TAB_LABELS]["blogRoles"] : $defaultOptions[self::TAB_LABELS]["blogRoles"];
262
- /* moderation */
263
- $this->moderation["commentEditableTime"] = isset($options[self::TAB_MODERATION]["commentEditableTime"]) ? $options[self::TAB_MODERATION]["commentEditableTime"] : $defaultOptions[self::TAB_MODERATION]["commentEditableTime"];
264
- $this->moderation["enableEditingWhenHaveReplies"] = isset($options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? $options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"] : $defaultOptions[self::TAB_MODERATION]["enableEditingWhenHaveReplies"];
265
- $this->moderation["displayEditingInfo"] = isset($options[self::TAB_MODERATION]["displayEditingInfo"]) ? $options[self::TAB_MODERATION]["displayEditingInfo"] : $defaultOptions[self::TAB_MODERATION]["displayEditingInfo"];
266
- $this->moderation["enableStickButton"] = isset($options[self::TAB_MODERATION]["enableStickButton"]) ? $options[self::TAB_MODERATION]["enableStickButton"] : $defaultOptions[self::TAB_MODERATION]["enableStickButton"];
267
- $this->moderation["enableCloseButton"] = isset($options[self::TAB_MODERATION]["enableCloseButton"]) ? $options[self::TAB_MODERATION]["enableCloseButton"] : $defaultOptions[self::TAB_MODERATION]["enableCloseButton"];
268
- $this->moderation["restrictCommentingPerUser"] = isset($options[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? $options[self::TAB_MODERATION]["restrictCommentingPerUser"] : $defaultOptions[self::TAB_MODERATION]["restrictCommentingPerUser"];
269
- $this->moderation["commentRestrictionType"] = isset($options[self::TAB_MODERATION]["commentRestrictionType"]) ? $options[self::TAB_MODERATION]["commentRestrictionType"] : $defaultOptions[self::TAB_MODERATION]["commentRestrictionType"];
270
- $this->moderation["userCommentsLimit"] = isset($options[self::TAB_MODERATION]["userCommentsLimit"]) ? $options[self::TAB_MODERATION]["userCommentsLimit"] : $defaultOptions[self::TAB_MODERATION]["userCommentsLimit"];
271
- /* content */
272
- $this->content["commentTextMinLength"] = isset($options[self::TAB_CONTENT]["commentTextMinLength"]) ? $options[self::TAB_CONTENT]["commentTextMinLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMinLength"];
273
- $this->content["replyTextMinLength"] = isset($options[self::TAB_CONTENT]["replyTextMinLength"]) ? $options[self::TAB_CONTENT]["replyTextMinLength"] : $defaultOptions[self::TAB_CONTENT]["replyTextMinLength"];
274
- $this->content["commentTextMaxLength"] = isset($options[self::TAB_CONTENT]["commentTextMaxLength"]) ? $options[self::TAB_CONTENT]["commentTextMaxLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMaxLength"];
275
- $this->content["replyTextMaxLength"] = isset($options[self::TAB_CONTENT]["replyTextMaxLength"]) ? $options[self::TAB_CONTENT]["replyTextMaxLength"] : $defaultOptions[self::TAB_CONTENT]["replyTextMaxLength"];
276
- $this->content["enableImageConversion"] = isset($options[self::TAB_CONTENT]["enableImageConversion"]) ? $options[self::TAB_CONTENT]["enableImageConversion"] : $defaultOptions[self::TAB_CONTENT]["enableImageConversion"];
277
- $this->content["enableShortcodes"] = isset($options[self::TAB_CONTENT]["enableShortcodes"]) ? $options[self::TAB_CONTENT]["enableShortcodes"] : $defaultOptions[self::TAB_CONTENT]["enableShortcodes"];
278
- $this->content["commentReadMoreLimit"] = isset($options[self::TAB_CONTENT]["commentReadMoreLimit"]) ? $options[self::TAB_CONTENT]["commentReadMoreLimit"] : $defaultOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
279
- $this->content["wmuIsEnabled"] = isset($options[self::TAB_CONTENT]["wmuIsEnabled"]) ? $options[self::TAB_CONTENT]["wmuIsEnabled"] : $defaultOptions[self::TAB_CONTENT]["wmuIsEnabled"];
280
- $this->content["wmuIsGuestAllowed"] = isset($options[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? $options[self::TAB_CONTENT]["wmuIsGuestAllowed"] : $defaultOptions[self::TAB_CONTENT]["wmuIsGuestAllowed"];
281
- $this->content["wmuIsLightbox"] = isset($options[self::TAB_CONTENT]["wmuIsLightbox"]) ? $options[self::TAB_CONTENT]["wmuIsLightbox"] : $defaultOptions[self::TAB_CONTENT]["wmuIsLightbox"];
282
- $this->content["wmuMimeTypes"] = isset($options[self::TAB_CONTENT]["wmuMimeTypes"]) ? $options[self::TAB_CONTENT]["wmuMimeTypes"] : $defaultOptions[self::TAB_CONTENT]["wmuMimeTypes"];
283
- $this->content["wmuMaxFileSize"] = isset($options[self::TAB_CONTENT]["wmuMaxFileSize"]) ? $options[self::TAB_CONTENT]["wmuMaxFileSize"] : $defaultOptions[self::TAB_CONTENT]["wmuMaxFileSize"];
284
- $this->content["wmuIsShowFilesDashboard"] = isset($options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? $options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"] : $defaultOptions[self::TAB_CONTENT]["wmuIsShowFilesDashboard"];
285
- $this->content["wmuSingleImageWidth"] = isset($options[self::TAB_CONTENT]["wmuSingleImageWidth"]) ? $options[self::TAB_CONTENT]["wmuSingleImageWidth"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageWidth"];
286
- $this->content["wmuSingleImageHeight"] = isset($options[self::TAB_CONTENT]["wmuSingleImageHeight"]) ? $options[self::TAB_CONTENT]["wmuSingleImageHeight"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageHeight"];
287
- $this->content["wmuImageSizes"] = isset($options[self::TAB_CONTENT]["wmuImageSizes"]) ? array_filter($options[self::TAB_CONTENT]["wmuImageSizes"]) : $defaultOptions[self::TAB_CONTENT]["wmuImageSizes"];
288
- /* live */
289
- $this->live["enableBubble"] = isset($options[self::TAB_LIVE]["enableBubble"]) ? $options[self::TAB_LIVE]["enableBubble"] : $defaultOptions[self::TAB_LIVE]["enableBubble"];
290
- $this->live["bubbleLiveUpdate"] = isset($options[self::TAB_LIVE]["bubbleLiveUpdate"]) ? $options[self::TAB_LIVE]["bubbleLiveUpdate"] : $defaultOptions[self::TAB_LIVE]["bubbleLiveUpdate"];
291
- $this->live["bubbleLocation"] = isset($options[self::TAB_LIVE]["bubbleLocation"]) ? $options[self::TAB_LIVE]["bubbleLocation"] : $defaultOptions[self::TAB_LIVE]["bubbleLocation"];
292
- $this->live["bubbleShowNewCommentMessage"] = isset($options[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? $options[self::TAB_LIVE]["bubbleShowNewCommentMessage"] : $defaultOptions[self::TAB_LIVE]["bubbleShowNewCommentMessage"];
293
- $this->live["bubbleHintTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintTimeout"];
294
- $this->live["bubbleHintHideTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintHideTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintHideTimeout"];
295
- $this->live["commentListUpdateType"] = isset($options[self::TAB_LIVE]["commentListUpdateType"]) ? $options[self::TAB_LIVE]["commentListUpdateType"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateType"];
296
- $this->live["liveUpdateGuests"] = isset($options[self::TAB_LIVE]["liveUpdateGuests"]) ? $options[self::TAB_LIVE]["liveUpdateGuests"] : $defaultOptions[self::TAB_LIVE]["liveUpdateGuests"];
297
- $this->live["commentListUpdateTimer"] = isset($options[self::TAB_LIVE]["commentListUpdateTimer"]) ? $options[self::TAB_LIVE]["commentListUpdateTimer"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateTimer"];
298
- /* inline */
299
- $this->inline["showInlineFilterButton"] = isset($options[self::TAB_INLINE]["showInlineFilterButton"]) ? $options[self::TAB_INLINE]["showInlineFilterButton"] : $defaultOptions[self::TAB_INLINE]["showInlineFilterButton"];
300
- $this->inline["inlineFeedbackAttractionType"] = isset($options[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? $options[self::TAB_INLINE]["inlineFeedbackAttractionType"] : $defaultOptions[self::TAB_INLINE]["inlineFeedbackAttractionType"];
301
- /* general */
302
- $this->general["isEnableOnHome"] = isset($options[self::TAB_GENERAL]["isEnableOnHome"]) ? $options[self::TAB_GENERAL]["isEnableOnHome"] : $defaultOptions[self::TAB_GENERAL]["isEnableOnHome"];
303
- $this->general["isNativeAjaxEnabled"] = isset($options[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? $options[self::TAB_GENERAL]["isNativeAjaxEnabled"] : $defaultOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
304
- $this->general["loadComboVersion"] = isset($options[self::TAB_GENERAL]["loadComboVersion"]) ? $options[self::TAB_GENERAL]["loadComboVersion"] : $defaultOptions[self::TAB_GENERAL]["loadComboVersion"];
305
- $this->general["loadMinVersion"] = isset($options[self::TAB_GENERAL]["loadMinVersion"]) ? $options[self::TAB_GENERAL]["loadMinVersion"] : $defaultOptions[self::TAB_GENERAL]["loadMinVersion"];
306
- $this->general["commentLinkFilter"] = isset($options[self::TAB_GENERAL]["commentLinkFilter"]) ? $options[self::TAB_GENERAL]["commentLinkFilter"] : $defaultOptions[self::TAB_GENERAL]["commentLinkFilter"];
307
- $this->general["redirectPage"] = isset($options[self::TAB_GENERAL]["redirectPage"]) ? $options[self::TAB_GENERAL]["redirectPage"] : $defaultOptions[self::TAB_GENERAL]["redirectPage"];
308
- $this->general["simpleCommentDate"] = isset($options[self::TAB_GENERAL]["simpleCommentDate"]) ? $options[self::TAB_GENERAL]["simpleCommentDate"] : $defaultOptions[self::TAB_GENERAL]["simpleCommentDate"];
309
- $this->general["dateDiffFormat"] = isset($options[self::TAB_GENERAL]["dateDiffFormat"]) ? $options[self::TAB_GENERAL]["dateDiffFormat"] : $defaultOptions[self::TAB_GENERAL]["dateDiffFormat"];
310
- $this->general["isUsePoMo"] = isset($options[self::TAB_GENERAL]["isUsePoMo"]) ? $options[self::TAB_GENERAL]["isUsePoMo"] : $defaultOptions[self::TAB_GENERAL]["isUsePoMo"];
311
- $this->general["showPluginPoweredByLink"] = isset($options[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? $options[self::TAB_GENERAL]["showPluginPoweredByLink"] : $defaultOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
312
- $this->general["isCacheEnabled"] = isset($options[self::TAB_GENERAL]["isCacheEnabled"]) ? $options[self::TAB_GENERAL]["isCacheEnabled"] : $defaultOptions[self::TAB_GENERAL]["isCacheEnabled"];
313
- $this->general["cacheTimeout"] = isset($options[self::TAB_GENERAL]["cacheTimeout"]) ? $options[self::TAB_GENERAL]["cacheTimeout"] : $defaultOptions[self::TAB_GENERAL]["cacheTimeout"];
314
- do_action("wpdiscuz_init_options", $this);
315
- }
316
 
317
- /**
318
- * initialize default phrases
319
- */
320
- public function initPhrases() {
321
- $this->phrases = [
322
- "wc_be_the_first_text" => esc_html__("Be the First to Comment!", "wpdiscuz"),
323
- "wc_comment_start_text" => esc_html__("Start the discussion", "wpdiscuz"),
324
- "wc_comment_join_text" => esc_html__("Join the discussion", "wpdiscuz"),
325
- "wc_most_reacted_comment" => esc_html__("Most reacted comment", "wpdiscuz"),
326
- "wc_hottest_comment_thread" => esc_html__("Hottest comment thread", "wpdiscuz"),
327
- "wc_inline_comments" => esc_html__("Inline Comments", "wpdiscuz"),
328
- "wc_email_text" => esc_html__("Email", "wpdiscuz"),
329
- "wc_subscribe_anchor" => esc_html__("Subscribe", "wpdiscuz"),
330
- "wc_notify_of" => esc_html__("Notify of", "wpdiscuz"),
331
- "wc_notify_on_new_comment" => esc_html__("new follow-up comments", "wpdiscuz"),
332
- "wc_notify_on_all_new_reply" => esc_html__("new replies to my comments", "wpdiscuz"),
333
- "wc_notify_on_new_reply" => esc_html__("Notify of new replies to this comment", "wpdiscuz"),
334
- "wc_sort_by" => esc_html__("Sort by", "wpdiscuz"),
335
- "wc_newest" => esc_html__("Newest", "wpdiscuz"),
336
- "wc_oldest" => esc_html__("Oldest", "wpdiscuz"),
337
- "wc_most_voted" => esc_html__("Most Voted", "wpdiscuz"),
338
- "wc_load_more_submit_text" => esc_html__("Load More Comments", "wpdiscuz"),
339
- "wc_load_rest_comments_submit_text" => esc_html__("Load Rest of Comments", "wpdiscuz"),
340
- "wc_reply_text" => esc_html__("Reply", "wpdiscuz"),
341
- "wc_share_text" => esc_html__("Share", "wpdiscuz"),
342
- "wc_edit_text" => esc_html__("Edit", "wpdiscuz"),
343
- "wc_share_facebook" => esc_html__("Share On Facebook", "wpdiscuz"),
344
- "wc_share_twitter" => esc_html__("Share On Twitter", "wpdiscuz"),
345
- "wc_share_whatsapp" => esc_html__("Share On WhatsApp", "wpdiscuz"),
346
- "wc_share_vk" => esc_html__("Share On VKontakte", "wpdiscuz"),
347
- "wc_share_ok" => esc_html__("Share On Odnoklassniki", "wpdiscuz"),
348
- "wc_hide_replies_text" => esc_html__("Hide Replies", "wpdiscuz"),
349
- "wc_show_replies_text" => esc_html__("View Replies", "wpdiscuz"),
350
- "wc_email_subject" => esc_html__("New Comment", "wpdiscuz"),
351
- "wc_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new comment has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
352
- "wc_all_comment_new_reply_subject" => esc_html__("New Reply", "wpdiscuz"),
353
- "wc_all_comment_new_reply_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
354
- "wc_new_reply_email_subject" => esc_html__("New Reply", "wpdiscuz"),
355
- "wc_new_reply_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
356
- "wc_subscribed_on_comment" => esc_html__("You're subscribed for new replies on this comment", "wpdiscuz"),
357
- "wc_subscribed_on_all_comment" => esc_html__("You're subscribed for new replies on all your comments", "wpdiscuz"),
358
- "wc_subscribed_on_post" => esc_html__("You're subscribed for new follow-up comments on this post", "wpdiscuz"),
359
- "wc_unsubscribe" => esc_html__("Unsubscribe", "wpdiscuz"),
360
- "wc_ignore_subscription" => esc_html__("Cancel subscription", "wpdiscuz"),
361
- "wc_unsubscribe_message" => esc_html__("You've successfully unsubscribed.", "wpdiscuz"),
362
- "wc_subscribe_message" => esc_html__("You've successfully subscribed.", "wpdiscuz"),
363
- "wc_confirm_email" => esc_html__("Confirm your subscription", "wpdiscuz"),
364
- "wc_comfirm_success_message" => esc_html__("You've successfully confirmed your subscription.", "wpdiscuz"),
365
- "wc_confirm_email_subject" => esc_html__("Subscription Confirmation", "wpdiscuz"),
366
- "wc_confirm_email_message" => __("Hi, <br/> You just subscribed for new comments on our website. This means you will receive an email when new comments are posted according to subscription option you've chosen. <br/> To activate, click confirm below. If you believe this is an error, ignore this message and we'll never bother you again. <br/><br/><a href='[POST_URL]'>[POST_TITLE]</a><br/><br/><a href='[CONFIRM_URL]'>Confirm Your Subscription</a><br/><br/><a href='[CANCEL_URL]'>Cancel Subscription</a>", "wpdiscuz"),
367
- "wc_error_empty_text" => esc_html__("please fill out this field to comment", "wpdiscuz"),
368
- "wc_error_email_text" => esc_html__("email address is invalid", "wpdiscuz"),
369
- "wc_error_url_text" => esc_html__("url is invalid", "wpdiscuz"),
370
- "wc_year_text" => esc_html__("year", "wpdiscuz"),
371
- "wc_year_text_plural" => esc_html__("years", "wpdiscuz"), // PLURAL
372
- "wc_month_text" => esc_html__("month", "wpdiscuz"),
373
- "wc_month_text_plural" => esc_html__("months", "wpdiscuz"), // PLURAL
374
- "wc_day_text" => esc_html__("day", "wpdiscuz"),
375
- "wc_day_text_plural" => esc_html__("days", "wpdiscuz"), // PLURAL
376
- "wc_hour_text" => esc_html__("hour", "wpdiscuz"),
377
- "wc_hour_text_plural" => esc_html__("hours", "wpdiscuz"), // PLURAL
378
- "wc_minute_text" => esc_html__("minute", "wpdiscuz"),
379
- "wc_minute_text_plural" => esc_html__("minutes", "wpdiscuz"), // PLURAL
380
- "wc_second_text" => esc_html__("second", "wpdiscuz"),
381
- "wc_second_text_plural" => esc_html__("seconds", "wpdiscuz"), // PLURAL
382
- "wc_right_now_text" => esc_html__("right now", "wpdiscuz"),
383
- "wc_ago_text" => esc_html__("ago", "wpdiscuz"),
384
- "wc_you_must_be_text" => esc_html__("You must be", "wpdiscuz"),
385
- "wc_logged_in_as" => esc_html__("You are logged in as", "wpdiscuz"),
386
- "wc_log_in" => esc_html__("Login", "wpdiscuz"),
387
- "wc_login_please" => esc_html__("Please %s to comment", "wpdiscuz"),
388
- "wc_log_out" => esc_html__("Log out", "wpdiscuz"),
389
- "wc_logged_in_text" => esc_html__("logged in", "wpdiscuz"),
390
- "wc_to_post_comment_text" => esc_html__("to post a comment.", "wpdiscuz"),
391
- "wc_vote_up" => esc_html__("Vote Up", "wpdiscuz"),
392
- "wc_vote_down" => esc_html__("Vote Down", "wpdiscuz"),
393
- "wc_vote_counted" => esc_html__("Vote Counted", "wpdiscuz"),
394
- "wc_vote_only_one_time" => esc_html__("You've already voted for this comment", "wpdiscuz"),
395
- "wc_voting_error" => esc_html__("Voting Error", "wpdiscuz"),
396
- "wc_login_to_vote" => esc_html__("You Must Be Logged In To Vote", "wpdiscuz"),
397
- "wc_self_vote" => esc_html__("You cannot vote for your comment", "wpdiscuz"),
398
- "wc_deny_voting_from_same_ip" => esc_html__("You are not allowed to vote for this comment", "wpdiscuz"),
399
- "wc_invalid_captcha" => esc_html__("Invalid Captcha Code", "wpdiscuz"),
400
- "wc_invalid_field" => esc_html__("Some of field value is invalid", "wpdiscuz"),
401
- "wc_awaiting_for_approval" => esc_html__("Awaiting for approval", "wpdiscuz"),
402
- "wc_comment_not_updated" => esc_html__("Sorry, the comment was not updated", "wpdiscuz"),
403
- "wc_comment_edit_not_possible" => esc_html__("Sorry, this comment is no longer possible to edit", "wpdiscuz"),
404
- "wc_comment_not_edited" => esc_html__("You've not made any changes", "wpdiscuz"),
405
- "wc_comment_edit_save_button" => esc_html__("Save", "wpdiscuz"),
406
- "wc_comment_edit_cancel_button" => esc_html__("Cancel", "wpdiscuz"),
407
- "wc_msg_input_min_length" => esc_html__("Input is too short", "wpdiscuz"),
408
- "wc_msg_input_max_length" => esc_html__("Input is too long", "wpdiscuz"),
409
- "wc_read_more" => esc_html__("Read more &raquo;", "wpdiscuz"),
410
- "wc_anonymous" => esc_html__("Anonymous", "wpdiscuz"),
411
- "wc_msg_required_fields" => esc_html__("Please fill out required fields", "wpdiscuz"),
412
- "wc_connect_with" => esc_html__("Connect with", "wpdiscuz"),
413
- "wc_subscribed_to" => esc_html__("You're subscribed to", "wpdiscuz"),
414
- "wc_postmatic_subscription_label" => esc_html__("Participate in this discussion via email", "wpdiscuz"),
415
- "wc_form_subscription_submit" => esc_html__("&rsaquo;", "wpdiscuz"),
416
- "wc_comment_approved_email_subject" => esc_html__("Your comment is approved!", "wpdiscuz"),
417
- "wc_comment_approved_email_message" => __('Hi [COMMENT_AUTHOR],<br/><br/>your comment was approved.<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]', "wpdiscuz"),
418
- "wc_roles_cannot_comment_message" => esc_html__("Comments are closed.", "wpdiscuz"),
419
- "wc_stick_comment_btn_title" => esc_html__("Stick this comment", "wpdiscuz"),
420
- "wc_stick_comment" => esc_html__("Stick", "wpdiscuz"),
421
- "wc_unstick_comment" => esc_html__("Unstick", "wpdiscuz"),
422
- "wc_sticky_comment_icon_title" => esc_html__("Sticky Comment Thread", "wpdiscuz"),
423
- "wc_close_comment_btn_title" => esc_html__("Close this thread", "wpdiscuz"),
424
- "wc_close_comment" => esc_html__("Close", "wpdiscuz"),
425
- "wc_open_comment" => esc_html__("Open", "wpdiscuz"),
426
- "wc_closed_comment_icon_title" => esc_html__("Closed Comment Thread", "wpdiscuz"),
427
- "wc_social_login_agreement_label" => esc_html__("I allow to create an account", "wpdiscuz"),
428
- "wc_social_login_agreement_desc" => esc_html__("When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.", "wpdiscuz"),
429
- "wc_agreement_button_disagree" => esc_html__("Disagree", "wpdiscuz"),
430
- "wc_agreement_button_agree" => esc_html__("Agree", "wpdiscuz"),
431
- "wc_content_and_settings" => esc_html__("My content and settings", "wpdiscuz"),
432
- "wc_user_settings_activity" => esc_html__("Activity", "wpdiscuz"),
433
- "wc_user_settings_subscriptions" => esc_html__("Subscriptions", "wpdiscuz"),
434
- "wc_user_settings_follows" => esc_html__("Follows", "wpdiscuz"),
435
- "wc_user_settings_response_to" => esc_html__("In response to:", "wpdiscuz"),
436
- "wc_user_settings_email_me_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
437
- "wc_user_settings_email_me_delete_links_desc" => esc_html__("Click the button above to get an email with bulk delete and unsubscribe links.", "wpdiscuz"),
438
- "wc_user_settings_no_data" => esc_html__("No data found!", "wpdiscuz"),
439
- "wc_user_settings_request_deleting_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
440
- "wc_user_settings_cancel_subscriptions" => esc_html__("Cancel all comment subscriptions", "wpdiscuz"),
441
- "wc_user_settings_clear_cookie" => esc_html__("Clear cookies with my personal data", "wpdiscuz"),
442
- "wc_user_settings_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
443
- "wc_user_settings_delete_all_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
444
- "wc_user_settings_delete_all_comments_message" => __('Please use this link to delete all your comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_COMMENTS_URL]" target="_blank">Delete all my comments</a><br/><br/>', "wpdiscuz"),
445
- "wc_user_settings_delete_all_subscriptions" => esc_html__("Delete all my subscriptions", "wpdiscuz"),
446
- "wc_user_settings_delete_all_subscriptions_message" => __('Please use this link to cancel all subscriptions for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_SUBSCRIPTIONS_URL]" target="_blank">Delete all my subscriptions</a><br/><br/>', "wpdiscuz"),
447
- "wc_user_settings_delete_all_follows" => esc_html__("Delete all my follows", "wpdiscuz"),
448
- "wc_user_settings_delete_all_follows_message" => __('Please use this link to cancel all follows for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_FOLLOWS_URL]" target="_blank">Delete all my follows</a><br/><br/>', "wpdiscuz"),
449
- "wc_user_settings_subscribed_to_replies" => esc_html__("subscribed to this comment", "wpdiscuz"),
450
- "wc_user_settings_subscribed_to_replies_own" => esc_html__("subscribed to my comments", "wpdiscuz"),
451
- "wc_user_settings_subscribed_to_all_comments" => esc_html__("subscribed to all follow-up comments of this post", "wpdiscuz"),
452
- "wc_user_settings_check_email" => esc_html__("Please check your email."),
453
- "wc_user_settings_email_error" => esc_html__("Error : Can't send email.", "wpdiscuz"),
454
- "wc_delete_this_comment" => esc_html__("Delete this comment", "wpdiscuz"),
455
- "wc_cancel_this_subscription" => esc_html__("Cancel this subscription", "wpdiscuz"),
456
- "wc_cancel_this_follow" => esc_html__("Cancel this follow", "wpdiscuz"),
457
- "wc_confirm_comment_delete" => esc_html__("Are you sure you want to delete this comment?", "wpdiscuz"),
458
- "wc_confirm_cancel_subscription" => esc_html__("Are you sure you want to cancel this subscription?", "wpdiscuz"),
459
- "wc_confirm_cancel_follow" => esc_html__("Are you sure you want to cancel this follow?", "wpdiscuz"),
460
- "wc_follow_user" => esc_html__("Follow this user", "wpdiscuz"),
461
- "wc_unfollow_user" => esc_html__("Unfollow this user", "wpdiscuz"),
462
- "wc_follow_success" => esc_html__("You started following this comment author", "wpdiscuz"),
463
- "wc_follow_canceled" => esc_html__("You stopped following this comment author.", "wpdiscuz"),
464
- "wc_follow_email_confirm" => esc_html__("Please check your email and confirm the user following request.", "wpdiscuz"),
465
- "wc_follow_email_confirm_fail" => esc_html__("Sorry, we couldn't send confirmation email.", "wpdiscuz"),
466
- "wc_follow_login_to_follow" => esc_html__("Please login to follow users.", "wpdiscuz"),
467
- "wc_follow_impossible" => esc_html__("We are sorry, but you can't follow this user.", "wpdiscuz"),
468
- "wc_follow_not_added" => esc_html__("Following failed. Please try again later.", "wpdiscuz"),
469
- "wc_follow_confirm" => esc_html__("Confirm user following request", "wpdiscuz"),
470
- "wc_follow_cancel" => esc_html__("Cancel user following request", "wpdiscuz"),
471
- "wc_follow_confirm_email_subject" => esc_html__("User Following Confirmation", "wpdiscuz"),
472
- "wc_follow_confirm_email_message" => __('Hi, <br/> You just started following a new user. You\'ll get email notification once new comment is posted by this user. <br/> Please click on "user following confirmation" link to confirm your request. If you believe this is an error, ignore this message and we\'ll never bother you again. <br/><br/><a href="[POST_URL]">[POST_TITLE]</a><br/><br/><a href="[CONFIRM_URL]">' . __("Confirm Follow", "wpdiscuz") . '</a><br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . "</a>", "wpdiscuz"),
473
- "wc_follow_email_subject" => esc_html__("New Comment", "wpdiscuz"),
474
- "wc_follow_email_message" => __('Hi [FOLLOWER_NAME],<br/><br/> new comment has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> you are following<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . '</a>', "wpdiscuz"),
475
- "wc_mentioned_email_subject" => esc_html__("You have been mentioned in comment", "wpdiscuz"),
476
- "wc_mentioned_email_message" => __('Hi [MENTIONED_USER_NAME]!<br/>You have been mentioned in a comment posted on "[POST_TITLE]" post by [COMMENT_AUTHOR].<br/><br/>Comment URL: <a href="[COMMENT_URL]">[COMMENT_URL]</a>', "wpdiscuz"),
477
- "wc_copied_to_clipboard" => esc_html__("Copied to clipboard!", "wpdiscuz"),
478
- "wc_feedback_shortcode_tooltip" => esc_html__("Select a part of text and ask readers for feedback (inline commenting)", "wpdiscuz"),
479
- "wc_feedback_popup_title" => esc_html__("Ask for Feedback", "wpdiscuz"),
480
- "wc_please_leave_feebdack" => esc_html__("Please leave a feedback on this", "wpdiscuz"),
481
- "wc_feedback_content_text" => esc_html__("", "wpdiscuz"),
482
- "wc_feedback_comment_success" => esc_html__("Thank you for your feedback!", "wpdiscuz"),
483
- "wc_commenting_is_closed" => esc_html__("Commenting is closed!", "wpdiscuz"),
484
- "wc_closed_comment_thread" => esc_html__("This is closed comment thread", "wpdiscuz"),
485
- "wc_bubble_invite_message" => esc_html__("Would love your thoughts, please comment.", "wpdiscuz"),
486
- "wc_vote_phrase" => esc_html__("vote", "wpdiscuz"),
487
- "wc_votes_phrase" => esc_html__("votes", "wpdiscuz"),
488
- "wc_comment_link" => esc_html__("Comment Link", "wpdiscuz"),
489
- "wc_not_allowed_to_comment_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
490
- "wc_not_allowed_to_create_comment_thread_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
491
- "wc_not_allowed_to_reply_more_than" => esc_html__("We are sorry, you are not allowed to reply more than %d time(s)!", "wpdiscuz"),
492
- "wc_inline_form_comment" => esc_html__("Your comment here...", "wpdiscuz"),
493
- "wc_inline_form_notify" => esc_html__("Notify me via email when a new reply is posted", "wpdiscuz"),
494
- "wc_inline_form_name" => esc_html__("Your Name*", "wpdiscuz"),
495
- "wc_inline_form_email" => esc_html__("Your Email", "wpdiscuz"),
496
- "wc_inline_form_comment_button" => esc_html__("COMMENT", "wpdiscuz"),
497
- "wc_inline_comments_view_all" => esc_html__("View all comments", "wpdiscuz"),
498
- "wc_inline_feedbacks" => esc_html__("Inline Feedbacks", "wpdiscuz"),
499
- "wc_unable_sent_email" => esc_html__("Unable to send an email", "wpdiscuz"),
500
- "wc_subscription_fault" => esc_html__("Subscription Fault", "wpdiscuz"),
501
- "wc_comments_are_deleted" => esc_html__("Your comments have been deleted from database", "wpdiscuz"),
502
- "wc_cancel_subs_success" => esc_html__("You cancel all your subscriptions successfully", "wpdiscuz"),
503
- "wc_cancel_follows_success" => esc_html__("You cancel all your follows successfully", "wpdiscuz"),
504
- "wc_follow_confirm_success" => esc_html__("Follow has been confirmed successfully", "wpdiscuz"),
505
- "wc_follow_cancel_success" => esc_html__("Follow has been canceled successfully", "wpdiscuz"),
506
- "wc_login_to_comment" => esc_html__("Please login to comment", "wpdiscuz"),
507
- "wc_view_comments" => esc_html__("View Comments", "wpdiscuz"),
508
- "wc_spoiler" => esc_html__("Spoiler", "wpdiscuz"),
509
- "wc_last_edited" => esc_html__('Last edited %1$s by %2$s', "wpdiscuz"),
510
- "wc_reply_to" => esc_html__("Reply to", "wpdiscuz"),
511
- "wc_manage_comment" => esc_html__("Manage Comment", "wpdiscuz"),
512
- "wc_spoiler_title" => esc_html__("Spoiler Title", "wpdiscuz"),
513
- "wc_cannot_rate_again" => esc_html__("You cannot rate again", "wpdiscuz"),
514
- "wc_not_allowed_to_rate" => esc_html__("You're not allowed to rate here", "wpdiscuz"),
515
- // Media Upload
516
- "wmuPhraseConfirmDelete" => esc_html__("Are you sure you want to delete this attachment?", "wpdiscuz"),
517
- "wmuPhraseNotAllowedFile" => esc_html__("Not allowed file type", "wpdiscuz"),
518
- "wmuPhraseMaxFileCount" => esc_html__("Maximum number of uploaded files is", "wpdiscuz"),
519
- "wmuPhraseMaxFileSize" => esc_html__("Maximum upload file size is", "wpdiscuz"),
520
- "wmuPhrasePostMaxSize" => esc_html__("Maximum post size is", "wpdiscuz"),
521
- "wmuAttachImage" => esc_html__("Attach an image to this comment", "wpdiscuz"),
522
- "wmuChangeImage" => esc_html__("Change the attached image", "wpdiscuz"),
523
- ];
524
- }
525
 
526
- /**
527
  * Method to get phrase and apply filter on it for more dynamic control over it
528
  *
529
- * @param $key string key of phrase
530
- * @param array $args custom arguments for filtering
531
- * @return string|null phrase as string (if exists), default phrase (if exists in $args) or null
532
- */
533
- public function getPhrase($key, $args = []) {
534
- $args = wp_parse_args($args, [
535
- "default" => null,
536
- "apply_filter" => true,
537
  ]);
538
- if (isset($this->phrases[$key])) {
539
- return $args["apply_filter"] ? apply_filters("wpdiscuz_phrase", $this->phrases[$key], $key, $args) : $this->phrases[$key];
540
  }
541
- return $args["default"];
542
  }
543
 
544
- public function toArray() {
545
- $options = [
546
- self::TAB_FORM => [
547
- "commentFormView" => $this->form["commentFormView"],
548
- "enableDropAnimation" => $this->form["enableDropAnimation"],
549
- "richEditor" => $this->form["richEditor"],
550
- "boldButton" => $this->form["boldButton"],
551
- "italicButton" => $this->form["italicButton"],
552
- "underlineButton" => $this->form["underlineButton"],
553
- "strikeButton" => $this->form["strikeButton"],
554
- "olButton" => $this->form["olButton"],
555
- "ulButton" => $this->form["ulButton"],
556
- "blockquoteButton" => $this->form["blockquoteButton"],
557
- "codeblockButton" => $this->form["codeblockButton"],
558
- "linkButton" => $this->form["linkButton"],
559
- "sourcecodeButton" => $this->form["sourcecodeButton"],
560
- "spoilerButton" => $this->form["spoilerButton"],
561
- "enableQuickTags" => $this->form["enableQuickTags"],
562
- "commenterNameMinLength" => $this->form["commenterNameMinLength"],
563
- "commenterNameMaxLength" => $this->form["commenterNameMaxLength"],
564
- "storeCommenterData" => $this->form["storeCommenterData"],
565
- ],
566
- self::TAB_RECAPTCHA => [
567
- "siteKey" => $this->recaptcha["siteKey"],
568
- "secretKey" => $this->recaptcha["secretKey"],
569
- "theme" => $this->recaptcha["theme"],
570
- "lang" => $this->recaptcha["lang"],
571
- "requestMethod" => $this->recaptcha["requestMethod"],
572
- "showForGuests" => $this->recaptcha["showForGuests"],
573
- "showForUsers" => $this->recaptcha["showForUsers"],
574
- "isShowOnSubscribeForm" => $this->recaptcha["isShowOnSubscribeForm"],
575
- ],
576
- self::TAB_LOGIN => [
577
- "showLoggedInUsername" => $this->login["showLoggedInUsername"],
578
- "showLoginLinkForGuests" => $this->login["showLoginLinkForGuests"],
579
- "showActivityTab" => $this->login["showActivityTab"],
580
- "showSubscriptionsTab" => $this->login["showSubscriptionsTab"],
581
- "showFollowsTab" => $this->login["showFollowsTab"],
582
- "enableProfileURLs" => $this->login["enableProfileURLs"],
583
- "websiteAsProfileUrl" => $this->login["websiteAsProfileUrl"],
584
- "isUserByEmail" => $this->login["isUserByEmail"],
585
- "loginUrl" => $this->login["loginUrl"],
586
- ],
587
- self::TAB_SOCIAL => [
588
- "socialLoginAgreementCheckbox" => $this->social["socialLoginAgreementCheckbox"],
589
- "socialLoginInSecondaryForm" => $this->social["socialLoginInSecondaryForm"],
590
- "displayIconOnAvatar" => $this->social["displayIconOnAvatar"],
591
- "rememberLoggedinUser" => $this->social["rememberLoggedinUser"],
592
- // fb
593
- "enableFbLogin" => $this->social["enableFbLogin"],
594
- "enableFbShare" => $this->social["enableFbShare"],
595
- "fbAppID" => $this->social["fbAppID"],
596
- "fbAppSecret" => $this->social["fbAppSecret"],
597
- "fbUseOAuth2" => $this->social["fbUseOAuth2"],
598
- // twitter
599
- "enableTwitterLogin" => $this->social["enableTwitterLogin"],
600
- "enableTwitterShare" => $this->social["enableTwitterShare"],
601
- "twitterAppID" => $this->social["twitterAppID"],
602
- "twitterAppSecret" => $this->social["twitterAppSecret"],
603
- // google
604
- "enableGoogleLogin" => $this->social["enableGoogleLogin"],
605
- "googleClientID" => $this->social["googleClientID"],
606
- "googleClientSecret" => $this->social["googleClientSecret"],
607
- // disqus
608
- "enableDisqusLogin" => $this->social["enableDisqusLogin"],
609
- "disqusPublicKey" => $this->social["disqusPublicKey"],
610
- "disqusSecretKey" => $this->social["disqusSecretKey"],
611
- // wordpress
612
- "enableWordpressLogin" => $this->social["enableWordpressLogin"],
613
- "wordpressClientID" => $this->social["wordpressClientID"],
614
- "wordpressClientSecret" => $this->social["wordpressClientSecret"],
615
- // instagram
616
- "enableInstagramLogin" => $this->social["enableInstagramLogin"],
617
- "instagramAppID" => $this->social["instagramAppID"],
618
- "instagramAppSecret" => $this->social["instagramAppSecret"],
619
- // linkedin
620
- "enableLinkedinLogin" => $this->social["enableLinkedinLogin"],
621
- "linkedinClientID" => $this->social["linkedinClientID"],
622
- "linkedinClientSecret" => $this->social["linkedinClientSecret"],
623
- // whatsapp
624
- "enableWhatsappShare" => $this->social["enableWhatsappShare"],
625
- // yandex
626
- "enableYandexLogin" => $this->social["enableYandexLogin"],
627
- "yandexID" => $this->social["yandexID"],
628
- "yandexPassword" => $this->social["yandexPassword"],
629
- // mail.ru
630
- "enableMailruLogin" => $this->social["enableMailruLogin"],
631
- "mailruClientID" => $this->social["mailruClientID"],
632
- "mailruClientSecret" => $this->social["mailruClientSecret"],
633
- // weibo
634
- "enableWeiboLogin" => $this->social["enableWeiboLogin"],
635
- "weiboKey" => $this->social["weiboKey"],
636
- "weiboSecret" => $this->social["weiboSecret"],
637
- // wechat
638
- "enableWechatLogin" => $this->social["enableWechatLogin"],
639
- "wechatAppID" => $this->social["wechatAppID"],
640
- "wechatSecret" => $this->social["wechatSecret"],
641
- // qq
642
- "enableQQLogin" => $this->social["enableQQLogin"],
643
- "qqAppID" => $this->social["qqAppID"],
644
- "qqSecret" => $this->social["qqSecret"],
645
- // baidu
646
- "enableBaiduLogin" => $this->social["enableBaiduLogin"],
647
- "baiduAppID" => $this->social["baiduAppID"],
648
- "baiduSecret" => $this->social["baiduSecret"],
649
- // vk
650
- "enableVkLogin" => $this->social["enableVkLogin"],
651
- "enableVkShare" => $this->social["enableVkShare"],
652
- "vkAppID" => $this->social["vkAppID"],
653
- "vkAppSecret" => $this->social["vkAppSecret"],
654
- // ok
655
- "enableOkLogin" => $this->social["enableOkLogin"],
656
- "enableOkShare" => $this->social["enableOkShare"],
657
- "okAppID" => $this->social["okAppID"],
658
- "okAppKey" => $this->social["okAppKey"],
659
- "okAppSecret" => $this->social["okAppSecret"],
660
- ],
661
- self::TAB_RATING => [
662
- "enablePostRatingSchema" => $this->rating["enablePostRatingSchema"],
663
- "displayRatingOnPost" => $this->rating["displayRatingOnPost"],
664
- "ratingCssOnNoneSingular" => $this->rating["ratingCssOnNoneSingular"],
665
- "ratingHoverColor" => $this->rating["ratingHoverColor"],
666
- "ratingInactiveColor" => $this->rating["ratingInactiveColor"],
667
- "ratingActiveColor" => $this->rating["ratingActiveColor"],
668
- ],
669
- self::TAB_THREAD_DISPLAY => [
670
- "firstLoadWithAjax" => $this->thread_display["firstLoadWithAjax"],
671
- "commentListLoadType" => $this->thread_display["commentListLoadType"],
672
- "isLoadOnlyParentComments" => $this->thread_display["isLoadOnlyParentComments"],
673
- "showReactedFilterButton" => $this->thread_display["showReactedFilterButton"],
674
- "showHottestFilterButton" => $this->thread_display["showHottestFilterButton"],
675
- "showSortingButtons" => $this->thread_display["showSortingButtons"],
676
- "mostVotedByDefault" => $this->thread_display["mostVotedByDefault"],
677
- "reverseChildren" => $this->thread_display["reverseChildren"],
678
- "highlightUnreadComments" => $this->thread_display["highlightUnreadComments"],
679
- "scrollToComment" => $this->thread_display["scrollToComment"],
680
- "orderCommentsBy" => $this->thread_display["orderCommentsBy"],
681
- ],
682
- self::TAB_THREAD_LAYOUTS => [
683
- "showCommentLink" => $this->thread_layouts["showCommentLink"],
684
- "showCommentDate" => $this->thread_layouts["showCommentDate"],
685
- "showVotingButtons" => $this->thread_layouts["showVotingButtons"],
686
- "votingButtonsIcon" => $this->thread_layouts["votingButtonsIcon"],
687
- "votingButtonsStyle" => $this->thread_layouts["votingButtonsStyle"],
688
- "enableDislikeButton" => $this->thread_layouts["enableDislikeButton"],
689
- "isGuestCanVote" => $this->thread_layouts["isGuestCanVote"],
690
- "highlightVotingButtons" => $this->thread_layouts["highlightVotingButtons"],
691
- "showAvatars" => $this->thread_layouts["showAvatars"],
692
- "defaultAvatarUrlForUser" => $this->thread_layouts["defaultAvatarUrlForUser"],
693
- "defaultAvatarUrlForGuest" => $this->thread_layouts["defaultAvatarUrlForGuest"],
694
- "changeAvatarsEverywhere" => $this->thread_layouts["changeAvatarsEverywhere"],
695
- ],
696
- self::TAB_THREAD_STYLES => [
697
- "theme" => $this->thread_styles["theme"],
698
- "primaryColor" => $this->thread_styles["primaryColor"],
699
- "newLoadedCommentBGColor" => $this->thread_styles["newLoadedCommentBGColor"],
700
- "primaryButtonColor" => $this->thread_styles["primaryButtonColor"],
701
- "primaryButtonBG" => $this->thread_styles["primaryButtonBG"],
702
- "bubbleColors" => $this->thread_styles["bubbleColors"],
703
- "inlineFeedbackColors" => $this->thread_styles["inlineFeedbackColors"],
704
- "defaultCommentAreaBG" => $this->thread_styles["defaultCommentAreaBG"],
705
- "defaultCommentTextColor" => $this->thread_styles["defaultCommentTextColor"],
706
- "defaultCommentFieldsBG" => $this->thread_styles["defaultCommentFieldsBG"],
707
- "defaultCommentFieldsBorderColor" => $this->thread_styles["defaultCommentFieldsBorderColor"],
708
- "defaultCommentFieldsTextColor" => $this->thread_styles["defaultCommentFieldsTextColor"],
709
- "defaultCommentFieldsPlaceholderColor" => $this->thread_styles["defaultCommentFieldsPlaceholderColor"],
710
- "darkCommentAreaBG" => $this->thread_styles["darkCommentAreaBG"],
711
- "darkCommentTextColor" => $this->thread_styles["darkCommentTextColor"],
712
- "darkCommentFieldsBG" => $this->thread_styles["darkCommentFieldsBG"],
713
- "darkCommentFieldsBorderColor" => $this->thread_styles["darkCommentFieldsBorderColor"],
714
- "darkCommentFieldsTextColor" => $this->thread_styles["darkCommentFieldsTextColor"],
715
- "darkCommentFieldsPlaceholderColor" => $this->thread_styles["darkCommentFieldsPlaceholderColor"],
716
- "commentTextSize" => $this->thread_styles["commentTextSize"],
717
- "enableFontAwesome" => $this->thread_styles["enableFontAwesome"],
718
- "customCss" => $this->thread_styles["customCss"],
719
- ],
720
- self::TAB_SUBSCRIPTION => [
721
- "enableUserMentioning" => $this->subscription["enableUserMentioning"],
722
- "sendMailToMentionedUsers" => $this->subscription["sendMailToMentionedUsers"],
723
- "isNotifyOnCommentApprove" => $this->subscription["isNotifyOnCommentApprove"],
724
- "enableMemberConfirm" => $this->subscription["enableMemberConfirm"],
725
- "enableGuestsConfirm" => $this->subscription["enableGuestsConfirm"],
726
- "subscriptionType" => $this->subscription["subscriptionType"],
727
- "showReplyCheckbox" => $this->subscription["showReplyCheckbox"],
728
- "isReplyDefaultChecked" => $this->subscription["isReplyDefaultChecked"],
729
- "usePostmaticForCommentNotification" => $this->subscription["usePostmaticForCommentNotification"],
730
- "isFollowActive" => $this->subscription["isFollowActive"],
731
- "disableFollowConfirmForUsers" => $this->subscription["disableFollowConfirmForUsers"],
732
- ],
733
- self::TAB_LABELS => [
734
- "blogRoleLabels" => $this->labels["blogRoleLabels"],
735
- "blogRoles" => $this->labels["blogRoles"],
736
- ],
737
- self::TAB_MODERATION => [
738
- "commentEditableTime" => $this->moderation["commentEditableTime"],
739
- "enableEditingWhenHaveReplies" => $this->moderation["enableEditingWhenHaveReplies"],
740
- "displayEditingInfo" => $this->moderation["displayEditingInfo"],
741
- "enableStickButton" => $this->moderation["enableStickButton"],
742
- "enableCloseButton" => $this->moderation["enableCloseButton"],
743
- "restrictCommentingPerUser" => $this->moderation["restrictCommentingPerUser"],
744
- "commentRestrictionType" => $this->moderation["commentRestrictionType"],
745
- "userCommentsLimit" => $this->moderation["userCommentsLimit"],
746
- ],
747
- self::TAB_CONTENT => [
748
- "commentTextMinLength" => $this->content["commentTextMinLength"],
749
- "replyTextMinLength" => $this->content["replyTextMinLength"],
750
- "commentTextMaxLength" => $this->content["commentTextMaxLength"],
751
- "replyTextMaxLength" => $this->content["replyTextMaxLength"],
752
- "enableImageConversion" => $this->content["enableImageConversion"],
753
- "enableShortcodes" => $this->content["enableShortcodes"],
754
- "commentReadMoreLimit" => $this->content["commentReadMoreLimit"],
755
- "wmuIsEnabled" => $this->content["wmuIsEnabled"],
756
- "wmuIsGuestAllowed" => $this->content["wmuIsGuestAllowed"],
757
- "wmuIsLightbox" => $this->content["wmuIsLightbox"],
758
- "wmuMimeTypes" => $this->content["wmuMimeTypes"],
759
- "wmuMaxFileSize" => $this->content["wmuMaxFileSize"],
760
- "wmuIsShowFilesDashboard" => $this->content["wmuIsShowFilesDashboard"],
761
- "wmuSingleImageWidth" => $this->content["wmuSingleImageWidth"],
762
- "wmuSingleImageHeight" => $this->content["wmuSingleImageHeight"],
763
- "wmuImageSizes" => $this->content["wmuImageSizes"],
764
- ],
765
- self::TAB_LIVE => [
766
- "enableBubble" => $this->live["enableBubble"],
767
- "bubbleLiveUpdate" => $this->live["bubbleLiveUpdate"],
768
- "bubbleLocation" => $this->live["bubbleLocation"],
769
- "bubbleShowNewCommentMessage" => $this->live["bubbleShowNewCommentMessage"],
770
- "bubbleHintTimeout" => $this->live["bubbleHintTimeout"],
771
- "bubbleHintHideTimeout" => $this->live["bubbleHintHideTimeout"],
772
- "commentListUpdateType" => $this->live["commentListUpdateType"],
773
- "liveUpdateGuests" => $this->live["liveUpdateGuests"],
774
- "commentListUpdateTimer" => $this->live["commentListUpdateTimer"],
775
- ],
776
- self::TAB_INLINE => [
777
- "showInlineFilterButton" => $this->inline["showInlineFilterButton"],
778
- "inlineFeedbackAttractionType" => $this->inline["inlineFeedbackAttractionType"],
779
- ],
780
- self::TAB_GENERAL => [
781
- "isEnableOnHome" => $this->general["isEnableOnHome"],
782
- "isNativeAjaxEnabled" => $this->general["isNativeAjaxEnabled"],
783
- "loadComboVersion" => $this->general["loadComboVersion"],
784
- "loadMinVersion" => $this->general["loadMinVersion"],
785
- "commentLinkFilter" => $this->general["commentLinkFilter"],
786
- "redirectPage" => $this->general["redirectPage"],
787
- "simpleCommentDate" => $this->general["simpleCommentDate"],
788
- "dateDiffFormat" => $this->general["dateDiffFormat"],
789
- "isUsePoMo" => $this->general["isUsePoMo"],
790
- "showPluginPoweredByLink" => $this->general["showPluginPoweredByLink"],
791
- "isCacheEnabled" => $this->general["isCacheEnabled"],
792
- "cacheTimeout" => $this->general["cacheTimeout"],
793
- ],
794
- ];
795
- return $options;
796
- }
797
 
798
- public function updateOptions() {
799
- update_option(self::OPTION_SLUG_OPTIONS, $this->toArray());
800
- }
801
 
802
- public function addOptions() {
803
- add_option(self::OPTION_SLUG_OPTIONS, $this->getDefaultOptions());
804
- }
805
 
806
- public function getDefaultOptions() {
807
- return [
808
- self::TAB_FORM => [
809
- "commentFormView" => "collapsed",
810
- "enableDropAnimation" => 1,
811
- "richEditor" => "desktop",
812
- "boldButton" => 1,
813
- "italicButton" => 1,
814
- "underlineButton" => 1,
815
- "strikeButton" => 1,
816
- "olButton" => 1,
817
- "ulButton" => 1,
818
- "blockquoteButton" => 1,
819
- "codeblockButton" => 1,
820
- "linkButton" => 1,
821
- "sourcecodeButton" => 1,
822
- "spoilerButton" => 1,
823
- "enableQuickTags" => 0,
824
- "commenterNameMinLength" => 3,
825
- "commenterNameMaxLength" => 50,
826
- "storeCommenterData" => - 1,
827
- ],
828
- self::TAB_RECAPTCHA => [
829
- "siteKey" => "",
830
- "secretKey" => "",
831
- "theme" => "light",
832
- "lang" => "",
833
- "requestMethod" => "auto",
834
- "showForGuests" => 0,
835
- "showForUsers" => 0,
836
- "isShowOnSubscribeForm" => 0,
837
- ],
838
- self::TAB_LOGIN => [
839
- "showLoggedInUsername" => 1,
840
- "showLoginLinkForGuests" => 1,
841
- "showActivityTab" => 1,
842
- "showSubscriptionsTab" => 1,
843
- "showFollowsTab" => 1,
844
- "enableProfileURLs" => 1,
845
- "websiteAsProfileUrl" => 1,
846
- "isUserByEmail" => 0,
847
- "loginUrl" => "",
848
- ],
849
- self::TAB_SOCIAL => [
850
- "socialLoginAgreementCheckbox" => 1,
851
- "socialLoginInSecondaryForm" => 0,
852
- "displayIconOnAvatar" => 1,
853
- "rememberLoggedinUser" => 1,
854
- "enableFbLogin" => 0,
855
- "enableFbShare" => 0,
856
- "fbUseOAuth2" => 0,
857
- "fbAppID" => "",
858
- "fbAppSecret" => "",
859
- "enableTwitterLogin" => 0,
860
- "enableTwitterShare" => 1,
861
- "twitterAppID" => "",
862
- "twitterAppSecret" => "",
863
- "enableGoogleLogin" => 0,
864
- "googleClientID" => "",
865
- "googleClientSecret" => "",
866
- "enableDisqusLogin" => 0,
867
- "disqusPublicKey" => "",
868
- "disqusSecretKey" => "",
869
- "enableWordpressLogin" => 0,
870
- "wordpressClientID" => "",
871
- "wordpressClientSecret" => "",
872
- "enableInstagramLogin" => 0,
873
- "instagramAppID" => "",
874
- "instagramAppSecret" => "",
875
- "enableLinkedinLogin" => 0,
876
- "linkedinClientID" => "",
877
- "linkedinClientSecret" => "",
878
- "enableWhatsappShare" => 0,
879
- "enableYandexLogin" => 0,
880
- "yandexID" => "",
881
- "yandexPassword" => "",
882
- "enableMailruLogin" => 0,
883
- "mailruClientID" => "",
884
- "mailruClientSecret" => "",
885
- "enableWeiboLogin" => 0,
886
- "weiboKey" => "",
887
- "weiboSecret" => "",
888
- "enableWechatLogin" => 0,
889
- "wechatAppID" => "",
890
- "wechatSecret" => "",
891
- "enableQQLogin" => 0,
892
- "qqAppID" => "",
893
- "qqSecret" => "",
894
- "enableBaiduLogin" => 0,
895
- "baiduAppID" => "",
896
- "baiduSecret" => "",
897
- "enableVkLogin" => 0,
898
- "enableVkShare" => 1,
899
- "vkAppID" => "",
900
- "vkAppSecret" => "",
901
- "enableOkLogin" => 0,
902
- "enableOkShare" => 1,
903
- "okAppID" => "",
904
- "okAppKey" => "",
905
- "okAppSecret" => "",
906
- ],
907
- self::TAB_RATING => [
908
- "enablePostRatingSchema" => 0,
909
- "displayRatingOnPost" => ["before_comment_form"],
910
- "ratingCssOnNoneSingular" => 0,
911
- "ratingHoverColor" => "#FFED85",
912
- "ratingInactiveColor" => "#DDDDDD",
913
- "ratingActiveColor" => "#FFD700",
914
- ],
915
- self::TAB_THREAD_DISPLAY => [
916
- "firstLoadWithAjax" => 0,
917
- "commentListLoadType" => 0,
918
- "isLoadOnlyParentComments" => 0,
919
- "showReactedFilterButton" => 1,
920
- "showHottestFilterButton" => 1,
921
- "showSortingButtons" => 1,
922
- "mostVotedByDefault" => 0,
923
- "reverseChildren" => 0,
924
- "highlightUnreadComments" => 0,
925
- "scrollToComment" => 1,
926
- "orderCommentsBy" => "comment_ID",
927
- ],
928
- self::TAB_THREAD_LAYOUTS => [
929
- "showCommentLink" => 1,
930
- "showCommentDate" => 1,
931
- "showVotingButtons" => 1,
932
- "votingButtonsIcon" => "fa-plus|fa-minus",
933
- "votingButtonsStyle" => 0,
934
- "enableDislikeButton" => 1,
935
- "isGuestCanVote" => 1,
936
- "highlightVotingButtons" => 1,
937
- "showAvatars" => 1,
938
- "defaultAvatarUrlForUser" => "",
939
- "defaultAvatarUrlForGuest" => "",
940
- "changeAvatarsEverywhere" => 1,
941
- ],
942
- self::TAB_THREAD_STYLES => [
943
- "theme" => "wpd-default",
944
- "primaryColor" => "#00B38F",
945
- "newLoadedCommentBGColor" => "#FFFAD6",
946
- "primaryButtonColor" => "#FFFFFF",
947
- "primaryButtonBG" => "#07B290",
948
- "bubbleColors" => "#1DB99A",
949
- "inlineFeedbackColors" => "#1DB99A",
950
- "defaultCommentAreaBG" => "",
951
- "defaultCommentTextColor" => "#777777",
952
- "defaultCommentFieldsBG" => "",
953
- "defaultCommentFieldsBorderColor" => "#DDDDDD",
954
- "defaultCommentFieldsTextColor" => "#777777",
955
- "defaultCommentFieldsPlaceholderColor" => "",
956
- "darkCommentAreaBG" => "#111111",
957
- "darkCommentTextColor" => "#CCCCCC",
958
- "darkCommentFieldsBG" => "#999999",
959
- "darkCommentFieldsBorderColor" => "#D1D1D1",
960
- "darkCommentFieldsTextColor" => "#000000",
961
- "darkCommentFieldsPlaceholderColor" => "#DDDDDD",
962
- "commentTextSize" => "14px",
963
- "enableFontAwesome" => 1,
964
- "customCss" => ".comments-area{width:auto;}",
965
- ],
966
- self::TAB_SUBSCRIPTION => [
967
- "enableUserMentioning" => 1,
968
- "sendMailToMentionedUsers" => 1,
969
- "isNotifyOnCommentApprove" => 1,
970
- "enableMemberConfirm" => 0,
971
- "enableGuestsConfirm" => 1,
972
- "subscriptionType" => 1,
973
- "showReplyCheckbox" => 1,
974
- "isReplyDefaultChecked" => 0,
975
- "usePostmaticForCommentNotification" => 0,
976
- "isFollowActive" => 1,
977
- "disableFollowConfirmForUsers" => 1,
978
- ],
979
- self::TAB_LABELS => [
980
- "blogRoleLabels" => isset($this->labels["blogRoleLabels"]) ? $this->labels["blogRoleLabels"] : [],
981
- "blogRoles" => isset($this->labels["blogRoles"]) ? $this->labels["blogRoles"] : [],
982
- ],
983
- self::TAB_MODERATION => [
984
- "commentEditableTime" => 900,
985
- "enableEditingWhenHaveReplies" => 0,
986
- "displayEditingInfo" => 1,
987
- "enableStickButton" => 1,
988
- "enableCloseButton" => 1,
989
- "restrictCommentingPerUser" => "disable",
990
- "commentRestrictionType" => "both",
991
- "userCommentsLimit" => 1,
992
- ],
993
- self::TAB_CONTENT => [
994
- "commentTextMinLength" => 1,
995
- "replyTextMinLength" => 1,
996
- "commentTextMaxLength" => "",
997
- "replyTextMaxLength" => "",
998
- "enableImageConversion" => 1,
999
- "enableShortcodes" => 0,
1000
- "commentReadMoreLimit" => 0,
1001
- "wmuIsEnabled" => 1,
1002
- "wmuIsGuestAllowed" => 1,
1003
- "wmuIsLightbox" => 1,
1004
- "wmuMimeTypes" => $this->getDefaultFileTypes(),
1005
- "wmuMaxFileSize" => 2,
1006
- "wmuIsShowFilesDashboard" => 1,
1007
- "wmuSingleImageWidth" => "auto",
1008
- "wmuSingleImageHeight" => 200,
1009
- "wmuImageSizes" => $this->getDefaultImageSizes(),
1010
- ],
1011
- self::TAB_LIVE => [
1012
- "enableBubble" => 0,
1013
- "bubbleLiveUpdate" => 0,
1014
- "bubbleLocation" => "content_left",
1015
- "bubbleShowNewCommentMessage" => 1,
1016
- "bubbleHintTimeout" => 45,
1017
- "bubbleHintHideTimeout" => 10,
1018
- "commentListUpdateType" => 0,
1019
- "liveUpdateGuests" => 0,
1020
- "commentListUpdateTimer" => 60,
1021
- ],
1022
- self::TAB_INLINE => [
1023
- "showInlineFilterButton" => 1,
1024
- "inlineFeedbackAttractionType" => "blink",
1025
- ],
1026
- self::TAB_GENERAL => [
1027
- "isEnableOnHome" => 1,
1028
- "isNativeAjaxEnabled" => 1,
1029
- "loadComboVersion" => 1,
1030
- "loadMinVersion" => 1,
1031
- "commentLinkFilter" => 1,
1032
- "redirectPage" => 0,
1033
- "simpleCommentDate" => 0,
1034
- "dateDiffFormat" => "[number] [time_unit] [adjective]",
1035
- "isUsePoMo" => 0,
1036
- "showPluginPoweredByLink" => 0,
1037
- "isCacheEnabled" => 1,
1038
- "cacheTimeout" => 10,
1039
- ],
1040
- ];
1041
- }
1042
 
1043
- public function initPhrasesOnLoad() {
1044
- if (!$this->general["isUsePoMo"] && $this->dbManager->isPhraseExists("wc_be_the_first_text")) {
1045
- $this->phrases = $this->dbManager->getPhrases();
1046
- } else {
1047
- $this->initPhrases();
1048
- }
1049
- }
1050
 
1051
- private function initFormRelations() {
1052
- $this->formContentTypeRel = get_option("wpdiscuz_form_content_type_rel", []);
1053
- $this->formPostRel = get_option("wpdiscuz_form_post_rel", []);
1054
- }
1055
 
1056
- public function isShareEnabled() {
1057
- return $this->social["enableFbShare"] || $this->social["enableTwitterShare"] || $this->social["enableVkShare"] || $this->social["enableOkShare"];
1058
- }
1059
 
1060
- public function getOptionsForJs() {
1061
- $jsArgs = [];
1062
- $jsArgs["wc_hide_replies_text"] = esc_html($this->phrases["wc_hide_replies_text"]);
1063
- $jsArgs["wc_show_replies_text"] = esc_html($this->phrases["wc_show_replies_text"]);
1064
- $jsArgs["wc_msg_required_fields"] = esc_html($this->phrases["wc_msg_required_fields"]);
1065
- $jsArgs["wc_invalid_field"] = esc_html($this->phrases["wc_invalid_field"]);
1066
- $jsArgs["wc_error_empty_text"] = esc_html($this->phrases["wc_error_empty_text"]);
1067
- $jsArgs["wc_error_url_text"] = esc_html($this->phrases["wc_error_url_text"]);
1068
- $jsArgs["wc_error_email_text"] = esc_html($this->phrases["wc_error_email_text"]);
1069
- $jsArgs["wc_invalid_captcha"] = esc_html($this->phrases["wc_invalid_captcha"]);
1070
- $jsArgs["wc_login_to_vote"] = esc_html($this->phrases["wc_login_to_vote"]);
1071
- $jsArgs["wc_deny_voting_from_same_ip"] = esc_html($this->phrases["wc_deny_voting_from_same_ip"]);
1072
- $jsArgs["wc_self_vote"] = esc_html($this->phrases["wc_self_vote"]);
1073
- $jsArgs["wc_vote_only_one_time"] = esc_html($this->phrases["wc_vote_only_one_time"]);
1074
- $jsArgs["wc_voting_error"] = esc_html($this->phrases["wc_voting_error"]);
1075
- $jsArgs["wc_comment_edit_not_possible"] = esc_html($this->phrases["wc_comment_edit_not_possible"]);
1076
- $jsArgs["wc_comment_not_updated"] = esc_html($this->phrases["wc_comment_not_updated"]);
1077
- $jsArgs["wc_comment_not_edited"] = esc_html($this->phrases["wc_comment_not_edited"]);
1078
- $jsArgs["wc_msg_input_min_length"] = esc_html($this->phrases["wc_msg_input_min_length"]);
1079
- $jsArgs["wc_msg_input_max_length"] = esc_html($this->phrases["wc_msg_input_max_length"]);
1080
- $jsArgs["wc_spoiler_title"] = esc_html($this->phrases["wc_spoiler_title"]);
1081
- $jsArgs["wc_cannot_rate_again"] = esc_html($this->phrases["wc_cannot_rate_again"]);
1082
- $jsArgs["wc_not_allowed_to_rate"] = esc_html($this->phrases["wc_not_allowed_to_rate"]);
1083
- //<!-- follow phrases
1084
- $jsArgs["wc_follow_user"] = esc_html($this->phrases["wc_follow_user"]);
1085
- $jsArgs["wc_unfollow_user"] = esc_html($this->phrases["wc_unfollow_user"]);
1086
- $jsArgs["wc_follow_success"] = esc_html($this->phrases["wc_follow_success"]);
1087
- $jsArgs["wc_follow_canceled"] = esc_html($this->phrases["wc_follow_canceled"]);
1088
- $jsArgs["wc_follow_email_confirm"] = esc_html($this->phrases["wc_follow_email_confirm"]);
1089
- $jsArgs["wc_follow_email_confirm_fail"] = esc_html($this->phrases["wc_follow_email_confirm_fail"]);
1090
- $jsArgs["wc_follow_login_to_follow"] = esc_html($this->phrases["wc_follow_login_to_follow"]);
1091
- $jsArgs["wc_follow_impossible"] = esc_html($this->phrases["wc_follow_impossible"]);
1092
- $jsArgs["wc_follow_not_added"] = esc_html($this->phrases["wc_follow_not_added"]);
1093
- //follow phrases -->
1094
- $jsArgs["is_user_logged_in"] = is_user_logged_in();
1095
- $jsArgs["commentListLoadType"] = $this->thread_display["commentListLoadType"];
1096
- $jsArgs["commentListUpdateType"] = $this->live["commentListUpdateType"];
1097
- $jsArgs["commentListUpdateTimer"] = $this->live["commentListUpdateTimer"];
1098
- $jsArgs["liveUpdateGuests"] = $this->live["liveUpdateGuests"];
1099
- $jsArgs["wordpressThreadCommentsDepth"] = $this->wp["threadCommentsDepth"];
1100
- $jsArgs["wordpressIsPaginate"] = $this->wp["isPaginate"];
1101
- $jsArgs["commentTextMaxLength"] = $this->content["commentTextMaxLength"] ? $this->content["commentTextMaxLength"] : 0;
1102
- $jsArgs["replyTextMaxLength"] = $this->content["replyTextMaxLength"] ? $this->content["replyTextMaxLength"] : 0;
1103
- $jsArgs["commentTextMinLength"] = $this->content["commentTextMinLength"];
1104
- $jsArgs["replyTextMinLength"] = $this->content["replyTextMinLength"];
1105
- if ($this->form["storeCommenterData"] < 0) {
1106
- $jsArgs["storeCommenterData"] = 100000;
1107
- } else if ($this->form["storeCommenterData"] == 0) {
1108
- $jsArgs["storeCommenterData"] = null;
1109
- } else {
1110
- $jsArgs["storeCommenterData"] = $this->form["storeCommenterData"];
1111
- }
1112
- if (function_exists("zerospam_get_key")) {
1113
- $jsArgs["wpdiscuz_zs"] = md5(zerospam_get_key());
1114
- }
1115
- $jsArgs["socialLoginAgreementCheckbox"] = $this->social["socialLoginAgreementCheckbox"];
1116
- $jsArgs["enableFbLogin"] = $this->social["enableFbLogin"];
1117
- $jsArgs["fbUseOAuth2"] = $this->social["fbUseOAuth2"];
1118
- $jsArgs["enableFbShare"] = $this->social["enableFbShare"];
1119
- $jsArgs["facebookAppID"] = $this->social["fbAppID"];
1120
- $jsArgs["facebookUseOAuth2"] = $this->social["fbUseOAuth2"];
1121
- $jsArgs["enableGoogleLogin"] = $this->social["enableGoogleLogin"];
1122
- $jsArgs["googleClientID"] = $this->social["googleClientID"];
1123
- $jsArgs["googleClientSecret"] = $this->social["googleClientSecret"];
1124
- $jsArgs["cookiehash"] = COOKIEHASH;
1125
- $jsArgs["isLoadOnlyParentComments"] = $this->thread_display["isLoadOnlyParentComments"];
1126
- $jsArgs["scrollToComment"] = $this->thread_display["scrollToComment"];
1127
- $jsArgs["commentFormView"] = $this->form["commentFormView"];
1128
- $jsArgs["enableDropAnimation"] = $this->form["enableDropAnimation"];
1129
- $jsArgs["isNativeAjaxEnabled"] = $this->general["isNativeAjaxEnabled"];
1130
- $jsArgs["enableBubble"] = $this->live["enableBubble"];
1131
- $jsArgs["bubbleLiveUpdate"] = $this->live["bubbleLiveUpdate"];
1132
- $jsArgs["bubbleHintTimeout"] = $this->live["bubbleHintTimeout"];
1133
- $jsArgs["bubbleHintHideTimeout"] = $this->live["bubbleHintHideTimeout"];
1134
- $jsArgs["cookieHideBubbleHint"] = self::COOKIE_HIDE_BUBBLE_HINT;
1135
- $jsArgs["bubbleShowNewCommentMessage"] = $this->live["bubbleShowNewCommentMessage"];
1136
- $jsArgs["bubbleLocation"] = $this->live["bubbleLocation"];
1137
- $jsArgs["firstLoadWithAjax"] = $this->thread_display["firstLoadWithAjax"];
1138
- $jsArgs["wc_copied_to_clipboard"] = esc_html($this->phrases["wc_copied_to_clipboard"]);
1139
- $jsArgs["inlineFeedbackAttractionType"] = $this->inline["inlineFeedbackAttractionType"];
1140
- $jsArgs["loadRichEditor"] = intval($this->form["richEditor"] === "both" || (!wp_is_mobile() && $this->form["richEditor"] === "desktop"));
1141
- //**reCaptcha**//
1142
- $jsArgs["wpDiscuzReCaptchaSK"] = apply_filters("wpdiscuz_recaptcha_site_key", $this->recaptcha["siteKey"]);
1143
- $jsArgs["wpDiscuzReCaptchaTheme"] = $this->recaptcha["theme"];
1144
- $jsArgs["wpDiscuzReCaptchaVersion"] = apply_filters("wpdiscuz_recaptcha_version", $this->recaptcha["version"]);
1145
- $jsArgs["wc_captcha_show_for_guest"] = $this->recaptcha["showForGuests"];
1146
- $jsArgs["wc_captcha_show_for_members"] = $this->recaptcha["showForUsers"];
1147
- $jsArgs["wpDiscuzIsShowOnSubscribeForm"] = $this->recaptcha["isShowOnSubscribeForm"];
1148
- // Media Upload //
1149
- $jsArgs["wmuEnabled"] = $this->content["wmuIsEnabled"];
1150
- $jsArgs["wmuInput"] = self::INPUT_NAME;
1151
- $jsArgs["wmuMaxFileCount"] = 1;
1152
- $jsArgs["wmuMaxFileSize"] = $this->content["wmuMaxFileSize"] * 1024 * 1024;
1153
- $jsArgs["wmuPostMaxSize"] = $this->wmuPostMaxSize;
1154
- $jsArgs["wmuIsLightbox"] = $this->content["wmuIsLightbox"];
1155
- $jsArgs["wmuMimeTypes"] = $this->content["wmuMimeTypes"];
1156
- $jsArgs["wmuPhraseConfirmDelete"] = esc_html($this->phrases["wmuPhraseConfirmDelete"]);
1157
- $jsArgs["wmuPhraseNotAllowedFile"] = esc_html($this->phrases["wmuPhraseNotAllowedFile"]);
1158
- $jsArgs["wmuPhraseMaxFileCount"] = esc_html(preg_replace("#(\d+$)#is", "", $this->phrases["wmuPhraseMaxFileCount"]) . " " . apply_filters("wpdiscuz_mu_file_count", 1));
1159
- $jsArgs["wmuPhraseMaxFileSize"] = esc_html($this->phrases["wmuPhraseMaxFileSize"] . " " . $this->content["wmuMaxFileSize"] . "MB");
1160
- $jsArgs["wmuPhrasePostMaxSize"] = esc_html($this->phrases["wmuPhrasePostMaxSize"] . " " . ($this->wmuPostMaxSize / (1024 * 1024)) . "MB");
1161
- $jsArgs["msgEmptyFile"] = esc_html__("File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.");
1162
- $jsArgs["msgPostIdNotExists"] = esc_html__("Post ID not exists", "wpdiscuz");
1163
- $jsArgs["msgUploadingNotAllowed"] = esc_html__("Sorry, uploading not allowed for this post", "wpdiscuz");
1164
- $jsArgs["msgPermissionDenied"] = esc_html__("You do not have sufficient permissions to perform this action", "wpdiscuz");
1165
- $jsArgs["wmuKeyImages"] = self::KEY_IMAGES;
1166
- $jsArgs["wmuSingleImageWidth"] = $this->content["wmuSingleImageWidth"];
1167
- $jsArgs["wmuSingleImageHeight"] = $this->content["wmuSingleImageHeight"];
1168
- return $jsArgs;
1169
- }
1170
 
1171
- private function initGoodbyeCaptchaField() {
1172
- $this->isGoodbyeCaptchaActive = is_callable([
1173
- "GdbcWordPressPublicModule",
1174
- "isCommentsProtectionActivated",
1175
- ]) && GdbcWordPressPublicModule::isCommentsProtectionActivated();
1176
- if ($this->isGoodbyeCaptchaActive) {
1177
- $this->goodbyeCaptchaTocken = GdbcWordPressPublicModule::getInstance()->getTokenFieldHtml();
1178
- }
1179
- }
1180
 
1181
- public function editorOptions() {
1182
- ob_start();
1183
- ?>
1184
  var wpdiscuzEditorOptions = {
1185
  modules: {
1186
  toolbar: "",
@@ -1191,3393 +1191,3400 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1191
  commentmincount : <?php echo absint($this->content["commentTextMinLength"]); ?>,
1192
  replymincount : <?php echo absint($this->content["replyTextMinLength"]); ?>,
1193
  },
1194
- <?php do_action("wpdiscuz_editor_modules"); ?>
1195
  },
1196
  wc_be_the_first_text: <?php echo json_encode($this->getPhrase("wc_be_the_first_text", ["unique_id" => "0_0"])); ?>,
1197
  wc_comment_join_text: <?php echo json_encode($this->getPhrase("wc_comment_join_text", ["unique_id" => "0_0"])); ?>,
1198
  theme: 'snow',
1199
  debug: '<?php echo $this->general["loadComboVersion"] || $this->general["loadMinVersion"] ? 'error' : 'warn'; ?>'
1200
  };
1201
- <?php
1202
- return ob_get_clean();
1203
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1204
 
1205
- public function saveAndResetOptionsAndPhrases() {
1206
- if (!empty($_GET["wpd_wizard"]) && ($wizard = absint($_GET["wpd_wizard"])) && !empty($_POST)) {
1207
- check_admin_referer("wpd_wizard_form");
1208
- if ($wizard === 2) {
1209
- $forms = get_posts([
1210
- "post_type" => "wpdiscuz_form",
1211
- "post_status" => "publish",
1212
- "posts_per_page" => - 1,
1213
- ]);
1214
- foreach ($forms as $k => $form) {
1215
- $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1216
- $formMeta["layout"] = isset($_POST["layout"]) ? absint($_POST["layout"]) : 1;
1217
- update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1218
- }
1219
- $this->thread_styles["theme"] = trim(WpdiscuzHelper::sanitize(INPUT_POST, "theme", FILTER_SANITIZE_STRING, "wpd-default"));
1220
- $this->updateOptions();
1221
- } else if ($wizard === 3) {
1222
- $this->live["enableBubble"] = isset($_POST["enableBubble"]) ? absint($_POST["enableBubble"]) : 0;
1223
- $this->live["bubbleLiveUpdate"] = isset($_POST["bubbleLiveUpdate"]) ? absint($_POST["bubbleLiveUpdate"]) : 0;
1224
- $this->live["bubbleLocation"] = trim(WpdiscuzHelper::sanitize(INPUT_POST, "bubbleLocation", FILTER_SANITIZE_STRING, "content_left"));
1225
- $this->updateOptions();
1226
- } else if ($wizard === 4) {
1227
- $forms = get_posts([
1228
- "post_type" => "wpdiscuz_form",
1229
- "post_status" => "publish",
1230
- "posts_per_page" => - 1,
1231
- ]);
1232
- foreach ($forms as $k => $form) {
1233
- $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1234
- $formMeta["enable_post_rating"] = isset($_POST["enable_post_rating"]) ? absint($_POST["enable_post_rating"]) : 1;
1235
- update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1236
- }
1237
- }
1238
- } else {
1239
- $this->resetOptions();
1240
- $this->saveOptions();
1241
- $this->savePhrases();
1242
- }
1243
- $this->check();
1244
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1245
 
1246
- public function saveOptions() {
1247
- if (isset($_POST["wc_submit_options"]) && !empty($_POST["wpd_tab"])) {
1248
- if (!current_user_can("manage_options")) {
1249
- die(esc_html_e("Hacker?", "wpdiscuz"));
1250
- }
1251
- check_admin_referer("wc_options_form-" . sanitize_text_field($_POST["wpd_tab"]));
1252
- if (self::TAB_FORM === sanitize_text_field($_POST["wpd_tab"])) {
1253
- $this->form["commentFormView"] = isset($_POST[self::TAB_FORM]["commentFormView"]) ? trim(sanitize_text_field($_POST[self::TAB_FORM]["commentFormView"])) : "collapsed";
1254
- $this->form["enableDropAnimation"] = isset($_POST[self::TAB_FORM]["enableDropAnimation"]) ? absint($_POST[self::TAB_FORM]["enableDropAnimation"]) : 0;
1255
- $this->form["richEditor"] = isset($_POST[self::TAB_FORM]["richEditor"]) ? trim(sanitize_text_field($_POST[self::TAB_FORM]["richEditor"])) : "desktop";
1256
- $this->form["boldButton"] = isset($_POST[self::TAB_FORM]["boldButton"]) ? intval($_POST[self::TAB_FORM]["boldButton"]) : 0;
1257
- $this->form["italicButton"] = isset($_POST[self::TAB_FORM]["italicButton"]) ? intval($_POST[self::TAB_FORM]["italicButton"]) : 0;
1258
- $this->form["underlineButton"] = isset($_POST[self::TAB_FORM]["underlineButton"]) ? intval($_POST[self::TAB_FORM]["underlineButton"]) : 0;
1259
- $this->form["strikeButton"] = isset($_POST[self::TAB_FORM]["strikeButton"]) ? intval($_POST[self::TAB_FORM]["strikeButton"]) : 0;
1260
- $this->form["olButton"] = isset($_POST[self::TAB_FORM]["olButton"]) ? intval($_POST[self::TAB_FORM]["olButton"]) : 0;
1261
- $this->form["ulButton"] = isset($_POST[self::TAB_FORM]["ulButton"]) ? intval($_POST[self::TAB_FORM]["ulButton"]) : 0;
1262
- $this->form["blockquoteButton"] = isset($_POST[self::TAB_FORM]["blockquoteButton"]) ? intval($_POST[self::TAB_FORM]["blockquoteButton"]) : 0;
1263
- $this->form["codeblockButton"] = isset($_POST[self::TAB_FORM]["codeblockButton"]) ? intval($_POST[self::TAB_FORM]["codeblockButton"]) : 0;
1264
- $this->form["linkButton"] = isset($_POST[self::TAB_FORM]["linkButton"]) ? intval($_POST[self::TAB_FORM]["linkButton"]) : 0;
1265
- $this->form["sourcecodeButton"] = isset($_POST[self::TAB_FORM]["sourcecodeButton"]) ? intval($_POST[self::TAB_FORM]["sourcecodeButton"]) : 0;
1266
- $this->form["spoilerButton"] = isset($_POST[self::TAB_FORM]["spoilerButton"]) ? intval($_POST[self::TAB_FORM]["spoilerButton"]) : 0;
1267
- $this->form["enableQuickTags"] = isset($_POST[self::TAB_FORM]["enableQuickTags"]) ? intval($_POST[self::TAB_FORM]["enableQuickTags"]) : 0;
1268
- $this->form["commenterNameMinLength"] = isset($_POST[self::TAB_FORM]["commenterNameMinLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) >= 1 ? absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) : 1;
1269
- $this->form["commenterNameMaxLength"] = isset($_POST[self::TAB_FORM]["commenterNameMaxLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) >= 3 && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) <= 50 ? absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) : 50;
1270
- $this->form["storeCommenterData"] = isset($_POST[self::TAB_FORM]["storeCommenterData"]) && (intval($_POST[self::TAB_FORM]["storeCommenterData"]) || $_POST[self::TAB_FORM]["storeCommenterData"] == 0) ? intval($_POST[self::TAB_FORM]["storeCommenterData"]) : - 1;
1271
- } else if (self::TAB_RECAPTCHA === $_POST["wpd_tab"]) {
1272
- $this->recaptcha["siteKey"] = isset($_POST[self::TAB_RECAPTCHA]["siteKey"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["siteKey"])) : "";
1273
- $this->recaptcha["secretKey"] = isset($_POST[self::TAB_RECAPTCHA]["secretKey"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["secretKey"])) : "";
1274
- $this->recaptcha["theme"] = isset($_POST[self::TAB_RECAPTCHA]["theme"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["theme"])) : "light";
1275
- $this->recaptcha["lang"] = isset($_POST[self::TAB_RECAPTCHA]["lang"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["lang"])) : "";
1276
- $this->recaptcha["requestMethod"] = isset($_POST[self::TAB_RECAPTCHA]["requestMethod"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["requestMethod"])) : "auto";
1277
- if (empty($_POST[self::TAB_RECAPTCHA]["useV3"])) {
1278
- if ($this->recaptcha["siteKey"] && $this->recaptcha["secretKey"]) {
1279
- $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1280
- $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1281
- $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1282
- } else {
1283
- $this->recaptcha["showForGuests"] = 0;
1284
- $this->recaptcha["showForUsers"] = 0;
1285
- $this->recaptcha["isShowOnSubscribeForm"] = 0;
1286
- }
1287
- } else {
1288
- $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1289
- $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1290
- $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1291
- }
1292
- } else if (self::TAB_LOGIN === $_POST["wpd_tab"]) {
1293
- $this->login["showLoggedInUsername"] = isset($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) ? absint($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) : 0;
1294
- $this->login["showLoginLinkForGuests"] = isset($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? absint($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) : 0;
1295
- $this->login["showActivityTab"] = isset($_POST[self::TAB_LOGIN]["showActivityTab"]) ? absint($_POST[self::TAB_LOGIN]["showActivityTab"]) : 0;
1296
- $this->login["showSubscriptionsTab"] = isset($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) ? absint($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) : 0;
1297
- $this->login["showFollowsTab"] = isset($_POST[self::TAB_LOGIN]["showFollowsTab"]) ? absint($_POST[self::TAB_LOGIN]["showFollowsTab"]) : 0;
1298
- $this->login["enableProfileURLs"] = isset($_POST[self::TAB_LOGIN]["enableProfileURLs"]) ? absint($_POST[self::TAB_LOGIN]["enableProfileURLs"]) : 0;
1299
- $this->login["websiteAsProfileUrl"] = isset($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? absint($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) : 0;
1300
- $this->login["isUserByEmail"] = isset($_POST[self::TAB_LOGIN]["isUserByEmail"]) ? absint($_POST[self::TAB_LOGIN]["isUserByEmail"]) : 0;
1301
- $this->login["loginUrl"] = isset($_POST[self::TAB_LOGIN]["loginUrl"]) && ($l = trim(sanitize_text_field($_POST[self::TAB_LOGIN]["loginUrl"]))) ? $l : "";
1302
- } else if (self::TAB_SOCIAL === $_POST["wpd_tab"]) {
1303
- $this->social["socialLoginAgreementCheckbox"] = isset($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) : 0;
1304
- $this->social["socialLoginInSecondaryForm"] = isset($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) : 0;
1305
- $this->social["displayIconOnAvatar"] = isset($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? absint($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) : 0;
1306
- $this->social["rememberLoggedinUser"] = isset($_POST[self::TAB_SOCIAL]["rememberLoggedinUser"]) ? absint($_POST[self::TAB_SOCIAL]["rememberLoggedinUser"]) : 0;
1307
- // fb
1308
- $this->social["enableFbLogin"] = isset($_POST[self::TAB_SOCIAL]["enableFbLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbLogin"]) : 0;
1309
- $this->social["enableFbShare"] = isset($_POST[self::TAB_SOCIAL]["enableFbShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbShare"]) : 0;
1310
- $this->social["fbAppID"] = isset($_POST[self::TAB_SOCIAL]["fbAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["fbAppID"])) : "";
1311
- $this->social["fbAppSecret"] = isset($_POST[self::TAB_SOCIAL]["fbAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["fbAppSecret"])) : "";
1312
- $this->social["fbUseOAuth2"] = isset($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) ? absint($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) : 0;
1313
- // twitter
1314
- $this->social["enableTwitterLogin"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) : 0;
1315
- $this->social["enableTwitterShare"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) : 0;
1316
- $this->social["twitterAppID"] = isset($_POST[self::TAB_SOCIAL]["twitterAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["twitterAppID"])) : "";
1317
- $this->social["twitterAppSecret"] = isset($_POST[self::TAB_SOCIAL]["twitterAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["twitterAppSecret"])) : "";
1318
- // google
1319
- $this->social["enableGoogleLogin"] = isset($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) : 0;
1320
- $this->social["googleClientID"] = isset($_POST[self::TAB_SOCIAL]["googleClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["googleClientID"])) : "";
1321
- $this->social["googleClientSecret"] = isset($_POST[self::TAB_SOCIAL]["googleClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["googleClientSecret"])) : "";
1322
- // disqus
1323
- $this->social["enableDisqusLogin"] = isset($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) : 0;
1324
- $this->social["disqusPublicKey"] = isset($_POST[self::TAB_SOCIAL]["disqusPublicKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["disqusPublicKey"])) : "";
1325
- $this->social["disqusSecretKey"] = isset($_POST[self::TAB_SOCIAL]["disqusSecretKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["disqusSecretKey"])) : "";
1326
- // wordpress
1327
- $this->social["enableWordpressLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) : 0;
1328
- $this->social["wordpressClientID"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wordpressClientID"])) : "";
1329
- $this->social["wordpressClientSecret"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wordpressClientSecret"])) : "";
1330
- // instagram
1331
- $this->social["enableInstagramLogin"] = isset($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) : 0;
1332
- $this->social["instagramAppID"] = isset($_POST[self::TAB_SOCIAL]["instagramAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["instagramAppID"])) : "";
1333
- $this->social["instagramAppSecret"] = isset($_POST[self::TAB_SOCIAL]["instagramAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["instagramAppSecret"])) : "";
1334
- // linkedin
1335
- $this->social["enableLinkedinLogin"] = isset($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) : 0;
1336
- $this->social["linkedinClientID"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["linkedinClientID"])) : "";
1337
- $this->social["linkedinClientSecret"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["linkedinClientSecret"])) : "";
1338
- // whatsapp
1339
- $this->social["enableWhatsappShare"] = isset($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) : 0;
1340
- // yandex
1341
- $this->social["enableYandexLogin"] = isset($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) : 0;
1342
- $this->social["yandexID"] = isset($_POST[self::TAB_SOCIAL]["yandexID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["yandexID"])) : "";
1343
- $this->social["yandexPassword"] = isset($_POST[self::TAB_SOCIAL]["yandexPassword"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["yandexPassword"])) : "";
1344
- // mail.ru
1345
- $this->social["enableMailruLogin"] = isset($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) : 0;
1346
- $this->social["mailruClientID"] = isset($_POST[self::TAB_SOCIAL]["mailruClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["mailruClientID"])) : "";
1347
- $this->social["mailruClientSecret"] = isset($_POST[self::TAB_SOCIAL]["mailruClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["mailruClientSecret"])) : "";
1348
- // weibo
1349
- $this->social["enableWeiboLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) : 0;
1350
- $this->social["weiboKey"] = isset($_POST[self::TAB_SOCIAL]["weiboKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["weiboKey"])) : "";
1351
- $this->social["weiboSecret"] = isset($_POST[self::TAB_SOCIAL]["weiboSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["weiboSecret"])) : "";
1352
- // wechat
1353
- $this->social["enableWechatLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) : 0;
1354
- $this->social["wechatAppID"] = isset($_POST[self::TAB_SOCIAL]["wechatAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wechatAppID"])) : "";
1355
- $this->social["wechatSecret"] = isset($_POST[self::TAB_SOCIAL]["wechatSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wechatSecret"])) : "";
1356
- // qq
1357
- $this->social["enableQQLogin"] = isset($_POST[self::TAB_SOCIAL]["enableQQLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableQQLogin"]) : 0;
1358
- $this->social["qqAppID"] = isset($_POST[self::TAB_SOCIAL]["qqAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["qqAppID"])) : "";
1359
- $this->social["qqSecret"] = isset($_POST[self::TAB_SOCIAL]["qqSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["qqSecret"])) : "";
1360
- // baidu
1361
- $this->social["enableBaiduLogin"] = isset($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) : 0;
1362
- $this->social["baiduAppID"] = isset($_POST[self::TAB_SOCIAL]["baiduAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["baiduAppID"])) : "";
1363
- $this->social["baiduSecret"] = isset($_POST[self::TAB_SOCIAL]["baiduSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["baiduSecret"])) : "";
1364
- // vk
1365
- $this->social["enableVkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableVkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkLogin"]) : 0;
1366
- $this->social["enableVkShare"] = isset($_POST[self::TAB_SOCIAL]["enableVkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkShare"]) : 0;
1367
- $this->social["vkAppID"] = isset($_POST[self::TAB_SOCIAL]["vkAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["vkAppID"])) : "";
1368
- $this->social["vkAppSecret"] = isset($_POST[self::TAB_SOCIAL]["vkAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["vkAppSecret"])) : "";
1369
- // ok
1370
- $this->social["enableOkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableOkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkLogin"]) : 0;
1371
- $this->social["enableOkShare"] = isset($_POST[self::TAB_SOCIAL]["enableOkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkShare"]) : 0;
1372
- $this->social["okAppID"] = isset($_POST[self::TAB_SOCIAL]["okAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["okAppID"])) : "";
1373
- $this->social["okAppKey"] = isset($_POST[self::TAB_SOCIAL]["okAppKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["okAppKey"])) : "";
1374
- $this->social["okAppSecret"] = isset($_POST[self::TAB_SOCIAL]["okAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["okAppSecret"])) : "";
1375
- } else if (self::TAB_RATING === $_POST["wpd_tab"]) {
1376
- $this->rating["enablePostRatingSchema"] = isset($_POST[self::TAB_RATING]["enablePostRatingSchema"]) ? absint($_POST[self::TAB_RATING]["enablePostRatingSchema"]) : 0;
1377
- $this->rating["displayRatingOnPost"] = isset($_POST[self::TAB_RATING]["displayRatingOnPost"]) ? $_POST[self::TAB_RATING]["displayRatingOnPost"] : [];
1378
- $this->rating["ratingCssOnNoneSingular"] = isset($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? absint($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) : 0;
1379
- $this->rating["ratingHoverColor"] = isset($_POST[self::TAB_RATING]["ratingHoverColor"]) ? sanitize_hex_color($_POST[self::TAB_RATING]["ratingHoverColor"]) : "#FFED85";
1380
- $this->rating["ratingInactiveColor"] = isset($_POST[self::TAB_RATING]["ratingInactiveColor"]) ? sanitize_hex_color($_POST[self::TAB_RATING]["ratingInactiveColor"]) : "#DDDDDD";
1381
- $this->rating["ratingActiveColor"] = isset($_POST[self::TAB_RATING]["ratingActiveColor"]) ? sanitize_hex_color($_POST[self::TAB_RATING]["ratingActiveColor"]) : "#FFD700";
1382
- } else if (self::TAB_THREAD_DISPLAY === $_POST["wpd_tab"]) {
1383
- $this->thread_display["firstLoadWithAjax"] = isset($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) : 0;
1384
- $this->thread_display["commentListLoadType"] = isset($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) : 0;
1385
- $this->thread_display["isLoadOnlyParentComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) : 0;
1386
- $this->thread_display["showReactedFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) : 0;
1387
- $this->thread_display["showHottestFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) : 0;
1388
- $this->thread_display["showSortingButtons"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) : 0;
1389
- $this->thread_display["mostVotedByDefault"] = isset($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) : 0;
1390
- $this->thread_display["reverseChildren"] = isset($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) : 0;
1391
- $this->thread_display["highlightUnreadComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) : 0;
1392
- $this->thread_display["scrollToComment"] = isset($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) : 0;
1393
- $this->thread_display["orderCommentsBy"] = isset($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) && ($o = trim(sanitize_text_field($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]))) && in_array($o, [
1394
- "comment_ID",
1395
- "comment_date_gmt",
1396
- ]) ? $o : "comment_ID";
1397
- } else if (self::TAB_THREAD_LAYOUTS === $_POST["wpd_tab"]) {
1398
- $this->thread_layouts["showCommentLink"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) : 0;
1399
- $this->thread_layouts["showCommentDate"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) : 0;
1400
- $this->thread_layouts["showVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) : 0;
1401
- $this->thread_layouts["votingButtonsIcon"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? sanitize_text_field($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) : "fa-plus|fa-minus";
1402
- $this->thread_layouts["votingButtonsStyle"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) : 0;
1403
- $this->thread_layouts["enableDislikeButton"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) : 0;
1404
- $this->thread_layouts["isGuestCanVote"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) : 0;
1405
- $this->thread_layouts["highlightVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) : 0;
1406
- $this->thread_layouts["showAvatars"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) : 0;
1407
- $this->thread_layouts["defaultAvatarUrlForUser"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? trim(sanitize_text_field($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"])) : "";
1408
- $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? trim(sanitize_text_field($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"])) : "";
1409
- $this->thread_layouts["changeAvatarsEverywhere"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) : 0;
1410
- } else if (self::TAB_THREAD_STYLES === $_POST["wpd_tab"]) {
1411
- $this->thread_styles["theme"] = isset($_POST[self::TAB_THREAD_STYLES]["theme"]) ? trim(sanitize_text_field($_POST[self::TAB_THREAD_STYLES]["theme"])) : "wpd-default";
1412
- $this->thread_styles["primaryColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["primaryColor"]) : "#00B38F";
1413
- $this->thread_styles["newLoadedCommentBGColor"] = isset($_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) : "#FFFAD6";
1414
- $this->thread_styles["primaryButtonColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"]) : "#FFFFFF";
1415
- $this->thread_styles["primaryButtonBG"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"]) : "#07B290";
1416
- $this->thread_styles["bubbleColors"] = isset($_POST[self::TAB_THREAD_STYLES]["bubbleColors"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["bubbleColors"]) : "#1DB99A";
1417
- $this->thread_styles["inlineFeedbackColors"] = isset($_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) : "#1DB99A";
1418
- $this->thread_styles["defaultCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) : "";
1419
- $this->thread_styles["defaultCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) : "#777777";
1420
- $this->thread_styles["defaultCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) : "";
1421
- $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) : "#DDDDDD";
1422
- $this->thread_styles["defaultCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) : "#777777";
1423
- $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) : "";
1424
- $this->thread_styles["darkCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) : "#111111";
1425
- $this->thread_styles["darkCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) : "#CCCCCC";
1426
- $this->thread_styles["darkCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) : "#999999";
1427
- $this->thread_styles["darkCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) : "#D1D1D1";
1428
- $this->thread_styles["darkCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) : "#000000";
1429
- $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) : "#DDDDDD";
1430
- $this->thread_styles["commentTextSize"] = isset($_POST[self::TAB_THREAD_STYLES]["commentTextSize"]) ? sanitize_term_field($_POST[self::TAB_THREAD_STYLES]["commentTextSize"]) : "14px";
1431
- $this->thread_styles["enableFontAwesome"] = isset($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? absint($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) : 0;
1432
- $this->thread_styles["customCss"] = isset($_POST[self::TAB_THREAD_STYLES]["customCss"]) ? sanitize_textarea_field($_POST[self::TAB_THREAD_STYLES]["customCss"]) : ".comments-area{width:auto;}";
1433
- } else if (self::TAB_SUBSCRIPTION === $_POST["wpd_tab"]) {
1434
- $this->subscription["enableUserMentioning"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) : 0;
1435
- $this->subscription["sendMailToMentionedUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) : 0;
1436
- $this->subscription["isNotifyOnCommentApprove"] = isset($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) : 0;
1437
- $this->subscription["enableMemberConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) : 0;
1438
- $this->subscription["enableGuestsConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) : 0;
1439
- $this->subscription["subscriptionType"] = isset($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) : 1;
1440
- $this->subscription["showReplyCheckbox"] = isset($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) : 0;
1441
- $this->subscription["isReplyDefaultChecked"] = isset($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) : 0;
1442
- $this->subscription["usePostmaticForCommentNotification"] = isset($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) : 0;
1443
- $this->subscription["isFollowActive"] = isset($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) : 0;
1444
- $this->subscription["disableFollowConfirmForUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) : 0;
1445
- } else if (self::TAB_LABELS === $_POST["wpd_tab"]) {
1446
- $emptyRolesArray = array_combine(array_keys($this->labels["blogRoleLabels"]), array_pad([], count($this->labels["blogRoleLabels"]), 0));
1447
- $this->labels["blogRoleLabels"] = isset($_POST[self::TAB_LABELS]["blogRoleLabels"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoleLabels"], $emptyRolesArray) : $emptyRolesArray;
1448
- $this->labels["blogRoles"] = isset($_POST[self::TAB_LABELS]["blogRoles"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoles"], $this->labels["blogRoles"]) : $this->labels["blogRoles"];
1449
- } else if (self::TAB_MODERATION === $_POST["wpd_tab"]) {
1450
- $this->moderation["commentEditableTime"] = isset($_POST[self::TAB_MODERATION]["commentEditableTime"]) ? sanitize_text_field($_POST[self::TAB_MODERATION]["commentEditableTime"]) : 900;
1451
- $this->moderation["enableEditingWhenHaveReplies"] = isset($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? absint($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) : 0;
1452
- $this->moderation["displayEditingInfo"] = isset($_POST[self::TAB_MODERATION]["displayEditingInfo"]) ? absint($_POST[self::TAB_MODERATION]["displayEditingInfo"]) : 0;
1453
- $this->moderation["enableStickButton"] = isset($_POST[self::TAB_MODERATION]["enableStickButton"]) ? absint($_POST[self::TAB_MODERATION]["enableStickButton"]) : 0;
1454
- $this->moderation["enableCloseButton"] = isset($_POST[self::TAB_MODERATION]["enableCloseButton"]) ? absint($_POST[self::TAB_MODERATION]["enableCloseButton"]) : 0;
1455
- $this->moderation["restrictCommentingPerUser"] = isset($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? trim(sanitize_text_field($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"])) : "disable";
1456
- $this->moderation["commentRestrictionType"] = isset($_POST[self::TAB_MODERATION]["commentRestrictionType"]) ? trim(sanitize_text_field($_POST[self::TAB_MODERATION]["commentRestrictionType"])) : "both";
1457
- $this->moderation["userCommentsLimit"] = isset($_POST[self::TAB_MODERATION]["userCommentsLimit"]) ? absint($_POST[self::TAB_MODERATION]["userCommentsLimit"]) : 1;
1458
- } else if (self::TAB_CONTENT === $_POST["wpd_tab"]) {
1459
- $this->content["commentTextMinLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMinLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) : 1;
1460
- $this->content["replyTextMinLength"] = isset($_POST[self::TAB_CONTENT]["replyTextMinLength"]) && absint($_POST[self::TAB_CONTENT]["replyTextMinLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["replyTextMinLength"]) : 1;
1461
- $this->content["commentTextMaxLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) : "";
1462
- $this->content["replyTextMaxLength"] = isset($_POST[self::TAB_CONTENT]["replyTextMaxLength"]) && absint($_POST[self::TAB_CONTENT]["replyTextMaxLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["replyTextMaxLength"]) : "";
1463
- $this->content["enableImageConversion"] = isset($_POST[self::TAB_CONTENT]["enableImageConversion"]) ? absint($_POST[self::TAB_CONTENT]["enableImageConversion"]) : 0;
1464
- $this->content["enableShortcodes"] = isset($_POST[self::TAB_CONTENT]["enableShortcodes"]) ? absint($_POST[self::TAB_CONTENT]["enableShortcodes"]) : 0;
1465
- $this->content["commentReadMoreLimit"] = isset($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) && absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) >= 0 ? absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) : 0;
1466
- $this->content["wmuIsEnabled"] = isset($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) : 0;
1467
- $this->content["wmuIsGuestAllowed"] = isset($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) : 0;
1468
- $this->content["wmuIsLightbox"] = isset($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) : 0;
1469
- $this->content["wmuMimeTypes"] = isset($_POST[self::TAB_CONTENT]["wmuMimeTypes"]) ? $_POST[self::TAB_CONTENT]["wmuMimeTypes"] : [];
1470
- $this->content["wmuMaxFileSize"] = isset($_POST[self::TAB_CONTENT]["wmuMaxFileSize"]) ? sanitize_text_field($_POST[self::TAB_CONTENT]["wmuMaxFileSize"]) : $this->wmuUploadMaxFileSize / (1024 * 1024);
1471
- $this->content["wmuIsShowFilesDashboard"] = isset($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) : 0;
1472
- $this->content["wmuSingleImageWidth"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"]) && ($v = trim(sanitize_text_field($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"]))) && ($v === "auto" || ($v = absint($v))) ? $v : 320;
1473
- $this->content["wmuSingleImageHeight"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"]) && ($v = trim(sanitize_text_field($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"]))) && ($v === "auto" || ($v = absint($v))) ? $v : 200;
1474
- $this->content["wmuImageSizes"] = isset($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && is_array($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && ($sizes = array_filter($_POST[self::TAB_CONTENT]["wmuImageSizes"])) ? $sizes : [];
1475
- } else if (self::TAB_LIVE === $_POST["wpd_tab"]) {
1476
- $this->live["enableBubble"] = isset($_POST[self::TAB_LIVE]["enableBubble"]) ? absint($_POST[self::TAB_LIVE]["enableBubble"]) : 0;
1477
- $this->live["bubbleLiveUpdate"] = isset($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) ? absint($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) : 0;
1478
- $this->live["bubbleLocation"] = isset($_POST[self::TAB_LIVE]["bubbleLocation"]) ? trim(sanitize_text_field($_POST[self::TAB_LIVE]["bubbleLocation"])) : "content_left";
1479
- $this->live["bubbleShowNewCommentMessage"] = isset($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? absint($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) : 0;
1480
- $this->live["bubbleHintTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) : 0;
1481
- $this->live["bubbleHintHideTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) : 0;
1482
- $this->live["commentListUpdateType"] = isset($_POST[self::TAB_LIVE]["commentListUpdateType"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateType"]) : 0;
1483
- $this->live["liveUpdateGuests"] = isset($_POST[self::TAB_LIVE]["liveUpdateGuests"]) ? absint($_POST[self::TAB_LIVE]["liveUpdateGuests"]) : 0;
1484
- $this->live["commentListUpdateTimer"] = isset($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) : 30;
1485
- } else if (self::TAB_INLINE === $_POST["wpd_tab"]) {
1486
- $this->inline["showInlineFilterButton"] = isset($_POST[self::TAB_INLINE]["showInlineFilterButton"]) ? absint($_POST[self::TAB_INLINE]["showInlineFilterButton"]) : 0;
1487
- $this->inline["inlineFeedbackAttractionType"] = isset($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? trim(sanitize_text_field($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"])) : "disable";
1488
- } else if (self::TAB_GENERAL === $_POST["wpd_tab"]) {
1489
- $this->general["isEnableOnHome"] = isset($_POST[self::TAB_GENERAL]["isEnableOnHome"]) ? absint($_POST[self::TAB_GENERAL]["isEnableOnHome"]) : 0;
1490
- $this->general["isNativeAjaxEnabled"] = isset($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) : 0;
1491
- $this->general["loadComboVersion"] = isset($_POST[self::TAB_GENERAL]["loadComboVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadComboVersion"]) : 0;
1492
- $this->general["loadMinVersion"] = isset($_POST[self::TAB_GENERAL]["loadMinVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadMinVersion"]) : 0;
1493
- $this->general["commentLinkFilter"] = isset($_POST[self::TAB_GENERAL]["commentLinkFilter"]) ? absint($_POST[self::TAB_GENERAL]["commentLinkFilter"]) : 1;
1494
- $this->general["simpleCommentDate"] = isset($_POST[self::TAB_GENERAL]["simpleCommentDate"]) ? absint($_POST[self::TAB_GENERAL]["simpleCommentDate"]) : 0;
1495
- $this->general["dateDiffFormat"] = isset($_POST[self::TAB_GENERAL]["dateDiffFormat"]) ? trim($_POST[self::TAB_GENERAL]["dateDiffFormat"]) : "";
1496
- $this->general["isUsePoMo"] = isset($_POST[self::TAB_GENERAL]["isUsePoMo"]) ? absint($_POST[self::TAB_GENERAL]["isUsePoMo"]) : 0;
1497
- $this->general["showPluginPoweredByLink"] = isset($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? absint($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) : 0;
1498
- $this->general["redirectPage"] = isset($_POST[self::TAB_GENERAL]["redirectPage"]) ? absint($_POST[self::TAB_GENERAL]["redirectPage"]) : 0;
1499
- $this->general["isCacheEnabled"] = isset($_POST[self::TAB_GENERAL]["isCacheEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isCacheEnabled"]) : 0;
1500
- $this->general["cacheTimeout"] = isset($_POST[self::TAB_GENERAL]["cacheTimeout"]) ? absint($_POST[self::TAB_GENERAL]["cacheTimeout"]) : 10;
1501
- }
1502
- do_action("wpdiscuz_save_options");
1503
- $this->updateOptions();
1504
- do_action("wpdiscuz_reset_comments_cache");
1505
- do_action("wpdiscuz_reset_users_cache");
1506
- }
1507
- }
1508
 
1509
- public function savePhrases() {
1510
- if (isset($_POST["wc_submit_phrases"])) {
1511
- if (!current_user_can("manage_options")) {
1512
- die(esc_html_e("Hacker?", "wpdiscuz"));
1513
- }
1514
- check_admin_referer("wc_phrases_form");
1515
- $this->phrases["wc_be_the_first_text"] = sanitize_text_field($_POST["wc_be_the_first_text"]);
1516
- $this->phrases["wc_comment_start_text"] = sanitize_text_field($_POST["wc_comment_start_text"]);
1517
- $this->phrases["wc_comment_join_text"] = sanitize_text_field($_POST["wc_comment_join_text"]);
1518
- $this->phrases["wc_content_and_settings"] = sanitize_text_field($_POST["wc_content_and_settings"]);
1519
- $this->phrases["wc_hottest_comment_thread"] = sanitize_text_field($_POST["wc_hottest_comment_thread"]);
1520
- $this->phrases["wc_most_reacted_comment"] = sanitize_text_field($_POST["wc_most_reacted_comment"]);
1521
- $this->phrases["wc_inline_comments"] = sanitize_text_field($_POST["wc_inline_comments"]);
1522
- $this->phrases["wc_email_text"] = sanitize_text_field($_POST["wc_email_text"]);
1523
- $this->phrases["wc_subscribe_anchor"] = sanitize_text_field($_POST["wc_subscribe_anchor"]);
1524
- $this->phrases["wc_notify_of"] = sanitize_text_field($_POST["wc_notify_of"]);
1525
- $this->phrases["wc_notify_on_new_comment"] = sanitize_text_field($_POST["wc_notify_on_new_comment"]);
1526
- $this->phrases["wc_notify_on_all_new_reply"] = sanitize_text_field($_POST["wc_notify_on_all_new_reply"]);
1527
- $this->phrases["wc_notify_on_new_reply"] = sanitize_text_field($_POST["wc_notify_on_new_reply"]);
1528
- $this->phrases["wc_sort_by"] = sanitize_text_field($_POST["wc_sort_by"]);
1529
- $this->phrases["wc_newest"] = sanitize_text_field($_POST["wc_newest"]);
1530
- $this->phrases["wc_oldest"] = sanitize_text_field($_POST["wc_oldest"]);
1531
- $this->phrases["wc_most_voted"] = sanitize_text_field($_POST["wc_most_voted"]);
1532
- $this->phrases["wc_load_more_submit_text"] = sanitize_text_field($_POST["wc_load_more_submit_text"]);
1533
- $this->phrases["wc_load_rest_comments_submit_text"] = sanitize_text_field($_POST["wc_load_rest_comments_submit_text"]);
1534
- $this->phrases["wc_reply_text"] = sanitize_text_field($_POST["wc_reply_text"]);
1535
- $this->phrases["wc_share_text"] = sanitize_text_field($_POST["wc_share_text"]);
1536
- $this->phrases["wc_edit_text"] = sanitize_text_field($_POST["wc_edit_text"]);
1537
- $this->phrases["wc_share_facebook"] = sanitize_text_field($_POST["wc_share_facebook"]);
1538
- $this->phrases["wc_share_twitter"] = sanitize_text_field($_POST["wc_share_twitter"]);
1539
- $this->phrases["wc_share_whatsapp"] = sanitize_text_field($_POST["wc_share_whatsapp"]);
1540
- $this->phrases["wc_share_vk"] = sanitize_text_field($_POST["wc_share_vk"]);
1541
- $this->phrases["wc_share_ok"] = sanitize_text_field($_POST["wc_share_ok"]);
1542
- $this->phrases["wc_hide_replies_text"] = sanitize_text_field($_POST["wc_hide_replies_text"]);
1543
- $this->phrases["wc_show_replies_text"] = sanitize_text_field($_POST["wc_show_replies_text"]);
1544
- $this->phrases["wc_email_subject"] = sanitize_text_field($_POST["wc_email_subject"]);
1545
- $this->phrases["wc_email_message"] = wp_kses(wpautop($_POST["wc_email_message"]), wp_kses_allowed_html("post"));
1546
- $this->phrases["wc_all_comment_new_reply_subject"] = sanitize_text_field($_POST["wc_all_comment_new_reply_subject"]);
1547
- $this->phrases["wc_all_comment_new_reply_message"] = wp_kses(wpautop($_POST["wc_all_comment_new_reply_message"]), wp_kses_allowed_html("post"));
1548
- $this->phrases["wc_new_reply_email_subject"] = sanitize_text_field($_POST["wc_new_reply_email_subject"]);
1549
- $this->phrases["wc_new_reply_email_message"] = wp_kses(wpautop($_POST["wc_new_reply_email_message"]), wp_kses_allowed_html("post"));
1550
- $this->phrases["wc_subscribed_on_comment"] = sanitize_textarea_field($_POST["wc_subscribed_on_comment"]);
1551
- $this->phrases["wc_subscribed_on_all_comment"] = sanitize_textarea_field($_POST["wc_subscribed_on_all_comment"]);
1552
- $this->phrases["wc_subscribed_on_post"] = sanitize_textarea_field($_POST["wc_subscribed_on_post"]);
1553
- $this->phrases["wc_unsubscribe"] = sanitize_text_field($_POST["wc_unsubscribe"]);
1554
- $this->phrases["wc_ignore_subscription"] = sanitize_text_field($_POST["wc_ignore_subscription"]);
1555
- $this->phrases["wc_unsubscribe_message"] = sanitize_textarea_field($_POST["wc_unsubscribe_message"]);
1556
- $this->phrases["wc_subscribe_message"] = sanitize_textarea_field($_POST["wc_subscribe_message"]);
1557
- $this->phrases["wc_confirm_email"] = sanitize_text_field($_POST["wc_confirm_email"]);
1558
- $this->phrases["wc_comfirm_success_message"] = sanitize_textarea_field($_POST["wc_comfirm_success_message"]);
1559
- $this->phrases["wc_confirm_email_subject"] = sanitize_text_field($_POST["wc_confirm_email_subject"]);
1560
- $this->phrases["wc_confirm_email_message"] = wp_kses(wpautop($_POST["wc_confirm_email_message"]),wp_kses_allowed_html("post"));
1561
- $this->phrases["wc_error_empty_text"] = sanitize_text_field($_POST["wc_error_empty_text"]);
1562
- $this->phrases["wc_error_email_text"] = sanitize_text_field($_POST["wc_error_email_text"]);
1563
- $this->phrases["wc_error_url_text"] = sanitize_text_field($_POST["wc_error_url_text"]);
1564
- $this->phrases["wc_year_text"] = sanitize_text_field($_POST["wc_year_text"]);
1565
- $this->phrases["wc_year_text_plural"] = sanitize_text_field($_POST["wc_year_text_plural"]);
1566
- $this->phrases["wc_month_text"] = sanitize_text_field($_POST["wc_month_text"]);
1567
- $this->phrases["wc_month_text_plural"] = sanitize_text_field($_POST["wc_month_text_plural"]);
1568
- $this->phrases["wc_day_text"] = sanitize_text_field($_POST["wc_day_text"]);
1569
- $this->phrases["wc_day_text_plural"] = sanitize_text_field($_POST["wc_day_text_plural"]);
1570
- $this->phrases["wc_hour_text"] = sanitize_text_field($_POST["wc_hour_text"]);
1571
- $this->phrases["wc_hour_text_plural"] = sanitize_text_field($_POST["wc_hour_text_plural"]);
1572
- $this->phrases["wc_minute_text"] = sanitize_text_field($_POST["wc_minute_text"]);
1573
- $this->phrases["wc_minute_text_plural"] = sanitize_text_field($_POST["wc_minute_text_plural"]);
1574
- $this->phrases["wc_second_text"] = sanitize_text_field($_POST["wc_second_text"]);
1575
- $this->phrases["wc_second_text_plural"] = sanitize_text_field($_POST["wc_second_text_plural"]);
1576
- $this->phrases["wc_right_now_text"] = sanitize_text_field($_POST["wc_right_now_text"]);
1577
- $this->phrases["wc_ago_text"] = sanitize_text_field($_POST["wc_ago_text"]);
1578
- $this->phrases["wc_you_must_be_text"] = sanitize_text_field($_POST["wc_you_must_be_text"]);
1579
- $this->phrases["wc_logged_in_as"] = sanitize_text_field($_POST["wc_logged_in_as"]);
1580
- $this->phrases["wc_log_out"] = sanitize_text_field($_POST["wc_log_out"]);
1581
- $this->phrases["wc_log_in"] = sanitize_text_field($_POST["wc_log_in"]);
1582
- $this->phrases["wc_login_please"] = sanitize_text_field($_POST["wc_login_please"]);
1583
- $this->phrases["wc_logged_in_text"] = sanitize_text_field($_POST["wc_logged_in_text"]);
1584
- $this->phrases["wc_to_post_comment_text"] = sanitize_text_field($_POST["wc_to_post_comment_text"]);
1585
- $this->phrases["wc_vote_counted"] = sanitize_text_field($_POST["wc_vote_counted"]);
1586
- $this->phrases["wc_vote_up"] = sanitize_text_field($_POST["wc_vote_up"]);
1587
- $this->phrases["wc_vote_down"] = sanitize_text_field($_POST["wc_vote_down"]);
1588
- $this->phrases["wc_awaiting_for_approval"] = sanitize_text_field($_POST["wc_awaiting_for_approval"]);
1589
- $this->phrases["wc_vote_only_one_time"] = sanitize_text_field($_POST["wc_vote_only_one_time"]);
1590
- $this->phrases["wc_voting_error"] = sanitize_text_field($_POST["wc_voting_error"]);
1591
- $this->phrases["wc_self_vote"] = sanitize_text_field($_POST["wc_self_vote"]);
1592
- $this->phrases["wc_deny_voting_from_same_ip"] = sanitize_text_field($_POST["wc_deny_voting_from_same_ip"]);
1593
- $this->phrases["wc_login_to_vote"] = sanitize_text_field($_POST["wc_login_to_vote"]);
1594
- $this->phrases["wc_invalid_captcha"] = sanitize_text_field($_POST["wc_invalid_captcha"]);
1595
- $this->phrases["wc_invalid_field"] = sanitize_text_field($_POST["wc_invalid_field"]);
1596
- $this->phrases["wc_comment_not_updated"] = sanitize_text_field($_POST["wc_comment_not_updated"]);
1597
- $this->phrases["wc_comment_edit_not_possible"] = sanitize_text_field($_POST["wc_comment_edit_not_possible"]);
1598
- $this->phrases["wc_comment_not_edited"] = sanitize_text_field($_POST["wc_comment_not_edited"]);
1599
- $this->phrases["wc_comment_edit_save_button"] = sanitize_text_field($_POST["wc_comment_edit_save_button"]);
1600
- $this->phrases["wc_comment_edit_cancel_button"] = sanitize_text_field($_POST["wc_comment_edit_cancel_button"]);
1601
- $this->phrases["wc_msg_input_min_length"] = sanitize_text_field($_POST["wc_msg_input_min_length"]);
1602
- $this->phrases["wc_msg_input_max_length"] = sanitize_text_field($_POST["wc_msg_input_max_length"]);
1603
- $this->phrases["wc_read_more"] = sanitize_text_field($_POST["wc_read_more"]);
1604
- $this->phrases["wc_anonymous"] = sanitize_text_field($_POST["wc_anonymous"]);
1605
- $this->phrases["wc_msg_required_fields"] = sanitize_text_field($_POST["wc_msg_required_fields"]);
1606
- $this->phrases["wc_connect_with"] = sanitize_text_field($_POST["wc_connect_with"]);
1607
- $this->phrases["wc_subscribed_to"] = sanitize_text_field($_POST["wc_subscribed_to"]);
1608
- $this->phrases["wc_form_subscription_submit"] = sanitize_text_field($_POST["wc_form_subscription_submit"]);
1609
- $this->phrases["wc_comment_approved_email_subject"] = sanitize_text_field($_POST["wc_comment_approved_email_subject"]);
1610
- $this->phrases["wc_comment_approved_email_message"] = wp_kses(wpautop($_POST["wc_comment_approved_email_message"]),wp_kses_allowed_html("post"));
1611
- $this->phrases["wc_roles_cannot_comment_message"] = sanitize_text_field($_POST["wc_roles_cannot_comment_message"]);
1612
- $this->phrases["wc_stick_comment_btn_title"] = sanitize_text_field($_POST["wc_stick_comment_btn_title"]);
1613
- $this->phrases["wc_stick_comment"] = sanitize_text_field($_POST["wc_stick_comment"]);
1614
- $this->phrases["wc_unstick_comment"] = sanitize_text_field($_POST["wc_unstick_comment"]);
1615
- $this->phrases["wc_sticky_comment_icon_title"] = sanitize_text_field($_POST["wc_sticky_comment_icon_title"]);
1616
- $this->phrases["wc_close_comment_btn_title"] = sanitize_text_field($_POST["wc_close_comment_btn_title"]);
1617
- $this->phrases["wc_close_comment"] = sanitize_text_field($_POST["wc_close_comment"]);
1618
- $this->phrases["wc_open_comment"] = sanitize_text_field($_POST["wc_open_comment"]);
1619
- $this->phrases["wc_closed_comment_icon_title"] = sanitize_text_field($_POST["wc_closed_comment_icon_title"]);
1620
- $this->phrases["wc_social_login_agreement_label"] = sanitize_text_field($_POST["wc_social_login_agreement_label"]);
1621
- $this->phrases["wc_social_login_agreement_desc"] = wp_kses($_POST["wc_social_login_agreement_desc"], wp_kses_allowed_html("post"));
1622
- $this->phrases["wc_agreement_button_disagree"] = sanitize_text_field($_POST["wc_agreement_button_disagree"]);
1623
- $this->phrases["wc_agreement_button_agree"] = sanitize_text_field($_POST["wc_agreement_button_agree"]);
1624
- $this->phrases["wc_content_and_settings"] = sanitize_text_field($_POST["wc_content_and_settings"]);
1625
- $this->phrases["wc_user_settings_activity"] = sanitize_text_field($_POST["wc_user_settings_activity"]);
1626
- $this->phrases["wc_user_settings_subscriptions"] = sanitize_text_field($_POST["wc_user_settings_subscriptions"]);
1627
- $this->phrases["wc_user_settings_follows"] = sanitize_text_field($_POST["wc_user_settings_follows"]);
1628
- $this->phrases["wc_user_settings_response_to"] = sanitize_text_field($_POST["wc_user_settings_response_to"]);
1629
- $this->phrases["wc_user_settings_email_me_delete_links"] = sanitize_text_field($_POST["wc_user_settings_email_me_delete_links"]);
1630
- $this->phrases["wc_user_settings_email_me_delete_links_desc"] = sanitize_textarea_field($_POST["wc_user_settings_email_me_delete_links_desc"]);
1631
- $this->phrases["wc_user_settings_no_data"] = sanitize_text_field($_POST["wc_user_settings_no_data"]);
1632
- $this->phrases["wc_user_settings_request_deleting_comments"] = sanitize_text_field($_POST["wc_user_settings_request_deleting_comments"]);
1633
- $this->phrases["wc_user_settings_cancel_subscriptions"] = sanitize_text_field($_POST["wc_user_settings_cancel_subscriptions"]);
1634
- $this->phrases["wc_user_settings_clear_cookie"] = sanitize_text_field($_POST["wc_user_settings_clear_cookie"]);
1635
- $this->phrases["wc_user_settings_delete_links"] = sanitize_text_field($_POST["wc_user_settings_delete_links"]);
1636
- $this->phrases["wc_user_settings_delete_all_comments"] = sanitize_text_field($_POST["wc_user_settings_delete_all_comments"]);
1637
- $this->phrases["wc_user_settings_delete_all_comments_message"] = wp_kses(wpautop($_POST["wc_user_settings_delete_all_comments_message"]),wp_kses_allowed_html("post"));
1638
- $this->phrases["wc_user_settings_delete_all_subscriptions"] = sanitize_text_field($_POST["wc_user_settings_delete_all_subscriptions"]);
1639
- $this->phrases["wc_user_settings_delete_all_subscriptions_message"] = wp_kses(wpautop($_POST["wc_user_settings_delete_all_subscriptions_message"]),wp_kses_allowed_html("post"));
1640
- $this->phrases["wc_user_settings_delete_all_follows"] = sanitize_text_field($_POST["wc_user_settings_delete_all_follows"]);
1641
- $this->phrases["wc_user_settings_delete_all_follows_message"] = wp_kses(wpautop($_POST["wc_user_settings_delete_all_follows_message"]),wp_kses_allowed_html("post"));
1642
- $this->phrases["wc_user_settings_subscribed_to_replies"] = sanitize_text_field($_POST["wc_user_settings_subscribed_to_replies"]);
1643
- $this->phrases["wc_user_settings_subscribed_to_replies_own"] = sanitize_text_field($_POST["wc_user_settings_subscribed_to_replies_own"]);
1644
- $this->phrases["wc_user_settings_subscribed_to_all_comments"] = sanitize_text_field($_POST["wc_user_settings_subscribed_to_all_comments"]);
1645
- $this->phrases["wc_user_settings_check_email"] = sanitize_text_field($_POST["wc_user_settings_check_email"]);
1646
- $this->phrases["wc_user_settings_email_error"] = sanitize_text_field($_POST["wc_user_settings_email_error"]);
1647
- $this->phrases["wc_delete_this_comment"] = sanitize_text_field($_POST["wc_delete_this_comment"]);
1648
- $this->phrases["wc_cancel_this_subscription"] = sanitize_text_field($_POST["wc_cancel_this_subscription"]);
1649
- $this->phrases["wc_cancel_this_follow"] = sanitize_text_field($_POST["wc_cancel_this_follow"]);
1650
- $this->phrases["wc_confirm_comment_delete"] = sanitize_text_field($_POST["wc_confirm_comment_delete"]);
1651
- $this->phrases["wc_confirm_cancel_subscription"] = sanitize_text_field($_POST["wc_confirm_cancel_subscription"]);
1652
- $this->phrases["wc_confirm_cancel_follow"] = sanitize_text_field($_POST["wc_confirm_cancel_follow"]);
1653
- $this->phrases["wc_follow_user"] = sanitize_text_field($_POST["wc_follow_user"]);
1654
- $this->phrases["wc_unfollow_user"] = sanitize_text_field($_POST["wc_unfollow_user"]);
1655
- $this->phrases["wc_follow_success"] = sanitize_text_field($_POST["wc_follow_success"]);
1656
- $this->phrases["wc_follow_canceled"] = sanitize_text_field($_POST["wc_follow_canceled"]);
1657
- $this->phrases["wc_follow_email_confirm"] = sanitize_text_field($_POST["wc_follow_email_confirm"]);
1658
- $this->phrases["wc_follow_email_confirm_fail"] = sanitize_text_field($_POST["wc_follow_email_confirm_fail"]);
1659
- $this->phrases["wc_follow_login_to_follow"] = sanitize_text_field($_POST["wc_follow_login_to_follow"]);
1660
- $this->phrases["wc_follow_impossible"] = sanitize_text_field($_POST["wc_follow_impossible"]);
1661
- $this->phrases["wc_follow_not_added"] = sanitize_text_field($_POST["wc_follow_not_added"]);
1662
- $this->phrases["wc_follow_confirm"] = sanitize_text_field($_POST["wc_follow_confirm"]);
1663
- $this->phrases["wc_follow_cancel"] = sanitize_text_field($_POST["wc_follow_cancel"]);
1664
- $this->phrases["wc_follow_confirm_email_subject"] = sanitize_text_field($_POST["wc_follow_confirm_email_subject"]);
1665
- $this->phrases["wc_follow_confirm_email_message"] = wp_kses(wpautop($_POST["wc_follow_confirm_email_message"]),wp_kses_allowed_html("post"));
1666
- $this->phrases["wc_follow_email_subject"] = sanitize_text_field($_POST["wc_follow_email_subject"]);
1667
- $this->phrases["wc_follow_email_message"] = wp_kses(wpautop($_POST["wc_follow_email_message"]),wp_kses_allowed_html("post"));
1668
- $this->phrases["wc_mentioned_email_subject"] = sanitize_text_field($_POST["wc_mentioned_email_subject"]);
1669
- $this->phrases["wc_mentioned_email_message"] = wp_kses(wpautop($_POST["wc_mentioned_email_message"]),wp_kses_allowed_html("post"));
1670
- $this->phrases["wc_copied_to_clipboard"] = sanitize_text_field($_POST["wc_copied_to_clipboard"]);
1671
- $this->phrases["wc_feedback_shortcode_tooltip"] = sanitize_text_field($_POST["wc_feedback_shortcode_tooltip"]);
1672
- $this->phrases["wc_feedback_popup_title"] = sanitize_text_field($_POST["wc_feedback_popup_title"]);
1673
- $this->phrases["wc_please_leave_feebdack"] = sanitize_text_field($_POST["wc_please_leave_feebdack"]);
1674
- $this->phrases["wc_feedback_content_text"] = sanitize_text_field($_POST["wc_feedback_content_text"]);
1675
- $this->phrases["wc_feedback_comment_success"] = sanitize_text_field($_POST["wc_feedback_comment_success"]);
1676
- $this->phrases["wc_commenting_is_closed"] = sanitize_text_field($_POST["wc_commenting_is_closed"]);
1677
- $this->phrases["wc_closed_comment_thread"] = sanitize_text_field($_POST["wc_closed_comment_thread"]);
1678
- $this->phrases["wc_bubble_invite_message"] = sanitize_text_field($_POST["wc_bubble_invite_message"]);
1679
- $this->phrases["wc_vote_phrase"] = sanitize_text_field($_POST["wc_vote_phrase"]);
1680
- $this->phrases["wc_votes_phrase"] = sanitize_text_field($_POST["wc_votes_phrase"]);
1681
- $this->phrases["wc_comment_link"] = sanitize_text_field($_POST["wc_comment_link"]);
1682
- $this->phrases["wc_not_allowed_to_comment_more_than"] = sanitize_text_field($_POST["wc_not_allowed_to_comment_more_than"]);
1683
- $this->phrases["wc_not_allowed_to_create_comment_thread_more_than"] = sanitize_text_field($_POST["wc_not_allowed_to_create_comment_thread_more_than"]);
1684
- $this->phrases["wc_not_allowed_to_reply_more_than"] = sanitize_text_field($_POST["wc_not_allowed_to_reply_more_than"]);
1685
- $this->phrases["wc_inline_form_comment"] = sanitize_text_field($_POST["wc_inline_form_comment"]);
1686
- $this->phrases["wc_inline_form_notify"] = sanitize_text_field($_POST["wc_inline_form_notify"]);
1687
- $this->phrases["wc_inline_form_name"] = sanitize_text_field($_POST["wc_inline_form_name"]);
1688
- $this->phrases["wc_inline_form_email"] = sanitize_text_field($_POST["wc_inline_form_email"]);
1689
- $this->phrases["wc_inline_form_comment_button"] = sanitize_text_field($_POST["wc_inline_form_comment_button"]);
1690
- $this->phrases["wc_inline_comments_view_all"] = sanitize_text_field($_POST["wc_inline_comments_view_all"]);
1691
- $this->phrases["wc_inline_feedbacks"] = sanitize_text_field($_POST["wc_inline_feedbacks"]);
1692
- $this->phrases["wc_unable_sent_email"] = sanitize_text_field($_POST["wc_unable_sent_email"]);
1693
- $this->phrases["wc_subscription_fault"] = sanitize_text_field($_POST["wc_subscription_fault"]);
1694
- $this->phrases["wc_comments_are_deleted"] = sanitize_text_field($_POST["wc_comments_are_deleted"]);
1695
- $this->phrases["wc_cancel_subs_success"] = sanitize_text_field($_POST["wc_cancel_subs_success"]);
1696
- $this->phrases["wc_cancel_follows_success"] = sanitize_text_field($_POST["wc_cancel_follows_success"]);
1697
- $this->phrases["wc_follow_confirm_success"] = sanitize_text_field($_POST["wc_follow_confirm_success"]);
1698
- $this->phrases["wc_follow_cancel_success"] = sanitize_text_field($_POST["wc_follow_cancel_success"]);
1699
- $this->phrases["wc_login_to_comment"] = sanitize_text_field($_POST["wc_login_to_comment"]);
1700
- $this->phrases["wc_view_comments"] = sanitize_text_field($_POST["wc_view_comments"]);
1701
- $this->phrases["wc_spoiler"] = sanitize_text_field($_POST["wc_spoiler"]);
1702
- $this->phrases["wc_last_edited"] = sanitize_text_field($_POST["wc_last_edited"]);
1703
- $this->phrases["wc_reply_to"] = sanitize_text_field($_POST["wc_reply_to"]);
1704
- $this->phrases["wc_manage_comment"] = sanitize_text_field($_POST["wc_manage_comment"]);
1705
- $this->phrases["wc_spoiler_title"] = sanitize_text_field($_POST["wc_spoiler_title"]);
1706
- $this->phrases["wc_cannot_rate_again"] = sanitize_text_field($_POST["wc_cannot_rate_again"]);
1707
- $this->phrases["wc_not_allowed_to_rate"] = sanitize_text_field($_POST["wc_not_allowed_to_rate"]);
1708
- // Media Upload //
1709
- $this->phrases["wmuPhraseConfirmDelete"] = sanitize_text_field($_POST["wmuPhraseConfirmDelete"]);
1710
- $this->phrases["wmuPhraseNotAllowedFile"] = sanitize_text_field($_POST["wmuPhraseNotAllowedFile"]);
1711
- $this->phrases["wmuPhraseMaxFileCount"] = sanitize_text_field($_POST["wmuPhraseMaxFileCount"]);
1712
- $this->phrases["wmuPhraseMaxFileSize"] = sanitize_text_field($_POST["wmuPhraseMaxFileSize"]);
1713
- $this->phrases["wmuPhrasePostMaxSize"] = sanitize_text_field($_POST["wmuPhrasePostMaxSize"]);
1714
- $this->phrases["wmuAttachImage"] = sanitize_text_field($_POST["wmuAttachImage"]);
1715
- $this->phrases["wmuChangeImage"] = sanitize_text_field($_POST["wmuChangeImage"]);
1716
 
1717
- if (class_exists("Prompt_Comment_Form_Handling") && $this->subscription["usePostmaticForCommentNotification"]) {
1718
- $this->phrases["wc_postmatic_subscription_label"] = sanitize_text_field($_POST["wc_postmatic_subscription_label"]);
1719
- }
1720
- foreach ($this->labels["blogRoles"] as $roleName => $roleVal) {
1721
- $this->phrases["wc_blog_role_" . $roleName] = sanitize_text_field($_POST["wc_blog_role_" . $roleName]);
1722
- }
1723
- $this->dbManager->updatePhrases($this->phrases);
1724
- }
1725
- }
1726
 
1727
- public function resetOptions() {
1728
- if (isset($_GET["_wpnonce"]) && isset($_GET["wpdiscuz_reset_options"]) && !empty($_GET["page"]) && !empty($_GET["wpd_tab"]) && ($resetTab = sanitize_key($_GET["wpd_tab"])) && $_GET["wpdiscuz_reset_options"] == 1 && $_GET["page"] == WpdiscuzCore::PAGE_SETTINGS && current_user_can("manage_options") && wp_verify_nonce($_GET["_wpnonce"], "wpdiscuz_reset_options_nonce-" . $resetTab)) {
 
1729
 
1730
- $roleColors = [
1731
- "guest" => "#898989",
1732
- "post_author" => "#07B290",
1733
- "administrator" => "#ff451f",
1734
- "editor" => "#d36000",
1735
- "author" => "#327324",
1736
- "contributor" => "#a240cd",
1737
- "subscriber" => "#31839e",
1738
- ];
1739
 
1740
- if ($resetTab === "all") {
1741
- delete_option(self::OPTION_SLUG_OPTIONS);
1742
- $this->addOptions();
1743
- $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
1744
- $this->general["showPluginPoweredByLink"] = 1;
1745
- $blogRoles = get_editable_roles();
1746
- $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1747
- $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1748
- $this->labels["blogRoleLabels"]["post_author"] = 1;
1749
- $this->labels["blogRoleLabels"]["guest"] = 0;
1750
- foreach ($blogRoles as $roleName => $roleInfo) {
1751
- $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1752
- $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1753
- }
1754
- $this->updateOptions();
1755
- } else if (isset($this->{$resetTab})) {
1756
- $defaultOptions = $this->getDefaultOptions();
1757
- $this->{$resetTab} = $defaultOptions[sanitize_text_field($_GET["wpd_tab"])];
1758
- if ($resetTab === WpdiscuzCore::TAB_GENERAL) {
1759
- $this->general["showPluginPoweredByLink"] = 1;
1760
- } else if ($resetTab === WpdiscuzCore::TAB_LABELS) {
1761
- $blogRoles = get_editable_roles();
1762
- $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1763
- $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1764
- $this->labels["blogRoleLabels"]["post_author"] = 1;
1765
- $this->labels["blogRoleLabels"]["guest"] = 0;
1766
- foreach ($blogRoles as $roleName => $roleInfo) {
1767
- $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1768
- $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1769
- }
1770
- }
1771
- $this->updateOptions();
1772
- }
1773
- do_action("wpdiscuz_reset_options", $resetTab);
1774
- do_action("wpdiscuz_reset_comments_cache");
1775
- do_action("wpdiscuz_reset_users_cache");
1776
- }
1777
- }
1778
 
1779
- public function mainOptionsForm() {
1780
- if (isset($_POST["wc_submit_options"])) {
1781
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Settings updated", "wpdiscuz"), "updated");
1782
- }
1783
- include_once WPDISCUZ_DIR_PATH . "/options/html-options.php";
1784
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1785
 
1786
- public function phrasesOptionsForm() {
1787
- if (isset($_POST["wc_submit_phrases"])) {
1788
- add_settings_error("wpdiscuz", "phrases_updated", esc_html__("Phrases updated", "wpdiscuz"), "updated");
1789
- }
1790
- $this->initPhrasesOnLoad();
1791
- include_once WPDISCUZ_DIR_PATH . "/options/html-phrases.php";
1792
- }
1793
 
1794
- public function tools() {
1795
- if (current_user_can("manage_options")) {
 
 
 
 
1796
 
1797
- $wpUploadsDir = wp_upload_dir();
1798
- $wpdiscuzOptionsDir = $wpUploadsDir["basedir"] . self::OPTIONS_DIR;
1799
- $wpdiscuzOptionsUrl = $wpUploadsDir["baseurl"] . self::OPTIONS_DIR;
 
 
 
 
1800
 
1801
- if (isset($_POST["tools-action"])) {
 
1802
 
1803
- $action = $_POST["tools-action"];
 
 
1804
 
1805
- if ($action === "export-options") {
1806
- check_admin_referer("wc_tools_form", "wpd-options-export");
1807
- wp_mkdir_p($wpdiscuzOptionsDir);
1808
- $options = @maybe_unserialize(get_option(self::OPTION_SLUG_OPTIONS));
1809
- if ($options) {
1810
- $json = json_encode($options);
1811
- if (file_put_contents($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt", $json)) {
1812
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options were backed up!", "wpdiscuz"), "updated");
1813
- } else {
1814
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the options!", "wpdiscuz"), "error");
1815
- }
1816
- }
1817
- } else if ($action === "import-options") {
1818
- check_admin_referer("wc_tools_form", "wpd-options-import");
1819
- $file = isset($_FILES["wpdiscuz-options-file"]) ? $_FILES["wpdiscuz-options-file"] : "";
1820
- if ($file && is_array($file) && isset($file["tmp_name"])) {
1821
- if ($data = file_get_contents($file["tmp_name"])) {
1822
- $options = json_decode($data, true);
1823
- if ($options && is_array($options)) {
1824
- update_option(self::OPTION_SLUG_OPTIONS, $this->replaceOldOptions($options, false));
1825
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options Imported Successfully!", "wpdiscuz"), "updated");
1826
- } else {
1827
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1828
- }
1829
- } else {
1830
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1831
- }
1832
- } else {
1833
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1834
- }
1835
- } else if ($action === "export-phrases") {
1836
- check_admin_referer("wc_tools_form", "wpd-phrases-export");
1837
- wp_mkdir_p($wpdiscuzOptionsDir);
1838
- $phrases = $this->dbManager->getPhrases();
1839
- if ($phrases) {
1840
- $json = json_encode($phrases);
1841
- if (file_put_contents($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt", $json)) {
1842
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases were backed up!", "wpdiscuz"), "updated");
1843
- } else {
1844
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the phrases!", "wpdiscuz"), "error");
1845
- }
1846
- }
1847
- } else if ($action === "import-phrases") {
1848
- check_admin_referer("wc_tools_form", "wpd-phrases-import");
1849
- $file = isset($_FILES["wpdiscuz-phrases-file"]) ? $_FILES["wpdiscuz-phrases-file"] : "";
1850
- if ($file && is_array($file) && isset($file["tmp_name"])) {
1851
- if ($data = file_get_contents($file["tmp_name"])) {
1852
- $phrases = json_decode($data, true);
1853
- if ($phrases && is_array($phrases)) {
1854
- $this->dbManager->updatePhrases($phrases);
1855
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases Imported Successfully!", "wpdiscuz"), "updated");
1856
- } else {
1857
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1858
- }
1859
- } else {
1860
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1861
- }
1862
- } else {
1863
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1864
- }
1865
- }
1866
- }
1867
- } else {
1868
- die(esc_html_e("Hacker?", "wpdiscuz"));
1869
- }
1870
- include_once WPDISCUZ_DIR_PATH . "/options/html-tools.php";
1871
- }
1872
 
1873
- public function addons() {
1874
- include_once WPDISCUZ_DIR_PATH . "/options/html-addons.php";
1875
- }
1876
 
1877
- private function initAddons() {
1878
- $this->addons = [
1879
- "bundle" => [
1880
- "version" => "7.0.0",
1881
- "requires" => "7.0.0",
1882
- "class" => "Bundle",
1883
- "title" => "Addons Bundle",
1884
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/bundle/header.png"),
1885
- "desc" => esc_html__("All 16 addons in one bundle. Save 90% and get Unlimited Site License with one year premium support.", "wpdiscuz"),
1886
- "url" => "https://gvectors.com/product/wpdiscuz-addons-bundle/",
1887
- ],
1888
- "notifications" => [
1889
- "version" => "1.0.0",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1890
  "requires" => "7.3.7",
1891
- "class" => "WunDBManager",
1892
- "title" => "User Notifications",
1893
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/notifications/header.png"),
1894
- "desc" => esc_html__("Ads a real-time user notification system and web push notifications in your website.", "wpdiscuz"),
1895
- "url" => "https://gvectors.com/product/wpdiscuz-user-notifications/",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1896
  ],
1897
- "buddypress" => [
1898
- "version" => "1.0.2",
1899
- "requires" => "7.2.0",
1900
- "class" => "wpDiscuzBPIntegration",
1901
- "title" => "BuddyPress Integration",
1902
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/buddypress/header.png"),
1903
- "desc" => esc_html__("Integrates wpDiscuz with BuddyPress plugin. Profile Tabs, Notifications, Activities, etc...", "wpdiscuz"),
1904
- "url" => "https://gvectors.com/product/wpdiscuz-buddypress-integration/",
1905
- ],
1906
- "voice" => [
1907
- "version" => "1.0.0",
1908
- "requires" => "7.2.0",
1909
- "class" => "wpDiscuzAudioComment",
1910
- "title" => "Voice Commenting",
1911
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/voice/header.png"),
1912
- "desc" => esc_html__("Allows to discuss with your voice in the comment section. Adds a microphone button to the comment form.", "wpdiscuz"),
1913
- "url" => "https://gvectors.com/product/wpdiscuz-voice-commenting/",
1914
- ],
1915
- "tenor" => [
1916
- "version" => "1.0.4",
1917
- "requires" => "7.2.0",
1918
- "class" => "wpDiscuzTenorIntegration",
1919
- "title" => "Tenor GIFs Integration",
1920
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/tenor/header.png"),
1921
- "desc" => esc_html__("Adds Tenor [GIF] button and opens popup where you can search for gifs and insert them in comment content.", "wpdiscuz"),
1922
- "url" => "https://gvectors.com/product/wpdiscuz-tenor-integration/",
1923
- ],
1924
- "giphy" => [
1925
- "version" => "1.0.0",
1926
- "requires" => "7.2.0",
1927
- "class" => "wpDiscuzGiphyIntegration",
1928
- "title" => "GIPHY Integration",
1929
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/giphy/header.png"),
1930
- "desc" => esc_html__("Adds Giphy [GIF] button and opens popup where you can search for gifs and insert them in comment content.", "wpdiscuz"),
1931
- "url" => "https://gvectors.com/product/wpdiscuz-giphy-integration/",
1932
- ],
1933
- "uploader" => [
1934
- "version" => "7.0.0",
1935
- "requires" => "7.0.0",
1936
- "class" => "WpdiscuzMediaUploader",
1937
- "title" => "Media Uploader",
1938
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
1939
- "desc" => esc_html__("Extended comment attachment system. Allows to upload images, videos, audios and other file types.", "wpdiscuz"),
1940
- "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/",
1941
- ],
1942
- "embeds" => [
1943
- "version" => "1.0.0",
1944
- "requires" => "7.0.0",
1945
- "class" => "WpdiscuzEmbeds",
1946
- "title" => "Embeds",
1947
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/embeds/header.png"),
1948
- "desc" => esc_html__("Allows to embed lots of video, social network, audio and photo content providers URLs in comment content.", "wpdiscuz"),
1949
- "url" => "https://gvectors.com/product/wpdiscuz-embeds/",
1950
- ],
1951
- "syntax" => [
1952
- "version" => "1.0.0",
1953
- "requires" => "7.0.0",
1954
- "class" => "wpDiscuzSyntaxHighlighter",
1955
- "title" => "Syntax Highlighter",
1956
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/syntax/header.png"),
1957
- "desc" => esc_html__("Syntax highlighting for comments, automatic language detection and multi-language code highlighting.", "wpdiscuz"),
1958
- "url" => "https://gvectors.com/product/wpdiscuz-syntax-highlighter/",
1959
- ],
1960
- "frontend-moderation" => [
1961
- "version" => "7.0.0",
1962
- "requires" => "7.0.0",
1963
- "class" => "wpDiscuzFrontEndModeration",
1964
- "title" => "Front-end Moderation",
1965
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
1966
- "desc" => esc_html__("All in one powerful yet simple admin toolkit to moderate comments on front-end.", "wpdiscuz"),
1967
- "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/",
1968
- ],
1969
- "emoticons" => [
1970
- "version" => "7.0.0",
1971
- "requires" => "7.0.0",
1972
- "class" => "wpDiscuzSmile",
1973
- "title" => "Emoticons",
1974
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
1975
- "desc" => esc_html__("Brings an ocean of emotions to your comments. It comes with an awesome smile package.", "wpdiscuz"),
1976
- "url" => "https://gvectors.com/product/wpdiscuz-emoticons/",
1977
- ],
1978
- "recaptcha" => [
1979
- "version" => "7.0.0",
1980
- "requires" => "7.0.0",
1981
- "class" => "WpdiscuzRecaptcha",
1982
- "title" => "Invisible reCAPTCHA v3",
1983
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
1984
- "desc" => esc_html__("Adds Invisible reCAPTCHA on all comment forms. Stops spam and bot comments with reCAPTCHA version 3", "wpdiscuz"),
1985
- "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/",
1986
- ],
1987
- "author-info" => [
1988
- "version" => "7.0.0",
1989
- "requires" => "7.0.0",
1990
- "class" => "WpdiscuzCommentAuthorInfo",
1991
- "title" => "Comment Author Info",
1992
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/author-info/header.png"),
1993
- "desc" => esc_html__("Extended information about comment author with Profile, Activity, Votes and Subscriptions Tabs on pop-up window.", "wpdiscuz"),
1994
- "url" => "https://gvectors.com/product/wpdiscuz-comment-author-info/",
1995
- ],
1996
- "report-flagging" => [
1997
- "version" => "7.0.0",
1998
- "requires" => "7.0.0",
1999
- "class" => "wpDiscuzFlagComment",
2000
- "title" => "Report and Flagging",
2001
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
2002
- "desc" => esc_html__("Comment reporting tools. Auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
2003
- "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/",
2004
- ],
2005
- "online-users" => [
2006
- "version" => "7.0.0",
2007
- "requires" => "7.0.0",
2008
- "class" => "WpdiscuzOnlineUsers",
2009
- "title" => "Online Users",
2010
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/online-users/header.png"),
2011
- "desc" => esc_html__("Real-time online user checking, pop-up notification of new online users and online/offline badges.", "wpdiscuz"),
2012
- "url" => "https://gvectors.com/product/wpdiscuz-online-users/",
2013
- ],
2014
- "private" => [
2015
- "version" => "7.0.0",
2016
- "requires" => "7.0.0",
2017
- "class" => "wpDiscuzPrivateComment",
2018
- "title" => "Private Comments",
2019
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/private/header.png"),
2020
- "desc" => esc_html__("Allows to create private comment threads. Rich management options in dashboard by user roles.", "wpdiscuz"),
2021
- "url" => "https://gvectors.com/product/wpdiscuz-private-comments/",
2022
- ],
2023
- "subscriptions" => [
2024
- "version" => "7.0.0",
2025
- "requires" => "7.0.0",
2026
- "class" => "wpdSubscribeManager",
2027
- "title" => "Subscription Manager",
2028
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/subscriptions/header.png"),
2029
- "desc" => esc_html__("Total control over comment subscriptions. Full list, monitor, manage, filter, unsubscribe, confirm...", "wpdiscuz"),
2030
- "url" => "https://gvectors.com/product/wpdiscuz-subscribe-manager/",
2031
- ],
2032
- "ads-manager" => [
2033
- "version" => "7.0.0",
2034
- "requires" => "7.0.0",
2035
- "class" => "WpdiscuzAdsManager",
2036
- "title" => "Ads Manager",
2037
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
2038
- "desc" => esc_html__("A full-fledged tool-kit for advertising in comment section of your website. Separate banner and ad managment.", "wpdiscuz"),
2039
- "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/",
2040
- ],
2041
- "user-mention" => [
2042
- "version" => "7.0.0",
2043
- "requires" => "7.0.0",
2044
- "class" => "WpdiscuzUCM",
2045
- "title" => "User &amp; Comment Mentioning",
2046
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
2047
- "desc" => esc_html__("Allows to mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
2048
- "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/",
2049
- ],
2050
- "likers" => [
2051
- "version" => "7.0.0",
2052
- "requires" => "7.0.0",
2053
- "class" => "WpdiscuzVoters",
2054
- "title" => "Advanced Likers",
2055
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
2056
- "desc" => esc_html__("See comment likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
2057
- "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/",
2058
- ],
2059
- "search" => [
2060
- "version" => "7.0.0",
2061
- "requires" => "7.0.0",
2062
- "class" => "wpDiscuzCommentSearch",
2063
- "title" => "Comment Search",
2064
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
2065
- "desc" => esc_html__("AJAX powered front-end comment search. It starts searching while you type search words. ", "wpdiscuz"),
2066
- "url" => "https://gvectors.com/product/wpdiscuz-comment-search/",
2067
- ],
2068
- "widgets" => [
2069
- "version" => "7.0.0",
2070
- "requires" => "7.0.0",
2071
- "class" => "wpDiscuzWidgets",
2072
- "title" => "wpDiscuz Widgets",
2073
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
2074
- "desc" => esc_html__("Most voted comments, Active comment threads, Most commented posts, Active comment authors", "wpdiscuz"),
2075
- "url" => "https://gvectors.com/product/wpdiscuz-widgets/",
2076
- ],
2077
- "mycred" => [
2078
- "version" => "7.0.0",
2079
- "requires" => "7.0.0",
2080
- "class" => "myCRED_Hook_wpDiscuz_Vote",
2081
- "title" => "myCRED Integration",
2082
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/mycred/header.png"),
2083
- "desc" => esc_html__("Integrates myCRED Badges and Ranks. Converts wpDiscuz comment votes/likes to myCRED points. ", "wpdiscuz"),
2084
- "url" => "https://gvectors.com/product/wpdiscuz-mycred/",
2085
- ],
2086
- ];
2087
- }
2088
 
2089
- private function initTips() {
2090
- $this->tips = [
2091
- "custom-form" => [
2092
- "title" => esc_html__("Custom Comment Forms", "wpdiscuz"),
2093
- "text" => esc_html__("You can create custom comment forms with wpDiscuz. wpDiscuz 4 comes with custom comment forms and fields. You can create custom comment forms for each post type, each form can beceated with different form fields, for eaxample: text, dropdown, rating, checkboxes, etc...", "wpdiscuz"),
2094
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/tips/custom-form.png"),
2095
- "url" => admin_url() . "edit.php?post_type=wpdiscuz_form",
2096
- ],
2097
- "emoticons" => [
2098
- "title" => esc_html__("Emoticons", "wpdiscuz"),
2099
- "text" => esc_html__("You can add more emotions to your comments using wpDiscuz Emoticons addon.", "wpdiscuz"),
2100
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
2101
- "url" => "https://gvectors.com/product/wpdiscuz-emoticons/",
2102
- ],
2103
- "ads-manager" => [
2104
- "title" => esc_html__("Ads Manager", "wpdiscuz"),
2105
- "text" => esc_html__("Increase your income using ad banners. Comment area is the most active sections for advertising. wpDiscuz Ads Manager addon is designed to help you add banners and control ads in this section.", "wpdiscuz"),
2106
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
2107
- "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/",
2108
- ],
2109
- "user-mention" => [
2110
- "title" => esc_html__("User and Comment Mentioning", "wpdiscuz"),
2111
- "text" => esc_html__("Using wpDiscuz User &amp; Comment Mentioning addon you can allow commenters mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
2112
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
2113
- "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/",
2114
- ],
2115
- "likers" => [
2116
- "title" => esc_html__("Advanced Likers", "wpdiscuz"),
2117
- "text" => esc_html__("wpDiscuz Advanced Likers addon displays likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
2118
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
2119
- "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/",
2120
- ],
2121
- "report-flagging" => [
2122
- "title" => esc_html__("Report and Flagging", "wpdiscuz"),
2123
- "text" => esc_html__("Let your commenters help you to determine and remove spam comments. wpDiscuz Report and Flagging addon comes with comment reporting tools. Automaticaly auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
2124
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
2125
- "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/",
2126
- ],
2127
- "translate" => [
2128
- "title" => esc_html__("Comment Translate", "wpdiscuz"),
2129
- "text" => esc_html__("In most cases the big part of your visitors are not a native speakers of your language. Make your comments comprehensible for all visitors using wpDiscuz Comment Translation addon. It adds smart and intuitive AJAX 'Translate' button with 60 language translation options. Uses free translation API.", "wpdiscuz"),
2130
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"),
2131
- "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/",
2132
- ],
2133
- "search" => [
2134
- "title" => esc_html__("Comment Search", "wpdiscuz"),
2135
- "text" => esc_html__("You can let website visitor search in comments. It's always more attractive to find a comment about something that interest you. Using wpDiscuz Comment Search addon you'll get a nice, AJAX powered front-end comment search form above comment list.", "wpdiscuz"),
2136
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
2137
- "url" => "https://gvectors.com/product/wpdiscuz-comment-search/",
2138
- ],
2139
- "widgets" => [
2140
- "title" => esc_html__("wpDiscuz Widgets", "wpdiscuz"),
2141
- "text" => esc_html__("More Comment Widgets! Most voted comments, Active comment threads, Most commented posts, Active comment authors widgets are available in wpDiscuz Widgets Addon", "wpdiscuz"),
2142
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
2143
- "url" => "https://gvectors.com/product/wpdiscuz-widgets/",
2144
- ],
2145
- "frontend-moderation" => [
2146
- "title" => esc_html__("Front-end Moderation", "wpdiscuz"),
2147
- "text" => esc_html__("You can moderate comments on front-end using all in one powerful yet simple wpDiscuz Frontend Moderation addon.", "wpdiscuz"),
2148
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
2149
- "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/",
2150
- ],
2151
- "uploader" => [
2152
- "title" => esc_html__("Media Uploader", "wpdiscuz"),
2153
- "text" => esc_html__("You can let website visitors attach images and files to comments and embed video/audio content using wpDiscuz Media Uploader addon.", "wpdiscuz"),
2154
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
2155
- "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/",
2156
- ],
2157
- "recaptcha" => [
2158
- "title" => esc_html__("Google ReCaptcha", "wpdiscuz"),
2159
- "text" => esc_html__("Advanced spam protection with wpDiscuz Google reCAPTCHA addon. This addon adds No-CAPTCHA reCAPTCHA on all comment forms. Stops spam and bot comments.", "wpdiscuz"),
2160
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
2161
- "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/",
2162
- ],
2163
- ];
2164
- }
2165
 
2166
- private function addonNote() {
2167
- if ((!empty($_GET["page"]) && in_array($_GET["page"], [
2168
- self::PAGE_WPDISCUZ,
2169
- self::PAGE_SETTINGS,
2170
- self::PAGE_PHRASES,
2171
- self::PAGE_TOOLS,
2172
- self::PAGE_ADDONS,
2173
- ])) || strpos($_SERVER["REQUEST_URI"], "edit.php?post_type=wpdiscuz_form") !== false) {
2174
- $lastHash = get_option("wpdiscuz-addon-note-dismissed");
2175
- $lastHashArray = explode(",", $lastHash);
2176
- $currentHash = "BuddyPress Integration, Tenor GIFs Integration, Voice Commenting, GIPHY Integration, User Notifications";
2177
- if ($lastHash !== $currentHash
2178
- && ( !in_array("BuddyPress Integration", $lastHashArray)
2179
- || !in_array("Tenor GIFs Integration", $lastHashArray)
2180
- || !in_array("Voice Commenting", $lastHashArray)
2181
- || !in_array("GIPHY Integration", $lastHashArray)
2182
- || !in_array("User Notifications", $lastHashArray))
2183
- ) {
2184
- ?>
2185
  <div class="updated notice wpdiscuz_addon_note is-dismissible" style="margin-top:10px;">
2186
  <p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; clear: both;">
2187
- <?php esc_html_e("New wpDiscuz addon!"); ?>
2188
  </p>
2189
  <div style="font-size:14px;">
2190
- <!-- --><?php //if(!in_array("BuddyPress Integration", $lastHashArray)): ?>
2191
- <!-- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">-->
2192
- <!-- <img src="--><?php //echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/buddypress/header.png"); ?><!--" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>-->
2193
- <!-- <a href="https://gvectors.com/product/wpdiscuz-buddypress-integration/" target="_blank" style="color:#444; text-decoration:none;" title="--><?php //esc_attr_e("Go to the addon page", "wpdiscuz"); ?><!--">wpDiscuz - BuddyPress Integration <br><span style="margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">This addon integrates wpDiscuz with BuddyPress plugin. Creates &laquoDiscussion&raquo; tab in the users profile page, intgartes notifications, activities, and more...</span></a>-->
2194
- <!-- </div>-->
2195
- <!-- --><?php //endif; ?>
2196
- <?php if(!in_array("User Notifications", $lastHashArray)): ?>
2197
  <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">
2198
  <img src="<?php echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/notifications/header.png"); ?>" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>
2199
  <a href="https://gvectors.com/product/wpdiscuz-user-notifications/" target="_blank" style="color:#444; text-decoration:none;" title="<?php esc_attr_e("Go to the addon page", "wpdiscuz"); ?>">wpDiscuz - User Notifications <br><span style="width: 60%; margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">Adds a real-time user notification system to your site, so users can receive updates and notifications directly on your website as they happen (when someone likes your comment, rates your post, mentions you, replies to your comment).</span></a>
2200
  </div>
2201
- <?php endif; ?>
2202
- <!-- --><?php //if(!in_array("GIPHY Integration", $lastHashArray)): ?>
2203
- <!-- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">-->
2204
- <!-- <img src="--><?php //echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/giphy/header.png"); ?><!--" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>-->
2205
- <!-- <a href="https://gvectors.com/product/wpdiscuz-giphy-integration/" target="_blank" style="color:#444; text-decoration:none;" title="--><?php //esc_attr_e("Go to the addon page", "wpdiscuz"); ?><!--">wpDiscuz - GIPHY Integration <br><span style="margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">This adds GIPHY [GIF] button on the toolbar of comment editor. Clicking this will open a new popup where you can search for your favorite gifs and insert them in your comment content.</span></a>-->
2206
- <!-- </div>-->
2207
- <!-- --><?php //endif; ?>
2208
- <!-- --><?php //if(!in_array("Tenor GIFs Integration", $lastHashArray)): ?>
2209
- <!-- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">-->
2210
- <!-- <img src="--><?php //echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/tenor/header.png"); ?><!--" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>-->
2211
- <!-- <a href="https://gvectors.com/product/wpdiscuz-tenor-integration/" target="_blank" style="color:#444; text-decoration:none;" title="--><?php //esc_attr_e("Go to the addon page", "wpdiscuz"); ?><!--">wpDiscuz - Tenor GIFs Integration <br><span style="margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">This adds Tenor [GIF] button on the toolbar of comment editor. Clicking this will open a new popup where you can search for your favorite gifs and insert them in your comment content.</span></a>-->
2212
- <!-- </div>-->
2213
- <!-- --><?php //endif; ?>
2214
  <div style="clear:both;"></div>
2215
  </div>
2216
  <p>&nbsp;&nbsp;&nbsp;<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_ADDONS)); ?>"><?php esc_html_e("Go to wpDiscuz Addons subMenu"); ?> &raquo;</a></p>
2217
  </div>
2218
- <?php
2219
- }
2220
- }
2221
- }
2222
 
2223
- public function dismissAddonNote() {
2224
- $hash = $this->addonHash();
2225
- update_option("wpdiscuz-addon-note-dismissed", $hash);
2226
- exit();
2227
- }
2228
 
2229
- public function dismissTipNote() {
2230
- $hash = $this->tipHash();
2231
- update_option("wpdiscuz-tip-note-dismissed", $hash);
2232
- exit();
2233
- }
2234
 
2235
- public function dismissAddonNoteOnPage() {
2236
- $hash = $this->addonHash();
2237
- update_option("wpdiscuz-addon-note-dismissed", $hash);
2238
- }
2239
 
2240
- public function addonHash() {
2241
- $viewed = "BuddyPress Integration, Tenor GIFs Integration, Voice Commenting, GIPHY Integration, User Notifications";
2242
  // foreach ($this->addons as $key => $addon) {
2243
  // $viewed .= $addon["title"] . ",";
2244
  // }
2245
- $hash = $viewed;
2246
- return $hash;
2247
- }
2248
 
2249
- public function tipHash() {
2250
  $viewed = "BuddyPress Integration, Tenor GIFs Integration, Voice Commenting, GIPHY Integration, wpDiscuz - User Notifications";
2251
  // foreach ($this->tips as $key => $tip) {
2252
  // $viewed .= $tip["title"] . ",";
2253
  // }
2254
- $hash = $viewed;
2255
- return $hash;
2256
- }
2257
 
2258
- public function tipDisplayed() {
2259
- $tipTtile = substr(strip_tags($_GET["tip"]), 0, 100);
2260
- $lastHash = get_option("wpdiscuz-tip-note-dismissed");
2261
- if ($lastHash) {
2262
- $lastHashArray = explode(",", $lastHash);
2263
- } else {
2264
- $lastHashArray = [];
2265
- }
2266
- $lastHashArray[] = $tipTtile;
2267
- $hash = implode(",", $lastHashArray);
2268
- return $hash;
2269
- }
2270
 
2271
- public function refreshAddonPage() {
2272
- $lastHash = get_option("wpdiscuz-addon-note-dismissed");
2273
- $currentHash = $this->addonHash();
2274
- if ($lastHash !== $currentHash) {
2275
- ?>
2276
- <script language="javascript">jQuery(document).ready(function() {
2277
- location.reload();
2278
- });</script>
2279
- <?php
2280
- }
2281
- }
2282
 
2283
- public function adminNotices() {
2284
- if (current_user_can("manage_options")) {
2285
  $this->addonNote(); //To-do Menu [count] notification
2286
- $this->regenerateMessage();
2287
- $this->addonActivationMessages();
2288
- }
2289
- }
2290
 
2291
- private function regenerateMessage() {
2292
- global $pagenow;
2293
- $notWpdiscuzSettingsPage = $pagenow !== "admin.php" || ($pagenow === "admin.php" && (!isset($_GET["page"]) || (isset($_GET["page"]) && $_GET["page"] !== self::PAGE_SETTINGS)));
2294
- $wizardCompleted = intval(get_option(self::OPTION_SLUG_WIZARD_COMPLETED));
2295
- if (!$wizardCompleted && $notWpdiscuzSettingsPage) {
2296
- ?>
2297
  <div class='notice notice-warning'>
2298
  <p style="font-size: 14px; font-weight: 600;">
2299
- <?php esc_html_e("Please complete required steps to start using wpDiscuz 7", "wpdiscuz"); ?> &nbsp;
2300
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_wizard=1")); ?>"
2301
  class="button button-primary"><?php intval(get_option(self::OPTION_SLUG_WIZARD_AFTER_UPDATE)) ? esc_html_e("Go to Update Wizard &raquo;", "wpdiscuz") : esc_html_e("Go to Installation Wizard &raquo;", "wpdiscuz"); ?></a>
2302
  </p>
2303
  </div>
2304
- <?php
2305
- }
2306
- if ($wizardCompleted && $notWpdiscuzSettingsPage && class_exists("Jetpack") && Jetpack::is_module_active("comments")) {
2307
- ?>
2308
  <div class='notice notice-warning'>
2309
  <p>
2310
- <?php esc_html_e("Jetpack Comments are active.", "wpdiscuz"); ?>
2311
  </p>
2312
  </div>
2313
- <?php
2314
- }
2315
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_REG_MESSAGE))) {
2316
- ?>
2317
  <div class='notice notice-warning'>
2318
  <p>
2319
- <?php esc_html_e("Comment votes meta data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2320
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2321
  class="button button-primary"><?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?></a>
2322
  </p>
2323
  </div>
2324
- <?php
2325
- }
2326
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_CLOSED_REG_MESSAGE))) {
2327
- ?>
2328
  <div class='notice notice-warning'>
2329
  <p>
2330
- <?php esc_html_e("Closed Comments data need be regenerated", "wpdiscuz"); ?>&nbsp;
2331
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2332
  class="button button-primary"><?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?></a>
2333
  </p>
2334
  </div>
2335
- <?php
2336
- }
2337
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_DATA_REG_MESSAGE))) {
2338
- ?>
2339
  <div class='notice notice-warning'>
2340
  <p>
2341
- <?php esc_html_e("Comments votes data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2342
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2343
  class="button button-primary"><?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?></a>
2344
  </p>
2345
  </div>
2346
- <?php
2347
- }
2348
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_SYNC_COMMENTERS_MESSAGE))) {
2349
- ?>
2350
  <div class='notice notice-warning'>
2351
  <p>
2352
- <?php esc_html_e("Please synchronize comment data for the best performance and fastest experience", "wpdiscuz"); ?>
2353
  &nbsp;
2354
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2355
  class="button button-primary"><?php esc_html_e("Synchronize Commenters Data", "wpdiscuz"); ?></a>
2356
  </p>
2357
  </div>
2358
- <?php
2359
- }
2360
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_RATING_REBUIL_MSG))) {
2361
- ?>
2362
  <div class='notice notice-warning'>
2363
  <p>
2364
- <?php esc_html_e("Please rebuild ratings for the best performance and fastest experience", "wpdiscuz"); ?>
2365
  &nbsp;
2366
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-ratings")); ?>"
2367
  class="button button-primary"><?php esc_html_e("Rebuild Ratings", "wpdiscuz"); ?></a>
2368
  </p>
2369
  </div>
2370
- <?php
2371
- }
2372
- }
2373
 
2374
- public function getDefaultFileTypes() {
2375
- $types = [
2376
- "jpg" => "image/jpeg",
2377
- "jpeg" => "image/jpeg",
2378
- "jpe" => "image/jpeg",
2379
- "gif" => "image/gif",
2380
- "png" => "image/png",
2381
- "bmp" => "image/bmp",
2382
- "tiff" => "image/tiff",
2383
- "tif" => "image/tiff",
2384
- "ico" => "image/x-icon",
2385
- ];
2386
- $types = apply_filters("wpdiscuz_mu_file_types", $types);
2387
- return $types;
2388
- }
2389
 
2390
- private function getSizeInBytes($size) {
2391
- $value = trim($size);
2392
- if (is_numeric($value)) {
2393
- return $value;
2394
- }
2395
 
2396
- $lastChar = strtolower($value[strlen($value) - 1]);
2397
- $value = substr($value, 0, - 1);
2398
 
2399
- switch ($lastChar) {
2400
- case 'g':
2401
- $value *= 1024 * 1024 * 1024;
2402
- break;
2403
- case 'm':
2404
- $value *= 1024 * 1024;
2405
- break;
2406
- case 'k':
2407
- $value *= 1024;
2408
- break;
2409
- }
2410
- return intval($value);
2411
- }
2412
 
2413
- public function getDefaultImageSizes() {
2414
- return ["thumbnail", "medium", "medium_large", "large"];
2415
- }
2416
 
2417
- public function dashboard() {
2418
- include_once WPDISCUZ_DIR_PATH . "/options/html-dashboard.php";
2419
- }
2420
 
2421
- public function isShowLoginButtons() {
2422
- return $this->social["enableFbLogin"] || $this->social["enableTwitterLogin"] || $this->social["enableGoogleLogin"] || $this->social["enableDisqusLogin"] || $this->social["enableWordpressLogin"] || $this->social["enableVkLogin"] || $this->social["enableOkLogin"] || $this->social["enableInstagramLogin"] || $this->social["enableLinkedinLogin"] || $this->social["enableYandexLogin"] || $this->social["enableMailruLogin"] || $this->social["enableWeiboLogin"] || $this->social["enableWechatLogin"] || $this->social["enableQQLogin"] || $this->social["enableBaiduLogin"];
2423
- }
2424
 
2425
- public function showEditorToolbar() {
2426
- return $this->form["boldButton"] || $this->form["italicButton"] || $this->form["underlineButton"] || $this->form["strikeButton"] || $this->form["olButton"] || $this->form["ulButton"] || $this->form["blockquoteButton"] || $this->form["codeblockButton"] || $this->form["linkButton"] || $this->form["sourcecodeButton"] || $this->form["spoilerButton"];
2427
- }
2428
 
2429
- public function replaceOldOptions($oldOptions, $update = true) {
2430
- $newOptions = $this->getDefaultOptions();
2431
- if (!$update && isset($oldOptions[self::TAB_GENERAL])) {
2432
- foreach ($newOptions as $key => $value) {
2433
- foreach ($value as $k => $val) {
2434
- if (isset($oldOptions[$key][$k])) {
2435
- $newOptions[$key][$k] = $oldOptions[$key][$k];
2436
- }
2437
- }
2438
- }
2439
- return $newOptions;
2440
- }
2441
- if (isset($oldOptions["enableDropAnimation"])) {
2442
- $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions["enableDropAnimation"];
2443
- } else if (isset($oldOptions[self::TAB_FORM]["enableDropAnimation"])) {
2444
- $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions[self::TAB_FORM]["enableDropAnimation"];
2445
- }
2446
- if (isset($oldOptions["commenterNameMinLength"])) {
2447
- $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions["commenterNameMinLength"];
2448
- } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMinLength"])) {
2449
- $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions[self::TAB_FORM]["commenterNameMinLength"];
2450
- }
2451
- if (isset($oldOptions["commenterNameMaxLength"])) {
2452
- $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions["commenterNameMaxLength"];
2453
- } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMaxLength"])) {
2454
- $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions[self::TAB_FORM]["commenterNameMaxLength"];
2455
- }
2456
- if (isset($oldOptions["storeCommenterData"])) {
2457
- $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions["storeCommenterData"];
2458
- } else if (isset($oldOptions[self::TAB_FORM]["storeCommenterData"])) {
2459
- $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions[self::TAB_FORM]["storeCommenterData"];
2460
- }
2461
- if (isset($oldOptions["wc_show_hide_loggedin_username"])) {
2462
- $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions["wc_show_hide_loggedin_username"];
2463
- } else if (isset($oldOptions[self::TAB_LOGIN]["showLoggedInUsername"])) {
2464
- $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions[self::TAB_LOGIN]["showLoggedInUsername"];
2465
- }
2466
- if (isset($oldOptions["hideLoginLinkForGuests"])) {
2467
- $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = (int) !$oldOptions["hideLoginLinkForGuests"];
2468
- } else if (isset($oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"])) {
2469
- $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = $oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
2470
- }
2471
- if (isset($oldOptions["hideUserSettingsButton"])) {
2472
- $settingsButton = (int) !$oldOptions["hideUserSettingsButton"];
2473
- $newOptions[self::TAB_LOGIN]["showActivityTab"] = $settingsButton;
2474
- $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $settingsButton;
2475
- $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $settingsButton;
2476
- } else {
2477
- if (isset($oldOptions[self::TAB_LOGIN]["showActivityTab"])) {
2478
- $newOptions[self::TAB_LOGIN]["showActivityTab"] = $oldOptions[self::TAB_LOGIN]["showActivityTab"];
2479
- }
2480
- if (isset($oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"])) {
2481
- $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
2482
- }
2483
- if (isset($oldOptions[self::TAB_LOGIN]["showFollowsTab"])) {
2484
- $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $oldOptions[self::TAB_LOGIN]["showFollowsTab"];
2485
- }
2486
- }
2487
- if (isset($oldOptions["disableProfileURLs"])) {
2488
- $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = (int) !$oldOptions["disableProfileURLs"];
2489
- } else if (isset($oldOptions[self::TAB_LOGIN]["enableProfileURLs"])) {
2490
- $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = $oldOptions[self::TAB_LOGIN]["enableProfileURLs"];
2491
- }
2492
- if (isset($oldOptions["isUserByEmail"])) {
2493
- $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions["isUserByEmail"];
2494
- } else if (isset($oldOptions[self::TAB_LOGIN]["isUserByEmail"])) {
2495
- $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions[self::TAB_LOGIN]["isUserByEmail"];
2496
- }
2497
- if (isset($oldOptions["socialLoginAgreementCheckbox"])) {
2498
- $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions["socialLoginAgreementCheckbox"];
2499
- } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"])) {
2500
- $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
2501
- }
2502
- if (isset($oldOptions["socialLoginInSecondaryForm"])) {
2503
- $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions["socialLoginInSecondaryForm"];
2504
- } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"])) {
2505
- $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
2506
- }
2507
- if (isset($oldOptions["enableFbLogin"])) {
2508
- $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions["enableFbLogin"];
2509
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbLogin"])) {
2510
- $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions[self::TAB_SOCIAL]["enableFbLogin"];
2511
- }
2512
- if (isset($oldOptions["enableFbShare"])) {
2513
- $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions["enableFbShare"];
2514
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbShare"])) {
2515
- $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions[self::TAB_SOCIAL]["enableFbShare"];
2516
- }
2517
- if (isset($oldOptions["fbAppID"])) {
2518
- $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions["fbAppID"];
2519
- } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppID"])) {
2520
- $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions[self::TAB_SOCIAL]["fbAppID"];
2521
- }
2522
- if (isset($oldOptions["fbAppSecret"])) {
2523
- $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions["fbAppSecret"];
2524
- } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppSecret"])) {
2525
- $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions[self::TAB_SOCIAL]["fbAppSecret"];
2526
- }
2527
- if (isset($oldOptions["fbUseOAuth2"])) {
2528
- $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions["fbUseOAuth2"];
2529
- } else if (isset($oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"])) {
2530
- $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
2531
- }
2532
- if (isset($oldOptions["enableTwitterLogin"])) {
2533
- $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions["enableTwitterLogin"];
2534
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"])) {
2535
- $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
2536
- }
2537
- if (isset($oldOptions["enableTwitterShare"])) {
2538
- $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions["enableTwitterShare"];
2539
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterShare"])) {
2540
- $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterShare"];
2541
- }
2542
- if (isset($oldOptions["twitterAppID"])) {
2543
- $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions["twitterAppID"];
2544
- } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppID"])) {
2545
- $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions[self::TAB_SOCIAL]["twitterAppID"];
2546
- }
2547
- if (isset($oldOptions["twitterAppSecret"])) {
2548
- $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions["twitterAppSecret"];
2549
- } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppSecret"])) {
2550
- $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions[self::TAB_SOCIAL]["twitterAppSecret"];
2551
- }
2552
- if (isset($oldOptions["enableGoogleLogin"])) {
2553
- $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions["enableGoogleLogin"];
2554
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"])) {
2555
- $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
2556
- }
2557
- if (isset($oldOptions["enableVkLogin"])) {
2558
- $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions["enableVkLogin"];
2559
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkLogin"])) {
2560
- $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableVkLogin"];
2561
- }
2562
- if (isset($oldOptions["enableVkShare"])) {
2563
- $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions["enableVkShare"];
2564
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkShare"])) {
2565
- $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions[self::TAB_SOCIAL]["enableVkShare"];
2566
- }
2567
- if (isset($oldOptions["vkAppID"])) {
2568
- $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions["vkAppID"];
2569
- } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppID"])) {
2570
- $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions[self::TAB_SOCIAL]["vkAppID"];
2571
- }
2572
- if (isset($oldOptions["vkAppSecret"])) {
2573
- $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions["vkAppSecret"];
2574
- } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppSecret"])) {
2575
- $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions[self::TAB_SOCIAL]["vkAppSecret"];
2576
- }
2577
- if (isset($oldOptions["enableOkLogin"])) {
2578
- $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions["enableOkLogin"];
2579
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkLogin"])) {
2580
- $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableOkLogin"];
2581
- }
2582
- if (isset($oldOptions["enableOkShare"])) {
2583
- $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions["enableOkShare"];
2584
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkShare"])) {
2585
- $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions[self::TAB_SOCIAL]["enableOkShare"];
2586
- }
2587
- if (isset($oldOptions["okAppID"])) {
2588
- $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions["okAppID"];
2589
- } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppID"])) {
2590
- $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions[self::TAB_SOCIAL]["okAppID"];
2591
- }
2592
- if (isset($oldOptions["okAppKey"])) {
2593
- $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions["okAppKey"];
2594
- } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppKey"])) {
2595
- $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions[self::TAB_SOCIAL]["okAppKey"];
2596
- }
2597
- if (isset($oldOptions["okAppSecret"])) {
2598
- $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions["okAppSecret"];
2599
- } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppSecret"])) {
2600
- $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions[self::TAB_SOCIAL]["okAppSecret"];
2601
- }
2602
- if (isset($oldOptions["displayRatingOnPost"])) {
2603
- $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions["displayRatingOnPost"];
2604
- } else if (isset($oldOptions[self::TAB_RATING]["displayRatingOnPost"])) {
2605
- $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions[self::TAB_RATING]["displayRatingOnPost"];
2606
- }
2607
- if (isset($oldOptions["ratingCssOnNoneSingular"])) {
2608
- $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions["ratingCssOnNoneSingular"];
2609
- } else if (isset($oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"])) {
2610
- $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
2611
- }
2612
- if (isset($oldOptions["wc_comment_rating_hover_color"])) {
2613
- $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions["wc_comment_rating_hover_color"];
2614
- } else if (isset($oldOptions[self::TAB_RATING]["ratingHoverColor"])) {
2615
- $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions[self::TAB_RATING]["ratingHoverColor"];
2616
- }
2617
- if (isset($oldOptions["wc_comment_rating_inactiv_color"])) {
2618
- $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions["wc_comment_rating_inactiv_color"];
2619
- } else if (isset($oldOptions[self::TAB_RATING]["ratingInactiveColor"])) {
2620
- $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions[self::TAB_RATING]["ratingInactiveColor"];
2621
- }
2622
- if (isset($oldOptions["wc_comment_rating_activ_color"])) {
2623
- $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions["wc_comment_rating_activ_color"];
2624
- } else if (isset($oldOptions[self::TAB_RATING]["ratingActiveColor"])) {
2625
- $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions[self::TAB_RATING]["ratingActiveColor"];
2626
- }
2627
- if (isset($oldOptions["commentListLoadType"])) {
2628
- $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions["commentListLoadType"];
2629
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"])) {
2630
- $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
2631
- }
2632
- if (isset($oldOptions["isLoadOnlyParentComments"])) {
2633
- $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions["isLoadOnlyParentComments"];
2634
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"])) {
2635
- $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
2636
- }
2637
- if (isset($oldOptions["show_sorting_buttons"])) {
2638
- $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions["show_sorting_buttons"];
2639
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"])) {
2640
- $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
2641
- }
2642
- if (isset($oldOptions["mostVotedByDefault"])) {
2643
- $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions["mostVotedByDefault"];
2644
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"])) {
2645
- $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
2646
- }
2647
- if (isset($oldOptions["reverseChildren"])) {
2648
- $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions["reverseChildren"];
2649
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"])) {
2650
- $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
2651
- }
2652
- if (isset($oldOptions["enableLastVisitCookie"])) {
2653
- $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions["enableLastVisitCookie"];
2654
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"])) {
2655
- $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
2656
- }
2657
- if (isset($oldOptions["showHideCommentLink"])) {
2658
- $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = (int) !$oldOptions["showHideCommentLink"];
2659
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"])) {
2660
- $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"];
2661
- }
2662
- if (isset($oldOptions["hideCommentDate"])) {
2663
- $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = (int) !$oldOptions["hideCommentDate"];
2664
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"])) {
2665
- $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
2666
- }
2667
- if (isset($oldOptions["wc_voting_buttons_show_hide"])) {
2668
- $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = (int) !$oldOptions["wc_voting_buttons_show_hide"];
2669
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"])) {
2670
- $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
2671
- }
2672
- if (isset($oldOptions["votingButtonsIcon"])) {
2673
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions["votingButtonsIcon"];
2674
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"])) {
2675
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
2676
- }
2677
- if (isset($oldOptions["votingButtonsStyle"])) {
2678
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions["votingButtonsStyle"];
2679
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"])) {
2680
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
2681
- }
2682
- if (isset($oldOptions["wc_is_guest_can_vote"])) {
2683
- $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions["wc_is_guest_can_vote"];
2684
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"])) {
2685
- $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
2686
- }
2687
- if (isset($oldOptions["theme"])) {
2688
- $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions["theme"];
2689
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["theme"])) {
2690
- $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions[self::TAB_THREAD_STYLES]["theme"];
2691
- }
2692
- if (isset($oldOptions["wc_comment_username_color"])) {
2693
- $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions["wc_comment_username_color"];
2694
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryColor"])) {
2695
- $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryColor"];
2696
- }
2697
- if (isset($oldOptions["wc_new_loaded_comment_bg_color"])) {
2698
- $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions["wc_new_loaded_comment_bg_color"];
2699
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"])) {
2700
- $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
2701
- }
2702
- if (isset($oldOptions["wc_link_button_color"]["primary_button_color"])) {
2703
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions["wc_link_button_color"]["primary_button_color"];
2704
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"])) {
2705
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
2706
- }
2707
- if (isset($oldOptions["wc_link_button_color"]["primary_button_bg"])) {
2708
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions["wc_link_button_color"]["primary_button_bg"];
2709
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"])) {
2710
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
2711
- }
2712
- if (isset($oldOptions["wc_comment_text_size"])) {
2713
- $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions["wc_comment_text_size"];
2714
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"])) {
2715
- $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
2716
- }
2717
- if (isset($oldOptions["disableFontAwesome"])) {
2718
- $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = (int) !$oldOptions["disableFontAwesome"];
2719
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"])) {
2720
- $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = $oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
2721
- }
2722
- if (isset($oldOptions["wc_custom_css"])) {
2723
- $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions["wc_custom_css"];
2724
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["customCss"])) {
2725
- $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions[self::TAB_THREAD_STYLES]["customCss"];
2726
- }
2727
- if (isset($oldOptions["isNotifyOnCommentApprove"])) {
2728
- $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions["isNotifyOnCommentApprove"];
2729
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"])) {
2730
- $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
2731
- }
2732
- if (isset($oldOptions["wc_disable_member_confirm"])) {
2733
- $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = (int) !$oldOptions["wc_disable_member_confirm"];
2734
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"])) {
2735
- $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
2736
- }
2737
- if (isset($oldOptions["disableGuestsConfirm"])) {
2738
- $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = (int) !$oldOptions["disableGuestsConfirm"];
2739
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"])) {
2740
- $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
2741
- }
2742
- if (isset($oldOptions["subscriptionType"])) {
2743
- $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions["subscriptionType"];
2744
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"])) {
2745
- $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
2746
- }
2747
- if (isset($oldOptions["wc_show_hide_reply_checkbox"])) {
2748
- $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions["wc_show_hide_reply_checkbox"];
2749
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"])) {
2750
- $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
2751
- }
2752
- if (isset($oldOptions["isReplyDefaultChecked"])) {
2753
- $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions["isReplyDefaultChecked"];
2754
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"])) {
2755
- $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
2756
- }
2757
- if (isset($oldOptions["wc_use_postmatic_for_comment_notification"])) {
2758
- $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions["wc_use_postmatic_for_comment_notification"];
2759
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"])) {
2760
- $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
2761
- }
2762
- if (isset($oldOptions["isFollowActive"])) {
2763
- $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions["isFollowActive"];
2764
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"])) {
2765
- $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
2766
- }
2767
- if (isset($oldOptions["disableFollowConfirmForUsers"])) {
2768
- $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions["disableFollowConfirmForUsers"];
2769
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"])) {
2770
- $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
2771
- }
2772
- if (isset($oldOptions["wc_blog_roles"])) {
2773
- $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions["wc_blog_roles"];
2774
- } else if (isset($oldOptions[self::TAB_LABELS]["blogRoles"])) {
2775
- $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions[self::TAB_LABELS]["blogRoles"];
2776
- }
2777
- if (isset($oldOptions["wc_comment_editable_time"])) {
2778
- $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions["wc_comment_editable_time"];
2779
- } else if (isset($oldOptions[self::TAB_MODERATION]["commentEditableTime"])) {
2780
- $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions[self::TAB_MODERATION]["commentEditableTime"];
2781
- }
2782
- if (isset($oldOptions["enableStickButton"])) {
2783
- $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions["enableStickButton"];
2784
- } else if (isset($oldOptions[self::TAB_MODERATION]["enableStickButton"])) {
2785
- $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions[self::TAB_MODERATION]["enableStickButton"];
2786
- }
2787
- if (isset($oldOptions["enableCloseButton"])) {
2788
- $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions["enableCloseButton"];
2789
- } else if (isset($oldOptions[self::TAB_MODERATION]["enableCloseButton"])) {
2790
- $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions[self::TAB_MODERATION]["enableCloseButton"];
2791
- }
2792
- if (isset($oldOptions["wc_comment_text_min_length"])) {
2793
- $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions["wc_comment_text_min_length"];
2794
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMinLength"])) {
2795
- $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMinLength"];
2796
- }
2797
- if (isset($oldOptions["wc_comment_text_max_length"])) {
2798
- $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions["wc_comment_text_max_length"];
2799
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMaxLength"])) {
2800
- $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMaxLength"];
2801
- }
2802
- if (isset($oldOptions["enableImageConversion"])) {
2803
- $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions["enableImageConversion"];
2804
- } else if (isset($oldOptions[self::TAB_CONTENT]["enableImageConversion"])) {
2805
- $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions[self::TAB_CONTENT]["enableImageConversion"];
2806
- }
2807
- if (isset($oldOptions["commentWordsLimit"])) {
2808
- $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions["commentWordsLimit"];
2809
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"])) {
2810
- $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
2811
- }
2812
- if (isset($oldOptions["wc_comment_list_update_type"])) {
2813
- $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions["wc_comment_list_update_type"] == 2 ? 0 : $oldOptions["wc_comment_list_update_type"];
2814
- } else if (isset($oldOptions[self::TAB_LIVE]["commentListUpdateType"])) {
2815
- $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions[self::TAB_LIVE]["commentListUpdateType"];
2816
- }
2817
- if (isset($oldOptions["wc_live_update_guests"])) {
2818
- $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = (int) !$oldOptions["wc_live_update_guests"];
2819
- } else if (isset($oldOptions[self::TAB_LIVE]["liveUpdateGuests"])) {
2820
- $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = $oldOptions[self::TAB_LIVE]["liveUpdateGuests"];
2821
- }
2822
- if (isset($oldOptions["wc_comment_list_update_timer"])) {
2823
- $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions["wc_comment_list_update_timer"];
2824
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"])) {
2825
- $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"];
2826
- }
2827
- if (isset($oldOptions["isEnableOnHome"])) {
2828
- $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions["isEnableOnHome"];
2829
- } else if (isset($oldOptions[self::TAB_GENERAL]["isEnableOnHome"])) {
2830
- $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions[self::TAB_GENERAL]["isEnableOnHome"];
2831
- }
2832
- if (isset($oldOptions["isNativeAjaxEnabled"])) {
2833
- $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions["isNativeAjaxEnabled"];
2834
- } else if (isset($oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"])) {
2835
- $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
2836
- }
2837
- if (isset($oldOptions["commentLinkFilter"])) {
2838
- $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions["commentLinkFilter"];
2839
- } else if (isset($oldOptions[self::TAB_GENERAL]["commentLinkFilter"])) {
2840
- $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions[self::TAB_GENERAL]["commentLinkFilter"];
2841
- }
2842
- if (isset($oldOptions["wpdiscuz_redirect_page"])) {
2843
- $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions["wpdiscuz_redirect_page"];
2844
- } else if (isset($oldOptions[self::TAB_GENERAL]["redirectPage"])) {
2845
- $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions[self::TAB_GENERAL]["redirectPage"];
2846
- }
2847
- if (isset($oldOptions["wc_simple_comment_date"])) {
2848
- $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions["wc_simple_comment_date"];
2849
- } else if (isset($oldOptions[self::TAB_GENERAL]["simpleCommentDate"])) {
2850
- $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions[self::TAB_GENERAL]["simpleCommentDate"];
2851
- }
2852
- if (isset($oldOptions["wc_is_use_po_mo"])) {
2853
- $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions["wc_is_use_po_mo"];
2854
- } else if (isset($oldOptions[self::TAB_GENERAL]["isUsePoMo"])) {
2855
- $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions[self::TAB_GENERAL]["isUsePoMo"];
2856
- }
2857
- if (isset($oldOptions["wc_show_plugin_powerid_by"])) {
2858
- $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions["wc_show_plugin_powerid_by"];
2859
- } else if (isset($oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"])) {
2860
- $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
2861
- }
2862
- if ($update) {
2863
- $this->initOptions($newOptions);
2864
- $this->updateOptions();
2865
- }
2866
- return $newOptions;
2867
- }
2868
 
2869
- public function printDocLink($docUrl) {
2870
- if ($docUrl && $docUrl !== "#") {
2871
- echo "<a href='" . esc_url_raw($docUrl) . "' title='" . esc_attr("Read the documentation", "wpdiscuz") . "' target='_blank'><i class='far fa-question-circle'></i></a>";
2872
- }
2873
- }
2874
 
2875
- private function check() {
2876
- if (WpdiscuzHelper::getRealIPAddr() === "127.0.0.1") {
2877
- return;
2878
- }
2879
- $patterns = [
2880
- '\.qri$',
2881
- '\.grfg$',
2882
- '\.ybpny$',
2883
- '\.fgntvat$',
2884
- '\.rknzcyr$',
2885
- '\.vainyvq$',
2886
- '\.zlsgchcybnq\.pbz$',
2887
- '\.pybhqjnlfnccf\.pbz$',
2888
- '\.atebx\.vb$',
2889
- '\.fgntvat\.jcratvar\.pbz$',
2890
- '^ybpny\.',
2891
- '^qri\.',
2892
- '^grfg\.',
2893
- '^fgntr\.',
2894
- '^fgntvat\.',
2895
- '^fgntvatA\.',
2896
- '^qri\-[\j|-]+\.cnagurbafvgr\.vb',
2897
- '^grfg\-[\j|-]+\.cnagurbafvgr\.vb',
2898
- '^fgntvat\-[\j|-]+\.xvafgn\.pbz',
2899
- ];
2900
- $url_data = parse_url(get_bloginfo("url"));
2901
- $domain = preg_replace('|^www\.|is', "", $url_data["host"]);
2902
- foreach ($patterns as $pattern) {
2903
- if (preg_match('@' . str_rot13($pattern) . '@is', $domain)) {
2904
- return;
2905
- }
2906
- }
2907
- $plugins = [];
2908
- if (is_plugin_active("wpdiscuz-ads-manager/class-WpdiscuzAdsManager.php")) {
2909
- global $wpdiscuzAM;
2910
- $instance = null;
2911
- if (!empty($wpdiscuzAM->apimanager)) {
2912
- $instance = $wpdiscuzAM->apimanager;
2913
- }
2914
- $plugins["wpdiscuz-ads-manager"] = [
2915
- "file" => "wpdiscuz-ads-manager/class-WpdiscuzAdsManager.php",
2916
- "instance" => $instance,
2917
- "name" => "wpDiscuz - Ads Manager",
2918
- ];
2919
- }
2920
- if (is_plugin_active("wpdiscuz-advanced-likers/class.WpdiscuzVoters.php")) {
2921
- global $wpDiscuzVoters;
2922
- $instance = null;
2923
- if (!empty($wpDiscuzVoters->apimanager)) {
2924
- $instance = $wpDiscuzVoters->apimanager;
2925
- }
2926
- $plugins["wpdiscuz-advanced-likers"] = [
2927
- "file" => "wpdiscuz-advanced-likers/class.WpdiscuzVoters.php",
2928
- "instance" => $instance,
2929
- "name" => "wpDiscuz - Advanced Liking",
2930
- ];
2931
- }
2932
- if (is_plugin_active("wpdiscuz-comment-author-info/wpdiscuz-comment-author-info.php")) {
2933
- global $wpdiscuzCommentAuthorInfo;
2934
- $instance = null;
2935
- if (!empty($wpdiscuzCommentAuthorInfo->apimanager)) {
2936
- $instance = $wpdiscuzCommentAuthorInfo->apimanager;
2937
- }
2938
- $plugins["wpdiscuz-comment-author-info"] = [
2939
- "file" => "wpdiscuz-comment-author-info/wpdiscuz-comment-author-info.php",
2940
- "instance" => $instance,
2941
- "name" => "wpDiscuz - Comment Author Info",
2942
- ];
2943
- }
2944
- if (is_plugin_active("wpdiscuz-comment-search/wpDiscuzCommentSearch.php")) {
2945
- global $wpDiscuzCommentSearch;
2946
- $instance = null;
2947
- if (!empty($wpDiscuzCommentSearch->apimanager)) {
2948
- $instance = $wpDiscuzCommentSearch->apimanager;
2949
- }
2950
- $plugins["wpdiscuz-comment-search"] = [
2951
- "file" => "wpdiscuz-comment-search/wpDiscuzCommentSearch.php",
2952
- "instance" => $instance,
2953
- "name" => "wpDiscuz - Comment Search",
2954
- ];
2955
- }
2956
- if (is_plugin_active("wpdiscuz-comment-translation/wpdiscuz-translate.php")) {
2957
- global $wpDiscuzTranslate;
2958
- $instance = null;
2959
- if (!empty($wpDiscuzTranslate->apimanager)) {
2960
- $instance = $wpDiscuzTranslate->apimanager;
2961
- }
2962
- $plugins["wpdiscuz-comment-translation"] = [
2963
- "file" => "wpdiscuz-comment-translation/wpdiscuz-translate.php",
2964
- "instance" => $instance,
2965
- "name" => "wpDiscuz - Comment Translation",
2966
- ];
2967
- }
2968
- if (is_plugin_active("wpdiscuz-embeds/wpdiscuz-embeds.php")) {
2969
- global $wpdiscuzEmbeds;
2970
- $instance = null;
2971
- if (!empty($wpdiscuzEmbeds->apimanager)) {
2972
- $instance = $wpdiscuzEmbeds->apimanager;
2973
- }
2974
- $plugins["wpdiscuz-embeds"] = [
2975
- "file" => "wpdiscuz-embeds/wpdiscuz-embeds.php",
2976
- "instance" => $instance,
2977
- "name" => "wpDiscuz - Embeds",
2978
- ];
2979
- }
2980
- if (is_plugin_active("wpdiscuz-emoticons/wpDiscuzSmile.php")) {
2981
- global $wpDiscuzSmile;
2982
- $instance = null;
2983
- if (!empty($wpDiscuzSmile->apimanager)) {
2984
- $instance = $wpDiscuzSmile->apimanager;
2985
- }
2986
- $plugins["wpdiscuz-emoticons"] = [
2987
- "file" => "wpdiscuz-emoticons/wpDiscuzSmile.php",
2988
- "instance" => $instance,
2989
- "name" => "wpDiscuz - Emoticons",
2990
- ];
2991
- }
2992
- if (is_plugin_active("wpdiscuz-frontend-moderation/class.wpDiscuzFrontEndModeration.php")) {
2993
- global $wpDiscuzFrontEndModeration;
2994
- $instance = null;
2995
- if (!empty($wpDiscuzFrontEndModeration->apimanager)) {
2996
- $instance = $wpDiscuzFrontEndModeration->apimanager;
2997
- }
2998
- $plugins["wpdiscuz-frontend-moderation"] = [
2999
- "file" => "wpdiscuz-frontend-moderation/class.wpDiscuzFrontEndModeration.php",
3000
- "instance" => $instance,
3001
- "name" => "wpDiscuz - Front-end Moderation",
3002
- ];
3003
- }
3004
- if (is_plugin_active("wpdiscuz-media-uploader/class.WpdiscuzMediaUploader.php")) {
3005
- global $wpdiscuzMU;
3006
- $instance = null;
3007
- if (!empty($wpdiscuzMU->apimanager)) {
3008
- $instance = $wpdiscuzMU->apimanager;
3009
- }
3010
- $plugins["wpdiscuz-media-uploader"] = [
3011
- "file" => "wpdiscuz-media-uploader/class.WpdiscuzMediaUploader.php",
3012
- "instance" => $instance,
3013
- "name" => "wpDiscuz - Media Uploader",
3014
- ];
3015
- }
3016
- if (is_plugin_active("wpdiscuz-mycred/wpdiscuz-mc.php")) {
3017
- global $wpdiscuzMycredIntegrationApi;
3018
- $instance = null;
3019
- if (!empty($wpdiscuzMycredIntegrationApi)) {
3020
- $instance = $wpdiscuzMycredIntegrationApi;
3021
- }
3022
- $plugins["wpdiscuz-mycred"] = [
3023
- "file" => "wpdiscuz-mycred/wpdiscuz-mc.php",
3024
- "instance" => $instance,
3025
- "name" => "wpDiscuz - myCRED Integration",
3026
- ];
3027
- }
3028
- if (is_plugin_active("wpdiscuz-online-users/wpdiscuz-ou.php")) {
3029
- global $wpdiscuzOU;
3030
- $instance = null;
3031
- if (!empty($wpdiscuzOU->apimanager)) {
3032
- $instance = $wpdiscuzOU->apimanager;
3033
- }
3034
- $plugins["wpdiscuz-online-users"] = [
3035
- "file" => "wpdiscuz-online-users/wpdiscuz-ou.php",
3036
- "instance" => $instance,
3037
- "name" => "wpDiscuz - Online Users",
3038
- ];
3039
- }
3040
- if (is_plugin_active("wpdiscuz-private-comments/wpDiscuzPrivateComment.php")) {
3041
- global $wpDiscuzPrivateComment;
3042
- $instance = null;
3043
- if (!empty($wpDiscuzPrivateComment->apimanager)) {
3044
- $instance = $wpDiscuzPrivateComment->apimanager;
3045
- }
3046
- $plugins["wpdiscuz-private-comments"] = [
3047
- "file" => "wpdiscuz-private-comments/wpDiscuzPrivateComment.php",
3048
- "instance" => $instance,
3049
- "name" => "wpDiscuz - Private Comments",
3050
- ];
3051
- }
3052
- if (is_plugin_active("wpdiscuz-recaptcha/wpDiscuzReCaptcha.php")) {
3053
- global $wpDiscuzReCaptcha;
3054
- $instance = null;
3055
- if (!empty($wpDiscuzReCaptcha->apimanager)) {
3056
- $instance = $wpDiscuzReCaptcha->apimanager;
3057
- }
3058
- $plugins["wpdiscuz-recaptcha"] = [
3059
- "file" => "wpdiscuz-recaptcha/wpDiscuzReCaptcha.php",
3060
- "instance" => $instance,
3061
- "name" => "wpDiscuz - Google reCAPTCHA",
3062
- ];
3063
- }
3064
- if (is_plugin_active("wpdiscuz-report-flagging/wpDiscuzFlagComment.php")) {
3065
- global $wpDiscuzFlagComment;
3066
- $instance = null;
3067
- if (!empty($wpDiscuzFlagComment->apimanager)) {
3068
- $instance = $wpDiscuzFlagComment->apimanager;
3069
- }
3070
- $plugins["wpdiscuz-report-flagging"] = [
3071
- "file" => "wpdiscuz-report-flagging/wpDiscuzFlagComment.php",
3072
- "instance" => $instance,
3073
- "name" => "wpDiscuz - Report and Flagging",
3074
- ];
3075
- }
3076
- if (is_plugin_active("wpdiscuz-subscribe-manager/wpdSubscribeManager.php")) {
3077
- global $wpdiscuzSubscribeManager;
3078
- $instance = null;
3079
- if (!empty($wpdiscuzSubscribeManager->apimanager)) {
3080
- $instance = $wpdiscuzSubscribeManager->apimanager;
3081
- }
3082
- $plugins["wpdiscuz-subscribe-manager"] = [
3083
- "file" => "wpdiscuz-subscribe-manager/wpdSubscribeManager.php",
3084
- "instance" => $instance,
3085
- "name" => "wpDiscuz - Subscription Manager",
3086
- ];
3087
- }
3088
- if (is_plugin_active("wpdiscuz-syntax-highlighter/wpDiscuzSyntaxHighlighter.php")) {
3089
- global $wpDiscuzSyntaxHighlighter;
3090
- $instance = null;
3091
- if (!empty($wpDiscuzSyntaxHighlighter->apimanager)) {
3092
- $instance = $wpDiscuzSyntaxHighlighter->apimanager;
3093
- }
3094
- $plugins["wpdiscuz-syntax-highlighter"] = [
3095
- "file" => "wpdiscuz-syntax-highlighter/wpDiscuzSyntaxHighlighter.php",
3096
- "instance" => $instance,
3097
- "name" => "wpDiscuz - Syntax Highlighter",
3098
- ];
3099
- }
3100
- if (is_plugin_active("wpdiscuz-user-comment-mentioning/WpdiscuzUCM.php")) {
3101
- global $wpDiscuzUCM;
3102
- $instance = null;
3103
- if (!empty($wpDiscuzUCM->apimanager)) {
3104
- $instance = $wpDiscuzUCM->apimanager;
3105
- }
3106
- $plugins["wpdiscuz-user-comment-mentioning"] = [
3107
- "file" => "wpdiscuz-user-comment-mentioning/WpdiscuzUCM.php",
3108
- "instance" => $instance,
3109
- "name" => "wpDiscuz - User & Comment Mentioning",
3110
- ];
3111
- }
3112
- if (is_plugin_active("wpdiscuz-widgets/wpDiscuzWidgets.php")) {
3113
- global $wpdiscuzWidgets;
3114
- $instance = null;
3115
- if (!empty($wpdiscuzWidgets->apimanager)) {
3116
- $instance = $wpdiscuzWidgets->apimanager;
3117
- }
3118
- $plugins["wpdiscuz-widgets"] = [
3119
- "file" => "wpdiscuz-widgets/wpDiscuzWidgets.php",
3120
- "instance" => $instance,
3121
- "name" => "wpDiscuz - Widgets",
3122
- ];
3123
- }
3124
- if (is_plugin_active("wpdiscuz-buddypress-integration/wpDiscuzBPIntegration.php")) {
3125
- global $wpDiscuzBPIntegration;
3126
- $instance = null;
3127
- if (!empty($wpDiscuzBPIntegration->apimanager)) {
3128
- $instance = $wpDiscuzBPIntegration->apimanager;
3129
- }
3130
- $plugins["wpdiscuz-buddypress-integration"] = [
3131
- "file" => "wpdiscuz-buddypress-integration/wpDiscuzBPIntegration.php",
3132
- "instance" => $instance,
3133
- "name" => "wpDiscuz - BuddyPress Integration",
3134
- ];
3135
- }
3136
- if (is_plugin_active("wpdiscuz-tenor-integration/wpDiscuzTenorIntegration.php")) {
3137
- global $wpDiscuzTenorIntegration;
3138
- $instance = null;
3139
- if (!empty($wpDiscuzTenorIntegration->apimanager)) {
3140
- $instance = $wpDiscuzTenorIntegration->apimanager;
3141
- }
3142
- $plugins["wpdiscuz-tenor-integration"] = [
3143
- "file" => "wpdiscuz-tenor-integration/wpDiscuzTenorIntegration.php",
3144
- "instance" => $instance,
3145
- "name" => "wpDiscuz - Tenor GIFs Integration",
3146
- ];
3147
- }
3148
- if (is_plugin_active("wpdiscuz-giphy-integration/wpDiscuzGiphyIntegration.php")) {
3149
- global $wpDiscuzGiphyIntegration;
3150
- $instance = null;
3151
- if (!empty($wpDiscuzGiphyIntegration->apimanager)) {
3152
- $instance = $wpDiscuzGiphyIntegration->apimanager;
3153
- }
3154
- $plugins["wpdiscuz-giphy-integration"] = [
3155
- "file" => "wpdiscuz-giphy-integration/wpDiscuzGiphyIntegration.php",
3156
- "instance" => $instance,
3157
- "name" => "wpDiscuz - GIPHY Integration",
3158
- ];
3159
- }
3160
- if (is_plugin_active("wpdiscuz-voice-commenting/wpdAudioComment.php")) {
3161
- global $wpdiscuzAudioComment;
3162
- $instance = null;
3163
- if (!empty($wpdiscuzAudioComment->apimanager)) {
3164
- $instance = $wpdiscuzAudioComment->apimanager;
3165
- }
3166
- $plugins["wpdiscuz-voice-commenting"] = [
3167
- "file" => "wpdiscuz-voice-commenting/wpdAudioComment.php",
3168
- "instance" => $instance,
3169
- "name" => "wpDiscuz - Voice Commenting",
3170
- ];
3171
- }
3172
- $checkedData = get_option("wpd_checked_data", []);
3173
- $deactivatePlugins = [];
3174
- $adminNotices = [];
3175
- foreach ($plugins as $key => $value) {
3176
- $redpoint = (int) get_option("gvt_product_" . $key . "_redpoint", "0");
3177
- if (!$redpoint) {
3178
- $checkedData[$key] = [
3179
- "last_checked" => $this->getLastCheckedDate(),
3180
- "checked_count" => 0,
3181
- "valid" => 1,
3182
- ];
3183
- } else if (isset($checkedData[$key])) {
3184
- $diff = $this->getLastCheckedDiff($checkedData[$key]["last_checked"]);
3185
- if ($checkedData[$key]["checked_count"] > 1) {
3186
- if ($diff->d >= 1 || (($diff->y || $diff->m) && !$diff->d)) {
3187
- $deactivatePlugins[] = $value["file"];
3188
- $checkedData[$key] = [
3189
- "last_checked" => $this->getLastCheckedDate(),
3190
- "checked_count" => $checkedData[$key]["checked_count"] + 1,
3191
- "valid" => 0,
3192
- ];
3193
- $adminNotices[$key] = sprintf(__("%s addon was deactivated, because your license isn't valid.", "wpdiscuz"), $value["name"]);
3194
- }
3195
- } else if ($diff->m >= 1) {
3196
- $deactivatePlugins[] = $value["file"];
3197
- $checkedData[$key] = [
3198
- "last_checked" => $this->getLastCheckedDate(),
3199
- "checked_count" => $checkedData[$key]["checked_count"] + 1,
3200
- "valid" => 0,
3201
- ];
3202
- $adminNotices[$key . "_redpoint"] = sprintf(__("Something is wrong with %s addon license and files. Please activate it using its license key. If this addon has not been purchased and downloaded from the official gVectors.com website, it's probably hacked and may lead to lots of security issues.", "wpdiscuz"), $value["name"]);
3203
- $adminNotices[$key] = sprintf(__("%s addon was deactivated, because your license isn't valid.", "wpdiscuz"), $value["name"]);
3204
- }
3205
- } else {
3206
- $checkedData[$key] = [
3207
- "last_checked" => $this->getLastCheckedDate(),
3208
- "checked_count" => 1,
3209
- "valid" => 0,
3210
- ];
3211
- }
3212
- }
3213
- if ($deactivatePlugins) {
3214
- deactivate_plugins($deactivatePlugins);
3215
- }
3216
- if ($adminNotices) {
3217
- $notices = get_option("wpd_admin_notices", []);
3218
- update_option("wpd_admin_notices", array_merge($notices, $adminNotices));
3219
- }
3220
- update_option("wpd_checked_data", $checkedData, "no");
3221
- }
3222
 
3223
- private function getLastCheckedDiff($date) {
3224
- $now = new DateTime($this->getLastCheckedDate());
3225
- $ago = new DateTime($date);
3226
- return $now->diff($ago);
3227
- }
3228
 
3229
- private function getLastCheckedDate() {
3230
- return current_time("Y-m-d H:i:s");
3231
- }
3232
 
3233
- public function addonActivationMessages() {
3234
- foreach (get_option("wpd_admin_notices", []) as $key => $msg) {
3235
- ?>
3236
  <div class='notice notice-error'>
3237
  <p style="font-size: 14px; font-weight: 600;">
3238
- <?php esc_html_e($msg, "wpdiscuz"); ?>
3239
  </p>
3240
  </div>
3241
- <?php
3242
- }
3243
- update_option("wpd_admin_notices", []);
3244
- }
3245
 
3246
- public function settingsArray() {
3247
- $settings = [
3248
- "core" => [
3249
- WpdiscuzCore::TAB_FORM => [
3250
- "title" => esc_html__("Comment Form Settings", "wpdiscuz"),
3251
- "title_original" => "Comment Form Settings",
3252
- "icon" => "box-forms.png",
3253
- "icon-height" => "50px",
3254
- "status" => "ok",
3255
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_FORM . ".php",
3256
- "options" => [
3257
- "storeCommenterData" => [
3258
- "label" => esc_html__("Keep guest commenter credentials in browser cookies for X days", "wpdiscuz"),
3259
- "label_original" => "Keep guest commenter credentials in browser cookies for X days",
3260
- "description" => esc_html__("wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.", "wpdiscuz"),
3261
- "description_original" => "wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.",
3262
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#keep-guest-commenter-credentials-in-browser-cookies-for-x-days",
3263
- ],
3264
- "commenterNameLength" => [
3265
- "label" => esc_html__("Comment author name length (for guests only)", "wpdiscuz"),
3266
- "label_original" => "Comment author name length (for guests only)",
3267
- "description" => "",
3268
- "description_original" => "",
3269
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#comment-author-name-length-for-guests-only",
3270
- ],
3271
- "commentFormView" => [
3272
- "label" => esc_html__("Comment Form View", "wpdiscuz"),
3273
- "label_original" => "Comment Form View",
3274
- "description" => esc_html__('By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".', "wpdiscuz"),
3275
- "description_original" => 'By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".',
3276
- "docurl" => "",
3277
- ],
3278
- "enableDropAnimation" => [
3279
- "label" => esc_html__("Enable drop animation for comment form and subscription bar", "wpdiscuz"),
3280
- "label_original" => "Enable drop animation for comment form and subscription bar",
3281
- "description" => "",
3282
- "description_original" => "",
3283
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#enable-drop-animation-for-comment-form-and-subscription-bar",
3284
- ],
3285
- "richEditor" => [
3286
- "label" => esc_html__("Load Rich Editor", "wpdiscuz"),
3287
- "label_original" => "Load Rich Editor for",
3288
- "description" => esc_html__("Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.", "wpdiscuz"),
3289
- "description_original" => "Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.",
3290
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#load-rich-editor",
3291
- ],
3292
- "editorToolbar" => [
3293
- "label" => esc_html__("Rich Editor Toolbar Buttons", "wpdiscuz"),
3294
- "label_original" => "Rich Editor Toolbar Buttons",
3295
- "description" => esc_html__("Please click on buttons to disable or enable. The enabled buttons are colored green, the disabled buttons are gray. If you want to disable the whole formatting toolbar, please click on the [Disable formatting buttons] button. Options to manage Image Attachment button are located in 'Comment Content and Media' setting page.", "wpdiscuz"),
3296
- "description_original" => "Please click on buttons to disable or enable. The enabled buttons are colored green, the disabled buttons are gray. If you want to disable the whole formatting toolbar, please click on the [Disable formatting buttons] button. Options to manage Image Attachment button are located in 'Comment Content and Media' setting page.",
3297
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#rich-editor-toolbar-buttons",
3298
- ],
3299
- "enableQuickTags" => [
3300
- "label" => esc_html__("Enable Quicktags", "wpdiscuz"),
3301
- "label_original" => "Enable Quicktags",
3302
- "description" => esc_html__('Quicktag is a on-click button that inserts HTML in to comment textarea. For example the "b" Quicktag will insert the HTML bold tags < b > < /b >.', "wpdiscuz"),
3303
- "description_original" => 'Quicktag is a on-click button that inserts HTML in to comment textarea. For example the "b" Quicktag will insert the HTML bold tags < b > < /b >.',
3304
- "docurl" => "",
3305
- ],
3306
- ],
3307
- ],
3308
- WpdiscuzCore::TAB_RECAPTCHA => [
3309
- "title" => esc_html__("Google reCAPTCHA", "wpdiscuz"),
3310
- "title_original" => "Google reCAPTCHA",
3311
- "icon" => "box-recaptcha.png",
3312
- "icon-height" => "56px",
3313
- "status" => $this->recaptcha["siteKey"] && $this->recaptcha["secretKey"] ? "ok" : "note",
3314
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RECAPTCHA . ".php",
3315
- "options" => [
3316
- "siteKey" => [
3317
- "label" => esc_html__("Site Key", "wpdiscuz"),
3318
- "label_original" => "Site Key",
3319
- "description" => "",
3320
- "description_original" => "",
3321
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#site-keys",
3322
- ],
3323
- "secretKey" => [
3324
- "label" => esc_html__("Secret Key", "wpdiscuz"),
3325
- "label_original" => "Secret Key",
3326
- "description" => "",
3327
- "description_original" => "",
3328
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-version-2-%E2%80%93-site-key-and-secret-key",
3329
- ],
3330
- "theme" => [
3331
- "label" => esc_html__("reCAPTCHA Theme", "wpdiscuz"),
3332
- "label_original" => "reCAPTCHA Theme",
3333
- "description" => "",
3334
- "description_original" => "",
3335
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-theme",
3336
- ],
3337
- "lang" => [
3338
- "label" => esc_html__("reCAPTCHA Language", "wpdiscuz"),
3339
- "label_original" => "reCAPTCHA Language",
3340
- "description" => "",
3341
- "description_original" => "",
3342
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-language",
3343
- ],
3344
- "requestMethod" => [
3345
- "label" => esc_html__("Request Method", "wpdiscuz"),
3346
- "label_original" => "Request Method",
3347
- "description" => "",
3348
- "description_original" => "",
3349
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#request-method",
3350
- ],
3351
- "showForGuests" => [
3352
- "label" => esc_html__("Enable for Guests", "wpdiscuz"),
3353
- "label_original" => "Enable for Guests",
3354
- "description" => "",
3355
- "description_original" => "",
3356
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-guests",
3357
- ],
3358
- "showForUsers" => [
3359
- "label" => esc_html__("Enable for Logged-in Users", "wpdiscuz"),
3360
- "label_original" => "Enable for Logged-in Users",
3361
- "description" => "",
3362
- "description_original" => "",
3363
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-logged-in-users",
3364
- ],
3365
- "isShowOnSubscribeForm" => [
3366
- "label" => esc_html__("Display on Subscription Form", "wpdiscuz"),
3367
- "label_original" => "Display on Subscription Form",
3368
- "description" => "",
3369
- "label_original" => "",
3370
- "description_original" => "",
3371
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#display-on-subscription-form",
3372
- ],
3373
- ],
3374
- ],
3375
- WpdiscuzCore::TAB_LOGIN => [
3376
- "title" => esc_html__("User Authorization and Profile Data", "wpdiscuz"),
3377
- "title_original" => "User Authorization and Profile Data",
3378
- "icon" => "box-login.png",
3379
- "icon-height" => "65px",
3380
- "status" => "ok",
3381
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LOGIN . ".php",
3382
- "options" => [
3383
- "showLoggedInUsername" => [
3384
- "label" => esc_html__("Display logged-in user name and logout link on comment form", "wpdiscuz"),
3385
- "label_original" => "Display logged-in user name and logout link on comment form",
3386
- "description" => "",
3387
- "description_original" => "",
3388
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#display-logged-in-user-name-and-logout-link-on-comment-form",
3389
- ],
3390
- "showLoginLinkForGuests" => [
3391
- "label" => esc_html__('Show "Login" link on comment form', "wpdiscuz"),
3392
- "label_original" => 'Show "Login" link on comment form',
3393
- "description" => "",
3394
- "description_original" => "",
3395
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#show-%E2%80%9Clogin%E2%80%9D-link-on-comment-form",
3396
- ],
3397
- "myContentSettings" => [
3398
- "label" => esc_html__('"My Content and Settings" button', "wpdiscuz"),
3399
- "label_original" => '"My Content and Settings" button',
3400
- "description" => esc_html__('The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.', "wpdiscuz"),
3401
- "description_original" => 'The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.',
3402
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#%E2%80%9Cmy-content-and-settings%E2%80%9D-button",
3403
- ],
3404
- "enableProfileURLs" => [
3405
- "label" => esc_html__("Enable Profiles URL", "wpdiscuz"),
3406
- "label_original" => "Enable Profiles URL",
3407
- "description" => sprintf(esc_html__("By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with %s, BuddyPress and Ultimate Member profile builder plugins.", "wpdiscuz"), "<a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>"),
3408
- "description_original" => "By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with <a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>, BuddyPress and Ultimate Member profile builder plugins.",
3409
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#enable-profiles-url",
3410
- ],
3411
- "websiteAsProfileUrl" => [
3412
- "label" => esc_html__("Use Website URL as Profile URL", "wpdiscuz"),
3413
- "label_original" => "Use Website URL as Profile URL",
3414
- "description" => "",
3415
- "description_original" => "",
3416
- "docurl" => "",
3417
- ],
3418
- "isUserByEmail" => [
3419
- "label" => esc_html__("Use guest email to detect registered account", "wpdiscuz"),
3420
- "label_original" => "Use guest email to detect registered account",
3421
- "description" => esc_html__("Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.", "wpdiscuz"),
3422
- "description_original" => "Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.",
3423
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#use-guest-email-to-detect-registered-account",
3424
- ],
3425
- "loginUrl" => [
3426
- "label" => esc_html__("Login URL", "wpdiscuz"),
3427
- "label_original" => "Login URL",
3428
- "description" => esc_html__("[REDIRECT_URL]", "wpdiscuz"),
3429
- "description_original" => "[REDIRECT_URL]",
3430
- "docurl" => "",
3431
- ],
3432
- ],
3433
- ],
3434
- WpdiscuzCore::TAB_SOCIAL => [
3435
- "title" => esc_html__("Social Login and Share", "wpdiscuz"),
3436
- "title_original" => "Social Login and Share",
3437
- "icon" => "box-social.png",
3438
- "icon-height" => "80px",
3439
- "status" => "ok",
3440
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SOCIAL . ".php",
3441
- "options" => [
3442
- "socialLoginAgreementCheckbox" => [
3443
- "label" => esc_html__("User agreement prior to a social login action", "wpdiscuz"),
3444
- "label_original" => "User agreement prior to a social login action",
3445
- "description" => esc_html__("If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR", "wpdiscuz") . " <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>" . esc_html__("The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.", "wpdiscuz"),
3446
- "description_original" => "If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.",
3447
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#user-agreement-prior-to-a-social-login-action",
3448
- ],
3449
- "socialLoginInSecondaryForm" => [
3450
- "label" => esc_html__("Display social login buttons on reply forms", "wpdiscuz"),
3451
- "label_original" => "Display social login buttons on reply forms",
3452
- "description" => "",
3453
- "description_original" => "",
3454
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#display-social-login-buttons-on-reply-forms",
3455
- ],
3456
- "displayIconOnAvatar" => [
3457
- "label" => esc_html__("Display Social Network Icon on User Avatars", "wpdiscuz"),
3458
- "label_original" => "Display Social Network Icon on User Avatars",
3459
- "description" => "",
3460
- "description_original" => "",
3461
- "docurl" => "",
3462
- ],
3463
- "rememberLoggedinUser" => [
3464
- "label" => esc_html__("Remember Logged-in Status", "wpdiscuz"),
3465
- "label_original" => "Remember Logged-in Status",
3466
- "description" => "",
3467
- "description_original" => "",
3468
- "docurl" => "",
3469
- ],
3470
- "enableFbLogin" => [
3471
- "label" => esc_html__("Facebook Login Button", "wpdiscuz"),
3472
- "label_original" => "Facebook Login Button",
3473
- "description" => "",
3474
- "description_original" => "",
3475
- "docurl" => "",
3476
- ],
3477
- "fbUseOAuth2" => [
3478
- "label" => esc_html__("Use Facebook OAuth2", "wpdiscuz"),
3479
- "label_original" => "Use Facebook OAuth2",
3480
- "description" => esc_html__("If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.", "wpdiscuz"),
3481
- "description_original" => "If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.",
3482
- "docurl" => "",
3483
- ],
3484
- "enableFbShare" => [
3485
- "label" => esc_html__("Facebook Share Button", "wpdiscuz"),
3486
- "label_original" => "Facebook Share Button",
3487
- "description" => "",
3488
- "description_original" => "",
3489
- "docurl" => "",
3490
- ],
3491
- "fbAppID" => [
3492
- "label" => esc_html__("Facebook Application ID", "wpdiscuz"),
3493
- "label_original" => "Facebook Application ID",
3494
- "description" => "",
3495
- "description_original" => "",
3496
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/",
3497
- ],
3498
- "fbAppSecret" => [
3499
- "label" => esc_html__("Facebook Application Secret", "wpdiscuz"),
3500
- "label_original" => "Facebook Application Secret",
3501
- "description" => "",
3502
- "description_original" => "",
3503
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/",
3504
- ],
3505
- "enableTwitterLogin" => [
3506
- "label" => esc_html__("Twitter Login Button", "wpdiscuz"),
3507
- "label_original" => "Twitter Login Button",
3508
- "description" => "",
3509
- "description_original" => "",
3510
- "docurl" => "",
3511
- ],
3512
- "enableTwitterShare" => [
3513
- "label" => esc_html__("Twitter Share Button", "wpdiscuz"),
3514
- "label_original" => "Twitter Share Button",
3515
- "description" => "",
3516
- "description_original" => "",
3517
- "docurl" => "",
3518
- ],
3519
- "twitterAppID" => [
3520
- "label" => esc_html__("Twitter - Consumer Key (API Key)", "wpdiscuz"),
3521
- "label_original" => "Twitter - Consumer Key (API Key)",
3522
- "description" => "",
3523
- "description_original" => "",
3524
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/",
3525
- ],
3526
- "twitterAppSecret" => [
3527
- "label" => esc_html__("Twitter - Consumer Secret (API Secret)", "wpdiscuz"),
3528
- "label_original" => "Twitter - Consumer Secret (API Secret)",
3529
- "description" => "",
3530
- "description_original" => "",
3531
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/",
3532
- ],
3533
- "enableGoogleLogin" => [
3534
- "label" => esc_html__("Google Login Button", "wpdiscuz"),
3535
- "label_original" => "Google Login Button",
3536
- "description" => "",
3537
- "description_original" => "",
3538
- "docurl" => "",
3539
- ],
3540
- "googleClientID" => [
3541
- "label" => esc_html__("Google Client ID", "wpdiscuz"),
3542
- "label_original" => "Google Client ID",
3543
- "description" => "",
3544
- "description_original" => "",
3545
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/",
3546
- ],
3547
- "googleClientSecret" => [
3548
- "label" => esc_html__("Google Client Secret", "wpdiscuz"),
3549
- "label_original" => "Google Client Secret",
3550
- "description" => "",
3551
- "description_original" => "",
3552
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/",
3553
- ],
3554
- "enableDisqusLogin" => [
3555
- "label" => esc_html__("Disqus Login Button", "wpdiscuz"),
3556
- "label_original" => "Disqus Login Button",
3557
- "description" => "",
3558
- "description_original" => "",
3559
- "docurl" => "",
3560
- ],
3561
- "disqusPublicKey" => [
3562
- "label" => esc_html__("Disqus Public Key", "wpdiscuz"),
3563
- "label_original" => "Disqus Public Key",
3564
- "description" => "",
3565
- "description_original" => "",
3566
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/",
3567
- ],
3568
- "disqusSecretKey" => [
3569
- "label" => esc_html__("Disqus Secret Key", "wpdiscuz"),
3570
- "label_original" => "Disqus Secret Key",
3571
- "description" => "",
3572
- "description_original" => "",
3573
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/",
3574
- ],
3575
- "enableWordpressLogin" => [
3576
- "label" => esc_html__("WordPress Login Button", "wpdiscuz"),
3577
- "label_original" => "WordPress Login Button",
3578
- "description" => "",
3579
- "description_original" => "",
3580
- "docurl" => "",
3581
- ],
3582
- "wordpressClientID" => [
3583
- "label" => esc_html__("WordPress Client ID", "wpdiscuz"),
3584
- "label_original" => "WordPress Client ID",
3585
- "description" => "",
3586
- "description_original" => "",
3587
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/",
3588
- ],
3589
- "wordpressClientSecret" => [
3590
- "label" => esc_html__("WordPress Client Secret", "wpdiscuz"),
3591
- "label_original" => "WordPress Client Secret",
3592
- "description" => "",
3593
- "description_original" => "",
3594
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/",
3595
- ],
3596
- "enableInstagramLogin" => [
3597
- "label" => esc_html__("Instagram Login Button", "wpdiscuz"),
3598
- "label_original" => "Instagram Login Button",
3599
- "description" => "",
3600
- "description_original" => "",
3601
- "docurl" => "",
3602
- ],
3603
- "instagramAppID" => [
3604
- "label" => esc_html__("Instagram App ID", "wpdiscuz"),
3605
- "label_original" => "Instagram App ID",
3606
- "description" => "",
3607
- "description_original" => "",
3608
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/",
3609
- ],
3610
- "instagramAppSecret" => [
3611
- "label" => esc_html__("Instagram App Secret", "wpdiscuz"),
3612
- "label_original" => "Instagram App Secret",
3613
- "description" => "",
3614
- "description_original" => "",
3615
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/",
3616
- ],
3617
- "enableLinkedinLogin" => [
3618
- "label" => esc_html__("LinkedIn Login Button", "wpdiscuz"),
3619
- "label_original" => "LinkedIn Login Button",
3620
- "description" => "",
3621
- "description_original" => "",
3622
- "docurl" => "",
3623
- ],
3624
- "linkedinClientID" => [
3625
- "label" => esc_html__("LinkedIn Client ID", "wpdiscuz"),
3626
- "label_original" => "LinkedIn Client ID",
3627
- "description" => "",
3628
- "description_original" => "",
3629
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/",
3630
- ],
3631
- "linkedinClientSecret" => [
3632
- "label" => esc_html__("LinkedIn Client Secret", "wpdiscuz"),
3633
- "label_original" => "LinkedIn Client Secret",
3634
- "description" => "",
3635
- "description_original" => "",
3636
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/",
3637
- ],
3638
- "enableWhatsappShare" => [
3639
- "label" => esc_html__("WhatsApp Share Button", "wpdiscuz"),
3640
- "label_original" => "WhatsApp Share Button",
3641
- "description" => "",
3642
- "description_original" => "",
3643
- "docurl" => "",
3644
- ],
3645
- "enableYandexLogin" => [
3646
- "label" => esc_html__("Yandex Login Button", "wpdiscuz"),
3647
- "label_original" => "Yandex Login Button",
3648
- "description" => "",
3649
- "description_original" => "",
3650
- "docurl" => "",
3651
- ],
3652
- "yandexID" => [
3653
- "label" => esc_html__("Yandex ID", "wpdiscuz"),
3654
- "label_original" => "Yandex ID",
3655
- "description" => "",
3656
- "description_original" => "",
3657
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/",
3658
- ],
3659
- "yandexPassword" => [
3660
- "label" => esc_html__("Yandex Password", "wpdiscuz"),
3661
- "label_original" => "Yandex Password",
3662
- "description" => "",
3663
- "description_original" => "",
3664
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/",
3665
- ],
3666
- "enableMailruLogin" => [
3667
- "label" => esc_html__("Mail.ru Login Button", "wpdiscuz"),
3668
- "label_original" => "Mail.ru Login Button",
3669
- "description" => "",
3670
- "description_original" => "",
3671
- "docurl" => "",
3672
- ],
3673
- "mailruClientID" => [
3674
- "label" => esc_html__("Mail.ru Client ID", "wpdiscuz"),
3675
- "label_original" => "Mail.ru Client ID",
3676
- "description" => "",
3677
- "description_original" => "",
3678
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/",
3679
- ],
3680
- "mailruClientSecret" => [
3681
- "label" => esc_html__("Mail.ru Client Secret", "wpdiscuz"),
3682
- "label_original" => "Mail.ru Client Secret",
3683
- "description" => "",
3684
- "description_original" => "",
3685
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/",
3686
- ],
3687
- "enableWeiboLogin" => [
3688
- "label" => esc_html__("Weibo Login Button", "wpdiscuz"),
3689
- "label_original" => "Weibo Login Button",
3690
- "description" => "",
3691
- "description_original" => "",
3692
- "docurl" => "",
3693
- ],
3694
- "weiboKey" => [
3695
- "label" => esc_html__("Weibo App Key", "wpdiscuz"),
3696
- "label_original" => "Weibo App Key",
3697
- "description" => "",
3698
- "description_original" => "",
3699
- "docurl" => "",
3700
- ],
3701
- "weiboSecret" => [
3702
- "label" => esc_html__("Weibo App Secret", "wpdiscuz"),
3703
- "label_original" => "Weibo App Secret",
3704
- "description" => "",
3705
- "description_original" => "",
3706
- "docurl" => "",
3707
- ],
3708
- "enableWechatLogin" => [
3709
- "label" => esc_html__("WeChat Login Button", "wpdiscuz"),
3710
- "label_original" => "WeChat Login Button",
3711
- "description" => "",
3712
- "description_original" => "",
3713
- "docurl" => "",
3714
- ],
3715
- "wechatAppID" => [
3716
- "label" => esc_html__("WeChat App ID", "wpdiscuz"),
3717
- "label_original" => "WeChat App ID",
3718
- "description" => "",
3719
- "description_original" => "",
3720
- "docurl" => "",
3721
- ],
3722
- "wechatSecret" => [
3723
- "label" => esc_html__("WeChat Secret", "wpdiscuz"),
3724
- "label_original" => "WeChat Secret",
3725
- "description" => "",
3726
- "description_original" => "",
3727
- "docurl" => "",
3728
- ],
3729
- "enableQQLogin" => [
3730
- "label" => esc_html__("QQ Login Button", "wpdiscuz"),
3731
- "label_original" => "QQ Login Button",
3732
- "description" => "",
3733
- "description_original" => "",
3734
- "docurl" => "",
3735
- ],
3736
- "qqAppID" => [
3737
- "label" => esc_html__("QQ AppID", "wpdiscuz"),
3738
- "label_original" => "QQ AppID",
3739
- "description" => "",
3740
- "description_original" => "",
3741
- "docurl" => "",
3742
- ],
3743
- "qqSecret" => [
3744
- "label" => esc_html__("QQ AppKey", "wpdiscuz"),
3745
- "label_original" => "QQ AppKey",
3746
- "description" => "",
3747
- "description_original" => "",
3748
- "docurl" => "",
3749
- ],
3750
- "enableBaiduLogin" => [
3751
- "label" => esc_html__("Baidu Login Button", "wpdiscuz"),
3752
- "label_original" => "Baidu Login Button",
3753
- "description" => "",
3754
- "description_original" => "",
3755
- "docurl" => "",
3756
- ],
3757
- "baiduAppID" => [
3758
- "label" => esc_html__("Baidu Client ID", "wpdiscuz"),
3759
- "label_original" => "Baidu Client ID",
3760
- "description" => "",
3761
- "description_original" => "",
3762
- "docurl" => "",
3763
- ],
3764
- "baiduSecret" => [
3765
- "label" => esc_html__("Baidu Client Secret", "wpdiscuz"),
3766
- "label_original" => "Baidu Client Secret",
3767
- "description" => "",
3768
- "description_original" => "",
3769
- "docurl" => "",
3770
- ],
3771
- "enableVkLogin" => [
3772
- "label" => esc_html__("VK Login Button", "wpdiscuz"),
3773
- "label_original" => "VK Login Button",
3774
- "description" => "",
3775
- "description_original" => "",
3776
- "docurl" => "",
3777
- ],
3778
- "enableVkShare" => [
3779
- "label" => esc_html__("VK Share Button", "wpdiscuz"),
3780
- "label_original" => "VK Share Button",
3781
- "description" => "",
3782
- "description_original" => "",
3783
- "docurl" => "",
3784
- ],
3785
- "vkAppID" => [
3786
- "label" => esc_html__("VK Application ID", "wpdiscuz"),
3787
- "label_original" => "VK Application ID",
3788
- "description" => "",
3789
- "description_original" => "",
3790
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/",
3791
- ],
3792
- "vkAppSecret" => [
3793
- "label" => esc_html__("VK Secure Key", "wpdiscuz"),
3794
- "label_original" => "VK Secure Key",
3795
- "description" => "",
3796
- "description_original" => "",
3797
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/",
3798
- ],
3799
- "enableOkLogin" => [
3800
- "label" => esc_html__("OK Login Button", "wpdiscuz"),
3801
- "label_original" => "OK Login Button",
3802
- "description" => "",
3803
- "description_original" => "",
3804
- "docurl" => "",
3805
- ],
3806
- "enableOkShare" => [
3807
- "label" => esc_html__("OK Share Button", "wpdiscuz"),
3808
- "label_original" => "OK Share Button",
3809
- "description" => "",
3810
- "description_original" => "",
3811
- "docurl" => "",
3812
- ],
3813
- "okAppID" => [
3814
- "label" => esc_html__("OK Application ID", "wpdiscuz"),
3815
- "label_original" => "OK Application ID",
3816
- "description" => "",
3817
- "description_original" => "",
3818
- "docurl" => "https://apiok.ru/en/dev/app/create",
3819
- ],
3820
- "okAppKey" => [
3821
- "label" => esc_html__("OK Application Key", "wpdiscuz"),
3822
- "label_original" => "OK Application Key",
3823
- "description" => "",
3824
- "description_original" => "",
3825
- "docurl" => "https://apiok.ru/en/dev/app/create",
3826
- ],
3827
- "okAppSecret" => [
3828
- "label" => esc_html__("OK Application Secret", "wpdiscuz"),
3829
- "label_original" => "OK Application Secret",
3830
- "description" => "",
3831
- "description_original" => "",
3832
- "docurl" => "https://apiok.ru/en/dev/app/create",
3833
- ],
3834
- ],
3835
- ],
3836
- WpdiscuzCore::TAB_RATING => [
3837
- "title" => esc_html__("Article and Comment Rating", "wpdiscuz"),
3838
- "title_original" => "Article and Comment Rating",
3839
- "icon" => "box-rating.png",
3840
- "icon-height" => "46px",
3841
- "status" => "ok",
3842
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RATING . ".php",
3843
- "options" => [
3844
- "enablePostRatingSchema" => [
3845
- "label" => esc_html__("Enable Aggregate Rating Schema", "wpdiscuz"),
3846
- "label_original" => "Enable Aggregate Rating Schema",
3847
- "description" => esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first.", "wpdiscuz"),
3848
- "description" => sprintf(esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first. If your website does not sell Products, we do not recommend activating this option. For more details, please %s.", "wpdiscuz"), "<a href='https://wpdiscuz.com/community/f-a-q/post-rating-using-aggregate-rating-schema/' target='_blank'>read our documentation</a>"),
3849
- "description_original" => "Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first. If your website does not sell Products, we do not recommend activating this option. For more details, please <a href='https://wpdiscuz.com/community/f-a-q/post-rating-using-aggregate-rating-schema/' target='_blank'>read our documentation</a>.",
3850
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#enable-aggregate-rating-schema",
3851
- ],
3852
- "displayRatingOnPost" => [
3853
- "label" => esc_html__("Display Ratings", "wpdiscuz"),
3854
- "label_original" => "Display Ratings",
3855
- "description" => "",
3856
- "description_original" => "",
3857
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#display-ratings",
3858
- ],
3859
- "ratingStarColors" => [
3860
- "label" => esc_html__("Rating Star Colors", "wpdiscuz"),
3861
- "label_original" => "Rating Star Colors",
3862
- "description" => "",
3863
- "description_original" => "",
3864
- "docurl" => "",
3865
- ],
3866
- ],
3867
- ],
3868
- WpdiscuzCore::TAB_THREAD_DISPLAY => [
3869
- "title" => esc_html__("Comment Thread Displaying", "wpdiscuz"),
3870
- "title_original" => "Comment Thread Displaying",
3871
- "icon" => "box-threads.png",
3872
- "icon-height" => "58px",
3873
- "status" => "ok",
3874
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_DISPLAY . ".php",
3875
- "options" => [
3876
- "firstLoadWithAjax" => [
3877
- "label" => esc_html__("Comment List Loading Type", "wpdiscuz"),
3878
- "label_original" => "Comment List Loading Type",
3879
- "description" => esc_html__("Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.", "wpdiscuz"),
3880
- "description_original" => "Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.",
3881
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comment-list-loading-type",
3882
- ],
3883
- "isLoadOnlyParentComments" => [
3884
- "label" => __("Display only parent comments and <u>view replies &or;</u> button", "wpdiscuz"),
3885
- "label_original" => "Display only parent comments and <u>view replies &or;</u> button",
3886
- "description" => esc_html__("If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.", "wpdiscuz"),
3887
- "description_original" => "If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.",
3888
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-only-parent-comments-and-view-replies-%E2%88%A8-button",
3889
- ],
3890
- "showReactedFilterButton" => [
3891
- "label" => esc_html__('Display "Most Reacted Comments" filter button', "wpdiscuz"),
3892
- "label_original" => 'Display "Most Reacted Comments" filter button',
3893
- "description" => "",
3894
- "description_original" => "",
3895
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Cmost-reacted-comments%E2%80%9D-filter-button",
3896
- ],
3897
- "showHottestFilterButton" => [
3898
- "label" => esc_html__('Display "Hottest Comment Threads" filter button', "wpdiscuz"),
3899
- "label_original" => 'Display "Hottest Comment Threads" filter button',
3900
- "description" => "",
3901
- "description_original" => "",
3902
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Chottest-comment-threads%E2%80%9D-filter-button",
3903
- ],
3904
- "showSortingButtons" => [
3905
- "label" => esc_html__("Display Comment Sorting Options", "wpdiscuz"),
3906
- "label_original" => "Display Comment Sorting Options",
3907
- "description" => esc_html__("This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.", "wpdiscuz"),
3908
- "description_original" => "This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.",
3909
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-comment-sorting-options",
3910
- ],
3911
- "mostVotedByDefault" => [
3912
- "label" => esc_html__('Set comments order to "Most voted" by default', "wpdiscuz"),
3913
- "label_original" => 'Set comments order to "Most voted" by default',
3914
- "description" => "",
3915
- "description_original" => "",
3916
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#set-comments-order-to-%E2%80%9Cmost-voted%E2%80%9D-by-default",
3917
- ],
3918
- "reverseChildren" => [
3919
- "label" => esc_html__("Reverse Child Comments Order", "wpdiscuz"),
3920
- "label_original" => "Reverse Child Comments Order",
3921
- "description" => esc_html__("By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.", "wpdiscuz"),
3922
- "description_original" => "By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.",
3923
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#reverse-child-comments-order",
3924
- ],
3925
- "commentListLoadType" => [
3926
- "label" => esc_html__("Comments Pagination Type", "wpdiscuz"),
3927
- "label_original" => "Comments Pagination Type",
3928
- "description" => esc_html__('You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.', "wpdiscuz"),
3929
- "description_original" => 'You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.',
3930
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comments-pagination-type",
3931
- ],
3932
- "highlightUnreadComments" => [
3933
- "label" => esc_html__("Highlight Unread Comments", "wpdiscuz"),
3934
- "label_original" => "Highlight Unread Comments",
3935
- "description" => "",
3936
- "description_original" => "",
3937
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#highlight-unread-comments",
3938
- ],
3939
- "scrollToComment" => [
3940
- "label" => __("Scroll to the comment after posting", "wpdiscuz"),
3941
- "label_original" => "Scroll to the comment after posting",
3942
- "description" => "",
3943
- "description_original" => "",
3944
- "docurl" => "",
3945
- ],
3946
- "orderCommentsBy" => [
3947
- "label" => __("Newest and oldest comment ordering by", "wpdiscuz"),
3948
- "label_original" => "Newest and oldest comment ordering by",
3949
- "description" => "",
3950
- "description_original" => "",
3951
- "docurl" => "",
3952
- ],
3953
- ],
3954
- ],
3955
- WpdiscuzCore::TAB_THREAD_LAYOUTS => [
3956
- "title" => esc_html__("Comment Thread Features", "wpdiscuz"),
3957
- "title_original" => "Comment Thread Features",
3958
- "icon" => "box-layouts.png",
3959
- "icon-height" => "50px",
3960
- "status" => "ok",
3961
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_LAYOUTS . ".php",
3962
- "options" => [
3963
- "showCommentLink" => [
3964
- "label" => esc_html__("Show Comment Link", "wpdiscuz"),
3965
- "label_original" => "Show Comment Link",
3966
- "description" => "",
3967
- "description_original" => "",
3968
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#show-comment-link",
3969
- ],
3970
- "showCommentDate" => [
3971
- "label" => esc_html__("Show Comment Date", "wpdiscuz"),
3972
- "label_original" => "Show Comment Date",
3973
- "description" => "",
3974
- "description_original" => "",
3975
- "docurl" => "",
3976
- ],
3977
- "showVotingButtons" => [
3978
- "label" => esc_html__("Show Voting Buttons", "wpdiscuz"),
3979
- "label_original" => "Show Voting Buttons",
3980
- "description" => "",
3981
- "description_original" => "",
3982
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3983
- ],
3984
- "votingButtonsIcon" => [
3985
- "label" => esc_html__("Voting Buttons Icon", "wpdiscuz"),
3986
- "label_original" => "Voting Buttons Icon",
3987
- "description" => "",
3988
- "description_original" => "",
3989
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3990
- ],
3991
- "votingButtonsStyle" => [
3992
- "label" => esc_html__("Comment Voting Result Mode", "wpdiscuz"),
3993
- "label_original" => "Comment Voting Result Mode",
3994
- "description" => "",
3995
- "description_original" => "",
3996
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3997
- ],
3998
- "enableDislikeButton" => [
3999
- "label" => esc_html__("Enable down vote button (dislike)", "wpdiscuz"),
4000
- "label_original" => "Enable down vote button (dislike)",
4001
- "description" => "",
4002
- "description_original" => "",
4003
- "docurl" => "",
4004
- ],
4005
- "isGuestCanVote" => [
4006
- "label" => esc_html__("Allow Guests to Vote for Comments", "wpdiscuz"),
4007
- "label_original" => "Allow Guests to Vote for Comments",
4008
- "description" => "",
4009
- "description_original" => "",
4010
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
4011
- ],
4012
- "highlightVotingButtons" => [
4013
- "label" => esc_html__("Highlight Voting Buttons for Voters", "wpdiscuz"),
4014
- "label_original" => "Highlight Voting Buttons for Voters",
4015
- "description" => esc_html__("This allows users to see own voted comments.", "wpdiscuz"),
4016
- "description_original" => "This allows users to see own voted comments.",
4017
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
4018
- ],
4019
- "showAvatars" => [
4020
- "label" => esc_html__("Display Avatars", "wpdiscuz"),
4021
- "label_original" => "Display Avatars",
4022
- "description" => esc_html__("This option only related to avatars in comment system. For sitewide avatar control, please use WordPress native avatar settings in Dashboard > Settings > Discussions admin page.", "wpdiscuz"),
4023
- "description_original" => "",
4024
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4025
- ],
4026
- "defaultAvatarUrlForUser" => [
4027
- "label" => esc_html__("Default Avatar Source URL for Users", "wpdiscuz"),
4028
- "label_original" => "Default Avatar Source URL for Users",
4029
- "description" => "",
4030
- "description_original" => "",
4031
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4032
- ],
4033
- "defaultAvatarUrlForGuest" => [
4034
- "label" => esc_html__("Default Avatar Source URL for Guests", "wpdiscuz"),
4035
- "label_original" => "Default Avatar Source URL for Guests",
4036
- "description" => "",
4037
- "description_original" => "",
4038
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4039
- ],
4040
- "changeAvatarsEverywhere" => [
4041
- "label" => esc_html__("Enable Sitewide Usage of Default Avatars", "wpdiscuz"),
4042
- "label_original" => "Enable Sitewide Usage of Default Avatars",
4043
- "description" => "",
4044
- "description_original" => "",
4045
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4046
- ],
4047
- ],
4048
- ],
4049
- WpdiscuzCore::TAB_THREAD_STYLES => [
4050
- "title" => esc_html__("Styles and Colors", "wpdiscuz"),
4051
- "title_original" => "Styles and Colors",
4052
- "icon" => "box-styles.png",
4053
- "icon-height" => "56px",
4054
- "status" => "ok",
4055
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_STYLES . ".php",
4056
- "options" => [
4057
- "theme" => [
4058
- "label" => esc_html__("Comment Form and Comment List Style", "wpdiscuz"),
4059
- "label_original" => "Comment Form and Comment List Style",
4060
- "description" => esc_html__("Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.", "wpdiscuz"),
4061
- "description_original" => "Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.",
4062
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#comment-form-and-comment-list-style",
4063
- ],
4064
- "styleSpecificColors" => [
4065
- "label" => esc_html__("Style Specific Colors", "wpdiscuz"),
4066
- "label_original" => "Style Specific Colors",
4067
- "description" => esc_html__("These options allows you manage comment section colors individaly for the Default and Dark Styles", "wpdiscuz"),
4068
- "description_original" => "These options allows you manage comment section colors individaly for the Default and Dark Styles",
4069
- "docurl" => "",
4070
- ],
4071
- "colors" => [
4072
- "label" => esc_html__("General Colors", "wpdiscuz"),
4073
- "label_original" => "General Colors",
4074
- "description" => "",
4075
- "description_original" => "",
4076
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#colors",
4077
- ],
4078
- "commentTextSize" => [
4079
- "label" => esc_html__("Comment Text Size", "wpdiscuz"),
4080
- "label_original" => "Comment Text Size",
4081
- "description" => "",
4082
- "description_original" => "",
4083
- "docurl" => "",
4084
- ],
4085
- "enableFontAwesome" => [
4086
- "label" => esc_html__("Load Font Awesome css lib", "wpdiscuz"),
4087
- "label_original" => "Load Font Awesome css lib",
4088
- "description" => esc_html__("IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.", "wpdiscuz"),
4089
- "description_original" => "IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.",
4090
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#load-font-awesome-css-lib",
4091
- ],
4092
- "customCss" => [
4093
- "label" => esc_html__("Custom CSS Code", "wpdiscuz"),
4094
- "label_original" => "Custom CSS Code",
4095
- "description" => "",
4096
- "description_original" => "",
4097
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#custom-css-code",
4098
- ],
4099
- ],
4100
- ],
4101
- WpdiscuzCore::TAB_SUBSCRIPTION => [
4102
- "title" => esc_html__("Subscription and User Following", "wpdiscuz"),
4103
- "title_original" => "Subscription and User Following",
4104
- "icon" => "box-email.png",
4105
- "icon-height" => "58px",
4106
- "status" => "ok",
4107
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SUBSCRIPTION . ".php",
4108
- "options" => [
4109
- "enableUserMentioning" => [
4110
- "label" => esc_html__("Enable User Mentioning", "wpdiscuz"),
4111
- "label_original" => "Enable User Mentioning",
4112
- "description" => sprintf(__("This option allows mentioning users in comments using @nickname method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", "wpdiscuz"), '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
4113
- "description_original" => sprintf("This option allows mentioning users in comments using @nickname method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
4114
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-user-mentioning",
4115
- ],
4116
- "sendMailToMentionedUsers" => [
4117
- "label" => esc_html__("Send E-Mail Notification to Mentioned Users", "wpdiscuz"),
4118
- "label_original" => "Send E-Mail Notification to Mentioned Users",
4119
- "description" => "",
4120
- "description_original" => "",
4121
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#send-e-mail-notification-to-mentioned-users",
4122
- ],
4123
- "isNotifyOnCommentApprove" => [
4124
- "label" => esc_html__("Notify comment author once comment is approved", "wpdiscuz"),
4125
- "label_original" => "Notify comment author once comment is approved",
4126
- "description" => "",
4127
- "description_original" => "",
4128
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#notify-comment-author-once-comment-is-approved",
4129
- ],
4130
- "enableMemberConfirm" => [
4131
- "label" => esc_html__("Enable subscription confirmation for registered users", "wpdiscuz"),
4132
- "label_original" => "Enable subscription confirmation for registered users",
4133
- "description" => "",
4134
- "description_original" => "",
4135
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-registered-users",
4136
- ],
4137
- "enableGuestsConfirm" => [
4138
- "label" => esc_html__("Enable subscription confirmation for guests", "wpdiscuz"),
4139
- "label_original" => "Enable subscription confirmation for guests",
4140
- "description" => "",
4141
- "description_original" => "",
4142
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-guests",
4143
- ],
4144
- "subscriptionType" => [
4145
- "label" => esc_html__("Subscription types in Subscription Bar drop-down", "wpdiscuz"),
4146
- "label_original" => "Subscription types in Subscription Bar drop-down",
4147
- "description" => "",
4148
- "description_original" => "",
4149
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#subscription-types-in-subscription-bar-drop-down",
4150
- ],
4151
- "showReplyCheckbox" => [
4152
- "label" => esc_html__('Display "Notify of new replies to this comment" option in comment form', "wpdiscuz"),
4153
- "label_original" => 'Display "Notify of new replies to this comment" option in comment form',
4154
- "description" => esc_html__("wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.", "wpdiscuz"),
4155
- "description_original" => "wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.",
4156
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#display-%E2%80%9Cnotify-of-new-replies-to-this-comment%E2%80%9D-option-in-commen",
4157
- ],
4158
- "isReplyDefaultChecked" => [
4159
- "label" => esc_html__('Keep checked the "Notify of new replies to this comment" option by default', "wpdiscuz"),
4160
- "label_original" => 'Keep checked the "Notify of new replies to this comment" option by default',
4161
- "description" => "",
4162
- "description_original" => "",
4163
- "docurl" => "",
4164
- ],
4165
- "usePostmaticForCommentNotification" => [
4166
- "label" => esc_html__("Use Postmatic for subscriptions and commenting by email", "wpdiscuz"),
4167
- "label_original" => "Use Postmatic for subscriptions and commenting by email",
4168
- "description" => esc_html__("Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.", "wpdiscuz"),
4169
- "description_original" => "Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.",
4170
- "docurl" => "",
4171
- ],
4172
- "isFollowActive" => [
4173
- "label" => esc_html__("Enable User Following Feature", "wpdiscuz"),
4174
- "label_original" => "Enable User Following Feature",
4175
- "description" => "",
4176
- "description_original" => "",
4177
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#user-subscription-follow-users",
4178
- ],
4179
- "disableFollowConfirmForUsers" => [
4180
- "label" => esc_html__("Follow users without email confirmation", "wpdiscuz"),
4181
- "label_original" => "Follow users without email confirmation",
4182
- "description" => "",
4183
- "description_original" => "",
4184
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#follow-users-without-email-confirmation",
4185
- ],
4186
- ],
4187
- ],
4188
- WpdiscuzCore::TAB_LABELS => [
4189
- "title" => esc_html__("User Labels and Badges", "wpdiscuz"),
4190
- "title_original" => "User Labels and Badges",
4191
- "icon" => "box-badges.png",
4192
- "icon-height" => "56px",
4193
- "status" => "ok",
4194
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LABELS . ".php",
4195
- "options" => [
4196
- "blogRoleLabels" => [
4197
- "label" => esc_html__("Display Comment Author Labels", "wpdiscuz"),
4198
- "label_original" => "Display Comment Author Labels",
4199
- "description" => "",
4200
- "description_original" => "",
4201
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#display-comment-author-labels",
4202
- ],
4203
- "commenterLabelColors" => [
4204
- "label" => esc_html__("Comment Author Label Colors by User Role", "wpdiscuz"),
4205
- "label_original" => "Comment Author Label Colors by User Role",
4206
- "description" => "",
4207
- "description_original" => "",
4208
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#comment-author-label-colors-by-user-role",
4209
- ],
4210
- ],
4211
- ],
4212
- WpdiscuzCore::TAB_MODERATION => [
4213
- "title" => esc_html__("Comment Moderation", "wpdiscuz"),
4214
- "title_original" => "Comment Moderation",
4215
- "icon" => "box-moderation.png",
4216
- "icon-height" => "50px",
4217
- "status" => "ok",
4218
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_MODERATION . ".php",
4219
- "options" => [
4220
- "commentEditableTime" => [
4221
- "label" => esc_html__("Edit Button - Allow comment editing for", "wpdiscuz"),
4222
- "label_original" => "Edit Button - Allow comment editing for",
4223
- "description" => "",
4224
- "description_original" => "",
4225
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#edit-button-%E2%80%93-allow-comment-editing-for",
4226
- ],
4227
- "enableEditingWhenHaveReplies" => [
4228
- "label" => esc_html__("Enable editing for replied comments", "wpdiscuz"),
4229
- "label_original" => "Enable editing for replied comments",
4230
- "description" => "",
4231
- "description_original" => "",
4232
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#enable-editing-for-replied-comments",
4233
- ],
4234
- "displayEditingInfo" => [
4235
- "label" => esc_html__("Display comment editing Information", "wpdiscuz"),
4236
- "label_original" => "Display comment editing Information",
4237
- "description" => "",
4238
- "description_original" => "",
4239
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#display-comment-editing-information",
4240
- ],
4241
- "enableStickButton" => [
4242
- "label" => esc_html__("Stick Button - Stick a comment thread", "wpdiscuz"),
4243
- "label_original" => "Stick Button - Stick a comment thread",
4244
- "description" => "",
4245
- "description_original" => "",
4246
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#stick-button-%E2%80%93-stick-a-comment-thread",
4247
- ],
4248
- "enableCloseButton" => [
4249
- "label" => esc_html__("Close Button - Close a comment thread", "wpdiscuz"),
4250
- "label_original" => "Close Button - Close a comment thread",
4251
- "description" => "",
4252
- "description_original" => "",
4253
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#close-button-%E2%80%93-close-a-comment-thread",
4254
- ],
4255
- "userCommentsLimit" => [
4256
- "label" => esc_html__("Limit Comments per User", "wpdiscuz"),
4257
- "label_original" => "Limit Comments per User",
4258
- "description" => esc_html__("This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.", "wpdiscuz"),
4259
- "description_original" => "This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.",
4260
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#limit-comments-per-user",
4261
- ],
4262
- ],
4263
- ],
4264
- WpdiscuzCore::TAB_CONTENT => [
4265
- "title" => esc_html__("Comment Content and Media", "wpdiscuz"),
4266
- "title_original" => "Comment Content and Media",
4267
- "icon" => "box-content.png",
4268
- "icon-height" => "50px",
4269
- "status" => "ok",
4270
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_CONTENT . ".php",
4271
- "options" => [
4272
- "commentTextLength" => [
4273
- "label" => esc_html__("Comment Text Length", "wpdiscuz"),
4274
- "label_original" => "Comment Text Length",
4275
- "description" => esc_html__("Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.", "wpdiscuz"),
4276
- "description_original" => "Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.",
4277
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#comment-text-length",
4278
- ],
4279
- "replyTextLength" => [
4280
- "label" => esc_html__("Reply Text Length", "wpdiscuz"),
4281
- "label_original" => "Reply Text Length",
4282
- "description" => esc_html__("Allows to set minimum and maximum number of chars can be inserted in reply textarea. Leave the max value empty to remove the limit.", "wpdiscuz"),
4283
- "description_original" => "Allows to set minimum and maximum number of chars can be inserted in reply textarea. Leave the max value empty to remove the limit.",
4284
- "docurl" => "",
4285
- ],
4286
- "enableImageConversion" => [
4287
- "label" => esc_html__("Image Source URL to Image Conversion", "wpdiscuz"),
4288
- "label_original" => "Image Source URL to Image Conversion",
4289
- "description" => "",
4290
- "description_original" => "",
4291
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#image-source-url-to-image-conversion",
4292
- ],
4293
- "enableShortcodes" => [
4294
- "label" => esc_html__("Enable WordPress Shortcodes in Comment Content", "wpdiscuz"),
4295
- "label_original" => "Enable WordPress Shortcodes in Comment Content",
4296
- "description" => esc_html__("This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.", "wpdiscuz"),
4297
- "description_original" => "This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.",
4298
- "docurl" => "",
4299
- ],
4300
- "commentReadMoreLimit" => [
4301
- "label" => esc_html__("The number of words before breaking comment text (Read more)", "wpdiscuz"),
4302
- "label_original" => "The number of words before breaking comment text (Read more)",
4303
- "description" => esc_html__("Set this option value 0, to turn off comment text breaking function.", "wpdiscuz"),
4304
- "description_original" => "Set this option value 0, to turn off comment text breaking function.",
4305
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#the-number-of-words-before-breaking-comment-text-read-more",
4306
- ],
4307
- "wmuIsEnabled" => [
4308
- "label" => esc_html__("Enable Media Uploading", "wpdiscuz"),
4309
- "label_original" => "Enable Media Uploading",
4310
- "description" => esc_html__("This option allows commenters to attach an image with comments.", "wpdiscuz"),
4311
- "description_original" => "This option allows commenters to attach an image with comments.",
4312
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-media-uploading",
4313
- ],
4314
- "wmuIsGuestAllowed" => [
4315
- "label" => esc_html__("Allow Media Uploading for Guests", "wpdiscuz"),
4316
- "label_original" => "Allow Media Uploading for Guests",
4317
- "description" => "",
4318
- "description_original" => "",
4319
- "docurl" => "",
4320
- ],
4321
- "wmuIsLightbox" => [
4322
- "label" => esc_html__("Enable Lightbox for Attached Images", "wpdiscuz"),
4323
- "label_original" => "Enable Lightbox for Attached Images",
4324
- "description" => "",
4325
- "description_original" => "",
4326
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-lightbox-for-attached-images",
4327
- ],
4328
- "wmuMimeTypes" => [
4329
- "label" => esc_html__("Allowed File Types", "wpdiscuz"),
4330
- "label_original" => "Allowed File Types",
4331
- "description" => "",
4332
- "description_original" => "",
4333
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#allowed-file-types",
4334
- ],
4335
- "wmuMaxFileSize" => [
4336
- "label" => esc_html__("Max Uploaded Size", "wpdiscuz"),
4337
- "label_original" => "Max Uploaded Size",
4338
- "description" => esc_html__("You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.", "wpdiscuz"),
4339
- "description_original" => "You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.",
4340
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#max-uploaded-size",
4341
- ],
4342
- "wmuIsShowFilesDashboard" => [
4343
- "label" => esc_html__("Show Comments Media in Dashboard", "wpdiscuz"),
4344
- "label_original" => "Show Comments Media in Dashboard",
4345
- "description" => "",
4346
- "description_original" => "",
4347
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#show-comments-media-in-dashboard",
4348
- ],
4349
- "wmuSingleImageSize" => [
4350
- "label" => esc_html__("Single Image Sizes in Comments", "wpdiscuz"),
4351
- "label_original" => "Single Image Sizes in Comments",
4352
- "description" => "",
4353
- "description_original" => "",
4354
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#single-image-sizes-in-comments",
4355
- ],
4356
- "wmuImageSizes" => [
4357
- "label" => esc_html__("Generate Thumbnail Sizes", "wpdiscuz"),
4358
- "label_original" => "Generate Thumbnail Sizes",
4359
- "description" => esc_html__("Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.", "wpdiscuz"),
4360
- "description_original" => "Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.",
4361
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#generate-thumbnail-sizes",
4362
- ],
4363
- ],
4364
- ],
4365
- WpdiscuzCore::TAB_LIVE => [
4366
- "title" => esc_html__("Live Commenting and Notifications", "wpdiscuz"),
4367
- "title_original" => "Live Commenting and Notifications",
4368
- "icon" => "box-bubble.png",
4369
- "icon-height" => "70px",
4370
- "status" => "new",
4371
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LIVE . ".php",
4372
- "options" => [
4373
- "bubble" => [
4374
- "label" => esc_html__("Comment Bubble", "wpdiscuz"),
4375
- "label_original" => "Comment Bubble",
4376
- "description" => esc_html__("Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.", "wpdiscuz"),
4377
- "description_original" => "Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.",
4378
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble",
4379
- ],
4380
- "bubbleLiveUpdate" => [
4381
- "label" => esc_html__("Comment Bubble Live Update", "wpdiscuz"),
4382
- "label_original" => "Comment Bubble Live Update",
4383
- "description" => "",
4384
- "description_original" => "",
4385
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-live-update",
4386
- ],
4387
- "bubbleLocation" => [
4388
- "label" => esc_html__("Comment Bubble Location", "wpdiscuz"),
4389
- "label_original" => "Comment Bubble Location",
4390
- "description" => "",
4391
- "description_original" => "",
4392
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-location",
4393
- ],
4394
- "bubbleShowNewCommentMessage" => [
4395
- "label" => esc_html__("Bubble - Notify on New Comments", "wpdiscuz"),
4396
- "label_original" => "Bubble - Notify on New Comments",
4397
- "description" => esc_html__("If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.", "wpdiscuz"),
4398
- "description_original" => "If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.",
4399
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-notify-on-new-comments",
4400
- ],
4401
- "bubbleHintTimeout" => [
4402
- "label" => esc_html__("Bubble - Invite to comment in X seconds", "wpdiscuz"),
4403
- "label_original" => "Bubble - Invite to comment in X seconds",
4404
- "description" => esc_html__("In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.", "wpdiscuz"),
4405
- "description_original" => "In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.",
4406
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-invite-to-comment-in-x-seconds",
4407
- ],
4408
- "bubbleHintHideTimeout" => [
4409
- "label" => esc_html__("Bubble - Hide the invitation message in X seconds", "wpdiscuz"),
4410
- "label_original" => "Bubble - Hide the invitation message in X seconds",
4411
- "description" => "",
4412
- "description_original" => "",
4413
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-hide-the-invitation-message-in-x-seconds",
4414
- ],
4415
- "commentListUpdateType" => [
4416
- "label" => esc_html__("Live Update", "wpdiscuz"),
4417
- "label_original" => "Live Update",
4418
- "description" => esc_html__("wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.", "wpdiscuz"),
4419
- "description_original" => "wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.",
4420
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#live-update",
4421
- ],
4422
- "liveUpdateGuests" => [
4423
- "label" => esc_html__("Enable Live Update for Guests", "wpdiscuz"),
4424
- "label_original" => "Enable Live Update for Guests",
4425
- "description" => "",
4426
- "description_original" => "",
4427
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#enable-live-update-for-guests",
4428
- ],
4429
- "commentListUpdateTimer" => [
4430
- "label" => esc_html__("Update Comment List Every", "wpdiscuz"),
4431
- "label_original" => "Update Comment List Every",
4432
- "description" => "",
4433
- "description_original" => "",
4434
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#update-comment-list-every-x-seconds",
4435
- ],
4436
- ],
4437
- ],
4438
- WpdiscuzCore::TAB_INLINE => [
4439
- "title" => esc_html__("Inline Commenting", "wpdiscuz"),
4440
- "title_original" => "Inline Commenting",
4441
- "icon" => "box-feedback.png",
4442
- "icon-height" => "56px",
4443
- "status" => "new",
4444
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_INLINE . ".php",
4445
- "options" => [
4446
- "showInlineFilterButton" => [
4447
- "label" => esc_html__("Display filter button to load inline feedbacks", "wpdiscuz"),
4448
- "label_original" => "Display filter button to load inline feedbacks",
4449
- "description" => esc_html__("This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).", "wpdiscuz"),
4450
- "description_original" => "This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).",
4451
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#display-filter-button-to-load-inline-feedbacks",
4452
- ],
4453
- "inlineFeedbackAttractionType" => [
4454
- "label" => esc_html__('Animation for "Leave a Feedback" button in article content', "wpdiscuz"),
4455
- "label_original" => 'Animation for "Leave a Feedback" button in article content',
4456
- "description" => esc_html__('Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.', "wpdiscuz"),
4457
- "description_original" => 'Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.',
4458
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#animation-for-%E2%80%9Cleave-a-feedback%E2%80%9D-button-in-article-content",
4459
- ],
4460
- ],
4461
- ],
4462
- WpdiscuzCore::TAB_GENERAL => [
4463
- "title" => esc_html__("General Settings", "wpdiscuz"),
4464
- "title_original" => "General Settings",
4465
- "icon" => "box-general.png",
4466
- "icon-height" => "56px",
4467
- "status" => "ok",
4468
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_GENERAL . ".php",
4469
- "options" => [
4470
- "isEnableOnHome" => [
4471
- "label" => esc_html__("Enable wpDiscuz on Home Page", "wpdiscuz"),
4472
- "label_original" => "Enable wpDiscuz on Home Page",
4473
- "description" => "",
4474
- "description_original" => "",
4475
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#enable-wpdiscuz-on-home-page",
4476
- ],
4477
- "isNativeAjaxEnabled" => [
4478
- "label" => esc_html__("Use WordPress native AJAX functions", "wpdiscuz"),
4479
- "label_original" => "Use WordPress native AJAX functions",
4480
- "description" => esc_html__("By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.", "wpdiscuz"),
4481
- "description_original" => "By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.",
4482
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-native-ajax-functions",
4483
- ],
4484
- "loadComboVersion" => [
4485
- "label" => esc_html__("Combine JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
4486
- "label_original" => "Combine JS and CSS Files to Optimize Page Loading Speed",
4487
- "description" => "",
4488
- "description_original" => "",
4489
- "docurl" => "",
4490
- ],
4491
- "loadMinVersion" => [
4492
- "label" => esc_html__("Minify JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
4493
- "label_original" => "Minify JS and CSS Files to Optimize Page Loading Speed",
4494
- "description" => "",
4495
- "description_original" => "",
4496
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#load-min-versions",
4497
- ],
4498
- "commentLinkFilter" => [
4499
- "label" => esc_html__("Secure comment content in HTTPS protocol.", "wpdiscuz"),
4500
- "label_original" => "Secure comment content in HTTPS protocol.",
4501
- "description" => esc_html__("This option detects images and other contents with non-https source URLs and fix according to your selected logic.", "wpdiscuz"),
4502
- "description_original" => "This option detects images and other contents with non-https source URLs and fix according to your selected logic.",
4503
- "docurl" => "",
4504
- ],
4505
- "redirectPage" => [
4506
- "label" => esc_html__("Redirect First Comment to", "wpdiscuz"),
4507
- "label_original" => "Redirect First Comment to",
4508
- "description" => "",
4509
- "description_original" => "",
4510
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#redirect-first-comment-to",
4511
- ],
4512
- "simpleCommentDate" => [
4513
- "label" => esc_html__("Use WordPress Date/Time Format", "wpdiscuz"),
4514
- "label_original" => "Use WordPress Date/Time Format",
4515
- "description" => esc_html__("wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.", "wpdiscuz"),
4516
- "description_original" => "wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.",
4517
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-date-time-format",
4518
- ],
4519
- "dateDiffFormat" => [
4520
- "label" => esc_html__("Structure of Human Readable Date Format", "wpdiscuz"),
4521
- "label_original" => "Structure of Human Readable Date Format",
4522
- "description" => esc_html__("By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.", "wpdiscuz"),
4523
- "description_original" => "By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.",
4524
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#structure-of-human-readable-date-format",
4525
- ],
4526
- "isUsePoMo" => [
4527
- "label" => esc_html__("Use Plugin .PO/.MO Files", "wpdiscuz"),
4528
- "label_original" => "Use Plugin .PO/.MO Files",
4529
- "description" => esc_html__("wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.", "wpdiscuz"),
4530
- "description_original" => "wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.",
4531
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-plugin-po-mo-files",
4532
- ],
4533
- "showPluginPoweredByLink" => [
4534
- "label" => esc_html__("Help wpDiscuz to grow allowing people to recognize which comment plugin you use", "wpdiscuz"),
4535
- "label_original" => "Help wpDiscuz to grow allowing people to recognize which comment plugin you use",
4536
- "description" => esc_html__("Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.", "wpdiscuz"),
4537
- "description_original" => "Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.",
4538
- "docurl" => "",
4539
- ],
4540
- "isCacheEnabled" => [
4541
- "label" => esc_html__("Enable Cache", "wpdiscuz"),
4542
- "label_original" => "Enable Cache",
4543
- "description" => esc_html__("Enable Comments and Users Cache", "wpdiscuz"),
4544
- "description_original" => "Enable Comment and Comment Author Cache",
4545
- "docurl" => "",
4546
- ],
4547
- "cacheTimeout" => [
4548
- "label" => esc_html__("Cache Reset Frequency", "wpdiscuz"),
4549
- "label_original" => "Cache Reset Frequency",
4550
- "description" => "",
4551
- "description_original" => "",
4552
- "docurl" => "",
4553
- ],
4554
- "removeVoteData" => [
4555
- "label" => esc_html__("Remove Vote Data", "wpdiscuz"),
4556
- "label_original" => "Remove Vote Data",
4557
- "description" => "",
4558
- "description_original" => "",
4559
- "docurl" => "",
4560
- ],
4561
- "purgeAvatarCache" => [
4562
- "label" => esc_html__("Purge Expired Avatar Caches", "wpdiscuz"),
4563
- "label_original" => "Purge Expired Avatar Caches",
4564
- "description" => "",
4565
- "description_original" => "",
4566
- "docurl" => "",
4567
- ],
4568
- "purgeAllCaches" => [
4569
- "label" => esc_html__("Purge Comment and User Caches", "wpdiscuz"),
4570
- "label_original" => "Purge Comment and User Caches",
4571
- "description" => "",
4572
- "description_original" => "",
4573
- "docurl" => "",
4574
- ],
4575
- ],
4576
- ],
4577
- ],
4578
- "addons" => [],
4579
- ];
4580
- return apply_filters("wpdiscuz_settings", $settings);
4581
- }
4582
 
4583
  }
2
 
3
  class WpdiscuzOptions implements WpDiscuzConstants {
4
 
5
+ public $form = [];
6
+ public $recaptcha = [];
7
+ public $login = [];
8
+ public $social = [];
9
+ public $rating = [];
10
+ public $thread_display = [];
11
+ public $thread_layouts = [];
12
+ public $thread_styles = [];
13
+ public $subscription = [];
14
+ public $labels = [];
15
+ public $moderation = [];
16
+ public $content = [];
17
+ public $live = [];
18
+ public $inline = [];
19
+ public $general = [];
20
+ public $wp = [];
21
+ public $wmuUploadMaxFileSize;
22
+ public $wmuPostMaxSize;
23
 
24
+ /**
25
+ * Type - HTML elements array
26
+ * Available Values - Text
27
+ * Description - Phrases for form elements texts
28
+ * Default Value -
29
+ */
30
+ public $phrases;
31
 
32
+ /**
33
+ * helper class for database operations
34
+ */
35
+ public $dbManager;
36
 
37
+ /* === CACHE === */
38
+ public $isGoodbyeCaptchaActive;
39
+ public $goodbyeCaptchaTocken;
40
+ public $formContentTypeRel;
41
+ public $formPostRel;
42
+ private $addons;
43
+ private $tips;
44
 
45
+ public function __construct($dbManager) {
46
+ $this->dbManager = $dbManager;
47
+ $this->wmuUploadMaxFileSize = $this->getSizeInBytes(ini_get('upload_max_filesize'));
48
+ $this->wmuPostMaxSize = $this->getSizeInBytes(ini_get('post_max_size'));
49
+ $this->initAddons();
50
+ $this->initTips();
51
+ add_option(self::OPTION_SLUG_HASH_KEY, md5(time() . uniqid()), "", "no");
52
+ $this->initPhrases();
53
+ $this->addOptions();
54
+ $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
55
+ $this->wp["dateFormat"] = get_option("date_format");
56
+ $this->wp["timeFormat"] = get_option("time_format");
57
+ $this->wp["threadComments"] = get_option("thread_comments");
58
+ $this->wp["threadCommentsDepth"] = get_option("thread_comments_depth");
59
+ $this->wp["isPaginate"] = get_option("page_comments");
60
+ $wordpressCommentOrder = strtolower(get_option("comment_order"));
61
+ $this->wp["commentOrder"] = in_array($wordpressCommentOrder, ["asc", "desc",]) ? $wordpressCommentOrder : "desc";
62
+ $this->wp["commentPerPage"] = get_option("comments_per_page");
63
+ $this->wp["showAvatars"] = get_option("show_avatars");
64
+ $this->wp["defaultCommentsPage"] = get_option("default_comments_page");
65
+ $this->general["humanReadableNumbers"] = apply_filters("wpdiscuz_enable_human_readable_numbers", true);
66
+ $this->initFormRelations();
67
+ $this->initGoodbyeCaptchaField();
68
+ add_action("init", [&$this, "initPhrasesOnLoad"], 2126);
69
+ add_action("admin_init", [&$this, "saveAndResetOptionsAndPhrases"], 1);
70
+ add_action("wp_ajax_dismiss_wpdiscuz_addon_note", [&$this, "dismissAddonNote"]);
71
+ add_action("admin_notices", [&$this, "adminNotices"]);
72
+ }
73
 
74
+ public function initOptions($serialize_options) {
75
+ $options = maybe_unserialize($serialize_options);
76
+ $defaultOptions = $this->getDefaultOptions();
77
+ /* form */
78
+ $this->form["commentFormView"] = isset($options[self::TAB_FORM]["commentFormView"]) ? $options[self::TAB_FORM]["commentFormView"] : $defaultOptions[self::TAB_FORM]["commentFormView"];
79
+ $this->form["enableDropAnimation"] = isset($options[self::TAB_FORM]["enableDropAnimation"]) ? $options[self::TAB_FORM]["enableDropAnimation"] : $defaultOptions[self::TAB_FORM]["enableDropAnimation"];
80
+ $this->form["richEditor"] = isset($options[self::TAB_FORM]["richEditor"]) ? $options[self::TAB_FORM]["richEditor"] : $defaultOptions[self::TAB_FORM]["richEditor"];
81
+ $this->form["boldButton"] = isset($options[self::TAB_FORM]["boldButton"]) ? $options[self::TAB_FORM]["boldButton"] : $defaultOptions[self::TAB_FORM]["boldButton"];
82
+ $this->form["italicButton"] = isset($options[self::TAB_FORM]["italicButton"]) ? $options[self::TAB_FORM]["italicButton"] : $defaultOptions[self::TAB_FORM]["italicButton"];
83
+ $this->form["underlineButton"] = isset($options[self::TAB_FORM]["underlineButton"]) ? $options[self::TAB_FORM]["underlineButton"] : $defaultOptions[self::TAB_FORM]["underlineButton"];
84
+ $this->form["strikeButton"] = isset($options[self::TAB_FORM]["strikeButton"]) ? $options[self::TAB_FORM]["strikeButton"] : $defaultOptions[self::TAB_FORM]["strikeButton"];
85
+ $this->form["olButton"] = isset($options[self::TAB_FORM]["olButton"]) ? $options[self::TAB_FORM]["olButton"] : $defaultOptions[self::TAB_FORM]["olButton"];
86
+ $this->form["ulButton"] = isset($options[self::TAB_FORM]["ulButton"]) ? $options[self::TAB_FORM]["ulButton"] : $defaultOptions[self::TAB_FORM]["ulButton"];
87
+ $this->form["blockquoteButton"] = isset($options[self::TAB_FORM]["blockquoteButton"]) ? $options[self::TAB_FORM]["blockquoteButton"] : $defaultOptions[self::TAB_FORM]["blockquoteButton"];
88
+ $this->form["codeblockButton"] = isset($options[self::TAB_FORM]["codeblockButton"]) ? $options[self::TAB_FORM]["codeblockButton"] : $defaultOptions[self::TAB_FORM]["codeblockButton"];
89
+ $this->form["linkButton"] = isset($options[self::TAB_FORM]["linkButton"]) ? $options[self::TAB_FORM]["linkButton"] : $defaultOptions[self::TAB_FORM]["linkButton"];
90
+ $this->form["sourcecodeButton"] = isset($options[self::TAB_FORM]["sourcecodeButton"]) ? $options[self::TAB_FORM]["sourcecodeButton"] : $defaultOptions[self::TAB_FORM]["sourcecodeButton"];
91
+ $this->form["spoilerButton"] = isset($options[self::TAB_FORM]["spoilerButton"]) ? $options[self::TAB_FORM]["spoilerButton"] : $defaultOptions[self::TAB_FORM]["spoilerButton"];
92
+ $this->form["enableQuickTags"] = isset($options[self::TAB_FORM]["enableQuickTags"]) ? $options[self::TAB_FORM]["enableQuickTags"] : $defaultOptions[self::TAB_FORM]["enableQuickTags"];
93
+ $this->form["commenterNameMinLength"] = isset($options[self::TAB_FORM]["commenterNameMinLength"]) ? $options[self::TAB_FORM]["commenterNameMinLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMinLength"];
94
+ $this->form["commenterNameMaxLength"] = isset($options[self::TAB_FORM]["commenterNameMaxLength"]) ? $options[self::TAB_FORM]["commenterNameMaxLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMaxLength"];
95
+ $this->form["storeCommenterData"] = isset($options[self::TAB_FORM]["storeCommenterData"]) ? $options[self::TAB_FORM]["storeCommenterData"] : $defaultOptions[self::TAB_FORM]["storeCommenterData"];
96
+ /* recaptcha */
97
+ $this->recaptcha["version"] = "2.0";
98
+ $this->recaptcha["score"] = "";
99
+ $this->recaptcha["siteKey"] = isset($options[self::TAB_RECAPTCHA]["siteKey"]) ? $options[self::TAB_RECAPTCHA]["siteKey"] : $defaultOptions[self::TAB_RECAPTCHA]["siteKey"];
100
+ $this->recaptcha["secretKey"] = isset($options[self::TAB_RECAPTCHA]["secretKey"]) ? $options[self::TAB_RECAPTCHA]["secretKey"] : $defaultOptions[self::TAB_RECAPTCHA]["secretKey"];
101
+ $this->recaptcha["theme"] = isset($options[self::TAB_RECAPTCHA]["theme"]) ? $options[self::TAB_RECAPTCHA]["theme"] : $defaultOptions[self::TAB_RECAPTCHA]["theme"];
102
+ $this->recaptcha["lang"] = isset($options[self::TAB_RECAPTCHA]["lang"]) ? $options[self::TAB_RECAPTCHA]["lang"] : $defaultOptions[self::TAB_RECAPTCHA]["lang"];
103
+ $this->recaptcha["requestMethod"] = isset($options[self::TAB_RECAPTCHA]["requestMethod"]) ? $options[self::TAB_RECAPTCHA]["requestMethod"] : $defaultOptions[self::TAB_RECAPTCHA]["requestMethod"];
104
+ $this->recaptcha["showForGuests"] = isset($options[self::TAB_RECAPTCHA]["showForGuests"]) ? $options[self::TAB_RECAPTCHA]["showForGuests"] : $defaultOptions[self::TAB_RECAPTCHA]["showForGuests"];
105
+ $this->recaptcha["showForUsers"] = isset($options[self::TAB_RECAPTCHA]["showForUsers"]) ? $options[self::TAB_RECAPTCHA]["showForUsers"] : $defaultOptions[self::TAB_RECAPTCHA]["showForUsers"];
106
+ $this->recaptcha["isShowOnSubscribeForm"] = isset($options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? $options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"] : $defaultOptions[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"];
107
+ $lang = $this->recaptcha["lang"] ? "&hl=" . $this->recaptcha["lang"] : "";
108
+ $this->recaptcha["reCaptchaUrl"] = "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit$lang";
109
+ /* login */
110
+ $this->login["showLoggedInUsername"] = isset($options[self::TAB_LOGIN]["showLoggedInUsername"]) ? $options[self::TAB_LOGIN]["showLoggedInUsername"] : $defaultOptions[self::TAB_LOGIN]["showLoggedInUsername"];
111
+ $this->login["showLoginLinkForGuests"] = isset($options[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? $options[self::TAB_LOGIN]["showLoginLinkForGuests"] : $defaultOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
112
+ $this->login["showActivityTab"] = isset($options[self::TAB_LOGIN]["showActivityTab"]) ? $options[self::TAB_LOGIN]["showActivityTab"] : $defaultOptions[self::TAB_LOGIN]["showActivityTab"];
113
+ $this->login["showSubscriptionsTab"] = isset($options[self::TAB_LOGIN]["showSubscriptionsTab"]) ? $options[self::TAB_LOGIN]["showSubscriptionsTab"] : $defaultOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
114
+ $this->login["showFollowsTab"] = isset($options[self::TAB_LOGIN]["showFollowsTab"]) ? $options[self::TAB_LOGIN]["showFollowsTab"] : $defaultOptions[self::TAB_LOGIN]["showFollowsTab"];
115
+ $this->login["enableProfileURLs"] = isset($options[self::TAB_LOGIN]["enableProfileURLs"]) ? $options[self::TAB_LOGIN]["enableProfileURLs"] : $defaultOptions[self::TAB_LOGIN]["enableProfileURLs"];
116
+ $this->login["websiteAsProfileUrl"] = isset($options[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? $options[self::TAB_LOGIN]["websiteAsProfileUrl"] : $defaultOptions[self::TAB_LOGIN]["websiteAsProfileUrl"];
117
+ $this->login["isUserByEmail"] = isset($options[self::TAB_LOGIN]["isUserByEmail"]) ? $options[self::TAB_LOGIN]["isUserByEmail"] : $defaultOptions[self::TAB_LOGIN]["isUserByEmail"];
118
+ $this->login["loginUrl"] = isset($options[self::TAB_LOGIN]["loginUrl"]) ? $options[self::TAB_LOGIN]["loginUrl"] : $defaultOptions[self::TAB_LOGIN]["loginUrl"];
119
+ /* social */
120
+ $this->social["socialLoginAgreementCheckbox"] = isset($options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? $options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
121
+ $this->social["socialLoginInSecondaryForm"] = isset($options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? $options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
122
+ $this->social["displayIconOnAvatar"] = isset($options[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? $options[self::TAB_SOCIAL]["displayIconOnAvatar"] : $defaultOptions[self::TAB_SOCIAL]["displayIconOnAvatar"];
123
+ $this->social["rememberLoggedinUser"] = isset($options[self::TAB_SOCIAL]["rememberLoggedinUser"]) ? $options[self::TAB_SOCIAL]["rememberLoggedinUser"] : $defaultOptions[self::TAB_SOCIAL]["rememberLoggedinUser"];
124
+ // fb
125
+ $this->social["enableFbLogin"] = isset($options[self::TAB_SOCIAL]["enableFbLogin"]) ? $options[self::TAB_SOCIAL]["enableFbLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableFbLogin"];
126
+ $this->social["enableFbShare"] = isset($options[self::TAB_SOCIAL]["enableFbShare"]) ? $options[self::TAB_SOCIAL]["enableFbShare"] : $defaultOptions[self::TAB_SOCIAL]["enableFbShare"];
127
+ $this->social["fbAppID"] = isset($options[self::TAB_SOCIAL]["fbAppID"]) ? $options[self::TAB_SOCIAL]["fbAppID"] : $defaultOptions[self::TAB_SOCIAL]["fbAppID"];
128
+ $this->social["fbAppSecret"] = isset($options[self::TAB_SOCIAL]["fbAppSecret"]) ? $options[self::TAB_SOCIAL]["fbAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["fbAppSecret"];
129
+ $this->social["fbUseOAuth2"] = isset($options[self::TAB_SOCIAL]["fbUseOAuth2"]) ? $options[self::TAB_SOCIAL]["fbUseOAuth2"] : $defaultOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
130
+ // twitter
131
+ $this->social["enableTwitterLogin"] = isset($options[self::TAB_SOCIAL]["enableTwitterLogin"]) ? $options[self::TAB_SOCIAL]["enableTwitterLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
132
+ $this->social["enableTwitterShare"] = isset($options[self::TAB_SOCIAL]["enableTwitterShare"]) ? $options[self::TAB_SOCIAL]["enableTwitterShare"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterShare"];
133
+ $this->social["twitterAppID"] = isset($options[self::TAB_SOCIAL]["twitterAppID"]) ? $options[self::TAB_SOCIAL]["twitterAppID"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppID"];
134
+ $this->social["twitterAppSecret"] = isset($options[self::TAB_SOCIAL]["twitterAppSecret"]) ? $options[self::TAB_SOCIAL]["twitterAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppSecret"];
135
+ // google
136
+ $this->social["enableGoogleLogin"] = isset($options[self::TAB_SOCIAL]["enableGoogleLogin"]) ? $options[self::TAB_SOCIAL]["enableGoogleLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
137
+ $this->social["googleClientID"] = isset($options[self::TAB_SOCIAL]["googleClientID"]) ? $options[self::TAB_SOCIAL]["googleClientID"] : $defaultOptions[self::TAB_SOCIAL]["googleClientID"];
138
+ $this->social["googleClientSecret"] = isset($options[self::TAB_SOCIAL]["googleClientSecret"]) ? $options[self::TAB_SOCIAL]["googleClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["googleClientSecret"];
139
+ // disqus
140
+ $this->social["enableDisqusLogin"] = isset($options[self::TAB_SOCIAL]["enableDisqusLogin"]) ? $options[self::TAB_SOCIAL]["enableDisqusLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableDisqusLogin"];
141
+ $this->social["disqusPublicKey"] = isset($options[self::TAB_SOCIAL]["disqusPublicKey"]) ? $options[self::TAB_SOCIAL]["disqusPublicKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusPublicKey"];
142
+ $this->social["disqusSecretKey"] = isset($options[self::TAB_SOCIAL]["disqusSecretKey"]) ? $options[self::TAB_SOCIAL]["disqusSecretKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusSecretKey"];
143
+ // wordpress
144
+ $this->social["enableWordpressLogin"] = isset($options[self::TAB_SOCIAL]["enableWordpressLogin"]) ? $options[self::TAB_SOCIAL]["enableWordpressLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWordpressLogin"];
145
+ $this->social["wordpressClientID"] = isset($options[self::TAB_SOCIAL]["wordpressClientID"]) ? $options[self::TAB_SOCIAL]["wordpressClientID"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientID"];
146
+ $this->social["wordpressClientSecret"] = isset($options[self::TAB_SOCIAL]["wordpressClientSecret"]) ? $options[self::TAB_SOCIAL]["wordpressClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientSecret"];
147
+ // instagram
148
+ $this->social["enableInstagramLogin"] = isset($options[self::TAB_SOCIAL]["enableInstagramLogin"]) ? $options[self::TAB_SOCIAL]["enableInstagramLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableInstagramLogin"];
149
+ $this->social["instagramAppID"] = isset($options[self::TAB_SOCIAL]["instagramAppID"]) ? $options[self::TAB_SOCIAL]["instagramAppID"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppID"];
150
+ $this->social["instagramAppSecret"] = isset($options[self::TAB_SOCIAL]["instagramAppSecret"]) ? $options[self::TAB_SOCIAL]["instagramAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppSecret"];
151
+ // linkedin
152
+ $this->social["enableLinkedinLogin"] = isset($options[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? $options[self::TAB_SOCIAL]["enableLinkedinLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableLinkedinLogin"];
153
+ $this->social["linkedinClientID"] = isset($options[self::TAB_SOCIAL]["linkedinClientID"]) ? $options[self::TAB_SOCIAL]["linkedinClientID"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientID"];
154
+ $this->social["linkedinClientSecret"] = isset($options[self::TAB_SOCIAL]["linkedinClientSecret"]) ? $options[self::TAB_SOCIAL]["linkedinClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientSecret"];
155
+ // whatsapp
156
+ $this->social["enableWhatsappShare"] = isset($options[self::TAB_SOCIAL]["enableWhatsappShare"]) ? $options[self::TAB_SOCIAL]["enableWhatsappShare"] : $defaultOptions[self::TAB_SOCIAL]["enableWhatsappShare"];
157
+ // yandex
158
+ $this->social["enableYandexLogin"] = isset($options[self::TAB_SOCIAL]["enableYandexLogin"]) ? $options[self::TAB_SOCIAL]["enableYandexLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableYandexLogin"];
159
+ $this->social["yandexID"] = isset($options[self::TAB_SOCIAL]["yandexID"]) ? $options[self::TAB_SOCIAL]["yandexID"] : $defaultOptions[self::TAB_SOCIAL]["yandexID"];
160
+ $this->social["yandexPassword"] = isset($options[self::TAB_SOCIAL]["yandexPassword"]) ? $options[self::TAB_SOCIAL]["yandexPassword"] : $defaultOptions[self::TAB_SOCIAL]["yandexPassword"];
161
+ // mail.ru
162
+ $this->social["enableMailruLogin"] = isset($options[self::TAB_SOCIAL]["enableMailruLogin"]) ? $options[self::TAB_SOCIAL]["enableMailruLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableMailruLogin"];
163
+ $this->social["mailruClientID"] = isset($options[self::TAB_SOCIAL]["mailruClientID"]) ? $options[self::TAB_SOCIAL]["mailruClientID"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientID"];
164
+ $this->social["mailruClientSecret"] = isset($options[self::TAB_SOCIAL]["mailruClientSecret"]) ? $options[self::TAB_SOCIAL]["mailruClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientSecret"];
165
+ // weibo
166
+ $this->social["enableWeiboLogin"] = isset($options[self::TAB_SOCIAL]["enableWeiboLogin"]) ? $options[self::TAB_SOCIAL]["enableWeiboLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWeiboLogin"];
167
+ $this->social["weiboKey"] = isset($options[self::TAB_SOCIAL]["weiboKey"]) ? $options[self::TAB_SOCIAL]["weiboKey"] : $defaultOptions[self::TAB_SOCIAL]["weiboKey"];
168
+ $this->social["weiboSecret"] = isset($options[self::TAB_SOCIAL]["weiboSecret"]) ? $options[self::TAB_SOCIAL]["weiboSecret"] : $defaultOptions[self::TAB_SOCIAL]["weiboSecret"];
169
+ // wechat
170
+ $this->social["enableWechatLogin"] = isset($options[self::TAB_SOCIAL]["enableWechatLogin"]) ? $options[self::TAB_SOCIAL]["enableWechatLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWechatLogin"];
171
+ $this->social["wechatAppID"] = isset($options[self::TAB_SOCIAL]["wechatAppID"]) ? $options[self::TAB_SOCIAL]["wechatAppID"] : $defaultOptions[self::TAB_SOCIAL]["wechatAppID"];
172
+ $this->social["wechatSecret"] = isset($options[self::TAB_SOCIAL]["wechatSecret"]) ? $options[self::TAB_SOCIAL]["wechatSecret"] : $defaultOptions[self::TAB_SOCIAL]["wechatSecret"];
173
+ // qq
174
+ $this->social["enableQQLogin"] = isset($options[self::TAB_SOCIAL]["enableQQLogin"]) ? $options[self::TAB_SOCIAL]["enableQQLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableQQLogin"];
175
+ $this->social["qqAppID"] = isset($options[self::TAB_SOCIAL]["qqAppID"]) ? $options[self::TAB_SOCIAL]["qqAppID"] : $defaultOptions[self::TAB_SOCIAL]["qqAppID"];
176
+ $this->social["qqSecret"] = isset($options[self::TAB_SOCIAL]["qqSecret"]) ? $options[self::TAB_SOCIAL]["qqSecret"] : $defaultOptions[self::TAB_SOCIAL]["qqSecret"];
177
+ // baidu
178
+ $this->social["enableBaiduLogin"] = isset($options[self::TAB_SOCIAL]["enableBaiduLogin"]) ? $options[self::TAB_SOCIAL]["enableBaiduLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableBaiduLogin"];
179
+ $this->social["baiduAppID"] = isset($options[self::TAB_SOCIAL]["baiduAppID"]) ? $options[self::TAB_SOCIAL]["baiduAppID"] : $defaultOptions[self::TAB_SOCIAL]["baiduAppID"];
180
+ $this->social["baiduSecret"] = isset($options[self::TAB_SOCIAL]["baiduSecret"]) ? $options[self::TAB_SOCIAL]["baiduSecret"] : $defaultOptions[self::TAB_SOCIAL]["baiduSecret"];
181
+ // vk
182
+ $this->social["enableVkLogin"] = isset($options[self::TAB_SOCIAL]["enableVkLogin"]) ? $options[self::TAB_SOCIAL]["enableVkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableVkLogin"];
183
+ $this->social["enableVkShare"] = isset($options[self::TAB_SOCIAL]["enableVkShare"]) ? $options[self::TAB_SOCIAL]["enableVkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableVkShare"];
184
+ $this->social["vkAppID"] = isset($options[self::TAB_SOCIAL]["vkAppID"]) ? $options[self::TAB_SOCIAL]["vkAppID"] : $defaultOptions[self::TAB_SOCIAL]["vkAppID"];
185
+ $this->social["vkAppSecret"] = isset($options[self::TAB_SOCIAL]["vkAppSecret"]) ? $options[self::TAB_SOCIAL]["vkAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["vkAppSecret"];
186
+ // ok
187
+ $this->social["enableOkLogin"] = isset($options[self::TAB_SOCIAL]["enableOkLogin"]) ? $options[self::TAB_SOCIAL]["enableOkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableOkLogin"];
188
+ $this->social["enableOkShare"] = isset($options[self::TAB_SOCIAL]["enableOkShare"]) ? $options[self::TAB_SOCIAL]["enableOkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableOkShare"];
189
+ $this->social["okAppID"] = isset($options[self::TAB_SOCIAL]["okAppID"]) ? $options[self::TAB_SOCIAL]["okAppID"] : $defaultOptions[self::TAB_SOCIAL]["okAppID"];
190
+ $this->social["okAppKey"] = isset($options[self::TAB_SOCIAL]["okAppKey"]) ? $options[self::TAB_SOCIAL]["okAppKey"] : $defaultOptions[self::TAB_SOCIAL]["okAppKey"];
191
+ $this->social["okAppSecret"] = isset($options[self::TAB_SOCIAL]["okAppSecret"]) ? $options[self::TAB_SOCIAL]["okAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["okAppSecret"];
192
+ /* rating */
193
+ $this->rating["enablePostRatingSchema"] = isset($options[self::TAB_RATING]["enablePostRatingSchema"]) ? $options[self::TAB_RATING]["enablePostRatingSchema"] : $defaultOptions[self::TAB_RATING]["enablePostRatingSchema"];
194
+ $this->rating["displayRatingOnPost"] = isset($options[self::TAB_RATING]["displayRatingOnPost"]) ? $options[self::TAB_RATING]["displayRatingOnPost"] : $defaultOptions[self::TAB_RATING]["displayRatingOnPost"];
195
+ $this->rating["ratingCssOnNoneSingular"] = isset($options[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? $options[self::TAB_RATING]["ratingCssOnNoneSingular"] : $defaultOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
196
+ $this->rating["ratingHoverColor"] = isset($options[self::TAB_RATING]["ratingHoverColor"]) ? $options[self::TAB_RATING]["ratingHoverColor"] : $defaultOptions[self::TAB_RATING]["ratingHoverColor"];
197
+ $this->rating["ratingInactiveColor"] = isset($options[self::TAB_RATING]["ratingInactiveColor"]) ? $options[self::TAB_RATING]["ratingInactiveColor"] : $defaultOptions[self::TAB_RATING]["ratingInactiveColor"];
198
+ $this->rating["ratingActiveColor"] = isset($options[self::TAB_RATING]["ratingActiveColor"]) ? $options[self::TAB_RATING]["ratingActiveColor"] : $defaultOptions[self::TAB_RATING]["ratingActiveColor"];
199
+ /* thread_display */
200
+ $this->thread_display["firstLoadWithAjax"] = isset($options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? $options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"];
201
+ $this->thread_display["commentListLoadType"] = isset($options[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? $options[self::TAB_THREAD_DISPLAY]["commentListLoadType"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
202
+ $this->thread_display["isLoadOnlyParentComments"] = isset($options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? $options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
203
+ $this->thread_display["showReactedFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"];
204
+ $this->thread_display["showHottestFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"];
205
+ $this->thread_display["showSortingButtons"] = isset($options[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? $options[self::TAB_THREAD_DISPLAY]["showSortingButtons"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
206
+ $this->thread_display["mostVotedByDefault"] = isset($options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? $options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
207
+ $this->thread_display["reverseChildren"] = isset($options[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? $options[self::TAB_THREAD_DISPLAY]["reverseChildren"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
208
+ $this->thread_display["highlightUnreadComments"] = isset($options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? $options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
209
+ $this->thread_display["scrollToComment"] = isset($options[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? $options[self::TAB_THREAD_DISPLAY]["scrollToComment"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["scrollToComment"];
210
+ $this->thread_display["orderCommentsBy"] = isset($options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) ? $options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["orderCommentsBy"];
211
+ /* thread_layouts */
212
+ $this->thread_layouts["showCommentLink"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentLink"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentLink"];
213
+ $this->thread_layouts["showCommentDate"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentDate"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
214
+ $this->thread_layouts["showVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
215
+ $this->thread_layouts["votingButtonsIcon"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
216
+ $this->thread_layouts["votingButtonsStyle"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
217
+ $this->thread_layouts["enableDislikeButton"] = isset($options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? $options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"];
218
+ $this->thread_layouts["isGuestCanVote"] = isset($options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? $options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
219
+ $this->thread_layouts["highlightVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"];
220
+ $this->thread_layouts["showAvatars"] = isset($options[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? $options[self::TAB_THREAD_LAYOUTS]["showAvatars"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showAvatars"];
221
+ $this->thread_layouts["defaultAvatarUrlForUser"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"];
222
+ $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"];
223
+ $this->thread_layouts["changeAvatarsEverywhere"] = isset($options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? $options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"];
224
+ /* thread_styles */
225
+ $this->thread_styles["theme"] = isset($options[self::TAB_THREAD_STYLES]["theme"]) ? $options[self::TAB_THREAD_STYLES]["theme"] : $defaultOptions[self::TAB_THREAD_STYLES]["theme"];
226
+ $this->thread_styles["primaryColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryColor"];
227
+ $this->thread_styles["newLoadedCommentBGColor"] = isset($options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? $options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
228
+ $this->thread_styles["primaryButtonColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
229
+ $this->thread_styles["primaryButtonBG"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
230
+ $this->thread_styles["bubbleColors"] = isset($options[self::TAB_THREAD_STYLES]["bubbleColors"]) ? $options[self::TAB_THREAD_STYLES]["bubbleColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["bubbleColors"];
231
+ $this->thread_styles["inlineFeedbackColors"] = isset($options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? $options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["inlineFeedbackColors"];
232
+ $this->thread_styles["defaultCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"];
233
+ $this->thread_styles["defaultCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentTextColor"];
234
+ $this->thread_styles["defaultCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"];
235
+ $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"];
236
+ $this->thread_styles["defaultCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"];
237
+ $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"];
238
+ $this->thread_styles["darkCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentAreaBG"];
239
+ $this->thread_styles["darkCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentTextColor"];
240
+ $this->thread_styles["darkCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"];
241
+ $this->thread_styles["darkCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"];
242
+ $this->thread_styles["darkCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"];
243
+ $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"];
244
+ $this->thread_styles["commentTextSize"] = isset($options[self::TAB_THREAD_STYLES]["commentTextSize"]) ? $options[self::TAB_THREAD_STYLES]["commentTextSize"] : $defaultOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
245
+ $this->thread_styles["enableFontAwesome"] = isset($options[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? $options[self::TAB_THREAD_STYLES]["enableFontAwesome"] : $defaultOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
246
+ $this->thread_styles["customCss"] = isset($options[self::TAB_THREAD_STYLES]["customCss"]) ? $options[self::TAB_THREAD_STYLES]["customCss"] : $defaultOptions[self::TAB_THREAD_STYLES]["customCss"];
247
+ /* subscription */
248
+ $this->subscription["enableUserMentioning"] = isset($options[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? $options[self::TAB_SUBSCRIPTION]["enableUserMentioning"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableUserMentioning"];
249
+ $this->subscription["sendMailToMentionedUsers"] = isset($options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? $options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"];
250
+ $this->subscription["isNotifyOnCommentApprove"] = isset($options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? $options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
251
+ $this->subscription["enableMemberConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
252
+ $this->subscription["enableGuestsConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
253
+ $this->subscription["subscriptionType"] = isset($options[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? $options[self::TAB_SUBSCRIPTION]["subscriptionType"] : $defaultOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
254
+ $this->subscription["showReplyCheckbox"] = isset($options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? $options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] : $defaultOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
255
+ $this->subscription["isReplyDefaultChecked"] = isset($options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? $options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
256
+ $this->subscription["usePostmaticForCommentNotification"] = isset($options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? $options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] : $defaultOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
257
+ $this->subscription["isFollowActive"] = isset($options[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? $options[self::TAB_SUBSCRIPTION]["isFollowActive"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
258
+ $this->subscription["disableFollowConfirmForUsers"] = isset($options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? $options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
259
+ /* labels */
260
+ $this->labels["blogRoleLabels"] = isset($options[self::TAB_LABELS]["blogRoleLabels"]) ? $options[self::TAB_LABELS]["blogRoleLabels"] : $defaultOptions[self::TAB_LABELS]["blogRoleLabels"];
261
+ $this->labels["blogRoles"] = isset($options[self::TAB_LABELS]["blogRoles"]) ? $options[self::TAB_LABELS]["blogRoles"] : $defaultOptions[self::TAB_LABELS]["blogRoles"];
262
+ /* moderation */
263
+ $this->moderation["commentEditableTime"] = isset($options[self::TAB_MODERATION]["commentEditableTime"]) ? $options[self::TAB_MODERATION]["commentEditableTime"] : $defaultOptions[self::TAB_MODERATION]["commentEditableTime"];
264
+ $this->moderation["enableEditingWhenHaveReplies"] = isset($options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? $options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"] : $defaultOptions[self::TAB_MODERATION]["enableEditingWhenHaveReplies"];
265
+ $this->moderation["displayEditingInfo"] = isset($options[self::TAB_MODERATION]["displayEditingInfo"]) ? $options[self::TAB_MODERATION]["displayEditingInfo"] : $defaultOptions[self::TAB_MODERATION]["displayEditingInfo"];
266
+ $this->moderation["enableStickButton"] = isset($options[self::TAB_MODERATION]["enableStickButton"]) ? $options[self::TAB_MODERATION]["enableStickButton"] : $defaultOptions[self::TAB_MODERATION]["enableStickButton"];
267
+ $this->moderation["enableCloseButton"] = isset($options[self::TAB_MODERATION]["enableCloseButton"]) ? $options[self::TAB_MODERATION]["enableCloseButton"] : $defaultOptions[self::TAB_MODERATION]["enableCloseButton"];
268
+ $this->moderation["restrictCommentingPerUser"] = isset($options[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? $options[self::TAB_MODERATION]["restrictCommentingPerUser"] : $defaultOptions[self::TAB_MODERATION]["restrictCommentingPerUser"];
269
+ $this->moderation["commentRestrictionType"] = isset($options[self::TAB_MODERATION]["commentRestrictionType"]) ? $options[self::TAB_MODERATION]["commentRestrictionType"] : $defaultOptions[self::TAB_MODERATION]["commentRestrictionType"];
270
+ $this->moderation["userCommentsLimit"] = isset($options[self::TAB_MODERATION]["userCommentsLimit"]) ? $options[self::TAB_MODERATION]["userCommentsLimit"] : $defaultOptions[self::TAB_MODERATION]["userCommentsLimit"];
271
+ /* content */
272
+ $this->content["commentTextMinLength"] = isset($options[self::TAB_CONTENT]["commentTextMinLength"]) ? $options[self::TAB_CONTENT]["commentTextMinLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMinLength"];
273
+ $this->content["replyTextMinLength"] = isset($options[self::TAB_CONTENT]["replyTextMinLength"]) ? $options[self::TAB_CONTENT]["replyTextMinLength"] : $defaultOptions[self::TAB_CONTENT]["replyTextMinLength"];
274
+ $this->content["commentTextMaxLength"] = isset($options[self::TAB_CONTENT]["commentTextMaxLength"]) ? $options[self::TAB_CONTENT]["commentTextMaxLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMaxLength"];
275
+ $this->content["replyTextMaxLength"] = isset($options[self::TAB_CONTENT]["replyTextMaxLength"]) ? $options[self::TAB_CONTENT]["replyTextMaxLength"] : $defaultOptions[self::TAB_CONTENT]["replyTextMaxLength"];
276
+ $this->content["enableImageConversion"] = isset($options[self::TAB_CONTENT]["enableImageConversion"]) ? $options[self::TAB_CONTENT]["enableImageConversion"] : $defaultOptions[self::TAB_CONTENT]["enableImageConversion"];
277
+ $this->content["enableShortcodes"] = isset($options[self::TAB_CONTENT]["enableShortcodes"]) ? $options[self::TAB_CONTENT]["enableShortcodes"] : $defaultOptions[self::TAB_CONTENT]["enableShortcodes"];
278
+ $this->content["commentReadMoreLimit"] = isset($options[self::TAB_CONTENT]["commentReadMoreLimit"]) ? $options[self::TAB_CONTENT]["commentReadMoreLimit"] : $defaultOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
279
+ $this->content["wmuIsEnabled"] = isset($options[self::TAB_CONTENT]["wmuIsEnabled"]) ? $options[self::TAB_CONTENT]["wmuIsEnabled"] : $defaultOptions[self::TAB_CONTENT]["wmuIsEnabled"];
280
+ $this->content["wmuIsGuestAllowed"] = isset($options[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? $options[self::TAB_CONTENT]["wmuIsGuestAllowed"] : $defaultOptions[self::TAB_CONTENT]["wmuIsGuestAllowed"];
281
+ $this->content["wmuIsLightbox"] = isset($options[self::TAB_CONTENT]["wmuIsLightbox"]) ? $options[self::TAB_CONTENT]["wmuIsLightbox"] : $defaultOptions[self::TAB_CONTENT]["wmuIsLightbox"];
282
+ $this->content["wmuMimeTypes"] = isset($options[self::TAB_CONTENT]["wmuMimeTypes"]) ? $options[self::TAB_CONTENT]["wmuMimeTypes"] : $defaultOptions[self::TAB_CONTENT]["wmuMimeTypes"];
283
+ $this->content["wmuMaxFileSize"] = isset($options[self::TAB_CONTENT]["wmuMaxFileSize"]) ? $options[self::TAB_CONTENT]["wmuMaxFileSize"] : $defaultOptions[self::TAB_CONTENT]["wmuMaxFileSize"];
284
+ $this->content["wmuIsShowFilesDashboard"] = isset($options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? $options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"] : $defaultOptions[self::TAB_CONTENT]["wmuIsShowFilesDashboard"];
285
+ $this->content["wmuSingleImageWidth"] = isset($options[self::TAB_CONTENT]["wmuSingleImageWidth"]) ? $options[self::TAB_CONTENT]["wmuSingleImageWidth"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageWidth"];
286
+ $this->content["wmuSingleImageHeight"] = isset($options[self::TAB_CONTENT]["wmuSingleImageHeight"]) ? $options[self::TAB_CONTENT]["wmuSingleImageHeight"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageHeight"];
287
+ $this->content["wmuImageSizes"] = isset($options[self::TAB_CONTENT]["wmuImageSizes"]) ? array_filter($options[self::TAB_CONTENT]["wmuImageSizes"]) : $defaultOptions[self::TAB_CONTENT]["wmuImageSizes"];
288
+ /* live */
289
+ $this->live["enableBubble"] = isset($options[self::TAB_LIVE]["enableBubble"]) ? $options[self::TAB_LIVE]["enableBubble"] : $defaultOptions[self::TAB_LIVE]["enableBubble"];
290
+ $this->live["bubbleLiveUpdate"] = isset($options[self::TAB_LIVE]["bubbleLiveUpdate"]) ? $options[self::TAB_LIVE]["bubbleLiveUpdate"] : $defaultOptions[self::TAB_LIVE]["bubbleLiveUpdate"];
291
+ $this->live["bubbleLocation"] = isset($options[self::TAB_LIVE]["bubbleLocation"]) ? $options[self::TAB_LIVE]["bubbleLocation"] : $defaultOptions[self::TAB_LIVE]["bubbleLocation"];
292
+ $this->live["bubbleShowNewCommentMessage"] = isset($options[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? $options[self::TAB_LIVE]["bubbleShowNewCommentMessage"] : $defaultOptions[self::TAB_LIVE]["bubbleShowNewCommentMessage"];
293
+ $this->live["bubbleHintTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintTimeout"];
294
+ $this->live["bubbleHintHideTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintHideTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintHideTimeout"];
295
+ $this->live["commentListUpdateType"] = isset($options[self::TAB_LIVE]["commentListUpdateType"]) ? $options[self::TAB_LIVE]["commentListUpdateType"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateType"];
296
+ $this->live["liveUpdateGuests"] = isset($options[self::TAB_LIVE]["liveUpdateGuests"]) ? $options[self::TAB_LIVE]["liveUpdateGuests"] : $defaultOptions[self::TAB_LIVE]["liveUpdateGuests"];
297
+ $this->live["commentListUpdateTimer"] = isset($options[self::TAB_LIVE]["commentListUpdateTimer"]) ? $options[self::TAB_LIVE]["commentListUpdateTimer"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateTimer"];
298
+ /* inline */
299
+ $this->inline["showInlineFilterButton"] = isset($options[self::TAB_INLINE]["showInlineFilterButton"]) ? $options[self::TAB_INLINE]["showInlineFilterButton"] : $defaultOptions[self::TAB_INLINE]["showInlineFilterButton"];
300
+ $this->inline["inlineFeedbackAttractionType"] = isset($options[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? $options[self::TAB_INLINE]["inlineFeedbackAttractionType"] : $defaultOptions[self::TAB_INLINE]["inlineFeedbackAttractionType"];
301
+ /* general */
302
+ $this->general["isEnableOnHome"] = isset($options[self::TAB_GENERAL]["isEnableOnHome"]) ? $options[self::TAB_GENERAL]["isEnableOnHome"] : $defaultOptions[self::TAB_GENERAL]["isEnableOnHome"];
303
+ $this->general["isNativeAjaxEnabled"] = isset($options[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? $options[self::TAB_GENERAL]["isNativeAjaxEnabled"] : $defaultOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
304
+ $this->general["loadComboVersion"] = isset($options[self::TAB_GENERAL]["loadComboVersion"]) ? $options[self::TAB_GENERAL]["loadComboVersion"] : $defaultOptions[self::TAB_GENERAL]["loadComboVersion"];
305
+ $this->general["loadMinVersion"] = isset($options[self::TAB_GENERAL]["loadMinVersion"]) ? $options[self::TAB_GENERAL]["loadMinVersion"] : $defaultOptions[self::TAB_GENERAL]["loadMinVersion"];
306
+ $this->general["commentLinkFilter"] = isset($options[self::TAB_GENERAL]["commentLinkFilter"]) ? $options[self::TAB_GENERAL]["commentLinkFilter"] : $defaultOptions[self::TAB_GENERAL]["commentLinkFilter"];
307
+ $this->general["redirectPage"] = isset($options[self::TAB_GENERAL]["redirectPage"]) ? $options[self::TAB_GENERAL]["redirectPage"] : $defaultOptions[self::TAB_GENERAL]["redirectPage"];
308
+ $this->general["simpleCommentDate"] = isset($options[self::TAB_GENERAL]["simpleCommentDate"]) ? $options[self::TAB_GENERAL]["simpleCommentDate"] : $defaultOptions[self::TAB_GENERAL]["simpleCommentDate"];
309
+ $this->general["dateDiffFormat"] = isset($options[self::TAB_GENERAL]["dateDiffFormat"]) ? $options[self::TAB_GENERAL]["dateDiffFormat"] : $defaultOptions[self::TAB_GENERAL]["dateDiffFormat"];
310
+ $this->general["isUsePoMo"] = isset($options[self::TAB_GENERAL]["isUsePoMo"]) ? $options[self::TAB_GENERAL]["isUsePoMo"] : $defaultOptions[self::TAB_GENERAL]["isUsePoMo"];
311
+ $this->general["showPluginPoweredByLink"] = isset($options[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? $options[self::TAB_GENERAL]["showPluginPoweredByLink"] : $defaultOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
312
+ $this->general["isCacheEnabled"] = isset($options[self::TAB_GENERAL]["isCacheEnabled"]) ? $options[self::TAB_GENERAL]["isCacheEnabled"] : $defaultOptions[self::TAB_GENERAL]["isCacheEnabled"];
313
+ $this->general["cacheTimeout"] = isset($options[self::TAB_GENERAL]["cacheTimeout"]) ? $options[self::TAB_GENERAL]["cacheTimeout"] : $defaultOptions[self::TAB_GENERAL]["cacheTimeout"];
314
+ do_action("wpdiscuz_init_options", $this);
315
+ }
316
 
317
+ /**
318
+ * initialize default phrases
319
+ */
320
+ public function initPhrases() {
321
+ $this->phrases = [
322
+ "wc_be_the_first_text" => esc_html__("Be the First to Comment!", "wpdiscuz"),
323
+ "wc_comment_start_text" => esc_html__("Start the discussion", "wpdiscuz"),
324
+ "wc_comment_join_text" => esc_html__("Join the discussion", "wpdiscuz"),
325
+ "wc_most_reacted_comment" => esc_html__("Most reacted comment", "wpdiscuz"),
326
+ "wc_hottest_comment_thread" => esc_html__("Hottest comment thread", "wpdiscuz"),
327
+ "wc_inline_comments" => esc_html__("Inline Comments", "wpdiscuz"),
328
+ "wc_email_text" => esc_html__("Email", "wpdiscuz"),
329
+ "wc_subscribe_anchor" => esc_html__("Subscribe", "wpdiscuz"),
330
+ "wc_notify_of" => esc_html__("Notify of", "wpdiscuz"),
331
+ "wc_notify_on_new_comment" => esc_html__("new follow-up comments", "wpdiscuz"),
332
+ "wc_notify_on_all_new_reply" => esc_html__("new replies to my comments", "wpdiscuz"),
333
+ "wc_notify_on_new_reply" => esc_html__("Notify of new replies to this comment", "wpdiscuz"),
334
+ "wc_sort_by" => esc_html__("Sort by", "wpdiscuz"),
335
+ "wc_newest" => esc_html__("Newest", "wpdiscuz"),
336
+ "wc_oldest" => esc_html__("Oldest", "wpdiscuz"),
337
+ "wc_most_voted" => esc_html__("Most Voted", "wpdiscuz"),
338
+ "wc_load_more_submit_text" => esc_html__("Load More Comments", "wpdiscuz"),
339
+ "wc_load_rest_comments_submit_text" => esc_html__("Load Rest of Comments", "wpdiscuz"),
340
+ "wc_reply_text" => esc_html__("Reply", "wpdiscuz"),
341
+ "wc_share_text" => esc_html__("Share", "wpdiscuz"),
342
+ "wc_edit_text" => esc_html__("Edit", "wpdiscuz"),
343
+ "wc_share_facebook" => esc_html__("Share On Facebook", "wpdiscuz"),
344
+ "wc_share_twitter" => esc_html__("Share On Twitter", "wpdiscuz"),
345
+ "wc_share_whatsapp" => esc_html__("Share On WhatsApp", "wpdiscuz"),
346
+ "wc_share_vk" => esc_html__("Share On VKontakte", "wpdiscuz"),
347
+ "wc_share_ok" => esc_html__("Share On Odnoklassniki", "wpdiscuz"),
348
+ "wc_hide_replies_text" => esc_html__("Hide Replies", "wpdiscuz"),
349
+ "wc_show_replies_text" => esc_html__("View Replies", "wpdiscuz"),
350
+ "wc_email_subject" => esc_html__("New Comment", "wpdiscuz"),
351
+ "wc_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new comment has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
352
+ "wc_all_comment_new_reply_subject" => esc_html__("New Reply", "wpdiscuz"),
353
+ "wc_all_comment_new_reply_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
354
+ "wc_new_reply_email_subject" => esc_html__("New Reply", "wpdiscuz"),
355
+ "wc_new_reply_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
356
+ "wc_subscribed_on_comment" => esc_html__("You're subscribed for new replies on this comment", "wpdiscuz"),
357
+ "wc_subscribed_on_all_comment" => esc_html__("You're subscribed for new replies on all your comments", "wpdiscuz"),
358
+ "wc_subscribed_on_post" => esc_html__("You're subscribed for new follow-up comments on this post", "wpdiscuz"),
359
+ "wc_unsubscribe" => esc_html__("Unsubscribe", "wpdiscuz"),
360
+ "wc_ignore_subscription" => esc_html__("Cancel subscription", "wpdiscuz"),
361
+ "wc_unsubscribe_message" => esc_html__("You've successfully unsubscribed.", "wpdiscuz"),
362
+ "wc_subscribe_message" => esc_html__("You've successfully subscribed.", "wpdiscuz"),
363
+ "wc_confirm_email" => esc_html__("Confirm your subscription", "wpdiscuz"),
364
+ "wc_comfirm_success_message" => esc_html__("You've successfully confirmed your subscription.", "wpdiscuz"),
365
+ "wc_confirm_email_subject" => esc_html__("Subscription Confirmation", "wpdiscuz"),
366
+ "wc_confirm_email_message" => __("Hi, <br/> You just subscribed for new comments on our website. This means you will receive an email when new comments are posted according to subscription option you've chosen. <br/> To activate, click confirm below. If you believe this is an error, ignore this message and we'll never bother you again. <br/><br/><a href='[POST_URL]'>[POST_TITLE]</a><br/><br/><a href='[CONFIRM_URL]'>Confirm Your Subscription</a><br/><br/><a href='[CANCEL_URL]'>Cancel Subscription</a>", "wpdiscuz"),
367
+ "wc_error_empty_text" => esc_html__("please fill out this field to comment", "wpdiscuz"),
368
+ "wc_error_email_text" => esc_html__("email address is invalid", "wpdiscuz"),
369
+ "wc_error_url_text" => esc_html__("url is invalid", "wpdiscuz"),
370
+ "wc_year_text" => esc_html__("year", "wpdiscuz"),
371
+ "wc_year_text_plural" => esc_html__("years", "wpdiscuz"), // PLURAL
372
+ "wc_month_text" => esc_html__("month", "wpdiscuz"),
373
+ "wc_month_text_plural" => esc_html__("months", "wpdiscuz"), // PLURAL
374
+ "wc_day_text" => esc_html__("day", "wpdiscuz"),
375
+ "wc_day_text_plural" => esc_html__("days", "wpdiscuz"), // PLURAL
376
+ "wc_hour_text" => esc_html__("hour", "wpdiscuz"),
377
+ "wc_hour_text_plural" => esc_html__("hours", "wpdiscuz"), // PLURAL
378
+ "wc_minute_text" => esc_html__("minute", "wpdiscuz"),
379
+ "wc_minute_text_plural" => esc_html__("minutes", "wpdiscuz"), // PLURAL
380
+ "wc_second_text" => esc_html__("second", "wpdiscuz"),
381
+ "wc_second_text_plural" => esc_html__("seconds", "wpdiscuz"), // PLURAL
382
+ "wc_right_now_text" => esc_html__("right now", "wpdiscuz"),
383
+ "wc_ago_text" => esc_html__("ago", "wpdiscuz"),
384
+ "wc_you_must_be_text" => esc_html__("You must be", "wpdiscuz"),
385
+ "wc_logged_in_as" => esc_html__("You are logged in as", "wpdiscuz"),
386
+ "wc_log_in" => esc_html__("Login", "wpdiscuz"),
387
+ "wc_login_please" => esc_html__("Please %s to comment", "wpdiscuz"),
388
+ "wc_log_out" => esc_html__("Log out", "wpdiscuz"),
389
+ "wc_logged_in_text" => esc_html__("logged in", "wpdiscuz"),
390
+ "wc_to_post_comment_text" => esc_html__("to post a comment.", "wpdiscuz"),
391
+ "wc_vote_up" => esc_html__("Vote Up", "wpdiscuz"),
392
+ "wc_vote_down" => esc_html__("Vote Down", "wpdiscuz"),
393
+ "wc_vote_counted" => esc_html__("Vote Counted", "wpdiscuz"),
394
+ "wc_vote_only_one_time" => esc_html__("You've already voted for this comment", "wpdiscuz"),
395
+ "wc_voting_error" => esc_html__("Voting Error", "wpdiscuz"),
396
+ "wc_login_to_vote" => esc_html__("You Must Be Logged In To Vote", "wpdiscuz"),
397
+ "wc_self_vote" => esc_html__("You cannot vote for your comment", "wpdiscuz"),
398
+ "wc_deny_voting_from_same_ip" => esc_html__("You are not allowed to vote for this comment", "wpdiscuz"),
399
+ "wc_invalid_captcha" => esc_html__("Invalid Captcha Code", "wpdiscuz"),
400
+ "wc_invalid_field" => esc_html__("Some of field value is invalid", "wpdiscuz"),
401
+ "wc_awaiting_for_approval" => esc_html__("Awaiting for approval", "wpdiscuz"),
402
+ "wc_comment_not_updated" => esc_html__("Sorry, the comment was not updated", "wpdiscuz"),
403
+ "wc_comment_edit_not_possible" => esc_html__("Sorry, this comment is no longer possible to edit", "wpdiscuz"),
404
+ "wc_comment_not_edited" => esc_html__("You've not made any changes", "wpdiscuz"),
405
+ "wc_comment_edit_save_button" => esc_html__("Save", "wpdiscuz"),
406
+ "wc_comment_edit_cancel_button" => esc_html__("Cancel", "wpdiscuz"),
407
+ "wc_msg_input_min_length" => esc_html__("Input is too short", "wpdiscuz"),
408
+ "wc_msg_input_max_length" => esc_html__("Input is too long", "wpdiscuz"),
409
+ "wc_read_more" => esc_html__("Read more &raquo;", "wpdiscuz"),
410
+ "wc_anonymous" => esc_html__("Anonymous", "wpdiscuz"),
411
+ "wc_msg_required_fields" => esc_html__("Please fill out required fields", "wpdiscuz"),
412
+ "wc_connect_with" => esc_html__("Connect with", "wpdiscuz"),
413
+ "wc_subscribed_to" => esc_html__("You're subscribed to", "wpdiscuz"),
414
+ "wc_postmatic_subscription_label" => esc_html__("Participate in this discussion via email", "wpdiscuz"),
415
+ "wc_form_subscription_submit" => esc_html__("&rsaquo;", "wpdiscuz"),
416
+ "wc_comment_approved_email_subject" => esc_html__("Your comment is approved!", "wpdiscuz"),
417
+ "wc_comment_approved_email_message" => __('Hi [COMMENT_AUTHOR],<br/><br/>your comment was approved.<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]', "wpdiscuz"),
418
+ "wc_roles_cannot_comment_message" => esc_html__("Comments are closed.", "wpdiscuz"),
419
+ "wc_stick_comment_btn_title" => esc_html__("Stick this comment", "wpdiscuz"),
420
+ "wc_stick_comment" => esc_html__("Stick", "wpdiscuz"),
421
+ "wc_unstick_comment" => esc_html__("Unstick", "wpdiscuz"),
422
+ "wc_sticky_comment_icon_title" => esc_html__("Sticky Comment Thread", "wpdiscuz"),
423
+ "wc_close_comment_btn_title" => esc_html__("Close this thread", "wpdiscuz"),
424
+ "wc_close_comment" => esc_html__("Close", "wpdiscuz"),
425
+ "wc_open_comment" => esc_html__("Open", "wpdiscuz"),
426
+ "wc_closed_comment_icon_title" => esc_html__("Closed Comment Thread", "wpdiscuz"),
427
+ "wc_social_login_agreement_label" => esc_html__("I allow to create an account", "wpdiscuz"),
428
+ "wc_social_login_agreement_desc" => esc_html__("When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.", "wpdiscuz"),
429
+ "wc_agreement_button_disagree" => esc_html__("Disagree", "wpdiscuz"),
430
+ "wc_agreement_button_agree" => esc_html__("Agree", "wpdiscuz"),
431
+ "wc_content_and_settings" => esc_html__("My content and settings", "wpdiscuz"),
432
+ "wc_user_settings_activity" => esc_html__("Activity", "wpdiscuz"),
433
+ "wc_user_settings_subscriptions" => esc_html__("Subscriptions", "wpdiscuz"),
434
+ "wc_user_settings_follows" => esc_html__("Follows", "wpdiscuz"),
435
+ "wc_user_settings_response_to" => esc_html__("In response to:", "wpdiscuz"),
436
+ "wc_user_settings_email_me_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
437
+ "wc_user_settings_email_me_delete_links_desc" => esc_html__("Click the button above to get an email with bulk delete and unsubscribe links.", "wpdiscuz"),
438
+ "wc_user_settings_no_data" => esc_html__("No data found!", "wpdiscuz"),
439
+ "wc_user_settings_request_deleting_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
440
+ "wc_user_settings_cancel_subscriptions" => esc_html__("Cancel all comment subscriptions", "wpdiscuz"),
441
+ "wc_user_settings_clear_cookie" => esc_html__("Clear cookies with my personal data", "wpdiscuz"),
442
+ "wc_user_settings_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
443
+ "wc_user_settings_delete_all_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
444
+ "wc_user_settings_delete_all_comments_message" => __('Please use this link to delete all your comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_COMMENTS_URL]" target="_blank">Delete all my comments</a><br/><br/>', "wpdiscuz"),
445
+ "wc_user_settings_delete_all_subscriptions" => esc_html__("Delete all my subscriptions", "wpdiscuz"),
446
+ "wc_user_settings_delete_all_subscriptions_message" => __('Please use this link to cancel all subscriptions for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_SUBSCRIPTIONS_URL]" target="_blank">Delete all my subscriptions</a><br/><br/>', "wpdiscuz"),
447
+ "wc_user_settings_delete_all_follows" => esc_html__("Delete all my follows", "wpdiscuz"),
448
+ "wc_user_settings_delete_all_follows_message" => __('Please use this link to cancel all follows for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_FOLLOWS_URL]" target="_blank">Delete all my follows</a><br/><br/>', "wpdiscuz"),
449
+ "wc_user_settings_subscribed_to_replies" => esc_html__("subscribed to this comment", "wpdiscuz"),
450
+ "wc_user_settings_subscribed_to_replies_own" => esc_html__("subscribed to my comments", "wpdiscuz"),
451
+ "wc_user_settings_subscribed_to_all_comments" => esc_html__("subscribed to all follow-up comments of this post", "wpdiscuz"),
452
+ "wc_user_settings_check_email" => esc_html__("Please check your email."),
453
+ "wc_user_settings_email_error" => esc_html__("Error : Can't send email.", "wpdiscuz"),
454
+ "wc_delete_this_comment" => esc_html__("Delete this comment", "wpdiscuz"),
455
+ "wc_cancel_this_subscription" => esc_html__("Cancel this subscription", "wpdiscuz"),
456
+ "wc_cancel_this_follow" => esc_html__("Cancel this follow", "wpdiscuz"),
457
+ "wc_confirm_comment_delete" => esc_html__("Are you sure you want to delete this comment?", "wpdiscuz"),
458
+ "wc_confirm_cancel_subscription" => esc_html__("Are you sure you want to cancel this subscription?", "wpdiscuz"),
459
+ "wc_confirm_cancel_follow" => esc_html__("Are you sure you want to cancel this follow?", "wpdiscuz"),
460
+ "wc_follow_user" => esc_html__("Follow this user", "wpdiscuz"),
461
+ "wc_unfollow_user" => esc_html__("Unfollow this user", "wpdiscuz"),
462
+ "wc_follow_success" => esc_html__("You started following this comment author", "wpdiscuz"),
463
+ "wc_follow_canceled" => esc_html__("You stopped following this comment author.", "wpdiscuz"),
464
+ "wc_follow_email_confirm" => esc_html__("Please check your email and confirm the user following request.", "wpdiscuz"),
465
+ "wc_follow_email_confirm_fail" => esc_html__("Sorry, we couldn't send confirmation email.", "wpdiscuz"),
466
+ "wc_follow_login_to_follow" => esc_html__("Please login to follow users.", "wpdiscuz"),
467
+ "wc_follow_impossible" => esc_html__("We are sorry, but you can't follow this user.", "wpdiscuz"),
468
+ "wc_follow_not_added" => esc_html__("Following failed. Please try again later.", "wpdiscuz"),
469
+ "wc_follow_confirm" => esc_html__("Confirm user following request", "wpdiscuz"),
470
+ "wc_follow_cancel" => esc_html__("Cancel user following request", "wpdiscuz"),
471
+ "wc_follow_confirm_email_subject" => esc_html__("User Following Confirmation", "wpdiscuz"),
472
+ "wc_follow_confirm_email_message" => __('Hi, <br/> You just started following a new user. You\'ll get email notification once new comment is posted by this user. <br/> Please click on "user following confirmation" link to confirm your request. If you believe this is an error, ignore this message and we\'ll never bother you again. <br/><br/><a href="[POST_URL]">[POST_TITLE]</a><br/><br/><a href="[CONFIRM_URL]">' . __("Confirm Follow", "wpdiscuz") . '</a><br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . "</a>", "wpdiscuz"),
473
+ "wc_follow_email_subject" => esc_html__("New Comment", "wpdiscuz"),
474
+ "wc_follow_email_message" => __('Hi [FOLLOWER_NAME],<br/><br/> new comment has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> you are following<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . '</a>', "wpdiscuz"),
475
+ "wc_mentioned_email_subject" => esc_html__("You have been mentioned in comment", "wpdiscuz"),
476
+ "wc_mentioned_email_message" => __('Hi [MENTIONED_USER_NAME]!<br/>You have been mentioned in a comment posted on "[POST_TITLE]" post by [COMMENT_AUTHOR].<br/><br/>Comment URL: <a href="[COMMENT_URL]">[COMMENT_URL]</a>', "wpdiscuz"),
477
+ "wc_copied_to_clipboard" => esc_html__("Copied to clipboard!", "wpdiscuz"),
478
+ "wc_feedback_shortcode_tooltip" => esc_html__("Select a part of text and ask readers for feedback (inline commenting)", "wpdiscuz"),
479
+ "wc_feedback_popup_title" => esc_html__("Ask for Feedback", "wpdiscuz"),
480
+ "wc_please_leave_feebdack" => esc_html__("Please leave a feedback on this", "wpdiscuz"),
481
+ "wc_feedback_content_text" => esc_html__("", "wpdiscuz"),
482
+ "wc_feedback_comment_success" => esc_html__("Thank you for your feedback!", "wpdiscuz"),
483
+ "wc_commenting_is_closed" => esc_html__("Commenting is closed!", "wpdiscuz"),
484
+ "wc_closed_comment_thread" => esc_html__("This is closed comment thread", "wpdiscuz"),
485
+ "wc_bubble_invite_message" => esc_html__("Would love your thoughts, please comment.", "wpdiscuz"),
486
+ "wc_vote_phrase" => esc_html__("vote", "wpdiscuz"),
487
+ "wc_votes_phrase" => esc_html__("votes", "wpdiscuz"),
488
+ "wc_comment_link" => esc_html__("Comment Link", "wpdiscuz"),
489
+ "wc_not_allowed_to_comment_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
490
+ "wc_not_allowed_to_create_comment_thread_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
491
+ "wc_not_allowed_to_reply_more_than" => esc_html__("We are sorry, you are not allowed to reply more than %d time(s)!", "wpdiscuz"),
492
+ "wc_inline_form_comment" => esc_html__("Your comment here...", "wpdiscuz"),
493
+ "wc_inline_form_notify" => esc_html__("Notify me via email when a new reply is posted", "wpdiscuz"),
494
+ "wc_inline_form_name" => esc_html__("Your Name*", "wpdiscuz"),
495
+ "wc_inline_form_email" => esc_html__("Your Email", "wpdiscuz"),
496
+ "wc_inline_form_comment_button" => esc_html__("COMMENT", "wpdiscuz"),
497
+ "wc_inline_comments_view_all" => esc_html__("View all comments", "wpdiscuz"),
498
+ "wc_inline_feedbacks" => esc_html__("Inline Feedbacks", "wpdiscuz"),
499
+ "wc_unable_sent_email" => esc_html__("Unable to send an email", "wpdiscuz"),
500
+ "wc_subscription_fault" => esc_html__("Subscription Fault", "wpdiscuz"),
501
+ "wc_comments_are_deleted" => esc_html__("Your comments have been deleted from database", "wpdiscuz"),
502
+ "wc_cancel_subs_success" => esc_html__("You cancel all your subscriptions successfully", "wpdiscuz"),
503
+ "wc_cancel_follows_success" => esc_html__("You cancel all your follows successfully", "wpdiscuz"),
504
+ "wc_follow_confirm_success" => esc_html__("Follow has been confirmed successfully", "wpdiscuz"),
505
+ "wc_follow_cancel_success" => esc_html__("Follow has been canceled successfully", "wpdiscuz"),
506
+ "wc_login_to_comment" => esc_html__("Please login to comment", "wpdiscuz"),
507
+ "wc_view_comments" => esc_html__("View Comments", "wpdiscuz"),
508
+ "wc_spoiler" => esc_html__("Spoiler", "wpdiscuz"),
509
+ "wc_last_edited" => esc_html__('Last edited %1$s by %2$s', "wpdiscuz"),
510
+ "wc_reply_to" => esc_html__("Reply to", "wpdiscuz"),
511
+ "wc_manage_comment" => esc_html__("Manage Comment", "wpdiscuz"),
512
+ "wc_spoiler_title" => esc_html__("Spoiler Title", "wpdiscuz"),
513
+ "wc_cannot_rate_again" => esc_html__("You cannot rate again", "wpdiscuz"),
514
+ "wc_not_allowed_to_rate" => esc_html__("You're not allowed to rate here", "wpdiscuz"),
515
+ // Media Upload
516
+ "wmuPhraseConfirmDelete" => esc_html__("Are you sure you want to delete this attachment?", "wpdiscuz"),
517
+ "wmuPhraseNotAllowedFile" => esc_html__("Not allowed file type", "wpdiscuz"),
518
+ "wmuPhraseMaxFileCount" => esc_html__("Maximum number of uploaded files is", "wpdiscuz"),
519
+ "wmuPhraseMaxFileSize" => esc_html__("Maximum upload file size is", "wpdiscuz"),
520
+ "wmuPhrasePostMaxSize" => esc_html__("Maximum post size is", "wpdiscuz"),
521
+ "wmuAttachImage" => esc_html__("Attach an image to this comment", "wpdiscuz"),
522
+ "wmuChangeImage" => esc_html__("Change the attached image", "wpdiscuz"),
523
+ ];
524
+ }
525
 
526
+ /**
527
  * Method to get phrase and apply filter on it for more dynamic control over it
528
  *
529
+ * @param $key string key of phrase
530
+ * @param array $args custom arguments for filtering
531
+ * @return string|null phrase as string (if exists), default phrase (if exists in $args) or null
532
+ */
533
+ public function getPhrase($key, $args = []) {
534
+ $args = wp_parse_args($args, [
535
+ "default" => null,
536
+ "apply_filter" => true,
537
  ]);
538
+ if (isset($this->phrases[$key])) {
539
+ return $args["apply_filter"] ? apply_filters("wpdiscuz_phrase", $this->phrases[$key], $key, $args) : $this->phrases[$key];
540
  }
541
+ return $args["default"];
542
  }
543
 
544
+ public function toArray() {
545
+ $options = [
546
+ self::TAB_FORM => [
547
+ "commentFormView" => $this->form["commentFormView"],
548
+ "enableDropAnimation" => $this->form["enableDropAnimation"],
549
+ "richEditor" => $this->form["richEditor"],
550
+ "boldButton" => $this->form["boldButton"],
551
+ "italicButton" => $this->form["italicButton"],
552
+ "underlineButton" => $this->form["underlineButton"],
553
+ "strikeButton" => $this->form["strikeButton"],
554
+ "olButton" => $this->form["olButton"],
555
+ "ulButton" => $this->form["ulButton"],
556
+ "blockquoteButton" => $this->form["blockquoteButton"],
557
+ "codeblockButton" => $this->form["codeblockButton"],
558
+ "linkButton" => $this->form["linkButton"],
559
+ "sourcecodeButton" => $this->form["sourcecodeButton"],
560
+ "spoilerButton" => $this->form["spoilerButton"],
561
+ "enableQuickTags" => $this->form["enableQuickTags"],
562
+ "commenterNameMinLength" => $this->form["commenterNameMinLength"],
563
+ "commenterNameMaxLength" => $this->form["commenterNameMaxLength"],
564
+ "storeCommenterData" => $this->form["storeCommenterData"],
565
+ ],
566
+ self::TAB_RECAPTCHA => [
567
+ "siteKey" => $this->recaptcha["siteKey"],
568
+ "secretKey" => $this->recaptcha["secretKey"],
569
+ "theme" => $this->recaptcha["theme"],
570
+ "lang" => $this->recaptcha["lang"],
571
+ "requestMethod" => $this->recaptcha["requestMethod"],
572
+ "showForGuests" => $this->recaptcha["showForGuests"],
573
+ "showForUsers" => $this->recaptcha["showForUsers"],
574
+ "isShowOnSubscribeForm" => $this->recaptcha["isShowOnSubscribeForm"],
575
+ ],
576
+ self::TAB_LOGIN => [
577
+ "showLoggedInUsername" => $this->login["showLoggedInUsername"],
578
+ "showLoginLinkForGuests" => $this->login["showLoginLinkForGuests"],
579
+ "showActivityTab" => $this->login["showActivityTab"],
580
+ "showSubscriptionsTab" => $this->login["showSubscriptionsTab"],
581
+ "showFollowsTab" => $this->login["showFollowsTab"],
582
+ "enableProfileURLs" => $this->login["enableProfileURLs"],
583
+ "websiteAsProfileUrl" => $this->login["websiteAsProfileUrl"],
584
+ "isUserByEmail" => $this->login["isUserByEmail"],
585
+ "loginUrl" => $this->login["loginUrl"],
586
+ ],
587
+ self::TAB_SOCIAL => [
588
+ "socialLoginAgreementCheckbox" => $this->social["socialLoginAgreementCheckbox"],
589
+ "socialLoginInSecondaryForm" => $this->social["socialLoginInSecondaryForm"],
590
+ "displayIconOnAvatar" => $this->social["displayIconOnAvatar"],
591
+ "rememberLoggedinUser" => $this->social["rememberLoggedinUser"],
592
+ // fb
593
+ "enableFbLogin" => $this->social["enableFbLogin"],
594
+ "enableFbShare" => $this->social["enableFbShare"],
595
+ "fbAppID" => $this->social["fbAppID"],
596
+ "fbAppSecret" => $this->social["fbAppSecret"],
597
+ "fbUseOAuth2" => $this->social["fbUseOAuth2"],
598
+ // twitter
599
+ "enableTwitterLogin" => $this->social["enableTwitterLogin"],
600
+ "enableTwitterShare" => $this->social["enableTwitterShare"],
601
+ "twitterAppID" => $this->social["twitterAppID"],
602
+ "twitterAppSecret" => $this->social["twitterAppSecret"],
603
+ // google
604
+ "enableGoogleLogin" => $this->social["enableGoogleLogin"],
605
+ "googleClientID" => $this->social["googleClientID"],
606
+ "googleClientSecret" => $this->social["googleClientSecret"],
607
+ // disqus
608
+ "enableDisqusLogin" => $this->social["enableDisqusLogin"],
609
+ "disqusPublicKey" => $this->social["disqusPublicKey"],
610
+ "disqusSecretKey" => $this->social["disqusSecretKey"],
611
+ // wordpress
612
+ "enableWordpressLogin" => $this->social["enableWordpressLogin"],
613
+ "wordpressClientID" => $this->social["wordpressClientID"],
614
+ "wordpressClientSecret" => $this->social["wordpressClientSecret"],
615
+ // instagram
616
+ "enableInstagramLogin" => $this->social["enableInstagramLogin"],
617
+ "instagramAppID" => $this->social["instagramAppID"],
618
+ "instagramAppSecret" => $this->social["instagramAppSecret"],
619
+ // linkedin
620
+ "enableLinkedinLogin" => $this->social["enableLinkedinLogin"],
621
+ "linkedinClientID" => $this->social["linkedinClientID"],
622
+ "linkedinClientSecret" => $this->social["linkedinClientSecret"],
623
+ // whatsapp
624
+ "enableWhatsappShare" => $this->social["enableWhatsappShare"],
625
+ // yandex
626
+ "enableYandexLogin" => $this->social["enableYandexLogin"],
627
+ "yandexID" => $this->social["yandexID"],
628
+ "yandexPassword" => $this->social["yandexPassword"],
629
+ // mail.ru
630
+ "enableMailruLogin" => $this->social["enableMailruLogin"],
631
+ "mailruClientID" => $this->social["mailruClientID"],
632
+ "mailruClientSecret" => $this->social["mailruClientSecret"],
633
+ // weibo
634
+ "enableWeiboLogin" => $this->social["enableWeiboLogin"],
635
+ "weiboKey" => $this->social["weiboKey"],
636
+ "weiboSecret" => $this->social["weiboSecret"],
637
+ // wechat
638
+ "enableWechatLogin" => $this->social["enableWechatLogin"],
639
+ "wechatAppID" => $this->social["wechatAppID"],
640
+ "wechatSecret" => $this->social["wechatSecret"],
641
+ // qq
642
+ "enableQQLogin" => $this->social["enableQQLogin"],
643
+ "qqAppID" => $this->social["qqAppID"],
644
+ "qqSecret" => $this->social["qqSecret"],
645
+ // baidu
646
+ "enableBaiduLogin" => $this->social["enableBaiduLogin"],
647
+ "baiduAppID" => $this->social["baiduAppID"],
648
+ "baiduSecret" => $this->social["baiduSecret"],
649
+ // vk
650
+ "enableVkLogin" => $this->social["enableVkLogin"],
651
+ "enableVkShare" => $this->social["enableVkShare"],
652
+ "vkAppID" => $this->social["vkAppID"],
653
+ "vkAppSecret" => $this->social["vkAppSecret"],
654
+ // ok
655
+ "enableOkLogin" => $this->social["enableOkLogin"],
656
+ "enableOkShare" => $this->social["enableOkShare"],
657
+ "okAppID" => $this->social["okAppID"],
658
+ "okAppKey" => $this->social["okAppKey"],
659
+ "okAppSecret" => $this->social["okAppSecret"],
660
+ ],
661
+ self::TAB_RATING => [
662
+ "enablePostRatingSchema" => $this->rating["enablePostRatingSchema"],
663
+ "displayRatingOnPost" => $this->rating["displayRatingOnPost"],
664
+ "ratingCssOnNoneSingular" => $this->rating["ratingCssOnNoneSingular"],
665
+ "ratingHoverColor" => $this->rating["ratingHoverColor"],
666
+ "ratingInactiveColor" => $this->rating["ratingInactiveColor"],
667
+ "ratingActiveColor" => $this->rating["ratingActiveColor"],
668
+ ],
669
+ self::TAB_THREAD_DISPLAY => [
670
+ "firstLoadWithAjax" => $this->thread_display["firstLoadWithAjax"],
671
+ "commentListLoadType" => $this->thread_display["commentListLoadType"],
672
+ "isLoadOnlyParentComments" => $this->thread_display["isLoadOnlyParentComments"],
673
+ "showReactedFilterButton" => $this->thread_display["showReactedFilterButton"],
674
+ "showHottestFilterButton" => $this->thread_display["showHottestFilterButton"],
675
+ "showSortingButtons" => $this->thread_display["showSortingButtons"],
676
+ "mostVotedByDefault" => $this->thread_display["mostVotedByDefault"],
677
+ "reverseChildren" => $this->thread_display["reverseChildren"],
678
+ "highlightUnreadComments" => $this->thread_display["highlightUnreadComments"],
679
+ "scrollToComment" => $this->thread_display["scrollToComment"],
680
+ "orderCommentsBy" => $this->thread_display["orderCommentsBy"],
681
+ ],
682
+ self::TAB_THREAD_LAYOUTS => [
683
+ "showCommentLink" => $this->thread_layouts["showCommentLink"],
684
+ "showCommentDate" => $this->thread_layouts["showCommentDate"],
685
+ "showVotingButtons" => $this->thread_layouts["showVotingButtons"],
686
+ "votingButtonsIcon" => $this->thread_layouts["votingButtonsIcon"],
687
+ "votingButtonsStyle" => $this->thread_layouts["votingButtonsStyle"],
688
+ "enableDislikeButton" => $this->thread_layouts["enableDislikeButton"],
689
+ "isGuestCanVote" => $this->thread_layouts["isGuestCanVote"],
690
+ "highlightVotingButtons" => $this->thread_layouts["highlightVotingButtons"],
691
+ "showAvatars" => $this->thread_layouts["showAvatars"],
692
+ "defaultAvatarUrlForUser" => $this->thread_layouts["defaultAvatarUrlForUser"],
693
+ "defaultAvatarUrlForGuest" => $this->thread_layouts["defaultAvatarUrlForGuest"],
694
+ "changeAvatarsEverywhere" => $this->thread_layouts["changeAvatarsEverywhere"],
695
+ ],
696
+ self::TAB_THREAD_STYLES => [
697
+ "theme" => $this->thread_styles["theme"],
698
+ "primaryColor" => $this->thread_styles["primaryColor"],
699
+ "newLoadedCommentBGColor" => $this->thread_styles["newLoadedCommentBGColor"],
700
+ "primaryButtonColor" => $this->thread_styles["primaryButtonColor"],
701
+ "primaryButtonBG" => $this->thread_styles["primaryButtonBG"],
702
+ "bubbleColors" => $this->thread_styles["bubbleColors"],
703
+ "inlineFeedbackColors" => $this->thread_styles["inlineFeedbackColors"],
704
+ "defaultCommentAreaBG" => $this->thread_styles["defaultCommentAreaBG"],
705
+ "defaultCommentTextColor" => $this->thread_styles["defaultCommentTextColor"],
706
+ "defaultCommentFieldsBG" => $this->thread_styles["defaultCommentFieldsBG"],
707
+ "defaultCommentFieldsBorderColor" => $this->thread_styles["defaultCommentFieldsBorderColor"],
708
+ "defaultCommentFieldsTextColor" => $this->thread_styles["defaultCommentFieldsTextColor"],
709
+ "defaultCommentFieldsPlaceholderColor" => $this->thread_styles["defaultCommentFieldsPlaceholderColor"],
710
+ "darkCommentAreaBG" => $this->thread_styles["darkCommentAreaBG"],
711
+ "darkCommentTextColor" => $this->thread_styles["darkCommentTextColor"],
712
+ "darkCommentFieldsBG" => $this->thread_styles["darkCommentFieldsBG"],
713
+ "darkCommentFieldsBorderColor" => $this->thread_styles["darkCommentFieldsBorderColor"],
714
+ "darkCommentFieldsTextColor" => $this->thread_styles["darkCommentFieldsTextColor"],
715
+ "darkCommentFieldsPlaceholderColor" => $this->thread_styles["darkCommentFieldsPlaceholderColor"],
716
+ "commentTextSize" => $this->thread_styles["commentTextSize"],
717
+ "enableFontAwesome" => $this->thread_styles["enableFontAwesome"],
718
+ "customCss" => $this->thread_styles["customCss"],
719
+ ],
720
+ self::TAB_SUBSCRIPTION => [
721
+ "enableUserMentioning" => $this->subscription["enableUserMentioning"],
722
+ "sendMailToMentionedUsers" => $this->subscription["sendMailToMentionedUsers"],
723
+ "isNotifyOnCommentApprove" => $this->subscription["isNotifyOnCommentApprove"],
724
+ "enableMemberConfirm" => $this->subscription["enableMemberConfirm"],
725
+ "enableGuestsConfirm" => $this->subscription["enableGuestsConfirm"],
726
+ "subscriptionType" => $this->subscription["subscriptionType"],
727
+ "showReplyCheckbox" => $this->subscription["showReplyCheckbox"],
728
+ "isReplyDefaultChecked" => $this->subscription["isReplyDefaultChecked"],
729
+ "usePostmaticForCommentNotification" => $this->subscription["usePostmaticForCommentNotification"],
730
+ "isFollowActive" => $this->subscription["isFollowActive"],
731
+ "disableFollowConfirmForUsers" => $this->subscription["disableFollowConfirmForUsers"],
732
+ ],
733
+ self::TAB_LABELS => [
734
+ "blogRoleLabels" => $this->labels["blogRoleLabels"],
735
+ "blogRoles" => $this->labels["blogRoles"],
736
+ ],
737
+ self::TAB_MODERATION => [
738
+ "commentEditableTime" => $this->moderation["commentEditableTime"],
739
+ "enableEditingWhenHaveReplies" => $this->moderation["enableEditingWhenHaveReplies"],
740
+ "displayEditingInfo" => $this->moderation["displayEditingInfo"],
741
+ "enableStickButton" => $this->moderation["enableStickButton"],
742
+ "enableCloseButton" => $this->moderation["enableCloseButton"],
743
+ "restrictCommentingPerUser" => $this->moderation["restrictCommentingPerUser"],
744
+ "commentRestrictionType" => $this->moderation["commentRestrictionType"],
745
+ "userCommentsLimit" => $this->moderation["userCommentsLimit"],
746
+ ],
747
+ self::TAB_CONTENT => [
748
+ "commentTextMinLength" => $this->content["commentTextMinLength"],
749
+ "replyTextMinLength" => $this->content["replyTextMinLength"],
750
+ "commentTextMaxLength" => $this->content["commentTextMaxLength"],
751
+ "replyTextMaxLength" => $this->content["replyTextMaxLength"],
752
+ "enableImageConversion" => $this->content["enableImageConversion"],
753
+ "enableShortcodes" => $this->content["enableShortcodes"],
754
+ "commentReadMoreLimit" => $this->content["commentReadMoreLimit"],
755
+ "wmuIsEnabled" => $this->content["wmuIsEnabled"],
756
+ "wmuIsGuestAllowed" => $this->content["wmuIsGuestAllowed"],
757
+ "wmuIsLightbox" => $this->content["wmuIsLightbox"],
758
+ "wmuMimeTypes" => $this->content["wmuMimeTypes"],
759
+ "wmuMaxFileSize" => $this->content["wmuMaxFileSize"],
760
+ "wmuIsShowFilesDashboard" => $this->content["wmuIsShowFilesDashboard"],
761
+ "wmuSingleImageWidth" => $this->content["wmuSingleImageWidth"],
762
+ "wmuSingleImageHeight" => $this->content["wmuSingleImageHeight"],
763
+ "wmuImageSizes" => $this->content["wmuImageSizes"],
764
+ ],
765
+ self::TAB_LIVE => [
766
+ "enableBubble" => $this->live["enableBubble"],
767
+ "bubbleLiveUpdate" => $this->live["bubbleLiveUpdate"],
768
+ "bubbleLocation" => $this->live["bubbleLocation"],
769
+ "bubbleShowNewCommentMessage" => $this->live["bubbleShowNewCommentMessage"],
770
+ "bubbleHintTimeout" => $this->live["bubbleHintTimeout"],
771
+ "bubbleHintHideTimeout" => $this->live["bubbleHintHideTimeout"],
772
+ "commentListUpdateType" => $this->live["commentListUpdateType"],
773
+ "liveUpdateGuests" => $this->live["liveUpdateGuests"],
774
+ "commentListUpdateTimer" => $this->live["commentListUpdateTimer"],
775
+ ],
776
+ self::TAB_INLINE => [
777
+ "showInlineFilterButton" => $this->inline["showInlineFilterButton"],
778
+ "inlineFeedbackAttractionType" => $this->inline["inlineFeedbackAttractionType"],
779
+ ],
780
+ self::TAB_GENERAL => [
781
+ "isEnableOnHome" => $this->general["isEnableOnHome"],
782
+ "isNativeAjaxEnabled" => $this->general["isNativeAjaxEnabled"],
783
+ "loadComboVersion" => $this->general["loadComboVersion"],
784
+ "loadMinVersion" => $this->general["loadMinVersion"],
785
+ "commentLinkFilter" => $this->general["commentLinkFilter"],
786
+ "redirectPage" => $this->general["redirectPage"],
787
+ "simpleCommentDate" => $this->general["simpleCommentDate"],
788
+ "dateDiffFormat" => $this->general["dateDiffFormat"],
789
+ "isUsePoMo" => $this->general["isUsePoMo"],
790
+ "showPluginPoweredByLink" => $this->general["showPluginPoweredByLink"],
791
+ "isCacheEnabled" => $this->general["isCacheEnabled"],
792
+ "cacheTimeout" => $this->general["cacheTimeout"],
793
+ ],
794
+ ];
795
+ return $options;
796
+ }
797
 
798
+ public function updateOptions() {
799
+ update_option(self::OPTION_SLUG_OPTIONS, $this->toArray());
800
+ }
801
 
802
+ public function addOptions() {
803
+ add_option(self::OPTION_SLUG_OPTIONS, $this->getDefaultOptions());
804
+ }
805
 
806
+ public function getDefaultOptions() {
807
+ return [
808
+ self::TAB_FORM => [
809
+ "commentFormView" => "collapsed",
810
+ "enableDropAnimation" => 1,
811
+ "richEditor" => "desktop",
812
+ "boldButton" => 1,
813
+ "italicButton" => 1,
814
+ "underlineButton" => 1,
815
+ "strikeButton" => 1,
816
+ "olButton" => 1,
817
+ "ulButton" => 1,
818
+ "blockquoteButton" => 1,
819
+ "codeblockButton" => 1,
820
+ "linkButton" => 1,
821
+ "sourcecodeButton" => 1,
822
+ "spoilerButton" => 1,
823
+ "enableQuickTags" => 0,
824
+ "commenterNameMinLength" => 3,
825
+ "commenterNameMaxLength" => 50,
826
+ "storeCommenterData" => - 1,
827
+ ],
828
+ self::TAB_RECAPTCHA => [
829
+ "siteKey" => "",
830
+ "secretKey" => "",
831
+ "theme" => "light",
832
+ "lang" => "",
833
+ "requestMethod" => "auto",
834
+ "showForGuests" => 0,
835
+ "showForUsers" => 0,
836
+ "isShowOnSubscribeForm" => 0,
837
+ ],
838
+ self::TAB_LOGIN => [
839
+ "showLoggedInUsername" => 1,
840
+ "showLoginLinkForGuests" => 1,
841
+ "showActivityTab" => 1,
842
+ "showSubscriptionsTab" => 1,
843
+ "showFollowsTab" => 1,
844
+ "enableProfileURLs" => 1,
845
+ "websiteAsProfileUrl" => 1,
846
+ "isUserByEmail" => 0,
847
+ "loginUrl" => "",
848
+ ],
849
+ self::TAB_SOCIAL => [
850
+ "socialLoginAgreementCheckbox" => 1,
851
+ "socialLoginInSecondaryForm" => 0,
852
+ "displayIconOnAvatar" => 1,
853
+ "rememberLoggedinUser" => 1,
854
+ "enableFbLogin" => 0,
855
+ "enableFbShare" => 0,
856
+ "fbUseOAuth2" => 0,
857
+ "fbAppID" => "",
858
+ "fbAppSecret" => "",
859
+ "enableTwitterLogin" => 0,
860
+ "enableTwitterShare" => 1,
861
+ "twitterAppID" => "",
862
+ "twitterAppSecret" => "",
863
+ "enableGoogleLogin" => 0,
864
+ "googleClientID" => "",
865
+ "googleClientSecret" => "",
866
+ "enableDisqusLogin" => 0,
867
+ "disqusPublicKey" => "",
868
+ "disqusSecretKey" => "",
869
+ "enableWordpressLogin" => 0,
870
+ "wordpressClientID" => "",
871
+ "wordpressClientSecret" => "",
872
+ "enableInstagramLogin" => 0,
873
+ "instagramAppID" => "",
874
+ "instagramAppSecret" => "",
875
+ "enableLinkedinLogin" => 0,
876
+ "linkedinClientID" => "",
877
+ "linkedinClientSecret" => "",
878
+ "enableWhatsappShare" => 0,
879
+ "enableYandexLogin" => 0,
880
+ "yandexID" => "",
881
+ "yandexPassword" => "",
882
+ "enableMailruLogin" => 0,
883
+ "mailruClientID" => "",
884
+ "mailruClientSecret" => "",
885
+ "enableWeiboLogin" => 0,
886
+ "weiboKey" => "",
887
+ "weiboSecret" => "",
888
+ "enableWechatLogin" => 0,
889
+ "wechatAppID" => "",
890
+ "wechatSecret" => "",
891
+ "enableQQLogin" => 0,
892
+ "qqAppID" => "",
893
+ "qqSecret" => "",
894
+ "enableBaiduLogin" => 0,
895
+ "baiduAppID" => "",
896
+ "baiduSecret" => "",
897
+ "enableVkLogin" => 0,
898
+ "enableVkShare" => 1,
899
+ "vkAppID" => "",
900
+ "vkAppSecret" => "",
901
+ "enableOkLogin" => 0,
902
+ "enableOkShare" => 1,
903
+ "okAppID" => "",
904
+ "okAppKey" => "",
905
+ "okAppSecret" => "",
906
+ ],
907
+ self::TAB_RATING => [
908
+ "enablePostRatingSchema" => 0,
909
+ "displayRatingOnPost" => ["before_comment_form"],
910
+ "ratingCssOnNoneSingular" => 0,
911
+ "ratingHoverColor" => "#FFED85",
912
+ "ratingInactiveColor" => "#DDDDDD",
913
+ "ratingActiveColor" => "#FFD700",
914
+ ],
915
+ self::TAB_THREAD_DISPLAY => [
916
+ "firstLoadWithAjax" => 0,
917
+ "commentListLoadType" => 0,
918
+ "isLoadOnlyParentComments" => 0,
919
+ "showReactedFilterButton" => 1,
920
+ "showHottestFilterButton" => 1,
921
+ "showSortingButtons" => 1,
922
+ "mostVotedByDefault" => 0,
923
+ "reverseChildren" => 0,
924
+ "highlightUnreadComments" => 0,
925
+ "scrollToComment" => 1,
926
+ "orderCommentsBy" => "comment_ID",
927
+ ],
928
+ self::TAB_THREAD_LAYOUTS => [
929
+ "showCommentLink" => 1,
930
+ "showCommentDate" => 1,
931
+ "showVotingButtons" => 1,
932
+ "votingButtonsIcon" => "fa-plus|fa-minus",
933
+ "votingButtonsStyle" => 0,
934
+ "enableDislikeButton" => 1,
935
+ "isGuestCanVote" => 1,
936
+ "highlightVotingButtons" => 1,
937
+ "showAvatars" => 1,
938
+ "defaultAvatarUrlForUser" => "",
939
+ "defaultAvatarUrlForGuest" => "",
940
+ "changeAvatarsEverywhere" => 1,
941
+ ],
942
+ self::TAB_THREAD_STYLES => [
943
+ "theme" => "wpd-default",
944
+ "primaryColor" => "#00B38F",
945
+ "newLoadedCommentBGColor" => "#FFFAD6",
946
+ "primaryButtonColor" => "#FFFFFF",
947
+ "primaryButtonBG" => "#07B290",
948
+ "bubbleColors" => "#1DB99A",
949
+ "inlineFeedbackColors" => "#1DB99A",
950
+ "defaultCommentAreaBG" => "",
951
+ "defaultCommentTextColor" => "#777777",
952
+ "defaultCommentFieldsBG" => "",
953
+ "defaultCommentFieldsBorderColor" => "#DDDDDD",
954
+ "defaultCommentFieldsTextColor" => "#777777",
955
+ "defaultCommentFieldsPlaceholderColor" => "",
956
+ "darkCommentAreaBG" => "#111111",
957
+ "darkCommentTextColor" => "#CCCCCC",
958
+ "darkCommentFieldsBG" => "#999999",
959
+ "darkCommentFieldsBorderColor" => "#D1D1D1",
960
+ "darkCommentFieldsTextColor" => "#000000",
961
+ "darkCommentFieldsPlaceholderColor" => "#DDDDDD",
962
+ "commentTextSize" => "14px",
963
+ "enableFontAwesome" => 1,
964
+ "customCss" => ".comments-area{width:auto;}",
965
+ ],
966
+ self::TAB_SUBSCRIPTION => [
967
+ "enableUserMentioning" => 1,
968
+ "sendMailToMentionedUsers" => 1,
969
+ "isNotifyOnCommentApprove" => 1,
970
+ "enableMemberConfirm" => 0,
971
+ "enableGuestsConfirm" => 1,
972
+ "subscriptionType" => 1,
973
+ "showReplyCheckbox" => 1,
974
+ "isReplyDefaultChecked" => 0,
975
+ "usePostmaticForCommentNotification" => 0,
976
+ "isFollowActive" => 1,
977
+ "disableFollowConfirmForUsers" => 1,
978
+ ],
979
+ self::TAB_LABELS => [
980
+ "blogRoleLabels" => isset($this->labels["blogRoleLabels"]) ? $this->labels["blogRoleLabels"] : [],
981
+ "blogRoles" => isset($this->labels["blogRoles"]) ? $this->labels["blogRoles"] : [],
982
+ ],
983
+ self::TAB_MODERATION => [
984
+ "commentEditableTime" => 900,
985
+ "enableEditingWhenHaveReplies" => 0,
986
+ "displayEditingInfo" => 1,
987
+ "enableStickButton" => 1,
988
+ "enableCloseButton" => 1,
989
+ "restrictCommentingPerUser" => "disable",
990
+ "commentRestrictionType" => "both",
991
+ "userCommentsLimit" => 1,
992
+ ],
993
+ self::TAB_CONTENT => [
994
+ "commentTextMinLength" => 1,
995
+ "replyTextMinLength" => 1,
996
+ "commentTextMaxLength" => "",
997
+ "replyTextMaxLength" => "",
998
+ "enableImageConversion" => 1,
999
+ "enableShortcodes" => 0,
1000
+ "commentReadMoreLimit" => 0,
1001
+ "wmuIsEnabled" => 1,
1002
+ "wmuIsGuestAllowed" => 1,
1003
+ "wmuIsLightbox" => 1,
1004
+ "wmuMimeTypes" => $this->getDefaultFileTypes(),
1005
+ "wmuMaxFileSize" => 2,
1006
+ "wmuIsShowFilesDashboard" => 1,
1007
+ "wmuSingleImageWidth" => "auto",
1008
+ "wmuSingleImageHeight" => 200,
1009
+ "wmuImageSizes" => $this->getDefaultImageSizes(),
1010
+ ],
1011
+ self::TAB_LIVE => [
1012
+ "enableBubble" => 0,
1013
+ "bubbleLiveUpdate" => 0,
1014
+ "bubbleLocation" => "content_left",
1015
+ "bubbleShowNewCommentMessage" => 1,
1016
+ "bubbleHintTimeout" => 45,
1017
+ "bubbleHintHideTimeout" => 10,
1018
+ "commentListUpdateType" => 0,
1019
+ "liveUpdateGuests" => 0,
1020
+ "commentListUpdateTimer" => 60,
1021
+ ],
1022
+ self::TAB_INLINE => [
1023
+ "showInlineFilterButton" => 1,
1024
+ "inlineFeedbackAttractionType" => "blink",
1025
+ ],
1026
+ self::TAB_GENERAL => [
1027
+ "isEnableOnHome" => 1,
1028
+ "isNativeAjaxEnabled" => 1,
1029
+ "loadComboVersion" => 1,
1030
+ "loadMinVersion" => 1,
1031
+ "commentLinkFilter" => 1,
1032
+ "redirectPage" => 0,
1033
+ "simpleCommentDate" => 0,
1034
+ "dateDiffFormat" => "[number] [time_unit] [adjective]",
1035
+ "isUsePoMo" => 0,
1036
+ "showPluginPoweredByLink" => 0,
1037
+ "isCacheEnabled" => 1,
1038
+ "cacheTimeout" => 10,
1039
+ ],
1040
+ ];
1041
+ }
1042
 
1043
+ public function initPhrasesOnLoad() {
1044
+ if (!$this->general["isUsePoMo"] && $this->dbManager->isPhraseExists("wc_be_the_first_text")) {
1045
+ $this->phrases = $this->dbManager->getPhrases();
1046
+ } else {
1047
+ $this->initPhrases();
1048
+ }
1049
+ }
1050
 
1051
+ private function initFormRelations() {
1052
+ $this->formContentTypeRel = get_option("wpdiscuz_form_content_type_rel", []);
1053
+ $this->formPostRel = get_option("wpdiscuz_form_post_rel", []);
1054
+ }
1055
 
1056
+ public function isShareEnabled() {
1057
+ return $this->social["enableFbShare"] || $this->social["enableTwitterShare"] || $this->social["enableVkShare"] || $this->social["enableOkShare"];
1058
+ }
1059
 
1060
+ public function getOptionsForJs() {
1061
+ $jsArgs = [];
1062
+ $jsArgs["wc_hide_replies_text"] = esc_html($this->phrases["wc_hide_replies_text"]);
1063
+ $jsArgs["wc_show_replies_text"] = esc_html($this->phrases["wc_show_replies_text"]);
1064
+ $jsArgs["wc_msg_required_fields"] = esc_html($this->phrases["wc_msg_required_fields"]);
1065
+ $jsArgs["wc_invalid_field"] = esc_html($this->phrases["wc_invalid_field"]);
1066
+ $jsArgs["wc_error_empty_text"] = esc_html($this->phrases["wc_error_empty_text"]);
1067
+ $jsArgs["wc_error_url_text"] = esc_html($this->phrases["wc_error_url_text"]);
1068
+ $jsArgs["wc_error_email_text"] = esc_html($this->phrases["wc_error_email_text"]);
1069
+ $jsArgs["wc_invalid_captcha"] = esc_html($this->phrases["wc_invalid_captcha"]);
1070
+ $jsArgs["wc_login_to_vote"] = esc_html($this->phrases["wc_login_to_vote"]);
1071
+ $jsArgs["wc_deny_voting_from_same_ip"] = esc_html($this->phrases["wc_deny_voting_from_same_ip"]);
1072
+ $jsArgs["wc_self_vote"] = esc_html($this->phrases["wc_self_vote"]);
1073
+ $jsArgs["wc_vote_only_one_time"] = esc_html($this->phrases["wc_vote_only_one_time"]);
1074
+ $jsArgs["wc_voting_error"] = esc_html($this->phrases["wc_voting_error"]);
1075
+ $jsArgs["wc_comment_edit_not_possible"] = esc_html($this->phrases["wc_comment_edit_not_possible"]);
1076
+ $jsArgs["wc_comment_not_updated"] = esc_html($this->phrases["wc_comment_not_updated"]);
1077
+ $jsArgs["wc_comment_not_edited"] = esc_html($this->phrases["wc_comment_not_edited"]);
1078
+ $jsArgs["wc_msg_input_min_length"] = esc_html($this->phrases["wc_msg_input_min_length"]);
1079
+ $jsArgs["wc_msg_input_max_length"] = esc_html($this->phrases["wc_msg_input_max_length"]);
1080
+ $jsArgs["wc_spoiler_title"] = esc_html($this->phrases["wc_spoiler_title"]);
1081
+ $jsArgs["wc_cannot_rate_again"] = esc_html($this->phrases["wc_cannot_rate_again"]);
1082
+ $jsArgs["wc_not_allowed_to_rate"] = esc_html($this->phrases["wc_not_allowed_to_rate"]);
1083
+ //<!-- follow phrases
1084
+ $jsArgs["wc_follow_user"] = esc_html($this->phrases["wc_follow_user"]);
1085
+ $jsArgs["wc_unfollow_user"] = esc_html($this->phrases["wc_unfollow_user"]);
1086
+ $jsArgs["wc_follow_success"] = esc_html($this->phrases["wc_follow_success"]);
1087
+ $jsArgs["wc_follow_canceled"] = esc_html($this->phrases["wc_follow_canceled"]);
1088
+ $jsArgs["wc_follow_email_confirm"] = esc_html($this->phrases["wc_follow_email_confirm"]);
1089
+ $jsArgs["wc_follow_email_confirm_fail"] = esc_html($this->phrases["wc_follow_email_confirm_fail"]);
1090
+ $jsArgs["wc_follow_login_to_follow"] = esc_html($this->phrases["wc_follow_login_to_follow"]);
1091
+ $jsArgs["wc_follow_impossible"] = esc_html($this->phrases["wc_follow_impossible"]);
1092
+ $jsArgs["wc_follow_not_added"] = esc_html($this->phrases["wc_follow_not_added"]);
1093
+ //follow phrases -->
1094
+ $jsArgs["is_user_logged_in"] = is_user_logged_in();
1095
+ $jsArgs["commentListLoadType"] = $this->thread_display["commentListLoadType"];
1096
+ $jsArgs["commentListUpdateType"] = $this->live["commentListUpdateType"];
1097
+ $jsArgs["commentListUpdateTimer"] = $this->live["commentListUpdateTimer"];
1098
+ $jsArgs["liveUpdateGuests"] = $this->live["liveUpdateGuests"];
1099
+ $jsArgs["wordpressThreadCommentsDepth"] = $this->wp["threadCommentsDepth"];
1100
+ $jsArgs["wordpressIsPaginate"] = $this->wp["isPaginate"];
1101
+ $jsArgs["commentTextMaxLength"] = $this->content["commentTextMaxLength"] ? $this->content["commentTextMaxLength"] : 0;
1102
+ $jsArgs["replyTextMaxLength"] = $this->content["replyTextMaxLength"] ? $this->content["replyTextMaxLength"] : 0;
1103
+ $jsArgs["commentTextMinLength"] = $this->content["commentTextMinLength"];
1104
+ $jsArgs["replyTextMinLength"] = $this->content["replyTextMinLength"];
1105
+ if ($this->form["storeCommenterData"] < 0) {
1106
+ $jsArgs["storeCommenterData"] = 100000;
1107
+ } else if ($this->form["storeCommenterData"] == 0) {
1108
+ $jsArgs["storeCommenterData"] = null;
1109
+ } else {
1110
+ $jsArgs["storeCommenterData"] = $this->form["storeCommenterData"];
1111
+ }
1112
+ if (function_exists("zerospam_get_key")) {
1113
+ $jsArgs["wpdiscuz_zs"] = md5(zerospam_get_key());
1114
+ }
1115
+ $jsArgs["socialLoginAgreementCheckbox"] = $this->social["socialLoginAgreementCheckbox"];
1116
+ $jsArgs["enableFbLogin"] = $this->social["enableFbLogin"];
1117
+ $jsArgs["fbUseOAuth2"] = $this->social["fbUseOAuth2"];
1118
+ $jsArgs["enableFbShare"] = $this->social["enableFbShare"];
1119
+ $jsArgs["facebookAppID"] = $this->social["fbAppID"];
1120
+ $jsArgs["facebookUseOAuth2"] = $this->social["fbUseOAuth2"];
1121
+ $jsArgs["enableGoogleLogin"] = $this->social["enableGoogleLogin"];
1122
+ $jsArgs["googleClientID"] = $this->social["googleClientID"];
1123
+ $jsArgs["googleClientSecret"] = $this->social["googleClientSecret"];
1124
+ $jsArgs["cookiehash"] = COOKIEHASH;
1125
+ $jsArgs["isLoadOnlyParentComments"] = $this->thread_display["isLoadOnlyParentComments"];
1126
+ $jsArgs["scrollToComment"] = $this->thread_display["scrollToComment"];
1127
+ $jsArgs["commentFormView"] = $this->form["commentFormView"];
1128
+ $jsArgs["enableDropAnimation"] = $this->form["enableDropAnimation"];
1129
+ $jsArgs["isNativeAjaxEnabled"] = $this->general["isNativeAjaxEnabled"];
1130
+ $jsArgs["enableBubble"] = $this->live["enableBubble"];
1131
+ $jsArgs["bubbleLiveUpdate"] = $this->live["bubbleLiveUpdate"];
1132
+ $jsArgs["bubbleHintTimeout"] = $this->live["bubbleHintTimeout"];
1133
+ $jsArgs["bubbleHintHideTimeout"] = $this->live["bubbleHintHideTimeout"];
1134
+ $jsArgs["cookieHideBubbleHint"] = self::COOKIE_HIDE_BUBBLE_HINT;
1135
+ $jsArgs["bubbleShowNewCommentMessage"] = $this->live["bubbleShowNewCommentMessage"];
1136
+ $jsArgs["bubbleLocation"] = $this->live["bubbleLocation"];
1137
+ $jsArgs["firstLoadWithAjax"] = $this->thread_display["firstLoadWithAjax"];
1138
+ $jsArgs["wc_copied_to_clipboard"] = esc_html($this->phrases["wc_copied_to_clipboard"]);
1139
+ $jsArgs["inlineFeedbackAttractionType"] = $this->inline["inlineFeedbackAttractionType"];
1140
+ $jsArgs["loadRichEditor"] = intval($this->form["richEditor"] === "both" || (!wp_is_mobile() && $this->form["richEditor"] === "desktop"));
1141
+ //**reCaptcha**//
1142
+ $jsArgs["wpDiscuzReCaptchaSK"] = apply_filters("wpdiscuz_recaptcha_site_key", $this->recaptcha["siteKey"]);
1143
+ $jsArgs["wpDiscuzReCaptchaTheme"] = $this->recaptcha["theme"];
1144
+ $jsArgs["wpDiscuzReCaptchaVersion"] = apply_filters("wpdiscuz_recaptcha_version", $this->recaptcha["version"]);
1145
+ $jsArgs["wc_captcha_show_for_guest"] = $this->recaptcha["showForGuests"];
1146
+ $jsArgs["wc_captcha_show_for_members"] = $this->recaptcha["showForUsers"];
1147
+ $jsArgs["wpDiscuzIsShowOnSubscribeForm"] = $this->recaptcha["isShowOnSubscribeForm"];
1148
+ // Media Upload //
1149
+ $jsArgs["wmuEnabled"] = $this->content["wmuIsEnabled"];
1150
+ $jsArgs["wmuInput"] = self::INPUT_NAME;
1151
+ $jsArgs["wmuMaxFileCount"] = 1;
1152
+ $jsArgs["wmuMaxFileSize"] = $this->content["wmuMaxFileSize"] * 1024 * 1024;
1153
+ $jsArgs["wmuPostMaxSize"] = $this->wmuPostMaxSize;
1154
+ $jsArgs["wmuIsLightbox"] = $this->content["wmuIsLightbox"];
1155
+ $jsArgs["wmuMimeTypes"] = $this->content["wmuMimeTypes"];
1156
+ $jsArgs["wmuPhraseConfirmDelete"] = esc_html($this->phrases["wmuPhraseConfirmDelete"]);
1157
+ $jsArgs["wmuPhraseNotAllowedFile"] = esc_html($this->phrases["wmuPhraseNotAllowedFile"]);
1158
+ $jsArgs["wmuPhraseMaxFileCount"] = esc_html(preg_replace("#(\d+$)#is", "", $this->phrases["wmuPhraseMaxFileCount"]) . " " . apply_filters("wpdiscuz_mu_file_count", 1));
1159
+ $jsArgs["wmuPhraseMaxFileSize"] = esc_html($this->phrases["wmuPhraseMaxFileSize"] . " " . $this->content["wmuMaxFileSize"] . "MB");
1160
+ $jsArgs["wmuPhrasePostMaxSize"] = esc_html($this->phrases["wmuPhrasePostMaxSize"] . " " . ($this->wmuPostMaxSize / (1024 * 1024)) . "MB");
1161
+ $jsArgs["msgEmptyFile"] = esc_html__("File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.");
1162
+ $jsArgs["msgPostIdNotExists"] = esc_html__("Post ID not exists", "wpdiscuz");
1163
+ $jsArgs["msgUploadingNotAllowed"] = esc_html__("Sorry, uploading not allowed for this post", "wpdiscuz");
1164
+ $jsArgs["msgPermissionDenied"] = esc_html__("You do not have sufficient permissions to perform this action", "wpdiscuz");
1165
+ $jsArgs["wmuKeyImages"] = self::KEY_IMAGES;
1166
+ $jsArgs["wmuSingleImageWidth"] = $this->content["wmuSingleImageWidth"];
1167
+ $jsArgs["wmuSingleImageHeight"] = $this->content["wmuSingleImageHeight"];
1168
+ return $jsArgs;
1169
+ }
1170
 
1171
+ private function initGoodbyeCaptchaField() {
1172
+ $this->isGoodbyeCaptchaActive = is_callable([
1173
+ "GdbcWordPressPublicModule",
1174
+ "isCommentsProtectionActivated",
1175
+ ]) && GdbcWordPressPublicModule::isCommentsProtectionActivated();
1176
+ if ($this->isGoodbyeCaptchaActive) {
1177
+ $this->goodbyeCaptchaTocken = GdbcWordPressPublicModule::getInstance()->getTokenFieldHtml();
1178
+ }
1179
+ }
1180
 
1181
+ public function editorOptions() {
1182
+ ob_start();
1183
+ ?>
1184
  var wpdiscuzEditorOptions = {
1185
  modules: {
1186
  toolbar: "",
1191
  commentmincount : <?php echo absint($this->content["commentTextMinLength"]); ?>,
1192
  replymincount : <?php echo absint($this->content["replyTextMinLength"]); ?>,
1193
  },
1194
+ <?php do_action("wpdiscuz_editor_modules"); ?>
1195
  },
1196
  wc_be_the_first_text: <?php echo json_encode($this->getPhrase("wc_be_the_first_text", ["unique_id" => "0_0"])); ?>,
1197
  wc_comment_join_text: <?php echo json_encode($this->getPhrase("wc_comment_join_text", ["unique_id" => "0_0"])); ?>,
1198
  theme: 'snow',
1199
  debug: '<?php echo $this->general["loadComboVersion"] || $this->general["loadMinVersion"] ? 'error' : 'warn'; ?>'
1200
  };
1201
+ <?php
1202
+ return ob_get_clean();
1203
+ }
1204
+
1205
+ public function saveAndResetOptionsAndPhrases() {
1206
+ if (!empty($_GET["wpd_wizard"]) && ($wizard = absint($_GET["wpd_wizard"])) && !empty($_POST)) {
1207
+ check_admin_referer("wpd_wizard_form");
1208
+ if ($wizard === 2) {
1209
+ $forms = get_posts([
1210
+ "post_type" => "wpdiscuz_form",
1211
+ "post_status" => "publish",
1212
+ "posts_per_page" => - 1,
1213
+ ]);
1214
+ foreach ($forms as $k => $form) {
1215
+ $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1216
+ $formMeta["layout"] = isset($_POST["layout"]) ? absint($_POST["layout"]) : 1;
1217
+ update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1218
+ }
1219
+ $this->thread_styles["theme"] = trim(WpdiscuzHelper::sanitize(INPUT_POST, "theme", FILTER_SANITIZE_STRING, "wpd-default"));
1220
+ $this->updateOptions();
1221
+ } else if ($wizard === 3) {
1222
+ $this->live["enableBubble"] = isset($_POST["enableBubble"]) ? absint($_POST["enableBubble"]) : 0;
1223
+ $this->live["bubbleLiveUpdate"] = isset($_POST["bubbleLiveUpdate"]) ? absint($_POST["bubbleLiveUpdate"]) : 0;
1224
+ $this->live["bubbleLocation"] = trim(WpdiscuzHelper::sanitize(INPUT_POST, "bubbleLocation", FILTER_SANITIZE_STRING, "content_left"));
1225
+ $this->updateOptions();
1226
+ } else if ($wizard === 4) {
1227
+ $forms = get_posts([
1228
+ "post_type" => "wpdiscuz_form",
1229
+ "post_status" => "publish",
1230
+ "posts_per_page" => - 1,
1231
+ ]);
1232
+ foreach ($forms as $k => $form) {
1233
+ $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1234
+ $formMeta["enable_post_rating"] = isset($_POST["enable_post_rating"]) ? absint($_POST["enable_post_rating"]) : 1;
1235
+ update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1236
+ }
1237
+ }
1238
+ } else {
1239
+ $this->resetOptions();
1240
+ $this->saveOptions();
1241
+ $this->savePhrases();
1242
+ }
1243
+ $this->check();
1244
+ }
1245
 
1246
+ public function saveOptions() {
1247
+ if (isset($_POST["wc_submit_options"]) && !empty($_POST["wpd_tab"])) {
1248
+ if (!current_user_can("manage_options")) {
1249
+ die(esc_html_e("Hacker?", "wpdiscuz"));
1250
+ }
1251
+ check_admin_referer("wc_options_form-" . sanitize_text_field($_POST["wpd_tab"]));
1252
+ if (self::TAB_FORM === sanitize_text_field($_POST["wpd_tab"])) {
1253
+ $this->form["commentFormView"] = isset($_POST[self::TAB_FORM]["commentFormView"]) ? trim(sanitize_text_field($_POST[self::TAB_FORM]["commentFormView"])) : "collapsed";
1254
+ $this->form["enableDropAnimation"] = isset($_POST[self::TAB_FORM]["enableDropAnimation"]) ? absint($_POST[self::TAB_FORM]["enableDropAnimation"]) : 0;
1255
+ $this->form["richEditor"] = isset($_POST[self::TAB_FORM]["richEditor"]) ? trim(sanitize_text_field($_POST[self::TAB_FORM]["richEditor"])) : "desktop";
1256
+ $this->form["boldButton"] = isset($_POST[self::TAB_FORM]["boldButton"]) ? intval($_POST[self::TAB_FORM]["boldButton"]) : 0;
1257
+ $this->form["italicButton"] = isset($_POST[self::TAB_FORM]["italicButton"]) ? intval($_POST[self::TAB_FORM]["italicButton"]) : 0;
1258
+ $this->form["underlineButton"] = isset($_POST[self::TAB_FORM]["underlineButton"]) ? intval($_POST[self::TAB_FORM]["underlineButton"]) : 0;
1259
+ $this->form["strikeButton"] = isset($_POST[self::TAB_FORM]["strikeButton"]) ? intval($_POST[self::TAB_FORM]["strikeButton"]) : 0;
1260
+ $this->form["olButton"] = isset($_POST[self::TAB_FORM]["olButton"]) ? intval($_POST[self::TAB_FORM]["olButton"]) : 0;
1261
+ $this->form["ulButton"] = isset($_POST[self::TAB_FORM]["ulButton"]) ? intval($_POST[self::TAB_FORM]["ulButton"]) : 0;
1262
+ $this->form["blockquoteButton"] = isset($_POST[self::TAB_FORM]["blockquoteButton"]) ? intval($_POST[self::TAB_FORM]["blockquoteButton"]) : 0;
1263
+ $this->form["codeblockButton"] = isset($_POST[self::TAB_FORM]["codeblockButton"]) ? intval($_POST[self::TAB_FORM]["codeblockButton"]) : 0;
1264
+ $this->form["linkButton"] = isset($_POST[self::TAB_FORM]["linkButton"]) ? intval($_POST[self::TAB_FORM]["linkButton"]) : 0;
1265
+ $this->form["sourcecodeButton"] = isset($_POST[self::TAB_FORM]["sourcecodeButton"]) ? intval($_POST[self::TAB_FORM]["sourcecodeButton"]) : 0;
1266
+ $this->form["spoilerButton"] = isset($_POST[self::TAB_FORM]["spoilerButton"]) ? intval($_POST[self::TAB_FORM]["spoilerButton"]) : 0;
1267
+ $this->form["enableQuickTags"] = isset($_POST[self::TAB_FORM]["enableQuickTags"]) ? intval($_POST[self::TAB_FORM]["enableQuickTags"]) : 0;
1268
+ $this->form["commenterNameMinLength"] = isset($_POST[self::TAB_FORM]["commenterNameMinLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) >= 1 ? absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) : 1;
1269
+ $this->form["commenterNameMaxLength"] = isset($_POST[self::TAB_FORM]["commenterNameMaxLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) >= 3 && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) <= 50 ? absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) : 50;
1270
+ $this->form["storeCommenterData"] = isset($_POST[self::TAB_FORM]["storeCommenterData"]) && (intval($_POST[self::TAB_FORM]["storeCommenterData"]) || $_POST[self::TAB_FORM]["storeCommenterData"] == 0) ? intval($_POST[self::TAB_FORM]["storeCommenterData"]) : - 1;
1271
+ } else if (self::TAB_RECAPTCHA === $_POST["wpd_tab"]) {
1272
+ $this->recaptcha["siteKey"] = isset($_POST[self::TAB_RECAPTCHA]["siteKey"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["siteKey"])) : "";
1273
+ $this->recaptcha["secretKey"] = isset($_POST[self::TAB_RECAPTCHA]["secretKey"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["secretKey"])) : "";
1274
+ $this->recaptcha["theme"] = isset($_POST[self::TAB_RECAPTCHA]["theme"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["theme"])) : "light";
1275
+ $this->recaptcha["lang"] = isset($_POST[self::TAB_RECAPTCHA]["lang"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["lang"])) : "";
1276
+ $this->recaptcha["requestMethod"] = isset($_POST[self::TAB_RECAPTCHA]["requestMethod"]) ? trim(sanitize_text_field($_POST[self::TAB_RECAPTCHA]["requestMethod"])) : "auto";
1277
+ if (empty($_POST[self::TAB_RECAPTCHA]["useV3"])) {
1278
+ if ($this->recaptcha["siteKey"] && $this->recaptcha["secretKey"]) {
1279
+ $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1280
+ $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1281
+ $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1282
+ } else {
1283
+ $this->recaptcha["showForGuests"] = 0;
1284
+ $this->recaptcha["showForUsers"] = 0;
1285
+ $this->recaptcha["isShowOnSubscribeForm"] = 0;
1286
+ }
1287
+ } else {
1288
+ $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1289
+ $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1290
+ $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1291
+ }
1292
+ } else if (self::TAB_LOGIN === $_POST["wpd_tab"]) {
1293
+ $this->login["showLoggedInUsername"] = isset($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) ? absint($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) : 0;
1294
+ $this->login["showLoginLinkForGuests"] = isset($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? absint($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) : 0;
1295
+ $this->login["showActivityTab"] = isset($_POST[self::TAB_LOGIN]["showActivityTab"]) ? absint($_POST[self::TAB_LOGIN]["showActivityTab"]) : 0;
1296
+ $this->login["showSubscriptionsTab"] = isset($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) ? absint($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) : 0;
1297
+ $this->login["showFollowsTab"] = isset($_POST[self::TAB_LOGIN]["showFollowsTab"]) ? absint($_POST[self::TAB_LOGIN]["showFollowsTab"]) : 0;
1298
+ $this->login["enableProfileURLs"] = isset($_POST[self::TAB_LOGIN]["enableProfileURLs"]) ? absint($_POST[self::TAB_LOGIN]["enableProfileURLs"]) : 0;
1299
+ $this->login["websiteAsProfileUrl"] = isset($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? absint($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) : 0;
1300
+ $this->login["isUserByEmail"] = isset($_POST[self::TAB_LOGIN]["isUserByEmail"]) ? absint($_POST[self::TAB_LOGIN]["isUserByEmail"]) : 0;
1301
+ $this->login["loginUrl"] = isset($_POST[self::TAB_LOGIN]["loginUrl"]) && ($l = trim(sanitize_text_field($_POST[self::TAB_LOGIN]["loginUrl"]))) ? $l : "";
1302
+ } else if (self::TAB_SOCIAL === $_POST["wpd_tab"]) {
1303
+ $this->social["socialLoginAgreementCheckbox"] = isset($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) : 0;
1304
+ $this->social["socialLoginInSecondaryForm"] = isset($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) : 0;
1305
+ $this->social["displayIconOnAvatar"] = isset($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? absint($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) : 0;
1306
+ $this->social["rememberLoggedinUser"] = isset($_POST[self::TAB_SOCIAL]["rememberLoggedinUser"]) ? absint($_POST[self::TAB_SOCIAL]["rememberLoggedinUser"]) : 0;
1307
+ // fb
1308
+ $this->social["enableFbLogin"] = isset($_POST[self::TAB_SOCIAL]["enableFbLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbLogin"]) : 0;
1309
+ $this->social["enableFbShare"] = isset($_POST[self::TAB_SOCIAL]["enableFbShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbShare"]) : 0;
1310
+ $this->social["fbAppID"] = isset($_POST[self::TAB_SOCIAL]["fbAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["fbAppID"])) : "";
1311
+ $this->social["fbAppSecret"] = isset($_POST[self::TAB_SOCIAL]["fbAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["fbAppSecret"])) : "";
1312
+ $this->social["fbUseOAuth2"] = isset($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) ? absint($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) : 0;
1313
+ // twitter
1314
+ $this->social["enableTwitterLogin"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) : 0;
1315
+ $this->social["enableTwitterShare"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) : 0;
1316
+ $this->social["twitterAppID"] = isset($_POST[self::TAB_SOCIAL]["twitterAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["twitterAppID"])) : "";
1317
+ $this->social["twitterAppSecret"] = isset($_POST[self::TAB_SOCIAL]["twitterAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["twitterAppSecret"])) : "";
1318
+ // google
1319
+ $this->social["enableGoogleLogin"] = isset($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) : 0;
1320
+ $this->social["googleClientID"] = isset($_POST[self::TAB_SOCIAL]["googleClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["googleClientID"])) : "";
1321
+ $this->social["googleClientSecret"] = isset($_POST[self::TAB_SOCIAL]["googleClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["googleClientSecret"])) : "";
1322
+ // disqus
1323
+ $this->social["enableDisqusLogin"] = isset($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) : 0;
1324
+ $this->social["disqusPublicKey"] = isset($_POST[self::TAB_SOCIAL]["disqusPublicKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["disqusPublicKey"])) : "";
1325
+ $this->social["disqusSecretKey"] = isset($_POST[self::TAB_SOCIAL]["disqusSecretKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["disqusSecretKey"])) : "";
1326
+ // wordpress
1327
+ $this->social["enableWordpressLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) : 0;
1328
+ $this->social["wordpressClientID"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wordpressClientID"])) : "";
1329
+ $this->social["wordpressClientSecret"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wordpressClientSecret"])) : "";
1330
+ // instagram
1331
+ $this->social["enableInstagramLogin"] = isset($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) : 0;
1332
+ $this->social["instagramAppID"] = isset($_POST[self::TAB_SOCIAL]["instagramAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["instagramAppID"])) : "";
1333
+ $this->social["instagramAppSecret"] = isset($_POST[self::TAB_SOCIAL]["instagramAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["instagramAppSecret"])) : "";
1334
+ // linkedin
1335
+ $this->social["enableLinkedinLogin"] = isset($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) : 0;
1336
+ $this->social["linkedinClientID"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["linkedinClientID"])) : "";
1337
+ $this->social["linkedinClientSecret"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["linkedinClientSecret"])) : "";
1338
+ // whatsapp
1339
+ $this->social["enableWhatsappShare"] = isset($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) : 0;
1340
+ // yandex
1341
+ $this->social["enableYandexLogin"] = isset($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) : 0;
1342
+ $this->social["yandexID"] = isset($_POST[self::TAB_SOCIAL]["yandexID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["yandexID"])) : "";
1343
+ $this->social["yandexPassword"] = isset($_POST[self::TAB_SOCIAL]["yandexPassword"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["yandexPassword"])) : "";
1344
+ // mail.ru
1345
+ $this->social["enableMailruLogin"] = isset($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) : 0;
1346
+ $this->social["mailruClientID"] = isset($_POST[self::TAB_SOCIAL]["mailruClientID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["mailruClientID"])) : "";
1347
+ $this->social["mailruClientSecret"] = isset($_POST[self::TAB_SOCIAL]["mailruClientSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["mailruClientSecret"])) : "";
1348
+ // weibo
1349
+ $this->social["enableWeiboLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) : 0;
1350
+ $this->social["weiboKey"] = isset($_POST[self::TAB_SOCIAL]["weiboKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["weiboKey"])) : "";
1351
+ $this->social["weiboSecret"] = isset($_POST[self::TAB_SOCIAL]["weiboSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["weiboSecret"])) : "";
1352
+ // wechat
1353
+ $this->social["enableWechatLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) : 0;
1354
+ $this->social["wechatAppID"] = isset($_POST[self::TAB_SOCIAL]["wechatAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wechatAppID"])) : "";
1355
+ $this->social["wechatSecret"] = isset($_POST[self::TAB_SOCIAL]["wechatSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["wechatSecret"])) : "";
1356
+ // qq
1357
+ $this->social["enableQQLogin"] = isset($_POST[self::TAB_SOCIAL]["enableQQLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableQQLogin"]) : 0;
1358
+ $this->social["qqAppID"] = isset($_POST[self::TAB_SOCIAL]["qqAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["qqAppID"])) : "";
1359
+ $this->social["qqSecret"] = isset($_POST[self::TAB_SOCIAL]["qqSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["qqSecret"])) : "";
1360
+ // baidu
1361
+ $this->social["enableBaiduLogin"] = isset($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) : 0;
1362
+ $this->social["baiduAppID"] = isset($_POST[self::TAB_SOCIAL]["baiduAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["baiduAppID"])) : "";
1363
+ $this->social["baiduSecret"] = isset($_POST[self::TAB_SOCIAL]["baiduSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["baiduSecret"])) : "";
1364
+ // vk
1365
+ $this->social["enableVkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableVkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkLogin"]) : 0;
1366
+ $this->social["enableVkShare"] = isset($_POST[self::TAB_SOCIAL]["enableVkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkShare"]) : 0;
1367
+ $this->social["vkAppID"] = isset($_POST[self::TAB_SOCIAL]["vkAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["vkAppID"])) : "";
1368
+ $this->social["vkAppSecret"] = isset($_POST[self::TAB_SOCIAL]["vkAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["vkAppSecret"])) : "";
1369
+ // ok
1370
+ $this->social["enableOkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableOkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkLogin"]) : 0;
1371
+ $this->social["enableOkShare"] = isset($_POST[self::TAB_SOCIAL]["enableOkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkShare"]) : 0;
1372
+ $this->social["okAppID"] = isset($_POST[self::TAB_SOCIAL]["okAppID"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["okAppID"])) : "";
1373
+ $this->social["okAppKey"] = isset($_POST[self::TAB_SOCIAL]["okAppKey"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["okAppKey"])) : "";
1374
+ $this->social["okAppSecret"] = isset($_POST[self::TAB_SOCIAL]["okAppSecret"]) ? trim(sanitize_text_field($_POST[self::TAB_SOCIAL]["okAppSecret"])) : "";
1375
+ } else if (self::TAB_RATING === $_POST["wpd_tab"]) {
1376
+ $this->rating["enablePostRatingSchema"] = isset($_POST[self::TAB_RATING]["enablePostRatingSchema"]) ? absint($_POST[self::TAB_RATING]["enablePostRatingSchema"]) : 0;
1377
+ $this->rating["displayRatingOnPost"] = isset($_POST[self::TAB_RATING]["displayRatingOnPost"]) ? $_POST[self::TAB_RATING]["displayRatingOnPost"] : [];
1378
+ $this->rating["ratingCssOnNoneSingular"] = isset($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? absint($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) : 0;
1379
+ $this->rating["ratingHoverColor"] = isset($_POST[self::TAB_RATING]["ratingHoverColor"]) ? sanitize_hex_color($_POST[self::TAB_RATING]["ratingHoverColor"]) : "#FFED85";
1380
+ $this->rating["ratingInactiveColor"] = isset($_POST[self::TAB_RATING]["ratingInactiveColor"]) ? sanitize_hex_color($_POST[self::TAB_RATING]["ratingInactiveColor"]) : "#DDDDDD";
1381
+ $this->rating["ratingActiveColor"] = isset($_POST[self::TAB_RATING]["ratingActiveColor"]) ? sanitize_hex_color($_POST[self::TAB_RATING]["ratingActiveColor"]) : "#FFD700";
1382
+ } else if (self::TAB_THREAD_DISPLAY === $_POST["wpd_tab"]) {
1383
+ $this->thread_display["firstLoadWithAjax"] = isset($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) : 0;
1384
+ $this->thread_display["commentListLoadType"] = isset($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) : 0;
1385
+ $this->thread_display["isLoadOnlyParentComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) : 0;
1386
+ $this->thread_display["showReactedFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) : 0;
1387
+ $this->thread_display["showHottestFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) : 0;
1388
+ $this->thread_display["showSortingButtons"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) : 0;
1389
+ $this->thread_display["mostVotedByDefault"] = isset($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) : 0;
1390
+ $this->thread_display["reverseChildren"] = isset($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) : 0;
1391
+ $this->thread_display["highlightUnreadComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) : 0;
1392
+ $this->thread_display["scrollToComment"] = isset($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) : 0;
1393
+ $this->thread_display["orderCommentsBy"] = isset($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) && ($o = trim(sanitize_text_field($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]))) && in_array($o, [
1394
+ "comment_ID",
1395
+ "comment_date_gmt",
1396
+ ]) ? $o : "comment_ID";
1397
+ } else if (self::TAB_THREAD_LAYOUTS === $_POST["wpd_tab"]) {
1398
+ $this->thread_layouts["showCommentLink"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) : 0;
1399
+ $this->thread_layouts["showCommentDate"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) : 0;
1400
+ $this->thread_layouts["showVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) : 0;
1401
+ $this->thread_layouts["votingButtonsIcon"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? sanitize_text_field($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) : "fa-plus|fa-minus";
1402
+ $this->thread_layouts["votingButtonsStyle"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) : 0;
1403
+ $this->thread_layouts["enableDislikeButton"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) : 0;
1404
+ $this->thread_layouts["isGuestCanVote"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) : 0;
1405
+ $this->thread_layouts["highlightVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) : 0;
1406
+ $this->thread_layouts["showAvatars"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) : 0;
1407
+ $this->thread_layouts["defaultAvatarUrlForUser"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? trim(sanitize_text_field($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"])) : "";
1408
+ $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? trim(sanitize_text_field($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"])) : "";
1409
+ $this->thread_layouts["changeAvatarsEverywhere"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) : 0;
1410
+ } else if (self::TAB_THREAD_STYLES === $_POST["wpd_tab"]) {
1411
+ $this->thread_styles["theme"] = isset($_POST[self::TAB_THREAD_STYLES]["theme"]) ? trim(sanitize_text_field($_POST[self::TAB_THREAD_STYLES]["theme"])) : "wpd-default";
1412
+ $this->thread_styles["primaryColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["primaryColor"]) : "#00B38F";
1413
+ $this->thread_styles["newLoadedCommentBGColor"] = isset($_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) : "#FFFAD6";
1414
+ $this->thread_styles["primaryButtonColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"]) : "#FFFFFF";
1415
+ $this->thread_styles["primaryButtonBG"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"]) : "#07B290";
1416
+ $this->thread_styles["bubbleColors"] = isset($_POST[self::TAB_THREAD_STYLES]["bubbleColors"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["bubbleColors"]) : "#1DB99A";
1417
+ $this->thread_styles["inlineFeedbackColors"] = isset($_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) : "#1DB99A";
1418
+ $this->thread_styles["defaultCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) : "";
1419
+ $this->thread_styles["defaultCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) : "#777777";
1420
+ $this->thread_styles["defaultCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) : "";
1421
+ $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) : "#DDDDDD";
1422
+ $this->thread_styles["defaultCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) : "#777777";
1423
+ $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) : "";
1424
+ $this->thread_styles["darkCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) : "#111111";
1425
+ $this->thread_styles["darkCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) : "#CCCCCC";
1426
+ $this->thread_styles["darkCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) : "#999999";
1427
+ $this->thread_styles["darkCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) : "#D1D1D1";
1428
+ $this->thread_styles["darkCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) : "#000000";
1429
+ $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? sanitize_hex_color($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) : "#DDDDDD";
1430
+ $this->thread_styles["commentTextSize"] = isset($_POST[self::TAB_THREAD_STYLES]["commentTextSize"]) ? sanitize_term_field($_POST[self::TAB_THREAD_STYLES]["commentTextSize"]) : "14px";
1431
+ $this->thread_styles["enableFontAwesome"] = isset($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? absint($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) : 0;
1432
+ $this->thread_styles["customCss"] = isset($_POST[self::TAB_THREAD_STYLES]["customCss"]) ? sanitize_textarea_field($_POST[self::TAB_THREAD_STYLES]["customCss"]) : ".comments-area{width:auto;}";
1433
+ } else if (self::TAB_SUBSCRIPTION === $_POST["wpd_tab"]) {
1434
+ $this->subscription["enableUserMentioning"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) : 0;
1435
+ $this->subscription["sendMailToMentionedUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) : 0;
1436
+ $this->subscription["isNotifyOnCommentApprove"] = isset($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) : 0;
1437
+ $this->subscription["enableMemberConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) : 0;
1438
+ $this->subscription["enableGuestsConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) : 0;
1439
+ $this->subscription["subscriptionType"] = isset($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) : 1;
1440
+ $this->subscription["showReplyCheckbox"] = isset($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) : 0;
1441
+ $this->subscription["isReplyDefaultChecked"] = isset($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) : 0;
1442
+ $this->subscription["usePostmaticForCommentNotification"] = isset($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) : 0;
1443
+ $this->subscription["isFollowActive"] = isset($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) : 0;
1444
+ $this->subscription["disableFollowConfirmForUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) : 0;
1445
+ } else if (self::TAB_LABELS === $_POST["wpd_tab"]) {
1446
+ $emptyRolesArray = array_combine(array_keys($this->labels["blogRoleLabels"]), array_pad([], count($this->labels["blogRoleLabels"]), 0));
1447
+ $this->labels["blogRoleLabels"] = isset($_POST[self::TAB_LABELS]["blogRoleLabels"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoleLabels"], $emptyRolesArray) : $emptyRolesArray;
1448
+ $this->labels["blogRoles"] = isset($_POST[self::TAB_LABELS]["blogRoles"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoles"], $this->labels["blogRoles"]) : $this->labels["blogRoles"];
1449
+ } else if (self::TAB_MODERATION === $_POST["wpd_tab"]) {
1450
+ $this->moderation["commentEditableTime"] = isset($_POST[self::TAB_MODERATION]["commentEditableTime"]) ? sanitize_text_field($_POST[self::TAB_MODERATION]["commentEditableTime"]) : 900;
1451
+ $this->moderation["enableEditingWhenHaveReplies"] = isset($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? absint($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) : 0;
1452
+ $this->moderation["displayEditingInfo"] = isset($_POST[self::TAB_MODERATION]["displayEditingInfo"]) ? absint($_POST[self::TAB_MODERATION]["displayEditingInfo"]) : 0;
1453
+ $this->moderation["enableStickButton"] = isset($_POST[self::TAB_MODERATION]["enableStickButton"]) ? absint($_POST[self::TAB_MODERATION]["enableStickButton"]) : 0;
1454
+ $this->moderation["enableCloseButton"] = isset($_POST[self::TAB_MODERATION]["enableCloseButton"]) ? absint($_POST[self::TAB_MODERATION]["enableCloseButton"]) : 0;
1455
+ $this->moderation["restrictCommentingPerUser"] = isset($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? trim(sanitize_text_field($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"])) : "disable";
1456
+ $this->moderation["commentRestrictionType"] = isset($_POST[self::TAB_MODERATION]["commentRestrictionType"]) ? trim(sanitize_text_field($_POST[self::TAB_MODERATION]["commentRestrictionType"])) : "both";
1457
+ $this->moderation["userCommentsLimit"] = isset($_POST[self::TAB_MODERATION]["userCommentsLimit"]) ? absint($_POST[self::TAB_MODERATION]["userCommentsLimit"]) : 1;
1458
+ } else if (self::TAB_CONTENT === $_POST["wpd_tab"]) {
1459
+ $this->content["commentTextMinLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMinLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) : 1;
1460
+ $this->content["replyTextMinLength"] = isset($_POST[self::TAB_CONTENT]["replyTextMinLength"]) && absint($_POST[self::TAB_CONTENT]["replyTextMinLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["replyTextMinLength"]) : 1;
1461
+ $this->content["commentTextMaxLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) : "";
1462
+ $this->content["replyTextMaxLength"] = isset($_POST[self::TAB_CONTENT]["replyTextMaxLength"]) && absint($_POST[self::TAB_CONTENT]["replyTextMaxLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["replyTextMaxLength"]) : "";
1463
+ $this->content["enableImageConversion"] = isset($_POST[self::TAB_CONTENT]["enableImageConversion"]) ? absint($_POST[self::TAB_CONTENT]["enableImageConversion"]) : 0;
1464
+ $this->content["enableShortcodes"] = isset($_POST[self::TAB_CONTENT]["enableShortcodes"]) ? absint($_POST[self::TAB_CONTENT]["enableShortcodes"]) : 0;
1465
+ $this->content["commentReadMoreLimit"] = isset($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) && absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) >= 0 ? absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) : 0;
1466
+ $this->content["wmuIsEnabled"] = isset($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) : 0;
1467
+ $this->content["wmuIsGuestAllowed"] = isset($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) : 0;
1468
+ $this->content["wmuIsLightbox"] = isset($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) : 0;
1469
+ $this->content["wmuMimeTypes"] = isset($_POST[self::TAB_CONTENT]["wmuMimeTypes"]) ? $_POST[self::TAB_CONTENT]["wmuMimeTypes"] : [];
1470
+ $this->content["wmuMaxFileSize"] = isset($_POST[self::TAB_CONTENT]["wmuMaxFileSize"]) ? sanitize_text_field($_POST[self::TAB_CONTENT]["wmuMaxFileSize"]) : $this->wmuUploadMaxFileSize / (1024 * 1024);
1471
+ $this->content["wmuIsShowFilesDashboard"] = isset($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) : 0;
1472
+ $this->content["wmuSingleImageWidth"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"]) && ($v = trim(sanitize_text_field($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"]))) && ($v === "auto" || ($v = absint($v))) ? $v : 320;
1473
+ $this->content["wmuSingleImageHeight"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"]) && ($v = trim(sanitize_text_field($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"]))) && ($v === "auto" || ($v = absint($v))) ? $v : 200;
1474
+ $this->content["wmuImageSizes"] = isset($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && is_array($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && ($sizes = array_filter($_POST[self::TAB_CONTENT]["wmuImageSizes"])) ? $sizes : [];
1475
+ } else if (self::TAB_LIVE === $_POST["wpd_tab"]) {
1476
+ $this->live["enableBubble"] = isset($_POST[self::TAB_LIVE]["enableBubble"]) ? absint($_POST[self::TAB_LIVE]["enableBubble"]) : 0;
1477
+ $this->live["bubbleLiveUpdate"] = isset($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) ? absint($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) : 0;
1478
+ $this->live["bubbleLocation"] = isset($_POST[self::TAB_LIVE]["bubbleLocation"]) ? trim(sanitize_text_field($_POST[self::TAB_LIVE]["bubbleLocation"])) : "content_left";
1479
+ $this->live["bubbleShowNewCommentMessage"] = isset($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? absint($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) : 0;
1480
+ $this->live["bubbleHintTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) : 0;
1481
+ $this->live["bubbleHintHideTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) : 0;
1482
+ $this->live["commentListUpdateType"] = isset($_POST[self::TAB_LIVE]["commentListUpdateType"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateType"]) : 0;
1483
+ $this->live["liveUpdateGuests"] = isset($_POST[self::TAB_LIVE]["liveUpdateGuests"]) ? absint($_POST[self::TAB_LIVE]["liveUpdateGuests"]) : 0;
1484
+ $this->live["commentListUpdateTimer"] = isset($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) : 30;
1485
+ } else if (self::TAB_INLINE === $_POST["wpd_tab"]) {
1486
+ $this->inline["showInlineFilterButton"] = isset($_POST[self::TAB_INLINE]["showInlineFilterButton"]) ? absint($_POST[self::TAB_INLINE]["showInlineFilterButton"]) : 0;
1487
+ $this->inline["inlineFeedbackAttractionType"] = isset($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? trim(sanitize_text_field($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"])) : "disable";
1488
+ } else if (self::TAB_GENERAL === $_POST["wpd_tab"]) {
1489
+ $this->general["isEnableOnHome"] = isset($_POST[self::TAB_GENERAL]["isEnableOnHome"]) ? absint($_POST[self::TAB_GENERAL]["isEnableOnHome"]) : 0;
1490
+ $this->general["isNativeAjaxEnabled"] = isset($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) : 0;
1491
+ $this->general["loadComboVersion"] = isset($_POST[self::TAB_GENERAL]["loadComboVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadComboVersion"]) : 0;
1492
+ $this->general["loadMinVersion"] = isset($_POST[self::TAB_GENERAL]["loadMinVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadMinVersion"]) : 0;
1493
+ $this->general["commentLinkFilter"] = isset($_POST[self::TAB_GENERAL]["commentLinkFilter"]) ? absint($_POST[self::TAB_GENERAL]["commentLinkFilter"]) : 1;
1494
+ $this->general["simpleCommentDate"] = isset($_POST[self::TAB_GENERAL]["simpleCommentDate"]) ? absint($_POST[self::TAB_GENERAL]["simpleCommentDate"]) : 0;
1495
+ $this->general["dateDiffFormat"] = isset($_POST[self::TAB_GENERAL]["dateDiffFormat"]) ? trim($_POST[self::TAB_GENERAL]["dateDiffFormat"]) : "";
1496
+ $this->general["isUsePoMo"] = isset($_POST[self::TAB_GENERAL]["isUsePoMo"]) ? absint($_POST[self::TAB_GENERAL]["isUsePoMo"]) : 0;
1497
+ $this->general["showPluginPoweredByLink"] = isset($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? absint($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) : 0;
1498
+ $this->general["redirectPage"] = isset($_POST[self::TAB_GENERAL]["redirectPage"]) ? absint($_POST[self::TAB_GENERAL]["redirectPage"]) : 0;
1499
+ $this->general["isCacheEnabled"] = isset($_POST[self::TAB_GENERAL]["isCacheEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isCacheEnabled"]) : 0;
1500
+ $this->general["cacheTimeout"] = isset($_POST[self::TAB_GENERAL]["cacheTimeout"]) ? absint($_POST[self::TAB_GENERAL]["cacheTimeout"]) : 10;
1501
+ }
1502
+ do_action("wpdiscuz_save_options");
1503
+ $this->updateOptions();
1504
+ do_action("wpdiscuz_reset_comments_cache");
1505
+ do_action("wpdiscuz_reset_users_cache");
1506
+ }
1507
+ }
1508
 
1509
+ public function savePhrases() {
1510
+ if (isset($_POST["wc_submit_phrases"])) {
1511
+ if (!current_user_can("manage_options")) {
1512
+ die(esc_html_e("Hacker?", "wpdiscuz"));
1513
+ }
1514
+ check_admin_referer("wc_phrases_form");
1515
+ $this->phrases["wc_be_the_first_text"] = sanitize_text_field($_POST["wc_be_the_first_text"]);
1516
+ $this->phrases["wc_comment_start_text"] = sanitize_text_field($_POST["wc_comment_start_text"]);
1517
+ $this->phrases["wc_comment_join_text"] = sanitize_text_field($_POST["wc_comment_join_text"]);
1518
+ $this->phrases["wc_content_and_settings"] = sanitize_text_field($_POST["wc_content_and_settings"]);
1519
+ $this->phrases["wc_hottest_comment_thread"] = sanitize_text_field($_POST["wc_hottest_comment_thread"]);
1520
+ $this->phrases["wc_most_reacted_comment"] = sanitize_text_field($_POST["wc_most_reacted_comment"]);
1521
+ $this->phrases["wc_inline_comments"] = sanitize_text_field($_POST["wc_inline_comments"]);
1522
+ $this->phrases["wc_email_text"] = sanitize_text_field($_POST["wc_email_text"]);
1523
+ $this->phrases["wc_subscribe_anchor"] = sanitize_text_field($_POST["wc_subscribe_anchor"]);
1524
+ $this->phrases["wc_notify_of"] = sanitize_text_field($_POST["wc_notify_of"]);
1525
+ $this->phrases["wc_notify_on_new_comment"] = sanitize_text_field($_POST["wc_notify_on_new_comment"]);
1526
+ $this->phrases["wc_notify_on_all_new_reply"] = sanitize_text_field($_POST["wc_notify_on_all_new_reply"]);
1527
+ $this->phrases["wc_notify_on_new_reply"] = sanitize_text_field($_POST["wc_notify_on_new_reply"]);
1528
+ $this->phrases["wc_sort_by"] = sanitize_text_field($_POST["wc_sort_by"]);
1529
+ $this->phrases["wc_newest"] = sanitize_text_field($_POST["wc_newest"]);
1530
+ $this->phrases["wc_oldest"] = sanitize_text_field($_POST["wc_oldest"]);
1531
+ $this->phrases["wc_most_voted"] = sanitize_text_field($_POST["wc_most_voted"]);
1532
+ $this->phrases["wc_load_more_submit_text"] = sanitize_text_field($_POST["wc_load_more_submit_text"]);
1533
+ $this->phrases["wc_load_rest_comments_submit_text"] = sanitize_text_field($_POST["wc_load_rest_comments_submit_text"]);
1534
+ $this->phrases["wc_reply_text"] = sanitize_text_field($_POST["wc_reply_text"]);
1535
+ $this->phrases["wc_share_text"] = sanitize_text_field($_POST["wc_share_text"]);
1536
+ $this->phrases["wc_edit_text"] = sanitize_text_field($_POST["wc_edit_text"]);
1537
+ $this->phrases["wc_share_facebook"] = sanitize_text_field($_POST["wc_share_facebook"]);
1538
+ $this->phrases["wc_share_twitter"] = sanitize_text_field($_POST["wc_share_twitter"]);
1539
+ $this->phrases["wc_share_whatsapp"] = sanitize_text_field($_POST["wc_share_whatsapp"]);
1540
+ $this->phrases["wc_share_vk"] = sanitize_text_field($_POST["wc_share_vk"]);
1541
+ $this->phrases["wc_share_ok"] = sanitize_text_field($_POST["wc_share_ok"]);
1542
+ $this->phrases["wc_hide_replies_text"] = sanitize_text_field($_POST["wc_hide_replies_text"]);
1543
+ $this->phrases["wc_show_replies_text"] = sanitize_text_field($_POST["wc_show_replies_text"]);
1544
+ $this->phrases["wc_email_subject"] = sanitize_text_field($_POST["wc_email_subject"]);
1545
+ $this->phrases["wc_email_message"] = wp_kses(wpautop($_POST["wc_email_message"]), wp_kses_allowed_html("post"));
1546
+ $this->phrases["wc_all_comment_new_reply_subject"] = sanitize_text_field($_POST["wc_all_comment_new_reply_subject"]);
1547
+ $this->phrases["wc_all_comment_new_reply_message"] = wp_kses(wpautop($_POST["wc_all_comment_new_reply_message"]), wp_kses_allowed_html("post"));
1548
+ $this->phrases["wc_new_reply_email_subject"] = sanitize_text_field($_POST["wc_new_reply_email_subject"]);
1549
+ $this->phrases["wc_new_reply_email_message"] = wp_kses(wpautop($_POST["wc_new_reply_email_message"]), wp_kses_allowed_html("post"));
1550
+ $this->phrases["wc_subscribed_on_comment"] = sanitize_textarea_field($_POST["wc_subscribed_on_comment"]);
1551
+ $this->phrases["wc_subscribed_on_all_comment"] = sanitize_textarea_field($_POST["wc_subscribed_on_all_comment"]);
1552
+ $this->phrases["wc_subscribed_on_post"] = sanitize_textarea_field($_POST["wc_subscribed_on_post"]);
1553
+ $this->phrases["wc_unsubscribe"] = sanitize_text_field($_POST["wc_unsubscribe"]);
1554
+ $this->phrases["wc_ignore_subscription"] = sanitize_text_field($_POST["wc_ignore_subscription"]);
1555
+ $this->phrases["wc_unsubscribe_message"] = sanitize_textarea_field($_POST["wc_unsubscribe_message"]);
1556
+ $this->phrases["wc_subscribe_message"] = sanitize_textarea_field($_POST["wc_subscribe_message"]);
1557
+ $this->phrases["wc_confirm_email"] = sanitize_text_field($_POST["wc_confirm_email"]);
1558
+ $this->phrases["wc_comfirm_success_message"] = sanitize_textarea_field($_POST["wc_comfirm_success_message"]);
1559
+ $this->phrases["wc_confirm_email_subject"] = sanitize_text_field($_POST["wc_confirm_email_subject"]);
1560
+ $this->phrases["wc_confirm_email_message"] = wp_kses(wpautop($_POST["wc_confirm_email_message"]), wp_kses_allowed_html("post"));
1561
+ $this->phrases["wc_error_empty_text"] = sanitize_text_field($_POST["wc_error_empty_text"]);
1562
+ $this->phrases["wc_error_email_text"] = sanitize_text_field($_POST["wc_error_email_text"]);
1563
+ $this->phrases["wc_error_url_text"] = sanitize_text_field($_POST["wc_error_url_text"]);
1564
+ $this->phrases["wc_year_text"] = sanitize_text_field($_POST["wc_year_text"]);
1565
+ $this->phrases["wc_year_text_plural"] = sanitize_text_field($_POST["wc_year_text_plural"]);
1566
+ $this->phrases["wc_month_text"] = sanitize_text_field($_POST["wc_month_text"]);
1567
+ $this->phrases["wc_month_text_plural"] = sanitize_text_field($_POST["wc_month_text_plural"]);
1568
+ $this->phrases["wc_day_text"] = sanitize_text_field($_POST["wc_day_text"]);
1569
+ $this->phrases["wc_day_text_plural"] = sanitize_text_field($_POST["wc_day_text_plural"]);
1570
+ $this->phrases["wc_hour_text"] = sanitize_text_field($_POST["wc_hour_text"]);
1571
+ $this->phrases["wc_hour_text_plural"] = sanitize_text_field($_POST["wc_hour_text_plural"]);
1572
+ $this->phrases["wc_minute_text"] = sanitize_text_field($_POST["wc_minute_text"]);
1573
+ $this->phrases["wc_minute_text_plural"] = sanitize_text_field($_POST["wc_minute_text_plural"]);
1574
+ $this->phrases["wc_second_text"] = sanitize_text_field($_POST["wc_second_text"]);
1575
+ $this->phrases["wc_second_text_plural"] = sanitize_text_field($_POST["wc_second_text_plural"]);
1576
+ $this->phrases["wc_right_now_text"] = sanitize_text_field($_POST["wc_right_now_text"]);
1577
+ $this->phrases["wc_ago_text"] = sanitize_text_field($_POST["wc_ago_text"]);
1578
+ $this->phrases["wc_you_must_be_text"] = sanitize_text_field($_POST["wc_you_must_be_text"]);
1579
+ $this->phrases["wc_logged_in_as"] = sanitize_text_field($_POST["wc_logged_in_as"]);
1580
+ $this->phrases["wc_log_out"] = sanitize_text_field($_POST["wc_log_out"]);
1581
+ $this->phrases["wc_log_in"] = sanitize_text_field($_POST["wc_log_in"]);
1582
+ $this->phrases["wc_login_please"] = sanitize_text_field($_POST["wc_login_please"]);
1583
+ $this->phrases["wc_logged_in_text"] = sanitize_text_field($_POST["wc_logged_in_text"]);
1584
+ $this->phrases["wc_to_post_comment_text"] = sanitize_text_field($_POST["wc_to_post_comment_text"]);
1585
+ $this->phrases["wc_vote_counted"] = sanitize_text_field($_POST["wc_vote_counted"]);
1586
+ $this->phrases["wc_vote_up"] = sanitize_text_field($_POST["wc_vote_up"]);
1587
+ $this->phrases["wc_vote_down"] = sanitize_text_field($_POST["wc_vote_down"]);
1588
+ $this->phrases["wc_awaiting_for_approval"] = sanitize_text_field($_POST["wc_awaiting_for_approval"]);
1589
+ $this->phrases["wc_vote_only_one_time"] = sanitize_text_field($_POST["wc_vote_only_one_time"]);
1590
+ $this->phrases["wc_voting_error"] = sanitize_text_field($_POST["wc_voting_error"]);
1591
+ $this->phrases["wc_self_vote"] = sanitize_text_field($_POST["wc_self_vote"]);
1592
+ $this->phrases["wc_deny_voting_from_same_ip"] = sanitize_text_field($_POST["wc_deny_voting_from_same_ip"]);
1593
+ $this->phrases["wc_login_to_vote"] = sanitize_text_field($_POST["wc_login_to_vote"]);
1594
+ $this->phrases["wc_invalid_captcha"] = sanitize_text_field($_POST["wc_invalid_captcha"]);
1595
+ $this->phrases["wc_invalid_field"] = sanitize_text_field($_POST["wc_invalid_field"]);
1596
+ $this->phrases["wc_comment_not_updated"] = sanitize_text_field($_POST["wc_comment_not_updated"]);
1597
+ $this->phrases["wc_comment_edit_not_possible"] = sanitize_text_field($_POST["wc_comment_edit_not_possible"]);
1598
+ $this->phrases["wc_comment_not_edited"] = sanitize_text_field($_POST["wc_comment_not_edited"]);
1599
+ $this->phrases["wc_comment_edit_save_button"] = sanitize_text_field($_POST["wc_comment_edit_save_button"]);
1600
+ $this->phrases["wc_comment_edit_cancel_button"] = sanitize_text_field($_POST["wc_comment_edit_cancel_button"]);
1601
+ $this->phrases["wc_msg_input_min_length"] = sanitize_text_field($_POST["wc_msg_input_min_length"]);
1602
+ $this->phrases["wc_msg_input_max_length"] = sanitize_text_field($_POST["wc_msg_input_max_length"]);
1603
+ $this->phrases["wc_read_more"] = sanitize_text_field($_POST["wc_read_more"]);
1604
+ $this->phrases["wc_anonymous"] = sanitize_text_field($_POST["wc_anonymous"]);
1605
+ $this->phrases["wc_msg_required_fields"] = sanitize_text_field($_POST["wc_msg_required_fields"]);
1606
+ $this->phrases["wc_connect_with"] = sanitize_text_field($_POST["wc_connect_with"]);
1607
+ $this->phrases["wc_subscribed_to"] = sanitize_text_field($_POST["wc_subscribed_to"]);
1608
+ $this->phrases["wc_form_subscription_submit"] = sanitize_text_field($_POST["wc_form_subscription_submit"]);
1609
+ $this->phrases["wc_comment_approved_email_subject"] = sanitize_text_field($_POST["wc_comment_approved_email_subject"]);
1610
+ $this->phrases["wc_comment_approved_email_message"] = wp_kses(wpautop($_POST["wc_comment_approved_email_message"]), wp_kses_allowed_html("post"));
1611
+ $this->phrases["wc_roles_cannot_comment_message"] = sanitize_text_field($_POST["wc_roles_cannot_comment_message"]);
1612
+ $this->phrases["wc_stick_comment_btn_title"] = sanitize_text_field($_POST["wc_stick_comment_btn_title"]);
1613
+ $this->phrases["wc_stick_comment"] = sanitize_text_field($_POST["wc_stick_comment"]);
1614
+ $this->phrases["wc_unstick_comment"] = sanitize_text_field($_POST["wc_unstick_comment"]);
1615
+ $this->phrases["wc_sticky_comment_icon_title"] = sanitize_text_field($_POST["wc_sticky_comment_icon_title"]);
1616
+ $this->phrases["wc_close_comment_btn_title"] = sanitize_text_field($_POST["wc_close_comment_btn_title"]);
1617
+ $this->phrases["wc_close_comment"] = sanitize_text_field($_POST["wc_close_comment"]);
1618
+ $this->phrases["wc_open_comment"] = sanitize_text_field($_POST["wc_open_comment"]);
1619
+ $this->phrases["wc_closed_comment_icon_title"] = sanitize_text_field($_POST["wc_closed_comment_icon_title"]);
1620
+ $this->phrases["wc_social_login_agreement_label"] = sanitize_text_field($_POST["wc_social_login_agreement_label"]);
1621
+ $this->phrases["wc_social_login_agreement_desc"] = wp_kses($_POST["wc_social_login_agreement_desc"], wp_kses_allowed_html("post"));
1622
+ $this->phrases["wc_agreement_button_disagree"] = sanitize_text_field($_POST["wc_agreement_button_disagree"]);
1623
+ $this->phrases["wc_agreement_button_agree"] = sanitize_text_field($_POST["wc_agreement_button_agree"]);
1624
+ $this->phrases["wc_content_and_settings"] = sanitize_text_field($_POST["wc_content_and_settings"]);
1625
+ $this->phrases["wc_user_settings_activity"] = sanitize_text_field($_POST["wc_user_settings_activity"]);
1626
+ $this->phrases["wc_user_settings_subscriptions"] = sanitize_text_field($_POST["wc_user_settings_subscriptions"]);
1627
+ $this->phrases["wc_user_settings_follows"] = sanitize_text_field($_POST["wc_user_settings_follows"]);
1628
+ $this->phrases["wc_user_settings_response_to"] = sanitize_text_field($_POST["wc_user_settings_response_to"]);
1629
+ $this->phrases["wc_user_settings_email_me_delete_links"] = sanitize_text_field($_POST["wc_user_settings_email_me_delete_links"]);
1630
+ $this->phrases["wc_user_settings_email_me_delete_links_desc"] = sanitize_textarea_field($_POST["wc_user_settings_email_me_delete_links_desc"]);
1631
+ $this->phrases["wc_user_settings_no_data"] = sanitize_text_field($_POST["wc_user_settings_no_data"]);
1632
+ $this->phrases["wc_user_settings_request_deleting_comments"] = sanitize_text_field($_POST["wc_user_settings_request_deleting_comments"]);
1633
+ $this->phrases["wc_user_settings_cancel_subscriptions"] = sanitize_text_field($_POST["wc_user_settings_cancel_subscriptions"]);
1634
+ $this->phrases["wc_user_settings_clear_cookie"] = sanitize_text_field($_POST["wc_user_settings_clear_cookie"]);
1635
+ $this->phrases["wc_user_settings_delete_links"] = sanitize_text_field($_POST["wc_user_settings_delete_links"]);
1636
+ $this->phrases["wc_user_settings_delete_all_comments"] = sanitize_text_field($_POST["wc_user_settings_delete_all_comments"]);
1637
+ $this->phrases["wc_user_settings_delete_all_comments_message"] = wp_kses(wpautop($_POST["wc_user_settings_delete_all_comments_message"]), wp_kses_allowed_html("post"));
1638
+ $this->phrases["wc_user_settings_delete_all_subscriptions"] = sanitize_text_field($_POST["wc_user_settings_delete_all_subscriptions"]);
1639
+ $this->phrases["wc_user_settings_delete_all_subscriptions_message"] = wp_kses(wpautop($_POST["wc_user_settings_delete_all_subscriptions_message"]), wp_kses_allowed_html("post"));
1640
+ $this->phrases["wc_user_settings_delete_all_follows"] = sanitize_text_field($_POST["wc_user_settings_delete_all_follows"]);
1641
+ $this->phrases["wc_user_settings_delete_all_follows_message"] = wp_kses(wpautop($_POST["wc_user_settings_delete_all_follows_message"]), wp_kses_allowed_html("post"));
1642
+ $this->phrases["wc_user_settings_subscribed_to_replies"] = sanitize_text_field($_POST["wc_user_settings_subscribed_to_replies"]);
1643
+ $this->phrases["wc_user_settings_subscribed_to_replies_own"] = sanitize_text_field($_POST["wc_user_settings_subscribed_to_replies_own"]);
1644
+ $this->phrases["wc_user_settings_subscribed_to_all_comments"] = sanitize_text_field($_POST["wc_user_settings_subscribed_to_all_comments"]);
1645
+ $this->phrases["wc_user_settings_check_email"] = sanitize_text_field($_POST["wc_user_settings_check_email"]);
1646
+ $this->phrases["wc_user_settings_email_error"] = sanitize_text_field($_POST["wc_user_settings_email_error"]);
1647
+ $this->phrases["wc_delete_this_comment"] = sanitize_text_field($_POST["wc_delete_this_comment"]);
1648
+ $this->phrases["wc_cancel_this_subscription"] = sanitize_text_field($_POST["wc_cancel_this_subscription"]);
1649
+ $this->phrases["wc_cancel_this_follow"] = sanitize_text_field($_POST["wc_cancel_this_follow"]);
1650
+ $this->phrases["wc_confirm_comment_delete"] = sanitize_text_field($_POST["wc_confirm_comment_delete"]);
1651
+ $this->phrases["wc_confirm_cancel_subscription"] = sanitize_text_field($_POST["wc_confirm_cancel_subscription"]);
1652
+ $this->phrases["wc_confirm_cancel_follow"] = sanitize_text_field($_POST["wc_confirm_cancel_follow"]);
1653
+ $this->phrases["wc_follow_user"] = sanitize_text_field($_POST["wc_follow_user"]);
1654
+ $this->phrases["wc_unfollow_user"] = sanitize_text_field($_POST["wc_unfollow_user"]);
1655
+ $this->phrases["wc_follow_success"] = sanitize_text_field($_POST["wc_follow_success"]);
1656
+ $this->phrases["wc_follow_canceled"] = sanitize_text_field($_POST["wc_follow_canceled"]);
1657
+ $this->phrases["wc_follow_email_confirm"] = sanitize_text_field($_POST["wc_follow_email_confirm"]);
1658
+ $this->phrases["wc_follow_email_confirm_fail"] = sanitize_text_field($_POST["wc_follow_email_confirm_fail"]);
1659
+ $this->phrases["wc_follow_login_to_follow"] = sanitize_text_field($_POST["wc_follow_login_to_follow"]);
1660
+ $this->phrases["wc_follow_impossible"] = sanitize_text_field($_POST["wc_follow_impossible"]);
1661
+ $this->phrases["wc_follow_not_added"] = sanitize_text_field($_POST["wc_follow_not_added"]);
1662
+ $this->phrases["wc_follow_confirm"] = sanitize_text_field($_POST["wc_follow_confirm"]);
1663
+ $this->phrases["wc_follow_cancel"] = sanitize_text_field($_POST["wc_follow_cancel"]);
1664
+ $this->phrases["wc_follow_confirm_email_subject"] = sanitize_text_field($_POST["wc_follow_confirm_email_subject"]);
1665
+ $this->phrases["wc_follow_confirm_email_message"] = wp_kses(wpautop($_POST["wc_follow_confirm_email_message"]), wp_kses_allowed_html("post"));
1666
+ $this->phrases["wc_follow_email_subject"] = sanitize_text_field($_POST["wc_follow_email_subject"]);
1667
+ $this->phrases["wc_follow_email_message"] = wp_kses(wpautop($_POST["wc_follow_email_message"]), wp_kses_allowed_html("post"));
1668
+ $this->phrases["wc_mentioned_email_subject"] = sanitize_text_field($_POST["wc_mentioned_email_subject"]);
1669
+ $this->phrases["wc_mentioned_email_message"] = wp_kses(wpautop($_POST["wc_mentioned_email_message"]), wp_kses_allowed_html("post"));
1670
+ $this->phrases["wc_copied_to_clipboard"] = sanitize_text_field($_POST["wc_copied_to_clipboard"]);
1671
+ $this->phrases["wc_feedback_shortcode_tooltip"] = sanitize_text_field($_POST["wc_feedback_shortcode_tooltip"]);
1672
+ $this->phrases["wc_feedback_popup_title"] = sanitize_text_field($_POST["wc_feedback_popup_title"]);
1673
+ $this->phrases["wc_please_leave_feebdack"] = sanitize_text_field($_POST["wc_please_leave_feebdack"]);
1674
+ $this->phrases["wc_feedback_content_text"] = sanitize_text_field($_POST["wc_feedback_content_text"]);
1675
+ $this->phrases["wc_feedback_comment_success"] = sanitize_text_field($_POST["wc_feedback_comment_success"]);
1676
+ $this->phrases["wc_commenting_is_closed"] = sanitize_text_field($_POST["wc_commenting_is_closed"]);
1677
+ $this->phrases["wc_closed_comment_thread"] = sanitize_text_field($_POST["wc_closed_comment_thread"]);
1678
+ $this->phrases["wc_bubble_invite_message"] = sanitize_text_field($_POST["wc_bubble_invite_message"]);
1679
+ $this->phrases["wc_vote_phrase"] = sanitize_text_field($_POST["wc_vote_phrase"]);
1680
+ $this->phrases["wc_votes_phrase"] = sanitize_text_field($_POST["wc_votes_phrase"]);
1681
+ $this->phrases["wc_comment_link"] = sanitize_text_field($_POST["wc_comment_link"]);
1682
+ $this->phrases["wc_not_allowed_to_comment_more_than"] = sanitize_text_field($_POST["wc_not_allowed_to_comment_more_than"]);
1683
+ $this->phrases["wc_not_allowed_to_create_comment_thread_more_than"] = sanitize_text_field($_POST["wc_not_allowed_to_create_comment_thread_more_than"]);
1684
+ $this->phrases["wc_not_allowed_to_reply_more_than"] = sanitize_text_field($_POST["wc_not_allowed_to_reply_more_than"]);
1685
+ $this->phrases["wc_inline_form_comment"] = sanitize_text_field($_POST["wc_inline_form_comment"]);
1686
+ $this->phrases["wc_inline_form_notify"] = sanitize_text_field($_POST["wc_inline_form_notify"]);
1687
+ $this->phrases["wc_inline_form_name"] = sanitize_text_field($_POST["wc_inline_form_name"]);
1688
+ $this->phrases["wc_inline_form_email"] = sanitize_text_field($_POST["wc_inline_form_email"]);
1689
+ $this->phrases["wc_inline_form_comment_button"] = sanitize_text_field($_POST["wc_inline_form_comment_button"]);
1690
+ $this->phrases["wc_inline_comments_view_all"] = sanitize_text_field($_POST["wc_inline_comments_view_all"]);
1691
+ $this->phrases["wc_inline_feedbacks"] = sanitize_text_field($_POST["wc_inline_feedbacks"]);
1692
+ $this->phrases["wc_unable_sent_email"] = sanitize_text_field($_POST["wc_unable_sent_email"]);
1693
+ $this->phrases["wc_subscription_fault"] = sanitize_text_field($_POST["wc_subscription_fault"]);
1694
+ $this->phrases["wc_comments_are_deleted"] = sanitize_text_field($_POST["wc_comments_are_deleted"]);
1695
+ $this->phrases["wc_cancel_subs_success"] = sanitize_text_field($_POST["wc_cancel_subs_success"]);
1696
+ $this->phrases["wc_cancel_follows_success"] = sanitize_text_field($_POST["wc_cancel_follows_success"]);
1697
+ $this->phrases["wc_follow_confirm_success"] = sanitize_text_field($_POST["wc_follow_confirm_success"]);
1698
+ $this->phrases["wc_follow_cancel_success"] = sanitize_text_field($_POST["wc_follow_cancel_success"]);
1699
+ $this->phrases["wc_login_to_comment"] = sanitize_text_field($_POST["wc_login_to_comment"]);
1700
+ $this->phrases["wc_view_comments"] = sanitize_text_field($_POST["wc_view_comments"]);
1701
+ $this->phrases["wc_spoiler"] = sanitize_text_field($_POST["wc_spoiler"]);
1702
+ $this->phrases["wc_last_edited"] = sanitize_text_field($_POST["wc_last_edited"]);
1703
+ $this->phrases["wc_reply_to"] = sanitize_text_field($_POST["wc_reply_to"]);
1704
+ $this->phrases["wc_manage_comment"] = sanitize_text_field($_POST["wc_manage_comment"]);
1705
+ $this->phrases["wc_spoiler_title"] = sanitize_text_field($_POST["wc_spoiler_title"]);
1706
+ $this->phrases["wc_cannot_rate_again"] = sanitize_text_field($_POST["wc_cannot_rate_again"]);
1707
+ $this->phrases["wc_not_allowed_to_rate"] = sanitize_text_field($_POST["wc_not_allowed_to_rate"]);
1708
+ // Media Upload //
1709
+ $this->phrases["wmuPhraseConfirmDelete"] = sanitize_text_field($_POST["wmuPhraseConfirmDelete"]);
1710
+ $this->phrases["wmuPhraseNotAllowedFile"] = sanitize_text_field($_POST["wmuPhraseNotAllowedFile"]);
1711
+ $this->phrases["wmuPhraseMaxFileCount"] = sanitize_text_field($_POST["wmuPhraseMaxFileCount"]);
1712
+ $this->phrases["wmuPhraseMaxFileSize"] = sanitize_text_field($_POST["wmuPhraseMaxFileSize"]);
1713
+ $this->phrases["wmuPhrasePostMaxSize"] = sanitize_text_field($_POST["wmuPhrasePostMaxSize"]);
1714
+ $this->phrases["wmuAttachImage"] = sanitize_text_field($_POST["wmuAttachImage"]);
1715
+ $this->phrases["wmuChangeImage"] = sanitize_text_field($_POST["wmuChangeImage"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1716
 
1717
+ if (class_exists("Prompt_Comment_Form_Handling") && $this->subscription["usePostmaticForCommentNotification"]) {
1718
+ $this->phrases["wc_postmatic_subscription_label"] = sanitize_text_field($_POST["wc_postmatic_subscription_label"]);
1719
+ }
1720
+ foreach ($this->labels["blogRoles"] as $roleName => $roleVal) {
1721
+ $this->phrases["wc_blog_role_" . $roleName] = sanitize_text_field($_POST["wc_blog_role_" . $roleName]);
1722
+ }
1723
+ $this->dbManager->updatePhrases($this->phrases);
1724
+ }
1725
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1726
 
1727
+ public function resetOptions() {
1728
+ $nonce = filter_input(INPUT_GET, "_wpnonce", FILTER_SANITIZE_STRING);
1729
+ $page = filter_input(INPUT_GET, "page", FILTER_SANITIZE_STRING);
1730
+ $tab = filter_input(INPUT_GET, "wpd_tab", FILTER_SANITIZE_STRING);
1731
+ $redirect_to = filter_input(INPUT_GET, "redirect_to", FILTER_SANITIZE_URL);
 
 
 
 
1732
 
1733
+ if (!current_user_can("manage_options") || empty($nonce) || empty($page) || empty($tab) || empty($redirect_to)) {
1734
+ return;
1735
+ }
1736
 
1737
+ if ($page !== WpdiscuzCore::PAGE_SETTINGS || !wp_verify_nonce($nonce, md5(ABSPATH . get_home_url()))) {
1738
+ die(esc_html__("Stop doing this!!!", "wpdiscuz"));
1739
+ }
 
 
 
 
 
 
1740
 
1741
+ $roleColors = [
1742
+ "guest" => "#898989",
1743
+ "post_author" => "#07B290",
1744
+ "administrator" => "#ff451f",
1745
+ "editor" => "#d36000",
1746
+ "author" => "#327324",
1747
+ "contributor" => "#a240cd",
1748
+ "subscriber" => "#31839e",
1749
+ ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1750
 
1751
+ if ($tab === "all") {
1752
+ delete_option(self::OPTION_SLUG_OPTIONS);
1753
+ $this->addOptions();
1754
+ $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
1755
+ $this->general["showPluginPoweredByLink"] = 1;
1756
+ $blogRoles = get_editable_roles();
1757
+ $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1758
+ $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1759
+ $this->labels["blogRoleLabels"]["post_author"] = 1;
1760
+ $this->labels["blogRoleLabels"]["guest"] = 0;
1761
+ foreach ($blogRoles as $roleName => $roleInfo) {
1762
+ $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1763
+ $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1764
+ }
1765
+ $this->updateOptions();
1766
+ } else if (isset($this->{$tab})) {
1767
+ $defaultOptions = $this->getDefaultOptions();
1768
+ $this->{$tab} = $defaultOptions[sanitize_text_field($_GET["wpd_tab"])];
1769
+ if ($tab === WpdiscuzCore::TAB_GENERAL) {
1770
+ $this->general["showPluginPoweredByLink"] = 1;
1771
+ } else if ($tab === WpdiscuzCore::TAB_LABELS) {
1772
+ $blogRoles = get_editable_roles();
1773
+ $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1774
+ $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1775
+ $this->labels["blogRoleLabels"]["post_author"] = 1;
1776
+ $this->labels["blogRoleLabels"]["guest"] = 0;
1777
+ foreach ($blogRoles as $roleName => $roleInfo) {
1778
+ $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1779
+ $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1780
+ }
1781
+ }
1782
+ $this->updateOptions();
1783
+ }
1784
+ do_action("wpdiscuz_reset_options", $tab);
1785
+ do_action("wpdiscuz_reset_comments_cache");
1786
+ do_action("wpdiscuz_reset_users_cache");
1787
 
1788
+ exit(wp_safe_redirect($redirect_to));
1789
+ }
 
 
 
 
 
1790
 
1791
+ public function mainOptionsForm() {
1792
+ if (isset($_POST["wc_submit_options"])) {
1793
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Settings updated", "wpdiscuz"), "updated");
1794
+ }
1795
+ include_once WPDISCUZ_DIR_PATH . "/options/html-options.php";
1796
+ }
1797
 
1798
+ public function phrasesOptionsForm() {
1799
+ if (isset($_POST["wc_submit_phrases"])) {
1800
+ add_settings_error("wpdiscuz", "phrases_updated", esc_html__("Phrases updated", "wpdiscuz"), "updated");
1801
+ }
1802
+ $this->initPhrasesOnLoad();
1803
+ include_once WPDISCUZ_DIR_PATH . "/options/html-phrases.php";
1804
+ }
1805
 
1806
+ public function tools() {
1807
+ if (current_user_can("manage_options")) {
1808
 
1809
+ $wpUploadsDir = wp_upload_dir();
1810
+ $wpdiscuzOptionsDir = $wpUploadsDir["basedir"] . self::OPTIONS_DIR;
1811
+ $wpdiscuzOptionsUrl = $wpUploadsDir["baseurl"] . self::OPTIONS_DIR;
1812
 
1813
+ if (isset($_POST["tools-action"])) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1814
 
1815
+ $action = $_POST["tools-action"];
 
 
1816
 
1817
+ if ($action === "export-options") {
1818
+ check_admin_referer("wc_tools_form", "wpd-options-export");
1819
+ wp_mkdir_p($wpdiscuzOptionsDir);
1820
+ $options = @maybe_unserialize(get_option(self::OPTION_SLUG_OPTIONS));
1821
+ if ($options) {
1822
+ $json = json_encode($options);
1823
+ if (file_put_contents($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt", $json)) {
1824
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options were backed up!", "wpdiscuz"), "updated");
1825
+ } else {
1826
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the options!", "wpdiscuz"), "error");
1827
+ }
1828
+ }
1829
+ } else if ($action === "import-options") {
1830
+ check_admin_referer("wc_tools_form", "wpd-options-import");
1831
+ $file = isset($_FILES["wpdiscuz-options-file"]) ? $_FILES["wpdiscuz-options-file"] : "";
1832
+ if ($file && is_array($file) && isset($file["tmp_name"])) {
1833
+ if ($data = file_get_contents($file["tmp_name"])) {
1834
+ $options = json_decode($data, true);
1835
+ if ($options && is_array($options)) {
1836
+ update_option(self::OPTION_SLUG_OPTIONS, $this->replaceOldOptions($options, false));
1837
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options Imported Successfully!", "wpdiscuz"), "updated");
1838
+ } else {
1839
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1840
+ }
1841
+ } else {
1842
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1843
+ }
1844
+ } else {
1845
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1846
+ }
1847
+ } else if ($action === "export-phrases") {
1848
+ check_admin_referer("wc_tools_form", "wpd-phrases-export");
1849
+ wp_mkdir_p($wpdiscuzOptionsDir);
1850
+ $phrases = $this->dbManager->getPhrases();
1851
+ if ($phrases) {
1852
+ $json = json_encode($phrases);
1853
+ if (file_put_contents($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt", $json)) {
1854
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases were backed up!", "wpdiscuz"), "updated");
1855
+ } else {
1856
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the phrases!", "wpdiscuz"), "error");
1857
+ }
1858
+ }
1859
+ } else if ($action === "import-phrases") {
1860
+ check_admin_referer("wc_tools_form", "wpd-phrases-import");
1861
+ $file = isset($_FILES["wpdiscuz-phrases-file"]) ? $_FILES["wpdiscuz-phrases-file"] : "";
1862
+ if ($file && is_array($file) && isset($file["tmp_name"])) {
1863
+ if ($data = file_get_contents($file["tmp_name"])) {
1864
+ $phrases = json_decode($data, true);
1865
+ if ($phrases && is_array($phrases)) {
1866
+ $this->dbManager->updatePhrases($phrases);
1867
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases Imported Successfully!", "wpdiscuz"), "updated");
1868
+ } else {
1869
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1870
+ }
1871
+ } else {
1872
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1873
+ }
1874
+ } else {
1875
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1876
+ }
1877
+ }
1878
+ }
1879
+ } else {
1880
+ die(esc_html_e("Hacker?", "wpdiscuz"));
1881
+ }
1882
+ include_once WPDISCUZ_DIR_PATH . "/options/html-tools.php";
1883
+ }
1884
+
1885
+ public function addons() {
1886
+ include_once WPDISCUZ_DIR_PATH . "/options/html-addons.php";
1887
+ }
1888
+
1889
+ private function initAddons() {
1890
+ $this->addons = [
1891
+ "bundle" => [
1892
+ "version" => "7.0.0",
1893
+ "requires" => "7.0.0",
1894
+ "class" => "Bundle",
1895
+ "title" => "Addons Bundle",
1896
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/bundle/header.png"),
1897
+ "desc" => esc_html__("All 16 addons in one bundle. Save 90% and get Unlimited Site License with one year premium support.", "wpdiscuz"),
1898
+ "url" => "https://gvectors.com/product/wpdiscuz-addons-bundle/",
1899
+ ],
1900
+ "notifications" => [
1901
+ "version" => "1.0.0",
1902
  "requires" => "7.3.7",
1903
+ "class" => "WunDBManager",
1904
+ "title" => "User Notifications",
1905
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/notifications/header.png"),
1906
+ "desc" => esc_html__("Ads a real-time user notification system and web push notifications in your website.", "wpdiscuz"),
1907
+ "url" => "https://gvectors.com/product/wpdiscuz-user-notifications/",
1908
+ ],
1909
+ "buddypress" => [
1910
+ "version" => "1.0.2",
1911
+ "requires" => "7.2.0",
1912
+ "class" => "wpDiscuzBPIntegration",
1913
+ "title" => "BuddyPress Integration",
1914
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/buddypress/header.png"),
1915
+ "desc" => esc_html__("Integrates wpDiscuz with BuddyPress plugin. Profile Tabs, Notifications, Activities, etc...", "wpdiscuz"),
1916
+ "url" => "https://gvectors.com/product/wpdiscuz-buddypress-integration/",
1917
+ ],
1918
+ "voice" => [
1919
+ "version" => "1.0.0",
1920
+ "requires" => "7.2.0",
1921
+ "class" => "wpDiscuzAudioComment",
1922
+ "title" => "Voice Commenting",
1923
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/voice/header.png"),
1924
+ "desc" => esc_html__("Allows to discuss with your voice in the comment section. Adds a microphone button to the comment form.", "wpdiscuz"),
1925
+ "url" => "https://gvectors.com/product/wpdiscuz-voice-commenting/",
1926
+ ],
1927
+ "tenor" => [
1928
+ "version" => "1.0.4",
1929
+ "requires" => "7.2.0",
1930
+ "class" => "wpDiscuzTenorIntegration",
1931
+ "title" => "Tenor GIFs Integration",
1932
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/tenor/header.png"),
1933
+ "desc" => esc_html__("Adds Tenor [GIF] button and opens popup where you can search for gifs and insert them in comment content.", "wpdiscuz"),
1934
+ "url" => "https://gvectors.com/product/wpdiscuz-tenor-integration/",
1935
+ ],
1936
+ "giphy" => [
1937
+ "version" => "1.0.0",
1938
+ "requires" => "7.2.0",
1939
+ "class" => "wpDiscuzGiphyIntegration",
1940
+ "title" => "GIPHY Integration",
1941
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/giphy/header.png"),
1942
+ "desc" => esc_html__("Adds Giphy [GIF] button and opens popup where you can search for gifs and insert them in comment content.", "wpdiscuz"),
1943
+ "url" => "https://gvectors.com/product/wpdiscuz-giphy-integration/",
1944
+ ],
1945
+ "uploader" => [
1946
+ "version" => "7.0.0",
1947
+ "requires" => "7.0.0",
1948
+ "class" => "WpdiscuzMediaUploader",
1949
+ "title" => "Media Uploader",
1950
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
1951
+ "desc" => esc_html__("Extended comment attachment system. Allows to upload images, videos, audios and other file types.", "wpdiscuz"),
1952
+ "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/",
1953
+ ],
1954
+ "embeds" => [
1955
+ "version" => "1.0.0",
1956
+ "requires" => "7.0.0",
1957
+ "class" => "WpdiscuzEmbeds",
1958
+ "title" => "Embeds",
1959
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/embeds/header.png"),
1960
+ "desc" => esc_html__("Allows to embed lots of video, social network, audio and photo content providers URLs in comment content.", "wpdiscuz"),
1961
+ "url" => "https://gvectors.com/product/wpdiscuz-embeds/",
1962
+ ],
1963
+ "syntax" => [
1964
+ "version" => "1.0.0",
1965
+ "requires" => "7.0.0",
1966
+ "class" => "wpDiscuzSyntaxHighlighter",
1967
+ "title" => "Syntax Highlighter",
1968
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/syntax/header.png"),
1969
+ "desc" => esc_html__("Syntax highlighting for comments, automatic language detection and multi-language code highlighting.", "wpdiscuz"),
1970
+ "url" => "https://gvectors.com/product/wpdiscuz-syntax-highlighter/",
1971
+ ],
1972
+ "frontend-moderation" => [
1973
+ "version" => "7.0.0",
1974
+ "requires" => "7.0.0",
1975
+ "class" => "wpDiscuzFrontEndModeration",
1976
+ "title" => "Front-end Moderation",
1977
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
1978
+ "desc" => esc_html__("All in one powerful yet simple admin toolkit to moderate comments on front-end.", "wpdiscuz"),
1979
+ "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/",
1980
+ ],
1981
+ "emoticons" => [
1982
+ "version" => "7.0.0",
1983
+ "requires" => "7.0.0",
1984
+ "class" => "wpDiscuzSmile",
1985
+ "title" => "Emoticons",
1986
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
1987
+ "desc" => esc_html__("Brings an ocean of emotions to your comments. It comes with an awesome smile package.", "wpdiscuz"),
1988
+ "url" => "https://gvectors.com/product/wpdiscuz-emoticons/",
1989
+ ],
1990
+ "recaptcha" => [
1991
+ "version" => "7.0.0",
1992
+ "requires" => "7.0.0",
1993
+ "class" => "WpdiscuzRecaptcha",
1994
+ "title" => "Invisible reCAPTCHA v3",
1995
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
1996
+ "desc" => esc_html__("Adds Invisible reCAPTCHA on all comment forms. Stops spam and bot comments with reCAPTCHA version 3", "wpdiscuz"),
1997
+ "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/",
1998
+ ],
1999
+ "author-info" => [
2000
+ "version" => "7.0.0",
2001
+ "requires" => "7.0.0",
2002
+ "class" => "WpdiscuzCommentAuthorInfo",
2003
+ "title" => "Comment Author Info",
2004
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/author-info/header.png"),
2005
+ "desc" => esc_html__("Extended information about comment author with Profile, Activity, Votes and Subscriptions Tabs on pop-up window.", "wpdiscuz"),
2006
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-author-info/",
2007
+ ],
2008
+ "report-flagging" => [
2009
+ "version" => "7.0.0",
2010
+ "requires" => "7.0.0",
2011
+ "class" => "wpDiscuzFlagComment",
2012
+ "title" => "Report and Flagging",
2013
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
2014
+ "desc" => esc_html__("Comment reporting tools. Auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
2015
+ "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/",
2016
  ],
2017
+ "online-users" => [
2018
+ "version" => "7.0.0",
2019
+ "requires" => "7.0.0",
2020
+ "class" => "WpdiscuzOnlineUsers",
2021
+ "title" => "Online Users",
2022
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/online-users/header.png"),
2023
+ "desc" => esc_html__("Real-time online user checking, pop-up notification of new online users and online/offline badges.", "wpdiscuz"),
2024
+ "url" => "https://gvectors.com/product/wpdiscuz-online-users/",
2025
+ ],
2026
+ "private" => [
2027
+ "version" => "7.0.0",
2028
+ "requires" => "7.0.0",
2029
+ "class" => "wpDiscuzPrivateComment",
2030
+ "title" => "Private Comments",
2031
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/private/header.png"),
2032
+ "desc" => esc_html__("Allows to create private comment threads. Rich management options in dashboard by user roles.", "wpdiscuz"),
2033
+ "url" => "https://gvectors.com/product/wpdiscuz-private-comments/",
2034
+ ],
2035
+ "subscriptions" => [
2036
+ "version" => "7.0.0",
2037
+ "requires" => "7.0.0",
2038
+ "class" => "wpdSubscribeManager",
2039
+ "title" => "Subscription Manager",
2040
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/subscriptions/header.png"),
2041
+ "desc" => esc_html__("Total control over comment subscriptions. Full list, monitor, manage, filter, unsubscribe, confirm...", "wpdiscuz"),
2042
+ "url" => "https://gvectors.com/product/wpdiscuz-subscribe-manager/",
2043
+ ],
2044
+ "ads-manager" => [
2045
+ "version" => "7.0.0",
2046
+ "requires" => "7.0.0",
2047
+ "class" => "WpdiscuzAdsManager",
2048
+ "title" => "Ads Manager",
2049
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
2050
+ "desc" => esc_html__("A full-fledged tool-kit for advertising in comment section of your website. Separate banner and ad managment.", "wpdiscuz"),
2051
+ "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/",
2052
+ ],
2053
+ "user-mention" => [
2054
+ "version" => "7.0.0",
2055
+ "requires" => "7.0.0",
2056
+ "class" => "WpdiscuzUCM",
2057
+ "title" => "User &amp; Comment Mentioning",
2058
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
2059
+ "desc" => esc_html__("Allows to mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
2060
+ "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/",
2061
+ ],
2062
+ "likers" => [
2063
+ "version" => "7.0.0",
2064
+ "requires" => "7.0.0",
2065
+ "class" => "WpdiscuzVoters",
2066
+ "title" => "Advanced Likers",
2067
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
2068
+ "desc" => esc_html__("See comment likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
2069
+ "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/",
2070
+ ],
2071
+ "search" => [
2072
+ "version" => "7.0.0",
2073
+ "requires" => "7.0.0",
2074
+ "class" => "wpDiscuzCommentSearch",
2075
+ "title" => "Comment Search",
2076
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
2077
+ "desc" => esc_html__("AJAX powered front-end comment search. It starts searching while you type search words. ", "wpdiscuz"),
2078
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-search/",
2079
+ ],
2080
+ "widgets" => [
2081
+ "version" => "7.0.0",
2082
+ "requires" => "7.0.0",
2083
+ "class" => "wpDiscuzWidgets",
2084
+ "title" => "wpDiscuz Widgets",
2085
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
2086
+ "desc" => esc_html__("Most voted comments, Active comment threads, Most commented posts, Active comment authors", "wpdiscuz"),
2087
+ "url" => "https://gvectors.com/product/wpdiscuz-widgets/",
2088
+ ],
2089
+ "mycred" => [
2090
+ "version" => "7.0.0",
2091
+ "requires" => "7.0.0",
2092
+ "class" => "myCRED_Hook_wpDiscuz_Vote",
2093
+ "title" => "myCRED Integration",
2094
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/mycred/header.png"),
2095
+ "desc" => esc_html__("Integrates myCRED Badges and Ranks. Converts wpDiscuz comment votes/likes to myCRED points. ", "wpdiscuz"),
2096
+ "url" => "https://gvectors.com/product/wpdiscuz-mycred/",
2097
+ ],
2098
+ ];
2099
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2100
 
2101
+ private function initTips() {
2102
+ $this->tips = [
2103
+ "custom-form" => [
2104
+ "title" => esc_html__("Custom Comment Forms", "wpdiscuz"),
2105
+ "text" => esc_html__("You can create custom comment forms with wpDiscuz. wpDiscuz 4 comes with custom comment forms and fields. You can create custom comment forms for each post type, each form can beceated with different form fields, for eaxample: text, dropdown, rating, checkboxes, etc...", "wpdiscuz"),
2106
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/tips/custom-form.png"),
2107
+ "url" => admin_url() . "edit.php?post_type=wpdiscuz_form",
2108
+ ],
2109
+ "emoticons" => [
2110
+ "title" => esc_html__("Emoticons", "wpdiscuz"),
2111
+ "text" => esc_html__("You can add more emotions to your comments using wpDiscuz Emoticons addon.", "wpdiscuz"),
2112
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
2113
+ "url" => "https://gvectors.com/product/wpdiscuz-emoticons/",
2114
+ ],
2115
+ "ads-manager" => [
2116
+ "title" => esc_html__("Ads Manager", "wpdiscuz"),
2117
+ "text" => esc_html__("Increase your income using ad banners. Comment area is the most active sections for advertising. wpDiscuz Ads Manager addon is designed to help you add banners and control ads in this section.", "wpdiscuz"),
2118
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
2119
+ "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/",
2120
+ ],
2121
+ "user-mention" => [
2122
+ "title" => esc_html__("User and Comment Mentioning", "wpdiscuz"),
2123
+ "text" => esc_html__("Using wpDiscuz User &amp; Comment Mentioning addon you can allow commenters mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
2124
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
2125
+ "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/",
2126
+ ],
2127
+ "likers" => [
2128
+ "title" => esc_html__("Advanced Likers", "wpdiscuz"),
2129
+ "text" => esc_html__("wpDiscuz Advanced Likers addon displays likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
2130
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
2131
+ "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/",
2132
+ ],
2133
+ "report-flagging" => [
2134
+ "title" => esc_html__("Report and Flagging", "wpdiscuz"),
2135
+ "text" => esc_html__("Let your commenters help you to determine and remove spam comments. wpDiscuz Report and Flagging addon comes with comment reporting tools. Automaticaly auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
2136
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
2137
+ "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/",
2138
+ ],
2139
+ "translate" => [
2140
+ "title" => esc_html__("Comment Translate", "wpdiscuz"),
2141
+ "text" => esc_html__("In most cases the big part of your visitors are not a native speakers of your language. Make your comments comprehensible for all visitors using wpDiscuz Comment Translation addon. It adds smart and intuitive AJAX 'Translate' button with 60 language translation options. Uses free translation API.", "wpdiscuz"),
2142
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"),
2143
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/",
2144
+ ],
2145
+ "search" => [
2146
+ "title" => esc_html__("Comment Search", "wpdiscuz"),
2147
+ "text" => esc_html__("You can let website visitor search in comments. It's always more attractive to find a comment about something that interest you. Using wpDiscuz Comment Search addon you'll get a nice, AJAX powered front-end comment search form above comment list.", "wpdiscuz"),
2148
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
2149
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-search/",
2150
+ ],
2151
+ "widgets" => [
2152
+ "title" => esc_html__("wpDiscuz Widgets", "wpdiscuz"),
2153
+ "text" => esc_html__("More Comment Widgets! Most voted comments, Active comment threads, Most commented posts, Active comment authors widgets are available in wpDiscuz Widgets Addon", "wpdiscuz"),
2154
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
2155
+ "url" => "https://gvectors.com/product/wpdiscuz-widgets/",
2156
+ ],
2157
+ "frontend-moderation" => [
2158
+ "title" => esc_html__("Front-end Moderation", "wpdiscuz"),
2159
+ "text" => esc_html__("You can moderate comments on front-end using all in one powerful yet simple wpDiscuz Frontend Moderation addon.", "wpdiscuz"),
2160
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
2161
+ "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/",
2162
+ ],
2163
+ "uploader" => [
2164
+ "title" => esc_html__("Media Uploader", "wpdiscuz"),
2165
+ "text" => esc_html__("You can let website visitors attach images and files to comments and embed video/audio content using wpDiscuz Media Uploader addon.", "wpdiscuz"),
2166
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
2167
+ "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/",
2168
+ ],
2169
+ "recaptcha" => [
2170
+ "title" => esc_html__("Google ReCaptcha", "wpdiscuz"),
2171
+ "text" => esc_html__("Advanced spam protection with wpDiscuz Google reCAPTCHA addon. This addon adds No-CAPTCHA reCAPTCHA on all comment forms. Stops spam and bot comments.", "wpdiscuz"),
2172
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
2173
+ "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/",
2174
+ ],
2175
+ ];
2176
+ }
2177
 
2178
+ private function addonNote() {
2179
+ if ((!empty($_GET["page"]) && in_array($_GET["page"], [
2180
+ self::PAGE_WPDISCUZ,
2181
+ self::PAGE_SETTINGS,
2182
+ self::PAGE_PHRASES,
2183
+ self::PAGE_TOOLS,
2184
+ self::PAGE_ADDONS,
2185
+ ])) || strpos($_SERVER["REQUEST_URI"], "edit.php?post_type=wpdiscuz_form") !== false) {
2186
+ $lastHash = get_option("wpdiscuz-addon-note-dismissed");
2187
+ $lastHashArray = explode(",", $lastHash);
2188
+ $currentHash = "BuddyPress Integration, Tenor GIFs Integration, Voice Commenting, GIPHY Integration, User Notifications";
2189
+ if ($lastHash !== $currentHash && (!in_array("BuddyPress Integration", $lastHashArray) || !in_array("Tenor GIFs Integration", $lastHashArray) || !in_array("Voice Commenting", $lastHashArray) || !in_array("GIPHY Integration", $lastHashArray) || !in_array("User Notifications", $lastHashArray))
2190
+ ) {
2191
+ ?>
 
 
 
 
 
2192
  <div class="updated notice wpdiscuz_addon_note is-dismissible" style="margin-top:10px;">
2193
  <p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; clear: both;">
2194
+ <?php esc_html_e("New wpDiscuz addon!"); ?>
2195
  </p>
2196
  <div style="font-size:14px;">
2197
+ <!-- --><?php //if(!in_array("BuddyPress Integration", $lastHashArray)): ?>
2198
+ <!-- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">-->
2199
+ <!-- <img src="--><?php //echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/buddypress/header.png"); ?><!--" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>-->
2200
+ <!-- <a href="https://gvectors.com/product/wpdiscuz-buddypress-integration/" target="_blank" style="color:#444; text-decoration:none;" title="--><?php //esc_attr_e("Go to the addon page", "wpdiscuz"); ?><!--">wpDiscuz - BuddyPress Integration <br><span style="margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">This addon integrates wpDiscuz with BuddyPress plugin. Creates &laquoDiscussion&raquo; tab in the users profile page, intgartes notifications, activities, and more...</span></a>-->
2201
+ <!-- </div>-->
2202
+ <!-- --><?php //endif; ?>
2203
+ <?php if (!in_array("User Notifications", $lastHashArray)): ?>
2204
  <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">
2205
  <img src="<?php echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/notifications/header.png"); ?>" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>
2206
  <a href="https://gvectors.com/product/wpdiscuz-user-notifications/" target="_blank" style="color:#444; text-decoration:none;" title="<?php esc_attr_e("Go to the addon page", "wpdiscuz"); ?>">wpDiscuz - User Notifications <br><span style="width: 60%; margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">Adds a real-time user notification system to your site, so users can receive updates and notifications directly on your website as they happen (when someone likes your comment, rates your post, mentions you, replies to your comment).</span></a>
2207
  </div>
2208
+ <?php endif; ?>
2209
+ <!-- --><?php //if(!in_array("GIPHY Integration", $lastHashArray)): ?>
2210
+ <!-- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">-->
2211
+ <!-- <img src="--><?php //echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/giphy/header.png"); ?><!--" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>-->
2212
+ <!-- <a href="https://gvectors.com/product/wpdiscuz-giphy-integration/" target="_blank" style="color:#444; text-decoration:none;" title="--><?php //esc_attr_e("Go to the addon page", "wpdiscuz"); ?><!--">wpDiscuz - GIPHY Integration <br><span style="margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">This adds GIPHY [GIF] button on the toolbar of comment editor. Clicking this will open a new popup where you can search for your favorite gifs and insert them in your comment content.</span></a>-->
2213
+ <!-- </div>-->
2214
+ <!-- --><?php //endif; ?>
2215
+ <!-- --><?php //if(!in_array("Tenor GIFs Integration", $lastHashArray)): ?>
2216
+ <!-- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">-->
2217
+ <!-- <img src="--><?php //echo plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/tenor/header.png"); ?><!--" style="height:50px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none; float: left;"/>-->
2218
+ <!-- <a href="https://gvectors.com/product/wpdiscuz-tenor-integration/" target="_blank" style="color:#444; text-decoration:none;" title="--><?php //esc_attr_e("Go to the addon page", "wpdiscuz"); ?><!--">wpDiscuz - Tenor GIFs Integration <br><span style="margin: 0; font-size: 12px; line-height: 15px; display: block; padding-top: 5px;">This adds Tenor [GIF] button on the toolbar of comment editor. Clicking this will open a new popup where you can search for your favorite gifs and insert them in your comment content.</span></a>-->
2219
+ <!-- </div>-->
2220
+ <!-- --><?php //endif; ?>
2221
  <div style="clear:both;"></div>
2222
  </div>
2223
  <p>&nbsp;&nbsp;&nbsp;<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_ADDONS)); ?>"><?php esc_html_e("Go to wpDiscuz Addons subMenu"); ?> &raquo;</a></p>
2224
  </div>
2225
+ <?php
2226
+ }
2227
+ }
2228
+ }
2229
 
2230
+ public function dismissAddonNote() {
2231
+ $hash = $this->addonHash();
2232
+ update_option("wpdiscuz-addon-note-dismissed", $hash);
2233
+ exit();
2234
+ }
2235
 
2236
+ public function dismissTipNote() {
2237
+ $hash = $this->tipHash();
2238
+ update_option("wpdiscuz-tip-note-dismissed", $hash);
2239
+ exit();
2240
+ }
2241
 
2242
+ public function dismissAddonNoteOnPage() {
2243
+ $hash = $this->addonHash();
2244
+ update_option("wpdiscuz-addon-note-dismissed", $hash);
2245
+ }
2246
 
2247
+ public function addonHash() {
2248
+ $viewed = "BuddyPress Integration, Tenor GIFs Integration, Voice Commenting, GIPHY Integration, User Notifications";
2249
  // foreach ($this->addons as $key => $addon) {
2250
  // $viewed .= $addon["title"] . ",";
2251
  // }
2252
+ $hash = $viewed;
2253
+ return $hash;
2254
+ }
2255
 
2256
+ public function tipHash() {
2257
  $viewed = "BuddyPress Integration, Tenor GIFs Integration, Voice Commenting, GIPHY Integration, wpDiscuz - User Notifications";
2258
  // foreach ($this->tips as $key => $tip) {
2259
  // $viewed .= $tip["title"] . ",";
2260
  // }
2261
+ $hash = $viewed;
2262
+ return $hash;
2263
+ }
2264
 
2265
+ public function tipDisplayed() {
2266
+ $tipTtile = substr(strip_tags($_GET["tip"]), 0, 100);
2267
+ $lastHash = get_option("wpdiscuz-tip-note-dismissed");
2268
+ if ($lastHash) {
2269
+ $lastHashArray = explode(",", $lastHash);
2270
+ } else {
2271
+ $lastHashArray = [];
2272
+ }
2273
+ $lastHashArray[] = $tipTtile;
2274
+ $hash = implode(",", $lastHashArray);
2275
+ return $hash;
2276
+ }
2277
 
2278
+ public function refreshAddonPage() {
2279
+ $lastHash = get_option("wpdiscuz-addon-note-dismissed");
2280
+ $currentHash = $this->addonHash();
2281
+ if ($lastHash !== $currentHash) {
2282
+ ?>
2283
+ <script language="javascript">jQuery(document).ready(function () {
2284
+ location.reload();
2285
+ });</script>
2286
+ <?php
2287
+ }
2288
+ }
2289
 
2290
+ public function adminNotices() {
2291
+ if (current_user_can("manage_options")) {
2292
  $this->addonNote(); //To-do Menu [count] notification
2293
+ $this->regenerateMessage();
2294
+ $this->addonActivationMessages();
2295
+ }
2296
+ }
2297
 
2298
+ private function regenerateMessage() {
2299
+ global $pagenow;
2300
+ $notWpdiscuzSettingsPage = $pagenow !== "admin.php" || ($pagenow === "admin.php" && (!isset($_GET["page"]) || (isset($_GET["page"]) && $_GET["page"] !== self::PAGE_SETTINGS)));
2301
+ $wizardCompleted = intval(get_option(self::OPTION_SLUG_WIZARD_COMPLETED));
2302
+ if (!$wizardCompleted && $notWpdiscuzSettingsPage) {
2303
+ ?>
2304
  <div class='notice notice-warning'>
2305
  <p style="font-size: 14px; font-weight: 600;">
2306
+ <?php esc_html_e("Please complete required steps to start using wpDiscuz 7", "wpdiscuz"); ?> &nbsp;
2307
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_wizard=1")); ?>"
2308
  class="button button-primary"><?php intval(get_option(self::OPTION_SLUG_WIZARD_AFTER_UPDATE)) ? esc_html_e("Go to Update Wizard &raquo;", "wpdiscuz") : esc_html_e("Go to Installation Wizard &raquo;", "wpdiscuz"); ?></a>
2309
  </p>
2310
  </div>
2311
+ <?php
2312
+ }
2313
+ if ($wizardCompleted && $notWpdiscuzSettingsPage && class_exists("Jetpack") && Jetpack::is_module_active("comments")) {
2314
+ ?>
2315
  <div class='notice notice-warning'>
2316
  <p>
2317
+ <?php esc_html_e("Jetpack Comments are active.", "wpdiscuz"); ?>
2318
  </p>
2319
  </div>
2320
+ <?php
2321
+ }
2322
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_REG_MESSAGE))) {
2323
+ ?>
2324
  <div class='notice notice-warning'>
2325
  <p>
2326
+ <?php esc_html_e("Comment votes meta data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2327
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2328
  class="button button-primary"><?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?></a>
2329
  </p>
2330
  </div>
2331
+ <?php
2332
+ }
2333
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_CLOSED_REG_MESSAGE))) {
2334
+ ?>
2335
  <div class='notice notice-warning'>
2336
  <p>
2337
+ <?php esc_html_e("Closed Comments data need be regenerated", "wpdiscuz"); ?>&nbsp;
2338
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2339
  class="button button-primary"><?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?></a>
2340
  </p>
2341
  </div>
2342
+ <?php
2343
+ }
2344
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_DATA_REG_MESSAGE))) {
2345
+ ?>
2346
  <div class='notice notice-warning'>
2347
  <p>
2348
+ <?php esc_html_e("Comments votes data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2349
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2350
  class="button button-primary"><?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?></a>
2351
  </p>
2352
  </div>
2353
+ <?php
2354
+ }
2355
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_SYNC_COMMENTERS_MESSAGE))) {
2356
+ ?>
2357
  <div class='notice notice-warning'>
2358
  <p>
2359
+ <?php esc_html_e("Please synchronize comment data for the best performance and fastest experience", "wpdiscuz"); ?>
2360
  &nbsp;
2361
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2362
  class="button button-primary"><?php esc_html_e("Synchronize Commenters Data", "wpdiscuz"); ?></a>
2363
  </p>
2364
  </div>
2365
+ <?php
2366
+ }
2367
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_RATING_REBUIL_MSG))) {
2368
+ ?>
2369
  <div class='notice notice-warning'>
2370
  <p>
2371
+ <?php esc_html_e("Please rebuild ratings for the best performance and fastest experience", "wpdiscuz"); ?>
2372
  &nbsp;
2373
  <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-ratings")); ?>"
2374
  class="button button-primary"><?php esc_html_e("Rebuild Ratings", "wpdiscuz"); ?></a>
2375
  </p>
2376
  </div>
2377
+ <?php
2378
+ }
2379
+ }
2380
 
2381
+ public function getDefaultFileTypes() {
2382
+ $types = [
2383
+ "jpg" => "image/jpeg",
2384
+ "jpeg" => "image/jpeg",
2385
+ "jpe" => "image/jpeg",
2386
+ "gif" => "image/gif",
2387
+ "png" => "image/png",
2388
+ "bmp" => "image/bmp",
2389
+ "tiff" => "image/tiff",
2390
+ "tif" => "image/tiff",
2391
+ "ico" => "image/x-icon",
2392
+ ];
2393
+ $types = apply_filters("wpdiscuz_mu_file_types", $types);
2394
+ return $types;
2395
+ }
2396
 
2397
+ private function getSizeInBytes($size) {
2398
+ $value = trim($size);
2399
+ if (is_numeric($value)) {
2400
+ return $value;
2401
+ }
2402
 
2403
+ $lastChar = strtolower($value[strlen($value) - 1]);
2404
+ $value = substr($value, 0, - 1);
2405
 
2406
+ switch ($lastChar) {
2407
+ case 'g':
2408
+ $value *= 1024 * 1024 * 1024;
2409
+ break;
2410
+ case 'm':
2411
+ $value *= 1024 * 1024;
2412
+ break;
2413
+ case 'k':
2414
+ $value *= 1024;
2415
+ break;
2416
+ }
2417
+ return intval($value);
2418
+ }
2419
 
2420
+ public function getDefaultImageSizes() {
2421
+ return ["thumbnail", "medium", "medium_large", "large"];
2422
+ }
2423
 
2424
+ public function dashboard() {
2425
+ include_once WPDISCUZ_DIR_PATH . "/options/html-dashboard.php";
2426
+ }
2427
 
2428
+ public function isShowLoginButtons() {
2429
+ return $this->social["enableFbLogin"] || $this->social["enableTwitterLogin"] || $this->social["enableGoogleLogin"] || $this->social["enableDisqusLogin"] || $this->social["enableWordpressLogin"] || $this->social["enableVkLogin"] || $this->social["enableOkLogin"] || $this->social["enableInstagramLogin"] || $this->social["enableLinkedinLogin"] || $this->social["enableYandexLogin"] || $this->social["enableMailruLogin"] || $this->social["enableWeiboLogin"] || $this->social["enableWechatLogin"] || $this->social["enableQQLogin"] || $this->social["enableBaiduLogin"];
2430
+ }
2431
 
2432
+ public function showEditorToolbar() {
2433
+ return $this->form["boldButton"] || $this->form["italicButton"] || $this->form["underlineButton"] || $this->form["strikeButton"] || $this->form["olButton"] || $this->form["ulButton"] || $this->form["blockquoteButton"] || $this->form["codeblockButton"] || $this->form["linkButton"] || $this->form["sourcecodeButton"] || $this->form["spoilerButton"];
2434
+ }
2435
 
2436
+ public function replaceOldOptions($oldOptions, $update = true) {
2437
+ $newOptions = $this->getDefaultOptions();
2438
+ if (!$update && isset($oldOptions[self::TAB_GENERAL])) {
2439
+ foreach ($newOptions as $key => $value) {
2440
+ foreach ($value as $k => $val) {
2441
+ if (isset($oldOptions[$key][$k])) {
2442
+ $newOptions[$key][$k] = $oldOptions[$key][$k];
2443
+ }
2444
+ }
2445
+ }
2446
+ return $newOptions;
2447
+ }
2448
+ if (isset($oldOptions["enableDropAnimation"])) {
2449
+ $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions["enableDropAnimation"];
2450
+ } else if (isset($oldOptions[self::TAB_FORM]["enableDropAnimation"])) {
2451
+ $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions[self::TAB_FORM]["enableDropAnimation"];
2452
+ }
2453
+ if (isset($oldOptions["commenterNameMinLength"])) {
2454
+ $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions["commenterNameMinLength"];
2455
+ } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMinLength"])) {
2456
+ $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions[self::TAB_FORM]["commenterNameMinLength"];
2457
+ }
2458
+ if (isset($oldOptions["commenterNameMaxLength"])) {
2459
+ $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions["commenterNameMaxLength"];
2460
+ } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMaxLength"])) {
2461
+ $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions[self::TAB_FORM]["commenterNameMaxLength"];
2462
+ }
2463
+ if (isset($oldOptions["storeCommenterData"])) {
2464
+ $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions["storeCommenterData"];
2465
+ } else if (isset($oldOptions[self::TAB_FORM]["storeCommenterData"])) {
2466
+ $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions[self::TAB_FORM]["storeCommenterData"];
2467
+ }
2468
+ if (isset($oldOptions["wc_show_hide_loggedin_username"])) {
2469
+ $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions["wc_show_hide_loggedin_username"];
2470
+ } else if (isset($oldOptions[self::TAB_LOGIN]["showLoggedInUsername"])) {
2471
+ $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions[self::TAB_LOGIN]["showLoggedInUsername"];
2472
+ }
2473
+ if (isset($oldOptions["hideLoginLinkForGuests"])) {
2474
+ $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = (int) !$oldOptions["hideLoginLinkForGuests"];
2475
+ } else if (isset($oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"])) {
2476
+ $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = $oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
2477
+ }
2478
+ if (isset($oldOptions["hideUserSettingsButton"])) {
2479
+ $settingsButton = (int) !$oldOptions["hideUserSettingsButton"];
2480
+ $newOptions[self::TAB_LOGIN]["showActivityTab"] = $settingsButton;
2481
+ $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $settingsButton;
2482
+ $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $settingsButton;
2483
+ } else {
2484
+ if (isset($oldOptions[self::TAB_LOGIN]["showActivityTab"])) {
2485
+ $newOptions[self::TAB_LOGIN]["showActivityTab"] = $oldOptions[self::TAB_LOGIN]["showActivityTab"];
2486
+ }
2487
+ if (isset($oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"])) {
2488
+ $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
2489
+ }
2490
+ if (isset($oldOptions[self::TAB_LOGIN]["showFollowsTab"])) {
2491
+ $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $oldOptions[self::TAB_LOGIN]["showFollowsTab"];
2492
+ }
2493
+ }
2494
+ if (isset($oldOptions["disableProfileURLs"])) {
2495
+ $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = (int) !$oldOptions["disableProfileURLs"];
2496
+ } else if (isset($oldOptions[self::TAB_LOGIN]["enableProfileURLs"])) {
2497
+ $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = $oldOptions[self::TAB_LOGIN]["enableProfileURLs"];
2498
+ }
2499
+ if (isset($oldOptions["isUserByEmail"])) {
2500
+ $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions["isUserByEmail"];
2501
+ } else if (isset($oldOptions[self::TAB_LOGIN]["isUserByEmail"])) {
2502
+ $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions[self::TAB_LOGIN]["isUserByEmail"];
2503
+ }
2504
+ if (isset($oldOptions["socialLoginAgreementCheckbox"])) {
2505
+ $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions["socialLoginAgreementCheckbox"];
2506
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"])) {
2507
+ $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
2508
+ }
2509
+ if (isset($oldOptions["socialLoginInSecondaryForm"])) {
2510
+ $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions["socialLoginInSecondaryForm"];
2511
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"])) {
2512
+ $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
2513
+ }
2514
+ if (isset($oldOptions["enableFbLogin"])) {
2515
+ $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions["enableFbLogin"];
2516
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbLogin"])) {
2517
+ $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions[self::TAB_SOCIAL]["enableFbLogin"];
2518
+ }
2519
+ if (isset($oldOptions["enableFbShare"])) {
2520
+ $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions["enableFbShare"];
2521
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbShare"])) {
2522
+ $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions[self::TAB_SOCIAL]["enableFbShare"];
2523
+ }
2524
+ if (isset($oldOptions["fbAppID"])) {
2525
+ $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions["fbAppID"];
2526
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppID"])) {
2527
+ $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions[self::TAB_SOCIAL]["fbAppID"];
2528
+ }
2529
+ if (isset($oldOptions["fbAppSecret"])) {
2530
+ $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions["fbAppSecret"];
2531
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppSecret"])) {
2532
+ $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions[self::TAB_SOCIAL]["fbAppSecret"];
2533
+ }
2534
+ if (isset($oldOptions["fbUseOAuth2"])) {
2535
+ $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions["fbUseOAuth2"];
2536
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"])) {
2537
+ $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
2538
+ }
2539
+ if (isset($oldOptions["enableTwitterLogin"])) {
2540
+ $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions["enableTwitterLogin"];
2541
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"])) {
2542
+ $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
2543
+ }
2544
+ if (isset($oldOptions["enableTwitterShare"])) {
2545
+ $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions["enableTwitterShare"];
2546
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterShare"])) {
2547
+ $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterShare"];
2548
+ }
2549
+ if (isset($oldOptions["twitterAppID"])) {
2550
+ $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions["twitterAppID"];
2551
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppID"])) {
2552
+ $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions[self::TAB_SOCIAL]["twitterAppID"];
2553
+ }
2554
+ if (isset($oldOptions["twitterAppSecret"])) {
2555
+ $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions["twitterAppSecret"];
2556
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppSecret"])) {
2557
+ $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions[self::TAB_SOCIAL]["twitterAppSecret"];
2558
+ }
2559
+ if (isset($oldOptions["enableGoogleLogin"])) {
2560
+ $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions["enableGoogleLogin"];
2561
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"])) {
2562
+ $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
2563
+ }
2564
+ if (isset($oldOptions["enableVkLogin"])) {
2565
+ $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions["enableVkLogin"];
2566
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkLogin"])) {
2567
+ $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableVkLogin"];
2568
+ }
2569
+ if (isset($oldOptions["enableVkShare"])) {
2570
+ $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions["enableVkShare"];
2571
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkShare"])) {
2572
+ $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions[self::TAB_SOCIAL]["enableVkShare"];
2573
+ }
2574
+ if (isset($oldOptions["vkAppID"])) {
2575
+ $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions["vkAppID"];
2576
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppID"])) {
2577
+ $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions[self::TAB_SOCIAL]["vkAppID"];
2578
+ }
2579
+ if (isset($oldOptions["vkAppSecret"])) {
2580
+ $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions["vkAppSecret"];
2581
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppSecret"])) {
2582
+ $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions[self::TAB_SOCIAL]["vkAppSecret"];
2583
+ }
2584
+ if (isset($oldOptions["enableOkLogin"])) {
2585
+ $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions["enableOkLogin"];
2586
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkLogin"])) {
2587
+ $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableOkLogin"];
2588
+ }
2589
+ if (isset($oldOptions["enableOkShare"])) {
2590
+ $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions["enableOkShare"];
2591
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkShare"])) {
2592
+ $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions[self::TAB_SOCIAL]["enableOkShare"];
2593
+ }
2594
+ if (isset($oldOptions["okAppID"])) {
2595
+ $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions["okAppID"];
2596
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppID"])) {
2597
+ $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions[self::TAB_SOCIAL]["okAppID"];
2598
+ }
2599
+ if (isset($oldOptions["okAppKey"])) {
2600
+ $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions["okAppKey"];
2601
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppKey"])) {
2602
+ $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions[self::TAB_SOCIAL]["okAppKey"];
2603
+ }
2604
+ if (isset($oldOptions["okAppSecret"])) {
2605
+ $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions["okAppSecret"];
2606
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppSecret"])) {
2607
+ $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions[self::TAB_SOCIAL]["okAppSecret"];
2608
+ }
2609
+ if (isset($oldOptions["displayRatingOnPost"])) {
2610
+ $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions["displayRatingOnPost"];
2611
+ } else if (isset($oldOptions[self::TAB_RATING]["displayRatingOnPost"])) {
2612
+ $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions[self::TAB_RATING]["displayRatingOnPost"];
2613
+ }
2614
+ if (isset($oldOptions["ratingCssOnNoneSingular"])) {
2615
+ $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions["ratingCssOnNoneSingular"];
2616
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"])) {
2617
+ $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
2618
+ }
2619
+ if (isset($oldOptions["wc_comment_rating_hover_color"])) {
2620
+ $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions["wc_comment_rating_hover_color"];
2621
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingHoverColor"])) {
2622
+ $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions[self::TAB_RATING]["ratingHoverColor"];
2623
+ }
2624
+ if (isset($oldOptions["wc_comment_rating_inactiv_color"])) {
2625
+ $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions["wc_comment_rating_inactiv_color"];
2626
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingInactiveColor"])) {
2627
+ $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions[self::TAB_RATING]["ratingInactiveColor"];
2628
+ }
2629
+ if (isset($oldOptions["wc_comment_rating_activ_color"])) {
2630
+ $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions["wc_comment_rating_activ_color"];
2631
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingActiveColor"])) {
2632
+ $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions[self::TAB_RATING]["ratingActiveColor"];
2633
+ }
2634
+ if (isset($oldOptions["commentListLoadType"])) {
2635
+ $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions["commentListLoadType"];
2636
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"])) {
2637
+ $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
2638
+ }
2639
+ if (isset($oldOptions["isLoadOnlyParentComments"])) {
2640
+ $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions["isLoadOnlyParentComments"];
2641
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"])) {
2642
+ $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
2643
+ }
2644
+ if (isset($oldOptions["show_sorting_buttons"])) {
2645
+ $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions["show_sorting_buttons"];
2646
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"])) {
2647
+ $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
2648
+ }
2649
+ if (isset($oldOptions["mostVotedByDefault"])) {
2650
+ $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions["mostVotedByDefault"];
2651
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"])) {
2652
+ $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
2653
+ }
2654
+ if (isset($oldOptions["reverseChildren"])) {
2655
+ $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions["reverseChildren"];
2656
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"])) {
2657
+ $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
2658
+ }
2659
+ if (isset($oldOptions["enableLastVisitCookie"])) {
2660
+ $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions["enableLastVisitCookie"];
2661
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"])) {
2662
+ $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
2663
+ }
2664
+ if (isset($oldOptions["showHideCommentLink"])) {
2665
+ $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = (int) !$oldOptions["showHideCommentLink"];
2666
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"])) {
2667
+ $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"];
2668
+ }
2669
+ if (isset($oldOptions["hideCommentDate"])) {
2670
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = (int) !$oldOptions["hideCommentDate"];
2671
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"])) {
2672
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
2673
+ }
2674
+ if (isset($oldOptions["wc_voting_buttons_show_hide"])) {
2675
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = (int) !$oldOptions["wc_voting_buttons_show_hide"];
2676
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"])) {
2677
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
2678
+ }
2679
+ if (isset($oldOptions["votingButtonsIcon"])) {
2680
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions["votingButtonsIcon"];
2681
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"])) {
2682
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
2683
+ }
2684
+ if (isset($oldOptions["votingButtonsStyle"])) {
2685
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions["votingButtonsStyle"];
2686
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"])) {
2687
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
2688
+ }
2689
+ if (isset($oldOptions["wc_is_guest_can_vote"])) {
2690
+ $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions["wc_is_guest_can_vote"];
2691
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"])) {
2692
+ $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
2693
+ }
2694
+ if (isset($oldOptions["theme"])) {
2695
+ $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions["theme"];
2696
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["theme"])) {
2697
+ $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions[self::TAB_THREAD_STYLES]["theme"];
2698
+ }
2699
+ if (isset($oldOptions["wc_comment_username_color"])) {
2700
+ $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions["wc_comment_username_color"];
2701
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryColor"])) {
2702
+ $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryColor"];
2703
+ }
2704
+ if (isset($oldOptions["wc_new_loaded_comment_bg_color"])) {
2705
+ $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions["wc_new_loaded_comment_bg_color"];
2706
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"])) {
2707
+ $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
2708
+ }
2709
+ if (isset($oldOptions["wc_link_button_color"]["primary_button_color"])) {
2710
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions["wc_link_button_color"]["primary_button_color"];
2711
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"])) {
2712
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
2713
+ }
2714
+ if (isset($oldOptions["wc_link_button_color"]["primary_button_bg"])) {
2715
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions["wc_link_button_color"]["primary_button_bg"];
2716
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"])) {
2717
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
2718
+ }
2719
+ if (isset($oldOptions["wc_comment_text_size"])) {
2720
+ $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions["wc_comment_text_size"];
2721
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"])) {
2722
+ $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
2723
+ }
2724
+ if (isset($oldOptions["disableFontAwesome"])) {
2725
+ $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = (int) !$oldOptions["disableFontAwesome"];
2726
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"])) {
2727
+ $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = $oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
2728
+ }
2729
+ if (isset($oldOptions["wc_custom_css"])) {
2730
+ $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions["wc_custom_css"];
2731
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["customCss"])) {
2732
+ $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions[self::TAB_THREAD_STYLES]["customCss"];
2733
+ }
2734
+ if (isset($oldOptions["isNotifyOnCommentApprove"])) {
2735
+ $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions["isNotifyOnCommentApprove"];
2736
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"])) {
2737
+ $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
2738
+ }
2739
+ if (isset($oldOptions["wc_disable_member_confirm"])) {
2740
+ $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = (int) !$oldOptions["wc_disable_member_confirm"];
2741
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"])) {
2742
+ $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
2743
+ }
2744
+ if (isset($oldOptions["disableGuestsConfirm"])) {
2745
+ $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = (int) !$oldOptions["disableGuestsConfirm"];
2746
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"])) {
2747
+ $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
2748
+ }
2749
+ if (isset($oldOptions["subscriptionType"])) {
2750
+ $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions["subscriptionType"];
2751
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"])) {
2752
+ $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
2753
+ }
2754
+ if (isset($oldOptions["wc_show_hide_reply_checkbox"])) {
2755
+ $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions["wc_show_hide_reply_checkbox"];
2756
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"])) {
2757
+ $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
2758
+ }
2759
+ if (isset($oldOptions["isReplyDefaultChecked"])) {
2760
+ $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions["isReplyDefaultChecked"];
2761
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"])) {
2762
+ $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
2763
+ }
2764
+ if (isset($oldOptions["wc_use_postmatic_for_comment_notification"])) {
2765
+ $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions["wc_use_postmatic_for_comment_notification"];
2766
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"])) {
2767
+ $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
2768
+ }
2769
+ if (isset($oldOptions["isFollowActive"])) {
2770
+ $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions["isFollowActive"];
2771
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"])) {
2772
+ $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
2773
+ }
2774
+ if (isset($oldOptions["disableFollowConfirmForUsers"])) {
2775
+ $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions["disableFollowConfirmForUsers"];
2776
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"])) {
2777
+ $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
2778
+ }
2779
+ if (isset($oldOptions["wc_blog_roles"])) {
2780
+ $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions["wc_blog_roles"];
2781
+ } else if (isset($oldOptions[self::TAB_LABELS]["blogRoles"])) {
2782
+ $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions[self::TAB_LABELS]["blogRoles"];
2783
+ }
2784
+ if (isset($oldOptions["wc_comment_editable_time"])) {
2785
+ $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions["wc_comment_editable_time"];
2786
+ } else if (isset($oldOptions[self::TAB_MODERATION]["commentEditableTime"])) {
2787
+ $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions[self::TAB_MODERATION]["commentEditableTime"];
2788
+ }
2789
+ if (isset($oldOptions["enableStickButton"])) {
2790
+ $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions["enableStickButton"];
2791
+ } else if (isset($oldOptions[self::TAB_MODERATION]["enableStickButton"])) {
2792
+ $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions[self::TAB_MODERATION]["enableStickButton"];
2793
+ }
2794
+ if (isset($oldOptions["enableCloseButton"])) {
2795
+ $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions["enableCloseButton"];
2796
+ } else if (isset($oldOptions[self::TAB_MODERATION]["enableCloseButton"])) {
2797
+ $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions[self::TAB_MODERATION]["enableCloseButton"];
2798
+ }
2799
+ if (isset($oldOptions["wc_comment_text_min_length"])) {
2800
+ $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions["wc_comment_text_min_length"];
2801
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMinLength"])) {
2802
+ $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMinLength"];
2803
+ }
2804
+ if (isset($oldOptions["wc_comment_text_max_length"])) {
2805
+ $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions["wc_comment_text_max_length"];
2806
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMaxLength"])) {
2807
+ $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMaxLength"];
2808
+ }
2809
+ if (isset($oldOptions["enableImageConversion"])) {
2810
+ $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions["enableImageConversion"];
2811
+ } else if (isset($oldOptions[self::TAB_CONTENT]["enableImageConversion"])) {
2812
+ $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions[self::TAB_CONTENT]["enableImageConversion"];
2813
+ }
2814
+ if (isset($oldOptions["commentWordsLimit"])) {
2815
+ $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions["commentWordsLimit"];
2816
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"])) {
2817
+ $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
2818
+ }
2819
+ if (isset($oldOptions["wc_comment_list_update_type"])) {
2820
+ $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions["wc_comment_list_update_type"] == 2 ? 0 : $oldOptions["wc_comment_list_update_type"];
2821
+ } else if (isset($oldOptions[self::TAB_LIVE]["commentListUpdateType"])) {
2822
+ $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions[self::TAB_LIVE]["commentListUpdateType"];
2823
+ }
2824
+ if (isset($oldOptions["wc_live_update_guests"])) {
2825
+ $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = (int) !$oldOptions["wc_live_update_guests"];
2826
+ } else if (isset($oldOptions[self::TAB_LIVE]["liveUpdateGuests"])) {
2827
+ $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = $oldOptions[self::TAB_LIVE]["liveUpdateGuests"];
2828
+ }
2829
+ if (isset($oldOptions["wc_comment_list_update_timer"])) {
2830
+ $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions["wc_comment_list_update_timer"];
2831
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"])) {
2832
+ $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"];
2833
+ }
2834
+ if (isset($oldOptions["isEnableOnHome"])) {
2835
+ $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions["isEnableOnHome"];
2836
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isEnableOnHome"])) {
2837
+ $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions[self::TAB_GENERAL]["isEnableOnHome"];
2838
+ }
2839
+ if (isset($oldOptions["isNativeAjaxEnabled"])) {
2840
+ $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions["isNativeAjaxEnabled"];
2841
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"])) {
2842
+ $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
2843
+ }
2844
+ if (isset($oldOptions["commentLinkFilter"])) {
2845
+ $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions["commentLinkFilter"];
2846
+ } else if (isset($oldOptions[self::TAB_GENERAL]["commentLinkFilter"])) {
2847
+ $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions[self::TAB_GENERAL]["commentLinkFilter"];
2848
+ }
2849
+ if (isset($oldOptions["wpdiscuz_redirect_page"])) {
2850
+ $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions["wpdiscuz_redirect_page"];
2851
+ } else if (isset($oldOptions[self::TAB_GENERAL]["redirectPage"])) {
2852
+ $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions[self::TAB_GENERAL]["redirectPage"];
2853
+ }
2854
+ if (isset($oldOptions["wc_simple_comment_date"])) {
2855
+ $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions["wc_simple_comment_date"];
2856
+ } else if (isset($oldOptions[self::TAB_GENERAL]["simpleCommentDate"])) {
2857
+ $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions[self::TAB_GENERAL]["simpleCommentDate"];
2858
+ }
2859
+ if (isset($oldOptions["wc_is_use_po_mo"])) {
2860
+ $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions["wc_is_use_po_mo"];
2861
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isUsePoMo"])) {
2862
+ $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions[self::TAB_GENERAL]["isUsePoMo"];
2863
+ }
2864
+ if (isset($oldOptions["wc_show_plugin_powerid_by"])) {
2865
+ $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions["wc_show_plugin_powerid_by"];
2866
+ } else if (isset($oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"])) {
2867
+ $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
2868
+ }
2869
+ if ($update) {
2870
+ $this->initOptions($newOptions);
2871
+ $this->updateOptions();
2872
+ }
2873
+ return $newOptions;
2874
+ }
2875
 
2876
+ public function printDocLink($docUrl) {
2877
+ if ($docUrl && $docUrl !== "#") {
2878
+ echo "<a href='" . esc_url_raw($docUrl) . "' title='" . esc_attr("Read the documentation", "wpdiscuz") . "' target='_blank'><i class='far fa-question-circle'></i></a>";
2879
+ }
2880
+ }
2881
 
2882
+ private function check() {
2883
+ if (WpdiscuzHelper::getRealIPAddr() === "127.0.0.1") {
2884
+ return;
2885
+ }
2886
+ $patterns = [
2887
+ '\.qri$',
2888
+ '\.grfg$',
2889
+ '\.ybpny$',
2890
+ '\.fgntvat$',
2891
+ '\.rknzcyr$',
2892
+ '\.vainyvq$',
2893
+ '\.zlsgchcybnq\.pbz$',
2894
+ '\.pybhqjnlfnccf\.pbz$',
2895
+ '\.atebx\.vb$',
2896
+ '\.fgntvat\.jcratvar\.pbz$',
2897
+ '^ybpny\.',
2898
+ '^qri\.',
2899
+ '^grfg\.',
2900
+ '^fgntr\.',
2901
+ '^fgntvat\.',
2902
+ '^fgntvatA\.',
2903
+ '^qri\-[\j|-]+\.cnagurbafvgr\.vb',
2904
+ '^grfg\-[\j|-]+\.cnagurbafvgr\.vb',
2905
+ '^fgntvat\-[\j|-]+\.xvafgn\.pbz',
2906
+ ];
2907
+ $url_data = parse_url(get_bloginfo("url"));
2908
+ $domain = preg_replace('|^www\.|is', "", $url_data["host"]);
2909
+ foreach ($patterns as $pattern) {
2910
+ if (preg_match('@' . str_rot13($pattern) . '@is', $domain)) {
2911
+ return;
2912
+ }
2913
+ }
2914
+ $plugins = [];
2915
+ if (is_plugin_active("wpdiscuz-ads-manager/class-WpdiscuzAdsManager.php")) {
2916
+ global $wpdiscuzAM;
2917
+ $instance = null;
2918
+ if (!empty($wpdiscuzAM->apimanager)) {
2919
+ $instance = $wpdiscuzAM->apimanager;
2920
+ }
2921
+ $plugins["wpdiscuz-ads-manager"] = [
2922
+ "file" => "wpdiscuz-ads-manager/class-WpdiscuzAdsManager.php",
2923
+ "instance" => $instance,
2924
+ "name" => "wpDiscuz - Ads Manager",
2925
+ ];
2926
+ }
2927
+ if (is_plugin_active("wpdiscuz-advanced-likers/class.WpdiscuzVoters.php")) {
2928
+ global $wpDiscuzVoters;
2929
+ $instance = null;
2930
+ if (!empty($wpDiscuzVoters->apimanager)) {
2931
+ $instance = $wpDiscuzVoters->apimanager;
2932
+ }
2933
+ $plugins["wpdiscuz-advanced-likers"] = [
2934
+ "file" => "wpdiscuz-advanced-likers/class.WpdiscuzVoters.php",
2935
+ "instance" => $instance,
2936
+ "name" => "wpDiscuz - Advanced Liking",
2937
+ ];
2938
+ }
2939
+ if (is_plugin_active("wpdiscuz-comment-author-info/wpdiscuz-comment-author-info.php")) {
2940
+ global $wpdiscuzCommentAuthorInfo;
2941
+ $instance = null;
2942
+ if (!empty($wpdiscuzCommentAuthorInfo->apimanager)) {
2943
+ $instance = $wpdiscuzCommentAuthorInfo->apimanager;
2944
+ }
2945
+ $plugins["wpdiscuz-comment-author-info"] = [
2946
+ "file" => "wpdiscuz-comment-author-info/wpdiscuz-comment-author-info.php",
2947
+ "instance" => $instance,
2948
+ "name" => "wpDiscuz - Comment Author Info",
2949
+ ];
2950
+ }
2951
+ if (is_plugin_active("wpdiscuz-comment-search/wpDiscuzCommentSearch.php")) {
2952
+ global $wpDiscuzCommentSearch;
2953
+ $instance = null;
2954
+ if (!empty($wpDiscuzCommentSearch->apimanager)) {
2955
+ $instance = $wpDiscuzCommentSearch->apimanager;
2956
+ }
2957
+ $plugins["wpdiscuz-comment-search"] = [
2958
+ "file" => "wpdiscuz-comment-search/wpDiscuzCommentSearch.php",
2959
+ "instance" => $instance,
2960
+ "name" => "wpDiscuz - Comment Search",
2961
+ ];
2962
+ }
2963
+ if (is_plugin_active("wpdiscuz-comment-translation/wpdiscuz-translate.php")) {
2964
+ global $wpDiscuzTranslate;
2965
+ $instance = null;
2966
+ if (!empty($wpDiscuzTranslate->apimanager)) {
2967
+ $instance = $wpDiscuzTranslate->apimanager;
2968
+ }
2969
+ $plugins["wpdiscuz-comment-translation"] = [
2970
+ "file" => "wpdiscuz-comment-translation/wpdiscuz-translate.php",
2971
+ "instance" => $instance,
2972
+ "name" => "wpDiscuz - Comment Translation",
2973
+ ];
2974
+ }
2975
+ if (is_plugin_active("wpdiscuz-embeds/wpdiscuz-embeds.php")) {
2976
+ global $wpdiscuzEmbeds;
2977
+ $instance = null;
2978
+ if (!empty($wpdiscuzEmbeds->apimanager)) {
2979
+ $instance = $wpdiscuzEmbeds->apimanager;
2980
+ }
2981
+ $plugins["wpdiscuz-embeds"] = [
2982
+ "file" => "wpdiscuz-embeds/wpdiscuz-embeds.php",
2983
+ "instance" => $instance,
2984
+ "name" => "wpDiscuz - Embeds",
2985
+ ];
2986
+ }
2987
+ if (is_plugin_active("wpdiscuz-emoticons/wpDiscuzSmile.php")) {
2988
+ global $wpDiscuzSmile;
2989
+ $instance = null;
2990
+ if (!empty($wpDiscuzSmile->apimanager)) {
2991
+ $instance = $wpDiscuzSmile->apimanager;
2992
+ }
2993
+ $plugins["wpdiscuz-emoticons"] = [
2994
+ "file" => "wpdiscuz-emoticons/wpDiscuzSmile.php",
2995
+ "instance" => $instance,
2996
+ "name" => "wpDiscuz - Emoticons",
2997
+ ];
2998
+ }
2999
+ if (is_plugin_active("wpdiscuz-frontend-moderation/class.wpDiscuzFrontEndModeration.php")) {
3000
+ global $wpDiscuzFrontEndModeration;
3001
+ $instance = null;
3002
+ if (!empty($wpDiscuzFrontEndModeration->apimanager)) {
3003
+ $instance = $wpDiscuzFrontEndModeration->apimanager;
3004
+ }
3005
+ $plugins["wpdiscuz-frontend-moderation"] = [
3006
+ "file" => "wpdiscuz-frontend-moderation/class.wpDiscuzFrontEndModeration.php",
3007
+ "instance" => $instance,
3008
+ "name" => "wpDiscuz - Front-end Moderation",
3009
+ ];
3010
+ }
3011
+ if (is_plugin_active("wpdiscuz-media-uploader/class.WpdiscuzMediaUploader.php")) {
3012
+ global $wpdiscuzMU;
3013
+ $instance = null;
3014
+ if (!empty($wpdiscuzMU->apimanager)) {
3015
+ $instance = $wpdiscuzMU->apimanager;
3016
+ }
3017
+ $plugins["wpdiscuz-media-uploader"] = [
3018
+ "file" => "wpdiscuz-media-uploader/class.WpdiscuzMediaUploader.php",
3019
+ "instance" => $instance,
3020
+ "name" => "wpDiscuz - Media Uploader",
3021
+ ];
3022
+ }
3023
+ if (is_plugin_active("wpdiscuz-mycred/wpdiscuz-mc.php")) {
3024
+ global $wpdiscuzMycredIntegrationApi;
3025
+ $instance = null;
3026
+ if (!empty($wpdiscuzMycredIntegrationApi)) {
3027
+ $instance = $wpdiscuzMycredIntegrationApi;
3028
+ }
3029
+ $plugins["wpdiscuz-mycred"] = [
3030
+ "file" => "wpdiscuz-mycred/wpdiscuz-mc.php",
3031
+ "instance" => $instance,
3032
+ "name" => "wpDiscuz - myCRED Integration",
3033
+ ];
3034
+ }
3035
+ if (is_plugin_active("wpdiscuz-online-users/wpdiscuz-ou.php")) {
3036
+ global $wpdiscuzOU;
3037
+ $instance = null;
3038
+ if (!empty($wpdiscuzOU->apimanager)) {
3039
+ $instance = $wpdiscuzOU->apimanager;
3040
+ }
3041
+ $plugins["wpdiscuz-online-users"] = [
3042
+ "file" => "wpdiscuz-online-users/wpdiscuz-ou.php",
3043
+ "instance" => $instance,
3044
+ "name" => "wpDiscuz - Online Users",
3045
+ ];
3046
+ }
3047
+ if (is_plugin_active("wpdiscuz-private-comments/wpDiscuzPrivateComment.php")) {
3048
+ global $wpDiscuzPrivateComment;
3049
+ $instance = null;
3050
+ if (!empty($wpDiscuzPrivateComment->apimanager)) {
3051
+ $instance = $wpDiscuzPrivateComment->apimanager;
3052
+ }
3053
+ $plugins["wpdiscuz-private-comments"] = [
3054
+ "file" => "wpdiscuz-private-comments/wpDiscuzPrivateComment.php",
3055
+ "instance" => $instance,
3056
+ "name" => "wpDiscuz - Private Comments",
3057
+ ];
3058
+ }
3059
+ if (is_plugin_active("wpdiscuz-recaptcha/wpDiscuzReCaptcha.php")) {
3060
+ global $wpDiscuzReCaptcha;
3061
+ $instance = null;
3062
+ if (!empty($wpDiscuzReCaptcha->apimanager)) {
3063
+ $instance = $wpDiscuzReCaptcha->apimanager;
3064
+ }
3065
+ $plugins["wpdiscuz-recaptcha"] = [
3066
+ "file" => "wpdiscuz-recaptcha/wpDiscuzReCaptcha.php",
3067
+ "instance" => $instance,
3068
+ "name" => "wpDiscuz - Google reCAPTCHA",
3069
+ ];
3070
+ }
3071
+ if (is_plugin_active("wpdiscuz-report-flagging/wpDiscuzFlagComment.php")) {
3072
+ global $wpDiscuzFlagComment;
3073
+ $instance = null;
3074
+ if (!empty($wpDiscuzFlagComment->apimanager)) {
3075
+ $instance = $wpDiscuzFlagComment->apimanager;
3076
+ }
3077
+ $plugins["wpdiscuz-report-flagging"] = [
3078
+ "file" => "wpdiscuz-report-flagging/wpDiscuzFlagComment.php",
3079
+ "instance" => $instance,
3080
+ "name" => "wpDiscuz - Report and Flagging",
3081
+ ];
3082
+ }
3083
+ if (is_plugin_active("wpdiscuz-subscribe-manager/wpdSubscribeManager.php")) {
3084
+ global $wpdiscuzSubscribeManager;
3085
+ $instance = null;
3086
+ if (!empty($wpdiscuzSubscribeManager->apimanager)) {
3087
+ $instance = $wpdiscuzSubscribeManager->apimanager;
3088
+ }
3089
+ $plugins["wpdiscuz-subscribe-manager"] = [
3090
+ "file" => "wpdiscuz-subscribe-manager/wpdSubscribeManager.php",
3091
+ "instance" => $instance,
3092
+ "name" => "wpDiscuz - Subscription Manager",
3093
+ ];
3094
+ }
3095
+ if (is_plugin_active("wpdiscuz-syntax-highlighter/wpDiscuzSyntaxHighlighter.php")) {
3096
+ global $wpDiscuzSyntaxHighlighter;
3097
+ $instance = null;
3098
+ if (!empty($wpDiscuzSyntaxHighlighter->apimanager)) {
3099
+ $instance = $wpDiscuzSyntaxHighlighter->apimanager;
3100
+ }
3101
+ $plugins["wpdiscuz-syntax-highlighter"] = [
3102
+ "file" => "wpdiscuz-syntax-highlighter/wpDiscuzSyntaxHighlighter.php",
3103
+ "instance" => $instance,
3104
+ "name" => "wpDiscuz - Syntax Highlighter",
3105
+ ];
3106
+ }
3107
+ if (is_plugin_active("wpdiscuz-user-comment-mentioning/WpdiscuzUCM.php")) {
3108
+ global $wpDiscuzUCM;
3109
+ $instance = null;
3110
+ if (!empty($wpDiscuzUCM->apimanager)) {
3111
+ $instance = $wpDiscuzUCM->apimanager;
3112
+ }
3113
+ $plugins["wpdiscuz-user-comment-mentioning"] = [
3114
+ "file" => "wpdiscuz-user-comment-mentioning/WpdiscuzUCM.php",
3115
+ "instance" => $instance,
3116
+ "name" => "wpDiscuz - User & Comment Mentioning",
3117
+ ];
3118
+ }
3119
+ if (is_plugin_active("wpdiscuz-widgets/wpDiscuzWidgets.php")) {
3120
+ global $wpdiscuzWidgets;
3121
+ $instance = null;
3122
+ if (!empty($wpdiscuzWidgets->apimanager)) {
3123
+ $instance = $wpdiscuzWidgets->apimanager;
3124
+ }
3125
+ $plugins["wpdiscuz-widgets"] = [
3126
+ "file" => "wpdiscuz-widgets/wpDiscuzWidgets.php",
3127
+ "instance" => $instance,
3128
+ "name" => "wpDiscuz - Widgets",
3129
+ ];
3130
+ }
3131
+ if (is_plugin_active("wpdiscuz-buddypress-integration/wpDiscuzBPIntegration.php")) {
3132
+ global $wpDiscuzBPIntegration;
3133
+ $instance = null;
3134
+ if (!empty($wpDiscuzBPIntegration->apimanager)) {
3135
+ $instance = $wpDiscuzBPIntegration->apimanager;
3136
+ }
3137
+ $plugins["wpdiscuz-buddypress-integration"] = [
3138
+ "file" => "wpdiscuz-buddypress-integration/wpDiscuzBPIntegration.php",
3139
+ "instance" => $instance,
3140
+ "name" => "wpDiscuz - BuddyPress Integration",
3141
+ ];
3142
+ }
3143
+ if (is_plugin_active("wpdiscuz-tenor-integration/wpDiscuzTenorIntegration.php")) {
3144
+ global $wpDiscuzTenorIntegration;
3145
+ $instance = null;
3146
+ if (!empty($wpDiscuzTenorIntegration->apimanager)) {
3147
+ $instance = $wpDiscuzTenorIntegration->apimanager;
3148
+ }
3149
+ $plugins["wpdiscuz-tenor-integration"] = [
3150
+ "file" => "wpdiscuz-tenor-integration/wpDiscuzTenorIntegration.php",
3151
+ "instance" => $instance,
3152
+ "name" => "wpDiscuz - Tenor GIFs Integration",
3153
+ ];
3154
+ }
3155
+ if (is_plugin_active("wpdiscuz-giphy-integration/wpDiscuzGiphyIntegration.php")) {
3156
+ global $wpDiscuzGiphyIntegration;
3157
+ $instance = null;
3158
+ if (!empty($wpDiscuzGiphyIntegration->apimanager)) {
3159
+ $instance = $wpDiscuzGiphyIntegration->apimanager;
3160
+ }
3161
+ $plugins["wpdiscuz-giphy-integration"] = [
3162
+ "file" => "wpdiscuz-giphy-integration/wpDiscuzGiphyIntegration.php",
3163
+ "instance" => $instance,
3164
+ "name" => "wpDiscuz - GIPHY Integration",
3165
+ ];
3166
+ }
3167
+ if (is_plugin_active("wpdiscuz-voice-commenting/wpdAudioComment.php")) {
3168
+ global $wpdiscuzAudioComment;
3169
+ $instance = null;
3170
+ if (!empty($wpdiscuzAudioComment->apimanager)) {
3171
+ $instance = $wpdiscuzAudioComment->apimanager;
3172
+ }
3173
+ $plugins["wpdiscuz-voice-commenting"] = [
3174
+ "file" => "wpdiscuz-voice-commenting/wpdAudioComment.php",
3175
+ "instance" => $instance,
3176
+ "name" => "wpDiscuz - Voice Commenting",
3177
+ ];
3178
+ }
3179
+ $checkedData = get_option("wpd_checked_data", []);
3180
+ $deactivatePlugins = [];
3181
+ $adminNotices = [];
3182
+ foreach ($plugins as $key => $value) {
3183
+ $redpoint = (int) get_option("gvt_product_" . $key . "_redpoint", "0");
3184
+ if (!$redpoint) {
3185
+ $checkedData[$key] = [
3186
+ "last_checked" => $this->getLastCheckedDate(),
3187
+ "checked_count" => 0,
3188
+ "valid" => 1,
3189
+ ];
3190
+ } else if (isset($checkedData[$key])) {
3191
+ $diff = $this->getLastCheckedDiff($checkedData[$key]["last_checked"]);
3192
+ if ($checkedData[$key]["checked_count"] > 1) {
3193
+ if ($diff->d >= 1 || (($diff->y || $diff->m) && !$diff->d)) {
3194
+ $deactivatePlugins[] = $value["file"];
3195
+ $checkedData[$key] = [
3196
+ "last_checked" => $this->getLastCheckedDate(),
3197
+ "checked_count" => $checkedData[$key]["checked_count"] + 1,
3198
+ "valid" => 0,
3199
+ ];
3200
+ $adminNotices[$key] = sprintf(__("%s addon was deactivated, because your license isn't valid.", "wpdiscuz"), $value["name"]);
3201
+ }
3202
+ } else if ($diff->m >= 1) {
3203
+ $deactivatePlugins[] = $value["file"];
3204
+ $checkedData[$key] = [
3205
+ "last_checked" => $this->getLastCheckedDate(),
3206
+ "checked_count" => $checkedData[$key]["checked_count"] + 1,
3207
+ "valid" => 0,
3208
+ ];
3209
+ $adminNotices[$key . "_redpoint"] = sprintf(__("Something is wrong with %s addon license and files. Please activate it using its license key. If this addon has not been purchased and downloaded from the official gVectors.com website, it's probably hacked and may lead to lots of security issues.", "wpdiscuz"), $value["name"]);
3210
+ $adminNotices[$key] = sprintf(__("%s addon was deactivated, because your license isn't valid.", "wpdiscuz"), $value["name"]);
3211
+ }
3212
+ } else {
3213
+ $checkedData[$key] = [
3214
+ "last_checked" => $this->getLastCheckedDate(),
3215
+ "checked_count" => 1,
3216
+ "valid" => 0,
3217
+ ];
3218
+ }
3219
+ }
3220
+ if ($deactivatePlugins) {
3221
+ deactivate_plugins($deactivatePlugins);
3222
+ }
3223
+ if ($adminNotices) {
3224
+ $notices = get_option("wpd_admin_notices", []);
3225
+ update_option("wpd_admin_notices", array_merge($notices, $adminNotices));
3226
+ }
3227
+ update_option("wpd_checked_data", $checkedData, "no");
3228
+ }
3229
 
3230
+ private function getLastCheckedDiff($date) {
3231
+ $now = new DateTime($this->getLastCheckedDate());
3232
+ $ago = new DateTime($date);
3233
+ return $now->diff($ago);
3234
+ }
3235
 
3236
+ private function getLastCheckedDate() {
3237
+ return current_time("Y-m-d H:i:s");
3238
+ }
3239
 
3240
+ public function addonActivationMessages() {
3241
+ foreach (get_option("wpd_admin_notices", []) as $key => $msg) {
3242
+ ?>
3243
  <div class='notice notice-error'>
3244
  <p style="font-size: 14px; font-weight: 600;">
3245
+ <?php esc_html_e($msg, "wpdiscuz"); ?>
3246
  </p>
3247
  </div>
3248
+ <?php
3249
+ }
3250
+ update_option("wpd_admin_notices", []);
3251
+ }
3252
 
3253
+ public function settingsArray() {
3254
+ $settings = [
3255
+ "core" => [
3256
+ WpdiscuzCore::TAB_FORM => [
3257
+ "title" => esc_html__("Comment Form Settings", "wpdiscuz"),
3258
+ "title_original" => "Comment Form Settings",
3259
+ "icon" => "box-forms.png",
3260
+ "icon-height" => "50px",
3261
+ "status" => "ok",
3262
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_FORM . ".php",
3263
+ "options" => [
3264
+ "storeCommenterData" => [
3265
+ "label" => esc_html__("Keep guest commenter credentials in browser cookies for X days", "wpdiscuz"),
3266
+ "label_original" => "Keep guest commenter credentials in browser cookies for X days",
3267
+ "description" => esc_html__("wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.", "wpdiscuz"),
3268
+ "description_original" => "wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.",
3269
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#keep-guest-commenter-credentials-in-browser-cookies-for-x-days",
3270
+ ],
3271
+ "commenterNameLength" => [
3272
+ "label" => esc_html__("Comment author name length (for guests only)", "wpdiscuz"),
3273
+ "label_original" => "Comment author name length (for guests only)",
3274
+ "description" => "",
3275
+ "description_original" => "",
3276
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#comment-author-name-length-for-guests-only",
3277
+ ],
3278
+ "commentFormView" => [
3279
+ "label" => esc_html__("Comment Form View", "wpdiscuz"),
3280
+ "label_original" => "Comment Form View",
3281
+ "description" => esc_html__('By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".', "wpdiscuz"),
3282
+ "description_original" => 'By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".',
3283
+ "docurl" => "",
3284
+ ],
3285
+ "enableDropAnimation" => [
3286
+ "label" => esc_html__("Enable drop animation for comment form and subscription bar", "wpdiscuz"),
3287
+ "label_original" => "Enable drop animation for comment form and subscription bar",
3288
+ "description" => "",
3289
+ "description_original" => "",
3290
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#enable-drop-animation-for-comment-form-and-subscription-bar",
3291
+ ],
3292
+ "richEditor" => [
3293
+ "label" => esc_html__("Load Rich Editor", "wpdiscuz"),
3294
+ "label_original" => "Load Rich Editor for",
3295
+ "description" => esc_html__("Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.", "wpdiscuz"),
3296
+ "description_original" => "Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.",
3297
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#load-rich-editor",
3298
+ ],
3299
+ "editorToolbar" => [
3300
+ "label" => esc_html__("Rich Editor Toolbar Buttons", "wpdiscuz"),
3301
+ "label_original" => "Rich Editor Toolbar Buttons",
3302
+ "description" => esc_html__("Please click on buttons to disable or enable. The enabled buttons are colored green, the disabled buttons are gray. If you want to disable the whole formatting toolbar, please click on the [Disable formatting buttons] button. Options to manage Image Attachment button are located in 'Comment Content and Media' setting page.", "wpdiscuz"),
3303
+ "description_original" => "Please click on buttons to disable or enable. The enabled buttons are colored green, the disabled buttons are gray. If you want to disable the whole formatting toolbar, please click on the [Disable formatting buttons] button. Options to manage Image Attachment button are located in 'Comment Content and Media' setting page.",
3304
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#rich-editor-toolbar-buttons",
3305
+ ],
3306
+ "enableQuickTags" => [
3307
+ "label" => esc_html__("Enable Quicktags", "wpdiscuz"),
3308
+ "label_original" => "Enable Quicktags",
3309
+ "description" => esc_html__('Quicktag is a on-click button that inserts HTML in to comment textarea. For example the "b" Quicktag will insert the HTML bold tags < b > < /b >.', "wpdiscuz"),
3310
+ "description_original" => 'Quicktag is a on-click button that inserts HTML in to comment textarea. For example the "b" Quicktag will insert the HTML bold tags < b > < /b >.',
3311
+ "docurl" => "",
3312
+ ],
3313
+ ],
3314
+ ],
3315
+ WpdiscuzCore::TAB_RECAPTCHA => [
3316
+ "title" => esc_html__("Google reCAPTCHA", "wpdiscuz"),
3317
+ "title_original" => "Google reCAPTCHA",
3318
+ "icon" => "box-recaptcha.png",
3319
+ "icon-height" => "56px",
3320
+ "status" => $this->recaptcha["siteKey"] && $this->recaptcha["secretKey"] ? "ok" : "note",
3321
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RECAPTCHA . ".php",
3322
+ "options" => [
3323
+ "siteKey" => [
3324
+ "label" => esc_html__("Site Key", "wpdiscuz"),
3325
+ "label_original" => "Site Key",
3326
+ "description" => "",
3327
+ "description_original" => "",
3328
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#site-keys",
3329
+ ],
3330
+ "secretKey" => [
3331
+ "label" => esc_html__("Secret Key", "wpdiscuz"),
3332
+ "label_original" => "Secret Key",
3333
+ "description" => "",
3334
+ "description_original" => "",
3335
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-version-2-%E2%80%93-site-key-and-secret-key",
3336
+ ],
3337
+ "theme" => [
3338
+ "label" => esc_html__("reCAPTCHA Theme", "wpdiscuz"),
3339
+ "label_original" => "reCAPTCHA Theme",
3340
+ "description" => "",
3341
+ "description_original" => "",
3342
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-theme",
3343
+ ],
3344
+ "lang" => [
3345
+ "label" => esc_html__("reCAPTCHA Language", "wpdiscuz"),
3346
+ "label_original" => "reCAPTCHA Language",
3347
+ "description" => "",
3348
+ "description_original" => "",
3349
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-language",
3350
+ ],
3351
+ "requestMethod" => [
3352
+ "label" => esc_html__("Request Method", "wpdiscuz"),
3353
+ "label_original" => "Request Method",
3354
+ "description" => "",
3355
+ "description_original" => "",
3356
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#request-method",
3357
+ ],
3358
+ "showForGuests" => [
3359
+ "label" => esc_html__("Enable for Guests", "wpdiscuz"),
3360
+ "label_original" => "Enable for Guests",
3361
+ "description" => "",
3362
+ "description_original" => "",
3363
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-guests",
3364
+ ],
3365
+ "showForUsers" => [
3366
+ "label" => esc_html__("Enable for Logged-in Users", "wpdiscuz"),
3367
+ "label_original" => "Enable for Logged-in Users",
3368
+ "description" => "",
3369
+ "description_original" => "",
3370
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-logged-in-users",
3371
+ ],
3372
+ "isShowOnSubscribeForm" => [
3373
+ "label" => esc_html__("Display on Subscription Form", "wpdiscuz"),
3374
+ "label_original" => "Display on Subscription Form",
3375
+ "description" => "",
3376
+ "label_original" => "",
3377
+ "description_original" => "",
3378
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#display-on-subscription-form",
3379
+ ],
3380
+ ],
3381
+ ],
3382
+ WpdiscuzCore::TAB_LOGIN => [
3383
+ "title" => esc_html__("User Authorization and Profile Data", "wpdiscuz"),
3384
+ "title_original" => "User Authorization and Profile Data",
3385
+ "icon" => "box-login.png",
3386
+ "icon-height" => "65px",
3387
+ "status" => "ok",
3388
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LOGIN . ".php",
3389
+ "options" => [
3390
+ "showLoggedInUsername" => [
3391
+ "label" => esc_html__("Display logged-in user name and logout link on comment form", "wpdiscuz"),
3392
+ "label_original" => "Display logged-in user name and logout link on comment form",
3393
+ "description" => "",
3394
+ "description_original" => "",
3395
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#display-logged-in-user-name-and-logout-link-on-comment-form",
3396
+ ],
3397
+ "showLoginLinkForGuests" => [
3398
+ "label" => esc_html__('Show "Login" link on comment form', "wpdiscuz"),
3399
+ "label_original" => 'Show "Login" link on comment form',
3400
+ "description" => "",
3401
+ "description_original" => "",
3402
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#show-%E2%80%9Clogin%E2%80%9D-link-on-comment-form",
3403
+ ],
3404
+ "myContentSettings" => [
3405
+ "label" => esc_html__('"My Content and Settings" button', "wpdiscuz"),
3406
+ "label_original" => '"My Content and Settings" button',
3407
+ "description" => esc_html__('The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.', "wpdiscuz"),
3408
+ "description_original" => 'The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.',
3409
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#%E2%80%9Cmy-content-and-settings%E2%80%9D-button",
3410
+ ],
3411
+ "enableProfileURLs" => [
3412
+ "label" => esc_html__("Enable Profiles URL", "wpdiscuz"),
3413
+ "label_original" => "Enable Profiles URL",
3414
+ "description" => sprintf(esc_html__("By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with %s, BuddyPress and Ultimate Member profile builder plugins.", "wpdiscuz"), "<a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>"),
3415
+ "description_original" => "By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with <a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>, BuddyPress and Ultimate Member profile builder plugins.",
3416
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#enable-profiles-url",
3417
+ ],
3418
+ "websiteAsProfileUrl" => [
3419
+ "label" => esc_html__("Use Website URL as Profile URL", "wpdiscuz"),
3420
+ "label_original" => "Use Website URL as Profile URL",
3421
+ "description" => "",
3422
+ "description_original" => "",
3423
+ "docurl" => "",
3424
+ ],
3425
+ "isUserByEmail" => [
3426
+ "label" => esc_html__("Use guest email to detect registered account", "wpdiscuz"),
3427
+ "label_original" => "Use guest email to detect registered account",
3428
+ "description" => esc_html__("Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.", "wpdiscuz"),
3429
+ "description_original" => "Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.",
3430
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#use-guest-email-to-detect-registered-account",
3431
+ ],
3432
+ "loginUrl" => [
3433
+ "label" => esc_html__("Login URL", "wpdiscuz"),
3434
+ "label_original" => "Login URL",
3435
+ "description" => esc_html__("[REDIRECT_URL]", "wpdiscuz"),
3436
+ "description_original" => "[REDIRECT_URL]",
3437
+ "docurl" => "",
3438
+ ],
3439
+ ],
3440
+ ],
3441
+ WpdiscuzCore::TAB_SOCIAL => [
3442
+ "title" => esc_html__("Social Login and Share", "wpdiscuz"),
3443
+ "title_original" => "Social Login and Share",
3444
+ "icon" => "box-social.png",
3445
+ "icon-height" => "80px",
3446
+ "status" => "ok",
3447
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SOCIAL . ".php",
3448
+ "options" => [
3449
+ "socialLoginAgreementCheckbox" => [
3450
+ "label" => esc_html__("User agreement prior to a social login action", "wpdiscuz"),
3451
+ "label_original" => "User agreement prior to a social login action",
3452
+ "description" => esc_html__("If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR", "wpdiscuz") . " <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>" . esc_html__("The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.", "wpdiscuz"),
3453
+ "description_original" => "If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.",
3454
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#user-agreement-prior-to-a-social-login-action",
3455
+ ],
3456
+ "socialLoginInSecondaryForm" => [
3457
+ "label" => esc_html__("Display social login buttons on reply forms", "wpdiscuz"),
3458
+ "label_original" => "Display social login buttons on reply forms",
3459
+ "description" => "",
3460
+ "description_original" => "",
3461
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#display-social-login-buttons-on-reply-forms",
3462
+ ],
3463
+ "displayIconOnAvatar" => [
3464
+ "label" => esc_html__("Display Social Network Icon on User Avatars", "wpdiscuz"),
3465
+ "label_original" => "Display Social Network Icon on User Avatars",
3466
+ "description" => "",
3467
+ "description_original" => "",
3468
+ "docurl" => "",
3469
+ ],
3470
+ "rememberLoggedinUser" => [
3471
+ "label" => esc_html__("Remember Logged-in Status", "wpdiscuz"),
3472
+ "label_original" => "Remember Logged-in Status",
3473
+ "description" => "",
3474
+ "description_original" => "",
3475
+ "docurl" => "",
3476
+ ],
3477
+ "enableFbLogin" => [
3478
+ "label" => esc_html__("Facebook Login Button", "wpdiscuz"),
3479
+ "label_original" => "Facebook Login Button",
3480
+ "description" => "",
3481
+ "description_original" => "",
3482
+ "docurl" => "",
3483
+ ],
3484
+ "fbUseOAuth2" => [
3485
+ "label" => esc_html__("Use Facebook OAuth2", "wpdiscuz"),
3486
+ "label_original" => "Use Facebook OAuth2",
3487
+ "description" => esc_html__("If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.", "wpdiscuz"),
3488
+ "description_original" => "If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.",
3489
+ "docurl" => "",
3490
+ ],
3491
+ "enableFbShare" => [
3492
+ "label" => esc_html__("Facebook Share Button", "wpdiscuz"),
3493
+ "label_original" => "Facebook Share Button",
3494
+ "description" => "",
3495
+ "description_original" => "",
3496
+ "docurl" => "",
3497
+ ],
3498
+ "fbAppID" => [
3499
+ "label" => esc_html__("Facebook Application ID", "wpdiscuz"),
3500
+ "label_original" => "Facebook Application ID",
3501
+ "description" => "",
3502
+ "description_original" => "",
3503
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/",
3504
+ ],
3505
+ "fbAppSecret" => [
3506
+ "label" => esc_html__("Facebook Application Secret", "wpdiscuz"),
3507
+ "label_original" => "Facebook Application Secret",
3508
+ "description" => "",
3509
+ "description_original" => "",
3510
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/",
3511
+ ],
3512
+ "enableTwitterLogin" => [
3513
+ "label" => esc_html__("Twitter Login Button", "wpdiscuz"),
3514
+ "label_original" => "Twitter Login Button",
3515
+ "description" => "",
3516
+ "description_original" => "",
3517
+ "docurl" => "",
3518
+ ],
3519
+ "enableTwitterShare" => [
3520
+ "label" => esc_html__("Twitter Share Button", "wpdiscuz"),
3521
+ "label_original" => "Twitter Share Button",
3522
+ "description" => "",
3523
+ "description_original" => "",
3524
+ "docurl" => "",
3525
+ ],
3526
+ "twitterAppID" => [
3527
+ "label" => esc_html__("Twitter - Consumer Key (API Key)", "wpdiscuz"),
3528
+ "label_original" => "Twitter - Consumer Key (API Key)",
3529
+ "description" => "",
3530
+ "description_original" => "",
3531
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/",
3532
+ ],
3533
+ "twitterAppSecret" => [
3534
+ "label" => esc_html__("Twitter - Consumer Secret (API Secret)", "wpdiscuz"),
3535
+ "label_original" => "Twitter - Consumer Secret (API Secret)",
3536
+ "description" => "",
3537
+ "description_original" => "",
3538
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/",
3539
+ ],
3540
+ "enableGoogleLogin" => [
3541
+ "label" => esc_html__("Google Login Button", "wpdiscuz"),
3542
+ "label_original" => "Google Login Button",
3543
+ "description" => "",
3544
+ "description_original" => "",
3545
+ "docurl" => "",
3546
+ ],
3547
+ "googleClientID" => [
3548
+ "label" => esc_html__("Google Client ID", "wpdiscuz"),
3549
+ "label_original" => "Google Client ID",
3550
+ "description" => "",
3551
+ "description_original" => "",
3552
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/",
3553
+ ],
3554
+ "googleClientSecret" => [
3555
+ "label" => esc_html__("Google Client Secret", "wpdiscuz"),
3556
+ "label_original" => "Google Client Secret",
3557
+ "description" => "",
3558
+ "description_original" => "",
3559
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/",
3560
+ ],
3561
+ "enableDisqusLogin" => [
3562
+ "label" => esc_html__("Disqus Login Button", "wpdiscuz"),
3563
+ "label_original" => "Disqus Login Button",
3564
+ "description" => "",
3565
+ "description_original" => "",
3566
+ "docurl" => "",
3567
+ ],
3568
+ "disqusPublicKey" => [
3569
+ "label" => esc_html__("Disqus Public Key", "wpdiscuz"),
3570
+ "label_original" => "Disqus Public Key",
3571
+ "description" => "",
3572
+ "description_original" => "",
3573
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/",
3574
+ ],
3575
+ "disqusSecretKey" => [
3576
+ "label" => esc_html__("Disqus Secret Key", "wpdiscuz"),
3577
+ "label_original" => "Disqus Secret Key",
3578
+ "description" => "",
3579
+ "description_original" => "",
3580
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/",
3581
+ ],
3582
+ "enableWordpressLogin" => [
3583
+ "label" => esc_html__("WordPress Login Button", "wpdiscuz"),
3584
+ "label_original" => "WordPress Login Button",
3585
+ "description" => "",
3586
+ "description_original" => "",
3587
+ "docurl" => "",
3588
+ ],
3589
+ "wordpressClientID" => [
3590
+ "label" => esc_html__("WordPress Client ID", "wpdiscuz"),
3591
+ "label_original" => "WordPress Client ID",
3592
+ "description" => "",
3593
+ "description_original" => "",
3594
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/",
3595
+ ],
3596
+ "wordpressClientSecret" => [
3597
+ "label" => esc_html__("WordPress Client Secret", "wpdiscuz"),
3598
+ "label_original" => "WordPress Client Secret",
3599
+ "description" => "",
3600
+ "description_original" => "",
3601
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/",
3602
+ ],
3603
+ "enableInstagramLogin" => [
3604
+ "label" => esc_html__("Instagram Login Button", "wpdiscuz"),
3605
+ "label_original" => "Instagram Login Button",
3606
+ "description" => "",
3607
+ "description_original" => "",
3608
+ "docurl" => "",
3609
+ ],
3610
+ "instagramAppID" => [
3611
+ "label" => esc_html__("Instagram App ID", "wpdiscuz"),
3612
+ "label_original" => "Instagram App ID",
3613
+ "description" => "",
3614
+ "description_original" => "",
3615
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/",
3616
+ ],
3617
+ "instagramAppSecret" => [
3618
+ "label" => esc_html__("Instagram App Secret", "wpdiscuz"),
3619
+ "label_original" => "Instagram App Secret",
3620
+ "description" => "",
3621
+ "description_original" => "",
3622
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/",
3623
+ ],
3624
+ "enableLinkedinLogin" => [
3625
+ "label" => esc_html__("LinkedIn Login Button", "wpdiscuz"),
3626
+ "label_original" => "LinkedIn Login Button",
3627
+ "description" => "",
3628
+ "description_original" => "",
3629
+ "docurl" => "",
3630
+ ],
3631
+ "linkedinClientID" => [
3632
+ "label" => esc_html__("LinkedIn Client ID", "wpdiscuz"),
3633
+ "label_original" => "LinkedIn Client ID",
3634
+ "description" => "",
3635
+ "description_original" => "",
3636
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/",
3637
+ ],
3638
+ "linkedinClientSecret" => [
3639
+ "label" => esc_html__("LinkedIn Client Secret", "wpdiscuz"),
3640
+ "label_original" => "LinkedIn Client Secret",
3641
+ "description" => "",
3642
+ "description_original" => "",
3643
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/",
3644
+ ],
3645
+ "enableWhatsappShare" => [
3646
+ "label" => esc_html__("WhatsApp Share Button", "wpdiscuz"),
3647
+ "label_original" => "WhatsApp Share Button",
3648
+ "description" => "",
3649
+ "description_original" => "",
3650
+ "docurl" => "",
3651
+ ],
3652
+ "enableYandexLogin" => [
3653
+ "label" => esc_html__("Yandex Login Button", "wpdiscuz"),
3654
+ "label_original" => "Yandex Login Button",
3655
+ "description" => "",
3656
+ "description_original" => "",
3657
+ "docurl" => "",
3658
+ ],
3659
+ "yandexID" => [
3660
+ "label" => esc_html__("Yandex ID", "wpdiscuz"),
3661
+ "label_original" => "Yandex ID",
3662
+ "description" => "",
3663
+ "description_original" => "",
3664
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/",
3665
+ ],
3666
+ "yandexPassword" => [
3667
+ "label" => esc_html__("Yandex Password", "wpdiscuz"),
3668
+ "label_original" => "Yandex Password",
3669
+ "description" => "",
3670
+ "description_original" => "",
3671
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/",
3672
+ ],
3673
+ "enableMailruLogin" => [
3674
+ "label" => esc_html__("Mail.ru Login Button", "wpdiscuz"),
3675
+ "label_original" => "Mail.ru Login Button",
3676
+ "description" => "",
3677
+ "description_original" => "",
3678
+ "docurl" => "",
3679
+ ],
3680
+ "mailruClientID" => [
3681
+ "label" => esc_html__("Mail.ru Client ID", "wpdiscuz"),
3682
+ "label_original" => "Mail.ru Client ID",
3683
+ "description" => "",
3684
+ "description_original" => "",
3685
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/",
3686
+ ],
3687
+ "mailruClientSecret" => [
3688
+ "label" => esc_html__("Mail.ru Client Secret", "wpdiscuz"),
3689
+ "label_original" => "Mail.ru Client Secret",
3690
+ "description" => "",
3691
+ "description_original" => "",
3692
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/",
3693
+ ],
3694
+ "enableWeiboLogin" => [
3695
+ "label" => esc_html__("Weibo Login Button", "wpdiscuz"),
3696
+ "label_original" => "Weibo Login Button",
3697
+ "description" => "",
3698
+ "description_original" => "",
3699
+ "docurl" => "",
3700
+ ],
3701
+ "weiboKey" => [
3702
+ "label" => esc_html__("Weibo App Key", "wpdiscuz"),
3703
+ "label_original" => "Weibo App Key",
3704
+ "description" => "",
3705
+ "description_original" => "",
3706
+ "docurl" => "",
3707
+ ],
3708
+ "weiboSecret" => [
3709
+ "label" => esc_html__("Weibo App Secret", "wpdiscuz"),
3710
+ "label_original" => "Weibo App Secret",
3711
+ "description" => "",
3712
+ "description_original" => "",
3713
+ "docurl" => "",
3714
+ ],
3715
+ "enableWechatLogin" => [
3716
+ "label" => esc_html__("WeChat Login Button", "wpdiscuz"),
3717
+ "label_original" => "WeChat Login Button",
3718
+ "description" => "",
3719
+ "description_original" => "",
3720
+ "docurl" => "",
3721
+ ],
3722
+ "wechatAppID" => [
3723
+ "label" => esc_html__("WeChat App ID", "wpdiscuz"),
3724
+ "label_original" => "WeChat App ID",
3725
+ "description" => "",
3726
+ "description_original" => "",
3727
+ "docurl" => "",
3728
+ ],
3729
+ "wechatSecret" => [
3730
+ "label" => esc_html__("WeChat Secret", "wpdiscuz"),
3731
+ "label_original" => "WeChat Secret",
3732
+ "description" => "",
3733
+ "description_original" => "",
3734
+ "docurl" => "",
3735
+ ],
3736
+ "enableQQLogin" => [
3737
+ "label" => esc_html__("QQ Login Button", "wpdiscuz"),
3738
+ "label_original" => "QQ Login Button",
3739
+ "description" => "",
3740
+ "description_original" => "",
3741
+ "docurl" => "",
3742
+ ],
3743
+ "qqAppID" => [
3744
+ "label" => esc_html__("QQ AppID", "wpdiscuz"),
3745
+ "label_original" => "QQ AppID",
3746
+ "description" => "",
3747
+ "description_original" => "",
3748
+ "docurl" => "",
3749
+ ],
3750
+ "qqSecret" => [
3751
+ "label" => esc_html__("QQ AppKey", "wpdiscuz"),
3752
+ "label_original" => "QQ AppKey",
3753
+ "description" => "",
3754
+ "description_original" => "",
3755
+ "docurl" => "",
3756
+ ],
3757
+ "enableBaiduLogin" => [
3758
+ "label" => esc_html__("Baidu Login Button", "wpdiscuz"),
3759
+ "label_original" => "Baidu Login Button",
3760
+ "description" => "",
3761
+ "description_original" => "",
3762
+ "docurl" => "",
3763
+ ],
3764
+ "baiduAppID" => [
3765
+ "label" => esc_html__("Baidu Client ID", "wpdiscuz"),
3766
+ "label_original" => "Baidu Client ID",
3767
+ "description" => "",
3768
+ "description_original" => "",
3769
+ "docurl" => "",
3770
+ ],
3771
+ "baiduSecret" => [
3772
+ "label" => esc_html__("Baidu Client Secret", "wpdiscuz"),
3773
+ "label_original" => "Baidu Client Secret",
3774
+ "description" => "",
3775
+ "description_original" => "",
3776
+ "docurl" => "",
3777
+ ],
3778
+ "enableVkLogin" => [
3779
+ "label" => esc_html__("VK Login Button", "wpdiscuz"),
3780
+ "label_original" => "VK Login Button",
3781
+ "description" => "",
3782
+ "description_original" => "",
3783
+ "docurl" => "",
3784
+ ],
3785
+ "enableVkShare" => [
3786
+ "label" => esc_html__("VK Share Button", "wpdiscuz"),
3787
+ "label_original" => "VK Share Button",
3788
+ "description" => "",
3789
+ "description_original" => "",
3790
+ "docurl" => "",
3791
+ ],
3792
+ "vkAppID" => [
3793
+ "label" => esc_html__("VK Application ID", "wpdiscuz"),
3794
+ "label_original" => "VK Application ID",
3795
+ "description" => "",
3796
+ "description_original" => "",
3797
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/",
3798
+ ],
3799
+ "vkAppSecret" => [
3800
+ "label" => esc_html__("VK Secure Key", "wpdiscuz"),
3801
+ "label_original" => "VK Secure Key",
3802
+ "description" => "",
3803
+ "description_original" => "",
3804
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/",
3805
+ ],
3806
+ "enableOkLogin" => [
3807
+ "label" => esc_html__("OK Login Button", "wpdiscuz"),
3808
+ "label_original" => "OK Login Button",
3809
+ "description" => "",
3810
+ "description_original" => "",
3811
+ "docurl" => "",
3812
+ ],
3813
+ "enableOkShare" => [
3814
+ "label" => esc_html__("OK Share Button", "wpdiscuz"),
3815
+ "label_original" => "OK Share Button",
3816
+ "description" => "",
3817
+ "description_original" => "",
3818
+ "docurl" => "",
3819
+ ],
3820
+ "okAppID" => [
3821
+ "label" => esc_html__("OK Application ID", "wpdiscuz"),
3822
+ "label_original" => "OK Application ID",
3823
+ "description" => "",
3824
+ "description_original" => "",
3825
+ "docurl" => "https://apiok.ru/en/dev/app/create",
3826
+ ],
3827
+ "okAppKey" => [
3828
+ "label" => esc_html__("OK Application Key", "wpdiscuz"),
3829
+ "label_original" => "OK Application Key",
3830
+ "description" => "",
3831
+ "description_original" => "",
3832
+ "docurl" => "https://apiok.ru/en/dev/app/create",
3833
+ ],
3834
+ "okAppSecret" => [
3835
+ "label" => esc_html__("OK Application Secret", "wpdiscuz"),
3836
+ "label_original" => "OK Application Secret",
3837
+ "description" => "",
3838
+ "description_original" => "",
3839
+ "docurl" => "https://apiok.ru/en/dev/app/create",
3840
+ ],
3841
+ ],
3842
+ ],
3843
+ WpdiscuzCore::TAB_RATING => [
3844
+ "title" => esc_html__("Article and Comment Rating", "wpdiscuz"),
3845
+ "title_original" => "Article and Comment Rating",
3846
+ "icon" => "box-rating.png",
3847
+ "icon-height" => "46px",
3848
+ "status" => "ok",
3849
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RATING . ".php",
3850
+ "options" => [
3851
+ "enablePostRatingSchema" => [
3852
+ "label" => esc_html__("Enable Aggregate Rating Schema", "wpdiscuz"),
3853
+ "label_original" => "Enable Aggregate Rating Schema",
3854
+ "description" => esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first.", "wpdiscuz"),
3855
+ "description" => sprintf(esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first. If your website does not sell Products, we do not recommend activating this option. For more details, please %s.", "wpdiscuz"), "<a href='https://wpdiscuz.com/community/f-a-q/post-rating-using-aggregate-rating-schema/' target='_blank'>read our documentation</a>"),
3856
+ "description_original" => "Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first. If your website does not sell Products, we do not recommend activating this option. For more details, please <a href='https://wpdiscuz.com/community/f-a-q/post-rating-using-aggregate-rating-schema/' target='_blank'>read our documentation</a>.",
3857
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#enable-aggregate-rating-schema",
3858
+ ],
3859
+ "displayRatingOnPost" => [
3860
+ "label" => esc_html__("Display Ratings", "wpdiscuz"),
3861
+ "label_original" => "Display Ratings",
3862
+ "description" => "",
3863
+ "description_original" => "",
3864
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#display-ratings",
3865
+ ],
3866
+ "ratingStarColors" => [
3867
+ "label" => esc_html__("Rating Star Colors", "wpdiscuz"),
3868
+ "label_original" => "Rating Star Colors",
3869
+ "description" => "",
3870
+ "description_original" => "",
3871
+ "docurl" => "",
3872
+ ],
3873
+ ],
3874
+ ],
3875
+ WpdiscuzCore::TAB_THREAD_DISPLAY => [
3876
+ "title" => esc_html__("Comment Thread Displaying", "wpdiscuz"),
3877
+ "title_original" => "Comment Thread Displaying",
3878
+ "icon" => "box-threads.png",
3879
+ "icon-height" => "58px",
3880
+ "status" => "ok",
3881
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_DISPLAY . ".php",
3882
+ "options" => [
3883
+ "firstLoadWithAjax" => [
3884
+ "label" => esc_html__("Comment List Loading Type", "wpdiscuz"),
3885
+ "label_original" => "Comment List Loading Type",
3886
+ "description" => esc_html__("Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.", "wpdiscuz"),
3887
+ "description_original" => "Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.",
3888
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comment-list-loading-type",
3889
+ ],
3890
+ "isLoadOnlyParentComments" => [
3891
+ "label" => __("Display only parent comments and <u>view replies &or;</u> button", "wpdiscuz"),
3892
+ "label_original" => "Display only parent comments and <u>view replies &or;</u> button",
3893
+ "description" => esc_html__("If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.", "wpdiscuz"),
3894
+ "description_original" => "If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.",
3895
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-only-parent-comments-and-view-replies-%E2%88%A8-button",
3896
+ ],
3897
+ "showReactedFilterButton" => [
3898
+ "label" => esc_html__('Display "Most Reacted Comments" filter button', "wpdiscuz"),
3899
+ "label_original" => 'Display "Most Reacted Comments" filter button',
3900
+ "description" => "",
3901
+ "description_original" => "",
3902
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Cmost-reacted-comments%E2%80%9D-filter-button",
3903
+ ],
3904
+ "showHottestFilterButton" => [
3905
+ "label" => esc_html__('Display "Hottest Comment Threads" filter button', "wpdiscuz"),
3906
+ "label_original" => 'Display "Hottest Comment Threads" filter button',
3907
+ "description" => "",
3908
+ "description_original" => "",
3909
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Chottest-comment-threads%E2%80%9D-filter-button",
3910
+ ],
3911
+ "showSortingButtons" => [
3912
+ "label" => esc_html__("Display Comment Sorting Options", "wpdiscuz"),
3913
+ "label_original" => "Display Comment Sorting Options",
3914
+ "description" => esc_html__("This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.", "wpdiscuz"),
3915
+ "description_original" => "This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.",
3916
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-comment-sorting-options",
3917
+ ],
3918
+ "mostVotedByDefault" => [
3919
+ "label" => esc_html__('Set comments order to "Most voted" by default', "wpdiscuz"),
3920
+ "label_original" => 'Set comments order to "Most voted" by default',
3921
+ "description" => "",
3922
+ "description_original" => "",
3923
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#set-comments-order-to-%E2%80%9Cmost-voted%E2%80%9D-by-default",
3924
+ ],
3925
+ "reverseChildren" => [
3926
+ "label" => esc_html__("Reverse Child Comments Order", "wpdiscuz"),
3927
+ "label_original" => "Reverse Child Comments Order",
3928
+ "description" => esc_html__("By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.", "wpdiscuz"),
3929
+ "description_original" => "By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.",
3930
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#reverse-child-comments-order",
3931
+ ],
3932
+ "commentListLoadType" => [
3933
+ "label" => esc_html__("Comments Pagination Type", "wpdiscuz"),
3934
+ "label_original" => "Comments Pagination Type",
3935
+ "description" => esc_html__('You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.', "wpdiscuz"),
3936
+ "description_original" => 'You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.',
3937
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comments-pagination-type",
3938
+ ],
3939
+ "highlightUnreadComments" => [
3940
+ "label" => esc_html__("Highlight Unread Comments", "wpdiscuz"),
3941
+ "label_original" => "Highlight Unread Comments",
3942
+ "description" => "",
3943
+ "description_original" => "",
3944
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#highlight-unread-comments",
3945
+ ],
3946
+ "scrollToComment" => [
3947
+ "label" => __("Scroll to the comment after posting", "wpdiscuz"),
3948
+ "label_original" => "Scroll to the comment after posting",
3949
+ "description" => "",
3950
+ "description_original" => "",
3951
+ "docurl" => "",
3952
+ ],
3953
+ "orderCommentsBy" => [
3954
+ "label" => __("Newest and oldest comment ordering by", "wpdiscuz"),
3955
+ "label_original" => "Newest and oldest comment ordering by",
3956
+ "description" => "",
3957
+ "description_original" => "",
3958
+ "docurl" => "",
3959
+ ],
3960
+ ],
3961
+ ],
3962
+ WpdiscuzCore::TAB_THREAD_LAYOUTS => [
3963
+ "title" => esc_html__("Comment Thread Features", "wpdiscuz"),
3964
+ "title_original" => "Comment Thread Features",
3965
+ "icon" => "box-layouts.png",
3966
+ "icon-height" => "50px",
3967
+ "status" => "ok",
3968
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_LAYOUTS . ".php",
3969
+ "options" => [
3970
+ "showCommentLink" => [
3971
+ "label" => esc_html__("Show Comment Link", "wpdiscuz"),
3972
+ "label_original" => "Show Comment Link",
3973
+ "description" => "",
3974
+ "description_original" => "",
3975
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#show-comment-link",
3976
+ ],
3977
+ "showCommentDate" => [
3978
+ "label" => esc_html__("Show Comment Date", "wpdiscuz"),
3979
+ "label_original" => "Show Comment Date",
3980
+ "description" => "",
3981
+ "description_original" => "",
3982
+ "docurl" => "",
3983
+ ],
3984
+ "showVotingButtons" => [
3985
+ "label" => esc_html__("Show Voting Buttons", "wpdiscuz"),
3986
+ "label_original" => "Show Voting Buttons",
3987
+ "description" => "",
3988
+ "description_original" => "",
3989
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3990
+ ],
3991
+ "votingButtonsIcon" => [
3992
+ "label" => esc_html__("Voting Buttons Icon", "wpdiscuz"),
3993
+ "label_original" => "Voting Buttons Icon",
3994
+ "description" => "",
3995
+ "description_original" => "",
3996
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3997
+ ],
3998
+ "votingButtonsStyle" => [
3999
+ "label" => esc_html__("Comment Voting Result Mode", "wpdiscuz"),
4000
+ "label_original" => "Comment Voting Result Mode",
4001
+ "description" => "",
4002
+ "description_original" => "",
4003
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
4004
+ ],
4005
+ "enableDislikeButton" => [
4006
+ "label" => esc_html__("Enable down vote button (dislike)", "wpdiscuz"),
4007
+ "label_original" => "Enable down vote button (dislike)",
4008
+ "description" => "",
4009
+ "description_original" => "",
4010
+ "docurl" => "",
4011
+ ],
4012
+ "isGuestCanVote" => [
4013
+ "label" => esc_html__("Allow Guests to Vote for Comments", "wpdiscuz"),
4014
+ "label_original" => "Allow Guests to Vote for Comments",
4015
+ "description" => "",
4016
+ "description_original" => "",
4017
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
4018
+ ],
4019
+ "highlightVotingButtons" => [
4020
+ "label" => esc_html__("Highlight Voting Buttons for Voters", "wpdiscuz"),
4021
+ "label_original" => "Highlight Voting Buttons for Voters",
4022
+ "description" => esc_html__("This allows users to see own voted comments.", "wpdiscuz"),
4023
+ "description_original" => "This allows users to see own voted comments.",
4024
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
4025
+ ],
4026
+ "showAvatars" => [
4027
+ "label" => esc_html__("Display Avatars", "wpdiscuz"),
4028
+ "label_original" => "Display Avatars",
4029
+ "description" => esc_html__("This option only related to avatars in comment system. For sitewide avatar control, please use WordPress native avatar settings in Dashboard > Settings > Discussions admin page.", "wpdiscuz"),
4030
+ "description_original" => "",
4031
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4032
+ ],
4033
+ "defaultAvatarUrlForUser" => [
4034
+ "label" => esc_html__("Default Avatar Source URL for Users", "wpdiscuz"),
4035
+ "label_original" => "Default Avatar Source URL for Users",
4036
+ "description" => "",
4037
+ "description_original" => "",
4038
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4039
+ ],
4040
+ "defaultAvatarUrlForGuest" => [
4041
+ "label" => esc_html__("Default Avatar Source URL for Guests", "wpdiscuz"),
4042
+ "label_original" => "Default Avatar Source URL for Guests",
4043
+ "description" => "",
4044
+ "description_original" => "",
4045
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4046
+ ],
4047
+ "changeAvatarsEverywhere" => [
4048
+ "label" => esc_html__("Enable Sitewide Usage of Default Avatars", "wpdiscuz"),
4049
+ "label_original" => "Enable Sitewide Usage of Default Avatars",
4050
+ "description" => "",
4051
+ "description_original" => "",
4052
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
4053
+ ],
4054
+ ],
4055
+ ],
4056
+ WpdiscuzCore::TAB_THREAD_STYLES => [
4057
+ "title" => esc_html__("Styles and Colors", "wpdiscuz"),
4058
+ "title_original" => "Styles and Colors",
4059
+ "icon" => "box-styles.png",
4060
+ "icon-height" => "56px",
4061
+ "status" => "ok",
4062
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_STYLES . ".php",
4063
+ "options" => [
4064
+ "theme" => [
4065
+ "label" => esc_html__("Comment Form and Comment List Style", "wpdiscuz"),
4066
+ "label_original" => "Comment Form and Comment List Style",
4067
+ "description" => esc_html__("Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.", "wpdiscuz"),
4068
+ "description_original" => "Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.",
4069
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#comment-form-and-comment-list-style",
4070
+ ],
4071
+ "styleSpecificColors" => [
4072
+ "label" => esc_html__("Style Specific Colors", "wpdiscuz"),
4073
+ "label_original" => "Style Specific Colors",
4074
+ "description" => esc_html__("These options allows you manage comment section colors individaly for the Default and Dark Styles", "wpdiscuz"),
4075
+ "description_original" => "These options allows you manage comment section colors individaly for the Default and Dark Styles",
4076
+ "docurl" => "",
4077
+ ],
4078
+ "colors" => [
4079
+ "label" => esc_html__("General Colors", "wpdiscuz"),
4080
+ "label_original" => "General Colors",
4081
+ "description" => "",
4082
+ "description_original" => "",
4083
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#colors",
4084
+ ],
4085
+ "commentTextSize" => [
4086
+ "label" => esc_html__("Comment Text Size", "wpdiscuz"),
4087
+ "label_original" => "Comment Text Size",
4088
+ "description" => "",
4089
+ "description_original" => "",
4090
+ "docurl" => "",
4091
+ ],
4092
+ "enableFontAwesome" => [
4093
+ "label" => esc_html__("Load Font Awesome css lib", "wpdiscuz"),
4094
+ "label_original" => "Load Font Awesome css lib",
4095
+ "description" => esc_html__("IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.", "wpdiscuz"),
4096
+ "description_original" => "IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.",
4097
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#load-font-awesome-css-lib",
4098
+ ],
4099
+ "customCss" => [
4100
+ "label" => esc_html__("Custom CSS Code", "wpdiscuz"),
4101
+ "label_original" => "Custom CSS Code",
4102
+ "description" => "",
4103
+ "description_original" => "",
4104
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#custom-css-code",
4105
+ ],
4106
+ ],
4107
+ ],
4108
+ WpdiscuzCore::TAB_SUBSCRIPTION => [
4109
+ "title" => esc_html__("Subscription and User Following", "wpdiscuz"),
4110
+ "title_original" => "Subscription and User Following",
4111
+ "icon" => "box-email.png",
4112
+ "icon-height" => "58px",
4113
+ "status" => "ok",
4114
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SUBSCRIPTION . ".php",
4115
+ "options" => [
4116
+ "enableUserMentioning" => [
4117
+ "label" => esc_html__("Enable User Mentioning", "wpdiscuz"),
4118
+ "label_original" => "Enable User Mentioning",
4119
+ "description" => sprintf(__("This option allows mentioning users in comments using @nicename method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", "wpdiscuz"), '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
4120
+ "description_original" => sprintf("This option allows mentioning users in comments using @nicename method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
4121
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-user-mentioning",
4122
+ ],
4123
+ "sendMailToMentionedUsers" => [
4124
+ "label" => esc_html__("Send E-Mail Notification to Mentioned Users", "wpdiscuz"),
4125
+ "label_original" => "Send E-Mail Notification to Mentioned Users",
4126
+ "description" => "",
4127
+ "description_original" => "",
4128
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#send-e-mail-notification-to-mentioned-users",
4129
+ ],
4130
+ "isNotifyOnCommentApprove" => [
4131
+ "label" => esc_html__("Notify comment author once comment is approved", "wpdiscuz"),
4132
+ "label_original" => "Notify comment author once comment is approved",
4133
+ "description" => "",
4134
+ "description_original" => "",
4135
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#notify-comment-author-once-comment-is-approved",
4136
+ ],
4137
+ "enableMemberConfirm" => [
4138
+ "label" => esc_html__("Enable subscription confirmation for registered users", "wpdiscuz"),
4139
+ "label_original" => "Enable subscription confirmation for registered users",
4140
+ "description" => "",
4141
+ "description_original" => "",
4142
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-registered-users",
4143
+ ],
4144
+ "enableGuestsConfirm" => [
4145
+ "label" => esc_html__("Enable subscription confirmation for guests", "wpdiscuz"),
4146
+ "label_original" => "Enable subscription confirmation for guests",
4147
+ "description" => "",
4148
+ "description_original" => "",
4149
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-guests",
4150
+ ],
4151
+ "subscriptionType" => [
4152
+ "label" => esc_html__("Subscription types in Subscription Bar drop-down", "wpdiscuz"),
4153
+ "label_original" => "Subscription types in Subscription Bar drop-down",
4154
+ "description" => "",
4155
+ "description_original" => "",
4156
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#subscription-types-in-subscription-bar-drop-down",
4157
+ ],
4158
+ "showReplyCheckbox" => [
4159
+ "label" => esc_html__('Display "Notify of new replies to this comment" option in comment form', "wpdiscuz"),
4160
+ "label_original" => 'Display "Notify of new replies to this comment" option in comment form',
4161
+ "description" => esc_html__("wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.", "wpdiscuz"),
4162
+ "description_original" => "wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.",
4163
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#display-%E2%80%9Cnotify-of-new-replies-to-this-comment%E2%80%9D-option-in-commen",
4164
+ ],
4165
+ "isReplyDefaultChecked" => [
4166
+ "label" => esc_html__('Keep checked the "Notify of new replies to this comment" option by default', "wpdiscuz"),
4167
+ "label_original" => 'Keep checked the "Notify of new replies to this comment" option by default',
4168
+ "description" => "",
4169
+ "description_original" => "",
4170
+ "docurl" => "",
4171
+ ],
4172
+ "usePostmaticForCommentNotification" => [
4173
+ "label" => esc_html__("Use Postmatic for subscriptions and commenting by email", "wpdiscuz"),
4174
+ "label_original" => "Use Postmatic for subscriptions and commenting by email",
4175
+ "description" => esc_html__("Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.", "wpdiscuz"),
4176
+ "description_original" => "Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.",
4177
+ "docurl" => "",
4178
+ ],
4179
+ "isFollowActive" => [
4180
+ "label" => esc_html__("Enable User Following Feature", "wpdiscuz"),
4181
+ "label_original" => "Enable User Following Feature",
4182
+ "description" => "",
4183
+ "description_original" => "",
4184
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#user-subscription-follow-users",
4185
+ ],
4186
+ "disableFollowConfirmForUsers" => [
4187
+ "label" => esc_html__("Follow users without email confirmation", "wpdiscuz"),
4188
+ "label_original" => "Follow users without email confirmation",
4189
+ "description" => "",
4190
+ "description_original" => "",
4191
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#follow-users-without-email-confirmation",
4192
+ ],
4193
+ ],
4194
+ ],
4195
+ WpdiscuzCore::TAB_LABELS => [
4196
+ "title" => esc_html__("User Labels and Badges", "wpdiscuz"),
4197
+ "title_original" => "User Labels and Badges",
4198
+ "icon" => "box-badges.png",
4199
+ "icon-height" => "56px",
4200
+ "status" => "ok",
4201
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LABELS . ".php",
4202
+ "options" => [
4203
+ "blogRoleLabels" => [
4204
+ "label" => esc_html__("Display Comment Author Labels", "wpdiscuz"),
4205
+ "label_original" => "Display Comment Author Labels",
4206
+ "description" => "",
4207
+ "description_original" => "",
4208
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#display-comment-author-labels",
4209
+ ],
4210
+ "commenterLabelColors" => [
4211
+ "label" => esc_html__("Comment Author Label Colors by User Role", "wpdiscuz"),
4212
+ "label_original" => "Comment Author Label Colors by User Role",
4213
+ "description" => "",
4214
+ "description_original" => "",
4215
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#comment-author-label-colors-by-user-role",
4216
+ ],
4217
+ ],
4218
+ ],
4219
+ WpdiscuzCore::TAB_MODERATION => [
4220
+ "title" => esc_html__("Comment Moderation", "wpdiscuz"),
4221
+ "title_original" => "Comment Moderation",
4222
+ "icon" => "box-moderation.png",
4223
+ "icon-height" => "50px",
4224
+ "status" => "ok",
4225
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_MODERATION . ".php",
4226
+ "options" => [
4227
+ "commentEditableTime" => [
4228
+ "label" => esc_html__("Edit Button - Allow comment editing for", "wpdiscuz"),
4229
+ "label_original" => "Edit Button - Allow comment editing for",
4230
+ "description" => "",
4231
+ "description_original" => "",
4232
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#edit-button-%E2%80%93-allow-comment-editing-for",
4233
+ ],
4234
+ "enableEditingWhenHaveReplies" => [
4235
+ "label" => esc_html__("Enable editing for replied comments", "wpdiscuz"),
4236
+ "label_original" => "Enable editing for replied comments",
4237
+ "description" => "",
4238
+ "description_original" => "",
4239
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#enable-editing-for-replied-comments",
4240
+ ],
4241
+ "displayEditingInfo" => [
4242
+ "label" => esc_html__("Display comment editing Information", "wpdiscuz"),
4243
+ "label_original" => "Display comment editing Information",
4244
+ "description" => "",
4245
+ "description_original" => "",
4246
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#display-comment-editing-information",
4247
+ ],
4248
+ "enableStickButton" => [
4249
+ "label" => esc_html__("Stick Button - Stick a comment thread", "wpdiscuz"),
4250
+ "label_original" => "Stick Button - Stick a comment thread",
4251
+ "description" => "",
4252
+ "description_original" => "",
4253
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#stick-button-%E2%80%93-stick-a-comment-thread",
4254
+ ],
4255
+ "enableCloseButton" => [
4256
+ "label" => esc_html__("Close Button - Close a comment thread", "wpdiscuz"),
4257
+ "label_original" => "Close Button - Close a comment thread",
4258
+ "description" => "",
4259
+ "description_original" => "",
4260
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#close-button-%E2%80%93-close-a-comment-thread",
4261
+ ],
4262
+ "userCommentsLimit" => [
4263
+ "label" => esc_html__("Limit Comments per User", "wpdiscuz"),
4264
+ "label_original" => "Limit Comments per User",
4265
+ "description" => esc_html__("This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.", "wpdiscuz"),
4266
+ "description_original" => "This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.",
4267
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#limit-comments-per-user",
4268
+ ],
4269
+ ],
4270
+ ],
4271
+ WpdiscuzCore::TAB_CONTENT => [
4272
+ "title" => esc_html__("Comment Content and Media", "wpdiscuz"),
4273
+ "title_original" => "Comment Content and Media",
4274
+ "icon" => "box-content.png",
4275
+ "icon-height" => "50px",
4276
+ "status" => "ok",
4277
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_CONTENT . ".php",
4278
+ "options" => [
4279
+ "commentTextLength" => [
4280
+ "label" => esc_html__("Comment Text Length", "wpdiscuz"),
4281
+ "label_original" => "Comment Text Length",
4282
+ "description" => esc_html__("Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.", "wpdiscuz"),
4283
+ "description_original" => "Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.",
4284
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#comment-text-length",
4285
+ ],
4286
+ "replyTextLength" => [
4287
+ "label" => esc_html__("Reply Text Length", "wpdiscuz"),
4288
+ "label_original" => "Reply Text Length",
4289
+ "description" => esc_html__("Allows to set minimum and maximum number of chars can be inserted in reply textarea. Leave the max value empty to remove the limit.", "wpdiscuz"),
4290
+ "description_original" => "Allows to set minimum and maximum number of chars can be inserted in reply textarea. Leave the max value empty to remove the limit.",
4291
+ "docurl" => "",
4292
+ ],
4293
+ "enableImageConversion" => [
4294
+ "label" => esc_html__("Image Source URL to Image Conversion", "wpdiscuz"),
4295
+ "label_original" => "Image Source URL to Image Conversion",
4296
+ "description" => "",
4297
+ "description_original" => "",
4298
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#image-source-url-to-image-conversion",
4299
+ ],
4300
+ "enableShortcodes" => [
4301
+ "label" => esc_html__("Enable WordPress Shortcodes in Comment Content", "wpdiscuz"),
4302
+ "label_original" => "Enable WordPress Shortcodes in Comment Content",
4303
+ "description" => esc_html__("This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.", "wpdiscuz"),
4304
+ "description_original" => "This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.",
4305
+ "docurl" => "",
4306
+ ],
4307
+ "commentReadMoreLimit" => [
4308
+ "label" => esc_html__("The number of words before breaking comment text (Read more)", "wpdiscuz"),
4309
+ "label_original" => "The number of words before breaking comment text (Read more)",
4310
+ "description" => esc_html__("Set this option value 0, to turn off comment text breaking function.", "wpdiscuz"),
4311
+ "description_original" => "Set this option value 0, to turn off comment text breaking function.",
4312
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#the-number-of-words-before-breaking-comment-text-read-more",
4313
+ ],
4314
+ "wmuIsEnabled" => [
4315
+ "label" => esc_html__("Enable Media Uploading", "wpdiscuz"),
4316
+ "label_original" => "Enable Media Uploading",
4317
+ "description" => esc_html__("This option allows commenters to attach an image with comments.", "wpdiscuz"),
4318
+ "description_original" => "This option allows commenters to attach an image with comments.",
4319
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-media-uploading",
4320
+ ],
4321
+ "wmuIsGuestAllowed" => [
4322
+ "label" => esc_html__("Allow Media Uploading for Guests", "wpdiscuz"),
4323
+ "label_original" => "Allow Media Uploading for Guests",
4324
+ "description" => "",
4325
+ "description_original" => "",
4326
+ "docurl" => "",
4327
+ ],
4328
+ "wmuIsLightbox" => [
4329
+ "label" => esc_html__("Enable Lightbox for Attached Images", "wpdiscuz"),
4330
+ "label_original" => "Enable Lightbox for Attached Images",
4331
+ "description" => "",
4332
+ "description_original" => "",
4333
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-lightbox-for-attached-images",
4334
+ ],
4335
+ "wmuMimeTypes" => [
4336
+ "label" => esc_html__("Allowed File Types", "wpdiscuz"),
4337
+ "label_original" => "Allowed File Types",
4338
+ "description" => "",
4339
+ "description_original" => "",
4340
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#allowed-file-types",
4341
+ ],
4342
+ "wmuMaxFileSize" => [
4343
+ "label" => esc_html__("Max Uploaded Size", "wpdiscuz"),
4344
+ "label_original" => "Max Uploaded Size",
4345
+ "description" => esc_html__("You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.", "wpdiscuz"),
4346
+ "description_original" => "You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.",
4347
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#max-uploaded-size",
4348
+ ],
4349
+ "wmuIsShowFilesDashboard" => [
4350
+ "label" => esc_html__("Show Comments Media in Dashboard", "wpdiscuz"),
4351
+ "label_original" => "Show Comments Media in Dashboard",
4352
+ "description" => "",
4353
+ "description_original" => "",
4354
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#show-comments-media-in-dashboard",
4355
+ ],
4356
+ "wmuSingleImageSize" => [
4357
+ "label" => esc_html__("Single Image Sizes in Comments", "wpdiscuz"),
4358
+ "label_original" => "Single Image Sizes in Comments",
4359
+ "description" => "",
4360
+ "description_original" => "",
4361
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#single-image-sizes-in-comments",
4362
+ ],
4363
+ "wmuImageSizes" => [
4364
+ "label" => esc_html__("Generate Thumbnail Sizes", "wpdiscuz"),
4365
+ "label_original" => "Generate Thumbnail Sizes",
4366
+ "description" => esc_html__("Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.", "wpdiscuz"),
4367
+ "description_original" => "Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.",
4368
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#generate-thumbnail-sizes",
4369
+ ],
4370
+ ],
4371
+ ],
4372
+ WpdiscuzCore::TAB_LIVE => [
4373
+ "title" => esc_html__("Live Commenting and Notifications", "wpdiscuz"),
4374
+ "title_original" => "Live Commenting and Notifications",
4375
+ "icon" => "box-bubble.png",
4376
+ "icon-height" => "70px",
4377
+ "status" => "new",
4378
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LIVE . ".php",
4379
+ "options" => [
4380
+ "bubble" => [
4381
+ "label" => esc_html__("Comment Bubble", "wpdiscuz"),
4382
+ "label_original" => "Comment Bubble",
4383
+ "description" => esc_html__("Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.", "wpdiscuz"),
4384
+ "description_original" => "Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.",
4385
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble",
4386
+ ],
4387
+ "bubbleLiveUpdate" => [
4388
+ "label" => esc_html__("Comment Bubble Live Update", "wpdiscuz"),
4389
+ "label_original" => "Comment Bubble Live Update",
4390
+ "description" => "",
4391
+ "description_original" => "",
4392
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-live-update",
4393
+ ],
4394
+ "bubbleLocation" => [
4395
+ "label" => esc_html__("Comment Bubble Location", "wpdiscuz"),
4396
+ "label_original" => "Comment Bubble Location",
4397
+ "description" => "",
4398
+ "description_original" => "",
4399
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-location",
4400
+ ],
4401
+ "bubbleShowNewCommentMessage" => [
4402
+ "label" => esc_html__("Bubble - Notify on New Comments", "wpdiscuz"),
4403
+ "label_original" => "Bubble - Notify on New Comments",
4404
+ "description" => esc_html__("If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.", "wpdiscuz"),
4405
+ "description_original" => "If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.",
4406
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-notify-on-new-comments",
4407
+ ],
4408
+ "bubbleHintTimeout" => [
4409
+ "label" => esc_html__("Bubble - Invite to comment in X seconds", "wpdiscuz"),
4410
+ "label_original" => "Bubble - Invite to comment in X seconds",
4411
+ "description" => esc_html__("In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.", "wpdiscuz"),
4412
+ "description_original" => "In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.",
4413
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-invite-to-comment-in-x-seconds",
4414
+ ],
4415
+ "bubbleHintHideTimeout" => [
4416
+ "label" => esc_html__("Bubble - Hide the invitation message in X seconds", "wpdiscuz"),
4417
+ "label_original" => "Bubble - Hide the invitation message in X seconds",
4418
+ "description" => "",
4419
+ "description_original" => "",
4420
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-hide-the-invitation-message-in-x-seconds",
4421
+ ],
4422
+ "commentListUpdateType" => [
4423
+ "label" => esc_html__("Live Update", "wpdiscuz"),
4424
+ "label_original" => "Live Update",
4425
+ "description" => esc_html__("wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.", "wpdiscuz"),
4426
+ "description_original" => "wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.",
4427
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#live-update",
4428
+ ],
4429
+ "liveUpdateGuests" => [
4430
+ "label" => esc_html__("Enable Live Update for Guests", "wpdiscuz"),
4431
+ "label_original" => "Enable Live Update for Guests",
4432
+ "description" => "",
4433
+ "description_original" => "",
4434
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#enable-live-update-for-guests",
4435
+ ],
4436
+ "commentListUpdateTimer" => [
4437
+ "label" => esc_html__("Update Comment List Every", "wpdiscuz"),
4438
+ "label_original" => "Update Comment List Every",
4439
+ "description" => "",
4440
+ "description_original" => "",
4441
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#update-comment-list-every-x-seconds",
4442
+ ],
4443
+ ],
4444
+ ],
4445
+ WpdiscuzCore::TAB_INLINE => [
4446
+ "title" => esc_html__("Inline Commenting", "wpdiscuz"),
4447
+ "title_original" => "Inline Commenting",
4448
+ "icon" => "box-feedback.png",
4449
+ "icon-height" => "56px",
4450
+ "status" => "new",
4451
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_INLINE . ".php",
4452
+ "options" => [
4453
+ "showInlineFilterButton" => [
4454
+ "label" => esc_html__("Display filter button to load inline feedbacks", "wpdiscuz"),
4455
+ "label_original" => "Display filter button to load inline feedbacks",
4456
+ "description" => esc_html__("This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).", "wpdiscuz"),
4457
+ "description_original" => "This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).",
4458
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#display-filter-button-to-load-inline-feedbacks",
4459
+ ],
4460
+ "inlineFeedbackAttractionType" => [
4461
+ "label" => esc_html__('Animation for "Leave a Feedback" button in article content', "wpdiscuz"),
4462
+ "label_original" => 'Animation for "Leave a Feedback" button in article content',
4463
+ "description" => esc_html__('Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.', "wpdiscuz"),
4464
+ "description_original" => 'Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.',
4465
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#animation-for-%E2%80%9Cleave-a-feedback%E2%80%9D-button-in-article-content",
4466
+ ],
4467
+ ],
4468
+ ],
4469
+ WpdiscuzCore::TAB_GENERAL => [
4470
+ "title" => esc_html__("General Settings", "wpdiscuz"),
4471
+ "title_original" => "General Settings",
4472
+ "icon" => "box-general.png",
4473
+ "icon-height" => "56px",
4474
+ "status" => "ok",
4475
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_GENERAL . ".php",
4476
+ "options" => [
4477
+ "isEnableOnHome" => [
4478
+ "label" => esc_html__("Enable wpDiscuz on Home Page", "wpdiscuz"),
4479
+ "label_original" => "Enable wpDiscuz on Home Page",
4480
+ "description" => "",
4481
+ "description_original" => "",
4482
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#enable-wpdiscuz-on-home-page",
4483
+ ],
4484
+ "isNativeAjaxEnabled" => [
4485
+ "label" => esc_html__("Use WordPress native AJAX functions", "wpdiscuz"),
4486
+ "label_original" => "Use WordPress native AJAX functions",
4487
+ "description" => esc_html__("By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.", "wpdiscuz"),
4488
+ "description_original" => "By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.",
4489
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-native-ajax-functions",
4490
+ ],
4491
+ "loadComboVersion" => [
4492
+ "label" => esc_html__("Combine JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
4493
+ "label_original" => "Combine JS and CSS Files to Optimize Page Loading Speed",
4494
+ "description" => "",
4495
+ "description_original" => "",
4496
+ "docurl" => "",
4497
+ ],
4498
+ "loadMinVersion" => [
4499
+ "label" => esc_html__("Minify JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
4500
+ "label_original" => "Minify JS and CSS Files to Optimize Page Loading Speed",
4501
+ "description" => "",
4502
+ "description_original" => "",
4503
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#load-min-versions",
4504
+ ],
4505
+ "commentLinkFilter" => [
4506
+ "label" => esc_html__("Secure comment content in HTTPS protocol.", "wpdiscuz"),
4507
+ "label_original" => "Secure comment content in HTTPS protocol.",
4508
+ "description" => esc_html__("This option detects images and other contents with non-https source URLs and fix according to your selected logic.", "wpdiscuz"),
4509
+ "description_original" => "This option detects images and other contents with non-https source URLs and fix according to your selected logic.",
4510
+ "docurl" => "",
4511
+ ],
4512
+ "redirectPage" => [
4513
+ "label" => esc_html__("Redirect First Comment to", "wpdiscuz"),
4514
+ "label_original" => "Redirect First Comment to",
4515
+ "description" => "",
4516
+ "description_original" => "",
4517
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#redirect-first-comment-to",
4518
+ ],
4519
+ "simpleCommentDate" => [
4520
+ "label" => esc_html__("Use WordPress Date/Time Format", "wpdiscuz"),
4521
+ "label_original" => "Use WordPress Date/Time Format",
4522
+ "description" => esc_html__("wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.", "wpdiscuz"),
4523
+ "description_original" => "wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.",
4524
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-date-time-format",
4525
+ ],
4526
+ "dateDiffFormat" => [
4527
+ "label" => esc_html__("Structure of Human Readable Date Format", "wpdiscuz"),
4528
+ "label_original" => "Structure of Human Readable Date Format",
4529
+ "description" => esc_html__("By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.", "wpdiscuz"),
4530
+ "description_original" => "By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.",
4531
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#structure-of-human-readable-date-format",
4532
+ ],
4533
+ "isUsePoMo" => [
4534
+ "label" => esc_html__("Use Plugin .PO/.MO Files", "wpdiscuz"),
4535
+ "label_original" => "Use Plugin .PO/.MO Files",
4536
+ "description" => esc_html__("wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.", "wpdiscuz"),
4537
+ "description_original" => "wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.",
4538
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-plugin-po-mo-files",
4539
+ ],
4540
+ "showPluginPoweredByLink" => [
4541
+ "label" => esc_html__("Help wpDiscuz to grow allowing people to recognize which comment plugin you use", "wpdiscuz"),
4542
+ "label_original" => "Help wpDiscuz to grow allowing people to recognize which comment plugin you use",
4543
+ "description" => esc_html__("Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.", "wpdiscuz"),
4544
+ "description_original" => "Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.",
4545
+ "docurl" => "",
4546
+ ],
4547
+ "isCacheEnabled" => [
4548
+ "label" => esc_html__("Enable Cache", "wpdiscuz"),
4549
+ "label_original" => "Enable Cache",
4550
+ "description" => esc_html__("Enable Comments and Users Cache", "wpdiscuz"),
4551
+ "description_original" => "Enable Comment and Comment Author Cache",
4552
+ "docurl" => "",
4553
+ ],
4554
+ "cacheTimeout" => [
4555
+ "label" => esc_html__("Cache Reset Frequency", "wpdiscuz"),
4556
+ "label_original" => "Cache Reset Frequency",
4557
+ "description" => "",
4558
+ "description_original" => "",
4559
+ "docurl" => "",
4560
+ ],
4561
+ "removeVoteData" => [
4562
+ "label" => esc_html__("Remove Vote Data", "wpdiscuz"),
4563
+ "label_original" => "Remove Vote Data",
4564
+ "description" => "",
4565
+ "description_original" => "",
4566
+ "docurl" => "",
4567
+ ],
4568
+ "purgeAvatarCache" => [
4569
+ "label" => esc_html__("Purge Expired Avatar Caches", "wpdiscuz"),
4570
+ "label_original" => "Purge Expired Avatar Caches",
4571
+ "description" => "",
4572
+ "description_original" => "",
4573
+ "docurl" => "",
4574
+ ],
4575
+ "purgeAllCaches" => [
4576
+ "label" => esc_html__("Purge Comment and User Caches", "wpdiscuz"),
4577
+ "label_original" => "Purge Comment and User Caches",
4578
+ "description" => "",
4579
+ "description_original" => "",
4580
+ "docurl" => "",
4581
+ ],
4582
+ ],
4583
+ ],
4584
+ ],
4585
+ "addons" => [],
4586
+ ];
4587
+ return apply_filters("wpdiscuz_settings", $settings);
4588
+ }
4589
 
4590
  }
options/html-options.php CHANGED
@@ -487,10 +487,14 @@ $settings = $this->settingsArray();
487
  wp_nonce_field("wc_options_form-" . $tab);
488
  include_once $filePath;
489
  do_action("wpdiscuz_settings_tab_after", $tab, $setting);
490
- $resetOptionsUrl = admin_url("admin.php?page=" . WpdiscuzCore::PAGE_SETTINGS . "&wpd_tab=" . $tab . "&wpdiscuz_reset_options=1");
491
- $resetOptionsUrl = wp_nonce_url($resetOptionsUrl, "wpdiscuz_reset_options_nonce-" . $tab);
492
- $resetAllTabs = admin_url("admin.php?page=" . WpdiscuzCore::PAGE_SETTINGS . "&wpd_tab=all&wpdiscuz_reset_options=1");
493
- $resetAllTabs = wp_nonce_url($resetAllTabs, "wpdiscuz_reset_options_nonce-all");
 
 
 
 
494
  ?>
495
  <div class="wpd-opt-row">
496
  <input type="hidden" name="wpd_tab" value="<?php echo esc_attr($tab); ?>" />
487
  wp_nonce_field("wc_options_form-" . $tab);
488
  include_once $filePath;
489
  do_action("wpdiscuz_settings_tab_after", $tab, $setting);
490
+ $nonce = wp_create_nonce(md5(ABSPATH . get_home_url()));
491
+ $mainUrlTab = admin_url("admin.php?page=" . WpdiscuzCore::PAGE_SETTINGS . "&wpd_tab={$tab}");
492
+ $mainUrlAll = admin_url("admin.php?page=" . WpdiscuzCore::PAGE_SETTINGS . "&wpd_tab=all");
493
+
494
+ $resetOptionsUrl = $mainUrlTab . "&_wpnonce={$nonce}&redirect_to=" . urlencode_deep($mainUrlTab);
495
+ // $resetOptionsUrl = wp_nonce_url($resetOptionsUrl, "wpdiscuz_reset_options_nonce-" . $tab);
496
+ $resetAllTabs = $mainUrlAll . "&_wpnonce={$nonce}&redirect_to=" . urlencode_deep($mainUrlTab);
497
+ // $resetAllTabs = wp_nonce_url($resetAllTabs, "wpdiscuz_reset_options_nonce-all");
498
  ?>
499
  <div class="wpd-opt-row">
500
  <input type="hidden" name="wpd_tab" value="<?php echo esc_attr($tab); ?>" />
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.8
7
  Requires PHP: 5.6 and higher
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -185,6 +185,20 @@ Nothing will be lost! **Comments - wpDiscuz** will show all old comments.
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  = Comments - wpDiscuz v7.3.8 =
189
 
190
  * Added: New option in the media library drop-down to filter the media files uploaded in comments
@@ -197,10 +211,6 @@ Nothing will be lost! **Comments - wpDiscuz** will show all old comments.
197
  * Fixed bug: 'Stick' and 'Close' comments' buttons were visible on the main comment form even when they were disabled from the settings
198
  * New Addon: [wpDiscuz - User Notifications](https://gvectors.com/product/wpdiscuz-user-notifications/)
199
 
200
- **IMPORTANT!**
201
-
202
- * Please don't forget delete all caches and purge CDN after the update.
203
-
204
 
205
  = Comments - wpDiscuz v7.3.6 / v7.3.7 =
206
 
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.9
7
  Requires PHP: 5.6 and higher
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
185
 
186
  == Changelog ==
187
 
188
+ = Comments - wpDiscuz v7.3.9 =
189
+
190
+ * Fixed bug: Comment cache issue when the native pagination is enabled
191
+ * Fixed bug: Custom comment form date is not saved if the status is not published.
192
+ * Fixed bug: Irregular missing of user labels.
193
+ * Fixed bug: Redirect to the same page after clicking the reset option button
194
+ * Fixed bug: Comment filtering issue in widgets, changed wp_trim_words() to get_comment_excerpt().
195
+ * Fixed bug: Display mentioned user name without a link to profile page when the Profile URL option is disabled.
196
+
197
+ **IMPORTANT!**
198
+
199
+ * Please don't forget delete all caches and purge CDN after the update.
200
+
201
+
202
  = Comments - wpDiscuz v7.3.8 =
203
 
204
  * Added: New option in the media library drop-down to filter the media files uploaded in comments
211
  * Fixed bug: 'Stick' and 'Close' comments' buttons were visible on the main comment form even when they were disabled from the settings
212
  * New Addon: [wpDiscuz - User Notifications](https://gvectors.com/product/wpdiscuz-user-notifications/)
213
 
 
 
 
 
214
 
215
  = Comments - wpDiscuz v7.3.6 / v7.3.7 =
216
 
themes/default/class.WpdiscuzWalker.php CHANGED
@@ -9,7 +9,7 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
9
  private $options;
10
  private $cache;
11
  private $users = [];
12
- private $extra = [];
13
  private $feedbacks = [];
14
 
15
  public function __construct($helper, $helperOptimization, $dbManager, $options, $cache) {
@@ -27,9 +27,9 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
27
  $GLOBALS["comment"] = $comment;
28
  // BEGIN
29
 
30
- if (!$this->extra && !empty($args["commentsArgs"])) {
31
- $this->extra = $this->cache->getExtraCache($args["commentsArgs"]);
32
- }
33
 
34
  $search = [];
35
  $replace = [];
@@ -39,11 +39,11 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
39
  $commentWrapperClass = ["wpd-comment"];
40
  $commentWrapClass = ["wpd-comment-wrap"];
41
 
42
- if (isset($this->extra[$comment->comment_ID]["metas"])) {
43
- $commentMetas = $this->extra[ $comment->comment_ID ]["metas"];
44
- } else {
45
- $this->extra[$comment->comment_ID]["metas"] = $commentMetas = get_comment_meta($comment->comment_ID);
46
- }
47
 
48
  $isClosed = isset($commentMetas[self::META_KEY_CLOSED]) ? intval($commentMetas[self::META_KEY_CLOSED][0]) : 0;
49
  $isInline = isset($commentMetas[self::META_KEY_FEEDBACK_FORM_ID][0]) ? intval($commentMetas[self::META_KEY_FEEDBACK_FORM_ID][0]) : 0;
@@ -66,11 +66,11 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
66
  }
67
  }
68
 
69
- if (isset($this->extra[$comment->comment_ID]["commentLink"])) {
70
- $commentLink = $this->extra[$comment->comment_ID]["commentLink"];
71
- } else {
72
- $this->extra[$comment->comment_ID]["commentLink"] = $commentLink = get_comment_link($comment);
73
- }
74
 
75
  if (!$this->options->wp["isPaginate"]) {
76
  if (!empty($args["last_visit"]) && !empty($args["current_user_email"]) && strtotime($comment->comment_date) > $args["last_visit"] && $args["current_user_email"] !== $comment->comment_author_email) {
@@ -82,12 +82,12 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
82
  if (isset($this->users[$userKey])) {
83
  $user = $this->users[$userKey];
84
  } else if ($user = $this->cache->getUserCache($userKey)) {
85
- $this->helper->fillUserRoleData($user, $args);
86
- $this->users[$userKey] = $user;
87
  } else {
88
- $this->users[$userKey] = $user = $this->helper->getCommentAuthor($comment, $args);
89
- $this->cache->setUserCache($userKey, $user);
90
- }
91
 
92
  if ($comment->comment_parent && $this->options->wp["threadComments"]) {
93
  $commentWrapperClass[] = "wpd-reply";
@@ -139,11 +139,11 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
139
  $toolsActions .= sprintf($args["wpd_close_btn"], $closeText);
140
  }
141
  } else {
142
- if (isset($this->extra[$comment->comment_ID]["commentParent"])) {
143
- $parentComment = $this->extra[$comment->comment_ID]["commentParent"];
144
- } else {
145
- $this->extra[$comment->comment_ID]["commentParent"] = $parentComment = get_comment($comment->comment_parent);
146
- }
147
 
148
  $parentCommentLink = "#comment-" . $parentComment->comment_ID;
149
  $userKey = $parentComment->user_id . "_" . $parentComment->comment_author_email . "_" . $parentComment->comment_author;
@@ -510,9 +510,9 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
510
  $output = apply_filters("wpdiscuz_thread_end", $output, $comment, $depth, $args);
511
  $output .= "</div>";
512
 
513
- if (!empty($args["lastCommentIdInList"]) && !empty($args["commentsArgs"]) && $args["lastCommentIdInList"] === $comment->comment_ID && $this->extra) {
514
- $this->cache->setExtraCache($args["commentsArgs"], $this->extra);
515
- }
516
 
517
  return $output;
518
  }
9
  private $options;
10
  private $cache;
11
  private $users = [];
12
+ private $extra = [];
13
  private $feedbacks = [];
14
 
15
  public function __construct($helper, $helperOptimization, $dbManager, $options, $cache) {
27
  $GLOBALS["comment"] = $comment;
28
  // BEGIN
29
 
30
+ if (!$this->extra && !empty($args["commentsArgs"])) {
31
+ $this->extra = $this->cache->getExtraCache($args["commentsArgs"]);
32
+ }
33
 
34
  $search = [];
35
  $replace = [];
39
  $commentWrapperClass = ["wpd-comment"];
40
  $commentWrapClass = ["wpd-comment-wrap"];
41
 
42
+ if (isset($this->extra[$comment->comment_ID]["metas"])) {
43
+ $commentMetas = $this->extra[$comment->comment_ID]["metas"];
44
+ } else {
45
+ $this->extra[$comment->comment_ID]["metas"] = $commentMetas = get_comment_meta($comment->comment_ID);
46
+ }
47
 
48
  $isClosed = isset($commentMetas[self::META_KEY_CLOSED]) ? intval($commentMetas[self::META_KEY_CLOSED][0]) : 0;
49
  $isInline = isset($commentMetas[self::META_KEY_FEEDBACK_FORM_ID][0]) ? intval($commentMetas[self::META_KEY_FEEDBACK_FORM_ID][0]) : 0;
66
  }
67
  }
68
 
69
+ if (isset($this->extra[$comment->comment_ID]["commentLink"])) {
70
+ $commentLink = $this->extra[$comment->comment_ID]["commentLink"];
71
+ } else {
72
+ $this->extra[$comment->comment_ID]["commentLink"] = $commentLink = get_comment_link($comment);
73
+ }
74
 
75
  if (!$this->options->wp["isPaginate"]) {
76
  if (!empty($args["last_visit"]) && !empty($args["current_user_email"]) && strtotime($comment->comment_date) > $args["last_visit"] && $args["current_user_email"] !== $comment->comment_author_email) {
82
  if (isset($this->users[$userKey])) {
83
  $user = $this->users[$userKey];
84
  } else if ($user = $this->cache->getUserCache($userKey)) {
85
+ $this->helper->fillUserRoleData($user, $args);
86
+ $this->users[$userKey] = $user;
87
  } else {
88
+ $this->users[$userKey] = $user = $this->helper->getCommentAuthor($comment, $args);
89
+ $this->cache->setUserCache($userKey, $user);
90
+ }
91
 
92
  if ($comment->comment_parent && $this->options->wp["threadComments"]) {
93
  $commentWrapperClass[] = "wpd-reply";
139
  $toolsActions .= sprintf($args["wpd_close_btn"], $closeText);
140
  }
141
  } else {
142
+ if (isset($this->extra[$comment->comment_ID]["commentParent"])) {
143
+ $parentComment = $this->extra[$comment->comment_ID]["commentParent"];
144
+ } else {
145
+ $this->extra[$comment->comment_ID]["commentParent"] = $parentComment = get_comment($comment->comment_parent);
146
+ }
147
 
148
  $parentCommentLink = "#comment-" . $parentComment->comment_ID;
149
  $userKey = $parentComment->user_id . "_" . $parentComment->comment_author_email . "_" . $parentComment->comment_author;
510
  $output = apply_filters("wpdiscuz_thread_end", $output, $comment, $depth, $args);
511
  $output .= "</div>";
512
 
513
+ if (!empty($args["lastCommentIdInList"]) && !empty($args["commentsArgs"]) && $args["lastCommentIdInList"] === $comment->comment_ID && $this->extra) {
514
+ $this->cache->setExtraCache($args["commentsArgs"], $this->extra);
515
+ }
516
 
517
  return $output;
518
  }
themes/default/comment-form.php CHANGED
@@ -26,7 +26,9 @@ if (!function_exists("wpdiscuz_close_divs")) {
26
 
27
  $currentUser = $wpdiscuz->helper->getCurrentUser();
28
  do_action("wpdiscuz_before_load", $post, $currentUser);
29
- if (!post_password_required($post->ID)) {
 
 
30
  $commentsCount = get_comments_number();
31
  $wpCommClasses = [];
32
  $wpCommClasses[] = $currentUser && $currentUser->ID ? "wpdiscuz_auth" : "wpdiscuz_unauth";
26
 
27
  $currentUser = $wpdiscuz->helper->getCurrentUser();
28
  do_action("wpdiscuz_before_load", $post, $currentUser);
29
+
30
+ $load = apply_filters("wpdiscuz_load_template", true, $currentUser, $post);
31
+ if (!post_password_required($post->ID) && $load) {
32
  $commentsCount = get_comments_number();
33
  $wpCommClasses = [];
34
  $wpCommClasses[] = $currentUser && $currentUser->ID ? "wpdiscuz_auth" : "wpdiscuz_unauth";
utils/class.WpdiscuzCache.php CHANGED
@@ -1,217 +1,218 @@
1
  <?php
2
 
3
  if (!defined("ABSPATH")) {
4
- exit();
5
  }
6
 
7
  class WpdiscuzCache implements WpDiscuzConstants {
8
 
9
- public $wpUploadsDir;
10
- private $options;
11
- private $helper;
12
-
13
- public function __construct($options, $helper) {
14
- $this->options = $options;
15
- $this->helper = $helper;
16
- $this->wpUploadsDir = wp_upload_dir();
17
- add_action("admin_post_purgeAllCaches", [&$this, "purgeAllCaches"]);
18
- add_action("admin_post_purgePostCaches", [&$this, "purgePostCaches"]);
19
- add_action("wpdiscuz_reset_users_cache", [&$this, "resetUsersCache"]);
20
- add_action("wpdiscuz_reset_comments_cache", [&$this, "resetCommentsCache"]);
21
- add_action("wpdiscuz_reset_comments_extra_cache", [&$this, "resetExtraCache"]);
22
- add_action("comment_post",[&$this, "commentPost"],248,3);
23
- }
24
-
25
- public function purgeAllCaches() {
26
- if (current_user_can("manage_options") && isset($_GET["_wpnonce"]) && wp_verify_nonce(sanitize_text_field($_GET["_wpnonce"]), "purgeAllCaches")) {
27
- $this->resetCommentsCache();
28
- $this->resetUsersCache();
29
- }
30
- $referer = wp_get_referer();
31
- if (strpos($referer, "page=" . self::PAGE_SETTINGS) === false) {
32
- $redirect = $referer;
33
- } else {
34
- $redirect = admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_tab=" . self::TAB_GENERAL);
35
- }
36
- wp_redirect($redirect);
37
- exit();
38
- }
39
-
40
- public function purgePostCaches() {
41
- if (current_user_can("manage_options") && isset($_GET["_wpnonce"]) && !empty($_GET["post_id"]) && wp_verify_nonce(sanitize_text_field($_GET["_wpnonce"]), "purgePostCaches")) {
42
- $this->resetCommentsCache(sanitize_text_field($_GET["post_id"]));
43
- $this->resetUsersCache();
44
- }
45
- wp_redirect(wp_get_referer());
46
- exit();
47
- }
48
-
49
- public function deleteGravatarsFolder() {
50
- if (!class_exists("WP_Filesystem_Direct")) {
51
- require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-base.php";
52
- require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-direct.php";
53
- }
54
- $fs = new WP_Filesystem_Direct([]);
55
- $fs->rmdir($this->wpUploadsDir["basedir"] . "/wpdiscuz/cache/gravatars/", true);
56
- }
57
-
58
- /*
59
- * User and Comment Cache
60
- */
61
- public function getUserCache($userKey) {
62
- return $this->getCache($this->getUserCacheFileinfo($userKey));
63
- }
64
-
65
- public function getCommentsCache($commentsArgs) {
66
- return $this->getCache($this->getCommentsCacheFileinfo($commentsArgs));
67
- }
68
-
69
- public function getExtraCache($args) {
70
- return $this->getCache($this->getExtraCacheFileinfo($args));
71
- }
72
-
73
- public function setUserCache($userKey, $user) {
74
- unset($user["author_title"], $user["commentWrapRoleClass"]);
75
- return $this->setCache($this->getUserCacheFileinfo($userKey), $user);
76
- }
77
-
78
- public function setCommentsCache($commentsArgs, $commentList, $commentData) {
79
- if (!$this->helper->isUnapprovedInTree($commentList)) {
80
- $data = ["commentList" => $commentList, "commentData" => $commentData];
81
- return $this->setCache($this->getCommentsCacheFileinfo($commentsArgs), $data);
82
- }
83
- return false;
84
- }
85
-
86
- public function setExtraCache($commentsArgs, $extraData) {
87
- return $this->setCache($this->getExtraCacheFileinfo($commentsArgs), $extraData);
88
- }
89
-
90
- public function resetUsersCache($userKey = "") {
91
- if ($userKey) {
92
- $dirs = $this->getUserCacheFileinfo($userKey);
93
- $path = $dirs["path"];
94
- } else {
95
- $dirs = $this->getCacheDirectories();
96
- $path = $dirs["users"];
97
- }
98
- $this->resetCache($path);
99
- }
100
-
101
- public function resetCommentsCache($postId = 0) {
102
- $dirs = $this->getCacheDirectories();
103
- $path = $dirs["comments"] . ($postId ? ($postId . "/") : "");
104
- $this->resetCache($path);
105
- }
106
-
107
- public function resetExtraCache($postId) {
108
- $dirs = $this->getCacheDirectories();
109
- $path = $dirs["comments"] . $postId . "/" . $dirs["extra"];
110
- $this->resetCache($path);
111
- }
112
-
113
- private function getCache($fileInfo) {
114
- if ($this->options->wp["isPaginate"]) {
115
- return [];
116
- }
117
-
118
- if ($this->options->general["isCacheEnabled"] && file_exists($fileInfo["path"])) {
119
- $fileCreateTime = filemtime($fileInfo["path"]);
120
-
121
- /**
122
- * delete old cached file
123
- * !!!IMPORTANT
124
- * do not use current_time here as it returns WP time
125
- */
 
126
  if (time() > $fileCreateTime + ($this->options->general["cacheTimeout"] * DAY_IN_SECONDS)) {
127
- unlink($fileInfo["path"]);
128
- return [];
129
- }
130
- if (is_readable($fileInfo["path"]) && ($cache = maybe_unserialize(file_get_contents($fileInfo["path"])))) {
131
- return $cache;
132
- }
133
- }
134
- return [];
135
- }
136
-
137
- private function setCache($fileInfo, $data) {
138
- if ($this->options->wp["isPaginate"]) {
139
- return false;
140
- }
141
-
142
- if ($this->options->general["isCacheEnabled"]) {
143
- if (!is_dir($fileInfo["dir"])) {
144
- wp_mkdir_p($fileInfo["dir"]);
145
- }
146
-
147
- $htaccces = ".htaccess";
148
- if (is_dir($fileInfo["basedir"]) && !file_exists($fileInfo["basedir"] . $htaccces)) {
149
- file_put_contents($fileInfo["basedir"] . $htaccces, "Deny from all");
150
- }
151
-
152
- if (is_writable($fileInfo["dir"]) && ($data = serialize($data))) {
153
- return file_put_contents($fileInfo["path"], $data);
154
- }
155
- }
156
- return false;
157
- }
158
-
159
- private function resetCache($path) {
160
- if (!class_exists("WP_Filesystem_Direct")) {
161
- require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-base.php";
162
- require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-direct.php";
163
- }
164
- $fs = new WP_Filesystem_Direct([]);
165
- $fs->rmdir($path, true);
166
- }
167
-
168
- private function getUserCacheFileinfo($userKey) {
169
- $dirs = $this->getCacheDirectories();
170
- $fileName = md5($userKey);
171
- return [
172
- "basedir" => $dirs["users"],
173
- "dir" => $dirs["users"],
174
- "name" => $fileName,
175
- "path" => $dirs["users"] . $fileName,
176
- ];
177
- }
178
-
179
- private function getCommentsCacheFileinfo($commentsArgs) {
180
- $dirs = $this->getCacheDirectories();
181
- $fileDir = $dirs["comments"] . $commentsArgs["post_id"] . "/";
182
- $fileName = md5($commentsArgs["wpdType"] . $commentsArgs["last_parent_id"] . $commentsArgs["page"] . $commentsArgs["order"] . $commentsArgs["orderby"]) . "_" . $commentsArgs["last_parent_id"];
183
- return [
184
- "basedir" => $dirs["comments"],
185
- "name" => $fileName,
186
- "path" => $fileDir . $fileName,
187
- "dir" => $fileDir,
188
- ];
189
- }
190
-
191
- private function getExtraCacheFileinfo($commentsArgs) {
192
- $dirs = $this->getCacheDirectories();
193
- $fileDir = $dirs["comments"] . $commentsArgs["post_id"] . "/" . $dirs["extra"] . "/";
194
- $fileName = md5($commentsArgs["wpdType"] . $commentsArgs["last_parent_id"] . $commentsArgs["page"] . $commentsArgs["order"] . $commentsArgs["orderby"]) . "_" . $commentsArgs["last_parent_id"];
195
- return [
196
- "basedir" => $dirs["extra"],
197
- "name" => $fileName,
198
- "path" => $fileDir . $fileName,
199
- "dir" => $fileDir,
200
- ];
201
- }
202
-
203
- private function getCacheDirectories() {
204
- return [
205
- "comments" => $this->wpUploadsDir["basedir"] . self::COMMENTS_CACHE_DIR,
206
- "users" => $this->wpUploadsDir["basedir"] . self::USERS_CACHE_DIR,
207
- "extra" => self::EXTRA_CACHE_DIR,
208
- ];
209
- }
210
-
211
- public function commentPost($comment_ID, $approved, $commentdata){
212
- if(!empty($commentdata['comment_post_ID'])){
213
- $this->resetCommentsCache($commentdata['comment_post_ID']);
214
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  }
 
216
 
217
  }
1
  <?php
2
 
3
  if (!defined("ABSPATH")) {
4
+ exit();
5
  }
6
 
7
  class WpdiscuzCache implements WpDiscuzConstants {
8
 
9
+ public $wpUploadsDir;
10
+ private $options;
11
+ private $helper;
12
+
13
+ public function __construct($options, $helper) {
14
+ $this->options = $options;
15
+ $this->helper = $helper;
16
+ $this->wpUploadsDir = wp_upload_dir();
17
+ add_action("admin_post_purgeAllCaches", [&$this, "purgeAllCaches"]);
18
+ add_action("admin_post_purgePostCaches", [&$this, "purgePostCaches"]);
19
+ add_action("wpdiscuz_reset_users_cache", [&$this, "resetUsersCache"]);
20
+ add_action("wpdiscuz_reset_comments_cache", [&$this, "resetCommentsCache"]);
21
+ add_action("wpdiscuz_reset_comments_extra_cache", [&$this, "resetExtraCache"]);
22
+ add_action("comment_post", [&$this, "commentPost"], 248, 3);
23
+ }
24
+
25
+ public function purgeAllCaches() {
26
+ if (current_user_can("manage_options") && isset($_GET["_wpnonce"]) && wp_verify_nonce(sanitize_text_field($_GET["_wpnonce"]), "purgeAllCaches")) {
27
+ $this->resetCommentsCache();
28
+ $this->resetUsersCache();
29
+ }
30
+ $referer = wp_get_referer();
31
+ if (strpos($referer, "page=" . self::PAGE_SETTINGS) === false) {
32
+ $redirect = $referer;
33
+ } else {
34
+ $redirect = admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_tab=" . self::TAB_GENERAL);
35
+ }
36
+ wp_redirect($redirect);
37
+ exit();
38
+ }
39
+
40
+ public function purgePostCaches() {
41
+ if (current_user_can("manage_options") && isset($_GET["_wpnonce"]) && !empty($_GET["post_id"]) && wp_verify_nonce(sanitize_text_field($_GET["_wpnonce"]), "purgePostCaches")) {
42
+ $this->resetCommentsCache(sanitize_text_field($_GET["post_id"]));
43
+ $this->resetUsersCache();
44
+ }
45
+ wp_redirect(wp_get_referer());
46
+ exit();
47
+ }
48
+
49
+ public function deleteGravatarsFolder() {
50
+ if (!class_exists("WP_Filesystem_Direct")) {
51
+ require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-base.php";
52
+ require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-direct.php";
53
+ }
54
+ $fs = new WP_Filesystem_Direct([]);
55
+ $fs->rmdir($this->wpUploadsDir["basedir"] . "/wpdiscuz/cache/gravatars/", true);
56
+ }
57
+
58
+ /*
59
+ * User and Comment Cache
60
+ */
61
+
62
+ public function getUserCache($userKey) {
63
+ return $this->getCache($this->getUserCacheFileinfo($userKey));
64
+ }
65
+
66
+ public function getCommentsCache($commentsArgs) {
67
+ return $this->getCache($this->getCommentsCacheFileinfo($commentsArgs));
68
+ }
69
+
70
+ public function getExtraCache($args) {
71
+ return $this->getCache($this->getExtraCacheFileinfo($args));
72
+ }
73
+
74
+ public function setUserCache($userKey, $user) {
75
+ unset($user["author_title"], $user["commentWrapRoleClass"]);
76
+ return $this->setCache($this->getUserCacheFileinfo($userKey), $user);
77
+ }
78
+
79
+ public function setCommentsCache($commentsArgs, $commentList, $commentData) {
80
+ if (!$this->helper->isUnapprovedInTree($commentList)) {
81
+ $data = ["commentList" => $commentList, "commentData" => $commentData];
82
+ return $this->setCache($this->getCommentsCacheFileinfo($commentsArgs), $data);
83
+ }
84
+ return false;
85
+ }
86
+
87
+ public function setExtraCache($commentsArgs, $extraData) {
88
+ return $this->setCache($this->getExtraCacheFileinfo($commentsArgs), $extraData);
89
+ }
90
+
91
+ public function resetUsersCache($userKey = "") {
92
+ if ($userKey) {
93
+ $dirs = $this->getUserCacheFileinfo($userKey);
94
+ $path = $dirs["path"];
95
+ } else {
96
+ $dirs = $this->getCacheDirectories();
97
+ $path = $dirs["users"];
98
+ }
99
+ $this->resetCache($path);
100
+ }
101
+
102
+ public function resetCommentsCache($postId = 0) {
103
+ $dirs = $this->getCacheDirectories();
104
+ $path = $dirs["comments"] . ($postId ? ($postId . "/") : "");
105
+ $this->resetCache($path);
106
+ }
107
+
108
+ public function resetExtraCache($postId) {
109
+ $dirs = $this->getCacheDirectories();
110
+ $path = $dirs["comments"] . $postId . "/" . $dirs["extra"];
111
+ $this->resetCache($path);
112
+ }
113
+
114
+ private function getCache($fileInfo) {
115
+ // if ($this->options->wp["isPaginate"]) {
116
+ // return [];
117
+ // }
118
+
119
+ if ($this->options->general["isCacheEnabled"] && file_exists($fileInfo["path"])) {
120
+ $fileCreateTime = filemtime($fileInfo["path"]);
121
+
122
+ /**
123
+ * delete old cached file
124
+ * !!!IMPORTANT
125
+ * do not use current_time here as it returns WP time
126
+ */
127
  if (time() > $fileCreateTime + ($this->options->general["cacheTimeout"] * DAY_IN_SECONDS)) {
128
+ unlink($fileInfo["path"]);
129
+ return [];
130
+ }
131
+ if (is_readable($fileInfo["path"]) && ($cache = maybe_unserialize(file_get_contents($fileInfo["path"])))) {
132
+ return $cache;
133
+ }
134
+ }
135
+ return [];
136
+ }
137
+
138
+ private function setCache($fileInfo, $data) {
139
+ // if ($this->options->wp["isPaginate"]) {
140
+ // return false;
141
+ // }
142
+
143
+ if ($this->options->general["isCacheEnabled"]) {
144
+ if (!is_dir($fileInfo["dir"])) {
145
+ wp_mkdir_p($fileInfo["dir"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
147
+
148
+ $htaccces = ".htaccess";
149
+ if (is_dir($fileInfo["basedir"]) && !file_exists($fileInfo["basedir"] . $htaccces)) {
150
+ file_put_contents($fileInfo["basedir"] . $htaccces, "Deny from all");
151
+ }
152
+
153
+ if (is_writable($fileInfo["dir"]) && ($data = serialize($data))) {
154
+ return file_put_contents($fileInfo["path"], $data);
155
+ }
156
+ }
157
+ return false;
158
+ }
159
+
160
+ private function resetCache($path) {
161
+ if (!class_exists("WP_Filesystem_Direct")) {
162
+ require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-base.php";
163
+ require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-direct.php";
164
+ }
165
+ $fs = new WP_Filesystem_Direct([]);
166
+ $fs->rmdir($path, true);
167
+ }
168
+
169
+ private function getUserCacheFileinfo($userKey) {
170
+ $dirs = $this->getCacheDirectories();
171
+ $fileName = md5($userKey);
172
+ return [
173
+ "basedir" => $dirs["users"],
174
+ "dir" => $dirs["users"],
175
+ "name" => $fileName,
176
+ "path" => $dirs["users"] . $fileName,
177
+ ];
178
+ }
179
+
180
+ private function getCommentsCacheFileinfo($commentsArgs) {
181
+ $dirs = $this->getCacheDirectories();
182
+ $fileDir = $dirs["comments"] . $commentsArgs["post_id"] . "/";
183
+ $fileName = md5($commentsArgs["wpdType"] . $commentsArgs["last_parent_id"] . $commentsArgs["page"] . $commentsArgs["order"] . $commentsArgs["orderby"]) . "_" . $commentsArgs["last_parent_id"];
184
+ return [
185
+ "basedir" => $dirs["comments"],
186
+ "name" => $fileName,
187
+ "path" => $fileDir . $fileName,
188
+ "dir" => $fileDir,
189
+ ];
190
+ }
191
+
192
+ private function getExtraCacheFileinfo($commentsArgs) {
193
+ $dirs = $this->getCacheDirectories();
194
+ $fileDir = $dirs["comments"] . $commentsArgs["post_id"] . "/" . $dirs["extra"] . "/";
195
+ $fileName = md5($commentsArgs["wpdType"] . $commentsArgs["last_parent_id"] . $commentsArgs["page"] . $commentsArgs["order"] . $commentsArgs["orderby"]) . "_" . $commentsArgs["last_parent_id"];
196
+ return [
197
+ "basedir" => $dirs["extra"],
198
+ "name" => $fileName,
199
+ "path" => $fileDir . $fileName,
200
+ "dir" => $fileDir,
201
+ ];
202
+ }
203
+
204
+ private function getCacheDirectories() {
205
+ return [
206
+ "comments" => $this->wpUploadsDir["basedir"] . self::COMMENTS_CACHE_DIR,
207
+ "users" => $this->wpUploadsDir["basedir"] . self::USERS_CACHE_DIR,
208
+ "extra" => self::EXTRA_CACHE_DIR,
209
+ ];
210
+ }
211
+
212
+ public function commentPost($comment_ID, $approved, $commentdata) {
213
+ if (!empty($commentdata['comment_post_ID'])) {
214
+ $this->resetCommentsCache($commentdata['comment_post_ID']);
215
  }
216
+ }
217
 
218
  }
utils/class.WpdiscuzHelper.php CHANGED
@@ -406,9 +406,9 @@ class WpdiscuzHelper implements WpDiscuzConstants {
406
  }
407
 
408
  public function userNicename($html, $comment, $user) {
409
- if (apply_filters("wpdiscuz_show_nicename",$this->options->subscription["enableUserMentioning"]) && isset($user->user_nicename)) {
410
- $html .= "<span class='wpd-user-nicename' data-wpd-clipboard='@". esc_attr($user->user_nicename)."'>&nbsp;(@" . esc_html($user->user_nicename) . ")</span>";
411
- }
412
  return $html;
413
  }
414
 
@@ -845,21 +845,25 @@ class WpdiscuzHelper implements WpDiscuzConstants {
845
  public function userMentioning($content, $comment, $args = []) {
846
  if (apply_filters("wpdiscuz_enable_user_mentioning", true) && !empty($args["is_wpdiscuz_comment"]) && ($users = $this->getMentionedUsers($content))) {
847
  foreach ($users as $k => $user) {
848
- $user_link = "";
849
- if (class_exists("BuddyPress")) {
850
- $user_link = bp_core_get_user_domain($user["u_id"]);
851
- }
852
- if (class_exists("UM_API")) {
853
- $user_link = um_user_profile_url($user["u_id"]);
854
- }
855
- if (!$user_link) {
856
- $user_link = get_author_posts_url($user["u_id"]);
857
- }
858
- if ($user_link) {
859
- $replacement = "<a href='" . $user_link . "' rel='author'>@" . $user["name"] . "</a>";
 
 
 
860
  } else {
861
  $replacement = "<span>@" . $user["name"] . "</span>";
862
  }
 
863
  $replacement .= "$2";
864
  $content = preg_replace("/(" . $user["replace"] . ")([\s\n\r\t\@\,\.\!\?\#\$\%\-\:\;\'\"\`\~\)\(\}\{\|\\\[\]]?)/", $replacement, $content);
865
  }
406
  }
407
 
408
  public function userNicename($html, $comment, $user) {
409
+ if (apply_filters("wpdiscuz_show_nicename", $this->options->subscription["enableUserMentioning"]) && isset($user->user_nicename)) {
410
+ $html .= "<span class='wpd-user-nicename' data-wpd-clipboard='@" . esc_attr($user->user_nicename) . "'>(@" . esc_html($user->user_nicename) . ")</span>";
411
+ }
412
  return $html;
413
  }
414
 
845
  public function userMentioning($content, $comment, $args = []) {
846
  if (apply_filters("wpdiscuz_enable_user_mentioning", true) && !empty($args["is_wpdiscuz_comment"]) && ($users = $this->getMentionedUsers($content))) {
847
  foreach ($users as $k => $user) {
848
+ if ($this->options->login["enableProfileURLs"]) {
849
+ $user_link = "";
850
+ if (class_exists("UM_API")) {
851
+ $user_link = um_user_profile_url($user["u_id"]);
852
+ } else if (class_exists("BuddyPress")) {
853
+ $user_link = bp_core_get_user_domain($user["u_id"]);
854
+ } else {
855
+ $user_link = get_author_posts_url($user["u_id"]);
856
+ }
857
+
858
+ if ($user_link) {
859
+ $replacement = "<a href='" . $user_link . "' rel='author'>@" . $user["name"] . "</a>";
860
+ } else {
861
+ $replacement = "<span>@" . $user["name"] . "</span>";
862
+ }
863
  } else {
864
  $replacement = "<span>@" . $user["name"] . "</span>";
865
  }
866
+
867
  $replacement .= "$2";
868
  $content = preg_replace("/(" . $user["replace"] . ")([\s\n\r\t\@\,\.\!\?\#\$\%\-\:\;\'\"\`\~\)\(\}\{\|\\\[\]]?)/", $replacement, $content);
869
  }
utils/layouts/activity/activity-page.php CHANGED
@@ -26,21 +26,28 @@ if ($action && $currentUserEmail) {
26
  $args["author_email"] = $currentUserEmail;
27
  }
28
 
29
- $items = get_comments($args);
30
- if ($items && is_array($items)) {
31
- $args["number"] = null;
32
- $args["count"] = true;
33
- $allComments = get_comments($args);
34
- $pCount = intval($allComments / $perPage);
35
- $pageCount = ($allComments % $perPage == 0) ? $pCount : $pCount + 1;
36
- foreach ($items as $k => $item) {
37
- include WPDISCUZ_DIR_PATH . "/utils/layouts/activity/item.php";
 
 
 
 
 
 
 
 
38
  }
39
- include WPDISCUZ_DIR_PATH . "/utils/layouts/pagination.php";
40
- ?>
41
- <input type="hidden" class="wpd-page-number" value="<?php echo esc_attr($page); ?>"/>
42
- <?php } else { ?>
43
- <div class='wpd-item'><?php echo esc_html($this->options->getPhrase("wc_user_settings_no_data")); ?></div>
44
- <?php
45
  }
 
 
 
 
46
  }
 
26
  $args["author_email"] = $currentUserEmail;
27
  }
28
 
29
+ if ($args["user_id"] || $args["author_email"]) {
30
+ $items = get_comments($args);
31
+ if ($items && is_array($items)) {
32
+ $args["number"] = null;
33
+ $args["count"] = true;
34
+ $allComments = get_comments($args);
35
+ $pCount = intval($allComments / $perPage);
36
+ $pageCount = ($allComments % $perPage == 0) ? $pCount : $pCount + 1;
37
+ foreach ($items as $k => $item) {
38
+ include WPDISCUZ_DIR_PATH . "/utils/layouts/activity/item.php";
39
+ }
40
+ include WPDISCUZ_DIR_PATH . "/utils/layouts/pagination.php";
41
+ ?>
42
+ <input type="hidden" class="wpd-page-number" value="<?php echo esc_attr($page); ?>"/>
43
+ <?php } else { ?>
44
+ <div class='wpd-item'><?php echo esc_html($this->options->getPhrase("wc_user_settings_no_data")); ?></div>
45
+ <?php
46
  }
 
 
 
 
 
 
47
  }
48
+ } else {
49
+ ?>
50
+ <div class='wpd-item'><?php echo esc_html($this->options->getPhrase("wc_user_settings_no_data")); ?></div>
51
+ <?php
52
  }
53
+
utils/layouts/activity/content.php CHANGED
@@ -12,22 +12,27 @@ if ($currentUserId) {
12
  } else if ($currentUserEmail) {
13
  $args["author_email"] = $currentUserEmail;
14
  }
15
-
16
- $items = get_comments($args);
17
- if ($items && is_array($items)) {
18
- $args["number"] = null;
19
- $args["count"] = true;
20
- $itemsCount = get_comments($args);
21
- $pCount = intval($itemsCount / $perPage);
22
- $pageCount = ($itemsCount % $perPage == 0) ? $pCount : $pCount + 1;
23
- $page = 0;
24
- foreach ($items as $k => $item) {
25
- include WPDISCUZ_DIR_PATH . "/utils/layouts/activity/item.php";
 
 
 
 
 
 
 
26
  }
27
- include WPDISCUZ_DIR_PATH . "/utils/layouts/pagination.php";
28
  ?>
29
- <input type="hidden" class="wpd-page-number" value="0"/>
30
- <?php } else { ?>
31
  <div class='wpd-item'><?php echo esc_html($this->options->getPhrase("wc_user_settings_no_data")); ?></div>
32
  <?php
33
  }
12
  } else if ($currentUserEmail) {
13
  $args["author_email"] = $currentUserEmail;
14
  }
15
+ if ($args["user_id"] || $args["author_email"]) {
16
+ $items = get_comments($args);
17
+ if ($items && is_array($items)) {
18
+ $args["number"] = null;
19
+ $args["count"] = true;
20
+ $itemsCount = get_comments($args);
21
+ $pCount = intval($itemsCount / $perPage);
22
+ $pageCount = ($itemsCount % $perPage == 0) ? $pCount : $pCount + 1;
23
+ $page = 0;
24
+ foreach ($items as $k => $item) {
25
+ include WPDISCUZ_DIR_PATH . "/utils/layouts/activity/item.php";
26
+ }
27
+ include WPDISCUZ_DIR_PATH . "/utils/layouts/pagination.php";
28
+ ?>
29
+ <input type="hidden" class="wpd-page-number" value="0"/>
30
+ <?php } else { ?>
31
+ <div class='wpd-item'><?php echo esc_html($this->options->getPhrase("wc_user_settings_no_data")); ?></div>
32
+ <?php
33
  }
34
+ } else {
35
  ?>
 
 
36
  <div class='wpd-item'><?php echo esc_html($this->options->getPhrase("wc_user_settings_no_data")); ?></div>
37
  <?php
38
  }
utils/layouts/activity/item.php CHANGED
@@ -17,7 +17,7 @@ $commentLeftStyle = $canDeleteComment ? "" : "width:99%;border-right:none;";
17
  </div>
18
  <div class="wpd-item-link wpd-comment-item-link">
19
  <a class="wpd-comment-link" href="<?php echo esc_url_raw(get_comment_link($item)); ?>" target="_blank">
20
- <?php echo wp_trim_words($item->comment_content, 20, "&hellip;"); ?>
21
  </a>
22
  </div>
23
  <div class="wpd-item-link wpd-post-item-link">
17
  </div>
18
  <div class="wpd-item-link wpd-comment-item-link">
19
  <a class="wpd-comment-link" href="<?php echo esc_url_raw(get_comment_link($item)); ?>" target="_blank">
20
+ <?php echo get_comment_excerpt($item->comment_ID); ?>
21
  </a>
22
  </div>
23
  <div class="wpd-item-link wpd-post-item-link">