Strong Testimonials - Version 2.37

Version Description

Download this release

Release Info

Developer machothemes
Plugin Icon 128x128 Strong Testimonials
Version 2.37
Comparing to
See all releases

Code changes from version 2.36 to 2.37

Files changed (514) hide show
  1. admin/about/addons.php +0 -0
  2. admin/about/class-strong-testimonials-about.php +8 -8
  3. admin/about/how-to.php +0 -0
  4. admin/about/links.php +0 -0
  5. admin/about/privacy.php +0 -0
  6. admin/about/whats-new.php +0 -0
  7. admin/admin-notices.php +3 -1
  8. admin/admin.php +0 -0
  9. admin/class-strong-testimonials-admin-category-list.php +0 -0
  10. admin/class-strong-testimonials-admin-list.php +0 -0
  11. admin/class-strong-testimonials-admin-scripts.php +8 -4
  12. admin/class-strong-testimonials-defaults.php +13 -21
  13. admin/class-strong-testimonials-exporter.php +80 -0
  14. admin/class-strong-testimonials-help.php +53 -53
  15. admin/class-strong-testimonials-list-table.php +1011 -946
  16. admin/class-strong-testimonials-page-shortcodes.php +2 -2
  17. admin/class-strong-testimonials-post-editor.php +8 -12
  18. admin/class-strong-testimonials-updater.php +9 -0
  19. admin/class-strong-views-list-table.php +5 -4
  20. admin/class-walker-strong-category-checklist.php +0 -0
  21. admin/class-walker-strong-form-category-checklist.php +0 -0
  22. admin/compat.php +0 -0
  23. admin/css/about.css +0 -0
  24. admin/css/admin-compat.css +0 -0
  25. admin/css/admin-form.css +0 -0
  26. admin/css/fields.css +0 -0
  27. admin/css/form-preview.css +0 -0
  28. admin/css/number-spinner.css +0 -0
  29. admin/css/order.css +0 -0
  30. admin/css/polylang.css +0 -0
  31. admin/css/post-editor.css +0 -0
  32. admin/css/views.css +0 -0
  33. admin/css/wpml.css +0 -0
  34. admin/custom-fields-ajax.php +0 -0
  35. admin/custom-fields.php +132 -112
  36. admin/form-preview.php +0 -0
  37. admin/img/logo-long.svg +0 -0
  38. admin/img/mascot.png +0 -0
  39. admin/img/quotes.png +0 -0
  40. admin/img/screen-options.png +0 -0
  41. admin/img/strong-date.png +0 -0
  42. admin/img/strong-testimonials-badge.png +0 -0
  43. admin/js/addon-licenses.js +0 -0
  44. admin/js/admin-compat.js +0 -0
  45. admin/js/admin-fields.js +6 -5
  46. admin/js/admin-form.js +0 -0
  47. admin/js/admin-global.js +0 -0
  48. admin/js/admin-order.js +0 -0
  49. admin/js/admin.js +0 -106
  50. admin/js/custom-spinner.js +0 -0
  51. admin/js/help.js +0 -0
  52. admin/js/lib/are-you-sure/jquery.are-you-sure.js +0 -0
  53. admin/js/lib/are-you-sure/jquery.are-you-sure.min.js +0 -0
  54. admin/js/lib/autosize/autosize.min.js +0 -0
  55. admin/js/rating-edit.js +0 -0
  56. admin/js/view-category-filter.js +0 -0
  57. admin/js/views.js +0 -0
  58. admin/menu/class-strong-testimonials-menu-fields.php +0 -0
  59. admin/menu/class-strong-testimonials-menu-settings.php +0 -0
  60. admin/menu/class-strong-testimonials-menu-shortcodes.php +0 -0
  61. admin/menu/class-strong-testimonials-menu-views.php +0 -0
  62. admin/menu/class-strong-testimonials-menu.php +0 -0
  63. admin/partials/fields/field-controls.php +1 -1
  64. admin/partials/fields/field-header.php +0 -0
  65. admin/partials/fields/field-label.php +0 -0
  66. admin/partials/fields/field-name.php +0 -0
  67. admin/partials/fields/field-text.php +0 -0
  68. admin/partials/fields/field-type.php +0 -0
  69. admin/partials/templates/form-preview-template.php +0 -0
  70. admin/partials/views/group-compat.php +0 -0
  71. admin/partials/views/group-extra.php +0 -0
  72. admin/partials/views/group-fields.php +0 -0
  73. admin/partials/views/group-form.php +0 -0
  74. admin/partials/views/group-query.php +3 -3
  75. admin/partials/views/group-slideshow.php +0 -0
  76. admin/partials/views/group-style.php +0 -0
  77. admin/partials/views/option-background.php +0 -0
  78. admin/partials/views/option-boilerplate.php +0 -0
  79. admin/partials/views/option-category.php +3 -3
  80. admin/partials/views/option-classes.php +0 -0
  81. admin/partials/views/option-client-section.php +0 -0
  82. admin/partials/views/option-color.php +0 -0
  83. admin/partials/views/option-content.php +3 -1
  84. admin/partials/views/option-divi.php +0 -0
  85. admin/partials/views/option-form-ajax.php +0 -0
  86. admin/partials/views/option-form-category.php +0 -0
  87. admin/partials/views/option-id.php +1 -1
  88. admin/partials/views/option-layout.php +0 -0
  89. admin/partials/views/option-limit.php +3 -3
  90. admin/partials/views/option-order.php +4 -4
  91. admin/partials/views/option-pagination.php +3 -2
  92. admin/partials/views/option-read-more-page.php +13 -12
  93. admin/partials/views/option-select.php +3 -3
  94. admin/partials/views/option-slideshow-behavior.php +1 -1
  95. admin/partials/views/option-slideshow-breakpoints.php +0 -0
  96. admin/partials/views/option-slideshow-navigation.php +0 -0
  97. admin/partials/views/option-slideshow-num.php +0 -0
  98. admin/partials/views/option-slideshow-transition.php +0 -0
  99. admin/partials/views/option-slideshow-type.php +0 -0
  100. admin/partials/views/option-template-list.php +0 -0
  101. admin/partials/views/option-thumbnail.php +0 -0
  102. admin/partials/views/option-title.php +0 -0
  103. admin/partials/views/template-input.php +0 -0
  104. admin/partials/views/template-not-found.php +0 -0
  105. admin/partials/views/template-options.php +0 -0
  106. admin/partials/views/view-mode.php +0 -0
  107. admin/partials/views/view-name.php +0 -0
  108. admin/partials/views/view-shortcode.php +0 -0
  109. admin/scss/_partials/_background.scss +0 -0
  110. admin/scss/_partials/_category-checkboxes.scss +0 -0
  111. admin/scss/_partials/_category-filter.scss +0 -0
  112. admin/scss/_partials/_checkbox-icons.scss +0 -0
  113. admin/scss/_partials/_custom-fields.scss +0 -0
  114. admin/scss/_partials/_elements.scss +0 -0
  115. admin/scss/_partials/_form-table.scss +0 -0
  116. admin/scss/_partials/_help-tab.scss +0 -0
  117. admin/scss/_partials/_inner-table.scss +0 -0
  118. admin/scss/_partials/_inputs.scss +0 -0
  119. admin/scss/_partials/_layout-example-columns.scss +0 -0
  120. admin/scss/_partials/_layout-example-grid.scss +0 -0
  121. admin/scss/_partials/_layout-example-masonry.scss +0 -0
  122. admin/scss/_partials/_layout-examples.scss +0 -0
  123. admin/scss/_partials/_layout.scss +0 -0
  124. admin/scss/_partials/_list-radio-buttons.scss +0 -0
  125. admin/scss/_partials/_misc.scss +0 -0
  126. admin/scss/_partials/_screenshots.scss +0 -0
  127. admin/scss/_partials/_sticky-views.scss +0 -0
  128. admin/scss/_partials/_structure.scss +0 -0
  129. admin/scss/_partials/_template.scss +0 -0
  130. admin/scss/_partials/_view-info.scss +0 -0
  131. admin/scss/about.scss +0 -0
  132. admin/scss/admin-compat.scss +0 -0
  133. admin/scss/number-spinner.scss +0 -0
  134. admin/scss/post-editor.scss +0 -0
  135. admin/scss/views.scss +0 -0
  136. admin/settings/class-strong-testimonials-settings-compat.php +3 -3
  137. admin/settings/class-strong-testimonials-settings-form.php +1 -5
  138. admin/settings/class-strong-testimonials-settings-general.php +13 -12
  139. admin/settings/class-strong-testimonials-settings-licenses.php +0 -0
  140. admin/settings/class-strong-testimonials-settings.php +5 -5
  141. admin/settings/partials/email-from.php +0 -0
  142. admin/settings/partials/email-to.php +0 -0
  143. admin/settings/partials/email.php +0 -0
  144. admin/settings/partials/form.php +86 -101
  145. admin/settings/partials/general.php +12 -0
  146. admin/settings/partials/licenses.php +0 -0
  147. admin/settings/partials/recipient.php +0 -0
  148. admin/view-list-order.php +0 -0
  149. admin/views-ajax.php +0 -0
  150. admin/views-validate.php +0 -0
  151. admin/views.php +12 -11
  152. {admin → assets}/css/admin.css +202 -374
  153. assets/js/admin-js.js +261 -0
  154. assets/src/js/admin.js +125 -0
  155. assets/src/js/modules/notice.js +21 -0
  156. assets/src/js/modules/range-slider.js +26 -0
  157. assets/src/scss/admin.scss +853 -0
  158. assets/src/scss/admin/_notices.scss +1 -0
  159. assets/src/scss/admin/_pages.scss +28 -0
  160. changelog.txt +12 -0
  161. includes/class-strong-form.php +0 -0
  162. includes/class-strong-log.php +0 -0
  163. includes/class-strong-mail.php +0 -0
  164. includes/class-strong-templates.php +0 -0
  165. includes/class-strong-testimonials-order.php +0 -0
  166. includes/class-strong-testimonials-privacy.php +0 -0
  167. includes/class-strong-testimonials-render.php +3 -1
  168. includes/class-strong-testimonials-shortcode-average.php +0 -0
  169. includes/class-strong-testimonials-shortcode-count.php +0 -0
  170. includes/class-strong-testimonials-shortcode.php +0 -0
  171. includes/class-strong-view-display.php +0 -0
  172. includes/class-strong-view-form.php +0 -0
  173. includes/class-strong-view-slideshow.php +0 -0
  174. includes/class-strong-view.php +0 -0
  175. includes/class-walker-strong-category-checklist-front.php +0 -0
  176. includes/deprecated.php +0 -0
  177. includes/filters.php +118 -0
  178. includes/functions-activation.php +0 -0
  179. includes/functions-content.php +3 -3
  180. includes/functions-image.php +0 -0
  181. includes/functions-rating.php +0 -0
  182. includes/functions-template-form.php +111 -101
  183. includes/functions-template.php +3 -3
  184. includes/functions-views.php +0 -0
  185. includes/functions.php +23 -2
  186. includes/integrations/class-integration-captcha-pro.php +0 -0
  187. includes/integrations/class-integration-captcha.php +0 -0
  188. includes/integrations/class-integration-google-captcha.php +0 -0
  189. includes/integrations/class-integration-really-simple-captcha.php +0 -0
  190. includes/l10n-polylang.php +0 -0
  191. includes/l10n-wpml.php +0 -0
  192. includes/post-types.php +15 -15
  193. includes/retro.php +0 -0
  194. includes/scripts.php +2 -0
  195. includes/widget2.php +6 -7
  196. languages/strong-testimonials-ar_AR.mo +0 -0
  197. languages/strong-testimonials-ar_AR.po +0 -0
  198. languages/strong-testimonials-es_ES.mo +0 -0
  199. languages/strong-testimonials-es_ES.po +0 -0
  200. languages/strong-testimonials-fa_IR.mo +0 -0
  201. languages/strong-testimonials-fa_IR.po +0 -0
  202. languages/strong-testimonials-fr_FR.mo +0 -0
  203. languages/strong-testimonials-fr_FR.po +0 -0
  204. languages/strong-testimonials-he_IL.mo +0 -0
  205. languages/strong-testimonials-he_IL.po +0 -0
  206. languages/strong-testimonials-pt_BR.mo +0 -0
  207. languages/strong-testimonials-pt_BR.po +0 -0
  208. languages/strong-testimonials-ru_RU.mo +0 -0
  209. languages/strong-testimonials-ru_RU.po +0 -0
  210. languages/strong-testimonials-sv_SE.mo +0 -0
  211. languages/strong-testimonials-sv_SE.po +0 -0
  212. languages/strong-testimonials.pot +0 -0
  213. license.txt +0 -0
  214. public/css/animate.min.css +0 -0
  215. public/css/columns.css +0 -0
  216. public/css/grid.css +0 -0
  217. public/css/masonry.css +0 -0
  218. public/css/rating-display.css +0 -0
  219. public/css/rating-form.css +0 -0
  220. public/css/slider-controls-full-buttons.css +0 -0
  221. public/css/slider-controls-full-buttons2.css +0 -0
  222. public/css/slider-controls-full-buttons3.css +0 -0
  223. public/css/slider-controls-full-text.css +0 -0
  224. public/css/slider-controls-sides-buttons-pager-buttons.css +0 -0
  225. public/css/slider-controls-sides-buttons-pager-text.css +0 -0
  226. public/css/slider-controls-sides-buttons.css +0 -0
  227. public/css/slider-controls-sides-buttons2-pager-buttons.css +0 -0
  228. public/css/slider-controls-sides-buttons2-pager-text.css +0 -0
  229. public/css/slider-controls-sides-buttons2.css +0 -0
  230. public/css/slider-controls-sides-buttons3-pager-buttons.css +0 -0
  231. public/css/slider-controls-sides-buttons3-pager-text.css +0 -0
  232. public/css/slider-controls-sides-buttons3.css +0 -0
  233. public/css/slider-controls-sides-inside-buttons-pager-buttons.css +0 -0
  234. public/css/slider-controls-sides-inside-buttons-pager-text.css +0 -0
  235. public/css/slider-controls-sides-inside-buttons.css +0 -0
  236. public/css/slider-controls-sides-inside-buttons2-pager-buttons.css +0 -0
  237. public/css/slider-controls-sides-inside-buttons2-pager-text.css +0 -0
  238. public/css/slider-controls-sides-inside-buttons2.css +0 -0
  239. public/css/slider-controls-sides-inside-buttons3-pager-buttons.css +0 -0
  240. public/css/slider-controls-sides-inside-buttons3-pager-text.css +0 -0
  241. public/css/slider-controls-sides-inside-buttons3.css +0 -0
  242. public/css/slider-controls-sides-outside-buttons-pager-buttons.css +0 -0
  243. public/css/slider-controls-sides-outside-buttons-pager-text.css +0 -0
  244. public/css/slider-controls-sides-outside-buttons.css +0 -0
  245. public/css/slider-controls-sides-outside-buttons2-pager-buttons.css +0 -0
  246. public/css/slider-controls-sides-outside-buttons2-pager-text.css +0 -0
  247. public/css/slider-controls-sides-outside-buttons2.css +0 -0
  248. public/css/slider-controls-sides-outside-buttons3-pager-buttons.css +0 -0
  249. public/css/slider-controls-sides-outside-buttons3-pager-text.css +0 -0
  250. public/css/slider-controls-sides-outside-buttons3.css +0 -0
  251. public/css/slider-controls-simple-buttons-pager-buttons.css +0 -0
  252. public/css/slider-controls-simple-buttons-pager-text.css +0 -0
  253. public/css/slider-controls-simple-buttons.css +0 -0
  254. public/css/slider-controls-simple-buttons2-pager-buttons.css +0 -0
  255. public/css/slider-controls-simple-buttons2-pager-text.css +0 -0
  256. public/css/slider-controls-simple-buttons2.css +0 -0
  257. public/css/slider-controls-simple-buttons3-pager-buttons.css +0 -0
  258. public/css/slider-controls-simple-buttons3-pager-text.css +0 -0
  259. public/css/slider-controls-simple-buttons3.css +0 -0
  260. public/css/slider-controls-simple-text-pager-buttons.css +0 -0
  261. public/css/slider-controls-simple-text-pager-text.css +0 -0
  262. public/css/slider-controls-simple-text.css +0 -0
  263. public/css/slider-pager-buttons.css +0 -0
  264. public/css/slider-pager-text.css +0 -0
  265. public/fonts/font-awesome-4.6.3/css/font-awesome.css +0 -0
  266. public/fonts/font-awesome-4.6.3/css/font-awesome.min.css +0 -0
  267. public/fonts/font-awesome-4.6.3/css/index.php +0 -0
  268. public/fonts/font-awesome-4.6.3/fonts/FontAwesome.otf +0 -0
  269. public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.eot +0 -0
  270. public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.svg +0 -0
  271. public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.ttf +0 -0
  272. public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff +0 -0
  273. public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff2 +0 -0
  274. public/index.php +0 -0
  275. public/js/controller.js +10 -1
  276. public/js/controller.min.js +1 -1
  277. public/js/lib/actual/jquery.actual.js +0 -0
  278. public/js/lib/actual/jquery.actual.min.js +0 -0
  279. public/js/lib/form-validation/form-validation.js +0 -0
  280. public/js/lib/form-validation/form-validation.min.js +0 -0
  281. public/js/lib/imagesloaded/imagesloaded.pkgd.min.js +0 -0
  282. public/js/lib/readmore/readmore.js +0 -0
  283. public/js/lib/readmore/readmore.min.js +0 -0
  284. public/js/lib/strongpager/jquery.strongpager.js +0 -0
  285. public/js/lib/strongpager/jquery.strongpager.min.js +0 -0
  286. public/js/lib/strongslider/LICENSE.md +0 -0
  287. public/js/lib/strongslider/jquery.strongslider.js +1972 -1969
  288. public/js/lib/strongslider/jquery.strongslider.min.js +1 -1
  289. public/js/lib/validate/additional-methods.js +0 -0
  290. public/js/lib/validate/additional-methods.min.js +0 -0
  291. public/js/lib/validate/jquery.validate.js +0 -0
  292. public/js/lib/validate/jquery.validate.min.js +0 -0
  293. public/js/lib/validate/localization/messages_ar.js +0 -0
  294. public/js/lib/validate/localization/messages_ar.min.js +0 -0
  295. public/js/lib/validate/localization/messages_az.js +0 -0
  296. public/js/lib/validate/localization/messages_az.min.js +0 -0
  297. public/js/lib/validate/localization/messages_bg.js +0 -0
  298. public/js/lib/validate/localization/messages_bg.min.js +0 -0
  299. public/js/lib/validate/localization/messages_bn_BD.js +0 -0
  300. public/js/lib/validate/localization/messages_bn_BD.min.js +0 -0
  301. public/js/lib/validate/localization/messages_ca.js +0 -0
  302. public/js/lib/validate/localization/messages_ca.min.js +0 -0
  303. public/js/lib/validate/localization/messages_cs.js +0 -0
  304. public/js/lib/validate/localization/messages_cs.min.js +0 -0
  305. public/js/lib/validate/localization/messages_da.js +0 -0
  306. public/js/lib/validate/localization/messages_da.min.js +0 -0
  307. public/js/lib/validate/localization/messages_de.js +0 -0
  308. public/js/lib/validate/localization/messages_de.min.js +0 -0
  309. public/js/lib/validate/localization/messages_el.js +0 -0
  310. public/js/lib/validate/localization/messages_el.min.js +0 -0
  311. public/js/lib/validate/localization/messages_es.js +0 -0
  312. public/js/lib/validate/localization/messages_es.min.js +0 -0
  313. public/js/lib/validate/localization/messages_es_AR.js +0 -0
  314. public/js/lib/validate/localization/messages_es_AR.min.js +0 -0
  315. public/js/lib/validate/localization/messages_es_PE.js +0 -0
  316. public/js/lib/validate/localization/messages_es_PE.min.js +0 -0
  317. public/js/lib/validate/localization/messages_et.js +0 -0
  318. public/js/lib/validate/localization/messages_et.min.js +0 -0
  319. public/js/lib/validate/localization/messages_eu.js +0 -0
  320. public/js/lib/validate/localization/messages_eu.min.js +0 -0
  321. public/js/lib/validate/localization/messages_fa.js +0 -0
  322. public/js/lib/validate/localization/messages_fa.min.js +0 -0
  323. public/js/lib/validate/localization/messages_fi.js +0 -0
  324. public/js/lib/validate/localization/messages_fi.min.js +0 -0
  325. public/js/lib/validate/localization/messages_fr.js +0 -0
  326. public/js/lib/validate/localization/messages_fr.min.js +0 -0
  327. public/js/lib/validate/localization/messages_ge.js +0 -0
  328. public/js/lib/validate/localization/messages_ge.min.js +0 -0
  329. public/js/lib/validate/localization/messages_gl.js +0 -0
  330. public/js/lib/validate/localization/messages_gl.min.js +0 -0
  331. public/js/lib/validate/localization/messages_he.js +0 -0
  332. public/js/lib/validate/localization/messages_he.min.js +0 -0
  333. public/js/lib/validate/localization/messages_hr.js +0 -0
  334. public/js/lib/validate/localization/messages_hr.min.js +0 -0
  335. public/js/lib/validate/localization/messages_hu.js +0 -0
  336. public/js/lib/validate/localization/messages_hu.min.js +0 -0
  337. public/js/lib/validate/localization/messages_hy_AM.js +0 -0
  338. public/js/lib/validate/localization/messages_hy_AM.min.js +0 -0
  339. public/js/lib/validate/localization/messages_id.js +0 -0
  340. public/js/lib/validate/localization/messages_id.min.js +0 -0
  341. public/js/lib/validate/localization/messages_is.js +0 -0
  342. public/js/lib/validate/localization/messages_is.min.js +0 -0
  343. public/js/lib/validate/localization/messages_it.js +0 -0
  344. public/js/lib/validate/localization/messages_it.min.js +0 -0
  345. public/js/lib/validate/localization/messages_ja.js +0 -0
  346. public/js/lib/validate/localization/messages_ja.min.js +0 -0
  347. public/js/lib/validate/localization/messages_ka.js +0 -0
  348. public/js/lib/validate/localization/messages_ka.min.js +0 -0
  349. public/js/lib/validate/localization/messages_kk.js +0 -0
  350. public/js/lib/validate/localization/messages_kk.min.js +0 -0
  351. public/js/lib/validate/localization/messages_ko.js +0 -0
  352. public/js/lib/validate/localization/messages_ko.min.js +0 -0
  353. public/js/lib/validate/localization/messages_lt.js +0 -0
  354. public/js/lib/validate/localization/messages_lt.min.js +0 -0
  355. public/js/lib/validate/localization/messages_lv.js +0 -0
  356. public/js/lib/validate/localization/messages_lv.min.js +0 -0
  357. public/js/lib/validate/localization/messages_mk.js +0 -0
  358. public/js/lib/validate/localization/messages_mk.min.js +0 -0
  359. public/js/lib/validate/localization/messages_my.js +0 -0
  360. public/js/lib/validate/localization/messages_my.min.js +0 -0
  361. public/js/lib/validate/localization/messages_nl.js +0 -0
  362. public/js/lib/validate/localization/messages_nl.min.js +0 -0
  363. public/js/lib/validate/localization/messages_no.js +0 -0
  364. public/js/lib/validate/localization/messages_no.min.js +0 -0
  365. public/js/lib/validate/localization/messages_pl.js +0 -0
  366. public/js/lib/validate/localization/messages_pl.min.js +0 -0
  367. public/js/lib/validate/localization/messages_pt_BR.js +0 -0
  368. public/js/lib/validate/localization/messages_pt_BR.min.js +0 -0
  369. public/js/lib/validate/localization/messages_pt_PT.js +0 -0
  370. public/js/lib/validate/localization/messages_pt_PT.min.js +0 -0
  371. public/js/lib/validate/localization/messages_ro.js +0 -0
  372. public/js/lib/validate/localization/messages_ro.min.js +0 -0
  373. public/js/lib/validate/localization/messages_ru.js +0 -0
  374. public/js/lib/validate/localization/messages_ru.min.js +0 -0
  375. public/js/lib/validate/localization/messages_si.js +0 -0
  376. public/js/lib/validate/localization/messages_si.min.js +0 -0
  377. public/js/lib/validate/localization/messages_sk.js +0 -0
  378. public/js/lib/validate/localization/messages_sk.min.js +0 -0
  379. public/js/lib/validate/localization/messages_sl.js +0 -0
  380. public/js/lib/validate/localization/messages_sl.min.js +0 -0
  381. public/js/lib/validate/localization/messages_sr.js +0 -0
  382. public/js/lib/validate/localization/messages_sr.min.js +0 -0
  383. public/js/lib/validate/localization/messages_sr_lat.js +0 -0
  384. public/js/lib/validate/localization/messages_sr_lat.min.js +0 -0
  385. public/js/lib/validate/localization/messages_sv.js +0 -0
  386. public/js/lib/validate/localization/messages_sv.min.js +0 -0
  387. public/js/lib/validate/localization/messages_th.js +0 -0
  388. public/js/lib/validate/localization/messages_th.min.js +0 -0
  389. public/js/lib/validate/localization/messages_tj.js +0 -0
  390. public/js/lib/validate/localization/messages_tj.min.js +0 -0
  391. public/js/lib/validate/localization/messages_tr.js +0 -0
  392. public/js/lib/validate/localization/messages_tr.min.js +0 -0
  393. public/js/lib/validate/localization/messages_uk.js +0 -0
  394. public/js/lib/validate/localization/messages_uk.min.js +0 -0
  395. public/js/lib/validate/localization/messages_ur.js +0 -0
  396. public/js/lib/validate/localization/messages_ur.min.js +0 -0
  397. public/js/lib/validate/localization/messages_vi.js +0 -0
  398. public/js/lib/validate/localization/messages_vi.min.js +0 -0
  399. public/js/lib/validate/localization/messages_zh.js +0 -0
  400. public/js/lib/validate/localization/messages_zh.min.js +0 -0
  401. public/js/lib/validate/localization/messages_zh_TW.js +0 -0
  402. public/js/lib/validate/localization/messages_zh_TW.min.js +0 -0
  403. public/js/lib/validate/localization/methods_de.js +0 -0
  404. public/js/lib/validate/localization/methods_de.min.js +0 -0
  405. public/js/lib/validate/localization/methods_es_CL.js +0 -0
  406. public/js/lib/validate/localization/methods_es_CL.min.js +0 -0
  407. public/js/lib/validate/localization/methods_fi.js +0 -0
  408. public/js/lib/validate/localization/methods_fi.min.js +0 -0
  409. public/js/lib/validate/localization/methods_nl.js +0 -0
  410. public/js/lib/validate/localization/methods_nl.min.js +0 -0
  411. public/js/lib/validate/localization/methods_pt.js +0 -0
  412. public/js/lib/validate/localization/methods_pt.min.js +0 -0
  413. public/js/lib/verge/verge.js +0 -0
  414. public/js/lib/verge/verge.min.js +0 -0
  415. public/scss/_partials/_base.scss +0 -0
  416. public/scss/_partials/_buttons.scss +0 -0
  417. public/scss/_partials/_buttons2.scss +0 -0
  418. public/scss/_partials/_buttons3.scss +0 -0
  419. public/scss/_partials/_inside.scss +0 -0
  420. public/scss/_partials/_outside.scss +0 -0
  421. public/scss/_partials/_pager_buttons.scss +0 -0
  422. public/scss/_partials/_pager_inside.scss +0 -0
  423. public/scss/_partials/_pager_text.scss +0 -0
  424. public/scss/_partials/_sides.scss +0 -0
  425. public/scss/_partials/_sides_outside.scss +0 -0
  426. public/scss/_partials/_sides_pager.scss +0 -0
  427. public/scss/_partials/_text.scss +0 -0
  428. public/scss/slider-controls-full-buttons.scss +0 -0
  429. public/scss/slider-controls-full-buttons2.scss +0 -0
  430. public/scss/slider-controls-full-buttons3.scss +0 -0
  431. public/scss/slider-controls-full-text.scss +0 -0
  432. public/scss/slider-controls-sides-buttons-pager-buttons.scss +0 -0
  433. public/scss/slider-controls-sides-buttons-pager-text.scss +0 -0
  434. public/scss/slider-controls-sides-buttons.scss +0 -0
  435. public/scss/slider-controls-sides-buttons2-pager-buttons.scss +0 -0
  436. public/scss/slider-controls-sides-buttons2-pager-text.scss +0 -0
  437. public/scss/slider-controls-sides-buttons2.scss +0 -0
  438. public/scss/slider-controls-sides-buttons3-pager-buttons.scss +0 -0
  439. public/scss/slider-controls-sides-buttons3-pager-text.scss +0 -0
  440. public/scss/slider-controls-sides-buttons3.scss +0 -0
  441. public/scss/slider-controls-sides-outside-buttons-pager-buttons.scss +0 -0
  442. public/scss/slider-controls-sides-outside-buttons-pager-text.scss +0 -0
  443. public/scss/slider-controls-sides-outside-buttons.scss +0 -0
  444. public/scss/slider-controls-sides-outside-buttons2-pager-buttons.scss +0 -0
  445. public/scss/slider-controls-sides-outside-buttons2-pager-text.scss +0 -0
  446. public/scss/slider-controls-sides-outside-buttons2.scss +0 -0
  447. public/scss/slider-controls-sides-outside-buttons3-pager-buttons.scss +0 -0
  448. public/scss/slider-controls-sides-outside-buttons3-pager-text.scss +0 -0
  449. public/scss/slider-controls-sides-outside-buttons3.scss +0 -0
  450. public/scss/slider-controls-simple-buttons-pager-buttons.scss +0 -0
  451. public/scss/slider-controls-simple-buttons-pager-text.scss +0 -0
  452. public/scss/slider-controls-simple-buttons.scss +0 -0
  453. public/scss/slider-controls-simple-buttons2-pager-buttons.scss +0 -0
  454. public/scss/slider-controls-simple-buttons2-pager-text.scss +0 -0
  455. public/scss/slider-controls-simple-buttons2.scss +0 -0
  456. public/scss/slider-controls-simple-buttons3-pager-buttons.scss +0 -0
  457. public/scss/slider-controls-simple-buttons3-pager-text.scss +0 -0
  458. public/scss/slider-controls-simple-buttons3.scss +0 -0
  459. public/scss/slider-controls-simple-text-pager-buttons.scss +0 -0
  460. public/scss/slider-controls-simple-text-pager-text.scss +0 -0
  461. public/scss/slider-controls-simple-text.scss +0 -0
  462. public/scss/slider-pager-buttons.scss +0 -0
  463. public/scss/slider-pager-text.scss +0 -0
  464. readme.txt +2 -2
  465. strong-testimonials.php +7 -2
  466. templates-scss/_mixins/_testimonial.scss +0 -0
  467. templates-scss/_partials/_base.scss +0 -0
  468. templates-scss/_partials/_clear.scss +0 -0
  469. templates-scss/_partials/_form-wait.scss +0 -0
  470. templates-scss/_partials/_pagination-modern.scss +0 -0
  471. templates-scss/_partials/_pagination-simple.scss +0 -0
  472. templates-scss/_partials/_pagination-standard.scss +0 -0
  473. templates-scss/_partials/_responsive-no-heading-background.scss +0 -0
  474. templates-scss/_partials/_responsive.scss +0 -0
  475. templates-scss/_partials/_rtl.scss +0 -0
  476. templates-scss/_partials/_structure-form.scss +0 -0
  477. templates-scss/bold/content.scss +0 -0
  478. templates-scss/default-form/form.scss +0 -0
  479. templates-scss/default/content.scss +0 -0
  480. templates-scss/modern/content.scss +0 -0
  481. templates-scss/simple-form/form.scss +0 -0
  482. templates-scss/simple/content.scss +0 -0
  483. templates-scss/small-widget/content.scss +0 -0
  484. templates-scss/unstyled-form/form.scss +0 -0
  485. templates/bold/config.json +0 -0
  486. templates/bold/content.css +0 -0
  487. templates/bold/content.php +0 -0
  488. templates/default-form/config.json +0 -0
  489. templates/default-form/form.css +0 -0
  490. templates/default-form/form.php +0 -0
  491. templates/default/config.json +0 -0
  492. templates/default/content.css +0 -0
  493. templates/default/content.php +0 -0
  494. templates/default/img/quotes.png +0 -0
  495. templates/index.php +0 -0
  496. templates/modern/config.json +0 -0
  497. templates/modern/content.css +0 -0
  498. templates/modern/content.php +0 -0
  499. templates/simple-form/config.json +0 -0
  500. templates/simple-form/form.css +0 -0
  501. templates/simple-form/form.php +0 -0
  502. templates/simple/config.json +0 -0
  503. templates/simple/content.css +0 -0
  504. templates/simple/content.php +0 -0
  505. templates/small-widget/config.json +0 -0
  506. templates/small-widget/content.css +0 -0
  507. templates/small-widget/content.php +0 -0
  508. templates/unstyled-form/config.json +0 -0
  509. templates/unstyled-form/form.css +0 -0
  510. templates/unstyled-form/form.php +0 -0
  511. templates/unstyled/config.json +0 -0
  512. templates/unstyled/content.php +0 -0
  513. uninstall.php +0 -0
  514. wpml-config.xml +0 -0
