/wp-content/plugins/wpdiscuz/options/options-layouts/html-thread_display.php

https://github.com/livinglab/openlab · PHP · 245 lines · 234 code · 11 blank · 0 comment · 16 complexity · 6d89924cb6e1da1723ee2657e9e88e1e MD5 · raw file

  1. <?php
  2. if (!defined("ABSPATH")) {
  3. exit();
  4. }
  5. ?>
  6. <!-- Option start -->
  7. <div class="wpd-opt-row">
  8. <div class="wpd-opt-intro">
  9. <img class="wpd-opt-img" src="<?php echo esc_url_raw(plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/dashboard/" . $setting["icon"])); ?>" style="height: 70px; padding-top: 5px;"/>
  10. <?php esc_html_e('Here you can find all necessary options to control comment threads loading, displaying and sorting functions. Using "Comment List Loading Type", "Comments Pagination Type" and "Display only parent comments" options, you can get the highest page loading speed. Also you can manage comment thread filtering buttons.', "wpdiscuz"); ?>
  11. </div>
  12. <div class="wpd-opt-doc" style="padding-top: 10px;">
  13. <a href="https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
  14. </div>
  15. </div>
  16. <!-- Option end -->
  17. <!-- Option start -->
  18. <div class="wpd-opt-row" data-wpd-opt="firstLoadWithAjax">
  19. <div class="wpd-opt-name">
  20. <label for="firstLoadWithAjax"><?php echo esc_html($setting["options"]["firstLoadWithAjax"]["label"]) ?></label>
  21. <p class="wpd-desc"><?php echo esc_html($setting["options"]["firstLoadWithAjax"]["description"]) ?></p>
  22. </div>
  23. <div class="wpd-opt-input">
  24. <div class="wpd-radio">
  25. <input type="radio" value="0" <?php checked(0 == $this->thread_display["firstLoadWithAjax"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[firstLoadWithAjax]" id="disableFirstLoadWithAjax" class="firstLoadWithAjax"/>
  26. <label for="disableFirstLoadWithAjax" class="wpd-radio-circle"></label>
  27. <label for="disableFirstLoadWithAjax"><?php esc_html_e("Load with page", "wpdiscuz") ?></label>
  28. </div>
  29. <div class="wpd-radio">
  30. <input type="radio" value="1" <?php checked(1 == $this->thread_display["firstLoadWithAjax"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[firstLoadWithAjax]" id="loadWithAjax" class="firstLoadWithAjax"/>
  31. <label for="loadWithAjax" class="wpd-radio-circle"></label>
  32. <label for="loadWithAjax" title="<?php esc_attr_e("Initiates AJAX loading once page loading is complete", "wpdiscuz") ?>"><?php esc_html_e("Initiate AJAX loading after page", "wpdiscuz") ?></label>
  33. </div>
  34. <div class="wpd-radio">
  35. <input type="radio" value="2" <?php checked(2 == $this->thread_display["firstLoadWithAjax"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[firstLoadWithAjax]" id="firstLoadWithAjaxButton" class="firstLoadWithAjax"/>
  36. <label for="firstLoadWithAjaxButton" class="wpd-radio-circle"></label>
  37. <label for="firstLoadWithAjaxButton" title="<?php esc_attr_e("Display [View Comments] button to load comments manually", "wpdiscuz") ?>"><?php esc_html_e("Display [View Comments] button", "wpdiscuz") ?></label>
  38. </div>
  39. </div>
  40. <div class="wpd-opt-doc">
  41. <?php $this->printDocLink($setting["options"]["firstLoadWithAjax"]["docurl"]) ?>
  42. </div>
  43. </div>
  44. <!-- Option end -->
  45. <!-- Option start -->
  46. <div class="wpd-opt-row" data-wpd-opt="commentListLoadType">
  47. <div class="wpd-opt-name">
  48. <label for="commentListLoadType"><?php echo esc_html($setting["options"]["commentListLoadType"]["label"]) ?></label>
  49. <p class="wpd-desc"><?php echo esc_html($setting["options"]["commentListLoadType"]["description"]) ?></p>
  50. </div>
  51. <div class="wpd-opt-input">
  52. <fieldset>
  53. <div class="wpd-radio">
  54. <input type="radio" value="0" <?php checked(0 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadDefault" class="commentListLoadType"/>
  55. <label for="commentListLoadDefault" class="wpd-radio-circle"></label>
  56. <label for="commentListLoadDefault"><?php esc_html_e("[Load more] Button", "wpdiscuz") ?></label>
  57. </div>
  58. <div class="wpd-radio">
  59. <input type="radio" value="1" <?php checked(1 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadRest" class="commentListLoadType"/>
  60. <label for="commentListLoadRest" class="wpd-radio-circle"></label>
  61. <label for="commentListLoadRest"><?php esc_html_e("[Load rest of all comments] Button", "wpdiscuz") ?></label>
  62. </div>
  63. <div class="wpd-radio">
  64. <input type="radio" value="3" <?php checked(3 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadAll" class="commentListLoadType"/>
  65. <label for="commentListLoadAll" class="wpd-radio-circle"></label>
  66. <label for="commentListLoadAll"><?php esc_html_e("Load all comments", "wpdiscuz") ?></label>
  67. </div>
  68. <div class="wpd-radio">
  69. <input type="radio" value="2" <?php checked(2 == $this->thread_display["commentListLoadType"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[commentListLoadType]" id="commentListLoadLazy" class="commentListLoadType"/>
  70. <label for="commentListLoadLazy" class="wpd-radio-circle"></label>
  71. <label for="commentListLoadLazy"><?php esc_html_e("Lazy load comments on scrolling", "wpdiscuz") ?></label>
  72. </div>
  73. </fieldset>
  74. </div>
  75. <div class="wpd-opt-doc">
  76. <?php $this->printDocLink($setting["options"]["commentListLoadType"]["docurl"]) ?>
  77. </div>
  78. </div>
  79. <!-- Option end -->
  80. <!-- Option start -->
  81. <div class="wpd-opt-row" data-wpd-opt="isLoadOnlyParentComments">
  82. <div class="wpd-opt-name">
  83. <label for="isLoadOnlyParentComments"><?php echo $setting["options"]["isLoadOnlyParentComments"]["label"] ?></label>
  84. <p class="wpd-desc"><?php echo esc_html($setting["options"]["isLoadOnlyParentComments"]["description"]) ?></p>
  85. </div>
  86. <div class="wpd-opt-input">
  87. <div class="wpd-switcher">
  88. <input type="checkbox" <?php checked($this->thread_display["isLoadOnlyParentComments"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[isLoadOnlyParentComments]" id="isLoadOnlyParentComments">
  89. <label for="isLoadOnlyParentComments"></label>
  90. </div>
  91. </div>
  92. <div class="wpd-opt-doc">
  93. <?php $this->printDocLink($setting["options"]["isLoadOnlyParentComments"]["docurl"]) ?>
  94. </div>
  95. </div>
  96. <!-- Option end -->
  97. <!-- Option start -->
  98. <div class="wpd-opt-row" data-wpd-opt="showReactedFilterButton">
  99. <div class="wpd-opt-name">
  100. <label for="showReactedFilterButton"><?php echo esc_html($setting["options"]["showReactedFilterButton"]["label"]) ?></label>
  101. <p class="wpd-desc"><?php echo esc_html($setting["options"]["showReactedFilterButton"]["description"]) ?></p>
  102. </div>
  103. <div class="wpd-opt-input">
  104. <div class="wpd-switcher">
  105. <input type="checkbox" <?php checked($this->thread_display["showReactedFilterButton"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[showReactedFilterButton]" id="showReactedFilterButton">
  106. <label for="showReactedFilterButton"></label>
  107. </div>
  108. </div>
  109. <div class="wpd-opt-doc">
  110. <?php $this->printDocLink($setting["options"]["showReactedFilterButton"]["docurl"]) ?>
  111. </div>
  112. </div>
  113. <!-- Option end -->
  114. <!-- Option start -->
  115. <div class="wpd-opt-row" data-wpd-opt="showHottestFilterButton">
  116. <div class="wpd-opt-name">
  117. <label for="showHottestFilterButton"><?php echo esc_html($setting["options"]["showHottestFilterButton"]["label"]) ?></label>
  118. <p class="wpd-desc"><?php echo esc_html($setting["options"]["showHottestFilterButton"]["description"]) ?></p>
  119. </div>
  120. <div class="wpd-opt-input">
  121. <div class="wpd-switcher">
  122. <input type="checkbox" <?php checked($this->thread_display["showHottestFilterButton"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[showHottestFilterButton]" id="showHottestFilterButton">
  123. <label for="showHottestFilterButton"></label>
  124. </div>
  125. </div>
  126. <div class="wpd-opt-doc">
  127. <?php $this->printDocLink($setting["options"]["showHottestFilterButton"]["docurl"]) ?>
  128. </div>
  129. </div>
  130. <!-- Option end -->
  131. <!-- Option start -->
  132. <div class="wpd-opt-row" data-wpd-opt="showSortingButtons">
  133. <div class="wpd-opt-name">
  134. <label for="showSortingButtons"><?php echo esc_html($setting["options"]["showSortingButtons"]["label"]) ?></label>
  135. <p class="wpd-desc"><?php echo esc_html($setting["options"]["showSortingButtons"]["description"]) ?></p>
  136. </div>
  137. <div class="wpd-opt-input">
  138. <div class="wpd-switcher">
  139. <input type="checkbox" <?php checked($this->thread_display["showSortingButtons"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[showSortingButtons]" id="showSortingButtons">
  140. <label for="showSortingButtons"></label>
  141. </div>
  142. </div>
  143. <div class="wpd-opt-doc">
  144. <?php $this->printDocLink($setting["options"]["showSortingButtons"]["docurl"]) ?>
  145. </div>
  146. </div>
  147. <!-- Option end -->
  148. <!-- Option start -->
  149. <div class="wpd-opt-row" data-wpd-opt="mostVotedByDefault">
  150. <div class="wpd-opt-name">
  151. <label for="mostVotedByDefault"><?php echo esc_html($setting["options"]["mostVotedByDefault"]["label"]) ?></label>
  152. <p class="wpd-desc"><?php echo esc_html($setting["options"]["mostVotedByDefault"]["description"]) ?></p>
  153. </div>
  154. <div class="wpd-opt-input">
  155. <div class="wpd-switcher">
  156. <input type="checkbox" <?php checked($this->thread_display["mostVotedByDefault"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[mostVotedByDefault]" id="mostVotedByDefault">
  157. <label for="mostVotedByDefault"></label>
  158. </div>
  159. </div>
  160. <div class="wpd-opt-doc">
  161. <?php $this->printDocLink($setting["options"]["mostVotedByDefault"]["docurl"]) ?>
  162. </div>
  163. </div>
  164. <!-- Option end -->
  165. <!-- Option start -->
  166. <div class="wpd-opt-row" data-wpd-opt="reverseChildren">
  167. <div class="wpd-opt-name">
  168. <label for="reverseChildren"><?php echo esc_html($setting["options"]["reverseChildren"]["label"]) ?></label>
  169. <p class="wpd-desc"><?php echo esc_html($setting["options"]["reverseChildren"]["description"]) ?></p>
  170. </div>
  171. <div class="wpd-opt-input">
  172. <div class="wpd-switcher">
  173. <input type="checkbox" <?php checked($this->thread_display["reverseChildren"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[reverseChildren]" id="reverseChildren">
  174. <label for="reverseChildren"></label>
  175. </div>
  176. </div>
  177. <div class="wpd-opt-doc">
  178. <?php $this->printDocLink($setting["options"]["reverseChildren"]["docurl"]) ?>
  179. </div>
  180. </div>
  181. <!-- Option end -->
  182. <!-- Option start -->
  183. <div class="wpd-opt-row" data-wpd-opt="highlightUnreadComments">
  184. <div class="wpd-opt-name">
  185. <label for="highlightUnreadComments"><?php echo esc_html($setting["options"]["highlightUnreadComments"]["label"]) ?></label>
  186. <p class="wpd-desc"><?php echo esc_html($setting["options"]["highlightUnreadComments"]["description"]) ?></p>
  187. </div>
  188. <div class="wpd-opt-input">
  189. <div class="wpd-switcher">
  190. <input type="checkbox" <?php checked($this->thread_display["highlightUnreadComments"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[highlightUnreadComments]" id="highlightUnreadComments">
  191. <label for="highlightUnreadComments"></label>
  192. </div>
  193. </div>
  194. <div class="wpd-opt-doc">
  195. <?php $this->printDocLink($setting["options"]["highlightUnreadComments"]["docurl"]) ?>
  196. </div>
  197. </div>
  198. <!-- Option end -->
  199. <!-- Option start -->
  200. <div class="wpd-opt-row" data-wpd-opt="scrollToComment">
  201. <div class="wpd-opt-name">
  202. <label for="scrollToComment"><?php echo $setting["options"]["scrollToComment"]["label"] ?></label>
  203. <p class="wpd-desc"><?php echo esc_html($setting["options"]["scrollToComment"]["description"]) ?></p>
  204. </div>
  205. <div class="wpd-opt-input">
  206. <div class="wpd-switcher">
  207. <input type="checkbox" <?php checked($this->thread_display["scrollToComment"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[scrollToComment]" id="scrollToComment">
  208. <label for="scrollToComment"></label>
  209. </div>
  210. </div>
  211. <div class="wpd-opt-doc">
  212. <?php $this->printDocLink($setting["options"]["scrollToComment"]["docurl"]) ?>
  213. </div>
  214. </div>
  215. <!-- Option end -->
  216. <!-- Option start -->
  217. <div class="wpd-opt-row" data-wpd-opt="orderCommentsBy">
  218. <div class="wpd-opt-name">
  219. <label for="orderCommentsBy"><?php echo esc_html($setting["options"]["orderCommentsBy"]["label"]) ?></label>
  220. <p class="wpd-desc"><?php echo esc_html($setting["options"]["orderCommentsBy"]["description"]) ?></p>
  221. </div>
  222. <div class="wpd-opt-input">
  223. <div class="wpd-switch-field">
  224. <input type="radio" value="comment_ID" <?php checked("comment_ID" === $this->thread_display["orderCommentsBy"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[orderCommentsBy]" id="orderCommentsById" />
  225. <label for="orderCommentsById" style="min-width:60px;"><?php esc_html_e("ID", "wpdiscuz"); ?></label>
  226. <input type="radio" value="comment_date_gmt" <?php checked("comment_date_gmt" === $this->thread_display["orderCommentsBy"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[orderCommentsBy]" id="orderCommentsByDate" />
  227. <label for="orderCommentsByDate" style="min-width:60px;"><?php esc_html_e("Date", "wpdiscuz"); ?></label>
  228. </div>
  229. </div>
  230. <div class="wpd-opt-doc">
  231. <?php $this->printDocLink($setting["options"]["orderCommentsBy"]["docurl"]) ?>
  232. </div>
  233. </div>
  234. <!-- Option end -->