admin/about/addons.php CHANGED
File without changes
admin/about/class-strong-testimonials-about.php CHANGED
@@ -39,9 +39,9 @@ class Strong_Testimonials_About {
39
  */
40
  public function get_submenu() {
41
  return array(
42
- 'page_title' => __( 'About' ),
43
- 'menu_title' => __( 'About' ),
44
- 'capability' => 'strong_testimonials_about',
45
  'menu_slug' => 'about-strong-testimonials',
46
  'function' => array( $this, 'about_page' ),
47
  );
@@ -57,21 +57,21 @@ class Strong_Testimonials_About {
57
  ?>
58
  <div class="wrap about-wrap">
59
 
 
 
60
  <?php /* translators: %s is the plugin version number */ ?>
61
  <h1><?php printf( __( 'Welcome to Strong Testimonials %s', 'strong-testimonials' ), $major_minor ); ?></h1>
62
 
63
  <p class="about-text">
64
- <?php _e( 'Thank you for updating to the latest version!' ); ?>
65
  <?php /* translators: %s is the plugin version number */ ?>
66
  </p>
67
-
68
- <div class="wp-badge strong-testimonials"><?php printf( __( 'Version %s' ), $major_minor ); ?></div>
69
 
70
  <h2 class="nav-tab-wrapper wp-clearfix">
71
 
72
  <a href="<?php echo add_query_arg( 'tab', 'how-to', $url ); ?>" class="nav-tab <?php echo $active_tab == 'how-to' ? 'nav-tab-active' : ''; ?>"><?php _e( 'How To', 'strong-testimonials' ); ?></a>
73
-
74
- <a href="<?php echo add_query_arg( 'tab', 'privacy', $url ); ?>" class="nav-tab <?php echo $active_tab == 'privacy' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Privacy' ); ?></a>
75
 
76
  </h2>
77
 
39
  */
40
  public function get_submenu() {
41
  return array(
42
+ 'page_title' => __( 'About', 'strong-testimonials' ),
43
+ 'menu_title' => __( 'About', 'strong-testimonials' ),
44
+ 'capability' => 'strong_testimonials_about',
45
  'menu_slug' => 'about-strong-testimonials',
46
  'function' => array( $this, 'about_page' ),
47
  );
57
  ?>
58
  <div class="wrap about-wrap">
59
 
60
+ <img class="wpmst-mascot" src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/mascot.png" />
61
+
62
  <?php /* translators: %s is the plugin version number */ ?>
63
  <h1><?php printf( __( 'Welcome to Strong Testimonials %s', 'strong-testimonials' ), $major_minor ); ?></h1>
64
 
65
  <p class="about-text">
66
+ <?php esc_html_e( 'Thank you for updating to the latest version!', 'strong-testimonials' ); ?>
67
  <?php /* translators: %s is the plugin version number */ ?>
68
  </p>
69
+ <br/>
 
70
 
71
  <h2 class="nav-tab-wrapper wp-clearfix">
72
 
73
  <a href="<?php echo add_query_arg( 'tab', 'how-to', $url ); ?>" class="nav-tab <?php echo $active_tab == 'how-to' ? 'nav-tab-active' : ''; ?>"><?php _e( 'How To', 'strong-testimonials' ); ?></a>
74
+ <a href="<?php echo esc_url( add_query_arg( 'tab', 'privacy', $url ) ); ?>" class="nav-tab <?php echo $active_tab == 'privacy' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Privacy', 'strong-testimonials' ); ?></a>
 
75
 
76
  </h2>
77
 
admin/about/how-to.php CHANGED
File without changes
admin/about/links.php CHANGED
File without changes
admin/about/privacy.php CHANGED
File without changes
admin/about/whats-new.php CHANGED
File without changes
admin/admin-notices.php CHANGED
@@ -182,8 +182,10 @@ function wpmtst_admin_feedback_notice() {
182
  if ( $screen->id !== 'edit-wpm-testimonial' ) {
183
  return;
184
  }
 
185
  ?>
186
- <div class="notice wpmtst-notice">
 
187
  <img src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/logo-long.svg" width="400"/>
188
  <p><?php esc_html_e( 'Do you enjoy using Strong Testimonials? Please take a minute to suggest a feature or tell us what you think.', 'strong-testimonials' ); ?></p>
189
  <a class="button" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScch0AchtnzxJsSrjUcW9ypcr1fZ9r-vyk3emEp8Sv47brb2g/viewform"><?php esc_html_e( 'Submit Feedback', 'strong-testimonials' ); ?></a>
182
  if ( $screen->id !== 'edit-wpm-testimonial' ) {
183
  return;
184
  }
185
+
186
  ?>
187
+ <div class="notice wpmtst-notice is-dismissible" data-key="feedback-notice" data-nonce="<?php echo esc_attr( wp_create_nonce( "wpmtst-admin" ) ); ?>">
188
+ <img class="wpmst-mascot" src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/mascot.png" />
189
  <img src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/logo-long.svg" width="400"/>
190
  <p><?php esc_html_e( 'Do you enjoy using Strong Testimonials? Please take a minute to suggest a feature or tell us what you think.', 'strong-testimonials' ); ?></p>
191
  <a class="button" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScch0AchtnzxJsSrjUcW9ypcr1fZ9r-vyk3emEp8Sv47brb2g/viewform"><?php esc_html_e( 'Submit Feedback', 'strong-testimonials' ); ?></a>
admin/admin.php CHANGED
File without changes
admin/class-strong-testimonials-admin-category-list.php CHANGED
File without changes
admin/class-strong-testimonials-admin-list.php CHANGED
File without changes
admin/class-strong-testimonials-admin-scripts.php CHANGED
@@ -56,14 +56,18 @@ class Strong_Testimonials_Admin_Scripts {
56
  $plugin_version,
57
  true );
58
 
59
- wp_register_script( 'wpmtst-admin-script',
60
- WPMTST_ADMIN_URL . 'js/admin.js',
 
 
61
  array( 'jquery', 'underscore' ),
62
  $plugin_version,
63
  true );
64
 
65
- wp_register_style( 'wpmtst-admin-style',
66
- WPMTST_ADMIN_URL . 'css/admin.css',
 
 
67
  array( 'wpmtst-font-awesome' ),
68
  $plugin_version );
69
 
56
  $plugin_version,
57
  true );
58
 
59
+
60
+ wp_register_script(
61
+ 'wpmtst-admin-script',
62
+ WPMTST_ASSETS_JS . 'admin-js.js',
63
  array( 'jquery', 'underscore' ),
64
  $plugin_version,
65
  true );
66
 
67
+
68
+ wp_register_style(
69
+ 'wpmtst-admin-style',
70
+ WPMTST_ASSETS_CSS . 'admin.css',
71
  array( 'wpmtst-font-awesome' ),
72
  $plugin_version );
73
 
admin/class-strong-testimonials-defaults.php CHANGED
@@ -29,18 +29,19 @@ class Strong_Testimonials_Defaults {
29
  */
30
  public static function get_options() {
31
  $default_options = array(
32
- 'embed_width' => '',
33
- 'load_font_awesome' => true,
34
- 'nofollow' => false,
35
- 'pending_indicator' => true,
36
- 'remove_whitespace' => true,
37
- 'reorder' => false,
38
- 'support_comments' => false,
39
- 'support_custom_fields' => false,
40
- 'scrolltop' => true,
41
- 'scrolltop_offset' => 80,
42
- 'no_lazyload' => true,
43
- 'touch_enabled' => true,
 
44
  );
45
 
46
  return $default_options;
@@ -865,15 +866,6 @@ class Strong_Testimonials_Defaults {
865
  'installed' => false,
866
  'active' => false,
867
  ),
868
- 'really-simple-captcha' => array(
869
- 'name' => 'Really Simple Captcha by Takayuki Miyoshi (free)',
870
- 'class' => 'Really_Simple_Captcha',
871
- 'file' => 'really-simple-captcha/really-simple-captcha.php',
872
- 'search' => 'plugin-install.php?tab=search&s=Really+Simple+Captcha',
873
- 'url' => 'https://wordpress.org/plugins/really-simple-captcha/',
874
- 'installed' => false,
875
- 'active' => false,
876
- ),
877
  );
878
 
879
  return $plugins;
29
  */
30
  public static function get_options() {
31
  $default_options = array(
32
+ 'embed_width' => '',
33
+ 'load_font_awesome' => true,
34
+ 'nofollow' => false,
35
+ 'pending_indicator' => true,
36
+ 'remove_whitespace' => true,
37
+ 'reorder' => false,
38
+ 'support_comments' => false,
39
+ 'support_custom_fields' => false,
40
+ 'single_testimonial_slug' => 'testimonial',
41
+ 'scrolltop' => true,
42
+ 'scrolltop_offset' => 80,
43
+ 'no_lazyload' => true,
44
+ 'touch_enabled' => true,
45
  );
46
 
47
  return $default_options;
866
  'installed' => false,
867
  'active' => false,
868
  ),
 
 
 
 
 
 
 
 
 
869
  );
870
 
871
  return $plugins;
admin/class-strong-testimonials-exporter.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Strong_Testimonials_Exporter
5
+ *
6
+ * exports testimonials along with their featured media
7
+ *
8
+ * @since 2.36
9
+ */
10
+ class Strong_Testimonials_Exporter {
11
+
12
+ public $args = array();
13
+ public $query_done = false;
14
+
15
+ public function __construct() {
16
+ add_action( 'export_wp', array( $this, 'export_wp' ), 10, 1 );
17
+ add_filter( 'export_query', array( $this, 'export_query' ), 10, 1 );
18
+ }
19
+
20
+ public function export_wp( $args ) {
21
+ $this->args = $args;
22
+ add_filter( 'query', array( $this, 'export_query_filter' ), 10, 1 );
23
+ }
24
+
25
+ public function export_query_filter( $query ) {
26
+
27
+ global $wpdb;
28
+ if ( false === $this->query_done && 0 === strpos( $query, "SELECT ID FROM {$wpdb->posts} " ) ) {
29
+ $this->query_done = true;
30
+ remove_filter( 'query', array( $this, 'export_query_filter' ), 10 );
31
+ $query = apply_filters( 'export_query', $query );
32
+ }
33
+ return $query;
34
+ }
35
+
36
+ public function export_query( $query ) {
37
+ global $wpdb;
38
+
39
+ if ( isset( $this->args['content'] ) && 'wpm-testimonial' === $this->args['content'] ) {
40
+
41
+ $attachments = $wpdb->get_results( "SELECT ID, guid, post_parent FROM {$wpdb->posts} WHERE post_type = 'attachment'", OBJECT_K );
42
+ if ( empty( $attachments ) ) {
43
+ return $query;
44
+ }
45
+
46
+ $ids = array();
47
+
48
+ // get attachments who are post thumbnails
49
+ $posts = $wpdb->get_col( $query );
50
+ if ( $posts ) {
51
+ $ids = $wpdb->get_col( sprintf( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = '_thumbnail_id' AND post_id IN(%s)", implode( ',', $posts ) ) );
52
+ }
53
+
54
+ // get atachments who have a post parent.
55
+ foreach ( $attachments as $id => $att ) {
56
+ if ( in_array( $att->post_parent, $posts ) ) {
57
+ $ids[] = $id;
58
+ }
59
+ }
60
+
61
+ $ids = array_unique( $ids );
62
+ if ( count( $ids ) === 0 ) {
63
+ return $query;
64
+ }
65
+
66
+ if ( 0 === strpos( $query, "SELECT ID FROM {$wpdb->posts} INNER JOIN {$wpdb->term_relationships} " ) ) {
67
+ // replace INNER JOIN with LEFT JOIN.
68
+ $query = str_replace( "SELECT ID FROM {$wpdb->posts} INNER JOIN {$wpdb->term_relationships} ", "SELECT ID FROM {$wpdb->posts} LEFT JOIN {$wpdb->term_relationships} ", $query );
69
+ }
70
+ $query .= sprintf( " OR {$wpdb->posts}.ID IN (%s) ", implode( ',', $ids ) );
71
+
72
+ }
73
+ return $query;
74
+ }
75
+
76
+
77
+ }
78
+
79
+ new Strong_Testimonials_Exporter();
80
+
admin/class-strong-testimonials-help.php CHANGED
@@ -115,21 +115,21 @@ class Strong_Testimonials_Help {
115
 
116
  ob_start();
117
  ?>
118
- <div>
119
- <p><?php _e( 'Optional shortcode attributes will override the view settings. Use this to create reusable view <strong>patterns</strong>.', 'strong-testimonials' ); ?>
120
- <p><?php _e( 'Overridable settings: <code>post_ids</code>, <code>category</code>, <code>order</code>, <code>count</code>.', 'strong-testimonials' ); ?>
121
- <p><?php _e( 'For example, imagine you have five services, a sales page for each service, and a testimonial category for each service. To display the testimonials on each service page, you can create five duplicate views, one for each category.', 'strong-testimonials' ); ?>
122
- <p><?php _e( 'Or you can configure one view as a pattern and add it to each service page with the <code>category</code> attribute.', 'strong-testimonials' ); ?>
123
- <p>
124
- <?php _e( '<code>[testimonial_view id="1" category="service-1"]</code>', 'strong-testimonials' ); ?>,
125
- <?php _e( '<code>[testimonial_view id="1" category="service-2"]</code>', 'strong-testimonials' ); ?>, etc.
126
- </p>
127
- <p>
128
- <?php _e( 'Attributes may be used in combination. For example:', 'strong-testimonials' ); ?>
129
- <?php _e( '<code>[testimonial_view id="1" category="service-3" order="random" count="5"]</code>', 'strong-testimonials' ); ?>
130
- </p>
131
- <p><?php _e( 'Using <code>post_ids</code> is the most specific method and it will override category and count (whether settings or attributes).', 'strong-testimonials' ); ?></p>
132
- </div>
133
  <?php
134
  $content = ob_get_clean();
135
 
@@ -150,44 +150,44 @@ class Strong_Testimonials_Help {
150
 
151
  ob_start();
152
  ?>
153
- <p><?php _e( 'Some of the features and drawbacks for each method.', 'strong-testimonials' ); ?></p>
154
-
155
- <table class="wpmtst-help-tab" cellpadding="0" cellspacing="0">
156
- <thead>
157
- <tr>
158
- <th></th>
159
- <th><?php _e( 'Simple', 'strong-testimonials' ); ?></th>
160
- <th><?php _e( 'Standard', 'strong-testimonials' ); ?></th>
161
- </tr>
162
- </thead>
163
- <tbody>
164
- <tr>
165
- <td><?php _e( 'best use', 'strong-testimonials' ); ?></td>
166
- <td><?php _e( 'ten pages or less', 'strong-testimonials' ); ?></td>
167
- <td><?php _e( 'more than ten pages', 'strong-testimonials' ); ?></td>
168
- </tr>
169
- <tr>
170
- <td><?php _e( 'URLs', 'strong-testimonials' ); ?></td>
171
- <td><?php _e( 'does not change the URL', 'strong-testimonials' ); ?></td>
172
- <td><?php _e( 'uses paged URLs just like standard WordPress posts', 'strong-testimonials' ); ?></td>
173
- </tr>
174
- <tr>
175
- <td><?php _e( 'the Back button', 'strong-testimonials' ); ?></td>
176
- <td><?php _e( 'It does not remember which page of testimonials you are on. If you click away &ndash; for example, on a "Read more" link &ndash; then click back, you will return to page one.', 'strong-testimonials' ); ?></td>
177
- <td><?php _e( 'You will return the last page you were on so this works well with "Read more" links.', 'strong-testimonials' ); ?></td>
178
- </tr>
179
- <tr>
180
- <td><?php _e( 'works with random order option', 'strong-testimonials' ); ?></td>
181
- <td><?php _e( 'yes' ); ?></td>
182
- <td><?php _e( 'no' ); ?></td>
183
- </tr>
184
- <tr>
185
- <td><?php _e( 'works in a widget', 'strong-testimonials' ); ?></td>
186
- <td><?php _e( 'yes' ); ?></td>
187
- <td><?php _e( 'no' ); ?></td>
188
- </tr>
189
- </tbody>
190
- </table>
191
  <?php
192
  $content = ob_get_clean();
193
 
115
 
116
  ob_start();
117
  ?>
118
+ <div>
119
+ <p><?php echo wp_kses_post( _e( 'Optional shortcode attributes will override the view settings. Use this to create reusable view <strong>patterns</strong>.', 'strong-testimonials' ) ); ?>
120
+ <p><?php echo wp_kses_post( _e( 'Overridable settings: <code>post_ids</code>, <code>category</code>, <code>order</code>, <code>count</code>.', 'strong-testimonials' ) ); ?>
121
+ <p><?php echo wp_kses_post( _e( 'For example, imagine you have five services, a sales page for each service, and a testimonial category for each service. To display the testimonials on each service page, you can create five duplicate views, one for each category.', 'strong-testimonials' ) ); ?>
122
+ <p><?php echo wp_kses_post( _e( 'Or you can configure one view as a pattern and add it to each service page with the <code>category</code> attribute.', 'strong-testimonials' ) ); ?>
123
+ <p>
124
+ <?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-1"]</code>' ); ?>,
125
+ <?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-2"]</code>' ); ?>, etc.
126
+ </p>
127
+ <p>
128
+ <?php echo wp_kses_post( _e( 'Attributes may be used in combination. For example:', 'strong-testimonials' ) ); ?>
129
+ <?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-3" order="random" count="5"]</code>' ); ?>
130
+ </p>
131
+ <p><?php echo wp_kses_post( _e( 'Using <code>post_ids</code> is the most specific method and it will override category and count (whether settings or attributes).', 'strong-testimonials' ) ); ?></p>
132
+ </div>
133
  <?php
134
  $content = ob_get_clean();
135
 
150
 
151
  ob_start();
152
  ?>
153
+ <p><?php esc_html_e( 'Some of the features and drawbacks for each method.', 'strong-testimonials' ); ?></p>
154
+
155
+ <table class="wpmtst-help-tab" cellpadding="0" cellspacing="0">
156
+ <thead>
157
+ <tr>
158
+ <th></th>
159
+ <th><?php esc_html_e( 'Simple', 'strong-testimonials' ); ?></th>
160
+ <th><?php esc_html_e( 'Standard', 'strong-testimonials' ); ?></th>
161
+ </tr>
162
+ </thead>
163
+ <tbody>
164
+ <tr>
165
+ <td><?php esc_html_e( 'best use', 'strong-testimonials' ); ?></td>
166
+ <td><?php esc_html_e( 'ten pages or less', 'strong-testimonials' ); ?></td>
167
+ <td><?php esc_html_e( 'more than ten pages', 'strong-testimonials' ); ?></td>
168
+ </tr>
169
+ <tr>
170
+ <td><?php esc_html_e( 'URLs', 'strong-testimonials' ); ?></td>
171
+ <td><?php esc_html_e( 'does not change the URL', 'strong-testimonials' ); ?></td>
172
+ <td><?php esc_html_e( 'uses paged URLs just like standard WordPress posts', 'strong-testimonials' ); ?></td>
173
+ </tr>
174
+ <tr>
175
+ <td><?php esc_html_e( 'the Back button', 'strong-testimonials' ); ?></td>
176
+ <td><?php esc_html_e( 'It does not remember which page of testimonials you are on. If you click away &ndash; for example, on a "Read more" link &ndash; then click back, you will return to page one.', 'strong-testimonials' ); ?></td>
177
+ <td><?php esc_html_e( 'You will return the last page you were on so this works well with "Read more" links.', 'strong-testimonials' ); ?></td>
178
+ </tr>
179
+ <tr>
180
+ <td><?php esc_html_e( 'works with random order option', 'strong-testimonials' ); ?></td>
181
+ <td><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></td>
182
+ <td><?php esc_html_e( 'no', 'strong-testimonials' ); ?></td>
183
+ </tr>
184
+ <tr>
185
+ <td><?php esc_html_e( 'works in a widget', 'strong-testimonials' ); ?></td>
186
+ <td><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></td>
187
+ <td><?php esc_html_e( 'no', 'strong-testimonials' ); ?></td>
188
+ </tr>
189
+ </tbody>
190
+ </table>
191
  <?php
192
  $content = ob_get_clean();
193
 
admin/class-strong-testimonials-list-table.php CHANGED
@@ -10,585 +10,629 @@
10
  * @access private
11
  */
12
 
13
- if ( !class_exists( 'Strong_Testimonials_List_Table' ) ) :
14
-
15
- class Strong_Testimonials_List_Table {
16
-
17
- /**
18
- * The current list of items
19
- *
20
- * @since 3.1.0
21
- * @var array
22
- * @access public
23
- */
24
- public $items;
25
-
26
- /**
27
- * Various information about the current table
28
- *
29
- * @since 3.1.0
30
- * @var array
31
- * @access protected
32
- */
33
- protected $_args;
34
-
35
- /**
36
- * Various information needed for displaying the pagination
37
- *
38
- * @since 3.1.0
39
- * @var array
40
- */
41
- protected $_pagination_args = array();
42
-
43
- /**
44
- * The current screen
45
- *
46
- * @since 3.1.0
47
- * @var object
48
- * @access protected
49
- */
50
- protected $screen;
51
-
52
- /**
53
- * Cached bulk actions
54
- *
55
- * @since 3.1.0
56
- * @var array
57
- * @access private
58
- */
59
- private $_actions;
60
-
61
- /**
62
- * Cached pagination output
63
- *
64
- * @since 3.1.0
65
- * @var string
66
- * @access private
67
- */
68
- private $_pagination;
69
-
70
- /**
71
- * The view switcher modes.
72
- *
73
- * @since 4.1.0
74
- * @var array
75
- * @access protected
76
- */
77
- protected $modes = array();
78
-
79
- /**
80
- * Stores the value returned by ->get_column_info()
81
- *
82
- * @var array
83
- */
84
- protected $_column_headers;
85
-
86
- protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' );
87
-
88
- protected $compat_methods = array( 'set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions',
89
- 'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination',
90
- 'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav',
91
- 'single_row_columns' );
92
-
93
- /**
94
- * Constructor.
95
- *
96
- * The child class should call this constructor from its own constructor to override
97
- * the default $args.
98
- *
99
- * @since 3.1.0
100
- * @access public
101
- *
102
- * @param array|string $args {
103
- * Array or string of arguments.
104
- *
105
- * @type string $plural Plural value used for labels and the objects being listed.
106
- * This affects things such as CSS class-names and nonces used
107
- * in the list table, e.g. 'posts'. Default empty.
108
- * @type string $singular Singular label for an object being listed, e.g. 'post'.
109
- * Default empty
110
- * @type bool $ajax Whether the list table supports AJAX. This includes loading
111
- * and sorting data, for example. If true, the class will call
112
- * the {@see _js_vars()} method in the footer to provide variables
113
- * to any scripts handling AJAX events. Default false.
114
- * @type string $screen String containing the hook name used to determine the current
115
- * screen. If left null, the current screen will be automatically set.
116
- * Default null.
117
- * }
118
- */
119
- public function __construct( $args = array() ) {
120
- $args = wp_parse_args( $args, array(
121
- 'plural' => '',
122
- 'singular' => '',
123
- 'ajax' => false,
124
- 'screen' => null,
125
- ) );
126
-
127
- $this->screen = convert_to_screen( $args['screen'] );
128
-
129
- add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
130
-
131
- if ( !$args['plural'] )
132
- $args['plural'] = $this->screen->base;
133
-
134
- $args['plural'] = sanitize_key( $args['plural'] );
135
- $args['singular'] = sanitize_key( $args['singular'] );
136
-
137
- $this->_args = $args;
138
-
139
- if ( $args['ajax'] ) {
140
- // wp_enqueue_script( 'list-table' );
141
- add_action( 'admin_footer', array( $this, '_js_vars' ) );
142
- }
143
 
144
- if ( empty( $this->modes ) ) {
145
- $this->modes = array(
146
- 'list' => __( 'List View' ),
147
- 'excerpt' => __( 'Excerpt View' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  );
149
- }
150
- }
151
 
152
- /**
153
- * Make private properties readable for backwards compatibility.
154
- *
155
- * @since 4.0.0
156
- * @access public
157
- *
158
- * @param string $name Property to get.
159
- * @return mixed Property.
160
- */
161
- public function __get( $name ) {
162
- if ( in_array( $name, $this->compat_fields ) ) {
163
- return $this->$name;
 
 
 
 
 
 
 
 
 
 
 
 
164
  }
165
- }
166
 
167
- /**
168
- * Make private properties settable for backwards compatibility.
169
- *
170
- * @since 4.0.0
171
- * @access public
172
- *
173
- * @param string $name Property to check if set.
174
- * @param mixed $value Property value.
175
- * @return mixed Newly-set property.
176
- */
177
- public function __set( $name, $value ) {
178
- if ( in_array( $name, $this->compat_fields ) ) {
179
- return $this->$name = $value;
180
  }
181
- }
182
 
183
- /**
184
- * Make private properties checkable for backwards compatibility.
185
- *
186
- * @since 4.0.0
187
- * @access public
188
- *
189
- * @param string $name Property to check if set.
190
- * @return bool Whether the property is set.
191
- */
192
- public function __isset( $name ) {
193
- if ( in_array( $name, $this->compat_fields ) ) {
194
- return isset( $this->$name );
 
 
195
  }
196
- }
197
 
198
- /**
199
- * Make private properties un-settable for backwards compatibility.
200
- *
201
- * @since 4.0.0
202
- * @access public
203
- *
204
- * @param string $name Property to unset.
205
- */
206
- public function __unset( $name ) {
207
- if ( in_array( $name, $this->compat_fields ) ) {
208
- unset( $this->$name );
 
 
209
  }
210
- }
211
 
212
- /**
213
- * Make private/protected methods readable for backwards compatibility.
214
- *
215
- * @since 4.0.0
216
- * @access public
217
- *
218
- * @param callable $name Method to call.
219
- * @param array $arguments Arguments to pass when calling.
220
- * @return mixed|bool Return value of the callback, false otherwise.
221
- */
222
- public function __call( $name, $arguments ) {
223
- if ( in_array( $name, $this->compat_methods ) ) {
224
- return call_user_func_array( array( $this, $name ), $arguments );
225
  }
226
- return false;
227
- }
228
 
229
- /**
230
- * Checks the current user's permissions
231
- *
232
- * @since 3.1.0
233
- * @access public
234
- * @abstract
235
- */
236
- public function ajax_user_can() {
237
- die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
238
- }
 
 
 
 
 
 
239
 
240
- /**
241
- * Prepares the list of items for displaying.
242
- * @uses WP_List_Table::set_pagination_args()
243
- *
244
- * @since 3.1.0
245
- * @access public
246
- * @abstract
247
- */
248
- public function prepare_items() {
249
- die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
250
- }
251
 
252
- /**
253
- * An internal method that sets all the necessary pagination arguments
254
- *
255
- * @param array $args An associative array with information about the pagination
256
- * @access protected
257
- */
258
- protected function set_pagination_args( $args ) {
259
- $args = wp_parse_args( $args, array(
260
- 'total_items' => 0,
261
- 'total_pages' => 0,
262
- 'per_page' => 0,
263
- ) );
264
-
265
- if ( !$args['total_pages'] && $args['per_page'] > 0 )
266
- $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
267
-
268
- // Redirect if page number is invalid and headers are not already sent.
269
- if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
270
- wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
271
- exit;
272
  }
273
 
274
- $this->_pagination_args = $args;
275
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
276
 
277
- /**
278
- * Access the pagination args.
279
- *
280
- * @since 3.1.0
281
- * @access public
282
- *
283
- * @param string $key Pagination argument to retrieve. Common values include 'total_items',
284
- * 'total_pages', 'per_page', or 'infinite_scroll'.
285
- * @return int Number of items that correspond to the given pagination argument.
286
- */
287
- public function get_pagination_arg( $key ) {
288
- if ( 'page' == $key )
289
- return $this->get_pagenum();
290
-
291
- if ( isset( $this->_pagination_args[$key] ) )
292
- return $this->_pagination_args[$key];
293
- }
294
 
295
- /**
296
- * Whether the table has items to display or not
297
- *
298
- * @since 3.1.0
299
- * @access public
300
- *
301
- * @return bool
302
- */
303
- public function has_items() {
304
- return !empty( $this->items );
305
- }
306
 
307
- /**
308
- * Message to be displayed when there are no items
309
- *
310
- * @since 3.1.0
311
- * @access public
312
- */
313
- public function no_items() {
314
- _e( 'No items found.' );
315
- }
316
 
317
- /**
318
- * Display the search box.
319
- *
320
- * @since 3.1.0
321
- * @access public
322
- *
323
- * @param string $text The search button text
324
- * @param string $input_id The search input id
325
- */
326
- public function search_box( $text, $input_id ) {
327
- if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
328
- return;
329
-
330
- $input_id = $input_id . '-search-input';
331
-
332
- if ( ! empty( $_REQUEST['orderby'] ) )
333
- echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '">';
334
- if ( ! empty( $_REQUEST['order'] ) )
335
- echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '">';
336
- if ( ! empty( $_REQUEST['post_mime_type'] ) )
337
- echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '">';
338
- if ( ! empty( $_REQUEST['detached'] ) )
339
- echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '">';
340
- ?>
341
- <p class="search-box">
342
- <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
343
- <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>">
344
- <?php submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); ?>
345
- </p>
346
- <?php
347
- }
348
 
349
- /**
350
- * Get an associative array ( id => link ) with the list
351
- * of views available on this table.
352
- *
353
- * @since 3.1.0
354
- * @access protected
355
- *
356
- * @return array
357
- */
358
- protected function get_views() {
359
- return array();
360
- }
361
 
362
- /**
363
- * Display the list of views available on this table.
364
- *
365
- * @since 3.1.0
366
- * @access public
367
- */
368
- public function views() {
369
- $views = $this->get_views();
370
  /**
371
- * Filter the list of available list table views.
372
  *
373
- * The dynamic portion of the hook name, `$this->screen->id`, refers
374
- * to the ID of the current screen, usually a string.
375
  *
376
- * @since 3.5.0
 
 
 
 
 
 
 
377
  *
378
- * @param array $views An array of available list table views.
 
379
  */
380
- $views = apply_filters( "views_{$this->screen->id}", $views );
 
 
381
 
382
- if ( empty( $views ) )
383
- return;
 
 
 
 
 
 
 
 
 
 
 
384
 
385
- echo "<ul class='subsubsub'>\n";
386
- foreach ( $views as $class => $view ) {
387
- $views[ $class ] = "\t<li class='$class'>$view";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  }
389
- echo implode( " |</li>\n", $views ) . "</li>\n";
390
- echo "</ul>";
391
- }
392
 
393
- /**
394
- * Get an associative array ( option_name => option_title ) with the list
395
- * of bulk actions available on this table.
396
- *
397
- * @since 3.1.0
398
- * @access protected
399
- *
400
- * @return array
401
- */
402
- protected function get_bulk_actions() {
403
- return array();
404
- }
405
 
406
- /**
407
- * Display the bulk actions dropdown.
408
- *
409
- * @since 3.1.0
410
- * @access protected
411
- *
412
- * @param string $which The location of the bulk actions: 'top' or 'bottom'.
413
- * This is designated as optional for backwards-compatibility.
414
- */
415
- protected function bulk_actions( $which = '' ) {
416
- if ( is_null( $this->_actions ) ) {
417
- $no_new_actions = $this->_actions = $this->get_bulk_actions();
418
  /**
419
- * Filter the list table Bulk Actions drop-down.
420
  *
421
  * The dynamic portion of the hook name, `$this->screen->id`, refers
422
  * to the ID of the current screen, usually a string.
423
  *
424
- * This filter can currently only be used to remove bulk actions.
425
- *
426
  * @since 3.5.0
427
  *
428
- * @param array $actions An array of the available bulk actions.
429
  */
430
- $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
431
- $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
432
- $two = '';
433
- } else {
434
- $two = '2';
435
- }
436
 
437
- if ( empty( $this->_actions ) )
438
- return;
439
-
440
- echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
441
- echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
442
- echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
443
 
444
- foreach ( $this->_actions as $name => $title ) {
445
- $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
 
 
 
 
 
446
 
447
- echo "\t<option value='$name'$class>$title</option>\n";
 
 
 
 
 
 
 
 
 
 
448
  }
449
 
450
- echo "</select>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
 
452
- submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
453
- echo "\n";
454
- }
455
 
456
- /**
457
- * Get the current action selected from the bulk actions dropdown.
458
- *
459
- * @since 3.1.0
460
- * @access public
461
- *
462
- * @return string|bool The action name or False if no action was selected
463
- */
464
- public function current_action() {
465
- if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
466
- return false;
467
 
468
- if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
469
- return $_REQUEST['action'];
470
 
471
- if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
472
- return $_REQUEST['action2'];
473
 
474
- return false;
475
- }
476
 
477
- /**
478
- * Generate row actions div
479
- *
480
- * @since 3.1.0
481
- * @access protected
482
- *
483
- * @param array $actions The list of actions
484
- * @param bool $always_visible Whether the actions should be always visible
485
- * @return string
486
- */
487
- protected function row_actions( $actions, $always_visible = false ) {
488
- $action_count = count( $actions );
489
- $i = 0;
490
-
491
- if ( !$action_count )
492
- return '';
493
-
494
- $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
495
- foreach ( $actions as $action => $link ) {
496
- ++$i;
497
- ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
498
- $out .= "<span class='$action'>$link$sep</span>";
499
  }
500
- $out .= '</div>';
501
 
502
- return $out;
503
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
 
505
- /**
506
- * Display a monthly dropdown for filtering items
507
- *
508
- * @since 3.1.0
509
- * @access protected
510
- *
511
- * @param string $post_type
512
- */
513
- protected function months_dropdown( $post_type ) {
514
- global $wpdb, $wp_locale;
515
 
516
  /**
517
- * Filter whether to remove the 'Months' drop-down from the post list table.
518
  *
519
- * @since 4.2.0
 
520
  *
521
- * @param bool $disable Whether to disable the drop-down. Default false.
522
- * @param string $post_type The post type.
 
523
  */
524
- if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) {
525
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
  }
527
 
528
- $months = $wpdb->get_results( $wpdb->prepare( "
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
530
  FROM $wpdb->posts
531
  WHERE post_type = %s
532
  ORDER BY post_date DESC
533
- ", $post_type ) );
 
 
 
534
 
535
- /**
536
- * Filter the 'Months' drop-down results.
537
- *
538
- * @since 3.7.0
539
- *
540
- * @param object $months The months drop-down query results.
541
- * @param string $post_type The post type.
542
- */
543
- $months = apply_filters( 'months_dropdown_results', $months, $post_type );
544
 
545
- $month_count = count( $months );
546
 
547
- if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
548
- return;
 
549
 
550
- $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
551
- ?>
552
- <label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
553
  <select name="m" id="filter-by-date">
554
- <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
555
- <?php
556
- foreach ( $months as $arc_row ) {
557
- if ( 0 == $arc_row->year )
558
- continue;
559
-
560
- $month = zeroise( $arc_row->month, 2 );
561
- $year = $arc_row->year;
562
-
563
- printf( "<option %s value='%s'>%s</option>\n",
564
- selected( $m, $year . $month, false ),
565
- esc_attr( $arc_row->year . $month ),
566
- /* translators: 1: month name, 2: 4-digit year */
567
- sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
568
- );
569
- }
570
- ?>
 
 
571
  </select>
572
- <?php
573
- }
574
 
575
- /**
576
- * Display a view switcher
577
- *
578
- * @since 3.1.0
579
- * @access protected
580
- *
581
- * @param string $current_mode
582
- */
583
- protected function view_switcher( $current_mode ) {
584
- ?>
585
  <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>">
586
  <div class="view-switch">
587
- <?php
588
  foreach ( $this->modes as $mode => $title ) {
589
  $classes = array( 'view-' . $mode );
590
- if ( $current_mode == $mode )
591
  $classes[] = 'current';
 
592
  printf(
593
  "<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
594
  esc_url( add_query_arg( 'mode', $mode ) ),
@@ -596,552 +640,573 @@ class Strong_Testimonials_List_Table {
596
  $title
597
  );
598
  }
599
- ?>
600
  </div>
601
- <?php
602
- }
603
 
604
- /**
605
- * Display a comment count bubble
606
- *
607
- * @since 3.1.0
608
- * @access protected
609
- *
610
- * @param int $post_id The post ID.
611
- * @param int $pending_comments Number of pending comments.
612
- */
613
- protected function comments_bubble( $post_id, $pending_comments ) {
614
- $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
615
-
616
- if ( $pending_comments )
617
- echo '<strong>';
618
-
619
- echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
620
-
621
- if ( $pending_comments )
622
- echo '</strong>';
623
- }
624
 
625
- /**
626
- * Get the current page number
627
- *
628
- * @since 3.1.0
629
- * @access public
630
- *
631
- * @return int
632
- */
633
- public function get_pagenum() {
634
- $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
635
-
636
- if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
637
- $pagenum = $this->_pagination_args['total_pages'];
638
-
639
- return max( 1, $pagenum );
640
- }
641
 
642
- /**
643
- * Get number of items to display on a single page
644
- *
645
- * @since 3.1.0
646
- * @access protected
647
- *
648
- * @param string $option
649
- * @param int $default
650
- * @return int
651
- */
652
- protected function get_items_per_page( $option, $default = 20 ) {
653
- $per_page = (int) get_user_option( $option );
654
- if ( empty( $per_page ) || $per_page < 1 )
655
- $per_page = $default;
656
 
657
  /**
658
- * Filter the number of items to be displayed on each page of the list table.
659
- *
660
- * The dynamic hook name, $option, refers to the `per_page` option depending
661
- * on the type of list table in use. Possible values include: 'edit_comments_per_page',
662
- * 'sites_network_per_page', 'site_themes_network_per_page', 'themes_network_per_page',
663
- * 'users_network_per_page', 'edit_post_per_page', 'edit_page_per_page',
664
- * 'edit_{$post_type}_per_page', etc.
665
  *
666
- * @since 2.9.0
 
667
  *
668
- * @param int $per_page Number of items to be displayed. Default 20.
669
  */
670
- return (int) apply_filters( $option, $per_page );
671
- }
672
 
673
- /**
674
- * Display the pagination.
675
- *
676
- * @since 3.1.0
677
- * @access protected
678
- *
679
- * @param string $which
680
- */
681
- protected function pagination( $which ) {
682
- if ( empty( $this->_pagination_args ) ) {
683
- return;
684
  }
685
 
686
- $total_items = $this->_pagination_args['total_items'];
687
- $total_pages = $this->_pagination_args['total_pages'];
688
- $infinite_scroll = false;
689
- if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
690
- $infinite_scroll = $this->_pagination_args['infinite_scroll'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
691
  }
692
 
693
- $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
 
 
 
 
 
 
 
 
 
 
 
694
 
695
- $current = $this->get_pagenum();
 
 
 
 
 
696
 
697
- $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
698
 
699
- $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
700
 
701
- $page_links = array();
702
 
703
- $disable_first = $disable_last = '';
704
- if ( $current == 1 ) {
705
- $disable_first = ' disabled';
706
- }
707
- if ( $current == $total_pages ) {
708
- $disable_last = ' disabled';
709
- }
710
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
711
- 'first-page' . $disable_first,
712
- esc_attr__( 'Go to the first page' ),
713
- esc_url( remove_query_arg( 'paged', $current_url ) ),
714
- '&laquo;'
715
- );
716
 
717
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
718
- 'prev-page' . $disable_first,
719
- esc_attr__( 'Go to the previous page' ),
720
- esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
721
- '&lsaquo;'
722
- );
723
 
724
- if ( 'bottom' == $which ) {
725
- $html_current_page = $current;
726
- } else {
727
- $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' title='%s' type='text' name='paged' value='%s' size='%d'>",
728
- '<label for="current-page-selector" class="screen-reader-text">' . __( 'Select Page' ) . '</label>',
729
- esc_attr__( 'Current page' ),
730
- $current,
731
- strlen( $total_pages )
 
 
 
 
 
732
  );
733
- }
734
- $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
735
- $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
736
-
737
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
738
- 'next-page' . $disable_last,
739
- esc_attr__( 'Go to the next page' ),
740
- esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
741
- '&rsaquo;'
742
- );
743
-
744
- $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
745
- 'last-page' . $disable_last,
746
- esc_attr__( 'Go to the last page' ),
747
- esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
748
- '&raquo;'
749
- );
750
 
751
- $pagination_links_class = 'pagination-links';
752
- if ( ! empty( $infinite_scroll ) ) {
753
- $pagination_links_class = ' hide-if-js';
754
- }
755
- $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
 
 
756
 
757
- if ( $total_pages ) {
758
- $page_class = $total_pages < 2 ? ' one-page' : '';
759
- } else {
760
- $page_class = ' no-pages';
761
- }
762
- $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
 
764
- echo $this->_pagination;
765
- }
 
 
 
 
 
766
 
767
- /**
768
- * Get a list of columns. The format is:
769
- * 'internal-name' => 'Title'
770
- *
771
- * @since 3.1.0
772
- * @access public
773
- * @abstract
774
- *
775
- * @return array
776
- */
777
- public function get_columns() {
778
- die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
779
- }
780
 
781
- /**
782
- * Get a list of sortable columns. The format is:
783
- * 'internal-name' => 'orderby'
784
- * or
785
- * 'internal-name' => array( 'orderby', true )
786
- *
787
- * The second format will make the initial sorting order be descending
788
- *
789
- * @since 3.1.0
790
- * @access protected
791
- *
792
- * @return array
793
- */
794
- protected function get_sortable_columns() {
795
- return array();
796
- }
797
 
798
- /**
799
- * Get a list of all, hidden and sortable columns, with filter applied
800
- *
801
- * @since 3.1.0
802
- * @access protected
803
- *
804
- * @return array
805
- */
806
- protected function get_column_info() {
807
- if ( isset( $this->_column_headers ) )
808
- return $this->_column_headers;
809
 
810
- $columns = get_column_headers( $this->screen );
811
- $hidden = get_hidden_columns( $this->screen );
 
 
 
 
 
 
 
 
 
 
 
812
 
813
- $sortable_columns = $this->get_sortable_columns();
814
  /**
815
- * Filter the list table sortable columns for a specific screen.
 
 
 
816
  *
817
- * The dynamic portion of the hook name, `$this->screen->id`, refers
818
- * to the ID of the current screen, usually a string.
819
  *
820
- * @since 3.5.0
 
821
  *
822
- * @param array $sortable_columns An array of sortable columns.
823
  */
824
- $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
 
 
825
 
826
- $sortable = array();
827
- foreach ( $_sortable as $id => $data ) {
828
- if ( empty( $data ) )
829
- continue;
 
 
 
 
 
 
 
 
830
 
831
- $data = (array) $data;
832
- if ( !isset( $data[1] ) )
833
- $data[1] = false;
834
 
835
- $sortable[$id] = $data;
836
- }
 
 
 
 
 
 
 
 
 
 
837
 
838
- $this->_column_headers = array( $columns, $hidden, $sortable );
 
 
 
 
839
 
840
- return $this->_column_headers;
841
- }
 
 
842
 
843
- /**
844
- * Return number of visible columns
845
- *
846
- * @since 3.1.0
847
- * @access public
848
- *
849
- * @return int
850
- */
851
- public function get_column_count() {
852
- list ( $columns, $hidden ) = $this->get_column_info();
853
- $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
854
- return count( $columns ) - count( $hidden );
855
- }
856
 
857
- /**
858
- * Print column headers, accounting for hidden and sortable columns.
859
- *
860
- * @since 3.1.0
861
- * @access public
862
- *
863
- * @param bool $with_id Whether to set the id attribute or not
864
- */
865
- public function print_column_headers( $with_id = true ) {
866
- list( $columns, $hidden, $sortable ) = $this->get_column_info();
867
-
868
- $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
869
- $current_url = remove_query_arg( 'paged', $current_url );
870
-
871
- if ( isset( $_GET['orderby'] ) )
872
- $current_orderby = $_GET['orderby'];
873
- else
874
- $current_orderby = '';
875
-
876
- if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
877
- $current_order = 'desc';
878
- else
879
- $current_order = 'asc';
880
-
881
- if ( ! empty( $columns['cb'] ) ) {
882
- static $cb_counter = 1;
883
- $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
884
- . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox">';
885
- $cb_counter++;
886
  }
887
 
888
- foreach ( $columns as $column_key => $column_display_name ) {
889
- $class = array( 'manage-column', "column-$column_key" );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
890
 
891
- $style = '';
892
- if ( in_array( $column_key, $hidden ) )
893
- $style = 'display:none;';
 
 
894
 
895
- $style = ' style="' . $style . '"';
 
 
 
 
896
 
897
- if ( 'cb' == $column_key )
898
- $class[] = 'check-column';
899
- elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
900
- $class[] = 'num';
 
 
901
 
902
- if ( isset( $sortable[$column_key] ) ) {