Site Reviews - Version 5.11.0

Version Description

(2021-06-01) =

  • Added a REST API (see the provided documentation to learn how to use it)
  • Added custom capabilities for responding to reviews (respond_to_site-review and respond_to_others_site-review)
  • Added filters for categories, assigned posts, and assigned users on the "All Reviews" admin page (enable them in the "Screen Options" on the top-right of the page)
  • Added native Elementor widgets
  • Added support for in dropdown fields (this may be useful when using the Review Forms add-on to display a category dropdown with parent/child categories). To learn how to enable this, please see the FAQ Help page.
  • Added the glsr_update_review helper function (see the provided documentation to learn how to use it)
  • Added the ability to create reviews from the admin
  • Added the ability to respond to reviews from the "All Reviews" page
  • Added the site-reviews/review/build/tag/response/by hook (see the FAQ to learn how to use it to change the name in the response)
  • Fixed inline styles (overriding the star images should now display correctly in the block editor)
  • Fixed summary review counts for 0-star ratings
  • Fixed the star rating when resetting the submission form where a default rating is set
Download this release

Release Info

Developer geminilabs
Plugin Icon 128x128 Site Reviews
Version 5.11.0
Comparing to
See all releases

Code changes from version 5.10.4 to 5.11.0

Files changed (106) hide show
  1. assets/scripts/site-reviews-admin.js +1 -1
  2. assets/scripts/site-reviews-blocks.js +1 -1
  3. assets/scripts/site-reviews.js +1 -1
  4. assets/styles/admin/admin.css +1 -1
  5. compatibility.php +8 -14
  6. deprecated.php +20 -10
  7. helpers.php +16 -6
  8. languages/site-reviews-en_US.mo +0 -0
  9. languages/site-reviews-en_US.po +735 -79
  10. languages/site-reviews.pot +717 -77
  11. plugin/Addons/Addon.php +27 -0
  12. plugin/Application.php +3 -2
  13. plugin/Commands/EnqueueAdminAssets.php +1 -0
  14. plugin/Commands/EnqueuePublicAssets.php +17 -26
  15. plugin/Commands/RegisterPostType.php +4 -3
  16. plugin/Commands/RegisterTaxonomy.php +3 -2
  17. plugin/Commands/TogglePinned.php +1 -1
  18. plugin/Contracts/ColumnFilterContract.php +0 -11
  19. plugin/Controllers/AdminController.php +30 -3
  20. plugin/Controllers/Api/Version1/Response/Prepare.php +188 -0
  21. plugin/Controllers/Api/Version1/RestCategoryController.php +26 -0
  22. plugin/Controllers/Api/Version1/RestController.php +15 -0
  23. plugin/Controllers/Api/Version1/RestReviewController.php +539 -0
  24. plugin/Controllers/Api/Version1/RestSummaryController.php +119 -0
  25. plugin/Controllers/Api/Version1/RestTypeController.php +60 -0
  26. plugin/Controllers/Api/Version1/Schema/ReviewParameters.php +43 -0
  27. plugin/Controllers/Api/Version1/Schema/ReviewSchema.php +264 -0
  28. plugin/Controllers/Api/Version1/Schema/SummaryParameters.php +103 -0
  29. plugin/Controllers/BlocksController.php +2 -0
  30. plugin/Controllers/EditorController.php +7 -68
  31. plugin/Controllers/IntegrationController.php +53 -0
  32. plugin/Controllers/ListTableColumns/ColumnFilter.php +66 -0
  33. plugin/Controllers/ListTableColumns/ColumnFilterAssignedPost.php +57 -0
  34. plugin/Controllers/ListTableColumns/ColumnFilterAssignedUser.php +51 -0
  35. plugin/Controllers/ListTableColumns/ColumnFilterCategory.php +56 -0
  36. plugin/Controllers/ListTableColumns/ColumnFilterRating.php +33 -16
  37. plugin/Controllers/ListTableColumns/ColumnFilterType.php +22 -17
  38. plugin/Controllers/ListTableColumns/ColumnValueRating.php +5 -1
  39. plugin/Controllers/ListTableController.php +172 -22
  40. plugin/Controllers/MainController.php +1 -9
  41. plugin/Controllers/MenuController.php +19 -0
  42. plugin/Controllers/MetaboxController.php +9 -11
  43. plugin/Controllers/PrivacyController.php +1 -1
  44. plugin/Controllers/RestCategoryController.php +0 -34
  45. plugin/Controllers/RestReviewController.php +0 -71
  46. plugin/Controllers/ReviewController.php +7 -5
  47. plugin/Controllers/RevisionController.php +1 -1
  48. plugin/Database.php +14 -0
  49. plugin/Database/NormalizePaginationArgs.php +3 -1
  50. plugin/Database/NormalizeQueryArgs.php +9 -8
  51. plugin/Database/ReviewManager.php +120 -33
  52. plugin/Defaults/ColumnFilterbyDefaults.php +2 -0
  53. plugin/Defaults/CreateReviewDefaults.php +1 -1
  54. plugin/Defaults/CustomFieldsDefaults.php +12 -2
  55. plugin/Defaults/PostTypeDefaults.php +4 -2
  56. plugin/Defaults/ReviewDefaults.php +14 -0
  57. plugin/Defaults/ReviewTableFiltersDefaults.php +27 -0
  58. plugin/Defaults/ReviewsDefaults.php +2 -0
  59. plugin/Defaults/TaxonomyDefaults.php +26 -0
  60. plugin/Defaults/UpdateReviewDefaults.php +93 -0
  61. plugin/Helpers/Arr.php +3 -3
  62. plugin/Helpers/Str.php +10 -0
  63. plugin/Hooks.php +18 -4
  64. plugin/Integrations/Elementor/ElementorFormWidget.php +75 -0
  65. plugin/Integrations/Elementor/ElementorReviewsWidget.php +133 -0
  66. plugin/Integrations/Elementor/ElementorSummaryWidget.php +103 -0
  67. plugin/Integrations/Elementor/ElementorWidget.php +156 -0
  68. plugin/Modules/Console.php +2 -2
  69. plugin/Modules/Html/Attributes.php +4 -0
  70. plugin/Modules/Html/Builder.php +25 -3
  71. plugin/Modules/Html/Fields/Button.php +0 -9
  72. plugin/Modules/Html/ReviewHtml.php +16 -0
  73. plugin/Modules/Html/Tags/ReviewResponseTag.php +2 -1
  74. plugin/Modules/Html/Tags/Tag.php +3 -0
  75. plugin/Modules/Migrations/Migrate_5_11_0.php +33 -0
  76. plugin/Modules/Migrations/Migrate_5_9_0.php +2 -2
  77. plugin/Modules/Notice.php +1 -0
  78. plugin/Modules/Rating.php +1 -1
  79. plugin/Modules/Sanitizer.php +3 -2
  80. plugin/Overrides/ReviewsListTable.php +80 -0
  81. plugin/Review.php +3 -8
  82. plugin/Role.php +55 -42
  83. plugin/Tinymce/TinymceGenerator.php +2 -0
  84. readme.txt +18 -1
  85. site-reviews.php +1 -1
  86. templates/review.php +1 -1
  87. views/pages/documentation/api.php +14 -0
  88. views/pages/documentation/api/authentication.php +25 -0
  89. views/pages/documentation/api/categories.php +229 -0
  90. views/pages/documentation/api/reviews.php +575 -0
  91. views/pages/documentation/api/summary.php +174 -0
  92. views/pages/documentation/faq.php +1 -0
  93. views/pages/documentation/faq/change-response-name.php +36 -0
  94. views/pages/documentation/functions.php +1 -0
  95. views/pages/documentation/functions/glsr_create_review.php +0 -1
  96. views/pages/documentation/functions/glsr_update_review.php +53 -0
  97. views/pages/welcome/whatsnew.php +1 -0
  98. views/pages/welcome/whatsnew/v510.php +2 -2
  99. views/pages/welcome/whatsnew/v511.php +29 -0
  100. views/partials/editor/metabox-details.php +1 -1
  101. views/partials/editor/review.php +0 -26
  102. views/partials/screen/filters.php +11 -0
  103. views/partials/screen/inline-data.php +6 -0
  104. views/partials/screen/inline-edit.php +42 -0
  105. views/partials/screen/locked-indicator.php +8 -0
  106. views/partials/screen/locked-info.php +5 -0
assets/scripts/site-reviews-admin.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
- !function(){var t={367:function(t,n){var e,i,r;i=[t,n],void 0===(r="function"==typeof(e=function(t,n){"use strict";var e,i,r="function"==typeof Map?new Map:(e=[],i=[],{has:function(t){return e.indexOf(t)>-1},get:function(t){return i[e.indexOf(t)]},set:function(t,n){-1===e.indexOf(t)&&(e.push(t),i.push(n))},delete:function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),i.splice(n,1))}}),o=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){o=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function s(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!r.has(t)){var n=null,e=null,i=null,s=function(){t.clientWidth!==e&&d()},a=function(n){window.removeEventListener("resize",s,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),r.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",s,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",r.set(t,{destroy:a,update:d}),u()}function u(){var e=window.getComputedStyle(t,null);"vertical"===e.resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),d()}function c(n){var e=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=e,t.style.overflowY=n}function l(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}function f(){if(0!==t.scrollHeight){var i=l(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",e=t.clientWidth,i.forEach((function(t){t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){f();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),r="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(r<n?"hidden"===e.overflowY&&(c("scroll"),f(),r="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(c("hidden"),f(),r="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),i!==r){i=r;var s=o("autosize:resized");try{t.dispatchEvent(s)}catch(t){}}}}function a(t){var n=r.get(t);n&&n.destroy()}function u(t){var n=r.get(t);n&&n.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(t){return t}).destroy=function(t){return t},c.update=function(t){return t}):((c=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return s(t,n)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],a),t},c.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],u),t}),n.default=c,t.exports=n.default})?e.apply(n,i):e)||(t.exports=r)},433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:function(t,n,e){var i=function(t){var n=/\blang(?:uage)?-([\w-]+)\b/i,e=0,i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof r?new r(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++e}),t.__id},clone:function t(n,e){var r,o;switch(e=e||{},i.util.type(n)){case"Object":if(o=i.util.objId(n),e[o])return e[o];for(var s in r={},e[o]=r,n)n.hasOwnProperty(s)&&(r[s]=t(n[s],e));return r;case"Array":return o=i.util.objId(n),e[o]?e[o]:(r=[],e[o]=r,n.forEach((function(n,i){r[i]=t(n,e)})),r);default:return n}},getLanguage:function(t){for(;t&&!n.test(t.className);)t=t.parentElement;return t?(t.className.match(n)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(i.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var e in n)if(n[e].src==t)return n[e]}return null}},isActive:function(t,n,e){for(var i="no-"+n;t;){var r=t.classList;if(r.contains(n))return!0;if(r.contains(i))return!1;t=t.parentElement}return!!e}},languages:{extend:function(t,n){var e=i.util.clone(i.languages[t]);for(var r in n)e[r]=n[r];return e},insertBefore:function(t,n,e,r){var o=(r=r||i.languages)[t],s={};for(var a in o)if(o.hasOwnProperty(a)){if(a==n)for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u]);e.hasOwnProperty(a)||(s[a]=o[a])}var c=r[t];return r[t]=s,i.languages.DFS(i.languages,(function(n,e){e===c&&n!=t&&(this[n]=s)})),s},DFS:function t(n,e,r,o){o=o||{};var s=i.util.objId;for(var a in n)if(n.hasOwnProperty(a)){e.call(n,a,n[a],r||a);var u=n[a],c=i.util.type(u);"Object"!==c||o[s(u)]?"Array"!==c||o[s(u)]||(o[s(u)]=!0,t(u,e,a,o)):(o[s(u)]=!0,t(u,e,null,o))}}},plugins:{},highlightAll:function(t,n){i.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,e){var r={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run("before-all-elements-highlight",r);for(var o,s=0;o=r.elements[s++];)i.highlightElement(o,!0===n,r.callback)},highlightElement:function(e,r,o){var s=i.util.getLanguage(e),a=i.languages[s];e.className=e.className.replace(n,"").replace(/\s+/g," ")+" language-"+s;var u=e.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&(u.className=u.className.replace(n,"").replace(/\s+/g," ")+" language-"+s);var c={element:e,language:s,grammar:a,code:e.textContent};function l(t){c.highlightedCode=t,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),o&&o.call(c.element)}if(i.hooks.run("before-sanity-check",c),!c.code)return i.hooks.run("complete",c),void(o&&o.call(c.element));if(i.hooks.run("before-highlight",c),c.grammar)if(r&&t.Worker){var f=new Worker(i.filename);f.onmessage=function(t){l(t.data)},f.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language));else l(i.util.encode(c.code))},highlight:function(t,n,e){var o={code:t,grammar:n,language:e};return i.hooks.run("before-tokenize",o),o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),r.stringify(i.util.encode(o.tokens),o.language)},tokenize:function(t,n){var e=n.rest;if(e){for(var i in e)n[i]=e[i];delete n.rest}var r=new a;return u(r,r.head,t),s(t,r,n,r.head,0),function(t){var n=[],e=t.head.next;for(;e!==t.tail;)n.push(e.value),e=e.next;return n}(r)},hooks:{all:{},add:function(t,n){var e=i.hooks.all;e[t]=e[t]||[],e[t].push(n)},run:function(t,n){var e=i.hooks.all[t];if(e&&e.length)for(var r,o=0;r=e[o++];)r(n)}},Token:r};function r(t,n,e,i){this.type=t,this.content=n,this.alias=e,this.length=0|(i||"").length}function o(t,n,e,i){t.lastIndex=n;var r=t.exec(e);if(r&&i&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function s(t,n,e,a,l,f){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var h=e[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var v=h[p],m=v.inside,y=!!v.lookbehind,b=!!v.greedy,g=v.alias;if(b&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var _=v.pattern||v,k=a.next,j=l;k!==n.tail&&!(f&&j>=f.reach);j+=k.value.length,k=k.next){var x=k.value;if(n.length>t.length)return;if(!(x instanceof r)){var S,F=1;if(b){if(!(S=o(_,j,t,y)))break;var Q=S.index,O=S.index+S[0].length,A=j;for(A+=k.value.length;Q>=A;)A+=(k=k.next).value.length;if(j=A-=k.value.length,k.value instanceof r)continue;for(var R=k;R!==n.tail&&(A<O||"string"==typeof R.value);R=R.next)F++,A+=R.value.length;F--,x=t.slice(j,A),S.index-=j}else if(!(S=o(_,0,x,y)))continue;Q=S.index;var z=S[0],P=x.slice(0,Q),$=x.slice(Q+z.length),C=j+x.length;f&&C>f.reach&&(f.reach=C);var L=k.prev;P&&(L=u(n,L,P),j+=P.length),c(n,L,F),k=u(n,L,new r(d,m?i.tokenize(z,m):z,g,z)),$&&u(n,k,$),F>1&&s(t,n,e,k.prev,j,{cause:d+","+p,reach:C})}}}}}function a(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function u(t,n,e){var i=n.next,r={value:e,prev:n,next:i};return n.next=r,i.prev=r,t.length++,r}function c(t,n,e){for(var i=n.next,r=0;r<e&&i!==t.tail;r++)i=i.next;n.next=i,i.prev=n,t.length-=r}if(t.Prism=i,r.stringify=function t(n,e){if("string"==typeof n)return n;if(Array.isArray(n)){var r="";return n.forEach((function(n){r+=t(n,e)})),r}var o={type:n.type,content:t(n.content,e),tag:"span",classes:["token",n.type],attributes:{},language:e},s=n.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),i.hooks.run("wrap",o);var a="";for(var u in o.attributes)a+=" "+u+'="'+(o.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(i.disableWorkerMessageHandler||t.addEventListener("message",(function(n){var e=JSON.parse(n.data),r=e.language,o=e.code,s=e.immediateClose;t.postMessage(i.highlight(o,i.languages[r],r)),s&&t.close()}),!1),i):i;var l=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(l&&(i.filename=l.src,l.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var d=document.readyState;"loading"===d||"interactive"===d&&l&&l.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=i),void 0!==e.g&&(e.g.Prism=i)},251:function(){!function(t){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),string:{pattern:n,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),t.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:t.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},e.tag))}(Prism)},980:function(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},854:function(){!function(t){function n(t,n){return"___"+t.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,i,r,o){if(e.language===i){var s=e.tokenStack=[];e.code=e.code.replace(r,(function(t){if("function"==typeof o&&!o(t))return t;for(var r,a=s.length;-1!==e.code.indexOf(r=n(i,a));)++a;return s[a]=t,r})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,i){if(e.language===i&&e.tokenStack){e.grammar=t.languages[i];var r=0,o=Object.keys(e.tokenStack);!function s(a){for(var u=0;u<a.length&&!(r>=o.length);u++){var c=a[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=o[r],f=e.tokenStack[l],d="string"==typeof c?c:c.content,h=n(i,l),p=d.indexOf(h);if(p>-1){++r;var v=d.substring(0,p),m=new t.Token(i,t.tokenize(f,e.grammar),"language-"+i,f),y=d.substring(p+h.length),b=[];v&&b.push.apply(b,s([v])),b.push(m),y&&b.push.apply(b,s([y])),"string"==typeof c?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&s(c.content)}return a}(e.tokens)}}}})}(Prism)},335:function(){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var e={};e["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",r)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},945:function(){!function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i,r=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:r,punctuation:o};var s={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:t.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];t.languages.insertBefore("php","variable",{string:a}),t.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,number:i,operator:r,punctuation:o}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(n){if(/<\?/.test(n.code)){t.languages["markup-templating"].buildPlaceholders(n,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"php")}))}(Prism)},759:function(){!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t="line-numbers",n=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(n,e){if("PRE"===n.tagName&&n.classList.contains(t)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,o=r+(i.children.length-1);e<r&&(e=r),e>o&&(e=o);var s=e-r;return i.children[s]}}},resize:function(t){o([t])},assumeViewportIndependence:!0},i=function(t){return t?window.getComputedStyle?getComputedStyle(t):t.currentStyle||null:null},r=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&r===window.innerWidth||(r=window.innerWidth,o(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var i=e.element,r=i.parentNode;if(r&&/pre/i.test(r.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,t)){i.classList.remove(t),r.classList.add(t);var s,a=e.code.match(n),u=a?a.length+1:1,c=new Array(u+1).join("<span></span>");(s=document.createElement("span")).setAttribute("aria-hidden","true"),s.className="line-numbers-rows",s.innerHTML=c,r.hasAttribute("data-start")&&(r.style.counterReset="linenumber "+(parseInt(r.getAttribute("data-start"),10)-1)),e.element.appendChild(s),o([r]),Prism.hooks.run("line-numbers",e)}}})),Prism.hooks.add("line-numbers",(function(t){t.plugins=t.plugins||{},t.plugins.lineNumbers=!0}))}function o(t){if(0!=(t=t.filter((function(t){var n=i(t)["white-space"];return"pre-wrap"===n||"pre-line"===n}))).length){var e=t.map((function(t){var e=t.querySelector("code"),i=t.querySelector(".line-numbers-rows");if(e&&i){var r=t.querySelector(".line-numbers-sizer"),o=e.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",e.appendChild(r)),r.innerHTML="0",r.style.display="block";var s=r.getBoundingClientRect().height;return r.innerHTML="",{element:t,lines:o,lineHeights:[],oneLinerHeight:s,sizer:r}}})).filter(Boolean);e.forEach((function(t){var n=t.sizer,e=t.lines,i=t.lineHeights,r=t.oneLinerHeight;i[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var o=n.appendChild(document.createElement("span"));o.style.display="block",o.textContent=t}else i[e]=r}))})),e.forEach((function(t){for(var n=t.sizer,e=t.lineHeights,i=0,r=0;r<e.length;r++)void 0===e[r]&&(e[r]=n.children[i++].getBoundingClientRect().height)})),e.forEach((function(t){var n=t.sizer,e=t.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",t.lineHeights.forEach((function(t,n){e.children[n].style.height=t+"px"}))}))}}}()},449:function(t){"use strict";function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}var r={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,n,e){t.classList[n?"add":"remove"](e)},s=function(t){var n=document.createElement("span");for(var e in t=t||{})n.setAttribute(e,t[e]);return n},a=function(t,n,e){var i=s(e);return t.parentNode.insertBefore(i,n?t.nextSibling:t),i},u=function t(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var r={};return e.forEach((function(n){Object.keys(n||{}).forEach((function(i){if(void 0!==e[0][i]){var o=n[i];"Object"!==c(o)||"Object"!==c(r[i])?r[i]=o:r[i]=t(r[i],o)}}))})),r},c=function(t){return{}.toString.call(t).slice(8,-1)},l=function(){function t(e,i){var r,o;n(this,t),this.direction=window.getComputedStyle(e,null).getPropertyValue("direction"),this.el=e,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=function(t){var n=[];return[].forEach.call(t.options,(function(t){var e=parseInt(t.value,10)||0;e>0&&n.push({index:t.index,text:t.text,value:e})})),n.sort((function(t,n){return t.value-n.value}))}(e),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),r=this.values.length,o=this.props.maxStars,/^\d+$/.test(r)&&1<=r&&r<=o?this.build():this.destroy()}return i(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,n,e=this;this.props.prebuilt?(t=this.el.parentNode,n=t.querySelector("."+this.props.classNames.base+"--stars")):((t=a(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),n=a(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,i){var r=s({"data-index":i,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,r,t,i),[].forEach.call(r.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=r.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,n){var e=this;if(this.indexActive!==t||n){if([].forEach.call(this.widgetEl.children,(function(n,i){o(n,i<=t,e.props.classNames.active),o(n,i===e.indexSelected,e.props.classNames.selected)})),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,n,e,i){var r=this;e.forEach((function(e){return t[n+"EventListener"](e,r.events[e],i||!1)}))}},{key:"handleEvents",value:function(t){var n=this.el.closest("form");n&&"FORM"===n.tagName&&this.eventListener(n,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(t){var n,e,i=(null===(n=t.touches)||void 0===n?void 0:n[0])||(null===(e=t.changedTouches)||void 0===e?void 0:e[0])||t,r=document.elementFromPoint(i.clientX,i.clientY);return[].slice.call(r.parentNode.children).indexOf(r)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var n=t.key.slice(5);if(~["Left","Right"].indexOf(n)){var e="Left"===n?-1:1;"rtl"===this.direction&&(e*=-1);var i=this.values.length-1,r=Math.min(Math.max(this.selected()+e,-1),i);this.selectValue(r,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var n=this.indexFromEvent(t);this.props.clearable&&n===this.indexSelected&&(n=-1),this.selectValue(n,!0)}},{key:"onPointerLeave",value:function(t){var n=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return n.changeIndexTo(n.indexSelected)}))}},{key:"onPointerMove",value:function(t){var n=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return n.changeIndexTo(n.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t;this.selectValue((null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.index)||-1,!1)}},{key:"selected",value:function(){var t=this;return this.values.findIndex((function(n){return n.value===+t.el.value}))}},{key:"selectValue",value:function(t,n){var e;this.el.value=(null===(e=this.values[t])||void 0===e?void 0:e.value)||"",this.indexSelected=this.selected(),!1===n?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}}]),t}(),f=function(){function t(e,i){n(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(e,i)}return i(t,[{key:"buildWidgets",value:function(t,n){var e=this;this.queryElements(t).forEach((function(t){var i=u(r,n,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new l(t,i)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===c(t)?[t]:"NodeList"===c(t)?[].slice.call(t):"String"===c(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var n=t.parentNode,e=n.parentNode;e.insertBefore(t,n),e.removeChild(n)}}]),t}();t.exports=f}},n={};function e(i){var r=n[i];if(void 0!==r)return r.exports;var o=n[i]={exports:{}};return t[i].call(o.exports,o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";var t=function(t){return this.data={},this.form=jQuery(t),this.pushes={},this.init()};t.prototype={patterns:{validate:/^[a-z_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,named:/^[a-z0-9_-]+$/i,push:/^$/,fixed:/^\d+$/},addPair:function(t){this.patterns.validate.test(t.name)&&(this.data=jQuery.extend(!0,this.data,this.makeObject(t.name,this.encode(t))))},build:function(t,n,e){return t[n]=e,t},encode:function(t){switch(jQuery('[name="'+t.name+'"]',this.form).attr("type")){case"checkbox":return"on"===t.value||t.value;default:return t.value}},incrementPush:function(t){return void 0===this.pushes[t]&&(this.pushes[t]=0),this.pushes[t]++},init:function(){var t=this.form.serializeArray();if(jQuery.isArray(t))for(var n=0,e=t.length;n<e;n++)this.addPair(t[n]);return this.data},makeObject:function(t,n){for(var e,i=t.match(this.patterns.key);void 0!==(e=i.pop());)if(this.patterns.push.test(e)){var r=this.incrementPush(t.replace(/\[\]$/,""));n=this.build([],r,n)}else this.patterns.fixed.test(e)?n=this.build([],e,n):this.patterns.named.test(e)&&(n=this.build({},e,n));return n}};var n=t,i=function(t,n,e){this.event=n||null,this.form=e||null,this.notice=null,this.request=t||{}};i.prototype={post:function(t){this.event?this.t(t):this.i(t)},u:function(t){var e={action:GLSR.action,_ajax_request:!0};if(this.form){var i=new n(this.form);i[GLSR.nameprefix]&&(this.request=i[GLSR.nameprefix])}return this.l(t),e[GLSR.nameprefix]=this.request,e},l:function(t){this.request._nonce||(GLSR.nonce[this.request._action]?this.request._nonce=GLSR.nonce[this.request._action]:t&&(this.request._nonce=t.closest("form").find("#_wpnonce").val()))},i:function(t,n){jQuery.post(GLSR.ajaxurl,this.u(n)).done((function(e){"function"==typeof t&&t(e.data,e.success),n&&n.prop("disabled",!1)})).always((function(t){t.data?t.data.notices&&GLSR.notices.add(t.data.notices):GLSR.notices.add('<div class="notice notice-error inline is-dismissible"><p>Unknown error.</p></div>')}))},t:function(t){this.event.preventDefault();var n=jQuery(this.event.currentTarget);n.is(":disabled")||(n.prop("disabled",!0),this.i(t,n))}};var r=i,o=e(367),s=e.n(o);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u=function(){"object"===a(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){jQuery(this).wpColorPicker(jQuery(this).data("colorpicker")||{})}))},c=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.h())};c.prototype={p:function(t){var n=t.getAttribute("data-depends");if(n)try{return JSON.parse(n)}catch(t){return}},h:function(){for(var t=this.el.elements,n=0;n<t.length;n++)~["INPUT","SELECT"].indexOf(t[n].nodeName)&&t[n].addEventListener("change",this.v.bind(this))},m:function(t,n){var e=!1;n=[].concat(n);var i=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(i,function(t){var i=~this._(n).indexOf(this.k(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&i&&(e=!0):i&&(e=!0)}.bind(this)),e},k:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},_:function(t){return t.map(this.k)},v:function(t){this.depends.forEach(function(n){var e=this.p(n);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var i=!0;e.forEach(function(t){this.m(t.name,t.value)||(i=!1)}.bind(this)),this.j(n,i)}}.bind(this))},j:function(t,n){var e=t.closest(".glsr-setting-field");e&&e.classList[n?"remove":"add"]("hidden")}};var l=c,f=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.S.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.F.bind(this))};f.prototype={F:function(t){var n=jQuery(t.currentTarget);this.O(n.parent().find("img"),n.val())},S:function(t){var n=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(n)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.O(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!n),GLSR.stars.rebuild()},O:function(t,n){if(t){var e=new Image;e.src=n,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var d=f,h=function(){this.h()};h.prototype={add:function(t){t&&(jQuery("#glsr-notices").length||(jQuery("#message.notice").remove(),jQuery("hr.wp-header-end").after('<div id="glsr-notices" />')),jQuery("#glsr-notices").html(t),jQuery(document).trigger("wp-updates-notice-added"))},h:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.A.bind(this))},A:function(t){var n={};n[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,n)}};var p=h,v=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.R.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.P.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.$.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.C.bind(this))};v.prototype={L:function(){this.el.slideUp("fast"),this.edit.show().focus()},R:function(t){t.preventDefault(),this.L(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},P:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},$:function(t){t.preventDefault(),this.L(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new r(n).post(this.T.bind(this))},C:function(t){t.preventDefault(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id")};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new r(n).post(this.G.bind(this))},T:function(t){jQuery("#pinned-status").val(0|!t.pinned),jQuery("#hidden-pinned-status").val(0|t.pinned),jQuery("#pinned-status-text").text(t.pinned?this.target.dataset.yes:this.target.dataset.no),GLSR.notices.add(t.notices)},G:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var m=v,y=function(){jQuery.each(GLSR.pointers,function(t,n){this.h(n)}.bind(this))};y.prototype={M:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},h:function(t){jQuery(t.target).pointer({content:t.options.content,position:t.options.position,close:this.M.bind(null,t.id)}).pointer("open").pointer("sendToTop"),jQuery(document).on("wp-window-resized",(function(){jQuery(t.target).pointer("reposition")}))}};var b=y,g=e(325),w=e.n(g),k=(e(433),e(335),e(980),e(854),e(945),e(251),e(759),function(t,n){this.el=jQuery(t),this.options=n,this.searchTerm=null,this.h()});k.prototype={defaults:{action:null,exclude:[],onInit:null,onResultClick:null,results:{},selected:-1,selectedClass:"glsr-selected-result",selectorEntries:".glsr-strings-table tbody",selectorResults:".glsr-search-results",selectorSearch:".glsr-search-input"},h:function(){this.options=jQuery.extend({},this.defaults,this.options),this.el.length&&(this.options.entriesEl=this.el.parent().find(this.options.selectorEntries),this.options.resultsEl=this.el.find(this.options.selectorResults),this.options.searchEl=this.el.find(this.options.selectorSearch),this.options.searchEl.attr("aria-describedby","live-search-desc"),"function"==typeof this.options.onInit&&this.options.onInit.call(this),this.q())},q:function(){this.options.searchEl.on("input",_.debounce(this.D.bind(this),500)),this.options.searchEl.on("keyup",this.I.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.B.bind(this)),jQuery(document).on("keydown",this.H.bind(this))},W:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},U:function(){this.W(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},N:function(t){var n=this.options.entriesEl.children("tr").eq(t),e=this;n.find("td").css({backgroundColor:"#faafaa"}),n.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.V(),e.Z()}))},K:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.X.bind(this))},Y:function(){this.options.entriesEl.on("click","a.delete",this.J.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,n){n.placeholder.height(n.helper[0].scrollHeight)},sort:function(t,n){var e=t.pageY-jQuery(this).offsetParent().offset().top-n.helper.outerHeight(!0)/2;n.helper.css({top:e+"px"})}})},tt:function(t){this.options.selected+=t,this.options.results.removeClass(this.options.selectedClass),this.options.selected<0&&(this.options.selected=-1,this.options.searchEl.focus()),this.options.selected>=this.options.results.length&&(this.options.selected=this.options.results.length-1),this.options.selected>=0&&this.options.results.eq(this.options.selected).addClass(this.options.selectedClass).focus()},B:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.U()},H:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.U(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var n=this.options.resultsEl.find("."+this.options.selectedClass);n&&n.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.tt(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.tt(1))}},J:function(t){t.preventDefault(),this.N(jQuery(t.currentTarget).closest("tr").index())},X:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.U()},D:function(t){if(this.W(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.K(this.options.results);if(this.options.resultsEl.empty(),this.options.selected=-1,this.searchTerm=t.currentTarget.value,""===this.searchTerm)return this.nt();this.el.addClass("is-active");var n={};n[GLSR.nameprefix]={_action:this.options.action,_nonce:this.el.find("#_search_nonce").val(),exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,n).done(function(t){this.el.removeClass("is-active"),this.K(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},I:function(t){GLSR.keys.ESC===t.which&&this.nt(),GLSR.keys.ENTER===t.which&&(this.D(t),t.preventDefault())},et:function(t){t.preventDefault();var n=jQuery(t.currentTarget).closest(".glsr-multibox-entry");n.find("a").css({color:"#c00"}),n.fadeOut("fast",(function(){n.remove()}))},V:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(n){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),i=e.attr("name").replace(/\[\d+\]/i,"["+n+"]");e.attr("name",i),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},nt:function(){this.U(),this.options.results={},this.options.searchEl.val("")},Z:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var j=k,x=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.h()};x.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},h:function(){var t=this;[].forEach.call(t.tabs,function(n,e){n.addEventListener("click",t.A.bind(t)),n.addEventListener("touchend",t.A.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var n=jQuery(this).data("expand");localStorage.setItem("glsr-expand",n),t.it(jQuery(n))})),jQuery(window).on("load",(function(){t.it(jQuery(localStorage.getItem("glsr-expand")))}))},A:function(t){t.preventDefault(),this.rt(t.currentTarget)},it:function(t){if(t.length){var n=t.parent().parent();n.removeClass("collapsed"),this.ot(n),n.removeClass("collapsed"),t.parent().removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){t.parent()[0].scrollIntoView({behavior:"smooth",block:"center"}),localStorage.removeItem("glsr-expand")}),10)}},ot:function(t){var n=t.hasClass("collapsed")?"remove":"add";t[n+"Class"]("collapsed").find(".glsr-card.postbox")[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n)},rt:function(t){if(t.classList.contains("nav-tab-active")){var n=jQuery(t.getAttribute("href"));this.ot(n)}}};var S=x,F=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var n={_action:"mce-shortcode",shortcode:this.current};new r(n).post(this.st.bind(this))}};var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){var n=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");n&&e.length&&this.h(t,n,e)}.bind(this))};F.prototype={at:{},ut:[],h:function(t,n,e){document.addEventListener("click",this.ct.bind(this,t,n)),n.addEventListener("click",this.lt.bind(this,t,n)),e.forEach(function(e){e.addEventListener("click",this.ft.bind(this,t,n))}.bind(this))},dt:function(){tinymce.execCommand("GLSR_Shortcode")},ht:function(){jQuery("#scTemp").length?this.dt():(jQuery("body").append('<textarea id="scTemp" style="display:none!important;"/>'),tinymce.init({elements:"scTemp",external_plugins:GLSR.tinymce,mode:"exact",plugins:["glsr_shortcode","wplink"]}),setTimeout(function(){this.dt()}.bind(this),200))},M:function(t,n){jQuery(n).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},vt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.at={},this.ut=[]},st:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.vt();var n=this.yt(t);t.ok.constructor===Array&&(n.buttons[0].text=t.ok[0],n.buttons[0].onclick="close",delete n.buttons[1]),this.editor.windowManager.open(n)}},bt:function(t){for(var n in this.at=t,this.ut=[],t)t.hasOwnProperty(n)&&(this.gt(n),this.wt(n),this._t(n));this.at.hide=this.ut.join(",")},gt:function(t){"display"!==t||jQuery.isNumeric(this.at[t])||(this.at[t]="")},wt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var n=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(n)&&(this.at[t]&&this.ut.push(n),delete this.at[t])}},_t:function(t){"id"===t&&(this.at[t]=(+new Date).toString(36))},ct:function(t,n,e){jQuery(e.target).closest(jQuery(t)).length||this.M(t,n)},lt:function(t,n,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.M(t,n):this.kt(t,n)},ft:function(t,n,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.dt():this.ht(),setTimeout(function(){this.M(t,n)}.bind(this),100))},kt:function(t,n){jQuery(n).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},jt:function(t){return[{classes:"btn glsr-btn primary",onclick:this.xt.bind(this),text:t.ok},{onclick:"close",text:t.close}]},yt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.jt(t),onsubmit:this.St.bind(this,t),onclose:this.vt.bind(this)}},St:function(t,n){var e="";for(var i in this.bt(n.data),this.at)this.at.hasOwnProperty(i)&&""!==this.at[i]&&(e+=" "+i+'="'+this.at[i]+'"');window.send_to_editor("["+t.shortcode+e+"]")},xt:function(){var t=this.editor.windowManager.getWindows()[0];this.Ft(t)&&t.submit()},Ft:function(t){var n,e=!0,i=GLSR.shortcodes[this.current];for(var r in i)if(i.hasOwnProperty(r)&&void 0!==(n=t.find("#"+r)[0])&&""===n.state.data.value){e=!1,alert(i[r]);break}return e}};var Q=F,O=e(449),A=e.n(O),R=function(t){var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){t.addEventListener("click",this.A)}.bind(this))};R.prototype={A:function(t){var n=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==n&&null!==e){var i={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:n[1],status:e[1]};new r(i,t).post((function(n){if(n.class){var e=jQuery(t.target);e.closest("tr").removeClass("status-pending status-publish").addClass(n.class),e.closest("td.column-title").find("strong").html(n.link),n.counts&&(e.closest(".wrap").find("ul.subsubsub").html(n.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+n.pending).find(".unapproved-count").html(n.pending))}}))}}};var z=R,P=function(){this.button=jQuery("button#sync-reviews"),this.progressbar=jQuery(".glsr-progress"),this.service=null,jQuery("form.glsr-form-sync").on("click","#sync-reviews",this.Qt.bind(this)),jQuery(document).on("wp-window-resized",this.Ot),jQuery(window).on("hashchange",this.Ot),this.Ot()};P.prototype={At:function(t){jQuery(".service-"+this.service+" td.column-last_sync").text(t.last_sync),jQuery(".service-"+this.service+" td.column-total_fetched a").text(t.total),this.Rt(!1)},Qt:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.Rt(!0),this.zt())},Ot:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},zt:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new r(t).post(this.Pt.bind(this))},Pt:function(t){var n={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.$t.bind(this,t):this.Pt.bind(this);this.Ct(t.message),this.Lt(t.percent),setTimeout((function(){new r(n).post(e)}),1500)},$t:function(t){var n=0;try{n=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:n+1,service:this.service,stage:"reviews"};this.Ct(t.message),t.percent_synced&&t.percent_synced>=100?this.At(t):new r(e).post(this.$t.bind(this))},Ct:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Lt:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},Rt:function(t){if(!0===t&&(this.Ct(this.progressbar.data("active-text")),this.Lt(),this.button.prop("disabled",!0),window.requestAnimationFrame(function(){this.progressbar.addClass("active")}.bind(this))),!1===t)return this.service=null,this.button.prop("disabled",!1),void this.progressbar.removeClass("active");window.requestAnimationFrame(this.Rt.bind(this))}};var $=P,C=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.referrerEl=document.querySelector("input[name=_wp_http_referer]"),this.sections=document.querySelectorAll(this.options.viewSectionSelector),this.subsubsub=document.querySelectorAll(this.options.viewSubsubsub),this.tabs=document.querySelectorAll(this.options.tabSelector),this.views=document.querySelectorAll(this.options.viewSelector),this.active&&this.referrerEl&&this.tabs&&this.views&&this.h()};C.prototype={defaults:{tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},h:function(){var t=this;jQuery(window).on("hashchange",t.Tt.bind(t)),jQuery(t.options.tabSelector+","+t.options.viewSubsubsub).on("click touchend",t.A.bind(t)),jQuery(t.options.tabSelector).each((function(n){(location.hash?this.getAttribute("href").slice(1)===location.hash.slice(5).split("_")[0]:0===n)&&(t.Et(this),t.Gt(t.Mt()))}))},qt:function(t){return t?"add":"remove"},A:function(t){var n=t.currentTarget,e=n.getAttribute("href");e.startsWith("#")&&(location.hash=this.Dt(e.slice(1)),n.blur(),t.preventDefault())},Tt:function(){for(var t=this.Mt().split("_")[0],n=0;n<this.views.length;n++)if(t===this.views[n].id){this.Et(this.tabs[n]),this.Gt(this.Mt());break}},Dt:function(t){return"tab-"+t},Mt:function(){return location.hash?location.hash.split("#tab-")[1]:""},Gt:function(t){if(t){var n=this.referrerEl.value.split("#")[0],e=this.Dt(t);this.referrerEl.value=n+"#"+e}},Et:function(t){[].forEach.call(this.tabs,function(n,e){var i=this.qt(n===t);"add"===i&&(this.active.value=this.views[e].id,this.It(e)),n.classList[i]("nav-tab-active")}.bind(this))},It:function(t){[].forEach.call(this.views,function(n,e){var i=this.qt(e!==t);n.classList[i]("ui-tabs-hide"),this.Bt()}.bind(this))},Bt:function(){var t=this,n=0;[].forEach.call(this.subsubsub,(function(e,i){e.classList.remove("current"),e.getAttribute("href").slice(1)===t.Mt()&&(n=i)})),this.subsubsub[n]&&this.subsubsub[n].classList.add("current"),[].forEach.call(this.sections,(function(e,i){var r=t.qt(i!==n);e.classList[r]("ui-tabs-hide")}))}};var L=C,T=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Ht(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Ht(t)}.bind(this)))};T.prototype={Ht:function(t){var n=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=n+"px"}};var E=T,G=function(){jQuery("form").on("click","#clear-console",this.Wt,this.A.bind(this)),jQuery("form").on("click","#fetch-console",this.Wt,this.A.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.A.bind(this)),jQuery(".glsr-button").on("click",this.Ut);var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Nt.bind(this,t)),jQuery(document).on("keyup",this.Vt.bind(this,t)))};G.prototype={Wt:function(t,n){n&&jQuery("#log-file").val(t.console)},A:function(t){var n=jQuery(t.currentTarget),e=this;n.addClass("is-busy"),new r({},t,n.closest("form")).post((function(i,r){"function"==typeof t.data&&t.data(i,r),n.get(0).hasAttribute("data-ajax-scroll")&&jQuery("html, body").animate({scrollTop:0},500),n.removeClass("is-busy"),n.closest("[data-ajax-hide]").css({backgroundColor:"rgba(74,184,102,.25)"}).fadeOut("normal",(function(){jQuery(this).remove()})),jQuery("#glsr-notices").on("click","a",e.Ut),jQuery('.glsr-notice[data-notice="'+n.data("remove-notice")+'"]').remove()}))},Nt:function(t,n){GLSR.keys.ALT!==n.keyCode||n.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Vt:function(t,n){GLSR.keys.ALT===n.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))},Ut:function(t){var n=jQuery(t.currentTarget).data("expand");n&&localStorage.setItem("glsr-expand",n)}};var M=G;function q(t){var n=t.getBoundingClientRect();return{width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left,x:n.left,y:n.top}}function D(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function I(t){var n=D(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function B(t){return t instanceof D(t).Element||t instanceof Element}function H(t){return t instanceof D(t).HTMLElement||t instanceof HTMLElement}function W(t){return"undefined"!=typeof ShadowRoot&&(t instanceof D(t).ShadowRoot||t instanceof ShadowRoot)}function U(t){return t?(t.nodeName||"").toLowerCase():null}function N(t){return((B(t)?t.ownerDocument:t.document)||window.document).documentElement}function V(t){return q(N(t)).left+I(t).scrollLeft}function Z(t){return D(t).getComputedStyle(t)}function K(t){var n=Z(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function X(t,n,e){void 0===e&&(e=!1);var i,r,o=N(n),s=q(t),a=H(n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!e)&&(("body"!==U(n)||K(o))&&(u=(i=n)!==D(i)&&H(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:I(i)),H(n)?((c=q(n)).x+=n.clientLeft,c.y+=n.clientTop):o&&(c.x=V(o))),{x:s.left+u.scrollLeft-c.x,y:s.top+u.scrollTop-c.y,width:s.width,height:s.height}}function Y(t){var n=q(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function J(t){return"html"===U(t)?t:t.assignedSlot||t.parentNode||(W(t)?t.host:null)||N(t)}function tt(t){return["html","body","#document"].indexOf(U(t))>=0?t.ownerDocument.body:H(t)&&K(t)?t:tt(J(t))}function nt(t,n){var e;void 0===n&&(n=[]);var i=tt(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=D(i),s=r?[o].concat(o.visualViewport||[],K(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(nt(J(s)))}function et(t){return["table","td","th"].indexOf(U(t))>=0}function it(t){return H(t)&&"fixed"!==Z(t).position?t.offsetParent:null}function rt(t){for(var n=D(t),e=it(t);e&&et(e)&&"static"===Z(e).position;)e=it(e);return e&&("html"===U(e)||"body"===U(e)&&"static"===Z(e).position)?n:e||function(t){for(var n=navigator.userAgent.toLowerCase().includes("firefox"),e=J(t);H(e)&&["html","body"].indexOf(U(e))<0;){var i=Z(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||["transform","perspective"].includes(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}var ot="top",st="bottom",at="right",ut="left",ct="auto",lt=[ot,st,at,ut],ft="start",dt="end",ht="viewport",pt="popper",vt=lt.reduce((function(t,n){return t.concat([n+"-"+ft,n+"-"+dt])}),[]),mt=[].concat(lt,[ct]).reduce((function(t,n){return t.concat([n,n+"-"+ft,n+"-"+dt])}),[]),yt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function bt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var gt={placement:"bottom",modifiers:[],strategy:"absolute"};function wt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function _t(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,i=void 0===e?[]:e,r=n.defaultOptions,o=void 0===r?gt:r;return function(t,n,e){void 0===e&&(e=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},gt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(e){f(),a.options=Object.assign({},o,a.options,e),a.scrollParents={reference:B(t)?nt(t):t.contextElement?nt(t.contextElement):[],popper:nt(n)};var r=function(t){var n=bt(t);return yt.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}(function(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}([].concat(i,a.options.modifiers)));return a.orderedModifiers=r.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,i=void 0===e?{}:e,r=t.effect;if("function"==typeof r){var o=r({state:a,name:n,instance:l,options:i}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,n=t.reference,e=t.popper;if(wt(n,e)){a.rects={reference:X(n,rt(e),"fixed"===a.options.strategy),popper:Y(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,u=void 0===s?{}:s,f=r.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){f(),c=!0}};if(!wt(t,n))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(e).then((function(t){!c&&e.onFirstUpdate&&e.onFirstUpdate(t)})),l}}var kt={passive:!0};var jt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=D(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,kt)})),a&&u.addEventListener("resize",e.update,kt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,kt)})),a&&u.removeEventListener("resize",e.update,kt)}},data:{}};function xt(t){return t.split("-")[0]}function St(t){return t.split("-")[1]}function Ft(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Qt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?xt(r):null,s=r?St(r):null,a=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case ot:n={x:a,y:e.y-i.height};break;case st:n={x:a,y:e.y+e.height};break;case at:n={x:e.x+e.width,y:u};break;case ut:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?Ft(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case ft:n[c]=n[c]-(e[l]/2-i[l]/2);break;case dt:n[c]=n[c]+(e[l]/2-i[l]/2)}}return n}var Ot={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=Qt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},At=Math.max,Rt=Math.min,zt=Math.round,Pt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $t(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.offsets,s=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,l=!0===c?function(t){var n=t.x,e=t.y,i=window.devicePixelRatio||1;return{x:zt(zt(n*i)/i)||0,y:zt(zt(e*i)/i)||0}}(o):"function"==typeof c?c(o):o,f=l.x,d=void 0===f?0:f,h=l.y,p=void 0===h?0:h,v=o.hasOwnProperty("x"),m=o.hasOwnProperty("y"),y=ut,b=ot,g=window;if(u){var w=rt(e),_="clientHeight",k="clientWidth";w===D(e)&&"static"!==Z(w=N(e)).position&&(_="scrollHeight",k="scrollWidth"),w=w,r===ot&&(b=st,p-=w[_]-i.height,p*=a?1:-1),r===ut&&(y=at,d-=w[k]-i.width,d*=a?1:-1)}var j,x=Object.assign({position:s},u&&Pt);return a?Object.assign({},x,((j={})[b]=m?"0":"",j[y]=v?"0":"",j.transform=(g.devicePixelRatio||1)<2?"translate("+d+"px, "+p+"px)":"translate3d("+d+"px, "+p+"px, 0)",j)):Object.assign({},x,((n={})[b]=m?p+"px":"",n[y]=v?d+"px":"",n.transform="",n))}var Ct={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];H(r)&&U(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});H(i)&&U(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Lt={left:"right",right:"left",bottom:"top",top:"bottom"};function Tt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Lt[t]}))}var Et={start:"end",end:"start"};function Gt(t){return t.replace(/start|end/g,(function(t){return Et[t]}))}function Mt(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&W(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function qt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Dt(t,n){return n===ht?qt(function(t){var n=D(t),e=N(t),i=n.visualViewport,r=e.clientWidth,o=e.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+V(t),y:a}}(t)):H(n)?function(t){var n=q(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):qt(function(t){var n,e=N(t),i=I(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=At(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=At(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+V(t),u=-i.scrollTop;return"rtl"===Z(r||e).direction&&(a+=At(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(N(t)))}function It(t,n,e){var i="clippingParents"===n?function(t){var n=nt(J(t)),e=["absolute","fixed"].indexOf(Z(t).position)>=0&&H(t)?rt(t):t;return B(e)?n.filter((function(t){return B(t)&&Mt(t,e)&&"body"!==U(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),o=r[0],s=r.reduce((function(n,e){var i=Dt(t,e);return n.top=At(i.top,n.top),n.right=Rt(i.right,n.right),n.bottom=Rt(i.bottom,n.bottom),n.left=At(i.left,n.left),n}),Dt(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Bt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Ht(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function Wt(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,u=void 0===a?ht:a,c=e.elementContext,l=void 0===c?pt:c,f=e.altBoundary,d=void 0!==f&&f,h=e.padding,p=void 0===h?0:h,v=Bt("number"!=typeof p?p:Ht(p,lt)),m=l===pt?"reference":pt,y=t.elements.reference,b=t.rects.popper,g=t.elements[d?m:l],w=It(B(g)?g:g.contextElement||N(t.elements.popper),s,u),_=q(y),k=Qt({reference:_,element:b,strategy:"absolute",placement:r}),j=qt(Object.assign({},b,k)),x=l===pt?j:_,S={top:w.top-x.top+v.top,bottom:x.bottom-w.bottom+v.bottom,left:w.left-x.left+v.left,right:x.right-w.right+v.right},F=t.modifiersData.offset;if(l===pt&&F){var Q=F[r];Object.keys(S).forEach((function(t){var n=[at,st].indexOf(t)>=0?1:-1,e=[ot,st].indexOf(t)>=0?"y":"x";S[t]+=Q[e]*n}))}return S}function Ut(t,n,e){return At(t,Rt(n,e))}function Nt(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Vt(t){return[ot,at,st,ut].some((function(n){return t[n]>=0}))}var Zt=_t({defaultModifiers:[jt,Ot,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,u=void 0===a||a,c={placement:xt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,$t(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,$t(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},Ct,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,s=mt.reduce((function(t,e){return t[e]=function(t,n,e){var i=xt(t),r=[ut,ot].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[ut,at].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(e,n.rects,o),t}),{}),a=s[n.placement],u=a.x,c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,u=e.fallbackPlacements,c=e.padding,l=e.boundary,f=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,p=void 0===h||h,v=e.allowedAutoPlacements,m=n.options.placement,y=xt(m),b=u||(y===m||!p?[Tt(m)]:function(t){if(xt(t)===ct)return[];var n=Tt(t);return[Gt(t),n,Gt(n)]}(m)),g=[m].concat(b).reduce((function(t,e){return t.concat(xt(e)===ct?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,u=e.allowedAutoPlacements,c=void 0===u?mt:u,l=St(i),f=l?a?vt:vt.filter((function(t){return St(t)===l})):lt,d=f.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(n,e){return n[e]=Wt(t,{placement:e,boundary:r,rootBoundary:o,padding:s})[xt(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}(n,{placement:e,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),w=n.rects.reference,_=n.rects.popper,k=new Map,j=!0,x=g[0],S=0;S<g.length;S++){var F=g[S],Q=xt(F),O=St(F)===ft,A=[ot,st].indexOf(Q)>=0,R=A?"width":"height",z=Wt(n,{placement:F,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=A?O?at:ut:O?st:ot;w[R]>_[R]&&(P=Tt(P));var $=Tt(P),C=[];if(o&&C.push(z[Q]<=0),a&&C.push(z[P]<=0,z[$]<=0),C.every((function(t){return t}))){x=F,j=!1;break}k.set(F,C)}if(j)for(var L=function(t){var n=g.find((function(n){var e=k.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return x=n,"break"},T=p?3:1;T>0;T--){if("break"===L(T))break}n.placement!==x&&(n.modifiersData[i]._skip=!0,n.placement=x,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,u=e.boundary,c=e.rootBoundary,l=e.altBoundary,f=e.padding,d=e.tether,h=void 0===d||d,p=e.tetherOffset,v=void 0===p?0:p,m=Wt(n,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=xt(n.placement),b=St(n.placement),g=!b,w=Ft(y),_="x"===w?"y":"x",k=n.modifiersData.popperOffsets,j=n.rects.reference,x=n.rects.popper,S="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,F={x:0,y:0};if(k){if(o||a){var Q="y"===w?ot:ut,O="y"===w?st:at,A="y"===w?"height":"width",R=k[w],z=k[w]+m[Q],P=k[w]-m[O],$=h?-x[A]/2:0,C=b===ft?j[A]:x[A],L=b===ft?-x[A]:-j[A],T=n.elements.arrow,E=h&&T?Y(T):{width:0,height:0},G=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},M=G[Q],q=G[O],D=Ut(0,j[A],E[A]),I=g?j[A]/2-$-D-M-S:C-D-M-S,B=g?-j[A]/2+$+D+q+S:L+D+q+S,H=n.elements.arrow&&rt(n.elements.arrow),W=H?"y"===w?H.clientTop||0:H.clientLeft||0:0,U=n.modifiersData.offset?n.modifiersData.offset[n.placement][w]:0,N=k[w]+I-U-W,V=k[w]+B-U;if(o){var Z=Ut(h?Rt(z,N):z,R,h?At(P,V):P);k[w]=Z,F[w]=Z-R}if(a){var K="x"===w?ot:ut,X="x"===w?st:at,J=k[_],tt=J+m[K],nt=J-m[X],et=Ut(h?Rt(tt,N):tt,J,h?At(nt,V):nt);k[_]=et,F[_]=et-J}}n.modifiersData[i]=F}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=xt(e.placement),u=Ft(a),c=[ut,at].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,n){return Bt("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:Ht(t,lt))}(r.padding,e),f=Y(o),d="y"===u?ot:ut,h="y"===u?st:at,p=e.rects.reference[c]+e.rects.reference[u]-s[u]-e.rects.popper[c],v=s[u]-e.rects.reference[u],m=rt(o),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,b=p/2-v/2,g=l[d],w=y-f[c]-l[h],_=y/2-f[c]/2+b,k=Ut(g,_,w),j=u;e.modifiersData[i]=((n={})[j]=k,n.centerOffset=k-_,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&Mt(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,s=Wt(n,{elementContext:"reference"}),a=Wt(n,{altBoundary:!0}),u=Nt(s,i),c=Nt(a,r,o),l=Vt(u),f=Vt(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),Kt="tippy-content",Xt="tippy-backdrop",Yt="tippy-arrow",Jt="tippy-svg-arrow",tn={passive:!0,capture:!0};function nn(t,n,e){if(Array.isArray(t)){var i=t[n];return null==i?Array.isArray(e)?e[n]:e:i}return t}function en(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function rn(t,n){return"function"==typeof t?t.apply(void 0,n):t}function on(t,n){return 0===n?t:function(i){clearTimeout(e),e=setTimeout((function(){t(i)}),n)};var e}function sn(t){return[].concat(t)}function an(t,n){-1===t.indexOf(n)&&t.push(n)}function un(t){return t.split("-")[0]}function cn(t){return[].slice.call(t)}function ln(){return document.createElement("div")}function fn(t){return["Element","Fragment"].some((function(n){return en(t,n)}))}function dn(t){return en(t,"MouseEvent")}function hn(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function pn(t){return fn(t)?[t]:function(t){return en(t,"NodeList")}(t)?cn(t):Array.isArray(t)?t:cn(document.querySelectorAll(t))}function vn(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function mn(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function yn(t){var n,e=sn(t)[0];return(null==e||null==(n=e.ownerDocument)?void 0:n.body)?e.ownerDocument:document}function bn(t,n,e){var i=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[i](n,e)}))}var gn={isTouch:!1},wn=0;function _n(){gn.isTouch||(gn.isTouch=!0,window.performance&&document.addEventListener("mousemove",kn))}function kn(){var t=performance.now();t-wn<20&&(gn.isTouch=!1,document.removeEventListener("mousemove",kn)),wn=t}function jn(){var t=document.activeElement;if(hn(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var xn="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Sn=/MSIE |Trident\//.test(xn);var Fn={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Qn=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Fn,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),On=Object.keys(Qn);function An(t){var n=(t.plugins||[]).reduce((function(n,e){var i=e.name,r=e.defaultValue;return i&&(n[i]=void 0!==t[i]?t[i]:r),n}),{});return Object.assign({},t,{},n)}function Rn(t,n){var e=Object.assign({},n,{content:rn(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(An(Object.assign({},Qn,{plugins:n}))):On).reduce((function(n,e){var i=(t.getAttribute("data-tippy-"+e)||"").trim();if(!i)return n;if("content"===e)n[e]=i;else try{n[e]=JSON.parse(i)}catch(t){n[e]=i}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Qn.aria,{},e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function zn(t,n){t.innerHTML=n}function Pn(t){var n=ln();return!0===t?n.className=Yt:(n.className=Jt,fn(t)?n.appendChild(t):zn(n,t)),n}function $n(t,n){fn(n.content)?(zn(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?zn(t,n.content):t.textContent=n.content)}function Cn(t){var n=t.firstElementChild,e=cn(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(Kt)})),arrow:e.find((function(t){return t.classList.contains(Yt)||t.classList.contains(Jt)})),backdrop:e.find((function(t){return t.classList.contains(Xt)}))}}function Ln(t){var n=ln(),e=ln();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=ln();function r(e,i){var r=Cn(n),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),e.content===i.content&&e.allowHTML===i.allowHTML||$n(s,t.props),i.arrow?a?e.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Pn(i.arrow))):o.appendChild(Pn(i.arrow)):a&&o.removeChild(a)}return i.className=Kt,i.setAttribute("data-state","hidden"),$n(i,t.props),n.appendChild(e),e.appendChild(i),r(t.props,t.props),{popper:n,onUpdate:r}}Ln.$$tippy=!0;var Tn=1,En=[],Gn=[];function Mn(t,n){var e,i,r,o,s,a,u,c,l,f=Rn(t,Object.assign({},Qn,{},An((e=n,Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{}))))),d=!1,h=!1,p=!1,v=!1,m=[],y=on(V,f.interactiveDebounce),b=Tn++,g=(l=f.plugins).filter((function(t,n){return l.indexOf(t)===n})),w={id:b,reference:t,popper:ln(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(n){0;if(w.state.isDestroyed)return;C("onBeforeUpdate",[w,n]),U();var e=w.props,i=Rn(t,Object.assign({},w.props,{},n,{ignoreAttributes:!0}));w.props=i,W(),e.interactiveDebounce!==i.interactiveDebounce&&(E(),y=on(V,i.interactiveDebounce));e.triggerTarget&&!i.triggerTarget?sn(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");T(),$(),j&&j(e,i);w.popperInstance&&(Y(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));C("onAfterUpdate",[w,n])},setContent:function(t){w.setProps({content:t})},show:function(){0;var t=w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=gn.isTouch&&!w.props.touch,r=nn(w.props.duration,0,Qn.duration);if(t||n||e||i)return;if(A().hasAttribute("disabled"))return;if(C("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,O()&&(k.style.visibility="visible");$(),D(),w.state.isMounted||(k.style.transition="none");if(O()){var o=z(),s=o.box,a=o.content;vn([s,a],0)}u=function(){var t;if(w.state.isVisible&&!v){if(v=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,O()&&w.props.animation){var n=z(),e=n.box,i=n.content;vn([e,i],r),mn([e,i],"visible")}L(),T(),an(Gn,w),null==(t=w.popperInstance)||t.forceUpdate(),w.state.isMounted=!0,C("onMount",[w]),w.props.animation&&O()&&function(t,n){B(t,n)}(r,(function(){w.state.isShown=!0,C("onShown",[w])}))}},function(){var t,n=w.props.appendTo,e=A();t=w.props.interactive&&n===Qn.appendTo||"parent"===n?e.parentNode:rn(n,[e]);t.contains(k)||t.appendChild(k);Y(),!1}()},hide:function(){0;var t=!w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=nn(w.props.duration,1,Qn.duration);if(t||n||e)return;if(C("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,v=!1,d=!1,O()&&(k.style.visibility="hidden");if(E(),I(),$(),O()){var r=z(),o=r.box,s=r.content;w.props.animation&&(vn([o,s],i),mn([o,s],"hidden"))}L(),T(),w.props.animation?O()&&function(t,n){B(t,(function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&n()}))}(i,w.unmount):w.unmount()},hideWithInteractivity:function(t){0;R().addEventListener("mousemove",y),an(En,y),y(t)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){0;w.state.isVisible&&w.hide();if(!w.state.isMounted)return;J(),tt().forEach((function(t){t._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);Gn=Gn.filter((function(t){return t!==w})),w.state.isMounted=!1,C("onHidden",[w])},destroy:function(){0;if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),U(),delete t._tippy,w.state.isDestroyed=!0,C("onDestroy",[w])}};if(!f.render)return w;var _=f.render(w),k=_.popper,j=_.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,t._tippy=w,k._tippy=w;var x=g.map((function(t){return t.fn(w)})),S=t.hasAttribute("aria-expanded");return W(),T(),$(),C("onCreate",[w]),f.showOnCreate&&nt(),k.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(t){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(R().addEventListener("mousemove",y),y(t))})),w;function F(){var t=w.props.touch;return Array.isArray(t)?t:[t,0]}function Q(){return"hold"===F()[0]}function O(){var t;return!!(null==(t=w.props.render)?void 0:t.$$tippy)}function A(){return c||t}function R(){var t=A().parentNode;return t?yn(t):document}function z(){return Cn(k)}function P(t){return w.state.isMounted&&!w.state.isVisible||gn.isTouch||s&&"focus"===s.type?0:nn(w.props.delay,t?0:1,Qn.delay)}function $(){k.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",k.style.zIndex=""+w.props.zIndex}function C(t,n,e){var i;(void 0===e&&(e=!0),x.forEach((function(e){e[t]&&e[t].apply(void 0,n)})),e)&&(i=w.props)[t].apply(i,n)}function L(){var n=w.props.aria;if(n.content){var e="aria-"+n.content,i=k.id;sn(w.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(w.state.isVisible)t.setAttribute(e,n?n+" "+i:i);else{var r=n&&n.replace(i,"").trim();r?t.setAttribute(e,r):t.removeAttribute(e)}}))}}function T(){!S&&w.props.aria.expanded&&sn(w.props.triggerTarget||t).forEach((function(t){w.props.interactive?t.setAttribute("aria-expanded",w.state.isVisible&&t===A()?"true":"false"):t.removeAttribute("aria-expanded")}))}function E(){R().removeEventListener("mousemove",y),En=En.filter((function(t){return t!==y}))}function G(t){if(!(gn.isTouch&&(p||"mousedown"===t.type)||w.props.interactive&&k.contains(t.target))){if(A().contains(t.target)){if(gn.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else C("onClickOutside",[w,t]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),h=!0,setTimeout((function(){h=!1})),w.state.isMounted||I())}}function M(){p=!0}function q(){p=!1}function D(){var t=R();t.addEventListener("mousedown",G,!0),t.addEventListener("touchend",G,tn),t.addEventListener("touchstart",q,tn),t.addEventListener("touchmove",M,tn)}function I(){var t=R();t.removeEventListener("mousedown",G,!0),t.removeEventListener("touchend",G,tn),t.removeEventListener("touchstart",q,tn),t.removeEventListener("touchmove",M,tn)}function B(t,n){var e=z().box;function i(t){t.target===e&&(bn(e,"remove",i),n())}if(0===t)return n();bn(e,"remove",a),bn(e,"add",i),a=i}function H(n,e,i){void 0===i&&(i=!1),sn(w.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,i),m.push({node:t,eventType:n,handler:e,options:i})}))}function W(){var t;Q()&&(H("touchstart",N,{passive:!0}),H("touchend",Z,{passive:!0})),(t=w.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(H(t,N),t){case"mouseenter":H("mouseleave",Z);break;case"focus":H(Sn?"focusout":"blur",K);break;case"focusin":H("focusout",K)}}))}function U(){m.forEach((function(t){var n=t.node,e=t.eventType,i=t.handler,r=t.options;n.removeEventListener(e,i,r)})),m=[]}function N(t){var n,e=!1;if(w.state.isEnabled&&!X(t)&&!h){var i="focus"===(null==(n=s)?void 0:n.type);s=t,c=t.currentTarget,T(),!w.state.isVisible&&dn(t)&&En.forEach((function(n){return n(t)})),"click"===t.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?e=!0:nt(t),"click"===t.type&&(d=!e),e&&!i&&et(t)}}function V(t){var n=t.target,e=A().contains(n)||k.contains(n);"mousemove"===t.type&&e||function(t,n){var e=n.clientX,i=n.clientY;return t.every((function(t){var n=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=un(r.placement),a=r.modifiersData.offset;if(!a)return!0;var u="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,d=n.top-i+u>o,h=i-n.bottom-c>o,p=n.left-e+l>o,v=e-n.right-f>o;return d||h||p||v}))}(tt().concat(k).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:f}:null})).filter(Boolean),t)&&(E(),et(t))}function Z(t){X(t)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(t):et(t))}function K(t){w.props.trigger.indexOf("focusin")<0&&t.target!==A()||w.props.interactive&&t.relatedTarget&&k.contains(t.relatedTarget)||et(t)}function X(t){return!!gn.isTouch&&Q()!==t.type.indexOf("touch")>=0}function Y(){J();var n=w.props,e=n.popperOptions,i=n.placement,r=n.offset,o=n.getReferenceClientRect,s=n.moveTransition,a=O()?Cn(k).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||A()}:t,l=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(O()){var e=z().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}}];O()&&a&&l.push({name:"arrow",options:{element:a,padding:3}}),l.push.apply(l,(null==e?void 0:e.modifiers)||[]),w.popperInstance=Zt(c,k,Object.assign({},e,{placement:i,onFirstUpdate:u,modifiers:l}))}function J(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){return cn(k.querySelectorAll("[data-tippy-root]"))}function nt(t){w.clearDelayTimeouts(),t&&C("onTrigger",[w,t]),D();var n=P(!0),e=F(),r=e[0],o=e[1];gn.isTouch&&"hold"===r&&o&&(n=o),n?i=setTimeout((function(){w.show()}),n):w.show()}function et(t){if(w.clearDelayTimeouts(),C("onUntrigger",[w,t]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var n=P(!1);n?r=setTimeout((function(){w.state.isVisible&&w.hide()}),n):o=requestAnimationFrame((function(){w.hide()}))}}else I()}}function qn(t,n){void 0===n&&(n={});var e=Qn.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",_n,tn),window.addEventListener("blur",jn);var i=Object.assign({},n,{plugins:e}),r=pn(t).reduce((function(t,n){var e=n&&Mn(n,i);return e&&t.push(e),t}),[]);return fn(t)?r[0]:r}qn.defaultProps=Qn,qn.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Qn[n]=t[n]}))},qn.currentInput=gn;Object.assign({},Ct,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var Dn={clientX:0,clientY:0},In=[];function Bn(t){var n=t.clientX,e=t.clientY;Dn={clientX:n,clientY:e}}var Hn={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=yn(t.props.triggerTarget||n),i=!1,r=!1,o=!0,s=t.props;function a(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){e.addEventListener("mousemove",f)}function c(){e.removeEventListener("mousemove",f)}function l(){i=!0,t.setProps({getReferenceClientRect:null}),i=!1}function f(e){var i=!e.target||n.contains(e.target),r=t.props.followCursor,o=e.clientX,s=e.clientY,a=n.getBoundingClientRect(),u=o-a.left,c=s-a.top;!i&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=o,i=s;"initial"===r&&(e=t.left+u,i=t.top+c);var a="horizontal"===r?t.top:i,l="vertical"===r?t.right:e,f="horizontal"===r?t.bottom:i,d="vertical"===r?t.left:e;return{width:l-d,height:f-a,top:a,right:l,bottom:f,left:d}}})}function d(){t.props.followCursor&&(In.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",Bn)}(e))}function h(){0===(In=In.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",Bn)}(e)}return{onCreate:d,onDestroy:h,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(n,e){var o=e.followCursor;i||void 0!==o&&s.followCursor!==o&&(h(),o?(d(),!t.state.isMounted||r||a()||u()):(c(),l()))},onMount:function(){t.props.followCursor&&!r&&(o&&(f(Dn),o=!1),a()||u())},onTrigger:function(t,n){dn(n)&&(Dn={clientX:n.clientX,clientY:n.clientY}),r="focus"===n.type},onHidden:function(){t.props.followCursor&&(l(),c(),o=!0)}}}};qn.setDefaultProps({render:Ln});var Wn=qn;GLSR.autosize=s(),GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},GLSR.Tippy={tippy:Wn,plugins:{followCursor:Hn}},jQuery((function(t){w().highlightAll(),GLSR.notices=new p,GLSR.shortcode=new Q(".glsr-mce"),GLSR.stars=new(A())("select.glsr-star-rating",{tooltip:!1}),GLSR.Tippy.tippy(".glsr-tooltip",{appendTo:function(){return document.body}}),u(),new l("form.glsr-form"),new d,new m,new b,new j("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.et.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-posts"),r={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.et.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.nt()}this.options.searchEl.focus()}}),new j("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.et.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-users"),r={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.et.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.nt()}this.options.searchEl.focus()}}),new j("#glsr-search-translations",{action:"search-translations",onInit:function(){this.Y()},onResultClick:function(n){var e=t(n.currentTarget),i=e.data("entry"),r=wp.template("glsr-string-"+(i.p1?"plural":"single"));i.index=this.options.entriesEl.children().length,i.prefix=this.options.resultsEl.data("prefix"),r&&(this.options.entriesEl.append(r(i)),this.options.exclude.push({id:i.id}),this.options.results=this.options.results.filter((function(t,n){return n!==e.get(0)}))),this.Z()}}),new z("a.glsr-toggle-status"),new S,new L,new E,new M,new $;var n=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(n),t("select[data-glsr-track]").on("change",n),t(".glsr-card.postbox:not(.open)").addClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!1).closest(".glsr-nav-view").addClass("collapsed"),t(".glsr-support-step").not(":checked").length<1&&t(".glsr-card-result").removeClass("hidden"),t(".glsr-support-step").on("change",(function(){var n=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[n+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var n=t(this).parent(),e=n.closest(".glsr-nav-view"),i=n.hasClass("closed")?"remove":"add";n[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i),i=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[i+"Class"]("collapsed")}))}))}()}();
1
  /*! For license information please see site-reviews-admin.js.LICENSE.txt */
2
+ !function(){var t={433:function(){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:function(t,n,e){var i=function(t){var n=/\blang(?:uage)?-([\w-]+)\b/i,e=0,i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(n){return n instanceof r?new r(n.type,t(n.content),n.alias):Array.isArray(n)?n.map(t):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++e}),t.__id},clone:function t(n,e){var r,o;switch(e=e||{},i.util.type(n)){case"Object":if(o=i.util.objId(n),e[o])return e[o];for(var s in r={},e[o]=r,n)n.hasOwnProperty(s)&&(r[s]=t(n[s],e));return r;case"Array":return o=i.util.objId(n),e[o]?e[o]:(r=[],e[o]=r,n.forEach((function(n,i){r[i]=t(n,e)})),r);default:return n}},getLanguage:function(t){for(;t&&!n.test(t.className);)t=t.parentElement;return t?(t.className.match(n)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(i.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var e in n)if(n[e].src==t)return n[e]}return null}},isActive:function(t,n,e){for(var i="no-"+n;t;){var r=t.classList;if(r.contains(n))return!0;if(r.contains(i))return!1;t=t.parentElement}return!!e}},languages:{extend:function(t,n){var e=i.util.clone(i.languages[t]);for(var r in n)e[r]=n[r];return e},insertBefore:function(t,n,e,r){var o=(r=r||i.languages)[t],s={};for(var a in o)if(o.hasOwnProperty(a)){if(a==n)for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u]);e.hasOwnProperty(a)||(s[a]=o[a])}var c=r[t];return r[t]=s,i.languages.DFS(i.languages,(function(n,e){e===c&&n!=t&&(this[n]=s)})),s},DFS:function t(n,e,r,o){o=o||{};var s=i.util.objId;for(var a in n)if(n.hasOwnProperty(a)){e.call(n,a,n[a],r||a);var u=n[a],c=i.util.type(u);"Object"!==c||o[s(u)]?"Array"!==c||o[s(u)]||(o[s(u)]=!0,t(u,e,a,o)):(o[s(u)]=!0,t(u,e,null,o))}}},plugins:{},highlightAll:function(t,n){i.highlightAllUnder(document,t,n)},highlightAllUnder:function(t,n,e){var r={callback:e,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run("before-all-elements-highlight",r);for(var o,s=0;o=r.elements[s++];)i.highlightElement(o,!0===n,r.callback)},highlightElement:function(e,r,o){var s=i.util.getLanguage(e),a=i.languages[s];e.className=e.className.replace(n,"").replace(/\s+/g," ")+" language-"+s;var u=e.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&(u.className=u.className.replace(n,"").replace(/\s+/g," ")+" language-"+s);var c={element:e,language:s,grammar:a,code:e.textContent};function l(t){c.highlightedCode=t,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),o&&o.call(c.element)}if(i.hooks.run("before-sanity-check",c),!c.code)return i.hooks.run("complete",c),void(o&&o.call(c.element));if(i.hooks.run("before-highlight",c),c.grammar)if(r&&t.Worker){var f=new Worker(i.filename);f.onmessage=function(t){l(t.data)},f.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language));else l(i.util.encode(c.code))},highlight:function(t,n,e){var o={code:t,grammar:n,language:e};return i.hooks.run("before-tokenize",o),o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),r.stringify(i.util.encode(o.tokens),o.language)},tokenize:function(t,n){var e=n.rest;if(e){for(var i in e)n[i]=e[i];delete n.rest}var r=new a;return u(r,r.head,t),s(t,r,n,r.head,0),function(t){var n=[],e=t.head.next;for(;e!==t.tail;)n.push(e.value),e=e.next;return n}(r)},hooks:{all:{},add:function(t,n){var e=i.hooks.all;e[t]=e[t]||[],e[t].push(n)},run:function(t,n){var e=i.hooks.all[t];if(e&&e.length)for(var r,o=0;r=e[o++];)r(n)}},Token:r};function r(t,n,e,i){this.type=t,this.content=n,this.alias=e,this.length=0|(i||"").length}function o(t,n,e,i){t.lastIndex=n;var r=t.exec(e);if(r&&i&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function s(t,n,e,a,l,f){for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var h=e[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var v=h[p],m=v.inside,y=!!v.lookbehind,b=!!v.greedy,g=v.alias;if(b&&!v.pattern.global){var w=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,w+"g")}for(var _=v.pattern||v,k=a.next,j=l;k!==n.tail&&!(f&&j>=f.reach);j+=k.value.length,k=k.next){var x=k.value;if(n.length>t.length)return;if(!(x instanceof r)){var S,Q=1;if(b){if(!(S=o(_,j,t,y)))break;var F=S.index,O=S.index+S[0].length,A=j;for(A+=k.value.length;F>=A;)A+=(k=k.next).value.length;if(j=A-=k.value.length,k.value instanceof r)continue;for(var R=k;R!==n.tail&&(A<O||"string"==typeof R.value);R=R.next)Q++,A+=R.value.length;Q--,x=t.slice(j,A),S.index-=j}else if(!(S=o(_,0,x,y)))continue;F=S.index;var z=S[0],P=x.slice(0,F),$=x.slice(F+z.length),C=j+x.length;f&&C>f.reach&&(f.reach=C);var L=k.prev;P&&(L=u(n,L,P),j+=P.length),c(n,L,Q),k=u(n,L,new r(d,m?i.tokenize(z,m):z,g,z)),$&&u(n,k,$),Q>1&&s(t,n,e,k.prev,j,{cause:d+","+p,reach:C})}}}}}function a(){var t={value:null,prev:null,next:null},n={value:null,prev:t,next:null};t.next=n,this.head=t,this.tail=n,this.length=0}function u(t,n,e){var i=n.next,r={value:e,prev:n,next:i};return n.next=r,i.prev=r,t.length++,r}function c(t,n,e){for(var i=n.next,r=0;r<e&&i!==t.tail;r++)i=i.next;n.next=i,i.prev=n,t.length-=r}if(t.Prism=i,r.stringify=function t(n,e){if("string"==typeof n)return n;if(Array.isArray(n)){var r="";return n.forEach((function(n){r+=t(n,e)})),r}var o={type:n.type,content:t(n.content,e),tag:"span",classes:["token",n.type],attributes:{},language:e},s=n.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),i.hooks.run("wrap",o);var a="";for(var u in o.attributes)a+=" "+u+'="'+(o.attributes[u]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(i.disableWorkerMessageHandler||t.addEventListener("message",(function(n){var e=JSON.parse(n.data),r=e.language,o=e.code,s=e.immediateClose;t.postMessage(i.highlight(o,i.languages[r],r)),s&&t.close()}),!1),i):i;var l=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(l&&(i.filename=l.src,l.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var d=document.readyState;"loading"===d||"interactive"===d&&l&&l.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=i),void 0!==e.g&&(e.g.Prism=i)},251:function(){!function(t){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+n.source+")*(?=\\s*\\{)"),string:{pattern:n,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var e=t.languages.markup;e&&(e.tag.addInlined("style","css"),t.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:t.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},e.tag))}(Prism)},980:function(){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},854:function(){!function(t){function n(t,n){return"___"+t.toUpperCase()+n+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(e,i,r,o){if(e.language===i){var s=e.tokenStack=[];e.code=e.code.replace(r,(function(t){if("function"==typeof o&&!o(t))return t;for(var r,a=s.length;-1!==e.code.indexOf(r=n(i,a));)++a;return s[a]=t,r})),e.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(e,i){if(e.language===i&&e.tokenStack){e.grammar=t.languages[i];var r=0,o=Object.keys(e.tokenStack);!function s(a){for(var u=0;u<a.length&&!(r>=o.length);u++){var c=a[u];if("string"==typeof c||c.content&&"string"==typeof c.content){var l=o[r],f=e.tokenStack[l],d="string"==typeof c?c:c.content,h=n(i,l),p=d.indexOf(h);if(p>-1){++r;var v=d.substring(0,p),m=new t.Token(i,t.tokenize(f,e.grammar),"language-"+i,f),y=d.substring(p+h.length),b=[];v&&b.push.apply(b,s([v])),b.push(m),y&&b.push.apply(b,s([y])),"string"==typeof c?a.splice.apply(a,[u,1].concat(b)):c.content=b}}else c.content&&s(c.content)}return a}(e.tokens)}}}})}(Prism)},335:function(){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var e={};e["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},e.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:e}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",r)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},945:function(){!function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,e=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i,r=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:r,punctuation:o};var s={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:t.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];t.languages.insertBefore("php","variable",{string:a}),t.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:n,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:e,number:i,operator:r,punctuation:o}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(n){if(/<\?/.test(n.code)){t.languages["markup-templating"].buildPlaceholders(n,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),t.hooks.add("after-tokenize",(function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"php")}))}(Prism)},759:function(){!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t="line-numbers",n=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(n,e){if("PRE"===n.tagName&&n.classList.contains(t)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,o=r+(i.children.length-1);e<r&&(e=r),e>o&&(e=o);var s=e-r;return i.children[s]}}},resize:function(t){o([t])},assumeViewportIndependence:!0},i=function(t){return t?window.getComputedStyle?getComputedStyle(t):t.currentStyle||null:null},r=void 0;window.addEventListener("resize",(function(){e.assumeViewportIndependence&&r===window.innerWidth||(r=window.innerWidth,o(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(e){if(e.code){var i=e.element,r=i.parentNode;if(r&&/pre/i.test(r.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,t)){i.classList.remove(t),r.classList.add(t);var s,a=e.code.match(n),u=a?a.length+1:1,c=new Array(u+1).join("<span></span>");(s=document.createElement("span")).setAttribute("aria-hidden","true"),s.className="line-numbers-rows",s.innerHTML=c,r.hasAttribute("data-start")&&(r.style.counterReset="linenumber "+(parseInt(r.getAttribute("data-start"),10)-1)),e.element.appendChild(s),o([r]),Prism.hooks.run("line-numbers",e)}}})),Prism.hooks.add("line-numbers",(function(t){t.plugins=t.plugins||{},t.plugins.lineNumbers=!0}))}function o(t){if(0!=(t=t.filter((function(t){var n=i(t)["white-space"];return"pre-wrap"===n||"pre-line"===n}))).length){var e=t.map((function(t){var e=t.querySelector("code"),i=t.querySelector(".line-numbers-rows");if(e&&i){var r=t.querySelector(".line-numbers-sizer"),o=e.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",e.appendChild(r)),r.innerHTML="0",r.style.display="block";var s=r.getBoundingClientRect().height;return r.innerHTML="",{element:t,lines:o,lineHeights:[],oneLinerHeight:s,sizer:r}}})).filter(Boolean);e.forEach((function(t){var n=t.sizer,e=t.lines,i=t.lineHeights,r=t.oneLinerHeight;i[e.length-1]=void 0,e.forEach((function(t,e){if(t&&t.length>1){var o=n.appendChild(document.createElement("span"));o.style.display="block",o.textContent=t}else i[e]=r}))})),e.forEach((function(t){for(var n=t.sizer,e=t.lineHeights,i=0,r=0;r<e.length;r++)void 0===e[r]&&(e[r]=n.children[i++].getBoundingClientRect().height)})),e.forEach((function(t){var n=t.sizer,e=t.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",t.lineHeights.forEach((function(t,n){e.children[n].style.height=t+"px"}))}))}}}()},449:function(t){"use strict";function n(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}var r={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,n,e){t.classList[n?"add":"remove"](e)},s=function(t){var n=document.createElement("span");for(var e in t=t||{})n.setAttribute(e,t[e]);return n},a=function(t,n,e){var i=s(e);return t.parentNode.insertBefore(i,n?t.nextSibling:t),i},u=function t(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var r={};return e.forEach((function(n){Object.keys(n||{}).forEach((function(i){if(void 0!==e[0][i]){var o=n[i];"Object"!==c(o)||"Object"!==c(r[i])?r[i]=o:r[i]=t(r[i],o)}}))})),r},c=function(t){return{}.toString.call(t).slice(8,-1)},l=function(){function t(e,i){var r,o;n(this,t),this.direction=window.getComputedStyle(e,null).getPropertyValue("direction"),this.el=e,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=function(t){var n=[];return[].forEach.call(t.options,(function(t){var e=parseInt(t.value,10)||0;e>0&&n.push({index:t.index,text:t.text,value:e})})),n.sort((function(t,n){return t.value-n.value}))}(e),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),r=this.values.length,o=this.props.maxStars,/^\d+$/.test(r)&&1<=r&&r<=o?this.build():this.destroy()}return i(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,n,e=this;this.props.prebuilt?(t=this.el.parentNode,n=t.querySelector("."+this.props.classNames.base+"--stars")):((t=a(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),n=a(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,i){var r=s({"data-index":i,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,r,t,i),[].forEach.call(r.children,(function(t){return t.style.pointerEvents="none"})),n.innerHTML+=r.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&n.setAttribute("role","tooltip"),this.widgetEl=n}},{key:"changeIndexTo",value:function(t,n){var e=this;if(this.indexActive!==t||n){if([].forEach.call(this.widgetEl.children,(function(n,i){o(n,i<=t,e.props.classNames.active),o(n,i===e.indexSelected,e.props.classNames.selected)})),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var i=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",i)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,n,e,i){var r=this;e.forEach((function(e){return t[n+"EventListener"](e,r.events[e],i||!1)}))}},{key:"handleEvents",value:function(t){var n=this.el.closest("form");n&&"FORM"===n.tagName&&this.eventListener(n,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(t){var n,e,i=(null===(n=t.touches)||void 0===n?void 0:n[0])||(null===(e=t.changedTouches)||void 0===e?void 0:e[0])||t,r=document.elementFromPoint(i.clientX,i.clientY);return[].slice.call(r.parentNode.children).indexOf(r)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var n=t.key.slice(5);if(~["Left","Right"].indexOf(n)){var e="Left"===n?-1:1;"rtl"===this.direction&&(e*=-1);var i=this.values.length-1,r=Math.min(Math.max(this.selected()+e,-1),i);this.selectValue(r,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var n=this.indexFromEvent(t);this.props.clearable&&n===this.indexSelected&&(n=-1),this.selectValue(n,!0)}},{key:"onPointerLeave",value:function(t){var n=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return n.changeIndexTo(n.indexSelected)}))}},{key:"onPointerMove",value:function(t){var n=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return n.changeIndexTo(n.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,n=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(n||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,n){var e;this.el.value=(null===(e=this.values[t])||void 0===e?void 0:e.value)||"",this.indexSelected=this.selected(),!1===n?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(n){return n.value===+t}))}}]),t}(),f=function(){function t(e,i){n(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(e,i)}return i(t,[{key:"buildWidgets",value:function(t,n){var e=this;this.queryElements(t).forEach((function(t){var i=u(r,n,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new l(t,i)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===c(t)?[t]:"NodeList"===c(t)?[].slice.call(t):"String"===c(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var n=t.parentNode,e=n.parentNode;e.insertBefore(t,n),e.removeChild(n)}}]),t}();t.exports=f}},n={};function e(i){var r=n[i];if(void 0!==r)return r.exports;var o=n[i]={exports:{}};return t[i](o,o.exports,e),o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){"use strict";var t=function(t){return this.data={},this.form=jQuery(t),this.pushes={},this.init()};t.prototype={patterns:{validate:/^[a-z_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,named:/^[a-z0-9_-]+$/i,push:/^$/,fixed:/^\d+$/},addPair:function(t){this.patterns.validate.test(t.name)&&(this.data=jQuery.extend(!0,this.data,this.makeObject(t.name,this.encode(t))))},build:function(t,n,e){return t[n]=e,t},encode:function(t){switch(jQuery('[name="'+t.name+'"]',this.form).attr("type")){case"checkbox":return"on"===t.value||t.value;default:return t.value}},incrementPush:function(t){return void 0===this.pushes[t]&&(this.pushes[t]=0),this.pushes[t]++},init:function(){var t=this.form.serializeArray();if(jQuery.isArray(t))for(var n=0,e=t.length;n<e;n++)this.addPair(t[n]);return this.data},makeObject:function(t,n){for(var e,i=t.match(this.patterns.key);void 0!==(e=i.pop());)if(this.patterns.push.test(e)){var r=this.incrementPush(t.replace(/\[\]$/,""));n=this.build([],r,n)}else this.patterns.fixed.test(e)?n=this.build([],e,n):this.patterns.named.test(e)&&(n=this.build({},e,n));return n}};var n=t,i=function(t,n,e){this.event=n||null,this.form=e||null,this.notice=null,this.request=t||{}};i.prototype={post:function(t){this.event?this.t(t):this.i(t)},u:function(t){var e={action:GLSR.action,_ajax_request:!0};if(this.form){var i=new n(this.form);i[GLSR.nameprefix]&&(this.request=i[GLSR.nameprefix])}return this.l(t),e[GLSR.nameprefix]=this.request,e},l:function(t){this.request._nonce||(GLSR.nonce[this.request._action]?this.request._nonce=GLSR.nonce[this.request._action]:t&&(this.request._nonce=t.closest("form").find("#_wpnonce").val()))},i:function(t,n){jQuery.post(GLSR.ajaxurl,this.u(n)).done((function(e){"function"==typeof t&&t(e.data,e.success),n&&n.prop("disabled",!1)})).always((function(t){t.data?t.data.notices&&GLSR.notices.add(t.data.notices):GLSR.notices.add('<div class="notice notice-error inline is-dismissible"><p>Unknown error.</p></div>')}))},t:function(t){this.event.preventDefault();var n=jQuery(this.event.currentTarget);n.is(":disabled")||(n.prop("disabled",!0),this.i(t,n))}};var r=i;const o="function"==typeof Map?new Map:function(){const t=[],n=[];return{has:n=>t.indexOf(n)>-1,get:e=>n[t.indexOf(e)],set(e,i){-1===t.indexOf(e)&&(t.push(e),n.push(i))},delete(e){const i=t.indexOf(e);i>-1&&(t.splice(i,1),n.splice(i,1))}}}();let s=t=>new Event(t,{bubbles:!0});try{new Event("test")}catch(t){s=t=>{const n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function a(t){if(!t||!t.nodeName||"TEXTAREA"!==t.nodeName||o.has(t))return;let n=null,e=null,i=null;function r(n){{const n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n}t.style.overflowY=n}function a(){if(0===t.scrollHeight)return;const i=function(t){const n=[];for(;t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",e=t.clientWidth,i.forEach((t=>{t.node.scrollTop=t.scrollTop})),r&&(document.documentElement.scrollTop=r)}function u(){a();const n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null);var o="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(o<n?"hidden"===e.overflowY&&(r("scroll"),a(),o="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(r("hidden"),a(),o="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),i!==o){i=o;const n=s("autosize:resized");try{t.dispatchEvent(n)}catch(t){}}}const c=()=>{t.clientWidth!==e&&u()},l=(n=>{window.removeEventListener("resize",c,!1),t.removeEventListener("input",u,!1),t.removeEventListener("keyup",u,!1),t.removeEventListener("autosize:destroy",l,!1),t.removeEventListener("autosize:update",u,!1),Object.keys(n).forEach((e=>{t.style[e]=n[e]})),o.delete(t)}).bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",u,!1),window.addEventListener("resize",c,!1),t.addEventListener("input",u,!1),t.addEventListener("autosize:update",u,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:l,update:u}),function(){const e=window.getComputedStyle(t,null);"vertical"===e.resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),u()}()}function u(t){const n=o.get(t);n&&n.destroy()}function c(t){const n=o.get(t);n&&n.update()}let l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(l=t=>t,l.destroy=t=>t,l.update=t=>t):(l=(t,n)=>(t&&Array.prototype.forEach.call(t.length?t:[t],(t=>a(t))),t),l.destroy=t=>(t&&Array.prototype.forEach.call(t.length?t:[t],u),t),l.update=t=>(t&&Array.prototype.forEach.call(t.length?t:[t],c),t));var f=l;function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var h=function(){"object"===d(jQuery.wp)&&"function"==typeof jQuery.wp.wpColorPicker&&jQuery(document).find("input[type=text].color-picker-hex").each((function(){jQuery(this).wpColorPicker(jQuery(this).data("colorpicker")||{})}))},p=function(){this.request=null,jQuery(".enable-filter-tog","#adv-settings").on("click",this.h.bind(this))};p.prototype={p:function(){return jQuery(".enable-filter-tog:checked").map((function(t,n){return n.value})).get()},h:function(t){var n=jQuery(t.currentTarget),e=n.prop("checked")?"removeClass":"addClass";jQuery("#glsr-filter-by-"+n.val())[e]("hidden"),this.v()},v:_.debounce((function(){this.request&&this.request.abort();var t={_ajax_request:!0};t[GLSR.nameprefix]={_action:"toggle-filters",_nonce:GLSR.nonce["toggle-filters"],enabled:this.p()},this.request=wp.ajax.post(GLSR.action,t),this.request.always(function(){this.request=null}.bind(this))}),500)};var v=p,m=function(t){this.el=document.querySelector(t),this.el&&(this.depends=this.el.querySelectorAll("[data-depends]"),this.depends.length&&this.m())};m.prototype={_:function(t){var n=t.getAttribute("data-depends");if(n)try{return JSON.parse(n)}catch(t){return}},m:function(){for(var t=this.el.elements,n=0;n<t.length;n++)~["INPUT","SELECT"].indexOf(t[n].nodeName)&&t[n].addEventListener("change",this.k.bind(this))},j:function(t,n){var e=!1;n=[].concat(n);var i=this.el.querySelectorAll('[name="'+t+'"]');return[].map.call(i,function(t){var i=~this.S(n).indexOf(this.F(t.value));~["checkbox","radio"].indexOf(t.type)?t.checked&&i&&(e=!0):i&&(e=!0)}.bind(this)),e},F:function(t){return!!~["true","on","yes","1"].indexOf(t)||!~["false","off","no","0"].indexOf(t)&&t},S:function(t){return t.map(this.F)},k:function(t){this.depends.forEach(function(n){var e=this._(n);if(e&&~e.map((function(t){return t.name})).indexOf(t.currentTarget.name)){var i=!0;e.forEach(function(t){this.j(t.name,t.value)||(i=!1)}.bind(this)),this.O(n,i)}}.bind(this))},O:function(t,n){var e=t.closest(".glsr-setting-field");e&&e.classList[n?"remove":"add"]("hidden")}};var y=m,b=function(){jQuery(".glsr-metabox-field input[data-edit-review]").on("change",this.A.bind(this)),jQuery(".glsr-metabox-field input[type=url]").on("change",this.R.bind(this))};b.prototype={R:function(t){var n=jQuery(t.currentTarget);this.P(n.parent().find("img"),n.val())},A:function(t){var n=t.currentTarget.checked;jQuery(".glsr-input-value").each(function(t,e){if(n)jQuery(e).data("value",e.value);else{if(e.value=jQuery(e).data("value"),"url"!==e.type)return;this.P(jQuery(e).parent().find("img"),e.value)}}.bind(this)),jQuery(".glsr-input-value").prop("disabled",!n),GLSR.stars.rebuild()},P:function(t,n){if(t){var e=new Image;e.src=n,e.onerror=function(){t.attr("src",t.data("fallback"))},e.onload=function(){t.attr("src",e.src)}}}};var g=b,w=function(){this.m()};w.prototype={add:function(t){t&&(jQuery("#glsr-notices").length||(jQuery("#message.notice").remove(),jQuery("hr.wp-header-end").after('<div id="glsr-notices" />')),jQuery("#glsr-notices").html(t),jQuery(document).trigger("wp-updates-notice-added"))},m:function(){jQuery(".glsr-notice[data-dismiss]").on("click.wp-dismiss-notice",this.h.bind(this))},h:function(t){var n={};n[GLSR.nameprefix]={_action:"dismiss-notice",notice:jQuery(t.currentTarget).data("dismiss")},wp.ajax.post(GLSR.action,n)}};var k=w,j=function(){this.el=jQuery("#pinned-status-select"),this.el&&(this.cancel=jQuery("a.cancel-pinned-status"),this.cancel.on("click",this.$.bind(this)),this.edit=jQuery("a.edit-pinned-status"),this.edit.on("click",this.C.bind(this)),this.save=jQuery("a.save-pinned-status"),this.save.on("click",this.L.bind(this))),jQuery("td.column-is_pinned i.pin-review").on("click",this.T.bind(this))};j.prototype={G:function(){this.el.slideUp("fast"),this.edit.show().focus()},$:function(t){t.preventDefault(),this.G(),this.el.find("select").val("0"===jQuery("#hidden-pinned-status").val()?1:0)},C:function(t){t.preventDefault(),this.el.is(":hidden")&&(this.el.slideDown("fast",function(){this.el.find("select").focus()}.bind(this)),this.edit.hide())},L:function(t){t.preventDefault(),this.G(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:jQuery("#post_ID").val(),pinned:jQuery("#pinned-status").val()};new r(n).post(this.M.bind(this))},T:function(t){t.preventDefault(),this.target=t.currentTarget;var n={_action:"toggle-pinned",id:t.currentTarget.getAttribute("data-id")};jQuery(this.target).addClass("spinner is-active").removeClass("dashicons-sticky"),new r(n).post(this.q.bind(this))},M:function(t){jQuery("#pinned-status").val(0|!t.pinned),jQuery("#hidden-pinned-status").val(0|t.pinned),jQuery("#pinned-status-text").text(t.pinned?this.target.dataset.yes:this.target.dataset.no),GLSR.notices.add(t.notices)},q:function(t){this.target.classList[t.pinned?"add":"remove"]("pinned"),jQuery(this.target).removeClass("spinner is-active").addClass("dashicons-sticky")}};var x=j,S=function(){jQuery.each(GLSR.pointers,function(t,n){this.m(n)}.bind(this))};S.prototype={D:function(t){jQuery.post(GLSR.ajaxurl,{action:"dismiss-wp-pointer",pointer:t})},m:function(t){jQuery(t.target).pointer({content:t.options.content,position:t.options.position,close:this.D.bind(null,t.id)}).pointer("open").pointer("sendToTop"),jQuery(document).on("wp-window-resized",(function(){jQuery(t.target).pointer("reposition")}))}};var Q=S,F=e(325),O=e.n(F),A=(e(433),e(335),e(980),e(854),e(945),e(251),e(759),function(t,n){this.el=jQuery(t),this.options=n,this.searchTerm=null,this.m()});A.prototype={defaults:{action:null,exclude:[],onInit:null,onResultClick:null,results:{},selected:-1,selectedClass:"glsr-selected-result",selectorEntries:".glsr-strings-table tbody",selectorResults:".glsr-search-results",selectorSearch:".glsr-search-input"},m:function(){this.options=jQuery.extend({},this.defaults,this.options),this.el.length&&(this.options.entriesEl=this.el.parent().find(this.options.selectorEntries),this.options.resultsEl=this.el.find(this.options.selectorResults),this.options.searchEl=this.el.find(this.options.selectorSearch),this.options.searchEl.attr("aria-describedby","live-search-desc"),"function"==typeof this.options.onInit&&this.options.onInit.call(this),this.I())},I:function(){this.options.searchEl.on("input",_.debounce(this.B.bind(this),500)),this.options.searchEl.on("keyup",this.H.bind(this)),this.options.searchEl.on("keydown keypress",(function(t){GLSR.keys.ENTER===t.which&&t.preventDefault()})),jQuery(document).on("click",this.W.bind(this)),jQuery(document).on("keydown",this.U.bind(this))},N:function(){void 0!==this.searchRequest&&this.searchRequest.abort()},V:function(){this.N(),this.options.resultsEl.empty(),this.options.resultsEl.removeClass("is-active"),this.el.removeClass("is-active"),jQuery("body").removeClass("glsr-focus")},Z:function(t){var n=this.options.entriesEl.children("tr").eq(t),e=this;n.find("td").css({backgroundColor:"#faafaa"}),n.fadeOut(350,(function(){jQuery(this).remove(),e.options.results={},e.K(),e.X()}))},Y:function(t){jQuery("body").addClass("glsr-focus"),this.options.resultsEl.append(t),this.options.resultsEl.children("span").on("click",this.J.bind(this))},tt:function(){this.options.entriesEl.on("click","a.delete",this.nt.bind(this)),this.options.entriesEl.sortable({items:"tr",tolerance:"pointer",start:function(t,n){n.placeholder.height(n.helper[0].scrollHeight)},sort:function(t,n){var e=t.pageY-jQuery(this).offsetParent().offset().top-n.helper.outerHeight(!0)/2;n.helper.css({top:e+"px"})}})},et:function(t){this.options.selected+=t,this.options.results.removeClass(this.options.selectedClass),this.options.selected<0&&(this.options.selected=-1,this.options.searchEl.focus()),this.options.selected>=this.options.results.length&&(this.options.selected=this.options.results.length-1),this.options.selected>=0&&this.options.results.eq(this.options.selected).addClass(this.options.selectedClass).focus()},W:function(t){jQuery(t.target).find(this.el).length&&jQuery("body").hasClass("glsr-focus")&&this.V()},U:function(t){if(!jQuery.isEmptyObject(this.options.results)){if(GLSR.keys.ESC===t.which&&this.V(),GLSR.keys.ENTER===t.which||GLSR.keys.SPACE===t.which){var n=this.options.resultsEl.find("."+this.options.selectedClass);n&&n.trigger("click")}GLSR.keys.UP===t.which&&(t.preventDefault(),this.et(-1)),GLSR.keys.DOWN===t.which&&(t.preventDefault(),this.et(1))}},nt:function(t){t.preventDefault(),this.Z(jQuery(t.currentTarget).closest("tr").index())},J:function(t){t.preventDefault(),"function"==typeof this.options.onResultClick&&this.options.onResultClick.call(this,t),this.V()},B:function(t){if(this.N(),this.searchTerm===t.currentTarget.value&&this.options.results.length)return this.Y(this.options.results);if(this.options.resultsEl.empty(),this.options.selected=-1,this.searchTerm=t.currentTarget.value,""===this.searchTerm)return this.it();this.el.addClass("is-active");var n={};n[GLSR.nameprefix]={_action:this.options.action,_nonce:this.el.find("#_search_nonce").val(),exclude:this.options.exclude,search:this.searchTerm},this.searchRequest=wp.ajax.post(GLSR.action,n).done(function(t){this.el.removeClass("is-active"),this.Y(t.items?t.items:t.empty),this.options.results=this.options.resultsEl.children(),this.options.resultsEl.addClass("is-active"),delete this.searchRequest}.bind(this))},H:function(t){GLSR.keys.ESC===t.which&&this.it(),GLSR.keys.ENTER===t.which&&(this.B(t),t.preventDefault())},rt:function(t){t.preventDefault();var n=jQuery(t.currentTarget).closest(".glsr-multibox-entry");n.find("a").css({color:"#c00"}),n.fadeOut("fast",(function(){n.remove()}))},K:function(){var t=this;this.options.exclude=[],this.options.entriesEl.children("tr").each((function(n){jQuery(this).find(".glsr-string-td2").children().filter(":input").each((function(){var e=jQuery(this),i=e.attr("name").replace(/\[\d+\]/i,"["+n+"]");e.attr("name",i),e.is("[data-id]")&&t.options.exclude.push({id:e.val()})}))}))},it:function(){this.V(),this.options.results={},this.options.searchEl.val("")},X:function(){var t=this.options.entriesEl.children().length>0?"remove":"add";this.options.entriesEl.parent()[t+"Class"]("glsr-hidden")}};var R=A,z=function(t){this.options=jQuery.extend({},this.defaults,t),this.tabs=document.querySelectorAll(this.options.tabSelector),this.tabs&&this.m()};z.prototype={defaults:{expandSelectors:".glsr-nav-view, .glsr-notice",tabSelector:".glsr-nav-tab"},m:function(){var t=this;[].forEach.call(t.tabs,function(n,e){n.addEventListener("click",t.h.bind(t)),n.addEventListener("touchend",t.h.bind(t))}.bind(t)),jQuery(t.options.expandSelectors).on("click","a",(function(){var n=jQuery(this).data("expand");localStorage.setItem("glsr-expand",n),t.ot(jQuery(n))})),jQuery(window).on("load",(function(){t.ot(jQuery(localStorage.getItem("glsr-expand")))}))},h:function(t){t.preventDefault(),this.st(t.currentTarget)},ot:function(t){if(t.length){var n=t.parent().parent();n.removeClass("collapsed"),this.at(n),n.removeClass("collapsed"),t.parent().removeClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!0),window.setTimeout((function(){t.parent()[0].scrollIntoView({behavior:"smooth",block:"center"}),localStorage.removeItem("glsr-expand")}),10)}},at:function(t){var n=t.hasClass("collapsed")?"remove":"add";t[n+"Class"]("collapsed").find(".glsr-card.postbox")[n+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==n)},st:function(t){if(t.classList.contains("nav-tab-active")){var n=jQuery(t.getAttribute("href"));this.at(n)}}};var P=z,$=function(t){this.current=null,this.editor=null,this.create=function(t){if(this.editor=tinymce.get(t),this.editor){var n={_action:"mce-shortcode",shortcode:this.current};new r(n).post(this.ut.bind(this))}};var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){var n=t.querySelector("button"),e=t.querySelectorAll(".mce-menu-item");n&&e.length&&this.m(t,n,e)}.bind(this))};$.prototype={ct:{},lt:[],m:function(t,n,e){document.addEventListener("click",this.ft.bind(this,t,n)),n.addEventListener("click",this.dt.bind(this,t,n)),e.forEach(function(e){e.addEventListener("click",this.ht.bind(this,t,n))}.bind(this))},vt:function(){tinymce.execCommand("GLSR_Shortcode")},yt:function(){jQuery("#scTemp").length?this.vt():(jQuery("body").append('<textarea id="scTemp" style="display:none!important;"/>'),tinymce.init({elements:"scTemp",external_plugins:GLSR.tinymce,mode:"exact",plugins:["glsr_shortcode","wplink"]}),setTimeout(function(){this.vt()}.bind(this),200))},D:function(t,n){jQuery(n).removeClass("active"),jQuery(t).find(".glsr-mce-menu").hide()},bt:function(){var t=jQuery("#scTemp");t.length&&(tinymce.get("scTemp").remove(),t.remove()),this.ct={},this.lt=[]},ut:function(t){if(t){if(0===t.body.length)return window.send_to_editor("["+t.shortcode+"]"),void this.bt();var n=this.gt(t);t.ok.constructor===Array&&(n.buttons[0].text=t.ok[0],n.buttons[0].onclick="close",delete n.buttons[1]),this.editor.windowManager.open(n)}},wt:function(t){for(var n in this.ct=t,this.lt=[],t)t.hasOwnProperty(n)&&(this._t(n),this.kt(n),this.jt(n));this.ct.hide=this.lt.join(",")},_t:function(t){"display"!==t||jQuery.isNumeric(this.ct[t])||(this.ct[t]="")},kt:function(t){if(GLSR.hideoptions.hasOwnProperty(this.current)){var n=t.substring("hide_".length);-1!==Object.keys(GLSR.hideoptions[this.current]).indexOf(n)&&(this.ct[t]&&this.lt.push(n),delete this.ct[t])}},jt:function(t){"id"===t&&(this.ct[t]=(+new Date).toString(36))},ft:function(t,n,e){jQuery(e.target).closest(jQuery(t)).length||this.D(t,n)},dt:function(t,n,e){e.preventDefault(),e.currentTarget.classList.contains("active")?this.D(t,n):this.xt(t,n)},ht:function(t,n,e){e.preventDefault(),this.current=e.currentTarget.dataset.shortcode,this.current&&(tinymce.get(window.wpActiveEditor)?this.vt():this.yt(),setTimeout(function(){this.D(t,n)}.bind(this),100))},xt:function(t,n){jQuery(n).addClass("active"),jQuery(t).find(".glsr-mce-menu").show()},St:function(t){return[{classes:"btn glsr-btn primary",onclick:this.Qt.bind(this),text:t.ok},{onclick:"close",text:t.close}]},gt:function(t){return{title:t.title,body:t.body,classes:"glsr-mce-popup",minWidth:320,buttons:this.St(t),onsubmit:this.Ft.bind(this,t),onclose:this.bt.bind(this)}},Ft:function(t,n){var e="";for(var i in this.wt(n.data),this.ct)this.ct.hasOwnProperty(i)&&""!==this.ct[i]&&(e+=" "+i+'="'+this.ct[i]+'"');window.send_to_editor("["+t.shortcode+e+"]")},Qt:function(){var t=this.editor.windowManager.getWindows()[0];this.Ot(t)&&t.submit()},Ot:function(t){var n,e=!0,i=GLSR.shortcodes[this.current];for(var r in i)if(i.hasOwnProperty(r)&&void 0!==(n=t.find("#"+r)[0])&&""===n.state.data.value){e=!1,alert(i[r]);break}return e}};var C=$,L=e(449),T=e.n(L),E=function(t){var n=document.querySelectorAll(t);n.length&&n.forEach(function(t){t.addEventListener("click",this.h)}.bind(this))};E.prototype={h:function(t){var n=t.currentTarget.href.match(/post=([0-9]+)/),e=t.currentTarget.href.match(/action=([a-z]+)/);if(null!==n&&null!==e){var i={_action:"toggle-status",_nonce:GLSR.nonce["toggle-status"],post_id:n[1],status:e[1]};new r(i,t).post((function(n){if(n.class){var e=jQuery(t.target);e.closest("tr").removeClass("status-pending status-publish").addClass(n.class),e.closest("td.column-title").find("strong").html(n.link),n.counts&&(e.closest(".wrap").find("ul.subsubsub").html(n.counts),jQuery("#menu-posts-site-review").find(".awaiting-mod").removeClass().addClass("awaiting-mod count-"+n.pending).find(".unapproved-count").html(n.pending))}}))}}};var G=E,M=function(){this.button=jQuery("button#sync-reviews"),this.progressbar=jQuery(".glsr-progress"),this.service=null,jQuery("form.glsr-form-sync").on("click","#sync-reviews",this.At.bind(this)),jQuery(document).on("wp-window-resized",this.Rt),jQuery(window).on("hashchange",this.Rt),this.Rt()};M.prototype={zt:function(t){jQuery(".service-"+this.service+" td.column-last_sync").text(t.last_sync),jQuery(".service-"+this.service+" td.column-total_fetched a").text(t.total),this.Pt(!1)},At:function(t){t.preventDefault(),this.service=jQuery('[name="'+GLSR.nameprefix+'[service]"]').val(),this.service&&(this.Pt(!0),this.$t())},Rt:function(){var t=jQuery(".glsr-progress").width();t&&jQuery(".glsr-progress span").width(t)},$t:function(){var t={_action:"sync-reviews",service:this.service,stage:"fetch"};new r(t).post(this.Ct.bind(this))},Ct:function(t){var n={_action:"sync-reviews",job_id:t.job_id,service:this.service,stage:"progress"},e=t.finished?this.Lt.bind(this,t):this.Ct.bind(this);this.Tt(t.message),this.Et(t.percent),setTimeout((function(){new r(n).post(e)}),1500)},Lt:function(t){var n=0;try{n=t.meta.pagination.current_page}catch(t){}var e={_action:"sync-reviews",page:n+1,service:this.service,stage:"reviews"};this.Tt(t.message),t.percent_synced&&t.percent_synced>=100?this.zt(t):new r(e).post(this.Lt.bind(this))},Tt:function(t){jQuery(".glsr-progress-status",this.progressbar).text(t)},Et:function(t){t=(t||0)+"%",jQuery(".glsr-progress-bar",this.progressbar).outerWidth(t)},Pt:function(t){if(!0===t&&(this.Tt(this.progressbar.data("active-text")),this.Et(),this.button.prop("disabled",!0),window.requestAnimationFrame(function(){this.progressbar.addClass("active")}.bind(this))),!1===t)return this.service=null,this.button.prop("disabled",!1),void this.progressbar.removeClass("active");window.requestAnimationFrame(this.Pt.bind(this))}};var q=M,D=function(t){this.options=jQuery.extend({},this.defaults,t),this.active=document.querySelector("input[name=_active_tab]"),this.referrerEl=document.querySelector("input[name=_wp_http_referer]"),this.sections=document.querySelectorAll(this.options.viewSectionSelector),this.subsubsub=document.querySelectorAll(this.options.viewSubsubsub),this.tabs=document.querySelectorAll(this.options.tabSelector),this.views=document.querySelectorAll(this.options.viewSelector),this.active&&this.referrerEl&&this.tabs&&this.views&&this.m()};D.prototype={defaults:{tabSelector:".glsr-nav-tab",viewSelector:".glsr-nav-view",viewSectionSelector:".glsr-nav-view-section",viewSubsubsub:".glsr-subsubsub a"},m:function(){var t=this;jQuery(window).on("hashchange",t.Gt.bind(t)),jQuery(t.options.tabSelector+","+t.options.viewSubsubsub).on("click touchend",t.h.bind(t)),jQuery(t.options.tabSelector).each((function(n){(location.hash?this.getAttribute("href").slice(1)===location.hash.slice(5).split("_")[0]:0===n)&&(t.Mt(this),t.qt(t.Dt()))}))},It:function(t){return t?"add":"remove"},h:function(t){var n=t.currentTarget,e=n.getAttribute("href");e.startsWith("#")&&(location.hash=this.Bt(e.slice(1)),n.blur(),t.preventDefault())},Gt:function(){for(var t=this.Dt().split("_")[0],n=0;n<this.views.length;n++)if(t===this.views[n].id){this.Mt(this.tabs[n]),this.qt(this.Dt());break}},Bt:function(t){return"tab-"+t},Dt:function(){return location.hash?location.hash.split("#tab-")[1]:""},qt:function(t){if(t){var n=this.referrerEl.value.split("#")[0],e=this.Bt(t);this.referrerEl.value=n+"#"+e}},Mt:function(t){[].forEach.call(this.tabs,function(n,e){var i=this.It(n===t);"add"===i&&(this.active.value=this.views[e].id,this.Ht(e)),n.classList[i]("nav-tab-active")}.bind(this))},Ht:function(t){[].forEach.call(this.views,function(n,e){var i=this.It(e!==t);n.classList[i]("ui-tabs-hide"),this.Wt()}.bind(this))},Wt:function(){var t=this,n=0;[].forEach.call(this.subsubsub,(function(e,i){e.classList.remove("current"),e.getAttribute("href").slice(1)===t.Dt()&&(n=i)})),this.subsubsub[n]&&this.subsubsub[n].classList.add("current"),[].forEach.call(this.sections,(function(e,i){var r=t.It(i!==n);e.classList[r]("ui-tabs-hide")}))}};var I=D,B=function(){var t=document.querySelector("#contentdiv > textarea");t&&(this.Ut(t),jQuery(document).on("wp-window-resized.editor-expand",function(){this.Ut(t)}.bind(this)))};B.prototype={Ut:function(t){var n=t.scrollHeight>320?t.scrollHeight:320;t.style.height="auto",t.style.height=n+"px"}};var H=B,W=function(){jQuery("form").on("click","#clear-console",this.Nt,this.h.bind(this)),jQuery("form").on("click","#fetch-console",this.Nt,this.h.bind(this)),jQuery("form").on("click","[data-ajax-click]",this.h.bind(this)),jQuery(".glsr-button").on("click",this.Vt);var t=jQuery("input[data-alt]");t.length&&(jQuery(document).on("keydown",this.Zt.bind(this,t)),jQuery(document).on("keyup",this.Kt.bind(this,t)))};W.prototype={Nt:function(t,n){n&&jQuery("#log-file").val(t.console)},h:function(t){var n=jQuery(t.currentTarget),e=this;n.addClass("is-busy"),new r({},t,n.closest("form")).post((function(i,r){"function"==typeof t.data&&t.data(i,r),n.get(0).hasAttribute("data-ajax-scroll")&&jQuery("html, body").animate({scrollTop:0},500),n.removeClass("is-busy"),n.closest("[data-ajax-hide]").css({backgroundColor:"rgba(74,184,102,.25)"}).fadeOut("normal",(function(){jQuery(this).remove()})),jQuery("#glsr-notices").on("click","a",e.Vt),jQuery('.glsr-notice[data-notice="'+n.data("remove-notice")+'"]').remove()}))},Zt:function(t,n){GLSR.keys.ALT!==n.keyCode||n.repeat||(t.closest("form").find("[data-alt-text]").addClass("alt"),t.val(1))},Kt:function(t,n){GLSR.keys.ALT===n.keyCode&&(t.closest("form").find("[data-alt-text]").removeClass("alt"),t.val(0))},Vt:function(t){var n=jQuery(t.currentTarget).data("expand");n&&localStorage.setItem("glsr-expand",n)}};var U=W;function N(t){var n=t.getBoundingClientRect();return{width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left,x:n.left,y:n.top}}function V(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function Z(t){var n=V(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function K(t){return t instanceof V(t).Element||t instanceof Element}function X(t){return t instanceof V(t).HTMLElement||t instanceof HTMLElement}function Y(t){return"undefined"!=typeof ShadowRoot&&(t instanceof V(t).ShadowRoot||t instanceof ShadowRoot)}function J(t){return t?(t.nodeName||"").toLowerCase():null}function tt(t){return((K(t)?t.ownerDocument:t.document)||window.document).documentElement}function nt(t){return N(tt(t)).left+Z(t).scrollLeft}function et(t){return V(t).getComputedStyle(t)}function it(t){var n=et(t),e=n.overflow,i=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function rt(t,n,e){void 0===e&&(e=!1);var i,r,o=tt(n),s=N(t),a=X(n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!e)&&(("body"!==J(n)||it(o))&&(u=(i=n)!==V(i)&&X(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:Z(i)),X(n)?((c=N(n)).x+=n.clientLeft,c.y+=n.clientTop):o&&(c.x=nt(o))),{x:s.left+u.scrollLeft-c.x,y:s.top+u.scrollTop-c.y,width:s.width,height:s.height}}function ot(t){var n=N(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function st(t){return"html"===J(t)?t:t.assignedSlot||t.parentNode||(Y(t)?t.host:null)||tt(t)}function at(t){return["html","body","#document"].indexOf(J(t))>=0?t.ownerDocument.body:X(t)&&it(t)?t:at(st(t))}function ut(t,n){var e;void 0===n&&(n=[]);var i=at(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=V(i),s=r?[o].concat(o.visualViewport||[],it(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(ut(st(s)))}function ct(t){return["table","td","th"].indexOf(J(t))>=0}function lt(t){return X(t)&&"fixed"!==et(t).position?t.offsetParent:null}function ft(t){for(var n=V(t),e=lt(t);e&&ct(e)&&"static"===et(e).position;)e=lt(e);return e&&("html"===J(e)||"body"===J(e)&&"static"===et(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&X(t)&&"fixed"===et(t).position)return null;for(var e=st(t);X(e)&&["html","body"].indexOf(J(e))<0;){var i=et(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}var dt="top",ht="bottom",pt="right",vt="left",mt="auto",yt=[dt,ht,pt,vt],bt="start",gt="end",wt="viewport",_t="popper",kt=yt.reduce((function(t,n){return t.concat([n+"-"+bt,n+"-"+gt])}),[]),jt=[].concat(yt,[mt]).reduce((function(t,n){return t.concat([n,n+"-"+bt,n+"-"+gt])}),[]),xt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function St(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var Qt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ft(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ot(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,i=void 0===e?[]:e,r=n.defaultOptions,o=void 0===r?Qt:r;return function(t,n,e){void 0===e&&(e=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Qt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(e){f(),a.options=Object.assign({},o,a.options,e),a.scrollParents={reference:K(t)?ut(t):t.contextElement?ut(t.contextElement):[],popper:ut(n)};var r=function(t){var n=St(t);return xt.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}(function(t){var n=t.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{});return Object.keys(n).map((function(t){return n[t]}))}([].concat(i,a.options.modifiers)));return a.orderedModifiers=r.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,i=void 0===e?{}:e,r=t.effect;if("function"==typeof r){var o=r({state:a,name:n,instance:l,options:i}),s=function(){};u.push(o||s)}})),l.update()},forceUpdate:function(){if(!c){var t=a.elements,n=t.reference,e=t.popper;if(Ft(n,e)){a.rects={reference:rt(n,ft(e),"fixed"===a.options.strategy),popper:ot(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,u=void 0===s?{}:s,f=r.name;"function"==typeof o&&(a=o({state:a,options:u,name:f,instance:l})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(t){l.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){f(),c=!0}};if(!Ft(t,n))return l;function f(){u.forEach((function(t){return t()})),u=[]}return l.setOptions(e).then((function(t){!c&&e.onFirstUpdate&&e.onFirstUpdate(t)})),l}}var At={passive:!0};var Rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,u=V(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,At)})),a&&u.addEventListener("resize",e.update,At),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,At)})),a&&u.removeEventListener("resize",e.update,At)}},data:{}};function zt(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function $t(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ct(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?zt(r):null,s=r?Pt(r):null,a=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case dt:n={x:a,y:e.y-i.height};break;case ht:n={x:a,y:e.y+e.height};break;case pt:n={x:e.x+e.width,y:u};break;case vt:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?$t(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case bt:n[c]=n[c]-(e[l]/2-i[l]/2);break;case gt:n[c]=n[c]+(e[l]/2-i[l]/2)}}return n}var Lt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=Ct({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},Tt=Math.max,Et=Math.min,Gt=Math.round,Mt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qt(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.offsets,s=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,l=!0===c?function(t){var n=t.x,e=t.y,i=window.devicePixelRatio||1;return{x:Gt(Gt(n*i)/i)||0,y:Gt(Gt(e*i)/i)||0}}(o):"function"==typeof c?c(o):o,f=l.x,d=void 0===f?0:f,h=l.y,p=void 0===h?0:h,v=o.hasOwnProperty("x"),m=o.hasOwnProperty("y"),y=vt,b=dt,g=window;if(u){var w=ft(e),_="clientHeight",k="clientWidth";w===V(e)&&"static"!==et(w=tt(e)).position&&(_="scrollHeight",k="scrollWidth"),w=w,r===dt&&(b=ht,p-=w[_]-i.height,p*=a?1:-1),r===vt&&(y=pt,d-=w[k]-i.width,d*=a?1:-1)}var j,x=Object.assign({position:s},u&&Mt);return a?Object.assign({},x,((j={})[b]=m?"0":"",j[y]=v?"0":"",j.transform=(g.devicePixelRatio||1)<2?"translate("+d+"px, "+p+"px)":"translate3d("+d+"px, "+p+"px, 0)",j)):Object.assign({},x,((n={})[b]=m?p+"px":"",n[y]=v?d+"px":"",n.transform="",n))}var Dt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];X(r)&&J(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});X(i)&&J(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};var It={left:"right",right:"left",bottom:"top",top:"bottom"};function Bt(t){return t.replace(/left|right|bottom|top/g,(function(t){return It[t]}))}var Ht={start:"end",end:"start"};function Wt(t){return t.replace(/start|end/g,(function(t){return Ht[t]}))}function Ut(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&Y(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Vt(t,n){return n===wt?Nt(function(t){var n=V(t),e=tt(t),i=n.visualViewport,r=e.clientWidth,o=e.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+nt(t),y:a}}(t)):X(n)?function(t){var n=N(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):Nt(function(t){var n,e=tt(t),i=Z(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=Tt(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Tt(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+nt(t),u=-i.scrollTop;return"rtl"===et(r||e).direction&&(a+=Tt(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(tt(t)))}function Zt(t,n,e){var i="clippingParents"===n?function(t){var n=ut(st(t)),e=["absolute","fixed"].indexOf(et(t).position)>=0&&X(t)?ft(t):t;return K(e)?n.filter((function(t){return K(t)&&Ut(t,e)&&"body"!==J(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),o=r[0],s=r.reduce((function(n,e){var i=Vt(t,e);return n.top=Tt(i.top,n.top),n.right=Et(i.right,n.right),n.bottom=Et(i.bottom,n.bottom),n.left=Tt(i.left,n.left),n}),Vt(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Kt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Xt(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function Yt(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=void 0===i?t.placement:i,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,u=void 0===a?wt:a,c=e.elementContext,l=void 0===c?_t:c,f=e.altBoundary,d=void 0!==f&&f,h=e.padding,p=void 0===h?0:h,v=Kt("number"!=typeof p?p:Xt(p,yt)),m=l===_t?"reference":_t,y=t.elements.reference,b=t.rects.popper,g=t.elements[d?m:l],w=Zt(K(g)?g:g.contextElement||tt(t.elements.popper),s,u),_=N(y),k=Ct({reference:_,element:b,strategy:"absolute",placement:r}),j=Nt(Object.assign({},b,k)),x=l===_t?j:_,S={top:w.top-x.top+v.top,bottom:x.bottom-w.bottom+v.bottom,left:w.left-x.left+v.left,right:x.right-w.right+v.right},Q=t.modifiersData.offset;if(l===_t&&Q){var F=Q[r];Object.keys(S).forEach((function(t){var n=[pt,ht].indexOf(t)>=0?1:-1,e=[dt,ht].indexOf(t)>=0?"y":"x";S[t]+=F[e]*n}))}return S}function Jt(t,n,e){return Tt(t,Et(n,e))}function tn(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function nn(t){return[dt,pt,ht,vt].some((function(n){return t[n]>=0}))}var en=Ot({defaultModifiers:[Rt,Lt,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,u=void 0===a||a,c={placement:zt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,qt(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,qt(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},Dt,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.offset,o=void 0===r?[0,0]:r,s=jt.reduce((function(t,e){return t[e]=function(t,n,e){var i=zt(t),r=[vt,dt].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[vt,pt].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(e,n.rects,o),t}),{}),a=s[n.placement],u=a.x,c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,u=e.fallbackPlacements,c=e.padding,l=e.boundary,f=e.rootBoundary,d=e.altBoundary,h=e.flipVariations,p=void 0===h||h,v=e.allowedAutoPlacements,m=n.options.placement,y=zt(m),b=u||(y===m||!p?[Bt(m)]:function(t){if(zt(t)===mt)return[];var n=Bt(t);return[Wt(t),n,Wt(n)]}(m)),g=[m].concat(b).reduce((function(t,e){return t.concat(zt(e)===mt?function(t,n){void 0===n&&(n={});var e=n,i=e.placement,r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,u=e.allowedAutoPlacements,c=void 0===u?jt:u,l=Pt(i),f=l?a?kt:kt.filter((function(t){return Pt(t)===l})):yt,d=f.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(n,e){return n[e]=Yt(t,{placement:e,boundary:r,rootBoundary:o,padding:s})[zt(e)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}(n,{placement:e,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),w=n.rects.reference,_=n.rects.popper,k=new Map,j=!0,x=g[0],S=0;S<g.length;S++){var Q=g[S],F=zt(Q),O=Pt(Q)===bt,A=[dt,ht].indexOf(F)>=0,R=A?"width":"height",z=Yt(n,{placement:Q,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=A?O?pt:vt:O?ht:dt;w[R]>_[R]&&(P=Bt(P));var $=Bt(P),C=[];if(o&&C.push(z[F]<=0),a&&C.push(z[P]<=0,z[$]<=0),C.every((function(t){return t}))){x=Q,j=!1;break}k.set(Q,C)}if(j)for(var L=function(t){var n=g.find((function(n){var e=k.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return x=n,"break"},T=p?3:1;T>0;T--){if("break"===L(T))break}n.placement!==x&&(n.modifiersData[i]._skip=!0,n.placement=x,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,u=e.boundary,c=e.rootBoundary,l=e.altBoundary,f=e.padding,d=e.tether,h=void 0===d||d,p=e.tetherOffset,v=void 0===p?0:p,m=Yt(n,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=zt(n.placement),b=Pt(n.placement),g=!b,w=$t(y),_="x"===w?"y":"x",k=n.modifiersData.popperOffsets,j=n.rects.reference,x=n.rects.popper,S="function"==typeof v?v(Object.assign({},n.rects,{placement:n.placement})):v,Q={x:0,y:0};if(k){if(o||a){var F="y"===w?dt:vt,O="y"===w?ht:pt,A="y"===w?"height":"width",R=k[w],z=k[w]+m[F],P=k[w]-m[O],$=h?-x[A]/2:0,C=b===bt?j[A]:x[A],L=b===bt?-x[A]:-j[A],T=n.elements.arrow,E=h&&T?ot(T):{width:0,height:0},G=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},M=G[F],q=G[O],D=Jt(0,j[A],E[A]),I=g?j[A]/2-$-D-M-S:C-D-M-S,B=g?-j[A]/2+$+D+q+S:L+D+q+S,H=n.elements.arrow&&ft(n.elements.arrow),W=H?"y"===w?H.clientTop||0:H.clientLeft||0:0,U=n.modifiersData.offset?n.modifiersData.offset[n.placement][w]:0,N=k[w]+I-U-W,V=k[w]+B-U;if(o){var Z=Jt(h?Et(z,N):z,R,h?Tt(P,V):P);k[w]=Z,Q[w]=Z-R}if(a){var K="x"===w?dt:vt,X="x"===w?ht:pt,Y=k[_],J=Y+m[K],tt=Y-m[X],nt=Jt(h?Et(J,N):J,Y,h?Tt(tt,V):tt);k[_]=nt,Q[_]=nt-Y}}n.modifiersData[i]=Q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=zt(e.placement),u=$t(a),c=[vt,pt].indexOf(a)>=0?"height":"width";if(o&&s){var l=function(t,n){return Kt("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:Xt(t,yt))}(r.padding,e),f=ot(o),d="y"===u?dt:vt,h="y"===u?ht:pt,p=e.rects.reference[c]+e.rects.reference[u]-s[u]-e.rects.popper[c],v=s[u]-e.rects.reference[u],m=ft(o),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,b=p/2-v/2,g=l[d],w=y-f[c]-l[h],_=y/2-f[c]/2+b,k=Jt(g,_,w),j=u;e.modifiersData[i]=((n={})[j]=k,n.centerOffset=k-_,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&Ut(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,s=Yt(n,{elementContext:"reference"}),a=Yt(n,{altBoundary:!0}),u=tn(s,i),c=tn(a,r,o),l=nn(u),f=nn(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),rn="tippy-content",on="tippy-backdrop",sn="tippy-arrow",an="tippy-svg-arrow",un={passive:!0,capture:!0};function cn(t,n,e){if(Array.isArray(t)){var i=t[n];return null==i?Array.isArray(e)?e[n]:e:i}return t}function ln(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function fn(t,n){return"function"==typeof t?t.apply(void 0,n):t}function dn(t,n){return 0===n?t:function(i){clearTimeout(e),e=setTimeout((function(){t(i)}),n)};var e}function hn(t){return[].concat(t)}function pn(t,n){-1===t.indexOf(n)&&t.push(n)}function vn(t){return t.split("-")[0]}function mn(t){return[].slice.call(t)}function yn(){return document.createElement("div")}function bn(t){return["Element","Fragment"].some((function(n){return ln(t,n)}))}function gn(t){return ln(t,"MouseEvent")}function wn(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function _n(t){return bn(t)?[t]:function(t){return ln(t,"NodeList")}(t)?mn(t):Array.isArray(t)?t:mn(document.querySelectorAll(t))}function kn(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function jn(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function xn(t){var n,e=hn(t)[0];return(null==e||null==(n=e.ownerDocument)?void 0:n.body)?e.ownerDocument:document}function Sn(t,n,e){var i=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[i](n,e)}))}var Qn={isTouch:!1},Fn=0;function On(){Qn.isTouch||(Qn.isTouch=!0,window.performance&&document.addEventListener("mousemove",An))}function An(){var t=performance.now();t-Fn<20&&(Qn.isTouch=!1,document.removeEventListener("mousemove",An)),Fn=t}function Rn(){var t=document.activeElement;if(wn(t)){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var zn="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Pn=/MSIE |Trident\//.test(zn);var $n={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Cn=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},$n,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ln=Object.keys(Cn);function Tn(t){var n=(t.plugins||[]).reduce((function(n,e){var i=e.name,r=e.defaultValue;return i&&(n[i]=void 0!==t[i]?t[i]:r),n}),{});return Object.assign({},t,{},n)}function En(t,n){var e=Object.assign({},n,{content:fn(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(Tn(Object.assign({},Cn,{plugins:n}))):Ln).reduce((function(n,e){var i=(t.getAttribute("data-tippy-"+e)||"").trim();if(!i)return n;if("content"===e)n[e]=i;else try{n[e]=JSON.parse(i)}catch(t){n[e]=i}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Cn.aria,{},e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Gn(t,n){t.innerHTML=n}function Mn(t){var n=yn();return!0===t?n.className=sn:(n.className=an,bn(t)?n.appendChild(t):Gn(n,t)),n}function qn(t,n){bn(n.content)?(Gn(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Gn(t,n.content):t.textContent=n.content)}function Dn(t){var n=t.firstElementChild,e=mn(n.children);return{box:n,content:e.find((function(t){return t.classList.contains(rn)})),arrow:e.find((function(t){return t.classList.contains(sn)||t.classList.contains(an)})),backdrop:e.find((function(t){return t.classList.contains(on)}))}}function In(t){var n=yn(),e=yn();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=yn();function r(e,i){var r=Dn(n),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),e.content===i.content&&e.allowHTML===i.allowHTML||qn(s,t.props),i.arrow?a?e.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Mn(i.arrow))):o.appendChild(Mn(i.arrow)):a&&o.removeChild(a)}return i.className=rn,i.setAttribute("data-state","hidden"),qn(i,t.props),n.appendChild(e),e.appendChild(i),r(t.props,t.props),{popper:n,onUpdate:r}}In.$$tippy=!0;var Bn=1,Hn=[],Wn=[];function Un(t,n){var e,i,r,o,s,a,u,c,l,f=En(t,Object.assign({},Cn,{},Tn((e=n,Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{}))))),d=!1,h=!1,p=!1,v=!1,m=[],y=dn(V,f.interactiveDebounce),b=Bn++,g=(l=f.plugins).filter((function(t,n){return l.indexOf(t)===n})),w={id:b,reference:t,popper:yn(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(n){0;if(w.state.isDestroyed)return;C("onBeforeUpdate",[w,n]),U();var e=w.props,i=En(t,Object.assign({},w.props,{},n,{ignoreAttributes:!0}));w.props=i,W(),e.interactiveDebounce!==i.interactiveDebounce&&(E(),y=dn(V,i.interactiveDebounce));e.triggerTarget&&!i.triggerTarget?hn(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):i.triggerTarget&&t.removeAttribute("aria-expanded");T(),$(),j&&j(e,i);w.popperInstance&&(Y(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));C("onAfterUpdate",[w,n])},setContent:function(t){w.setProps({content:t})},show:function(){0;var t=w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=Qn.isTouch&&!w.props.touch,r=cn(w.props.duration,0,Cn.duration);if(t||n||e||i)return;if(A().hasAttribute("disabled"))return;if(C("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,O()&&(k.style.visibility="visible");$(),D(),w.state.isMounted||(k.style.transition="none");if(O()){var o=z(),s=o.box,a=o.content;kn([s,a],0)}u=function(){var t;if(w.state.isVisible&&!v){if(v=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,O()&&w.props.animation){var n=z(),e=n.box,i=n.content;kn([e,i],r),jn([e,i],"visible")}L(),T(),pn(Wn,w),null==(t=w.popperInstance)||t.forceUpdate(),w.state.isMounted=!0,C("onMount",[w]),w.props.animation&&O()&&function(t,n){B(t,n)}(r,(function(){w.state.isShown=!0,C("onShown",[w])}))}},function(){var t,n=w.props.appendTo,e=A();t=w.props.interactive&&n===Cn.appendTo||"parent"===n?e.parentNode:fn(n,[e]);t.contains(k)||t.appendChild(k);Y(),!1}()},hide:function(){0;var t=!w.state.isVisible,n=w.state.isDestroyed,e=!w.state.isEnabled,i=cn(w.props.duration,1,Cn.duration);if(t||n||e)return;if(C("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,v=!1,d=!1,O()&&(k.style.visibility="hidden");if(E(),I(),$(),O()){var r=z(),o=r.box,s=r.content;w.props.animation&&(kn([o,s],i),jn([o,s],"hidden"))}L(),T(),w.props.animation?O()&&function(t,n){B(t,(function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&n()}))}(i,w.unmount):w.unmount()},hideWithInteractivity:function(t){0;R().addEventListener("mousemove",y),pn(Hn,y),y(t)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){0;w.state.isVisible&&w.hide();if(!w.state.isMounted)return;J(),tt().forEach((function(t){t._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);Wn=Wn.filter((function(t){return t!==w})),w.state.isMounted=!1,C("onHidden",[w])},destroy:function(){0;if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),U(),delete t._tippy,w.state.isDestroyed=!0,C("onDestroy",[w])}};if(!f.render)return w;var _=f.render(w),k=_.popper,j=_.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,t._tippy=w,k._tippy=w;var x=g.map((function(t){return t.fn(w)})),S=t.hasAttribute("aria-expanded");return W(),T(),$(),C("onCreate",[w]),f.showOnCreate&&nt(),k.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(t){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(R().addEventListener("mousemove",y),y(t))})),w;function Q(){var t=w.props.touch;return Array.isArray(t)?t:[t,0]}function F(){return"hold"===Q()[0]}function O(){var t;return!!(null==(t=w.props.render)?void 0:t.$$tippy)}function A(){return c||t}function R(){var t=A().parentNode;return t?xn(t):document}function z(){return Dn(k)}function P(t){return w.state.isMounted&&!w.state.isVisible||Qn.isTouch||s&&"focus"===s.type?0:cn(w.props.delay,t?0:1,Cn.delay)}function $(){k.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",k.style.zIndex=""+w.props.zIndex}function C(t,n,e){var i;(void 0===e&&(e=!0),x.forEach((function(e){e[t]&&e[t].apply(void 0,n)})),e)&&(i=w.props)[t].apply(i,n)}function L(){var n=w.props.aria;if(n.content){var e="aria-"+n.content,i=k.id;hn(w.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(w.state.isVisible)t.setAttribute(e,n?n+" "+i:i);else{var r=n&&n.replace(i,"").trim();r?t.setAttribute(e,r):t.removeAttribute(e)}}))}}function T(){!S&&w.props.aria.expanded&&hn(w.props.triggerTarget||t).forEach((function(t){w.props.interactive?t.setAttribute("aria-expanded",w.state.isVisible&&t===A()?"true":"false"):t.removeAttribute("aria-expanded")}))}function E(){R().removeEventListener("mousemove",y),Hn=Hn.filter((function(t){return t!==y}))}function G(t){if(!(Qn.isTouch&&(p||"mousedown"===t.type)||w.props.interactive&&k.contains(t.target))){if(A().contains(t.target)){if(Qn.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else C("onClickOutside",[w,t]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),h=!0,setTimeout((function(){h=!1})),w.state.isMounted||I())}}function M(){p=!0}function q(){p=!1}function D(){var t=R();t.addEventListener("mousedown",G,!0),t.addEventListener("touchend",G,un),t.addEventListener("touchstart",q,un),t.addEventListener("touchmove",M,un)}function I(){var t=R();t.removeEventListener("mousedown",G,!0),t.removeEventListener("touchend",G,un),t.removeEventListener("touchstart",q,un),t.removeEventListener("touchmove",M,un)}function B(t,n){var e=z().box;function i(t){t.target===e&&(Sn(e,"remove",i),n())}if(0===t)return n();Sn(e,"remove",a),Sn(e,"add",i),a=i}function H(n,e,i){void 0===i&&(i=!1),hn(w.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,i),m.push({node:t,eventType:n,handler:e,options:i})}))}function W(){var t;F()&&(H("touchstart",N,{passive:!0}),H("touchend",Z,{passive:!0})),(t=w.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(H(t,N),t){case"mouseenter":H("mouseleave",Z);break;case"focus":H(Pn?"focusout":"blur",K);break;case"focusin":H("focusout",K)}}))}function U(){m.forEach((function(t){var n=t.node,e=t.eventType,i=t.handler,r=t.options;n.removeEventListener(e,i,r)})),m=[]}function N(t){var n,e=!1;if(w.state.isEnabled&&!X(t)&&!h){var i="focus"===(null==(n=s)?void 0:n.type);s=t,c=t.currentTarget,T(),!w.state.isVisible&&gn(t)&&Hn.forEach((function(n){return n(t)})),"click"===t.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?e=!0:nt(t),"click"===t.type&&(d=!e),e&&!i&&et(t)}}function V(t){var n=t.target,e=A().contains(n)||k.contains(n);"mousemove"===t.type&&e||function(t,n){var e=n.clientX,i=n.clientY;return t.every((function(t){var n=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=vn(r.placement),a=r.modifiersData.offset;if(!a)return!0;var u="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,d=n.top-i+u>o,h=i-n.bottom-c>o,p=n.left-e+l>o,v=e-n.right-f>o;return d||h||p||v}))}(tt().concat(k).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:f}:null})).filter(Boolean),t)&&(E(),et(t))}function Z(t){X(t)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(t):et(t))}function K(t){w.props.trigger.indexOf("focusin")<0&&t.target!==A()||w.props.interactive&&t.relatedTarget&&k.contains(t.relatedTarget)||et(t)}function X(t){return!!Qn.isTouch&&F()!==t.type.indexOf("touch")>=0}function Y(){J();var n=w.props,e=n.popperOptions,i=n.placement,r=n.offset,o=n.getReferenceClientRect,s=n.moveTransition,a=O()?Dn(k).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||A()}:t,l=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(O()){var e=z().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}}];O()&&a&&l.push({name:"arrow",options:{element:a,padding:3}}),l.push.apply(l,(null==e?void 0:e.modifiers)||[]),w.popperInstance=en(c,k,Object.assign({},e,{placement:i,onFirstUpdate:u,modifiers:l}))}function J(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function tt(){return mn(k.querySelectorAll("[data-tippy-root]"))}function nt(t){w.clearDelayTimeouts(),t&&C("onTrigger",[w,t]),D();var n=P(!0),e=Q(),r=e[0],o=e[1];Qn.isTouch&&"hold"===r&&o&&(n=o),n?i=setTimeout((function(){w.show()}),n):w.show()}function et(t){if(w.clearDelayTimeouts(),C("onUntrigger",[w,t]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var n=P(!1);n?r=setTimeout((function(){w.state.isVisible&&w.hide()}),n):o=requestAnimationFrame((function(){w.hide()}))}}else I()}}function Nn(t,n){void 0===n&&(n={});var e=Cn.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",On,un),window.addEventListener("blur",Rn);var i=Object.assign({},n,{plugins:e}),r=_n(t).reduce((function(t,n){var e=n&&Un(n,i);return e&&t.push(e),t}),[]);return bn(t)?r[0]:r}Nn.defaultProps=Cn,Nn.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Cn[n]=t[n]}))},Nn.currentInput=Qn;Object.assign({},Dt,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var Vn={clientX:0,clientY:0},Zn=[];function Kn(t){var n=t.clientX,e=t.clientY;Vn={clientX:n,clientY:e}}var Xn={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=xn(t.props.triggerTarget||n),i=!1,r=!1,o=!0,s=t.props;function a(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){e.addEventListener("mousemove",f)}function c(){e.removeEventListener("mousemove",f)}function l(){i=!0,t.setProps({getReferenceClientRect:null}),i=!1}function f(e){var i=!e.target||n.contains(e.target),r=t.props.followCursor,o=e.clientX,s=e.clientY,a=n.getBoundingClientRect(),u=o-a.left,c=s-a.top;!i&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=o,i=s;"initial"===r&&(e=t.left+u,i=t.top+c);var a="horizontal"===r?t.top:i,l="vertical"===r?t.right:e,f="horizontal"===r?t.bottom:i,d="vertical"===r?t.left:e;return{width:l-d,height:f-a,top:a,right:l,bottom:f,left:d}}})}function d(){t.props.followCursor&&(Zn.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",Kn)}(e))}function h(){0===(Zn=Zn.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",Kn)}(e)}return{onCreate:d,onDestroy:h,onBeforeUpdate:function(){s=t.props},onAfterUpdate:function(n,e){var o=e.followCursor;i||void 0!==o&&s.followCursor!==o&&(h(),o?(d(),!t.state.isMounted||r||a()||u()):(c(),l()))},onMount:function(){t.props.followCursor&&!r&&(o&&(f(Vn),o=!1),a()||u())},onTrigger:function(t,n){gn(n)&&(Vn={clientX:n.clientX,clientY:n.clientY}),r="focus"===n.type},onHidden:function(){t.props.followCursor&&(l(),c(),o=!0)}}}};Nn.setDefaultProps({render:In});var Yn=Nn;GLSR.autosize=f,GLSR.keys={ALT:18,DOWN:40,ENTER:13,ESC:27,SPACE:32,UP:38},GLSR.Tippy={tippy:Yn,plugins:{followCursor:Xn}},jQuery((function(t){O().highlightAll(),GLSR.notices=new k,GLSR.shortcode=new C(".glsr-mce"),GLSR.stars=new(T())("select.glsr-star-rating",{tooltip:!1}),GLSR.Tippy.tippy(".glsr-tooltip",{appendTo:function(){return document.body}}),h(),new v,new y("form.glsr-form"),new g,new x,new Q,new R("#glsr-search-posts",{action:"search-posts",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-posts"),r={id:e.data("id"),name:"post_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new R("#glsr-search-users",{action:"search-users",onInit:function(){this.el.find(".glsr-remove-button").on("click",this.rt.bind(this))},onResultClick:function(n){var e=t(n.currentTarget),i=wp.template("glsr-assigned-users"),r={id:e.data("id"),name:"user_ids[]",url:e.data("url"),title:e.text()};if(i){var o=t(i(r));o.find(".glsr-remove-button").on("click",this.rt.bind(this)),this.el.find(".glsr-selected-entries").append(o),this.it()}this.options.searchEl.focus()}}),new R("#glsr-search-translations",{action:"search-translations",onInit:function(){this.tt()},onResultClick:function(n){var e=t(n.currentTarget),i=e.data("entry"),r=wp.template("glsr-string-"+(i.p1?"plural":"single"));i.index=this.options.entriesEl.children().length,i.prefix=this.options.resultsEl.data("prefix"),r&&(this.options.entriesEl.append(r(i)),this.options.exclude.push({id:i.id}),this.options.results=this.options.results.filter((function(t,n){return n!==e.get(0)}))),this.X()}}),new G("a.glsr-toggle-status"),new P,new I,new H,new U,new q;var n=function(){this.dataset.glsrTrack=this.value};t("select[data-glsr-track]").each(n),t("select[data-glsr-track]").on("change",n),t(".glsr-card.postbox:not(.open)").addClass("closed").find(".glsr-accordion-trigger").attr("aria-expanded",!1).closest(".glsr-nav-view").addClass("collapsed"),t(".glsr-support-step").not(":checked").length<1&&t(".glsr-card-result").removeClass("hidden"),t(".glsr-support-step").on("change",(function(){var n=t(".glsr-support-step").not(":checked").length>0?"add":"remove";t(".glsr-card-result")[n+"Class"]("hidden")})),t(".glsr-card.postbox .glsr-card-heading").on("click",(function(){var n=t(this).parent(),e=n.closest(".glsr-nav-view"),i=n.hasClass("closed")?"remove":"add";n[i+"Class"]("closed").find(".glsr-accordion-trigger").attr("aria-expanded","add"!==i),i=e.find(".glsr-card.postbox").not(".closed").length>0?"remove":"add",e[i+"Class"]("collapsed")})),t(".post-type-site-review #the-list").on("click",".editinline",(function(){var n=t(this).closest("tr");t(':input[data-name="post_content"]').val(""),t(':input[name="_response"]').val(""),setTimeout((function(){t(':input[data-name="post_content"]').val(n.find("._post_content").text()),t(':input[name="_response"]').val(n.find("._response").text())}),50)}))}))}()}();
assets/scripts/site-reviews-blocks.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see site-reviews-blocks.js.LICENSE.txt */
2
- !function(){"use strict";var e={90:function(e,t,n){var s=n(424),i="function"==typeof Symbol&&Symbol.for,r=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,o=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,m=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,f="function"==typeof Symbol&&Symbol.iterator;function w(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function b(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||y}function x(){}function _(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||y}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(w(85));this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=b.prototype;var S=_.prototype=new x;S.constructor=_,s(S,b.prototype),S.isPureReactComponent=!0;var C={current:null},j=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var s,i={},a=null,o=null;if(null!=t)for(s in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)j.call(t,s)&&!k.hasOwnProperty(s)&&(i[s]=t[s]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(s in l=e.defaultProps)void 0===i[s]&&(i[s]=l[s]);return{$$typeof:r,type:e,key:a,ref:o,props:i,_owner:C.current}}function L(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var I=/\/+/g,O=[];function A(e,t,n,s){if(O.length){var i=O.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=s,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:s,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function E(e,t,n,s){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var o=!1;if(null===e)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case r:case a:o=!0}}if(o)return n(s,e,""===t?"."+G(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var u=t+G(i=e[l],l);o+=E(i,u,n,s)}else if(null===e||"object"!=typeof e?u=null:u="function"==typeof(u=f&&e[f]||e["@@iterator"])?u:null,"function"==typeof u)for(e=u.call(e),l=0;!(i=e.next()).done;)o+=E(i=i.value,u=t+G(i,l++),n,s);else if("object"===i)throw n=""+e,Error(w(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return o}function P(e,t,n){return null==e?0:E(e,"",t,n)}function G(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function N(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var s=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?z(e,s,n,(function(e){return e})):null!=e&&(L(e)&&(e=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(I,"$&/")+"/")+n)),s.push(e))}function z(e,t,n,s,i){var r="";null!=n&&(r=(""+n).replace(I,"$&/")+"/"),P(e,M,t=A(t,r,s,i)),D(t)}var U={current:null};function T(){var e=U.current;if(null===e)throw Error(w(321));return e}t.createElement=R},294:function(e,t,n){e.exports=n(90)},424:function(e){var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(e){s[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var a,o,l=i(e),u=1;u<arguments.length;u++){for(var c in a=Object(arguments[u]))n.call(a,c)&&(l[c]=a[c]);if(t){o=t(a);for(var d=0;d<o.length;d++)s.call(a,o[d])&&(l[o[d]]=a[o[d]])}}return l}}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}!function(){var e=n(294);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var s,i,r=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(s=n.next()).done)&&(r.push(s.value),!t||r.length!==t);a=!0);}catch(e){o=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw i}}return r}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var i=wp.components.CheckboxControl,r=wp.element.useState,a=function(t,n,a){var o=[];return jQuery.each(t,(function(t,l){var u=s(r(!1),2),c=u[0],d=u[1],m=n.split(",").indexOf(t)>-1;o.push((0,e.createElement)(i,{key:"hide-".concat(t),className:"glsr-checkbox-control",checked:m||c,label:l,onChange:function(e){d(e),n=_.without(_.without(n.split(","),""),t),e&&n.push(t),a({hide:n.toString()})}}))})),o},o=(0,e.createElement)("svg",{width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11 2l-3 6-6 .75 4.13 4.62-1.13 6.63 6-3 6 3-1.12-6.63 4.12-4.62-6-.75-3-6zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15-4.68-2.34v-11.64zm8.28-.894v.963h-3.272v2.691h-1.017v-6.3h4.496v.963h-3.479v1.683h3.272z"})),l=(0,e.createElement)("svg",{width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11 2l-3 6-6 .75 4.13 4.62-1.13 6.63 6-3 6 3-1.12-6.63 4.12-4.62-6-.75-3-6zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15-4.68-2.34v-11.64zm3.681-3.54h2.592c1.449 0 2.232.648 2.232 1.823 0 1.071-.819 1.782-2.102 1.827l2.075 2.651h-1.26l-2.007-2.651h-.513v2.651h-1.017v-6.3zm2.565.954h-1.548v1.773h1.548c.819 0 1.202-.297 1.202-.905 0-.599-.405-.869-1.202-.869z"})),u=(0,e.createElement)("svg",{width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11 2l-3 6-6 .75 4.13 4.62-1.13 6.63 6-3 6 3-1.12-6.63 4.12-4.62-6-.75-3-6zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15-4.68-2.34v-11.64zm8.415-2.969l-.518.824c-.536-.342-1.13-.54-1.769-.54-.842 0-1.418.365-1.418.941 0 .522.491.725 1.31.842l.437.059c1.022.14 2.03.563 2.03 1.733 0 1.283-1.161 1.985-2.525 1.985-.855 0-1.881-.284-2.534-.846l.554-.81c.432.396 1.247.693 1.976.693.824 0 1.472-.351 1.472-.932 0-.495-.495-.725-1.418-.851l-.491-.068c-.936-.131-1.868-.572-1.868-1.742 0-1.265 1.121-1.967 2.484-1.967.918 0 1.643.257 2.277.68z"})),c=wp.i18n._x,d=[{label:"- "+c("Select","admin-text","site-reviews")+" -",value:""},{label:"- "+c("Select Multiple Post IDs","admin-text","site-reviews")+" -",value:"custom"},{label:c("Assign to the Current Page","admin-text","site-reviews"),value:"post_id"},{label:c("Assign to the Parent Page","admin-text","site-reviews"),value:"parent_id"}],m=wp.i18n._x,p=[],v={label:"- "+m("Select","admin-text","site-reviews")+" -",value:""},g={label:"- "+m("Select Multiple Categories","admin-text","site-reviews")+" -",value:"glsr_custom"};wp.apiFetch({path:"/site-reviews/v1/categories?per_page=50"}).then((function(e){p.push(v),p.push(g),jQuery.each(e,(function(e,t){p.push({label:"".concat(t.name," (").concat(t.slug,")"),value:t.id})}))}));var f=p,w=wp.i18n._x,y=[],h={label:"- "+w("Select","admin-text","site-reviews")+" -",value:""},b={label:"- "+w("Select Multiple Users","admin-text","site-reviews")+" -",value:"glsr_custom"};wp.apiFetch({path:"/wp/v2/users?per_page=50"}).then((function(e){y.push(h),y.push(b),jQuery.each(e,(function(e,t){y.push({label:t.name+" ("+t.slug+")",value:t.id})}))}));var x=y;function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function C(e,t){if(null==e)return{};var n,s,i=function(e,t){if(null==e)return{};var n,s,i={},r=Object.keys(e);for(s=0;s<r.length;s++)n=r[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s<r.length;s++)n=r[s],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}wp.i18n._x;var j=wp.components,k=j.BaseControl,R=(j.TextControl,lodash.isEmpty),L=wp.compose.useInstanceId;function I(t){var n=t.children,s=t.custom_value,i=void 0===s?"custom":s,r=t.help,a=t.label,o=t.onChange,l=t.options,u=void 0===l?[]:l,c=t.className,d=t.hideLabelFromVision,m=(t.selectedValue,C(t,["children","custom_value","help","label","onChange","options","className","hideLabelFromVision","selectedValue"])),p=L(I),v="inspector-select-control-".concat(p),g=m.value;return!R(u)&&(0,e.createElement)(k,{label:a,hideLabelFromVision:d,id:v,help:r,className:c},(0,e.createElement)("select",S({id:v,className:"components-select-control__input",onChange:function(e){o(e.target.value)},"aria-describedby":r?"".concat(v,"__help"):void 0},m),u.map((function(t,n){return(0,e.createElement)("option",{key:"".concat(t.label,"-").concat(t.value,"-").concat(n),value:t.value,disabled:t.disabled},t.label)}))),i===g&&n)}var O=wp.i18n._x,A=wp.blocks.registerBlockType,D=wp.blockEditor,E=D.InspectorAdvancedControls,P=D.InspectorControls,G=wp.components,N=G.PanelBody,M=(G.SelectControl,G.TextControl),z=wp.serverSideRender,U=GLSR.nameprefix+"/form",T=(A(U,{attributes:{assign_to:{default:"",type:"string"},assigned_posts:{default:"",type:"string"},assigned_terms:{default:"",type:"string"},assigned_users:{default:"",type:"string"},category:{default:"",type:"string"},className:{default:"",type:"string"},hide:{default:"",type:"string"},id:{default:"",type:"string"},user:{default:"",type:"string"}},category:GLSR.nameprefix,description:O("Display a review form.","admin-text","site-reviews"),edit:function(t){var n=t.attributes,s=n.assign_to,i=n.assigned_posts,r=n.assigned_terms,o=n.assigned_users,l=n.category,u=n.hide,c=n.id,m=n.user,p=(t.className,t.setAttributes),v={assign_to:(0,e.createElement)(I,{key:"assigned_posts",label:O("Assign Reviews to a Post ID","admin-text","site-reviews"),onChange:function(e){return p({assign_to:e,assigned_posts:"custom"===e?i:""})},options:d,value:s},(0,e.createElement)(M,{className:"glsr-base-conditional-control",help:O("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return p({assigned_posts:e})},placeholder:O("Enter the Post IDs","admin-text","site-reviews"),type:"text",value:i})),category:(0,e.createElement)(I,{key:"assigned_terms",custom_value:"glsr_custom",label:O("Assign Reviews to a Category","admin-text","site-reviews"),onChange:function(e){return p({category:e,assigned_terms:"glsr_custom"===e?r:""})},options:f,value:l},(0,e.createElement)(M,{className:"glsr-base-conditional-control",help:O("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return p({assigned_terms:e})},placeholder:O("Enter the Category IDs or slugs","admin-text","site-reviews"),type:"text",value:r})),user:(0,e.createElement)(I,{key:"assigned_users",custom_value:"glsr_custom",label:O("Assign Reviews to a User","admin-text","site-reviews"),onChange:function(e){return p({user:e,assigned_users:"glsr_custom"===e?o:""})},options:x,value:m},(0,e.createElement)(M,{className:"glsr-base-conditional-control",help:O("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return p({assigned_users:e})},placeholder:O("Enter the User IDs or usernames","admin-text","site-reviews"),type:"text",value:o})),hide:a(GLSR.hideoptions.site_reviews_form,u,p)},g={id:(0,e.createElement)(M,{label:O("Custom ID","admin-text","site-reviews"),onChange:function(e){return p({id:e})},value:c})};return[(0,e.createElement)(P,null,(0,e.createElement)(N,{title:O("Settings","admin-text","site-reviews")},Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".form.InspectorControls",v,t)))),(0,e.createElement)(E,null,Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".form.InspectorAdvancedControls",g,t))),(0,e.createElement)(z,{block:U,attributes:t.attributes})]},example:{},icon:{src:o},keywords:["reviews","form"],save:function(){return null},title:O("Submit a Review","admin-text","site-reviews")}),wp.i18n._x),$=[{label:"- "+T("Select","admin-text","site-reviews")+" -",value:""},{label:"- "+T("Select Multiple Post IDs","admin-text","site-reviews")+" -",value:"custom"},{label:T("Assigned to the Current Page","admin-text","site-reviews"),value:"post_id"},{label:T("Assigned to the Parent Page","admin-text","site-reviews"),value:"parent_id"}],Q=wp.i18n._x,q=[{label:"- "+Q("Select","admin-text","site-reviews")+" -",value:""},{label:Q("Terms were accepted","admin-text","site-reviews"),value:"true"},{label:Q("Terms were not accepted","admin-text","site-reviews"),value:"false"}],B={label:"- "+(0,wp.i18n._x)("Select","admin-text","site-reviews")+" -",value:""},F=[];wp.apiFetch({path:"/site-reviews/v1/types?per_page=50"}).then((function(e){e.length<2||(F.push(B),jQuery.each(e,(function(e,t){F.push({label:t.name,value:t.id})})))}));var V=F,H=wp.i18n._x,J=wp.blocks.registerBlockType,K=wp.blockEditor,W=K.InspectorAdvancedControls,X=K.InspectorControls,Y=wp.components,Z=Y.PanelBody,ee=Y.RangeControl,te=Y.SelectControl,ne=Y.TextControl,se=Y.ToggleControl,ie=wp.serverSideRender,re=GLSR.nameprefix+"/reviews";wp.hooks.addFilter("blocks.getBlockAttributes",re,(function(e,t,n,s){return s&&s.count&&(e.display=s.count),e}));J(re,{attributes:{assigned_to:{default:"",type:"string"},assigned_posts:{default:"",type:"string"},assigned_terms:{default:"",type:"string"},assigned_users:{default:"",type:"string"},category:{default:"",type:"string"},className:{default:"",type:"string"},display:{default:5,type:"number"},hide:{default:"",type:"string"},id:{default:"",type:"string"},pagination:{default:"",type:"string"},post_id:{default:"",type:"string"},rating:{default:0,type:"number"},schema:{default:!1,type:"boolean"},terms:{default:"",type:"string"},type:{default:"local",type:"string"},user:{default:"",type:"string"}},category:GLSR.nameprefix,description:H("Display your most recent reviews.","admin-text","site-reviews"),edit:function(t){t.attributes.post_id=jQuery("#post_ID").val();var n=t.attributes,s=n.assigned_to,i=n.assigned_posts,r=n.assigned_terms,o=n.assigned_users,l=n.category,u=n.display,c=n.hide,d=n.id,m=n.pagination,p=n.rating,v=n.schema,g=n.terms,w=n.type,y=n.user,h=(t.className,t.setAttributes),b={assigned_to:(0,e.createElement)(I,{key:"assigned_posts",label:H("Limit Reviews to an Assigned Post ID","admin-text","site-reviews"),onChange:function(e){return h({assigned_to:e,assigned_posts:"custom"===e?i:""})},options:$,value:s},(0,e.createElement)(ne,{className:"glsr-base-conditional-control",help:H("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return h({assigned_posts:e})},placeholder:H("Enter the Post IDs","admin-text","site-reviews"),type:"text",value:i})),category:(0,e.createElement)(I,{key:"assigned_terms",custom_value:"glsr_custom",label:H("Limit Reviews to an Assigned Category","admin-text","site-reviews"),onChange:function(e){return h({category:e,assigned_terms:"glsr_custom"===e?r:""})},options:f,value:l},(0,e.createElement)(ne,{className:"glsr-base-conditional-control",help:H("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return h({assigned_terms:e})},placeholder:H("Enter the Category IDs or slugs","admin-text","site-reviews"),type:"text",value:r})),user:(0,e.createElement)(I,{key:"assigned_users",custom_value:"glsr_custom",label:H("Limit Reviews to an Assigned User","admin-text","site-reviews"),onChange:function(e){return h({user:e,assigned_users:"glsr_custom"===e?o:""})},options:x,value:y},(0,e.createElement)(ne,{className:"glsr-base-conditional-control",help:H("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return h({assigned_users:e})},placeholder:H("Enter the User IDs or usernames","admin-text","site-reviews"),type:"text",value:o})),terms:(0,e.createElement)(te,{key:"terms",label:H("Limit Reviews to terms","admin-text","site-reviews"),onChange:function(e){return h({terms:e})},options:q,value:g}),pagination:(0,e.createElement)(te,{key:"pagination",label:H("Enable Pagination","admin-text","site-reviews"),onChange:function(e){return h({pagination:e})},options:[{label:"- "+H("Select","admin-text","site-reviews")+" -",value:""},{label:H("Enabled","admin-text","site-reviews"),value:"true"},{label:H("Enabled (using ajax)","admin-text","site-reviews"),value:"ajax"}],value:m}),type:(0,e.createElement)(te,{key:"type",label:H("Limit the Type of Reviews","admin-text","site-reviews"),onChange:function(e){return h({type:e})},options:V,value:w}),display:(0,e.createElement)(ee,{key:"display",label:H("Reviews Per Page","admin-text","site-reviews"),min:1,max:50,onChange:function(e){return h({display:e})},value:u}),rating:(0,e.createElement)(ee,{key:"rating",label:H("Minimum Rating","admin-text","site-reviews"),min:0,max:GLSR.maxrating,onChange:function(e){return h({rating:e})},value:p}),schema:(0,e.createElement)(se,{key:"schema",checked:v,help:H("The schema should only be enabled once per page.","admin-text","site-reviews"),label:H("Enable the schema?","admin-text","site-reviews"),onChange:function(e){return h({schema:e})}}),hide:a(GLSR.hideoptions.site_reviews,c,h)},_={id:(0,e.createElement)(ne,{label:H("Custom ID","admin-text","site-reviews"),onChange:function(e){return h({id:e})},value:d})};return[(0,e.createElement)(X,null,(0,e.createElement)(Z,{title:H("Settings","admin-text","site-reviews")},Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".reviews.InspectorControls",b,t)))),(0,e.createElement)(W,null,Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".reviews.InspectorAdvancedControls",_,t))),(0,e.createElement)(ie,{block:re,attributes:t.attributes})]},example:{attributes:{display:2,pagination:"ajax",rating:0}},icon:{src:l},keywords:["reviews"],save:function(){return null},title:H("Latest Reviews","admin-text","site-reviews")});var ae=wp.i18n._x,oe=wp.blocks.registerBlockType,le=wp.blockEditor,ue=le.InspectorAdvancedControls,ce=le.InspectorControls,de=wp.components,me=de.PanelBody,pe=de.RangeControl,ve=de.SelectControl,ge=de.TextControl,fe=de.ToggleControl,we=wp.serverSideRender,ye=GLSR.nameprefix+"/summary";oe(ye,{attributes:{assigned_to:{default:"",type:"string"},assigned_posts:{default:"",type:"string"},assigned_terms:{default:"",type:"string"},assigned_users:{default:"",type:"string"},category:{default:"",type:"string"},className:{default:"",type:"string"},hide:{default:"",type:"string"},post_id:{default:"",type:"string"},rating:{default:0,type:"number"},schema:{default:!1,type:"boolean"},terms:{default:"",type:"string"},type:{default:"local",type:"string"},user:{default:"",type:"string"}},category:GLSR.nameprefix,description:ae("Display a summary of your reviews.","admin-text","site-reviews"),edit:function(t){t.attributes.post_id=jQuery("#post_ID").val();var n=t.attributes,s=n.assigned_to,i=n.assigned_posts,r=n.assigned_terms,o=n.assigned_users,l=n.category,u=(n.display,n.hide),c=(n.id,n.pagination,n.rating),d=n.schema,m=n.terms,p=n.type,v=n.user,g=(t.className,t.setAttributes),w={assigned_to:(0,e.createElement)(I,{key:"assigned_posts",label:ae("Limit Reviews to an Assigned Post ID","admin-text","site-reviews"),onChange:function(e){return g({assigned_to:e,assigned_posts:"custom"===e?i:""})},options:$,value:s},(0,e.createElement)(ge,{className:"glsr-base-conditional-control",help:ae("Separate multiple IDs with commas.","admin-text","site-reviews"),onChange:function(e){return g({assigned_posts:e})},placeholder:ae("Enter the Post IDs","admin-text","site-reviews"),type:"text",value:i})),category:(0,e.createElement)(I,{key:"assigned_terms",custom_value:"glsr_custom",label:ae("Limit Reviews to an Assigned Category","admin-text","site-reviews"),onChange:function(e){return g({category:e,assigned_terms:"glsr_custom"===e?r:""})},options:f,value:l},(0,e.createElement)(ge,{className:"glsr-base-conditional-control",help:ae("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return g({assigned_terms:e})},placeholder:ae("Enter the Category IDs or slugs","admin-text","site-reviews"),type:"text",value:r})),user:(0,e.createElement)(I,{key:"assigned_users",custom_value:"glsr_custom",label:ae("Limit Reviews to an Assigned User","admin-text","site-reviews"),onChange:function(e){return g({user:e,assigned_users:"glsr_custom"===e?o:""})},options:x,value:v},(0,e.createElement)(ge,{className:"glsr-base-conditional-control",help:ae("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return g({assigned_users:e})},placeholder:ae("Enter the User IDs or usernames","admin-text","site-reviews"),type:"text",value:o})),terms:(0,e.createElement)(ve,{key:"terms",label:ae("Limit Reviews to terms","admin-text","site-reviews"),onChange:function(e){return g({terms:e})},options:q,value:m}),type:(0,e.createElement)(ve,{key:"type",label:ae("Limit the Type of Reviews","admin-text","site-reviews"),onChange:function(e){return g({type:e})},options:V,value:p}),rating:(0,e.createElement)(pe,{key:"rating",label:ae("Minimum Rating","admin-text","site-reviews"),min:0,max:GLSR.maxrating,onChange:function(e){return g({rating:e})},value:c}),schema:(0,e.createElement)(fe,{key:"schema",checked:d,help:ae("The schema should only be enabled once per page.","admin-text","site-reviews"),label:ae("Enable the schema?","admin-text","site-reviews"),onChange:function(e){return g({schema:e})}}),hide:a(GLSR.hideoptions.site_reviews_summary,u,g)};return[(0,e.createElement)(ce,null,(0,e.createElement)(me,{title:ae("Settings","admin-text","site-reviews")},Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".summary.InspectorControls",w,t)))),(0,e.createElement)(ue,null,Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".summary.InspectorAdvancedControls",{},t))),(0,e.createElement)(we,{block:ye,attributes:t.attributes})]},example:{},icon:{src:u},keywords:["reviews","summary"],save:function(){return null},title:ae("Summary","admin-text","site-reviews")})}()}();
1
  /*! For license information please see site-reviews-blocks.js.LICENSE.txt */
2
+ !function(){"use strict";var e={367:function(e,t,n){var s=n(424),i="function"==typeof Symbol&&Symbol.for,r=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,o=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,m=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,f="function"==typeof Symbol&&Symbol.iterator;function w(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function b(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||y}function x(){}function _(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||y}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(w(85));this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=b.prototype;var S=_.prototype=new x;S.constructor=_,s(S,b.prototype),S.isPureReactComponent=!0;var C={current:null},j=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var s,i={},a=null,o=null;if(null!=t)for(s in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)j.call(t,s)&&!k.hasOwnProperty(s)&&(i[s]=t[s]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(s in l=e.defaultProps)void 0===i[s]&&(i[s]=l[s]);return{$$typeof:r,type:e,key:a,ref:o,props:i,_owner:C.current}}function L(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var O=/\/+/g,I=[];function A(e,t,n,s){if(I.length){var i=I.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=s,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:s,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>I.length&&I.push(e)}function E(e,t,n,s){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var o=!1;if(null===e)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case r:case a:o=!0}}if(o)return n(s,e,""===t?"."+G(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var u=t+G(i=e[l],l);o+=E(i,u,n,s)}else if(null===e||"object"!=typeof e?u=null:u="function"==typeof(u=f&&e[f]||e["@@iterator"])?u:null,"function"==typeof u)for(e=u.call(e),l=0;!(i=e.next()).done;)o+=E(i=i.value,u=t+G(i,l++),n,s);else if("object"===i)throw n=""+e,Error(w(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return o}function P(e,t,n){return null==e?0:E(e,"",t,n)}function G(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function N(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var s=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?z(e,s,n,(function(e){return e})):null!=e&&(L(e)&&(e=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n)),s.push(e))}function z(e,t,n,s,i){var r="";null!=n&&(r=(""+n).replace(O,"$&/")+"/"),P(e,M,t=A(t,r,s,i)),D(t)}var U={current:null};function T(){var e=U.current;if(null===e)throw Error(w(321));return e}t.createElement=R},294:function(e,t,n){e.exports=n(367)},424:function(e){var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(e){s[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var a,o,l=i(e),u=1;u<arguments.length;u++){for(var c in a=Object(arguments[u]))n.call(a,c)&&(l[c]=a[c]);if(t){o=t(a);for(var d=0;d<o.length;d++)s.call(a,o[d])&&(l[o[d]]=a[o[d]])}}return l}}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}!function(){var e=n(294);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var s,i,r=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(s=n.next()).done)&&(r.push(s.value),!t||r.length!==t);a=!0);}catch(e){o=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw i}}return r}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var i=wp.components.CheckboxControl,r=wp.element.useState,a=function(t,n,a){var o=[];return jQuery.each(t,(function(t,l){var u=s(r(!1),2),c=u[0],d=u[1],m=n.split(",").indexOf(t)>-1;o.push((0,e.createElement)(i,{key:"hide-".concat(t),className:"glsr-checkbox-control",checked:m||c,label:l,onChange:function(e){d(e),n=_.without(_.without(n.split(","),""),t),e&&n.push(t),a({hide:n.toString()})}}))})),o},o=(0,e.createElement)("svg",{width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11 2l-3 6-6 .75 4.13 4.62-1.13 6.63 6-3 6 3-1.12-6.63 4.12-4.62-6-.75-3-6zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15-4.68-2.34v-11.64zm8.28-.894v.963h-3.272v2.691h-1.017v-6.3h4.496v.963h-3.479v1.683h3.272z"})),l=(0,e.createElement)("svg",{width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11 2l-3 6-6 .75 4.13 4.62-1.13 6.63 6-3 6 3-1.12-6.63 4.12-4.62-6-.75-3-6zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15-4.68-2.34v-11.64zm3.681-3.54h2.592c1.449 0 2.232.648 2.232 1.823 0 1.071-.819 1.782-2.102 1.827l2.075 2.651h-1.26l-2.007-2.651h-.513v2.651h-1.017v-6.3zm2.565.954h-1.548v1.773h1.548c.819 0 1.202-.297 1.202-.905 0-.599-.405-.869-1.202-.869z"})),u=(0,e.createElement)("svg",{width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11 2l-3 6-6 .75 4.13 4.62-1.13 6.63 6-3 6 3-1.12-6.63 4.12-4.62-6-.75-3-6zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15-4.68-2.34v-11.64zm8.415-2.969l-.518.824c-.536-.342-1.13-.54-1.769-.54-.842 0-1.418.365-1.418.941 0 .522.491.725 1.31.842l.437.059c1.022.14 2.03.563 2.03 1.733 0 1.283-1.161 1.985-2.525 1.985-.855 0-1.881-.284-2.534-.846l.554-.81c.432.396 1.247.693 1.976.693.824 0 1.472-.351 1.472-.932 0-.495-.495-.725-1.418-.851l-.491-.068c-.936-.131-1.868-.572-1.868-1.742 0-1.265 1.121-1.967 2.484-1.967.918 0 1.643.257 2.277.68z"})),c=wp.i18n._x,d=[{label:"- "+c("Select","admin-text","site-reviews")+" -",value:""},{label:"- "+c("Select Multiple Post IDs","admin-text","site-reviews")+" -",value:"custom"},{label:c("Assign to the Current Page","admin-text","site-reviews"),value:"post_id"},{label:c("Assign to the Parent Page","admin-text","site-reviews"),value:"parent_id"}],m=wp.i18n._x,p=[],v={label:"- "+m("Select","admin-text","site-reviews")+" -",value:""},g={label:"- "+m("Select Multiple Categories","admin-text","site-reviews")+" -",value:"glsr_custom"};wp.apiFetch({path:"/site-reviews/v1/categories?per_page=50"}).then((function(e){p.push(v),p.push(g),jQuery.each(e,(function(e,t){p.push({label:"".concat(t.name," (").concat(t.slug,")"),value:t.id})}))}));var f=p,w=wp.i18n._x,y=[],h={label:"- "+w("Select","admin-text","site-reviews")+" -",value:""},b={label:"- "+w("Select Multiple Users","admin-text","site-reviews")+" -",value:"glsr_custom"};wp.apiFetch({path:"/wp/v2/users?per_page=50"}).then((function(e){y.push(h),y.push(b),jQuery.each(e,(function(e,t){y.push({label:t.name+" ("+t.slug+")",value:t.id})}))}));var x=y;function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function C(e,t){if(null==e)return{};var n,s,i=function(e,t){if(null==e)return{};var n,s,i={},r=Object.keys(e);for(s=0;s<r.length;s++)n=r[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s<r.length;s++)n=r[s],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var j=["children","custom_value","help","label","onChange","options","className","hideLabelFromVision","selectedValue"],k=(wp.i18n._x,wp.components),R=k.BaseControl,L=(k.TextControl,lodash.isEmpty),O=wp.compose.useInstanceId;function I(t){var n=t.children,s=t.custom_value,i=void 0===s?"custom":s,r=t.help,a=t.label,o=t.onChange,l=t.options,u=void 0===l?[]:l,c=t.className,d=t.hideLabelFromVision,m=(t.selectedValue,C(t,j)),p=O(I),v="inspector-select-control-".concat(p),g=m.value;return!L(u)&&(0,e.createElement)(R,{label:a,hideLabelFromVision:d,id:v,help:r,className:c},(0,e.createElement)("select",S({id:v,className:"components-select-control__input",onChange:function(e){o(e.target.value)},"aria-describedby":r?"".concat(v,"__help"):void 0},m),u.map((function(t,n){return(0,e.createElement)("option",{key:"".concat(t.label,"-").concat(t.value,"-").concat(n),value:t.value,disabled:t.disabled},t.label)}))),i===g&&n)}var A=wp.i18n._x,D=wp.blocks.registerBlockType,E=wp.blockEditor,P=E.InspectorAdvancedControls,G=E.InspectorControls,N=wp.components,M=N.PanelBody,z=(N.SelectControl,N.TextControl),U=wp.serverSideRender,T=GLSR.nameprefix+"/form",$=(D(T,{attributes:{assign_to:{default:"",type:"string"},assigned_posts:{default:"",type:"string"},assigned_terms:{default:"",type:"string"},assigned_users:{default:"",type:"string"},category:{default:"",type:"string"},className:{default:"",type:"string"},hide:{default:"",type:"string"},id:{default:"",type:"string"},user:{default:"",type:"string"}},category:GLSR.nameprefix,description:A("Display a review form.","admin-text","site-reviews"),edit:function(t){var n=t.attributes,s=n.assign_to,i=n.assigned_posts,r=n.assigned_terms,o=n.assigned_users,l=n.category,u=n.hide,c=n.id,m=n.user,p=(t.className,t.setAttributes),v={assign_to:(0,e.createElement)(I,{key:"assigned_posts",label:A("Assign Reviews to a Page","admin-text","site-reviews"),onChange:function(e){return p({assign_to:e,assigned_posts:"custom"===e?i:""})},options:d,value:s},(0,e.createElement)(z,{className:"glsr-base-conditional-control",help:A("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return p({assigned_posts:e})},placeholder:A("Enter the Post IDs","admin-text","site-reviews"),type:"text",value:i})),category:(0,e.createElement)(I,{key:"assigned_terms",custom_value:"glsr_custom",label:A("Assign Reviews to a Category","admin-text","site-reviews"),onChange:function(e){return p({category:e,assigned_terms:"glsr_custom"===e?r:""})},options:f,value:l},(0,e.createElement)(z,{className:"glsr-base-conditional-control",help:A("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return p({assigned_terms:e})},placeholder:A("Enter the Category IDs or slugs","admin-text","site-reviews"),type:"text",value:r})),user:(0,e.createElement)(I,{key:"assigned_users",custom_value:"glsr_custom",label:A("Assign Reviews to a User","admin-text","site-reviews"),onChange:function(e){return p({user:e,assigned_users:"glsr_custom"===e?o:""})},options:x,value:m},(0,e.createElement)(z,{className:"glsr-base-conditional-control",help:A("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return p({assigned_users:e})},placeholder:A("Enter the User IDs or usernames","admin-text","site-reviews"),type:"text",value:o})),hide:a(GLSR.hideoptions.site_reviews_form,u,p)},g={id:(0,e.createElement)(z,{label:A("Custom ID","admin-text","site-reviews"),onChange:function(e){return p({id:e})},value:c})};return[(0,e.createElement)(G,null,(0,e.createElement)(M,{title:A("Settings","admin-text","site-reviews")},Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".form.InspectorControls",v,t)))),(0,e.createElement)(P,null,Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".form.InspectorAdvancedControls",g,t))),(0,e.createElement)(U,{block:T,attributes:t.attributes})]},example:{},icon:{src:o},keywords:["reviews","form"],save:function(){return null},title:A("Submit a Review","admin-text","site-reviews")}),wp.i18n._x),Q=[{label:"- "+$("Select","admin-text","site-reviews")+" -",value:""},{label:"- "+$("Select Multiple Post IDs","admin-text","site-reviews")+" -",value:"custom"},{label:$("Assigned to the Current Page","admin-text","site-reviews"),value:"post_id"},{label:$("Assigned to the Parent Page","admin-text","site-reviews"),value:"parent_id"}],q=wp.i18n._x,B=[{label:"- "+q("Select","admin-text","site-reviews")+" -",value:""},{label:q("Terms were accepted","admin-text","site-reviews"),value:"true"},{label:q("Terms were not accepted","admin-text","site-reviews"),value:"false"}],F={label:"- "+(0,wp.i18n._x)("Select","admin-text","site-reviews")+" -",value:""},V=[];wp.apiFetch({path:"/site-reviews/v1/types?per_page=50"}).then((function(e){e.length<2||(V.push(F),jQuery.each(e,(function(e,t){V.push({label:t.name,value:t.id})})))}));var H=V,J=wp.i18n._x,K=wp.blocks.registerBlockType,W=wp.blockEditor,X=W.InspectorAdvancedControls,Y=W.InspectorControls,Z=wp.components,ee=Z.PanelBody,te=Z.RangeControl,ne=Z.SelectControl,se=Z.TextControl,ie=Z.ToggleControl,re=wp.serverSideRender,ae=GLSR.nameprefix+"/reviews";wp.hooks.addFilter("blocks.getBlockAttributes",ae,(function(e,t,n,s){return s&&s.count&&(e.display=s.count),e}));K(ae,{attributes:{assigned_to:{default:"",type:"string"},assigned_posts:{default:"",type:"string"},assigned_terms:{default:"",type:"string"},assigned_users:{default:"",type:"string"},category:{default:"",type:"string"},className:{default:"",type:"string"},display:{default:5,type:"number"},hide:{default:"",type:"string"},id:{default:"",type:"string"},pagination:{default:"",type:"string"},post_id:{default:"",type:"string"},rating:{default:0,type:"number"},schema:{default:!1,type:"boolean"},terms:{default:"",type:"string"},type:{default:"local",type:"string"},user:{default:"",type:"string"}},category:GLSR.nameprefix,description:J("Display your most recent reviews.","admin-text","site-reviews"),edit:function(t){t.attributes.post_id=jQuery("#post_ID").val();var n=t.attributes,s=n.assigned_to,i=n.assigned_posts,r=n.assigned_terms,o=n.assigned_users,l=n.category,u=n.display,c=n.hide,d=n.id,m=n.pagination,p=n.rating,v=n.schema,g=n.terms,w=n.type,y=n.user,h=(t.className,t.setAttributes),b={assigned_to:(0,e.createElement)(I,{key:"assigned_posts",label:J("Limit Reviews to an Assigned Page","admin-text","site-reviews"),onChange:function(e){return h({assigned_to:e,assigned_posts:"custom"===e?i:""})},options:Q,value:s},(0,e.createElement)(se,{className:"glsr-base-conditional-control",help:J("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return h({assigned_posts:e})},placeholder:J("Enter the Post IDs","admin-text","site-reviews"),type:"text",value:i})),category:(0,e.createElement)(I,{key:"assigned_terms",custom_value:"glsr_custom",label:J("Limit Reviews to an Assigned Category","admin-text","site-reviews"),onChange:function(e){return h({category:e,assigned_terms:"glsr_custom"===e?r:""})},options:f,value:l},(0,e.createElement)(se,{className:"glsr-base-conditional-control",help:J("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return h({assigned_terms:e})},placeholder:J("Enter the Category IDs or slugs","admin-text","site-reviews"),type:"text",value:r})),user:(0,e.createElement)(I,{key:"assigned_users",custom_value:"glsr_custom",label:J("Limit Reviews to an Assigned User","admin-text","site-reviews"),onChange:function(e){return h({user:e,assigned_users:"glsr_custom"===e?o:""})},options:x,value:y},(0,e.createElement)(se,{className:"glsr-base-conditional-control",help:J("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return h({assigned_users:e})},placeholder:J("Enter the User IDs or usernames","admin-text","site-reviews"),type:"text",value:o})),terms:(0,e.createElement)(ne,{key:"terms",label:J("Limit Reviews to terms","admin-text","site-reviews"),onChange:function(e){return h({terms:e})},options:B,value:g}),pagination:(0,e.createElement)(ne,{key:"pagination",label:J("Enable Pagination","admin-text","site-reviews"),onChange:function(e){return h({pagination:e})},options:[{label:"- "+J("Select","admin-text","site-reviews")+" -",value:""},{label:J("Enabled","admin-text","site-reviews"),value:"true"},{label:J("Enabled (using ajax)","admin-text","site-reviews"),value:"ajax"}],value:m}),type:(0,e.createElement)(ne,{key:"type",label:J("Limit the Type of Reviews","admin-text","site-reviews"),onChange:function(e){return h({type:e})},options:H,value:w}),display:(0,e.createElement)(te,{key:"display",label:J("Reviews Per Page","admin-text","site-reviews"),min:1,max:50,onChange:function(e){return h({display:e})},value:u}),rating:(0,e.createElement)(te,{key:"rating",label:J("Minimum Rating","admin-text","site-reviews"),min:0,max:GLSR.maxrating,onChange:function(e){return h({rating:e})},value:p}),schema:(0,e.createElement)(ie,{key:"schema",checked:v,help:J("The schema should only be enabled once per page.","admin-text","site-reviews"),label:J("Enable the schema?","admin-text","site-reviews"),onChange:function(e){return h({schema:e})}}),hide:a(GLSR.hideoptions.site_reviews,c,h)},_={id:(0,e.createElement)(se,{label:J("Custom ID","admin-text","site-reviews"),onChange:function(e){return h({id:e})},value:d})};return[(0,e.createElement)(Y,null,(0,e.createElement)(ee,{title:J("Settings","admin-text","site-reviews")},Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".reviews.InspectorControls",b,t)))),(0,e.createElement)(X,null,Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".reviews.InspectorAdvancedControls",_,t))),(0,e.createElement)(re,{block:ae,attributes:t.attributes})]},example:{attributes:{display:2,pagination:"ajax",rating:0}},icon:{src:l},keywords:["reviews"],save:function(){return null},title:J("Latest Reviews","admin-text","site-reviews")});var oe=wp.i18n._x,le=wp.blocks.registerBlockType,ue=wp.blockEditor,ce=ue.InspectorAdvancedControls,de=ue.InspectorControls,me=wp.components,pe=me.PanelBody,ve=me.RangeControl,ge=me.SelectControl,fe=me.TextControl,we=me.ToggleControl,ye=wp.serverSideRender,he=GLSR.nameprefix+"/summary";le(he,{attributes:{assigned_to:{default:"",type:"string"},assigned_posts:{default:"",type:"string"},assigned_terms:{default:"",type:"string"},assigned_users:{default:"",type:"string"},category:{default:"",type:"string"},className:{default:"",type:"string"},hide:{default:"",type:"string"},post_id:{default:"",type:"string"},rating:{default:0,type:"number"},schema:{default:!1,type:"boolean"},terms:{default:"",type:"string"},type:{default:"local",type:"string"},user:{default:"",type:"string"}},category:GLSR.nameprefix,description:oe("Display a summary of your reviews.","admin-text","site-reviews"),edit:function(t){t.attributes.post_id=jQuery("#post_ID").val();var n=t.attributes,s=n.assigned_to,i=n.assigned_posts,r=n.assigned_terms,o=n.assigned_users,l=n.category,u=(n.display,n.hide),c=(n.id,n.pagination,n.rating),d=n.schema,m=n.terms,p=n.type,v=n.user,g=(t.className,t.setAttributes),w={assigned_to:(0,e.createElement)(I,{key:"assigned_posts",label:oe("Limit Reviews to an Assigned Page","admin-text","site-reviews"),onChange:function(e){return g({assigned_to:e,assigned_posts:"custom"===e?i:""})},options:Q,value:s},(0,e.createElement)(fe,{className:"glsr-base-conditional-control",help:oe("Separate multiple IDs with commas.","admin-text","site-reviews"),onChange:function(e){return g({assigned_posts:e})},placeholder:oe("Enter the Post IDs","admin-text","site-reviews"),type:"text",value:i})),category:(0,e.createElement)(I,{key:"assigned_terms",custom_value:"glsr_custom",label:oe("Limit Reviews to an Assigned Category","admin-text","site-reviews"),onChange:function(e){return g({category:e,assigned_terms:"glsr_custom"===e?r:""})},options:f,value:l},(0,e.createElement)(fe,{className:"glsr-base-conditional-control",help:oe("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return g({assigned_terms:e})},placeholder:oe("Enter the Category IDs or slugs","admin-text","site-reviews"),type:"text",value:r})),user:(0,e.createElement)(I,{key:"assigned_users",custom_value:"glsr_custom",label:oe("Limit Reviews to an Assigned User","admin-text","site-reviews"),onChange:function(e){return g({user:e,assigned_users:"glsr_custom"===e?o:""})},options:x,value:v},(0,e.createElement)(fe,{className:"glsr-base-conditional-control",help:oe("Separate with commas.","admin-text","site-reviews"),onChange:function(e){return g({assigned_users:e})},placeholder:oe("Enter the User IDs or usernames","admin-text","site-reviews"),type:"text",value:o})),terms:(0,e.createElement)(ge,{key:"terms",label:oe("Limit Reviews to terms","admin-text","site-reviews"),onChange:function(e){return g({terms:e})},options:B,value:m}),type:(0,e.createElement)(ge,{key:"type",label:oe("Limit the Type of Reviews","admin-text","site-reviews"),onChange:function(e){return g({type:e})},options:H,value:p}),rating:(0,e.createElement)(ve,{key:"rating",label:oe("Minimum Rating","admin-text","site-reviews"),min:0,max:GLSR.maxrating,onChange:function(e){return g({rating:e})},value:c}),schema:(0,e.createElement)(we,{key:"schema",checked:d,help:oe("The schema should only be enabled once per page.","admin-text","site-reviews"),label:oe("Enable the schema?","admin-text","site-reviews"),onChange:function(e){return g({schema:e})}}),hide:a(GLSR.hideoptions.site_reviews_summary,u,g)};return[(0,e.createElement)(de,null,(0,e.createElement)(pe,{title:oe("Settings","admin-text","site-reviews")},Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".summary.InspectorControls",w,t)))),(0,e.createElement)(ce,null,Object.values(wp.hooks.applyFilters(GLSR.nameprefix+".summary.InspectorAdvancedControls",{},t))),(0,e.createElement)(ye,{block:he,attributes:t.attributes})]},example:{},icon:{src:u},keywords:["reviews","summary"],save:function(){return null},title:oe("Rating Summary","admin-text","site-reviews")})}()}();
assets/scripts/site-reviews.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t,i={237:function(t,i,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){};s.prototype={get:function(t,i,n){this.t(i),this.xhr.open("GET",t,!0),this.xhr.responseType="text",this.i(n),this.xhr.send()},u:function(t){return"json"===this.xhr.responseType||!0===this.xhr.json?t({message:this.xhr.statusText},!1):"text"===this.xhr.responseType?t(this.xhr.statusText):void 0},h:function(t){if(0===this.xhr.status||this.xhr.status>=200&&this.xhr.status<300||304===this.xhr.status){if("json"===this.xhr.responseType)return t(this.xhr.response.data,this.xhr.response.success);if("text"===this.xhr.responseType)return t(this.xhr.responseText);if(!0===this.xhr.json){var i=JSON.parse(this.xhr.response);return t(i.data,i.success)}}else this.u(t)},isFileSupported:function(){var t=document.createElement("INPUT");return t.type="file","files"in t},isFormDataSupported:function(){return!!window.FormData},isUploadSupported:function(){var t=new XMLHttpRequest;return!!(t&&"upload"in t&&"onprogress"in t.upload)},post:function(t,i,n){this.t(i),this.xhr.open("POST",GLSR.ajaxurl,!0),this.xhr.responseType="json",this.xhr.json=!0,this.i(n),this.xhr.send(this.l(t))},t:function(t){this.xhr=new XMLHttpRequest,this.xhr.onload=this.h.bind(this,t),this.xhr.onerror=this.u.bind(this,t)},v:function(t,i,n){return"object"!==e(i)||i instanceof Date||i instanceof File?t.append(n,i||""):Object.keys(i).forEach(function(e){i.hasOwnProperty(e)&&(t=this.v(t,i[e],n?n[e]:e))}.bind(this)),t},l:function(t){var i=new FormData,n=Object.prototype.toString.call(t);return"[object FormData]"===n&&(i=t),"[object HTMLFormElement]"===n&&(i=new FormData(t)),"[object Object]"===n&&Object.keys(t).forEach((function(n){i.append(n,t[n])})),i.append("action",GLSR.action),i.append("_ajax_request",!0),i},i:function(t){for(var i in(t=t||{})["X-Requested-With"]="XMLHttpRequest",t)t.hasOwnProperty(i)&&this.xhr.setRequestHeader(i,t[i])}};var o=s,r={},u=function(t,i){var n=r[t]||[],e=[];i&&[].forEach.call(n,(function(t){i!==t.fn&&i!==t.fn.once&&e.push(t)})),e.length?r[t]=e:delete r[t]},h=function(t,i,n){(r[t]||(r[t]=[])).push({fn:i,context:n})},a=function(t,i,n){var e=arguments,s=function s(){u(t,s),i.apply(n,e)};s.once=i,h(t,s,n)},c=function(t){var i=[].slice.call(arguments,1),n=(r[t]||[]).slice();[].forEach.call(n,(function(t){return t.fn.apply(t.context,i)}))},f={events:r,trigger:c,off:u,on:h,once:a};function d(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function l(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function v(t,i,n){return i&&l(t.prototype,i),n&&l(t,n),t}var m={hiddenClass:"glsr-hidden",hiddenTextSelector:".glsr-hidden-text",readMoreClass:"glsr-read-more",visibleClass:"glsr-visible"},w=function(){function t(i){var n=this;d(this,t);var e=(i||document).querySelectorAll(m.hiddenTextSelector);[].forEach.call(e,(function(t){return n.init(t)})),GLSR.Event.trigger("site-reviews/excerpts/init",i)}return v(t,[{key:"init",value:function(t){if(!t.parentNode.querySelector("."+m.readMoreClass)){var i=t.dataset.trigger,n=document.createElement("span"),e=document.createElement("a");e.setAttribute("href","#"),e.innerHTML=t.dataset.showMore,"excerpt"===i&&(e.addEventListener("click",this.onClick.bind(this)),e.setAttribute("data-text",t.dataset.showLess)),"modal"===i&&e.setAttribute("data-excerpt-trigger","glsr-modal"),n.setAttribute("class",m.readMoreClass),n.appendChild(e),t.parentNode.insertBefore(n,t.nextSibling)}}},{key:"onClick",value:function(t){t.preventDefault();var i=t.currentTarget,n=i.parentNode.previousSibling,e=i.dataset.text;n.classList.toggle(m.hiddenClass),n.classList.toggle(m.visibleClass),i.dataset.text=i.innerText,i.innerText=e}}]),t}(),p=w,g=function(t){this.Form=t,this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl=t.form.querySelector(".glsr-recaptcha-holder"),this.observer=new MutationObserver(function(t){var i=t.pop();i.target&&"visible"!==i.target.style.visibility&&(this.observer.disconnect(),setTimeout(function(){this.is_submitting||this.Form.p()}.bind(this),250))}.bind(this))};g.prototype={g:function(){this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl&&(this.recaptchaEl.innerHTML="")},k:function(){if(-1!==this.id)return this.counter=0,this.S(this.id),void grecaptcha.execute(this.id);setTimeout(function(){this.counter++,this.L.call(this.Form,this.counter)}.bind(this),1e3)},S:function(t){var i=window.___grecaptcha_cfg.clients[t];for(var n in i)if(i.hasOwnProperty(n)&&"[object String]"===Object.prototype.toString.call(i[n])){var e=document.querySelector("iframe[name=c-"+i[n]+"]");if(e){this.observer.observe(e.parentElement.parentElement,{attributeFilter:["style"],attributes:!0});break}}},R:function(){this.Form.form.onsubmit=null,this.g(),this._()},_:function(){this.recaptchaEl&&setTimeout(function(){if("undefined"==typeof grecaptcha||void 0===grecaptcha.render)return this._();this.id=grecaptcha.render(this.recaptchaEl,{callback:this.L.bind(this.Form,this.counter),"expired-callback":this.F.bind(this),isolated:!0},!0)}.bind(this),250)},F:function(){this.counter=0,this.is_submitting=!1,-1!==this.id&&grecaptcha.reset(this.id)},L:function(t){if(this.recaptcha.is_submitting=!0,!this.useAjax)return this.G(),void this.form.submit();this.L(t)}};var y=g,b=n(449),k=n.n(b),S=function(t,i,n){t&&i.split(" ").forEach((function(i){t.classList[n?"add":"remove"](i)}))},L=function(t){return"."+t.trim().split(" ").join(".")},R=function(t){var i='input[name="'+t.getAttribute("name")+'"]:checked';return t.validation.form.querySelectorAll(i).length},_={email:{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},max:{fn:function(t,i){return!t||("checkbox"===this.type?R(this)<=parseInt(i):parseFloat(t)<=parseFloat(i))}},maxlength:{fn:function(t,i){return!t||t.length<=parseInt(i)}},min:{fn:function(t,i){return!t||("checkbox"===this.type?R(this)>=parseInt(i):parseFloat(t)>=parseFloat(i))}},minlength:{fn:function(t,i){return!t||t.length>=parseInt(i)}},number:{fn:function(t){return!t||!isNaN(parseFloat(t))},priority:2},required:{fn:function(t){return"radio"===this.type||"checkbox"===this.type?R(this):void 0!==t&&""!==t},priority:99,halt:!0}},x=function(t){this.config=GLSR.validationconfig,this.fields=[],this.form=t,this.form.setAttribute("novalidate",""),this.strings=GLSR.validationstrings,this.validateEvent=this.T.bind(this)};x.prototype={M:["required","max","maxlength","min","minlength","pattern"],C:"input:not([type^=hidden]):not([type^=submit]), select, textarea, [data-glsr-validate]",destroy:function(){for(this.F();this.fields.length;){var t=this.fields.shift();this.A(t.input),delete t.input.validation}},init:function(){var t=this;[].forEach.call(this.form.querySelectorAll(this.C),(function(i){t.fields.find((function(t){return t.input.name===i.name}))||"none"!==i.closest(L(t.config.field)).style.display&&t.fields.push(t.D(i))}))},N:function(t){t.addEventListener(this.q(t),this.validateEvent)},I:function(t,i,n){[].forEach.call(t,function(t){var e=t.name.replace("data-","");~this.M.indexOf(e)?this.P(i,n,e,t.value):"type"===t.name&&this.P(i,n,t.value)}.bind(this))},P:function(t,i,n,e){if(_[n]&&(_[n].name=n,t.push(_[n]),e)){var s=e.split(",");s.unshift(null),i[n]=s}},T:function(t){this.H(t.currentTarget)},A:function(t){t.removeEventListener(this.q(t),this.validateEvent)},F:function(){for(var t in this.fields)if(this.fields.hasOwnProperty(t)){this.fields[t].errorElements=null;var i=this.fields[t].input.closest(L(this.config.field));S(this.fields[t].input,this.config.input_error,!1),S(this.fields[t].input,this.config.input_valid,!1),S(i,this.config.field_error,!1),S(i,this.config.field_valid,!1)}},q:function(t){return~["radio","checkbox"].indexOf(t.getAttribute("type"))||"SELECT"===t.nodeName?"change":"input"},D:function(t){var i={},n=[];return null!==t.offsetParent&&(this.I(t.attributes,n,i),this.B(n),this.N(t)),t.validation={form:this.form,input:t,params:i,validators:n}},V:function(t,i){var n=t.input.closest(L(this.config.field));if(S(t.input,this.config.input_error,i),S(t.input,this.config.input_valid,!i),n){S(n,this.config.field_error,i),S(n,this.config.field_valid,!i);var e=n.querySelector(L(this.config.field_message));e.innerHTML=i?t.errors.join("<br>"):"",e.style.display=i?"":"none"}},W:function(t,i){t.hasOwnProperty("validation")&&this.D(t),t.validation.errors=i},B:function(t){t.sort((function(t,i){return(i.priority||1)-(t.priority||1)}))},H:function(t){var i=!0,n=this.fields;for(var e in t instanceof HTMLElement&&(n=[t.validation]),n)if(n.hasOwnProperty(e)){var s=n[e];this.J(s)?this.V(s,!1):(i=!1,this.V(s,!0))}return i},J:function(t){var i=[],n=!0;for(var e in t.validators)if(t.validators.hasOwnProperty(e)){var s=t.validators[e],o=t.params[s.name]?t.params[s.name]:[];if(o[0]=t.input.value,!s.fn.apply(t.input,o)){n=!1;var r=this.strings[s.name];if(i.push(r.replace(/(\%s)/g,o[1])),!0===s.halt)break}}return t.errors=i,n}};var E=x,F=function(t,i){this.button=i,this.config=GLSR.validationconfig,this.events={submit:this.U.bind(this)},this.form=t,this.isActive=!1,this.recaptcha=new y(this),this.stars=null,this.strings=GLSR.validationstrings,this.useAjax=this.X(),this.validation=new E(t)};F.prototype={destroy:function(){this.destroyForm(),this.destroyRecaptcha(),this.destroyStarRatings(),this.isActive=!1},destroyForm:function(){this.form.removeEventListener("submit",this.events.submit),this.K(),this.validation.destroy()},destroyRecaptcha:function(){this.recaptcha.g()},destroyStarRatings:function(){this.stars&&this.stars.destroy()},init:function(){this.isActive||(this.initForm(),this.initStarRatings(),this.initRecaptcha(),this.isActive=!0)},initForm:function(){this.destroyForm(),this.form.addEventListener("submit",this.events.submit),this.validation.init()},initRecaptcha:function(){this.recaptcha.R()},initStarRatings:function(){null!==this.stars?this.stars.rebuild():this.stars=new(k())(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars)},G:function(){this.button.setAttribute("disabled","")},p:function(){this.button.removeAttribute("disabled")},Y:function(t,i){var n=!0===i;"unset"!==t.recaptcha?("reset"===t.recaptcha&&this.recaptcha.F(),n&&(this.recaptcha.F(),this.form.reset()),this.$(t.errors),this.Z(t.message,n),this.p(),GLSR.Event.trigger("site-reviews/form/handle",t,this.form),t.form=this.form,document.dispatchEvent(new CustomEvent("site-reviews/after/submission",{detail:t})),n&&""!==t.redirect&&(window.location=t.redirect)):this.recaptcha.k()},X:function(){var t=!0;return[].forEach.call(this.form.elements,(function(i){"file"===i.type&&(t=GLSR.ajax.isFileSupported()&&GLSR.ajax.isUploadSupported())})),t&&!this.form.classList.contains("no-ajax")},U:function(t){if(!this.validation.H())return t.preventDefault(),void this.Z(this.strings.errors,!1);this.K(),(this.form["g-recaptcha-response"]&&""===this.form["g-recaptcha-response"].value||this.useAjax)&&(t.preventDefault(),this.L())},K:function(){S(this.form,this.config.form_error,!1),this.Z("",null),this.validation.F()},$:function(t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=GLSR.nameprefix?GLSR.nameprefix+"["+i+"]":i,e=this.form.querySelector('[name="'+n+'"]');e&&(this.validation.W(e,t[i]),this.validation.V(e.validation,"add"))}},Z:function(t,i){var n=this.form.querySelector(L(this.config.form_message));null!==n&&(S(this.form,this.config.form_error,!1===i),S(n,this.config.form_message_failed,!1===i),S(n,this.config.form_message_success,!0===i),n.innerHTML=t)},L:function(t){GLSR.ajax.isFormDataSupported()?(this.G(),this.form[GLSR.nameprefix+"[_counter]"].value=t||0,GLSR.ajax.post(this.form,this.Y.bind(this))):this.Z(this.strings.unsupported,!1)}};var G=function(){for(;GLSR.forms.length;){(t=GLSR.forms.shift()).destroy()}var t,i,n;i=document.querySelectorAll("form.glsr-review-form");for(var e=0;e<i.length;e++)(n=i[e].querySelector("[type=submit]"))&&((t=new F(i[e],n)).init(),GLSR.forms.push(t))},T=G;function j(t){if(Array.isArray(t)){for(var i=0,n=Array(t.length);i<t.length;i++)n[i]=t[i];return n}return Array.from(t)}var O=!1;if("undefined"!=typeof window){var M={get passive(){O=!0}};window.addEventListener("testPassive",null,M),window.removeEventListener("testPassive",null,M)}var C="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),A=[],D=!1,N=-1,q=void 0,I=void 0,P=function(t){return A.some((function(i){return!(!i.options.allowTouchMove||!i.options.allowTouchMove(t))}))},H=function(t){var i=t||window.event;return!!P(i.target)||(i.touches.length>1||(i.preventDefault&&i.preventDefault(),!1))},B=function(t){if(void 0===I){var i=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;i&&n>0&&(I=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===q&&(q=document.body.style.overflow,document.body.style.overflow="hidden")},V=function(){void 0!==I&&(document.body.style.paddingRight=I,I=void 0),void 0!==q&&(document.body.style.overflow=q,q=void 0)},W=function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight},J=function(t,i){var n=t.targetTouches[0].clientY-N;return!P(t.target)&&(i&&0===i.scrollTop&&n>0||W(i)&&n<0?H(t):(t.stopPropagation(),!0))},U=function(t,i){if(t&&!A.some((function(i){return i.targetElement===t}))){var n={targetElement:t,options:i||{}};A=[].concat(j(A),[n]),C?(t.ontouchstart=function(t){1===t.targetTouches.length&&(N=t.targetTouches[0].clientY)},t.ontouchmove=function(i){1===i.targetTouches.length&&J(i,t)},D||(document.addEventListener("touchmove",H,O?{passive:!1}:void 0),D=!0)):B(i)}},X=function(){C?(A.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),D&&(document.removeEventListener("touchmove",H,O?{passive:!1}:void 0),D=!1),N=-1):V(),A=[]},K=["[contenteditable]",'[tabindex]:not([tabindex^="-"])',"a[href]","button:not([disabled]):not([aria-hidden])",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])"],Y=function(){function t(i){var n=i.closeTrigger,e=void 0===n?"data-glsr-close":n,s=i.onClose,o=void 0===s?function(){}:s,r=i.onOpen,u=void 0===r?function(){}:r,h=i.openClass,a=void 0===h?"is-open":h,c=i.openTrigger,f=void 0===c?"data-glsr-trigger":c,l=i.targetModalId,v=void 0===l?"glsr-modal":l,m=i.triggers,w=void 0===m?[]:m;d(this,t),this.modal=document.getElementById(v),this.config={openTrigger:f,closeTrigger:e,openClass:a,onOpen:u,onClose:o},this.events={mouseup:this.onClick.bind(this),keydown:this.onKeydown.bind(this),touchstart:this.onClick.bind(this)},w.length>0&&this.registerTriggers(w)}return v(t,[{key:"addEventListeners",value:function(){this.eventListener(this.modal,"add",["mouseup","touchstart"]),this.eventListener(document,"add",["keydown"])}},{key:"closeModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i&&(i.preventDefault(),i.stopPropagation()),this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),X(),this.activeElement&&this.activeElement.focus&&this.activeElement.focus();var n=function n(){t.modal.classList.remove(t.config.openClass),t.modal.removeEventListener("animationend",n,!1),t.config.onClose(t.modal,t.activeElement,i)};this.modal.addEventListener("animationend",n,!1)}},{key:"closeModalById",value:function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()}},{key:"eventListener",value:function(t,i,n){var e=this;n.forEach((function(n){return t[i+"EventListener"](n,e.events[n])}))}},{key:"getFocusableNodes",value:function(){var t=this.modal.querySelectorAll(K);return Array.prototype.slice.call(t)}},{key:"onClick",value:function(t){t.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(t)}},{key:"onKeydown",value:function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.retainFocus(t)}},{key:"openModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,i&&(i.preventDefault(),this.activeElement=i.currentTarget),this.config.onOpen(this.modal,this.activeElement,i),this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),U(this.modal.querySelector("[data-glsr-modal]")),this.addEventListeners();var n=function i(){t.modal.removeEventListener("animationend",i,!1),t.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!1)}},{key:"registerTriggers",value:function(t){var i=this;t.filter(Boolean).forEach((function(t){t.triggerModal&&t.removeEventListener("click",t.triggerModal),t.triggerModal=i.openModal.bind(i),t.addEventListener("click",t.triggerModal)}))}},{key:"removeEventListeners",value:function(){this.eventListener(this.modal,"remove",["mouseup","touchstart"]),this.eventListener(document,"remove",["keydown"])}},{key:"retainFocus",value:function(t){var i=this.getFocusableNodes();if(0!==i.length)if(i=i.filter((function(t){return null!==t.offsetParent})),this.modal.contains(document.activeElement)){var n=i.indexOf(document.activeElement);t.shiftKey&&0===n&&(i[i.length-1].focus(),t.preventDefault()),!t.shiftKey&&i.length>0&&n===i.length-1&&(i[0].focus(),t.preventDefault())}else i[0].focus()}},{key:"setFocusToFirstNode",value:function(){var t=this,i=this.getFocusableNodes();if(0!==i.length){var n=i.filter((function(i){return!i.hasAttribute(t.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&i[0].focus()}}}]),t}(),$={},z=function(t){if(t)$[t].closeModalById(t);else for(var i in $)$[i].closeModal()},Q=function(t,i){var n={};return t.forEach((function(t){var e=t.attributes[i].value;void 0===n[e]&&(n[e]=[]),n[e].push(t)})),n},Z=function(t){var i=Object.assign({},{openTrigger:"data-glsr-trigger"},t),n=Array.prototype.slice.call(document.querySelectorAll("[".concat(i.openTrigger,"]"))),e=Q(n,i.openTrigger);return Object.keys(e).forEach((function(t){i.targetModalId=t,i.triggers=e[t],$[t]=new Y(i)})),$},tt=function(t,i){var n=i||{};n.targetModalId=t,$[t]&&$[t].removeEventListeners(),$[t]=new Y(n),$[t].openModal()},it={init:Z,open:tt,close:z},nt={hideClass:"glsr-hide",linkSelector:"a.page-numbers",paginationSelector:".glsr-ajax-pagination",reviewsSelector:".glsr-reviews",scrollOffset:16,scrollTime:468},et=function(){function t(i){d(this,t),this.links=[],this.reviewsEl=i.querySelector(nt.reviewsSelector),this.wrapperEl=i,this.init()}return v(t,[{key:"init",value:function(){var t=this;this.links=this.wrapperEl.querySelectorAll("".concat(nt.paginationSelector," ").concat(nt.linkSelector)),this.links.length&&[].forEach.call(this.links,(function(i){i.dataset.ready||(i.addEventListener("click",t.onClick.bind(t,i)),i.dataset.ready=!0)}))}},{key:"onClick",value:function(t,i){var n=t.closest(nt.paginationSelector);if(n){for(var e={},s=0,o=Object.keys(n.dataset);s<o.length;s++){var r=o[s],u=n.dataset[r];try{u=JSON.parse(u)}catch(t){}e["".concat(GLSR.nameprefix,"[atts][").concat(r,"]")]=u}e["".concat(GLSR.nameprefix,"[_action]")]="fetch-paged-reviews",e["".concat(GLSR.nameprefix,"[page]")]=i.currentTarget.dataset.page||"",e["".concat(GLSR.nameprefix,"[url]")]=i.currentTarget.href||"",this.wrapperEl.classList.add(nt.hideClass),i.preventDefault(),GLSR.ajax.post(e,this.handleResponse.bind(this,i.currentTarget.href))}}},{key:"handleResponse",value:function(t,i,n){n?([].forEach.call(this.wrapperEl.querySelectorAll(nt.paginationSelector),(function(t){t.innerHTML=i.pagination})),this.reviewsEl.innerHTML=i.reviews,this.scrollToTop(),this.init(),this.wrapperEl.classList.remove(nt.hideClass),GLSR.urlparameter&&window.history.pushState(null,"",t),new p(this.reviewsEl),GLSR.Event.trigger("site-reviews/pagination/handle",i,this)):window.location=t}},{key:"scrollToTop",value:function(){var t=nt.scrollOffset;[].forEach.call(GLSR.ajaxpagination,(function(i){var n=document.querySelector(i);n&&"fixed"===window.getComputedStyle(n).getPropertyValue("position")&&(t+=n.clientHeight)}));var i=this.reviewsEl.getBoundingClientRect().top-t;i>0||this.scrollStep({endY:i,offset:window.pageYOffset,startTime:window.performance.now(),startY:this.reviewsEl.scrollTop})}},{key:"scrollStep",value:function(t){var i=Math.min(1,(window.performance.now()-t.startTime)/nt.scrollTime),n=.5*(1-Math.cos(Math.PI*i)),e=t.startY+(t.endY-t.startY)*n;window.scroll(0,t.offset+e),e!==t.endY&&window.requestAnimationFrame(this.scrollStep.bind(this,t))}}]),t}(),st=function(){[].forEach.call(document.querySelectorAll(nt.paginationSelector),(function(t){var i=t.closest(".glsr");i&&new et(i)}))},ot=function(){var t="glsr-modal__content",i="glsr-modal__review";window.GLSR.Modal.init({onClose:function(n,e,s){n.querySelector("."+t).innerHTML="",n.classList.remove(i),GLSR.Event.trigger("site-reviews/modal/close",n,e,s)},onOpen:function(n,e,s){var o=e.closest(".glsr").cloneNode(!0),r=e.closest(".glsr-review").cloneNode(!0);o.innerHTML="",o.appendChild(r),n.querySelector("."+t).appendChild(o),n.classList.add(i),GLSR.Event.trigger("site-reviews/modal/open",n,e,s)},openTrigger:"data-excerpt-trigger"})},rt=function(){[].forEach.call(document.querySelectorAll(".glsr"),(function(t){var i="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(i)})),new p,new T,st()};window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=new o,window.GLSR.forms=[],window.GLSR.Event=f,window.GLSR.Forms=T,window.GLSR.Modal=it,f.on("site-reviews/init",rt),f.on("site-reviews/excerpts/init",ot),document.addEventListener("DOMContentLoaded",(function(){f.trigger("site-reviews/init")}))},113:function(){},30:function(){},966:function(){},83:function(){},649:function(){},408:function(){},529:function(){},275:function(){},872:function(){},865:function(){},835:function(){},786:function(){},45:function(){},622:function(){},688:function(){},340:function(){},961:function(){},853:function(){},712:function(){},651:function(){},730:function(){},382:function(){},747:function(){},605:function(){},410:function(){},406:function(){},829:function(){},273:function(){},518:function(){},963:function(){},449:function(t){function i(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function n(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function e(t,i,e){return i&&n(t.prototype,i),e&&n(t,e),t}var s={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,i,n){t.classList[i?"add":"remove"](n)},r=function(t){var i=document.createElement("span");for(var n in t=t||{})i.setAttribute(n,t[n]);return i},u=function(t,i,n){var e=r(n);return t.parentNode.insertBefore(e,i?t.nextSibling:t),e},h=function t(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var s={};return n.forEach((function(i){Object.keys(i||{}).forEach((function(e){if(void 0!==n[0][e]){var o=i[e];"Object"!==a(o)||"Object"!==a(s[e])?s[e]=o:s[e]=t(s[e],o)}}))})),s},a=function(t){return{}.toString.call(t).slice(8,-1)},c=function(){function t(n,e){var s,o;i(this,t),this.direction=window.getComputedStyle(n,null).getPropertyValue("direction"),this.el=n,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=e,this.tick=null,this.ticking=!1,this.values=function(t){var i=[];return[].forEach.call(t.options,(function(t){var n=parseInt(t.value,10)||0;n>0&&i.push({index:t.index,text:t.text,value:n})})),i.sort((function(t,i){return t.value-i.value}))}(n),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),s=this.values.length,o=this.props.maxStars,/^\d+$/.test(s)&&1<=s&&s<=o?this.build():this.destroy()}return e(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,i,n=this;this.props.prebuilt?(t=this.el.parentNode,i=t.querySelector("."+this.props.classNames.base+"--stars")):((t=u(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),i=u(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,e){var s=r({"data-index":e,"data-value":t.value});"function"==typeof n.props.stars&&n.props.stars.call(n,s,t,e),[].forEach.call(s.children,(function(t){return t.style.pointerEvents="none"})),i.innerHTML+=s.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}},{key:"changeIndexTo",value:function(t,i){var n=this;if(this.indexActive!==t||i){if([].forEach.call(this.widgetEl.children,(function(i,e){o(i,e<=t,n.props.classNames.active),o(i,e===n.indexSelected,n.props.classNames.selected)})),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var e=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",e)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,i,n,e){var s=this;n.forEach((function(n){return t[i+"EventListener"](n,s.events[n],e||!1)}))}},{key:"handleEvents",value:function(t){var i=this.el.closest("form");i&&"FORM"===i.tagName&&this.eventListener(i,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(t){var i,n,e=(null===(i=t.touches)||void 0===i?void 0:i[0])||(null===(n=t.changedTouches)||void 0===n?void 0:n[0])||t,s=document.elementFromPoint(e.clientX,e.clientY);return[].slice.call(s.parentNode.children).indexOf(s)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var i=t.key.slice(5);if(~["Left","Right"].indexOf(i)){var n="Left"===i?-1:1;"rtl"===this.direction&&(n*=-1);var e=this.values.length-1,s=Math.min(Math.max(this.selected()+n,-1),e);this.selectValue(s,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i,!0)}},{key:"onPointerLeave",value:function(t){var i=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return i.changeIndexTo(i.indexSelected)}))}},{key:"onPointerMove",value:function(t){var i=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return i.changeIndexTo(i.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t;this.selectValue((null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.index)||-1,!1)}},{key:"selected",value:function(){var t=this;return this.values.findIndex((function(i){return i.value===+t.el.value}))}},{key:"selectValue",value:function(t,i){var n;this.el.value=(null===(n=this.values[t])||void 0===n?void 0:n.value)||"",this.indexSelected=this.selected(),!1===i?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}}]),t}(),f=function(){function t(n,e){i(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(n,e)}return e(t,[{key:"buildWidgets",value:function(t,i){var n=this;this.queryElements(t).forEach((function(t){var e=h(s,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!e.prebuilt&&t.parentNode.classList.contains(e.classNames.base)&&n.unwrap(t),n.widgets.push(new c(t,e)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===a(t)?[t]:"NodeList"===a(t)?[].slice.call(t):"String"===a(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var i=t.parentNode,n=i.parentNode;n.insertBefore(t,i),n.removeChild(i)}}]),t}();t.exports=f}},n={};function e(t){var s=n[t];if(void 0!==s)return s.exports;var o=n[t]={exports:{}};return i[t](o,o.exports,e),o.exports}e.m=i,t=[],e.O=function(i,n,s,o){if(!n){var r=1/0;for(a=0;a<t.length;a++){n=t[a][0],s=t[a][1],o=t[a][2];for(var u=!0,h=0;h<n.length;h++)(!1&o||r>=o)&&Object.keys(e.O).every((function(t){return e.O[t](n[h])}))?n.splice(h--,1):(u=!1,o<r&&(r=o));u&&(t.splice(a--,1),i=s())}return i}o=o||0;for(var a=t.length;a>0&&t[a-1][2]>o;a--)t[a]=t[a-1];t[a]=[n,s,o]},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,{a:i}),i},e.d=function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){var t={341:0,884:0,320:0,974:0,570:0,184:0,979:0,224:0,384:0,81:0,877:0,691:0,931:0,192:0,77:0,753:0,540:0,69:0,16:0,831:0,181:0,193:0,994:0,232:0,896:0,737:0,612:0,554:0,483:0,49:0,985:0};e.O.j=function(i){return 0===t[i]};var i=function(i,n){var s,o,r=n[0],u=n[1],h=n[2],a=0;for(s in u)e.o(u,s)&&(e.m[s]=u[s]);if(h)var c=h(e);for(i&&i(n);a<r.length;a++)o=r[a],e.o(t,o)&&t[o]&&t[o][0](),t[r[a]]=0;return e.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n))}(),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(237)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(406)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(829)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(273)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(518)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(963)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(113)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(30)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(966)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(83)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(649)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(408)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(529)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(275)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(872)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(865)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(835)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(786)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(45)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(622)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(688)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(340)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(961)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(853)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(712)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(651)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(730)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(382)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(747)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(605)}));var s=e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(410)}));s=e.O(s)}();
1
+ !function(){"use strict";var t,i={237:function(t,i,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){};s.prototype={get:function(t,i,n){this.t(i),this.xhr.open("GET",t,!0),this.xhr.responseType="text",this.i(n),this.xhr.send()},u:function(t){return"json"===this.xhr.responseType||!0===this.xhr.json?t({message:this.xhr.statusText},!1):"text"===this.xhr.responseType?t(this.xhr.statusText):void 0},h:function(t){if(0===this.xhr.status||this.xhr.status>=200&&this.xhr.status<300||304===this.xhr.status){if("json"===this.xhr.responseType)return t(this.xhr.response.data,this.xhr.response.success);if("text"===this.xhr.responseType)return t(this.xhr.responseText);if(!0===this.xhr.json){var i=JSON.parse(this.xhr.response);return t(i.data,i.success)}}else this.u(t)},isFileSupported:function(){var t=document.createElement("INPUT");return t.type="file","files"in t},isFormDataSupported:function(){return!!window.FormData},isUploadSupported:function(){var t=new XMLHttpRequest;return!!(t&&"upload"in t&&"onprogress"in t.upload)},post:function(t,i,n){this.t(i),this.xhr.open("POST",GLSR.ajaxurl,!0),this.xhr.responseType="json",this.xhr.json=!0,this.i(n),this.xhr.send(this.l(t))},t:function(t){this.xhr=new XMLHttpRequest,this.xhr.onload=this.h.bind(this,t),this.xhr.onerror=this.u.bind(this,t)},v:function(t,i,n){return"object"!==e(i)||i instanceof Date||i instanceof File?t.append(n,i||""):Object.keys(i).forEach(function(e){i.hasOwnProperty(e)&&(t=this.v(t,i[e],n?n[e]:e))}.bind(this)),t},l:function(t){var i=new FormData,n=Object.prototype.toString.call(t);return"[object FormData]"===n&&(i=t),"[object HTMLFormElement]"===n&&(i=new FormData(t)),"[object Object]"===n&&Object.keys(t).forEach((function(n){i.append(n,t[n])})),i.append("action",GLSR.action),i.append("_ajax_request",!0),i},i:function(t){for(var i in(t=t||{})["X-Requested-With"]="XMLHttpRequest",t)t.hasOwnProperty(i)&&this.xhr.setRequestHeader(i,t[i])}};var o=s,r={},u=function(t,i){var n=r[t]||[],e=[];i&&[].forEach.call(n,(function(t){i!==t.fn&&i!==t.fn.once&&e.push(t)})),e.length?r[t]=e:delete r[t]},h=function(t,i,n){(r[t]||(r[t]=[])).push({fn:i,context:n})},a=function(t,i,n){var e=arguments,s=function s(){u(t,s),i.apply(n,e)};s.once=i,h(t,s,n)},c=function(t){var i=[].slice.call(arguments,1),n=(r[t]||[]).slice();[].forEach.call(n,(function(t){return t.fn.apply(t.context,i)}))},f={events:r,trigger:c,off:u,on:h,once:a};function d(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function l(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function v(t,i,n){return i&&l(t.prototype,i),n&&l(t,n),t}var m={hiddenClass:"glsr-hidden",hiddenTextSelector:".glsr-hidden-text",readMoreClass:"glsr-read-more",visibleClass:"glsr-visible"},w=function(){function t(i){var n=this;d(this,t);var e=(i||document).querySelectorAll(m.hiddenTextSelector);[].forEach.call(e,(function(t){return n.init(t)})),GLSR.Event.trigger("site-reviews/excerpts/init",i)}return v(t,[{key:"init",value:function(t){if(!t.parentNode.querySelector("."+m.readMoreClass)){var i=t.dataset.trigger,n=document.createElement("span"),e=document.createElement("a");e.setAttribute("href","#"),e.innerHTML=t.dataset.showMore,"excerpt"===i&&(e.addEventListener("click",this.onClick.bind(this)),e.setAttribute("data-text",t.dataset.showLess)),"modal"===i&&e.setAttribute("data-excerpt-trigger","glsr-modal"),n.setAttribute("class",m.readMoreClass),n.appendChild(e),t.parentNode.insertBefore(n,t.nextSibling)}}},{key:"onClick",value:function(t){t.preventDefault();var i=t.currentTarget,n=i.parentNode.previousSibling,e=i.dataset.text;n.classList.toggle(m.hiddenClass),n.classList.toggle(m.visibleClass),i.dataset.text=i.innerText,i.innerText=e}}]),t}(),p=w,y=function(t){this.Form=t,this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl=t.form.querySelector(".glsr-recaptcha-holder"),this.observer=new MutationObserver(function(t){var i=t.pop();i.target&&"visible"!==i.target.style.visibility&&(this.observer.disconnect(),setTimeout(function(){this.is_submitting||this.Form.p()}.bind(this),250))}.bind(this))};y.prototype={g:function(){this.counter=0,this.id=-1,this.is_submitting=!1,this.recaptchaEl&&(this.recaptchaEl.innerHTML="")},k:function(){if(-1!==this.id)return this.counter=0,this.S(this.id),void grecaptcha.execute(this.id);setTimeout(function(){this.counter++,this.L.call(this.Form,this.counter)}.bind(this),1e3)},S:function(t){var i=window.___grecaptcha_cfg.clients[t];for(var n in i)if(i.hasOwnProperty(n)&&"[object String]"===Object.prototype.toString.call(i[n])){var e=document.querySelector("iframe[name=c-"+i[n]+"]");if(e){this.observer.observe(e.parentElement.parentElement,{attributeFilter:["style"],attributes:!0});break}}},R:function(){this.Form.form.onsubmit=null,this.g(),this._()},_:function(){this.recaptchaEl&&setTimeout(function(){if("undefined"==typeof grecaptcha||void 0===grecaptcha.render)return this._();this.id=grecaptcha.render(this.recaptchaEl,{callback:this.L.bind(this.Form,this.counter),"expired-callback":this.F.bind(this),isolated:!0},!0)}.bind(this),250)},F:function(){this.counter=0,this.is_submitting=!1,-1!==this.id&&grecaptcha.reset(this.id)},L:function(t){if(this.recaptcha.is_submitting=!0,!this.useAjax)return this.G(),void this.form.submit();this.L(t)}};var g=y,b=n(449),k=n.n(b),S=function(t,i,n){t&&i.split(" ").forEach((function(i){t.classList[n?"add":"remove"](i)}))},L=function(t){return"."+t.trim().split(" ").join(".")},R=function(t){var i='input[name="'+t.getAttribute("name")+'"]:checked';return t.validation.form.querySelectorAll(i).length},_={email:{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},max:{fn:function(t,i){return!t||("checkbox"===this.type?R(this)<=parseInt(i):parseFloat(t)<=parseFloat(i))}},maxlength:{fn:function(t,i){return!t||t.length<=parseInt(i)}},min:{fn:function(t,i){return!t||("checkbox"===this.type?R(this)>=parseInt(i):parseFloat(t)>=parseFloat(i))}},minlength:{fn:function(t,i){return!t||t.length>=parseInt(i)}},number:{fn:function(t){return!t||!isNaN(parseFloat(t))},priority:2},required:{fn:function(t){return"radio"===this.type||"checkbox"===this.type?R(this):void 0!==t&&""!==t},priority:99,halt:!0}},x=function(t){this.config=GLSR.validationconfig,this.fields=[],this.form=t,this.form.setAttribute("novalidate",""),this.strings=GLSR.validationstrings,this.validateEvent=this.T.bind(this)};x.prototype={M:["required","max","maxlength","min","minlength","pattern"],C:"input:not([type^=hidden]):not([type^=submit]), select, textarea, [data-glsr-validate]",destroy:function(){for(this.F();this.fields.length;){var t=this.fields.shift();this.A(t.input),delete t.input.validation}},init:function(){var t=this;[].forEach.call(this.form.querySelectorAll(this.C),(function(i){t.fields.find((function(t){return t.input.name===i.name}))||"none"!==i.closest(L(t.config.field)).style.display&&t.fields.push(t.D(i))}))},I:function(t){t.addEventListener(this.N(t),this.validateEvent)},q:function(t,i,n){[].forEach.call(t,function(t){var e=t.name.replace("data-","");~this.M.indexOf(e)?this.P(i,n,e,t.value):"type"===t.name&&this.P(i,n,t.value)}.bind(this))},P:function(t,i,n,e){if(_[n]&&(_[n].name=n,t.push(_[n]),e)){var s=e.split(",");s.unshift(null),i[n]=s}},T:function(t){this.H(t.currentTarget)},A:function(t){t.removeEventListener(this.N(t),this.validateEvent)},F:function(){for(var t in this.fields)if(this.fields.hasOwnProperty(t)){this.fields[t].errorElements=null;var i=this.fields[t].input.closest(L(this.config.field));S(this.fields[t].input,this.config.input_error,!1),S(this.fields[t].input,this.config.input_valid,!1),S(i,this.config.field_error,!1),S(i,this.config.field_valid,!1)}},N:function(t){return~["radio","checkbox"].indexOf(t.getAttribute("type"))||"SELECT"===t.nodeName?"change":"input"},D:function(t){var i={},n=[];return null!==t.offsetParent&&(this.q(t.attributes,n,i),this.B(n),this.I(t)),t.validation={form:this.form,input:t,params:i,validators:n}},V:function(t,i){var n=t.input.closest(L(this.config.field));if(S(t.input,this.config.input_error,i),S(t.input,this.config.input_valid,!i),n){S(n,this.config.field_error,i),S(n,this.config.field_valid,!i);var e=n.querySelector(L(this.config.field_message));e.innerHTML=i?t.errors.join("<br>"):"",e.style.display=i?"":"none"}},W:function(t,i){t.hasOwnProperty("validation")&&this.D(t),t.validation.errors=i},B:function(t){t.sort((function(t,i){return(i.priority||1)-(t.priority||1)}))},H:function(t){var i=!0,n=this.fields;for(var e in t instanceof HTMLElement&&(n=[t.validation]),n)if(n.hasOwnProperty(e)){var s=n[e];this.J(s)?this.V(s,!1):(i=!1,this.V(s,!0))}return i},J:function(t){var i=[],n=!0;for(var e in t.validators)if(t.validators.hasOwnProperty(e)){var s=t.validators[e],o=t.params[s.name]?t.params[s.name]:[];if(o[0]=t.input.value,!s.fn.apply(t.input,o)){n=!1;var r=this.strings[s.name];if(i.push(r.replace(/(\%s)/g,o[1])),!0===s.halt)break}}return t.errors=i,n}};var E=x,F=function(t,i){this.button=i,this.config=GLSR.validationconfig,this.events={submit:this.U.bind(this)},this.form=t,this.isActive=!1,this.recaptcha=new g(this),this.stars=null,this.strings=GLSR.validationstrings,this.useAjax=this.X(),this.validation=new E(t)};F.prototype={destroy:function(){this.destroyForm(),this.destroyRecaptcha(),this.destroyStarRatings(),this.isActive=!1},destroyForm:function(){this.form.removeEventListener("submit",this.events.submit),this.K(),this.validation.destroy()},destroyRecaptcha:function(){this.recaptcha.g()},destroyStarRatings:function(){this.stars&&this.stars.destroy()},init:function(){this.isActive||(this.initForm(),this.initStarRatings(),this.initRecaptcha(),this.isActive=!0)},initForm:function(){this.destroyForm(),this.form.addEventListener("submit",this.events.submit),this.validation.init()},initRecaptcha:function(){this.recaptcha.R()},initStarRatings:function(){null!==this.stars?this.stars.rebuild():this.stars=new(k())(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars)},G:function(){this.button.setAttribute("disabled","")},p:function(){this.button.removeAttribute("disabled")},Y:function(t,i){var n=!0===i;"unset"!==t.recaptcha?("reset"===t.recaptcha&&this.recaptcha.F(),n&&(this.recaptcha.F(),this.form.reset()),this.$(t.errors),this.Z(t.message,n),this.p(),GLSR.Event.trigger("site-reviews/form/handle",t,this.form),t.form=this.form,document.dispatchEvent(new CustomEvent("site-reviews/after/submission",{detail:t})),n&&""!==t.redirect&&(window.location=t.redirect)):this.recaptcha.k()},X:function(){var t=!0;return[].forEach.call(this.form.elements,(function(i){"file"===i.type&&(t=GLSR.ajax.isFileSupported()&&GLSR.ajax.isUploadSupported())})),t&&!this.form.classList.contains("no-ajax")},U:function(t){if(!this.validation.H())return t.preventDefault(),void this.Z(this.strings.errors,!1);this.K(),(this.form["g-recaptcha-response"]&&""===this.form["g-recaptcha-response"].value||this.useAjax)&&(t.preventDefault(),this.L())},K:function(){S(this.form,this.config.form_error,!1),this.Z("",null),this.validation.F()},$:function(t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=GLSR.nameprefix?GLSR.nameprefix+"["+i+"]":i,e=this.form.querySelector('[name="'+n+'"]');e&&(this.validation.W(e,t[i]),this.validation.V(e.validation,"add"))}},Z:function(t,i){var n=this.form.querySelector(L(this.config.form_message));null!==n&&(S(this.form,this.config.form_error,!1===i),S(n,this.config.form_message_failed,!1===i),S(n,this.config.form_message_success,!0===i),n.innerHTML=t)},L:function(t){GLSR.ajax.isFormDataSupported()?(this.G(),this.form[GLSR.nameprefix+"[_counter]"].value=t||0,GLSR.ajax.post(this.form,this.Y.bind(this))):this.Z(this.strings.unsupported,!1)}};var G=function(){for(;GLSR.forms.length;){(t=GLSR.forms.shift()).destroy()}var t,i,n;i=document.querySelectorAll("form.glsr-review-form");for(var e=0;e<i.length;e++)(n=i[e].querySelector("[type=submit]"))&&((t=new F(i[e],n)).init(),GLSR.forms.push(t))},T=G;function j(t){if(Array.isArray(t)){for(var i=0,n=Array(t.length);i<t.length;i++)n[i]=t[i];return n}return Array.from(t)}var O=!1;if("undefined"!=typeof window){var M={get passive(){O=!0}};window.addEventListener("testPassive",null,M),window.removeEventListener("testPassive",null,M)}var C="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),A=[],D=!1,I=-1,N=void 0,q=void 0,P=function(t){return A.some((function(i){return!(!i.options.allowTouchMove||!i.options.allowTouchMove(t))}))},H=function(t){var i=t||window.event;return!!P(i.target)||(i.touches.length>1||(i.preventDefault&&i.preventDefault(),!1))},B=function(t){if(void 0===q){var i=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;i&&n>0&&(q=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===N&&(N=document.body.style.overflow,document.body.style.overflow="hidden")},V=function(){void 0!==q&&(document.body.style.paddingRight=q,q=void 0),void 0!==N&&(document.body.style.overflow=N,N=void 0)},W=function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight},J=function(t,i){var n=t.targetTouches[0].clientY-I;return!P(t.target)&&(i&&0===i.scrollTop&&n>0||W(i)&&n<0?H(t):(t.stopPropagation(),!0))},U=function(t,i){if(t&&!A.some((function(i){return i.targetElement===t}))){var n={targetElement:t,options:i||{}};A=[].concat(j(A),[n]),C?(t.ontouchstart=function(t){1===t.targetTouches.length&&(I=t.targetTouches[0].clientY)},t.ontouchmove=function(i){1===i.targetTouches.length&&J(i,t)},D||(document.addEventListener("touchmove",H,O?{passive:!1}:void 0),D=!0)):B(i)}},X=function(){C?(A.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),D&&(document.removeEventListener("touchmove",H,O?{passive:!1}:void 0),D=!1),I=-1):V(),A=[]},K=["[contenteditable]",'[tabindex]:not([tabindex^="-"])',"a[href]","button:not([disabled]):not([aria-hidden])",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])"],Y=function(){function t(i){var n=i.closeTrigger,e=void 0===n?"data-glsr-close":n,s=i.onClose,o=void 0===s?function(){}:s,r=i.onOpen,u=void 0===r?function(){}:r,h=i.openClass,a=void 0===h?"is-open":h,c=i.openTrigger,f=void 0===c?"data-glsr-trigger":c,l=i.targetModalId,v=void 0===l?"glsr-modal":l,m=i.triggers,w=void 0===m?[]:m;d(this,t),this.modal=document.getElementById(v),this.config={openTrigger:f,closeTrigger:e,openClass:a,onOpen:u,onClose:o},this.events={mouseup:this.onClick.bind(this),keydown:this.onKeydown.bind(this),touchstart:this.onClick.bind(this)},w.length>0&&this.registerTriggers(w)}return v(t,[{key:"addEventListeners",value:function(){this.eventListener(this.modal,"add",["mouseup","touchstart"]),this.eventListener(document,"add",["keydown"])}},{key:"closeModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i&&(i.preventDefault(),i.stopPropagation()),this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),X(),this.activeElement&&this.activeElement.focus&&this.activeElement.focus();var n=function n(){t.modal.classList.remove(t.config.openClass),t.modal.removeEventListener("animationend",n,!1),t.config.onClose(t.modal,t.activeElement,i)};this.modal.addEventListener("animationend",n,!1)}},{key:"closeModalById",value:function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()}},{key:"eventListener",value:function(t,i,n){var e=this;n.forEach((function(n){return t[i+"EventListener"](n,e.events[n])}))}},{key:"getFocusableNodes",value:function(){var t=this.modal.querySelectorAll(K);return Array.prototype.slice.call(t)}},{key:"onClick",value:function(t){t.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(t)}},{key:"onKeydown",value:function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.retainFocus(t)}},{key:"openModal",value:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,i&&(i.preventDefault(),this.activeElement=i.currentTarget),this.config.onOpen(this.modal,this.activeElement,i),this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),U(this.modal.querySelector("[data-glsr-modal]")),this.addEventListeners();var n=function i(){t.modal.removeEventListener("animationend",i,!1),t.setFocusToFirstNode()};this.modal.addEventListener("animationend",n,!1)}},{key:"registerTriggers",value:function(t){var i=this;t.filter(Boolean).forEach((function(t){t.triggerModal&&t.removeEventListener("click",t.triggerModal),t.triggerModal=i.openModal.bind(i),t.addEventListener("click",t.triggerModal)}))}},{key:"removeEventListeners",value:function(){this.eventListener(this.modal,"remove",["mouseup","touchstart"]),this.eventListener(document,"remove",["keydown"])}},{key:"retainFocus",value:function(t){var i=this.getFocusableNodes();if(0!==i.length)if(i=i.filter((function(t){return null!==t.offsetParent})),this.modal.contains(document.activeElement)){var n=i.indexOf(document.activeElement);t.shiftKey&&0===n&&(i[i.length-1].focus(),t.preventDefault()),!t.shiftKey&&i.length>0&&n===i.length-1&&(i[0].focus(),t.preventDefault())}else i[0].focus()}},{key:"setFocusToFirstNode",value:function(){var t=this,i=this.getFocusableNodes();if(0!==i.length){var n=i.filter((function(i){return!i.hasAttribute(t.config.closeTrigger)}));n.length>0&&n[0].focus(),0===n.length&&i[0].focus()}}}]),t}(),$={},z=function(t){if(t)$[t].closeModalById(t);else for(var i in $)$[i].closeModal()},Q=function(t,i){var n={};return t.forEach((function(t){var e=t.attributes[i].value;void 0===n[e]&&(n[e]=[]),n[e].push(t)})),n},Z=function(t){var i=Object.assign({},{openTrigger:"data-glsr-trigger"},t),n=Array.prototype.slice.call(document.querySelectorAll("[".concat(i.openTrigger,"]"))),e=Q(n,i.openTrigger);return Object.keys(e).forEach((function(t){i.targetModalId=t,i.triggers=e[t],$[t]=new Y(i)})),$},tt=function(t,i){var n=i||{};n.targetModalId=t,$[t]&&$[t].removeEventListeners(),$[t]=new Y(n),$[t].openModal()},it={init:Z,open:tt,close:z},nt={hideClass:"glsr-hide",linkSelector:"a.page-numbers",paginationSelector:".glsr-ajax-pagination",reviewsSelector:".glsr-reviews",scrollOffset:16,scrollTime:468},et=function(){function t(i){d(this,t),this.links=[],this.reviewsEl=i.querySelector(nt.reviewsSelector),this.wrapperEl=i,this.init()}return v(t,[{key:"init",value:function(){var t=this;this.links=this.wrapperEl.querySelectorAll("".concat(nt.paginationSelector," ").concat(nt.linkSelector)),this.links.length&&[].forEach.call(this.links,(function(i){i.dataset.ready||(i.addEventListener("click",t.onClick.bind(t,i)),i.dataset.ready=!0)}))}},{key:"onClick",value:function(t,i){var n=t.closest(nt.paginationSelector);if(n){for(var e={},s=0,o=Object.keys(n.dataset);s<o.length;s++){var r=o[s],u=n.dataset[r];try{u=JSON.parse(u)}catch(t){}e["".concat(GLSR.nameprefix,"[atts][").concat(r,"]")]=u}e["".concat(GLSR.nameprefix,"[_action]")]="fetch-paged-reviews",e["".concat(GLSR.nameprefix,"[page]")]=i.currentTarget.dataset.page||"",e["".concat(GLSR.nameprefix,"[url]")]=i.currentTarget.href||"",this.wrapperEl.classList.add(nt.hideClass),i.preventDefault(),GLSR.ajax.post(e,this.handleResponse.bind(this,i.currentTarget.href))}}},{key:"handleResponse",value:function(t,i,n){n?([].forEach.call(this.wrapperEl.querySelectorAll(nt.paginationSelector),(function(t){t.innerHTML=i.pagination})),this.reviewsEl.innerHTML=i.reviews,this.scrollToTop(),this.init(),this.wrapperEl.classList.remove(nt.hideClass),GLSR.urlparameter&&window.history.pushState(null,"",t),new p(this.reviewsEl),GLSR.Event.trigger("site-reviews/pagination/handle",i,this)):window.location=t}},{key:"scrollToTop",value:function(){var t=nt.scrollOffset;[].forEach.call(GLSR.ajaxpagination,(function(i){var n=document.querySelector(i);n&&"fixed"===window.getComputedStyle(n).getPropertyValue("position")&&(t+=n.clientHeight)}));var i=this.reviewsEl.getBoundingClientRect().top-t;i>0||this.scrollStep({endY:i,offset:window.pageYOffset,startTime:window.performance.now(),startY:this.reviewsEl.scrollTop})}},{key:"scrollStep",value:function(t){var i=Math.min(1,(window.performance.now()-t.startTime)/nt.scrollTime),n=.5*(1-Math.cos(Math.PI*i)),e=t.startY+(t.endY-t.startY)*n;window.scroll(0,t.offset+e),e!==t.endY&&window.requestAnimationFrame(this.scrollStep.bind(this,t))}}]),t}(),st=function(){[].forEach.call(document.querySelectorAll(nt.paginationSelector),(function(t){var i=t.closest(".glsr");i&&new et(i)}))},ot=function(){var t="glsr-modal__content",i="glsr-modal__review";window.GLSR.Modal.init({onClose:function(n,e,s){n.querySelector("."+t).innerHTML="",n.classList.remove(i),GLSR.Event.trigger("site-reviews/modal/close",n,e,s)},onOpen:function(n,e,s){var o=e.closest(".glsr").cloneNode(!0),r=e.closest(".glsr-review").cloneNode(!0);o.innerHTML="",o.appendChild(r),n.querySelector("."+t).appendChild(o),n.classList.add(i),GLSR.Event.trigger("site-reviews/modal/open",n,e,s)},openTrigger:"data-excerpt-trigger"})},rt=function(){[].forEach.call(document.querySelectorAll(".glsr"),(function(t){var i="glsr-"+window.getComputedStyle(t,null).getPropertyValue("direction");t.classList.add(i)})),new p,new T,st()};window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=new o,window.GLSR.forms=[],window.GLSR.Event=f,window.GLSR.Forms=T,window.GLSR.Modal=it,f.on("site-reviews/init",rt),f.on("site-reviews/excerpts/init",ot),document.addEventListener("DOMContentLoaded",(function(){f.trigger("site-reviews/init")}))},113:function(){},30:function(){},966:function(){},83:function(){},649:function(){},408:function(){},529:function(){},275:function(){},872:function(){},865:function(){},835:function(){},786:function(){},45:function(){},622:function(){},688:function(){},340:function(){},961:function(){},853:function(){},712:function(){},651:function(){},730:function(){},382:function(){},747:function(){},605:function(){},410:function(){},406:function(){},829:function(){},273:function(){},518:function(){},963:function(){},449:function(t){function i(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function n(t,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function e(t,i,e){return i&&n(t.prototype,i),e&&n(t,e),t}var s={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},o=function(t,i,n){t.classList[i?"add":"remove"](n)},r=function(t){var i=document.createElement("span");for(var n in t=t||{})i.setAttribute(n,t[n]);return i},u=function(t,i,n){var e=r(n);return t.parentNode.insertBefore(e,i?t.nextSibling:t),e},h=function t(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var s={};return n.forEach((function(i){Object.keys(i||{}).forEach((function(e){if(void 0!==n[0][e]){var o=i[e];"Object"!==a(o)||"Object"!==a(s[e])?s[e]=o:s[e]=t(s[e],o)}}))})),s},a=function(t){return{}.toString.call(t).slice(8,-1)},c=function(){function t(n,e){var s,o;i(this,t),this.direction=window.getComputedStyle(n,null).getPropertyValue("direction"),this.el=n,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=e,this.tick=null,this.ticking=!1,this.values=function(t){var i=[];return[].forEach.call(t.options,(function(t){var n=parseInt(t.value,10)||0;n>0&&i.push({index:t.index,text:t.text,value:n})})),i.sort((function(t,i){return t.value-i.value}))}(n),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),s=this.values.length,o=this.props.maxStars,/^\d+$/.test(s)&&1<=s&&s<=o?this.build():this.destroy()}return e(t,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var t,i,n=this;this.props.prebuilt?(t=this.el.parentNode,i=t.querySelector("."+this.props.classNames.base+"--stars")):((t=u(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),i=u(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach((function(t,e){var s=r({"data-index":e,"data-value":t.value});"function"==typeof n.props.stars&&n.props.stars.call(n,s,t,e),[].forEach.call(s.children,(function(t){return t.style.pointerEvents="none"})),i.innerHTML+=s.outerHTML}))),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}},{key:"changeIndexTo",value:function(t,i){var n=this;if(this.indexActive!==t||i){if([].forEach.call(this.widgetEl.children,(function(i,e){o(i,e<=t,n.props.classNames.active),o(i,e===n.indexSelected,n.props.classNames.selected)})),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(t+1))),this.props.tooltip){var e=t<0?this.props.tooltip:this.values[t].text;this.widgetEl.setAttribute("aria-label",e)}this.indexActive=t}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var t=this.el.parentNode;t.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=t.querySelector("."+this.props.classNames.base+"--stars"),t.classList.remove(this.props.classNames.base+"--"+this.direction),delete t.dataset.starRating):t.parentNode.replaceChild(this.el,t),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(t,i,n,e){var s=this;n.forEach((function(n){return t[i+"EventListener"](n,s.events[n],e||!1)}))}},{key:"handleEvents",value:function(t){var i=this.el.closest("form");i&&"FORM"===i.tagName&&this.eventListener(i,t,["reset"]),this.eventListener(this.el,t,["change"]),"add"===t&&this.el.disabled||(this.eventListener(this.el,t,["keydown"]),this.eventListener(this.widgetEl,t,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(t){var i,n,e=(null===(i=t.touches)||void 0===i?void 0:i[0])||(null===(n=t.changedTouches)||void 0===n?void 0:n[0])||t,s=document.elementFromPoint(e.clientX,e.clientY);return[].slice.call(s.parentNode.children).indexOf(s)}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(t){var i=t.key.slice(5);if(~["Left","Right"].indexOf(i)){var n="Left"===i?-1:1;"rtl"===this.direction&&(n*=-1);var e=this.values.length-1,s=Math.min(Math.max(this.selected()+n,-1),e);this.selectValue(s,!0)}}},{key:"onPointerDown",value:function(t){t.preventDefault();var i=this.indexFromEvent(t);this.props.clearable&&i===this.indexSelected&&(i=-1),this.selectValue(i,!0)}},{key:"onPointerLeave",value:function(t){var i=this;t.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame((function(){return i.changeIndexTo(i.indexSelected)}))}},{key:"onPointerMove",value:function(t){var i=this;t.preventDefault(),this.ticking||(this.tick=requestAnimationFrame((function(){return i.changeIndexTo(i.indexFromEvent(t))})),this.ticking=!0)}},{key:"onReset",value:function(){var t,i=this.valueIndex(null===(t=this.el.querySelector("[selected]"))||void 0===t?void 0:t.value);this.selectValue(i||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(t,i){var n;this.el.value=(null===(n=this.values[t])||void 0===n?void 0:n.value)||"",this.indexSelected=this.selected(),!1===i?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(t){return this.values.findIndex((function(i){return i.value===+t}))}}]),t}(),f=function(){function t(n,e){i(this,t),this.destroy=this.destroy.bind(this),this.rebuild=this.rebuild.bind(this),this.widgets=[],this.buildWidgets(n,e)}return e(t,[{key:"buildWidgets",value:function(t,i){var n=this;this.queryElements(t).forEach((function(t){var e=h(s,i,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!e.prebuilt&&t.parentNode.classList.contains(e.classNames.base)&&n.unwrap(t),n.widgets.push(new c(t,e)))}))}},{key:"destroy",value:function(){this.widgets.forEach((function(t){return t.destroy()}))}},{key:"queryElements",value:function(t){return"HTMLSelectElement"===a(t)?[t]:"NodeList"===a(t)?[].slice.call(t):"String"===a(t)?[].slice.call(document.querySelectorAll(t)):[]}},{key:"rebuild",value:function(){this.widgets.forEach((function(t){return t.build()}))}},{key:"unwrap",value:function(t){var i=t.parentNode,n=i.parentNode;n.insertBefore(t,i),n.removeChild(i)}}]),t}();t.exports=f}},n={};function e(t){var s=n[t];if(void 0!==s)return s.exports;var o=n[t]={exports:{}};return i[t](o,o.exports,e),o.exports}e.m=i,t=[],e.O=function(i,n,s,o){if(!n){var r=1/0;for(a=0;a<t.length;a++){n=t[a][0],s=t[a][1],o=t[a][2];for(var u=!0,h=0;h<n.length;h++)(!1&o||r>=o)&&Object.keys(e.O).every((function(t){return e.O[t](n[h])}))?n.splice(h--,1):(u=!1,o<r&&(r=o));u&&(t.splice(a--,1),i=s())}return i}o=o||0;for(var a=t.length;a>0&&t[a-1][2]>o;a--)t[a]=t[a-1];t[a]=[n,s,o]},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,{a:i}),i},e.d=function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},function(){var t={341:0,884:0,320:0,974:0,570:0,184:0,979:0,224:0,384:0,81:0,877:0,691:0,931:0,192:0,77:0,753:0,540:0,69:0,16:0,831:0,181:0,193:0,994:0,232:0,896:0,737:0,612:0,554:0,483:0,49:0,985:0};e.O.j=function(i){return 0===t[i]};var i=function(i,n){var s,o,r=n[0],u=n[1],h=n[2],a=0;for(s in u)e.o(u,s)&&(e.m[s]=u[s]);if(h)var c=h(e);for(i&&i(n);a<r.length;a++)o=r[a],e.o(t,o)&&t[o]&&t[o][0](),t[r[a]]=0;return e.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n))}(),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(237)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(406)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(829)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(273)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(518)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(963)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(113)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(30)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(966)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(83)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(649)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(408)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(529)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(275)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(872)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(865)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(835)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(786)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(45)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(622)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(688)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(340)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(961)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(853)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(712)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(651)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(730)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(382)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(747)})),e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(605)}));var s=e.O(void 0,[884,320,974,570,184,979,224,384,81,877,691,931,192,77,753,540,69,16,831,181,193,994,232,896,737,612,554,483,49,985],(function(){return e(410)}));s=e.O(s)}();
assets/styles/admin/admin.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.glsr-addons{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));width:100%}@media only screen and (min-width:783px){.glsr-addons{gap:20px;margin:12px 0}}.glsr-addon{border:1px solid #ccd0d4;box-shadow:0 1px 1px -1px rgba(0,0,0,.1);display:flex;flex-direction:column;position:relative}.glsr-addon-description{background-color:#fff;padding:20px;flex:auto}.glsr-addon-description p{margin:0}.glsr-addon-name{font-size:15px;margin-top:0;text-overflow:ellipsis;white-space:nowrap}.glsr-addon-footer{height:48px;background:hsla(0,0%,100%,.65);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-sizing:border-box;padding:15px;margin:0;overflow:hidden}@media screen and (max-width:782px){.glsr-addon-footer{height:58px}}.glsr-addon-screenshot{display:block;background-position:50% 50%;background-repeat:no-repeat;background-size:cover;border-bottom:1px solid #ccd0d4;padding-top:66.67%;margin:-1px}@media screen and (min-width:514px){.glsr-addon-screenshot{padding-top:100%}}.glsr-addon-screenshot[data-slug=filters]{background-color:#319796;background-image:url(../../images/addon-filters.svg)}.glsr-addon-screenshot[data-slug=forms]{background-color:#617c8b;background-image:url(../../images/addon-forms.svg)}.glsr-addon-screenshot[data-slug=images]{background-color:#6b46c1;background-image:url(../../images/addon-images.svg)}.glsr-addon-screenshot[data-slug=premium]{background-color:#1a2349;background-image:url(../../images/addon-premium.svg)}.glsr-addon-screenshot[data-slug=themes]{background-color:#00acc1;background-image:url(../../images/addon-themes.svg)}.glsr-addon-screenshot[data-slug=trustalyze]{background-color:#4282d6;background-image:url(../../images/addon-trustalyze.svg)}.glsr-addon-screenshot[data-slug=woocommerce]{background-color:#7f54b3;background-image:url(../../images/addon-woocommerce.svg)}.glsr-addon-link{position:absolute;right:15px;bottom:10px}@media screen and (max-width:782px){.glsr-addon-link{bottom:6px}}.glsr-addon-link.glsr-external:after{content:" ";font-family:dashicons;line-height:1.2;vertical-align:text-bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@-webkit-keyframes glsr-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes glsr-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.wp-admin .glsr-button{position:relative;white-space:nowrap;display:inline-flex;align-items:center}.wp-admin .glsr-button[disabled]{box-shadow:inset 0 0 0 1px #8f98a1;color:#6c7781}.wp-admin .glsr-button[disabled] span{font-size:0;visibility:hidden}.wp-admin .glsr-button.is-small[disabled] span{height:22px}.wp-admin .glsr-button[disabled] span:after{content:attr(data-loading);font-size:13px;visibility:visible}.wp-admin .glsr-button.is-small[disabled] span:after{font-size:11px}.wp-admin .glsr-button:not([disabled]) span[data-alt-text].alt{visibility:hidden;font-size:0}.wp-admin .glsr-button:not([disabled]) span[data-alt-text].alt:after{visibility:visible;content:attr(data-alt-text);font-size:13px}.wp-admin .glsr-button.is-small:not([disabled]) span[data-alt-text].alt:after{font-size:11px}#dashboard_right_now li>span.glsr-review-count:before,#dashboard_right_now li a.glsr-review-count:before{content:"";top:-2px}.post-type-site-review #titlediv #title{margin-bottom:20px}.post-type-site-review #contentdiv textarea,.post-type-site-review .wp-editor-area{display:block;width:100%;height:320px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:16px;line-height:1.5;padding:10px;resize:vertical;-webkit-font-smoothing:antialiased!important;overflow-wrap:break-word}.post-type-site-review .misc-pub-pinned:before{display:inline-block;position:relative;content:"";font:normal 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;top:0;left:-1px;color:#82878c;padding:0 2px 0 0}.post-type-site-review .misc-pub-pinned .pinned-status-text{font-weight:600}.post-type-site-review .misc-pub-pinned .pinned-status-select{margin-top:3px}.wp-admin .glsr-response{display:block;height:6em;width:100%;margin:12px 0 0}.glsr-mce{position:relative;display:inline-block;margin-right:1px}.glsr-mce-menu.mce-menu{display:none;position:absolute;top:100%;left:0;min-width:100%;background:#fff;padding:5px 0;margin:-2px 0 0}.glsr-mce-menu-item.mce-menu-item{cursor:pointer;font-size:14px;white-space:nowrap;padding:6px 12px;margin-bottom:2px}.mce-glsr-mce-popup a{text-decoration:underline}.mce-glsr-mce-popup p{margin-bottom:1em}.mce-glsr-mce-popup p.strong{font-weight:600}.mce-glsr-mce-popup p.no-margin{margin-bottom:0}.mce-glsr-mce-popup p.margin-top{margin-top:1em}.mce-glsr-btn.mce-btn button{box-sizing:border-box;padding:0 8px}.wp-media-buttons button.glsr-mce-button{outline:none;padding-left:5px;margin-right:0}button.glsr-mce-button:after{display:inline-block;position:relative;top:-1px;left:-1px;width:0;height:0;content:"";border-top:6px solid;border-right:4px solid transparent;border-left:4px solid transparent}button.glsr-mce-button.active:after{top:-2px;border-top:0;border-bottom:6px solid}button.glsr-mce-button:active{margin-bottom:5px}button.glsr-mce-button .wp-media-buttons-icon:before{content:"";font:normal 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-width:782px){button.glsr-mce-button .wp-media-buttons-icon:before{font-size:20px!important}}div.sc-wrap{margin-right:1px}#site-review-detailsdiv.postbox .inside{padding:0;margin:0}.glsr-response-postbox{margin-top:20px;margin-bottom:0}.js .glsr-response-postbox .hndle{cursor:default}.js .glsr-response-postbox .toggle-indicator:before{content:"";display:inline-block;font:normal 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .glsr-response-postbox.closed .toggle-indicator:before{content:""}.glsr-metabox-table{width:auto;padding:0 12px 12px;margin-top:12px}.glsr-metabox-table td{line-height:1.5;vertical-align:top;padding:0 14px 8px 0}.glsr-metabox-table td:first-child{font-weight:600}.glsr-metabox-table td:last-child{padding-bottom:0}.glsr-metabox-actions{border-top:1px solid #ccd0d4;background:#f5f5f5;padding:10px;clear:both}.glsr-revert-action{text-align:right;float:right;line-height:1.9}.glsr-revert-action .spinner{float:left}.glsr-metabox-field select:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);color:#016087;color:var(--wp-admin-theme-color-darker-20);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.glsr-metabox-field{box-sizing:border-box;position:relative}.glsr-metabox-field:first-child{margin-top:12px}.glsr-metabox-field .glsr-label{box-sizing:border-box;line-height:1.5;margin:0;overflow:hidden;padding:0 12px;position:relative;white-space:nowrap;width:100%}.glsr-metabox-field .glsr-label label{display:block;font-size:14px;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis}.glsr-metabox-field .glsr-input{box-sizing:border-box;width:100%;position:relative;padding:12px;margin:0}.glsr-metabox-field .glsr-input>img{border-radius:3px;margin-top:12px}.glsr-metabox-field input[type=date],.glsr-metabox-field input[type=datetime-local],.glsr-metabox-field input[type=datetime],.glsr-metabox-field input[type=email],.glsr-metabox-field input[type=month],.glsr-metabox-field input[type=number],.glsr-metabox-field input[type=password],.glsr-metabox-field input[type=search],.glsr-metabox-field input[type=tel],.glsr-metabox-field input[type=text],.glsr-metabox-field input[type=time],.glsr-metabox-field input[type=url],.glsr-metabox-field input[type=week],.glsr-metabox-field select,.glsr-metabox-field textarea{margin:0;width:100%;padding:3px 8px;line-height:1.5;min-height:30px}.glsr-metabox-field .glsr-input label,.glsr-metabox-field input:disabled,.glsr-metabox-field select:disabled,.glsr-metabox-field textarea:disabled{cursor:default}.glsr-input-value:disabled{color:#32373c!important;background-color:#eee!important;border-color:#7e8993!important;opacity:1}@media screen and (min-width:641px){.glsr-metabox-field{display:flex;flex:1 auto}.glsr-metabox-field:first-child{margin-top:0}.glsr-metabox-field:first-child .glsr-input,.glsr-metabox-field:first-child .glsr-label{padding-top:12px}.glsr-metabox-field:last-child .glsr-input,.glsr-metabox-field:last-child .glsr-label{padding-bottom:12px}.glsr-metabox-field .glsr-label{align-items:flex-start;display:flex;background:#f9f9f9;border-right:1px solid #ddd;padding:6px 12px;min-width:150px;width:20%;line-height:40px}.glsr-metabox-field .glsr-label label{font-weight:600}.glsr-metabox-field .glsr-input{flex-direction:column;justify-content:center;display:flex;padding:6px 12px;vertical-align:top}}@media screen and (min-width:783px){.glsr-metabox-field .glsr-label{line-height:30px}}.glsr-toggle-field{display:flex;line-height:normal;height:40px}@media screen and (min-width:641px){.glsr-toggle-field{align-items:center}}@media screen and (min-width:783px){.glsr-toggle-field{height:30px}}.glsr-toggle{position:relative;display:inline-block}.glsr-toggle .glsr-toggle__track{content:"";display:inline-block;box-sizing:border-box;vertical-align:top;background-color:#fff;border:1px solid #1e1e1e;width:36px;height:18px;border-radius:9px;transition:background .2s ease}@media (prefers-reduced-motion:reduce){.glsr-toggle .glsr-toggle__track{transition-duration:0s}}.glsr-toggle .glsr-toggle__thumb{display:block;position:absolute;box-sizing:border-box;top:3px;left:3px;width:12px;height:12px;border-radius:50%;transition:transform .1s ease;background-color:#1e1e1e;border:5px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.glsr-toggle .glsr-toggle__thumb{transition-duration:0s}}.glsr-toggle .glsr-toggle__input[type=checkbox]:checked~.glsr-toggle__track{background-color:#007cba;background-color:var(--wp-admin-theme-color);border:9px solid transparent}.glsr-toggle .glsr-toggle__input:focus+.glsr-toggle__track{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #007cba;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.glsr-toggle .glsr-toggle__input[type=checkbox]:checked~.glsr-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.glsr-toggle input.glsr-toggle__input[type=checkbox]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;margin:0;padding:0;z-index:1;border:none}.glsr-toggle input.glsr-toggle__input[type=checkbox]:checked{background:none}.glsr-toggle input.glsr-toggle__input[type=checkbox]:before{content:""}.glsr-metabox-field [data-star-rating]>select{clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:circle(1px at 0 0)!important;clip-path:circle(1px at 0 0)!important;height:1px!important;margin:0!important;overflow:hidden!important;padding:0!important;position:absolute!important;top:0!important;visibility:visible!important;white-space:nowrap!important;width:1px!important}.glsr-metabox-field .gl-star-rating:not([data-star-rating]) .gl-star-rating--stars,.glsr-metabox-field [data-star-rating]>select:after,.glsr-metabox-field [data-star-rating]>select:before{display:none!important}.glsr-metabox-field .gl-star-rating--stars{align-items:center;color:#555d66;cursor:pointer;display:flex;float:left;position:relative;white-space:nowrap}.glsr-metabox-field [data-star-rating]>select[disabled]+.gl-star-rating--stars{color:#72777c;cursor:default}.glsr-metabox-field .gl-star-rating--stars>span{-webkit-font-smoothing:antialiased;font-family:dashicons;font-size:30px;letter-spacing:1px;line-height:1;text-align:center;transition:color .1s ease-in}@media screen and (min-width:783px){.glsr-metabox-field .gl-star-rating--stars>span{font-size:24px}}.glsr-metabox-field .gl-star-rating--stars>span:before{content:""}.glsr-metabox-field .gl-star-rating--stars.s10>span:first-child:before,.glsr-metabox-field .gl-star-rating--stars.s20>span:nth-child(-1n+2):before,.glsr-metabox-field .gl-star-rating--stars.s30>span:nth-child(-1n+3):before,.glsr-metabox-field .gl-star-rating--stars.s40>span:nth-child(-1n+4):before,.glsr-metabox-field .gl-star-rating--stars.s50>span:nth-child(-1n+5):before,.glsr-metabox-field .gl-star-rating--stars.s60>span:nth-child(-1n+6):before,.glsr-metabox-field .gl-star-rating--stars.s70>span:nth-child(-1n+7):before,.glsr-metabox-field .gl-star-rating--stars.s80>span:nth-child(-1n+8):before,.glsr-metabox-field .gl-star-rating--stars.s90>span:nth-child(-1n+9):before,.glsr-metabox-field .gl-star-rating--stars.s100>span:before{content:""}.glsr-metabox-field [data-star-rating]>select:focus+.gl-star-rating--stars:before{border-radius:3px;border:1px solid #007cba;border:1px solid var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);box-sizing:border-box;content:"";display:block;height:40px;pointer-events:none;position:absolute;width:100%}@media screen and (min-width:783px){.glsr-metabox-field [data-star-rating]>select:focus+.gl-star-rating--stars:before{height:30px}}.glsr-notice-branded{border-left-color:#f6e05e!important;padding-left:123px}.glsr-notice-branded-image{align-items:center;border-right:1px solid #ccd0d4;bottom:0;display:flex;justify-content:center;left:0;padding:0 5px;position:absolute;width:100px}.glsr-notice-branded .glsr-notice-branded-image{background-color:#faf089;top:0}.glsr-notice-premium .glsr-notice-branded-image{background-color:#252f3f;bottom:-1px;top:-1px}.glsr-notice-branded-image svg{position:relative;top:0;left:0;width:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.glsr-notice:not(.notice-error):not(.notice-info):not(.notice-warning):not(.glsr-notice-branded){display:flex;border-left-color:#32373c}.glsr-notice-icon{display:flex;align-items:flex-start;margin-left:6px;margin-top:18px;margin-right:18px}.glsr-notice-icon img{width:80px;height:80px}@media only screen and (min-width:601px){.glsr-notice-icon img{width:96px;height:96px}}.glsr-notice-content{margin:6px 0}.glsr-notice-content h3{line-height:1.25;margin-top:12px;margin-bottom:12px}.glsr-notice-content .button,.glsr-notice-content p{margin-top:0;margin-bottom:12px}:root{--base00:#2b303b;--base01:#343d46;--base02:#4f5b66;--base03:#65737e;--base04:#a7adba;--base05:#c0c5ce;--base06:#dfe1e8;--base07:#eff1f5;--base08:#bf616a;--base09:#d08770;--base0A:#ebcb8b;--base0B:#a3be8c;--base0C:#96b5b4;--base0D:#8fa1b3;--base0E:#b48ead;--base0F:#ab7967}.syntax-shortcode,code[class*=language-],pre[class*=language-]{background-color:#181818;background-color:var(--base00);color:#d8d8d8;color:var(--base05);font-family:"Operator Mono Lig","Fira Code",monospace;font-size:13px;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-align:left;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal;border-radius:2px}.syntax-shortcode,pre[class*=language-]{display:block;padding:1em;margin:.5em 0;overflow:auto}pre[class*=language-]>code{margin:0;padding:0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.bold{font-weight:bold}.token.italic{font-style:italic}.syntax-shortcode .tag{color:#ab4642;color:var(--base08)}.syntax-shortcode .attr-name{color:#ba8baf;color:var(--base0E)}.syntax-shortcode .attr-value{color:#a1b56c;color:var(--base0B)}.language-css .comment{color:#585858;color:var(--base03)}.language-css .important,.language-css .selector{color:#ba8baf;color:var(--base0E)}.language-css .function,.language-css .property,.language-css .url .function{color:#7cafc2;color:var(--base0D)}.language-css .string,.language-css .url{color:#a1b56c;color:var(--base0B)}.language-css .atrule,.language-css .atrule .punctuation,.language-css .url .punctuation{color:#d8d8d8;color:var(--base05)}.language-css .atrule .rule{color:#f7ca88;color:var(--base0A)}.language-css .atrule .keyword,.language-html .tag{color:#ab4642;color:var(--base08)}.language-html .attr-name{color:#ba8baf;color:var(--base0E)}.language-html .attr-value{color:#a1b56c;color:var(--base0B)}.language-html .attr-equals,.language-php .attr-value,.language-php .char,.language-php .constant,.language-php .package .punctuation,.language-php .property,.language-php .punctuation,.language-php .regex,.language-php .variable{color:#d8d8d8;color:var(--base05)}.language-php .block-comment,.language-php .cdata,.language-php .comment,.language-php .doctype,.language-php .prolog{color:#585858;color:var(--base03)}.language-php .string{color:#a1b56c;color:var(--base0B)}.language-php .important,.language-php .keyword,.language-php .selector{color:#ba8baf;color:var(--base0E)}.language-php .number,.language-php .operator{color:#ab4642;color:var(--base08)}.language-php .boolean,.language-php .class-name,.language-php .function,.language-php .package{color:#7cafc2;color:var(--base0D)}.shortcode-example{position:relative}.shortcode-example>input{margin:0;opacity:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#181818;background-color:var(--base00);border-radius:2px;border:0;color:#d8d8d8;color:var(--base05);display:block;font-family:"Operator Mono","Fira Code",monaco,monospace;font-size:13px;line-height:1.5;padding:1em;position:absolute;width:100%}.shortcode-example>input:active,.shortcode-example>input:focus{border:0;box-shadow:none;opacity:1!important}.glsr-progress{position:relative;display:block;height:28px;opacity:.65;text-align:center;font-size:14px}@media screen and (max-width:782px){.glsr-progress{height:31px}}.glsr-progress.active{opacity:1}.glsr-progress *{box-sizing:border-box}.glsr-progress-background,.glsr-progress-bar{height:100%;background-size:40px 40px}.glsr-progress.active .glsr-progress-background,.glsr-progress.active .glsr-progress-bar{transition:width 2.5s linear;-webkit-animation:glsr-progress-bar 1s linear infinite;animation:glsr-progress-bar 1s linear infinite}.glsr-progress-bar{position:relative;width:0;color:#fff;background-color:#616b75;background-image:linear-gradient(-45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);border:1px solid #4a5259;border-top-color:#616b75;border-radius:3px 0 0 3px;overflow:hidden;z-index:1}.glsr-progress-bar[style="width: 0%;"]{border-width:0}.glsr-progress-bar[style="width: 100%;"]{border-radius:3px}.glsr-progress-background{position:absolute;top:0;left:0;width:100%;height:28px;background-color:#f7f7f7;background-image:linear-gradient(-45deg,#fff 25%,transparent 0,transparent 50%,#fff 0,#fff 75%,transparent 0,transparent);border-radius:3px;box-shadow:inset 0 1px 2px #ccd0d4;border:1px solid #ccc}@media screen and (max-width:782px){.glsr-progress-background{height:31px}}.glsr-progress span{position:absolute;left:0;top:0;line-height:26px;color:#555;padding:0 6px}@media screen and (max-width:782px){.glsr-progress span{line-height:29px}}.glsr-progress-bar>span{color:#fff;text-shadow:0 -1px 1px #4a5259,1px 0 1px #4a5259,0 1px 1px #4a5259,-1px 0 1px #4a5259}@-webkit-keyframes glsr-progress-bar{0%{background-position:0 0}to{background-position:40px 0}}@keyframes glsr-progress-bar{0%{background-position:0 0}to{background-position:40px 0}}.glsr-progress .glsr-progress-bar{background-color:#681b98;border-color:#681b98 #591782 #591782}.glsr-progress .glsr-progress-bar>span{text-shadow:0 -1px 1px #591782,1px 0 1px #591782,0 1px 1px #591782,-1px 0 1px #591782}.star-rating .glsr-star{width:16px;font-size:16px;line-height:20px;color:#555}select[data-glsr-track=minimal]{border-color:#dba617!important;color:#c49515!important}select[data-glsr-track=minimal]:focus{box-shadow:0 0 0 1px #dba617}select[data-glsr-track=all]{border-color:#d63638!important;color:#d63638!important}select[data-glsr-track=all]:focus{box-shadow:0 0 0 1px #d63638}td.glsr-string-td1{position:relative;padding-bottom:2em}td.glsr-string-td1 .row-actions{position:absolute;bottom:10px;z-index:1}td.glsr-string-td2 input[type=text]:last-of-type{margin-bottom:0}td.glsr-string-td2 .description{display:block;padding-top:.5em}.is-invalid td.glsr-string-td2 .description{color:#d63638}.mobile td.glsr-string-td1 .row-actions,.no-js td.glsr-string-td1 .row-actions,td.glsr-string-td1 .row-actions.visible,tr:hover td.glsr-string-td1 .row-actions{left:10px}.is-invalid td.glsr-string-td1,.is-invalid td.glsr-string-td1>div,.is-invalid td.glsr-string-td2,.is-invalid td.glsr-string-td2>div{position:relative}.is-invalid td.glsr-string-td1>button,.is-invalid td.glsr-string-td1>div,.is-invalid td.glsr-string-td2>button,.is-invalid td.glsr-string-td2>div{z-index:1}.is-invalid td.glsr-string-td1:after,.is-invalid td.glsr-string-td2:after{display:block;position:absolute;content:"";top:-1px;right:-1px;bottom:-1px;left:-1px;background:rgba(220,50,50,.06);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0}.is-invalid td.glsr-string-td1:after{background:rgba(220,50,50,.08)}.is-invalid td.glsr-string-td2 input[type=text],.is-invalid td.glsr-string-td2 textarea{border-color:#e2cbcb}@media screen and (max-width:782px){.post-type-site-review .wp-list-table .is-expanded.is-invalid td:not(.hidden){overflow:unset}}@media screen and (max-width:720px){nav a.glsr-nav-tab,nav a.glsr-nav-tab.nav-tab-active:hover{transition-property:background,color;border-bottom:1px solid #ccc;margin:10px 10px 0 0}.wrap nav.glsr-nav-tab-wrapper{border-bottom:0}}.glsr-card{max-width:800px;box-sizing:border-box}.glsr-card-result{border:1px solid #ccd0d4;background-color:#f6fbfd;padding:0 1em;margin:1em 0}.glsr-card ol{list-style:decimal;margin-left:1.5em}.glsr-card ul{list-style:disc;margin-left:1.5em}.glsr-card h2{margin-top:0;text-align:left}.glsr-heading{color:#000;font-size:14px;font-weight:600}.glsr-card.postbox{padding:0;margin-bottom:0}.glsr-card.postbox:not(:last-child){border-bottom:none}.glsr-card.postbox.closed:last-child{border-bottom:1px solid #ccd0d4}.glsr-card .components-notice{margin:0}.glsr-card .components-notice.is-info{background-color:rgba(231,245,254,.75)}.glsr-card h3.glsr-card-heading{border-top:1px solid #ccd0d4;color:inherit;font-size:inherit;font-weight:600;line-height:inherit;margin:0}.glsr-card h3.glsr-card-heading:first-child{border-top:none}.glsr-accordion-trigger{background:#fff;border:0;color:#32373c;cursor:pointer;display:flex;font-weight:400;margin:0;padding:1em 3.5em 1em 1.5em;min-height:46px;position:relative;text-align:left;width:100%;align-items:center;justify-content:space-between;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.glsr-accordion-trigger .title.dashicons-before:before{margin-left:-.25em;padding-right:.5em}.glsr-accordion-trigger:active,.glsr-accordion-trigger:hover{background:#f8f9f9}.glsr-accordion-trigger:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-1px;outline:2px solid #0071a1;background-color:#f8f9f9;z-index:1}.glsr-accordion-trigger .title{pointer-events:none;font-weight:600;font-size:16px;flex-grow:1}.glsr-accordion-trigger .icon{border:solid #555d66;border-width:0 2px 2px 0;height:.5rem;pointer-events:none;position:absolute;right:1.5em;top:50%;transform:translateY(-70%) rotate(45deg);width:.5rem}.glsr-accordion-trigger[aria-expanded=true] .icon{transform:translateY(-30%) rotate(-135deg)}.glsr-accordion-trigger .badge{padding:.1rem .5rem .15rem;color:#32373c;font-weight:500;margin-left:.5rem;border:1px solid #72aee6}.glsr-accordion-trigger .badge.important{border:1px solid #d63638}@media screen and (max-width:782px){.glsr-accordion-trigger{align-items:flex-start;flex-direction:column}.glsr-accordion-trigger .badge{margin:1em 0 0}}.glsr-card.postbox .inside{border-bottom:none;border-top:1px solid #ccd0d4;margin:0;padding:1em 1.5em}.glsr-card.postbox .inside>:not(h2):first-child{margin-top:.5em}.glsr-card.postbox .inside>:last-child{margin-bottom:.5em!important}.glsr-card p.submit{margin:0}.glsr-card code,.glsr-card pre{word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}.glsr-card dd{margin:1em 0}.glsr-card dt{font-weight:600;margin:1em 0}.glsr-card code a{text-decoration:none}.glsr-float-left{float:left;padding-right:.25em}.glsr-code[readonly]{width:100%;font-family:"Operator Mono","Fira Code",monaco,monospace;font-weight:300;white-space:pre;-webkit-font-smoothing:antialiased!important}.glsr-code-large{min-height:60vh}@media only screen and (max-width:782px){.glsr-card{max-width:inherit}}.glsr-tooltip{color:#646970;cursor:help;margin-left:6px}tr.glsr-setting-field th{width:210px}tr.glsr-setting-field th .tippy-box{font-weight:400}@media only screen and (min-width:783px){.glsr-tooltip{float:left;margin-left:0;margin-right:6px}}tr.glsr-setting-field td .inline br{display:none}tr.glsr-setting-field td .inline label:after{content:"";margin-right:1em}.glsr-setting-field a.button{margin-top:6px}.glsr-notice-inline{background:hsla(0,0%,100%,.65);color:#555;padding:4px 10px 10px;margin:10px 0 0!important}.glsr-notice-inline p{padding:0!important}.glsr-setting-field{margin:1em 0;line-height:1.5}.glsr-setting-field small code{font-size:inherit;padding:0 3px 1px}.glsr-setting-field>label{margin-right:3px}@media screen and (max-width:782px){.glsr-setting-field>label+input.small-text{margin-left:0}}.glsr-setting-field>ul{margin:0}.glsr-setting-field>ul li{margin-bottom:2px}.glsr-setting-field textarea.code,.post-type-site-review .code,.post-type-site-review code{font-family:"Operator Mono","Fira Code",monaco,monospace}.glsr-hidden{display:none}.glsr-search-box,.glsr-strings-table{position:relative;max-width:800px}.glsr-search-box *,.glsr-strings-table *{box-sizing:border-box}.glsr-search-box,.glsr-search-multibox{position:relative;margin:1em 0}.glsr-search-box.is-active .spinner,.glsr-search-multibox.is-active .spinner{visibility:visible}.glsr-search-box.is-active input[type=search]::-webkit-search-cancel-button,.glsr-search-multibox.is-active input[type=search]::-webkit-search-cancel-button{display:none!important}.glsr-search-box .description{display:block}.glsr-spinner{visibility:hidden;position:absolute;top:5px;right:5px;height:20px;width:20px;background-color:#fff;z-index:5}.glsr-spinner .spinner{margin:0}.loading-content .glsr-spinner{visibility:visible}.glsr-search-input{position:relative;width:100%;font-weight:300;line-height:1.5;padding:3px 5px;margin:0;z-index:2}.site-review_page_settings .glsr-search-input{height:32px;font-size:16px}.glsr-search-input:focus{z-index:20}.glsr-search-results{position:absolute;top:calc(100% - 4px);padding-top:4px;left:0;width:100%;max-height:315px;overflow-y:scroll;-webkit-overflow-scrolling:touch;border:1px solid #7e8993;border-top:none;box-shadow:0 1px 1px rgba(0,0,0,.04);background-color:#fff;box-sizing:border-box;border-radius:0 0 4px 4px;z-index:3}.glsr-search-results:not(.is-active){display:none}.glsr-search-results:before{display:block;background:#fff;border-left:1px solid #7e8993;border-right:1px solid #7e8993;box-sizing:border-box;content:"";height:4px;position:absolute;top:0;left:-1px;right:-1px}.glsr-search-results>div,.glsr-search-results>span{position:relative;display:block;box-sizing:border-box;height:32px;line-height:32px;text-overflow:ellipsis;white-space:nowrap;padding:0 10px;margin-top:-1px;overflow:hidden}.glsr-search-results>div{background-color:#f6fbfd}.glsr-search-results>span:active,.glsr-search-results>span:focus,.glsr-search-results>span:hover{color:#fff;background-color:#00a0d2;cursor:pointer;outline:none}.glsr-search-box-wrap{position:relative}.glsr-strings-table{transition:opacity .2s linear}.glsr-focus .glsr-strings-table{opacity:.2;pointer-events:none}.glsr-string-td1,.glsr-string-td2{border-top:none;padding:13px 15px}.glsr-string-td1{max-width:375px;border-right:1px solid #ccd0d4;vertical-align:top}.glsr-string-td2{width:60%;max-width:375px}.glsr-strings-table p:not(.row-actions){font-size:14px;font-weight:400;line-height:1.3;color:#000}.glsr-strings-table p.row-actions{margin:0}.glsr-strings-table textarea{display:block;width:100%;margin:0}.glsr-strings-table input[type=text]{display:block;width:100%;margin:0 0 5px}.glsr-strings-table input[type=text]:active,.glsr-strings-table input[type=text]:focus{position:relative}.glsr-string-tr:last-child .glsr-string-td2,.glsr-string-tr:not(.is-expanded):last-child .glsr-string-td1{border-bottom:none}@media screen and (max-width:782px){.glsr-search-results>span{padding:0 10px}.glsr-string-td1{max-width:none;border-right:none}.glsr-string-td2{max-width:none;padding:13px 15px!important}.glsr-spinner{right:10px}}.glsr-string-tr.ui-sortable-helper{opacity:.8;display:table;box-shadow:0 1px 2px rgba(0,0,0,.1)}.ui-sortable .glsr-string-tr:hover{cursor:move}@media screen and (min-width:783px){.ui-sortable-placeholder+.glsr-string-tr .glsr-string-td2{border-top:1px solid #f1f1f1}}.ui-sortable-helper .glsr-string-td1{border-left:1px solid #999}.ui-sortable-helper .glsr-string-td1,.ui-sortable-helper .glsr-string-td2{border-top:1px solid #999!important;border-bottom:1px solid #999!important}.ui-sortable-helper .glsr-string-td2{border-right:1px solid #999}@media screen and (max-width:782px){.ui-sortable-helper .glsr-string-td1{border:1px solid #999}.ui-sortable-helper.is-expanded .glsr-string-td1{border-bottom:none!important}.ui-sortable-helper.is-expanded .glsr-string-td2{border:1px solid #999;border-top-color:#f1f1f1!important}}.glsr-search-multibox,.glsr-search-multibox-entries{display:flex;margin:0;position:relative}.glsr-search-multibox-entries{background-color:#fff;border-radius:4px;border:1px solid #7e8993;box-shadow:0 0 0 transparent;color:#32373c;flex-direction:column;width:100%;z-index:2}.glsr-search-multibox-entries:focus-within{border-color:#007cba;box-shadow:0 0 0 1px #007cba;outline:2px solid transparent;z-index:20}.glsr-search-multibox .glsr-selected-entries{display:flex;flex-wrap:wrap;padding-right:6px}.glsr-search-multibox .glsr-selected-entries>span{align-items:center;background:rgba(0,0,0,.07);border-radius:3px;box-sizing:border-box;display:flex;font-size:11px;font-style:normal;height:24px;line-height:1;margin:6px 0 0 6px;padding:0 8px 0 24px;position:relative}.glsr-search-multibox .glsr-selected-entries a{color:inherit;pointer-events:none}.glsr-search-multibox .glsr-remove-button{left:2px}.glsr-search-multibox .glsr-remove-icon:before{color:#757575}.glsr-search-multibox input[type=search].glsr-search-input{border:none;margin:0;background:transparent;width:auto;flex-grow:1}.glsr-search-multibox input[type=search].glsr-search-input:focus{outline:none;box-shadow:none}.glsr-search-multibox .glsr-spinner{top:auto;bottom:5px;right:7px}@media screen and (max-width:782px){.glsr-search-multibox .glsr-remove-button{left:6px}.glsr-search-multibox .glsr-selected-entries>span{margin:8px 0 0 8px;font-size:14px;height:32px;padding:8px 10px 8px 30px}.glsr-search-multibox .glsr-spinner{bottom:10px;right:10px}}.glsr-multibox-entry{color:#444;display:block;margin-left:20px}.glsr-remove-button{position:absolute;left:-4px;width:20px;height:20px;border:none;margin:0;padding:0;background:0 0;cursor:pointer;text-indent:0}.glsr-remove-button:focus .glsr-remove-icon:before,.glsr-remove-button:hover .glsr-remove-icon:before{color:#1e1e1e}.glsr-remove-icon:before{margin-left:0;border-radius:50%;color:#007cba;color:var(--wp-admin-theme-color);line-height:1.28;background:0 0;content:"";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glsr-status{max-width:750px}.glsr-status th.column-primary{width:50%}.glsr-status td.column-primary{position:relative;font-size:14px!important;font-weight:600}.glsr-status td.column-primary span{font-weight:400}.glsr-status .toggle-row{top:0}.glsr-status .toggle-row:before{top:6px}.glsr-status tfoot td.glsr-radio-column,.glsr-status thead td.glsr-radio-column{color:#82878c;text-align:center;padding-left:4px}@media screen and (max-width:782px){.glsr-status th input[type=radio]{margin-bottom:8px}.glsr-status tfoot td.glsr-radio-column,.glsr-status thead td.glsr-radio-column{padding-top:4px;padding-left:9px}}.wrap nav.glsr-nav-tab-wrapper{margin-top:12px;padding-top:0}nav.glsr-nav-tab-wrapper a.glsr-nav-tab:focus{box-shadow:none;outline-offset:-1px;outline:2px solid #0071a1}.wrap>.glsr-nav-view{margin-top:20px}.glsr-subsubsub{display:flex;flex-wrap:wrap;float:none;margin-top:.5em;text-align:left}.glsr-subsubsub li{align-items:center;display:flex}.glsr-subsubsub li a{padding:0 .2em}.glsr-subsubsub li span{margin:0 .2em}.glsr-subsubsub li:last-child span{display:none}body[class*=type-site-review] [data-tippy-root]{max-width:calc(100vw - 10px)}body[class*=type-site-review] .tippy-box{background-color:#2c3338;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}body[class*=type-site-review] .tippy-box a{color:#72aee6}body[class*=type-site-review] .tippy-box a:hover{color:#4f94d4}body[class*=type-site-review] .tippy-box code{background-color:hsla(0,0%,100%,.25);display:inline-block;padding:0 3px;border-radius:2px}body[class*=type-site-review] .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=top]{transform-origin:bottom}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement=top-start]{transform-origin:left bottom}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=right]{transform-origin:left}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=bottom]{transform-origin:top}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=left]{transform-origin:right}body[class*=type-site-review] .tippy-box[data-animation=scale][data-state=hidden]{transform:scale(.5);opacity:0}body[class*=type-site-review] .tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}body[class*=type-site-review] .tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}body[class*=type-site-review] .tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}body[class*=type-site-review] .tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}body[class*=type-site-review] .tippy-box[data-placement^=left]>.tippy-arrow{right:0}body[class*=type-site-review] .tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}body[class*=type-site-review] .tippy-box[data-placement^=right]>.tippy-arrow{left:0}body[class*=type-site-review] .tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}body[class*=type-site-review] .tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}body[class*=type-site-review] .tippy-arrow{color:#2c3338;height:16px;width:16px}body[class*=type-site-review] .tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}body[class*=type-site-review] .tippy-content{padding:8px 10px;position:relative;z-index:1}.glsr-screenshot{border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box}.glsr-welcome .badge{position:absolute;top:1em;right:0;padding:.25rem .5rem;font-weight:500;font-size:16px;text-rendering:optimizeLegibility;background-color:#72777c;color:#fff;border-radius:5px}@media only screen and (max-width:500px){.glsr-welcome .badge{display:inline-block;position:relative;top:auto}}.glsr-welcome.about-wrap{margin-top:40px}.glsr-welcome.about-wrap .inside li,.glsr-welcome.about-wrap .inside p{font-size:16px}.glsr-welcome .glsr-about-text{margin:1em 0}.glsr-welcome-banner{margin:2em 0 0}.glsr-welcome .about-buttons{display:flex;flex-wrap:wrap;margin:1.5em 0}.glsr-welcome .components-button{margin:0 .5em .5em 0}.glsr-welcome .dashicon:before{font:normal 18px dashicons;margin-right:6px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glsr-welcome .glsr-nav-view{margin-top:0}.glsr-welcome ul:not(.glsr-flex-row){list-style:circle;padding-left:20px}.glsr-flex-row{display:flex;flex-direction:row;flex-wrap:wrap;margin-left:-20px;margin-right:-20px}.glsr-column{width:100%;max-width:100%;box-sizing:border-box;padding-left:20px;padding-right:20px}@media (min-width:601px){.glsr-has-2-columns .glsr-column,.glsr-has-3-columns .glsr-column{max-width:50%}}@media (min-width:783px){.glsr-has-3-columns .glsr-column{max-width:33.33%}}[class*=post-type-site-review] .row-actions .id>span{color:#999}.glsr-metabox-table .star-rating .star,.post-type-site-review .star-rating .star{width:16px;font-size:16px;line-height:20px;color:#555}.post-type-site-review .star-rating .star{margin-top:-2px}.post-type-site-review .hide-column-tog+.pinned-icon+svg,.post-type-site-review .wp-list-table .approve,.post-type-site-review .wp-list-table .status-pending .unapprove{display:none}.post-type-site-review .wp-list-table .spam .approve,.post-type-site-review .wp-list-table .status-pending .approve,.post-type-site-review .wp-list-table .trash .approve{display:inline}.post-type-site-review .wp-list-table .approve a{color:#006505}.post-type-site-review .wp-list-table .approve a:hover{color:#007f06}.post-type-site-review .wp-list-table .unapprove a{color:#d98500}.post-type-site-review .wp-list-table .unapprove a:hover{color:#f39500}.post-type-site-review .wp-list-table th.column-rating{width:100px}.post-type-site-review .wp-list-table td.column-is_pinned i.pin-review{align-items:center;cursor:pointer;display:flex;float:none;justify-content:center;margin:0;transition:none}.post-type-site-review .wp-list-table td.column-is_pinned i{line-height:24px;text-indent:-3px}.post-type-site-review .wp-list-table td.column-is_pinned i:not(.pinned){color:rgba(85,85,85,.2)}.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending th.check-column{box-shadow:inset 0 1px 0 rgba(0,0,0,.07),inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending td:nth-child(2){box-shadow:inset 0 1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending:not(.is-expanded) td:nth-child(2){box-shadow:inset 0 1px 0 rgba(0,0,0,.07),inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table tr.status-pending.is-expanded td:last-child,.post-type-site-review .wp-list-table tr.status-pending:not(.is-expanded) td:nth-child(2),.post-type-site-review .wp-list-table tr.status-pending th.check-column{box-shadow:inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table tr.status-pending td,.post-type-site-review .wp-list-table tr.status-pending th.check-column{background-color:#fef7f1}.post-type-site-review .wp-list-table tr.status-pending th.check-column{position:relative;border-left:4px solid #d54e21;z-index:1}.post-type-site-review .wp-list-table tr.status-pending th.check-column input{margin-left:4px}@media screen and (min-width:783px){.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending td{box-shadow:inset 0 1px 0 rgba(0,0,0,.07),inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table tr.status-pending td{box-shadow:inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table th.column-assigned_posts,.post-type-site-review .wp-list-table th.column-assigned_users,.post-type-site-review .wp-list-table th.column-ip_address{white-space:nowrap}.post-type-site-review .wp-list-table th.column-assigned_posts,.post-type-site-review .wp-list-table th.column-assigned_users,.post-type-site-review .wp-list-table th.column-name,.post-type-site-review .wp-list-table th.column-taxonomy-site-review-category,.post-type-site-review .wp-list-table th.column-type{width:120px}.post-type-site-review .wp-list-table th.column-is_pinned{width:45px}.post-type-site-review .wp-list-table th.column-is_pinned span.pinned-icon span{display:none}.post-type-site-review .wp-list-table th.column-is_pinned span.pinned-icon:after{display:inline-block;position:relative;content:"";font:normal 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:16px;height:20px;line-height:22px;font-size:16px;text-align:center}.post-type-site-review .wp-list-table th.column-is_pinned .sorting-indicator{margin-left:3px}.post-type-site-review .wp-list-table td.column-is_pinned{padding:8px 6px}.post-type-site-review .wp-list-table td.column-is_pinned i{text-indent:0}}#available-widgets [class*=site-reviews] .widget-title:before{content:""}.glsr-no-margins{margin:0!important}::-moz-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}:-ms-input-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}::placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}::-webkit-input-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}:-moz-placeholder,::-moz-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}:-ms-input-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}
1
+ @charset "UTF-8";.glsr-addons{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));width:100%}@media only screen and (min-width:783px){.glsr-addons{gap:20px;margin:12px 0}}.glsr-addon{border:1px solid #ccd0d4;box-shadow:0 1px 1px -1px rgba(0,0,0,.1);display:flex;flex-direction:column;position:relative}.glsr-addon-description{background-color:#fff;padding:20px;flex:auto}.glsr-addon-description p{margin:0}.glsr-addon-name{font-size:15px;margin-top:0;text-overflow:ellipsis;white-space:nowrap}.glsr-addon-footer{height:48px;background:hsla(0,0%,100%,.65);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-sizing:border-box;padding:15px;margin:0;overflow:hidden}@media screen and (max-width:782px){.glsr-addon-footer{height:58px}}.glsr-addon-screenshot{display:block;background-position:50% 50%;background-repeat:no-repeat;background-size:cover;border-bottom:1px solid #ccd0d4;padding-top:66.67%;margin:-1px}@media screen and (min-width:514px){.glsr-addon-screenshot{padding-top:100%}}.glsr-addon-screenshot[data-slug=filters]{background-color:#319796;background-image:url(../../images/addon-filters.svg)}.glsr-addon-screenshot[data-slug=forms]{background-color:#617c8b;background-image:url(../../images/addon-forms.svg)}.glsr-addon-screenshot[data-slug=images]{background-color:#6b46c1;background-image:url(../../images/addon-images.svg)}.glsr-addon-screenshot[data-slug=premium]{background-color:#1a2349;background-image:url(../../images/addon-premium.svg)}.glsr-addon-screenshot[data-slug=themes]{background-color:#00acc1;background-image:url(../../images/addon-themes.svg)}.glsr-addon-screenshot[data-slug=trustalyze]{background-color:#4282d6;background-image:url(../../images/addon-trustalyze.svg)}.glsr-addon-screenshot[data-slug=woocommerce]{background-color:#7f54b3;background-image:url(../../images/addon-woocommerce.svg)}.glsr-addon-link{position:absolute;right:15px;bottom:10px}@media screen and (max-width:782px){.glsr-addon-link{bottom:6px}}.glsr-addon-link.glsr-external:after{content:" ";font-family:dashicons;line-height:1.2;vertical-align:text-bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@-webkit-keyframes glsr-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes glsr-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.wp-admin .glsr-button{position:relative;white-space:nowrap;display:inline-flex;align-items:center}.wp-admin .glsr-button[disabled]{box-shadow:inset 0 0 0 1px #8f98a1;color:#6c7781}.wp-admin .glsr-button[disabled] span{font-size:0;visibility:hidden}.wp-admin .glsr-button.is-small[disabled] span{height:22px}.wp-admin .glsr-button[disabled] span:after{content:attr(data-loading);font-size:13px;visibility:visible}.wp-admin .glsr-button.is-small[disabled] span:after{font-size:11px}.wp-admin .glsr-button:not([disabled]) span[data-alt-text].alt{visibility:hidden;font-size:0}.wp-admin .glsr-button:not([disabled]) span[data-alt-text].alt:after{visibility:visible;content:attr(data-alt-text);font-size:13px}.wp-admin .glsr-button.is-small:not([disabled]) span[data-alt-text].alt:after{font-size:11px}#dashboard_right_now li>span.glsr-review-count:before,#dashboard_right_now li a.glsr-review-count:before{content:"";top:-2px}.post-type-site-review #titlediv #title{margin-bottom:20px}.post-type-site-review #contentdiv textarea,.post-type-site-review .wp-editor-area{display:block;width:100%;height:320px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:16px;line-height:1.5;padding:10px;resize:vertical;-webkit-font-smoothing:antialiased!important;overflow-wrap:break-word}.post-type-site-review .misc-pub-pinned:before{display:inline-block;position:relative;content:"";font:normal 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;top:0;left:-1px;color:#82878c;padding:0 2px 0 0}.post-type-site-review .misc-pub-pinned .pinned-status-text{font-weight:600}.post-type-site-review .misc-pub-pinned .pinned-status-select{margin-top:3px}.wp-admin .glsr-response{display:block;height:6em;width:100%;margin:12px 0 0}.glsr-mce{position:relative;display:inline-block;margin-right:1px}.glsr-mce-menu.mce-menu{display:none;position:absolute;top:100%;left:0;min-width:100%;background:#fff;padding:5px 0;margin:-2px 0 0}.glsr-mce-menu-item.mce-menu-item{cursor:pointer;font-size:14px;white-space:nowrap;padding:6px 12px;margin-bottom:2px}.mce-glsr-mce-popup a{text-decoration:underline}.mce-glsr-mce-popup p{margin-bottom:1em}.mce-glsr-mce-popup p.strong{font-weight:600}.mce-glsr-mce-popup p.no-margin{margin-bottom:0}.mce-glsr-mce-popup p.margin-top{margin-top:1em}.mce-glsr-btn.mce-btn button{box-sizing:border-box;padding:0 8px}.wp-media-buttons button.glsr-mce-button{outline:none;padding-left:5px;margin-right:0}button.glsr-mce-button:after{display:inline-block;position:relative;top:-1px;left:-1px;width:0;height:0;content:"";border-top:6px solid;border-right:4px solid transparent;border-left:4px solid transparent}button.glsr-mce-button.active:after{top:-2px;border-top:0;border-bottom:6px solid}button.glsr-mce-button:active{margin-bottom:5px}button.glsr-mce-button .wp-media-buttons-icon:before{content:"";font:normal 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-width:782px){button.glsr-mce-button .wp-media-buttons-icon:before{font-size:20px!important}}div.sc-wrap{margin-right:1px}#site-review-detailsdiv.postbox .inside{padding:0;margin:0}.glsr-response-postbox{margin-top:20px;margin-bottom:0}.js .glsr-response-postbox .hndle{cursor:default}.js .glsr-response-postbox .toggle-indicator:before{content:"";display:inline-block;font:normal 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .glsr-response-postbox.closed .toggle-indicator:before{content:""}.glsr-metabox-table{width:auto;padding:0 12px 12px;margin-top:12px}.glsr-metabox-table td{line-height:1.5;vertical-align:top;padding:0 14px 8px 0}.glsr-metabox-table td:first-child{font-weight:600}.glsr-metabox-table td:last-child{padding-bottom:0}.glsr-metabox-actions{border-top:1px solid #ccd0d4;background:#f5f5f5;padding:10px;clear:both}.glsr-revert-action{text-align:right;float:right;line-height:1.9}.glsr-revert-action .spinner{float:left}.glsr-metabox-field select:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);color:#016087;color:var(--wp-admin-theme-color-darker-20);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.glsr-metabox-field{box-sizing:border-box;position:relative}.glsr-metabox-field:first-child{margin-top:12px}.glsr-metabox-field .glsr-label{box-sizing:border-box;line-height:1.5;margin:0;overflow:hidden;padding:0 12px;position:relative;white-space:nowrap;width:100%}.glsr-metabox-field .glsr-label label{display:block;font-size:14px;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis}.glsr-metabox-field .glsr-input{box-sizing:border-box;width:100%;position:relative;padding:12px;margin:0}.glsr-metabox-field .glsr-input>img{border-radius:3px;margin-top:12px}.glsr-metabox-field input[type=date],.glsr-metabox-field input[type=datetime-local],.glsr-metabox-field input[type=datetime],.glsr-metabox-field input[type=email],.glsr-metabox-field input[type=month],.glsr-metabox-field input[type=number],.glsr-metabox-field input[type=password],.glsr-metabox-field input[type=search],.glsr-metabox-field input[type=tel],.glsr-metabox-field input[type=text],.glsr-metabox-field input[type=time],.glsr-metabox-field input[type=url],.glsr-metabox-field input[type=week],.glsr-metabox-field select,.glsr-metabox-field textarea{margin:0;width:100%;padding:3px 8px;line-height:1.5;min-height:30px}.glsr-metabox-field .glsr-input label,.glsr-metabox-field input:disabled,.glsr-metabox-field select:disabled,.glsr-metabox-field textarea:disabled{cursor:default}.glsr-input-value:disabled{color:#32373c!important;background-color:#eee!important;border-color:#7e8993!important;opacity:1}@media screen and (min-width:641px){.glsr-metabox-field{display:flex;flex:1 auto}.glsr-metabox-field:first-child{margin-top:0}.glsr-metabox-field:first-child .glsr-input,.glsr-metabox-field:first-child .glsr-label{padding-top:12px}.glsr-metabox-field:last-child .glsr-input,.glsr-metabox-field:last-child .glsr-label{padding-bottom:12px}.glsr-metabox-field .glsr-label{align-items:flex-start;display:flex;background:#f9f9f9;border-right:1px solid #ddd;padding:6px 12px;min-width:150px;width:20%;line-height:40px}.glsr-metabox-field .glsr-label label{font-weight:600}.glsr-metabox-field .glsr-input{flex-direction:column;justify-content:center;display:flex;padding:6px 12px;vertical-align:top}}@media screen and (min-width:783px){.glsr-metabox-field .glsr-label{line-height:30px}}.glsr-toggle-field{display:flex;line-height:normal;height:40px}@media screen and (min-width:641px){.glsr-toggle-field{align-items:center}}@media screen and (min-width:783px){.glsr-toggle-field{height:30px}}.glsr-toggle{position:relative;display:inline-block}.glsr-toggle .glsr-toggle__track{content:"";display:inline-block;box-sizing:border-box;vertical-align:top;background-color:#fff;border:1px solid #1e1e1e;width:36px;height:18px;border-radius:9px;transition:background .2s ease}@media (prefers-reduced-motion:reduce){.glsr-toggle .glsr-toggle__track{transition-duration:0s}}.glsr-toggle .glsr-toggle__thumb{display:block;position:absolute;box-sizing:border-box;top:3px;left:3px;width:12px;height:12px;border-radius:50%;transition:transform .1s ease;background-color:#1e1e1e;border:5px solid #1e1e1e}@media (prefers-reduced-motion:reduce){.glsr-toggle .glsr-toggle__thumb{transition-duration:0s}}.glsr-toggle .glsr-toggle__input[type=checkbox]:checked~.glsr-toggle__track{background-color:#007cba;background-color:var(--wp-admin-theme-color);border:9px solid transparent}.glsr-toggle .glsr-toggle__input:focus+.glsr-toggle__track{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #007cba;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.glsr-toggle .glsr-toggle__input[type=checkbox]:checked~.glsr-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.glsr-toggle input.glsr-toggle__input[type=checkbox]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;margin:0;padding:0;z-index:1;border:none}.glsr-toggle input.glsr-toggle__input[type=checkbox]:checked{background:none}.glsr-toggle input.glsr-toggle__input[type=checkbox]:before{content:""}.glsr-metabox-field [data-star-rating]>select{clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:circle(1px at 0 0)!important;clip-path:circle(1px at 0 0)!important;height:1px!important;margin:0!important;overflow:hidden!important;padding:0!important;position:absolute!important;top:0!important;visibility:visible!important;white-space:nowrap!important;width:1px!important}.glsr-metabox-field .gl-star-rating:not([data-star-rating]) .gl-star-rating--stars,.glsr-metabox-field [data-star-rating]>select:after,.glsr-metabox-field [data-star-rating]>select:before{display:none!important}.glsr-metabox-field .gl-star-rating--stars{align-items:center;color:#555d66;cursor:pointer;display:flex;float:left;position:relative;white-space:nowrap}.glsr-metabox-field [data-star-rating]>select[disabled]+.gl-star-rating--stars{color:#72777c;cursor:default}.glsr-metabox-field .gl-star-rating--stars>span{-webkit-font-smoothing:antialiased;font-family:dashicons;font-size:30px;letter-spacing:1px;line-height:1;text-align:center;transition:color .1s ease-in}@media screen and (min-width:783px){.glsr-metabox-field .gl-star-rating--stars>span{font-size:24px}}.glsr-metabox-field .gl-star-rating--stars>span:before{content:""}.glsr-metabox-field .gl-star-rating--stars.s10>span:first-child:before,.glsr-metabox-field .gl-star-rating--stars.s20>span:nth-child(-1n+2):before,.glsr-metabox-field .gl-star-rating--stars.s30>span:nth-child(-1n+3):before,.glsr-metabox-field .gl-star-rating--stars.s40>span:nth-child(-1n+4):before,.glsr-metabox-field .gl-star-rating--stars.s50>span:nth-child(-1n+5):before,.glsr-metabox-field .gl-star-rating--stars.s60>span:nth-child(-1n+6):before,.glsr-metabox-field .gl-star-rating--stars.s70>span:nth-child(-1n+7):before,.glsr-metabox-field .gl-star-rating--stars.s80>span:nth-child(-1n+8):before,.glsr-metabox-field .gl-star-rating--stars.s90>span:nth-child(-1n+9):before,.glsr-metabox-field .gl-star-rating--stars.s100>span:before{content:""}.glsr-metabox-field [data-star-rating]>select:focus+.gl-star-rating--stars:before{border-radius:3px;border:1px solid #007cba;border:1px solid var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);box-sizing:border-box;content:"";display:block;height:40px;pointer-events:none;position:absolute;width:100%}@media screen and (min-width:783px){.glsr-metabox-field [data-star-rating]>select:focus+.gl-star-rating--stars:before{height:30px}}.glsr-notice-branded{border-left-color:#f6e05e!important;padding-left:123px}.glsr-notice-branded-image{align-items:center;border-right:1px solid #ccd0d4;bottom:0;display:flex;justify-content:center;left:0;padding:0 5px;position:absolute;width:100px}.glsr-notice-branded .glsr-notice-branded-image{background-color:#faf089;top:0}.glsr-notice-premium .glsr-notice-branded-image{background-color:#252f3f;bottom:-1px;top:-1px}.glsr-notice-branded-image svg{position:relative;top:0;left:0;width:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.glsr-notice:not(.notice-error):not(.notice-info):not(.notice-warning):not(.glsr-notice-branded){display:flex;border-left-color:#32373c}.glsr-notice-icon{display:flex;align-items:flex-start;margin-left:6px;margin-top:18px;margin-right:18px}.glsr-notice-icon img{width:80px;height:80px}@media only screen and (min-width:601px){.glsr-notice-icon img{width:96px;height:96px}}.glsr-notice-content{margin:6px 0}.glsr-notice-content h3{line-height:1.25;margin-top:12px;margin-bottom:12px}.glsr-notice-content .button,.glsr-notice-content p{margin-top:0;margin-bottom:12px}:root{--base00:#2b303b;--base01:#343d46;--base02:#4f5b66;--base03:#65737e;--base04:#a7adba;--base05:#c0c5ce;--base06:#dfe1e8;--base07:#eff1f5;--base08:#bf616a;--base09:#d08770;--base0A:#ebcb8b;--base0B:#a3be8c;--base0C:#96b5b4;--base0D:#8fa1b3;--base0E:#b48ead;--base0F:#ab7967}.syntax-shortcode,code[class*=language-],pre[class*=language-]{background-color:#181818;background-color:var(--base00);color:#d8d8d8;color:var(--base05);font-family:"Operator Mono Lig","Fira Code",monospace;font-size:13px;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-align:left;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal;border-radius:2px}.syntax-shortcode,pre[class*=language-]{display:block;padding:1em;margin:.5em 0;overflow:auto}pre[class*=language-]>code{margin:0;padding:0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.bold{font-weight:bold}.token.italic{font-style:italic}.syntax-shortcode .tag{color:#ab4642;color:var(--base08)}.syntax-shortcode .attr-name{color:#ba8baf;color:var(--base0E)}.syntax-shortcode .attr-value{color:#a1b56c;color:var(--base0B)}.language-css .comment{color:#585858;color:var(--base03)}.language-css .important,.language-css .selector{color:#ba8baf;color:var(--base0E)}.language-css .function,.language-css .property,.language-css .url .function{color:#7cafc2;color:var(--base0D)}.language-css .string,.language-css .url{color:#a1b56c;color:var(--base0B)}.language-css .atrule,.language-css .atrule .punctuation,.language-css .url .punctuation{color:#d8d8d8;color:var(--base05)}.language-css .atrule .rule{color:#f7ca88;color:var(--base0A)}.language-css .atrule .keyword,.language-html .tag{color:#ab4642;color:var(--base08)}.language-html .attr-name{color:#ba8baf;color:var(--base0E)}.language-html .attr-value{color:#a1b56c;color:var(--base0B)}.language-html .attr-equals,.language-php .attr-value,.language-php .char,.language-php .constant,.language-php .package .punctuation,.language-php .property,.language-php .punctuation,.language-php .regex,.language-php .variable{color:#d8d8d8;color:var(--base05)}.language-php .block-comment,.language-php .cdata,.language-php .comment,.language-php .doctype,.language-php .prolog{color:#585858;color:var(--base03)}.language-php .string{color:#a1b56c;color:var(--base0B)}.language-php .important,.language-php .keyword,.language-php .selector{color:#ba8baf;color:var(--base0E)}.language-php .number,.language-php .operator{color:#ab4642;color:var(--base08)}.language-php .boolean,.language-php .class-name,.language-php .function,.language-php .package{color:#7cafc2;color:var(--base0D)}.shortcode-example{position:relative}.shortcode-example>input{margin:0;opacity:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#181818;background-color:var(--base00);border-radius:2px;border:0;color:#d8d8d8;color:var(--base05);display:block;font-family:"Operator Mono","Fira Code",monaco,monospace;font-size:13px;line-height:1.5;padding:1em;position:absolute;width:100%}.shortcode-example>input:active,.shortcode-example>input:focus{border:0;box-shadow:none;opacity:1!important}.glsr-progress{position:relative;display:block;height:28px;opacity:.65;text-align:center;font-size:14px}@media screen and (max-width:782px){.glsr-progress{height:31px}}.glsr-progress.active{opacity:1}.glsr-progress *{box-sizing:border-box}.glsr-progress-background,.glsr-progress-bar{height:100%;background-size:40px 40px}.glsr-progress.active .glsr-progress-background,.glsr-progress.active .glsr-progress-bar{transition:width 2.5s linear;-webkit-animation:glsr-progress-bar 1s linear infinite;animation:glsr-progress-bar 1s linear infinite}.glsr-progress-bar{position:relative;width:0;color:#fff;background-color:#616b75;background-image:linear-gradient(-45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);border:1px solid #4a5259;border-top-color:#616b75;border-radius:3px 0 0 3px;overflow:hidden;z-index:1}.glsr-progress-bar[style="width: 0%;"]{border-width:0}.glsr-progress-bar[style="width: 100%;"]{border-radius:3px}.glsr-progress-background{position:absolute;top:0;left:0;width:100%;height:28px;background-color:#f7f7f7;background-image:linear-gradient(-45deg,#fff 25%,transparent 0,transparent 50%,#fff 0,#fff 75%,transparent 0,transparent);border-radius:3px;box-shadow:inset 0 1px 2px #ccd0d4;border:1px solid #ccc}@media screen and (max-width:782px){.glsr-progress-background{height:31px}}.glsr-progress span{position:absolute;left:0;top:0;line-height:26px;color:#555;padding:0 6px}@media screen and (max-width:782px){.glsr-progress span{line-height:29px}}.glsr-progress-bar>span{color:#fff;text-shadow:0 -1px 1px #4a5259,1px 0 1px #4a5259,0 1px 1px #4a5259,-1px 0 1px #4a5259}@-webkit-keyframes glsr-progress-bar{0%{background-position:0 0}to{background-position:40px 0}}@keyframes glsr-progress-bar{0%{background-position:0 0}to{background-position:40px 0}}.glsr-progress .glsr-progress-bar{background-color:#681b98;border-color:#681b98 #591782 #591782}.glsr-progress .glsr-progress-bar>span{text-shadow:0 -1px 1px #591782,1px 0 1px #591782,0 1px 1px #591782,-1px 0 1px #591782}.star-rating .glsr-star{width:16px;font-size:16px;line-height:20px;color:#555}select[data-glsr-track=minimal]{border-color:#dba617!important;color:#c49515!important}select[data-glsr-track=minimal]:focus{box-shadow:0 0 0 1px #dba617}select[data-glsr-track=all]{border-color:#d63638!important;color:#d63638!important}select[data-glsr-track=all]:focus{box-shadow:0 0 0 1px #d63638}td.glsr-string-td1{position:relative;padding-bottom:2em}td.glsr-string-td1 .row-actions{position:absolute;bottom:10px;z-index:1}td.glsr-string-td2 input[type=text]:last-of-type{margin-bottom:0}td.glsr-string-td2 .description{display:block;padding-top:.5em}.is-invalid td.glsr-string-td2 .description{color:#d63638}.mobile td.glsr-string-td1 .row-actions,.no-js td.glsr-string-td1 .row-actions,td.glsr-string-td1 .row-actions.visible,tr:hover td.glsr-string-td1 .row-actions{left:10px}.is-invalid td.glsr-string-td1,.is-invalid td.glsr-string-td1>div,.is-invalid td.glsr-string-td2,.is-invalid td.glsr-string-td2>div{position:relative}.is-invalid td.glsr-string-td1>button,.is-invalid td.glsr-string-td1>div,.is-invalid td.glsr-string-td2>button,.is-invalid td.glsr-string-td2>div{z-index:1}.is-invalid td.glsr-string-td1:after,.is-invalid td.glsr-string-td2:after{display:block;position:absolute;content:"";top:-1px;right:-1px;bottom:-1px;left:-1px;background:rgba(220,50,50,.06);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0}.is-invalid td.glsr-string-td1:after{background:rgba(220,50,50,.08)}.is-invalid td.glsr-string-td2 input[type=text],.is-invalid td.glsr-string-td2 textarea{border-color:#e2cbcb}@media screen and (max-width:782px){.post-type-site-review .wp-list-table .is-expanded.is-invalid td:not(.hidden){overflow:unset}}@media screen and (max-width:720px){nav a.glsr-nav-tab,nav a.glsr-nav-tab.nav-tab-active:hover{transition-property:background,color;border-bottom:1px solid #ccc;margin:10px 10px 0 0}.wrap nav.glsr-nav-tab-wrapper{border-bottom:0}}.glsr-card{max-width:800px;box-sizing:border-box}.glsr-card-result{border:1px solid #ccd0d4;background-color:#f6fbfd;padding:0 1em;margin:1em 0}.glsr-card ol{list-style:decimal;margin-left:1.5em}.glsr-card ul{list-style:disc;margin-left:1.5em}.glsr-card h2{margin-top:0;text-align:left}.glsr-heading{color:#000;font-size:14px;font-weight:600}.glsr-card.postbox{padding:0;margin-bottom:0}.glsr-card.postbox:not(:last-child){border-bottom:none}.glsr-card.postbox.closed:last-child{border-bottom:1px solid #ccd0d4}.glsr-card .components-notice{margin:0}.glsr-card .components-notice.is-info{background-color:rgba(231,245,254,.75)}.glsr-card h3.glsr-card-heading{border-top:1px solid #ccd0d4;color:inherit;font-size:inherit;font-weight:600;line-height:inherit;margin:0}.glsr-card h3.glsr-card-heading:first-child{border-top:none}.glsr-accordion-trigger{background:#fff;border:0;color:#32373c;cursor:pointer;display:flex;font-weight:400;margin:0;padding:1em 3.5em 1em 1.5em;min-height:46px;position:relative;text-align:left;width:100%;align-items:center;justify-content:space-between;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.glsr-accordion-trigger .title.dashicons-before:before{margin-left:-.25em;padding-right:.5em}.glsr-accordion-trigger:active,.glsr-accordion-trigger:hover{background:#f8f9f9}.glsr-accordion-trigger:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-1px;outline:2px solid #0071a1;background-color:#f8f9f9;z-index:1}.glsr-accordion-trigger .title{pointer-events:none;font-weight:600;font-size:16px;flex-grow:1}.glsr-accordion-trigger .icon{border:solid #555d66;border-width:0 2px 2px 0;height:.5rem;pointer-events:none;position:absolute;right:1.5em;top:50%;transform:translateY(-70%) rotate(45deg);width:.5rem}.glsr-accordion-trigger[aria-expanded=true] .icon{transform:translateY(-30%) rotate(-135deg)}.glsr-accordion-trigger .badge{padding:.1rem .5rem .15rem;color:#32373c;font-weight:500;margin-left:.5rem;border:1px solid #72aee6}.glsr-accordion-trigger .badge.important{border:1px solid #d63638}@media screen and (max-width:782px){.glsr-accordion-trigger{align-items:flex-start;flex-direction:column}.glsr-accordion-trigger .badge{margin:1em 0 0}}.glsr-card.postbox .inside{border-bottom:none;border-top:1px solid #ccd0d4;margin:0;padding:1em 1.5em}.glsr-card.postbox .inside>:not(h2):first-child{margin-top:.5em}.glsr-card.postbox .inside>:last-child{margin-bottom:.5em!important}.glsr-card p.submit{margin:0}.glsr-card code,.glsr-card pre{word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}.glsr-card dd{margin:1em 0}.glsr-card dt{font-weight:600;margin:1em 0}.glsr-card code a{text-decoration:none}.glsr-float-left{float:left;padding-right:.25em}.glsr-code[readonly]{width:100%;font-family:"Operator Mono","Fira Code",monaco,monospace;font-weight:300;white-space:pre;-webkit-font-smoothing:antialiased!important}.glsr-code-large{min-height:60vh}@media only screen and (max-width:782px){.glsr-card{max-width:inherit}}.glsr-tooltip{color:#646970;cursor:help;margin-left:6px}tr.glsr-setting-field th{width:210px}tr.glsr-setting-field th .tippy-box{font-weight:400}@media only screen and (min-width:783px){.glsr-tooltip{float:left;margin-left:0;margin-right:6px}}tr.glsr-setting-field td .inline br{display:none}tr.glsr-setting-field td .inline label:after{content:"";margin-right:1em}.glsr-setting-field a.button{margin-top:6px}.glsr-notice-inline{background:hsla(0,0%,100%,.65);color:#555;padding:4px 10px 10px;margin:10px 0 0!important}.glsr-notice-inline p{padding:0!important}.glsr-setting-field{margin:1em 0;line-height:1.5}.glsr-setting-field small code{font-size:inherit;padding:0 3px 1px}.glsr-setting-field>label{margin-right:3px}@media screen and (max-width:782px){.glsr-setting-field>label+input.small-text{margin-left:0}}.glsr-setting-field>ul{margin:0}.glsr-setting-field>ul li{margin-bottom:2px}.glsr-setting-field textarea.code,.post-type-site-review .code,.post-type-site-review code{font-family:"Operator Mono","Fira Code",monaco,monospace}.glsr-hidden{display:none}.glsr-search-box,.glsr-strings-table{position:relative;max-width:800px}.glsr-search-box *,.glsr-strings-table *{box-sizing:border-box}.glsr-search-box,.glsr-search-multibox{position:relative;margin:1em 0}.glsr-search-box.is-active .spinner,.glsr-search-multibox.is-active .spinner{visibility:visible}.glsr-search-box.is-active input[type=search]::-webkit-search-cancel-button,.glsr-search-multibox.is-active input[type=search]::-webkit-search-cancel-button{display:none!important}.glsr-search-box .description{display:block}.glsr-spinner{visibility:hidden;position:absolute;top:5px;right:5px;height:20px;width:20px;background-color:#fff;z-index:5}.glsr-spinner .spinner{margin:0}.loading-content .glsr-spinner{visibility:visible}.glsr-search-input{position:relative;width:100%;font-weight:300;line-height:1.5;padding:3px 5px;margin:0;z-index:2}.site-review_page_settings .glsr-search-input{height:32px;font-size:16px}.glsr-search-input:focus{z-index:20}.glsr-search-results{position:absolute;top:calc(100% - 4px);padding-top:4px;left:0;width:100%;max-height:315px;overflow-y:scroll;-webkit-overflow-scrolling:touch;border:1px solid #7e8993;border-top:none;box-shadow:0 1px 1px rgba(0,0,0,.04);background-color:#fff;box-sizing:border-box;border-radius:0 0 4px 4px;z-index:3}.glsr-search-results:not(.is-active){display:none}.glsr-search-results:before{display:block;background:#fff;border-left:1px solid #7e8993;border-right:1px solid #7e8993;box-sizing:border-box;content:"";height:4px;position:absolute;top:0;left:-1px;right:-1px}.glsr-search-results>div,.glsr-search-results>span{position:relative;display:block;box-sizing:border-box;height:32px;line-height:32px;text-overflow:ellipsis;white-space:nowrap;padding:0 10px;margin-top:-1px;overflow:hidden}.glsr-search-results>div{background-color:#f6fbfd}.glsr-search-results>span:active,.glsr-search-results>span:focus,.glsr-search-results>span:hover{color:#fff;background-color:#00a0d2;cursor:pointer;outline:none}.glsr-search-box-wrap{position:relative}.glsr-strings-table{transition:opacity .2s linear}.glsr-focus .glsr-strings-table{opacity:.2;pointer-events:none}.glsr-string-td1,.glsr-string-td2{border-top:none;padding:13px 15px}.glsr-string-td1{max-width:375px;border-right:1px solid #ccd0d4;vertical-align:top}.glsr-string-td2{width:60%;max-width:375px}.glsr-strings-table p:not(.row-actions){font-size:14px;font-weight:400;line-height:1.3;color:#000}.glsr-strings-table p.row-actions{margin:0}.glsr-strings-table textarea{display:block;width:100%;margin:0}.glsr-strings-table input[type=text]{display:block;width:100%;margin:0 0 5px}.glsr-strings-table input[type=text]:active,.glsr-strings-table input[type=text]:focus{position:relative}.glsr-string-tr:last-child .glsr-string-td2,.glsr-string-tr:not(.is-expanded):last-child .glsr-string-td1{border-bottom:none}@media screen and (max-width:782px){.glsr-search-results>span{padding:0 10px}.glsr-string-td1{max-width:none;border-right:none}.glsr-string-td2{max-width:none;padding:13px 15px!important}.glsr-spinner{right:10px}}.glsr-string-tr.ui-sortable-helper{opacity:.8;display:table;box-shadow:0 1px 2px rgba(0,0,0,.1)}.ui-sortable .glsr-string-tr:hover{cursor:move}@media screen and (min-width:783px){.ui-sortable-placeholder+.glsr-string-tr .glsr-string-td2{border-top:1px solid #f1f1f1}}.ui-sortable-helper .glsr-string-td1{border-left:1px solid #999}.ui-sortable-helper .glsr-string-td1,.ui-sortable-helper .glsr-string-td2{border-top:1px solid #999!important;border-bottom:1px solid #999!important}.ui-sortable-helper .glsr-string-td2{border-right:1px solid #999}@media screen and (max-width:782px){.ui-sortable-helper .glsr-string-td1{border:1px solid #999}.ui-sortable-helper.is-expanded .glsr-string-td1{border-bottom:none!important}.ui-sortable-helper.is-expanded .glsr-string-td2{border:1px solid #999;border-top-color:#f1f1f1!important}}.glsr-search-multibox,.glsr-search-multibox-entries{display:flex;margin:0;position:relative}.glsr-search-multibox-entries{background-color:#fff;border-radius:4px;border:1px solid #7e8993;box-shadow:0 0 0 transparent;color:#32373c;flex-direction:column;width:100%;z-index:2}.glsr-search-multibox-entries:focus-within{border-color:#007cba;box-shadow:0 0 0 1px #007cba;outline:2px solid transparent;z-index:20}.glsr-search-multibox .glsr-selected-entries{display:flex;flex-wrap:wrap;padding-right:6px}.glsr-search-multibox .glsr-selected-entries>span{align-items:center;background:rgba(0,0,0,.07);border-radius:3px;box-sizing:border-box;display:flex;font-size:11px;font-style:normal;height:24px;line-height:1;margin:6px 0 0 6px;padding:0 8px 0 24px;position:relative}.glsr-search-multibox .glsr-selected-entries a{color:inherit;pointer-events:none}.glsr-search-multibox .glsr-remove-button{left:2px}.glsr-search-multibox .glsr-remove-icon:before{color:#757575}.glsr-search-multibox input[type=search].glsr-search-input{border:none;margin:0;background:transparent;width:auto;flex-grow:1}.glsr-search-multibox input[type=search].glsr-search-input:focus{outline:none;box-shadow:none}.glsr-search-multibox .glsr-spinner{top:auto;bottom:5px;right:7px}@media screen and (max-width:782px){.glsr-search-multibox .glsr-remove-button{left:6px}.glsr-search-multibox .glsr-selected-entries>span{margin:8px 0 0 8px;font-size:14px;height:32px;padding:8px 10px 8px 30px}.glsr-search-multibox .glsr-spinner{bottom:10px;right:10px}}.glsr-multibox-entry{color:#444;display:block;margin-left:20px}.glsr-remove-button{position:absolute;left:-4px;width:20px;height:20px;border:none;margin:0;padding:0;background:0 0;cursor:pointer;text-indent:0}.glsr-remove-button:focus .glsr-remove-icon:before,.glsr-remove-button:hover .glsr-remove-icon:before{color:#1e1e1e}.glsr-remove-icon:before{margin-left:0;border-radius:50%;color:#007cba;color:var(--wp-admin-theme-color);line-height:1.28;background:0 0;content:"";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glsr-status{max-width:750px}.glsr-status th.column-primary{width:50%}.glsr-status td.column-primary{position:relative;font-size:14px!important;font-weight:600}.glsr-status td.column-primary span{font-weight:400}.glsr-status .toggle-row{top:0}.glsr-status .toggle-row:before{top:6px}.glsr-status tfoot td.glsr-radio-column,.glsr-status thead td.glsr-radio-column{color:#82878c;text-align:center;padding-left:4px}@media screen and (max-width:782px){.glsr-status th input[type=radio]{margin-bottom:8px}.glsr-status tfoot td.glsr-radio-column,.glsr-status thead td.glsr-radio-column{padding-top:4px;padding-left:9px}}.wrap nav.glsr-nav-tab-wrapper{margin-top:12px;padding-top:0}nav.glsr-nav-tab-wrapper a.glsr-nav-tab:focus{box-shadow:none;outline-offset:-1px;outline:2px solid #0071a1}.wrap>.glsr-nav-view{margin-top:20px}.glsr-subsubsub{display:flex;flex-wrap:wrap;float:none;margin-top:.5em;text-align:left}.glsr-subsubsub li{align-items:center;display:flex}.glsr-subsubsub li a{padding:0 .2em}.glsr-subsubsub li span{margin:0 .2em}.glsr-subsubsub li:last-child span{display:none}body[class*=type-site-review] [data-tippy-root]{max-width:calc(100vw - 10px)}body[class*=type-site-review] .tippy-box{background-color:#2c3338;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}body[class*=type-site-review] .tippy-box a{color:#72aee6}body[class*=type-site-review] .tippy-box a:hover{color:#4f94d4}body[class*=type-site-review] .tippy-box code{background-color:hsla(0,0%,100%,.25);display:inline-block;padding:0 3px;border-radius:2px}body[class*=type-site-review] .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=top]{transform-origin:bottom}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement=top-start]{transform-origin:left bottom}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=right]{transform-origin:left}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=bottom]{transform-origin:top}body[class*=type-site-review] .tippy-box[data-animation=scale][data-placement^=left]{transform-origin:right}body[class*=type-site-review] .tippy-box[data-animation=scale][data-state=hidden]{transform:scale(.5);opacity:0}body[class*=type-site-review] .tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}body[class*=type-site-review] .tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}body[class*=type-site-review] .tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}body[class*=type-site-review] .tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}body[class*=type-site-review] .tippy-box[data-placement^=left]>.tippy-arrow{right:0}body[class*=type-site-review] .tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}body[class*=type-site-review] .tippy-box[data-placement^=right]>.tippy-arrow{left:0}body[class*=type-site-review] .tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}body[class*=type-site-review] .tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}body[class*=type-site-review] .tippy-arrow{color:#2c3338;height:16px;width:16px}body[class*=type-site-review] .tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}body[class*=type-site-review] .tippy-content{padding:8px 10px;position:relative;z-index:1}.glsr-screenshot{border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box}.glsr-welcome .badge{position:absolute;top:1em;right:0;padding:.25rem .5rem;font-weight:500;font-size:16px;text-rendering:optimizeLegibility;background-color:#72777c;color:#fff;border-radius:5px}@media only screen and (max-width:500px){.glsr-welcome .badge{display:inline-block;position:relative;top:auto}}.glsr-welcome.about-wrap{margin-top:40px}.glsr-welcome.about-wrap .inside li,.glsr-welcome.about-wrap .inside p{font-size:16px}.glsr-welcome .glsr-about-text{margin:1em 0}.glsr-welcome-banner{margin:2em 0 0}.glsr-welcome .about-buttons{display:flex;flex-wrap:wrap;margin:1.5em 0}.glsr-welcome .components-button{margin:0 .5em .5em 0}.glsr-welcome .dashicon:before{font:normal 18px dashicons;margin-right:6px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glsr-welcome .glsr-nav-view{margin-top:0}.glsr-welcome ul:not(.glsr-flex-row){list-style:circle;padding-left:20px}.glsr-flex-row{display:flex;flex-direction:row;flex-wrap:wrap;margin-left:-20px;margin-right:-20px}.glsr-column{width:100%;max-width:100%;box-sizing:border-box;padding-left:20px;padding-right:20px}@media (min-width:601px){.glsr-has-2-columns .glsr-column,.glsr-has-3-columns .glsr-column{max-width:50%}}@media (min-width:783px){.glsr-has-3-columns .glsr-column{max-width:33.33%}}[class*=post-type-site-review] .row-actions .id>span{color:#999}#wpbody-content .inline-edit-row .glsr-inline-edit-col-right{margin-top:calc(30px + .2em)}#wpbody-content .inline-edit-row .glsr-inline-edit-col-left,#wpbody-content .inline-edit-row .glsr-inline-edit-col-right{width:50%}#wpbody-content .inline-edit-row .glsr-inline-edit-col-left textarea,#wpbody-content .inline-edit-row .glsr-inline-edit-col-right textarea{height:8em}@media screen and (max-width:782px){#wpbody-content .inline-edit-row .glsr-inline-edit-col-left,#wpbody-content .inline-edit-row .glsr-inline-edit-col-right{float:none;margin-top:0;width:100%}}.glsr-responsive-table{position:relative;overflow-x:auto;-webkit-overflow-scrolling:touch;width:100%}.glsr-responsive-table td{white-space:nowrap}.glsr-metabox-table .star-rating .star,.post-type-site-review .star-rating .star{width:16px;font-size:16px;line-height:20px;color:#555}.post-type-site-review .star-rating .star{margin-top:-2px}.post-type-site-review .hide-column-tog+.pinned-icon+svg,.post-type-site-review .wp-list-table .approve,.post-type-site-review .wp-list-table .status-pending .unapprove{display:none}.post-type-site-review .wp-list-table .spam .approve,.post-type-site-review .wp-list-table .status-pending .approve,.post-type-site-review .wp-list-table .trash .approve{display:inline}.post-type-site-review .wp-list-table .approve a{color:#006505}.post-type-site-review .wp-list-table .approve a:hover{color:#007f06}.post-type-site-review .wp-list-table .unapprove a{color:#d98500}.post-type-site-review .wp-list-table .unapprove a:hover{color:#f39500}.post-type-site-review .wp-list-table th.column-rating{width:100px}.post-type-site-review .wp-list-table td.column-is_pinned i.pin-review{align-items:center;cursor:pointer;display:flex;float:none;justify-content:center;margin:0;transition:none}.post-type-site-review .wp-list-table td.column-is_pinned i{line-height:24px;text-indent:-3px}.post-type-site-review .wp-list-table td.column-is_pinned i:not(.pinned){color:rgba(85,85,85,.2)}.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending th.check-column{box-shadow:inset 0 1px 0 rgba(0,0,0,.07),inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending td:nth-child(2){box-shadow:inset 0 1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending:not(.is-expanded) td:nth-child(2){box-shadow:inset 0 1px 0 rgba(0,0,0,.07),inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table tr.status-pending.is-expanded td:last-child,.post-type-site-review .wp-list-table tr.status-pending:not(.is-expanded) td:nth-child(2),.post-type-site-review .wp-list-table tr.status-pending th.check-column{box-shadow:inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table tr.status-pending td,.post-type-site-review .wp-list-table tr.status-pending th.check-column{background-color:#fef7f1}.post-type-site-review .wp-list-table tr.status-pending th.check-column{position:relative;border-left:4px solid #d54e21;z-index:1}.post-type-site-review .wp-list-table tr.status-pending th.check-column input{margin-left:4px}@media screen and (min-width:783px){.post-type-site-review .wp-list-table :not(.status-pending)+tr.status-pending td{box-shadow:inset 0 1px 0 rgba(0,0,0,.07),inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table tr.status-pending td{box-shadow:inset 0 -1px 0 rgba(0,0,0,.07)}.post-type-site-review .wp-list-table th.column-assigned_posts,.post-type-site-review .wp-list-table th.column-assigned_users,.post-type-site-review .wp-list-table th.column-ip_address{white-space:nowrap}.post-type-site-review .wp-list-table th.column-assigned_posts,.post-type-site-review .wp-list-table th.column-assigned_users,.post-type-site-review .wp-list-table th.column-name,.post-type-site-review .wp-list-table th.column-taxonomy-site-review-category,.post-type-site-review .wp-list-table th.column-type{width:120px}.post-type-site-review .wp-list-table th.column-is_pinned{width:45px}.post-type-site-review .wp-list-table th.column-is_pinned span.pinned-icon span{display:none}.post-type-site-review .wp-list-table th.column-is_pinned span.pinned-icon:after{display:inline-block;position:relative;content:"";font:normal 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:16px;height:20px;line-height:22px;font-size:16px;text-align:center}.post-type-site-review .wp-list-table th.column-is_pinned .sorting-indicator{margin-left:3px}.post-type-site-review .wp-list-table td.column-is_pinned{padding:8px 6px}.post-type-site-review .wp-list-table td.column-is_pinned i{text-indent:0}}#available-widgets [class*=site-reviews] .widget-title:before{content:""}.glsr-no-margins{margin:0!important}::-moz-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}:-ms-input-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}::placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}::-webkit-input-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}:-moz-placeholder,::-moz-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}:-ms-input-placeholder{color:#72777c!important;font-size:inherit!important;line-height:inherit!important;opacity:1}
compatibility.php CHANGED
@@ -20,6 +20,9 @@ add_filter('classic_editor_enabled_editors_for_post_type', function ($editors, $
20
  * @see https://wordpress.org/plugins/members/
21
  */
22
  add_action('members_register_caps', function () {
 
 
 
23
  members_register_cap('delete_others_site-reviews', [
24
  'label' => _x("Delete Others' Reviews", 'admin-text', 'site-reviews'),
25
  ]);
@@ -50,8 +53,11 @@ add_action('members_register_caps', function () {
50
  members_register_cap('read_private_site-reviews', [
51
  'label' => _x('Read Private Reviews', 'admin-text', 'site-reviews'),
52
  ]);
53
- members_register_cap('create_site-review', [
54
- 'label' => _x('Create Review (inactive)', 'admin-text', 'site-reviews'),
 
 
 
55
  ]);
56
  });
57
 
@@ -226,18 +232,6 @@ add_filter('site-reviews/build/template/reviews-form', function ($template) {
226
  return $template;
227
  });
228
 
229
- /**
230
- * Fix Star Rating control when review form is used inside an Elementor Pro Popup
231
- * @return string
232
- * @see https://elementor.com/
233
- */
234
- add_filter('site-reviews/enqueue/public/inline-script/after', function ($javascript) {
235
- if (defined('ELEMENTOR_PRO_VERSION') && 0 > version_compare('2.7.0', ELEMENTOR_PRO_VERSION)) {
236
- $javascript .= '"undefined"!==typeof jQuery&&jQuery(document).on("elementor/popup/show",function(){GLSR.Event.trigger("site-reviews/init")});';
237
- }
238
- return $javascript;
239
- }, 1);
240
-
241
  /**
242
  * Remove the "Launch Thrive Architect" button from reviews
243
  * @return array
20
  * @see https://wordpress.org/plugins/members/
21
  */
22
  add_action('members_register_caps', function () {
23
+ members_register_cap('create_site-reviews', [
24
+ 'label' => _x('Create Reviews', 'admin-text', 'site-reviews'),
25
+ ]);
26
  members_register_cap('delete_others_site-reviews', [
27
  'label' => _x("Delete Others' Reviews", 'admin-text', 'site-reviews'),
28
  ]);
53
  members_register_cap('read_private_site-reviews', [
54
  'label' => _x('Read Private Reviews', 'admin-text', 'site-reviews'),
55
  ]);
56
+ members_register_cap('respond_to_site-reviews', [
57
+ 'label' => _x('Respond To Reviews', 'admin-text', 'site-reviews'),
58
+ ]);
59
+ members_register_cap('respond_to_others_site-reviews', [
60
+ 'label' => _x("Respond To Others' Reviews", 'admin-text', 'site-reviews'),
61
  ]);
62
  });
63
 
232
  return $template;
233
  });
234
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  /**
236
  * Remove the "Launch Thrive Architect" button from reviews
237
  * @return array
deprecated.php CHANGED
@@ -1,10 +1,8 @@
1
  <?php
2
 
3
- use GeminiLabs\SiteReviews\Defaults\CreateReviewDefaults;
4
  use GeminiLabs\SiteReviews\Helpers\Str;
5
- use GeminiLabs\SiteReviews\Modules\Backtrace;
6
 
7
- defined('ABSPATH') || die;
8
 
9
  /**
10
  * Provide support for the deprecated {{ assigned_to }} tag
@@ -40,8 +38,8 @@ add_action('plugins_loaded', function () {
40
  }
41
  $metaKey = Str::removePrefix($metaKey, '_');
42
  $metaKeys = [
43
- 'assigned_to', 'author', 'avatar', 'content', 'date', 'email',
44
- 'ip_address', 'pinned', 'rating', 'review_id', 'review_type',
45
  'title', 'url',
46
  ];
47
  if (!in_array($metaKey, $metaKeys)) {
@@ -52,7 +50,7 @@ add_action('plugins_loaded', function () {
52
  return glsr_get_review($postId)->{$metaKey};
53
  }, 10, 3);
54
 
55
- /**
56
  * Application
57
  * @since 5.0.0
58
  */
@@ -65,14 +63,14 @@ add_action('plugins_loaded', function () {
65
  return $config;
66
  }, 9);
67
 
68
- /**
69
  * Modules\Html\ReviewsHtml
70
  * @since 5.0.0
71
  */
72
  add_filter('site-reviews/rendered/template/reviews', function ($html) {
73
  if (has_filter('site-reviews/reviews/reviews-wrapper')) {
74
- $message = 'The "site-reviews/reviews/reviews-wrapper" hook has been removed. Please use a custom "reviews.php" template instead.';
75
- glsr()->append('deprecated', $message);
76
  }
77
  return $html;
78
  });
@@ -89,6 +87,18 @@ add_action('plugins_loaded', function () {
89
  }
90
  return $order;
91
  }, 9);
 
 
 
 
 
 
 
 
 
 
 
 
92
  });
93
 
94
  /**
@@ -108,7 +118,7 @@ function glsr_calculate_ratings() {
108
  * @return object
109
  * @since 5.0.0
110
  */
111
- function glsr_get_rating($args = array()) {
112
  _deprecated_function('glsr_get_rating', '5.0 (of Site Reviews)', 'glsr_get_ratings');
113
  glsr_log()->warning(sprintf(
114
  __('%s is <strong>deprecated</strong> since version %s! Use %s instead.', 'site-reviews'),
1
  <?php
2
 
 
3
  use GeminiLabs\SiteReviews\Helpers\Str;
 
4
 
5
+ defined('ABSPATH') || exit;
6
 
7
  /**
8
  * Provide support for the deprecated {{ assigned_to }} tag
38
  }
39
  $metaKey = Str::removePrefix($metaKey, '_');
40
  $metaKeys = [
41
+ 'assigned_to', 'author', 'avatar', 'content', 'date', 'email',
42
+ 'ip_address', 'pinned', 'rating', 'review_id', 'review_type',
43
  'title', 'url',
44
  ];
45
  if (!in_array($metaKey, $metaKeys)) {
50
  return glsr_get_review($postId)->{$metaKey};
51
  }, 10, 3);
52
 
53
+ /*
54
  * Application
55
  * @since 5.0.0
56
  */
63
  return $config;
64
  }, 9);
65
 
66
+ /*
67
  * Modules\Html\ReviewsHtml
68
  * @since 5.0.0
69
  */
70
  add_filter('site-reviews/rendered/template/reviews', function ($html) {
71
  if (has_filter('site-reviews/reviews/reviews-wrapper')) {
72
+ $message = 'The "site-reviews/reviews/reviews-wrapper" hook has been removed. Please use a custom "reviews.php" template instead.';
73
+ glsr()->append('deprecated', $message);
74
  }
75
  return $html;
76
  });
87
  }
88
  return $order;
89
  }, 9);
90
+
91
+ /*
92
+ * Controllers\ListTableController
93
+ * @since 5.11.0
94
+ */
95
+ add_filter('site-reviews/defaults/review-table-filters', function ($defaults) {
96
+ if (has_filter('site-reviews/review-table/filter')) {
97
+ $message = 'The "site-reviews/review-table/filter" hook has been deprecated. Please use the "site-reviews/defaults/review-table-filters" hook instead.';
98
+ glsr()->append('deprecated', $message);
99
+ }
100
+ return $defaults;
101
+ });
102
  });
103
 
104
  /**
118
  * @return object
119
  * @since 5.0.0
120
  */
121
+ function glsr_get_rating($args = []) {
122
  _deprecated_function('glsr_get_rating', '5.0 (of Site Reviews)', 'glsr_get_ratings');
123
  glsr_log()->warning(sprintf(
124
  __('%s is <strong>deprecated</strong> since version %s! Use %s instead.', 'site-reviews'),
helpers.php CHANGED
@@ -16,9 +16,10 @@ use GeminiLabs\SiteReviews\Modules\Backtrace;
16
  use GeminiLabs\SiteReviews\Modules\Console;
17
  use GeminiLabs\SiteReviews\Modules\Html\Partial;
18
  use GeminiLabs\SiteReviews\Modules\Rating;
 
19
  use GeminiLabs\SiteReviews\Request;
20
 
21
- defined('ABSPATH') || die;
22
 
23
  /*
24
  * Alternate method of using the functions without having to use `function_exists()`
@@ -33,13 +34,13 @@ add_filter('plugins_loaded', function () {
33
  'glsr_get' => 4,
34
  'glsr_get_option' => 4,
35
  'glsr_get_options' => 1,
36
- 'glsr_get_rating' => 2,
37
  'glsr_get_ratings' => 2,
38
  'glsr_get_review' => 2,
39
  'glsr_get_reviews' => 2,
40
  'glsr_log' => 3,
41
  'glsr_star_rating' => 4,
42
  'glsr_trace' => 2,
 
43
  ];
44
  foreach ($hooks as $function => $acceptedArgs) {
45
  add_filter($function, function () use ($function) {
@@ -70,9 +71,9 @@ function glsr($alias = null, array $parameters = [])
70
  /**
71
  * @return \GeminiLabs\SiteReviews\Review|false
72
  */
73
- function glsr_create_review($reviewValues = [])
74
  {
75
- $values = Arr::removeEmptyValues(Arr::consolidate($reviewValues));
76
  $request = new Request($values);
77
  $command = new CreateReview($request);
78
  return $command->isValid()
@@ -89,7 +90,7 @@ function glsr_current_screen()
89
  $screen = get_current_screen();
90
  }
91
  return empty($screen)
92
- ? (object) array_fill_keys(['base', 'id', 'post_type'], null)
93
  : $screen;
94
  }
95
 
@@ -165,7 +166,7 @@ function glsr_get_ratings($args = [])
165
  */
166
  function glsr_get_review($postId)
167
  {
168
- return glsr(ReviewManager::class)->get(Helper::getPostId($postId));
169
  }
170
 
171
  /**
@@ -221,3 +222,12 @@ function glsr_trace($limit = 5)
221
  {
222
  glsr_log(glsr(Backtrace::class)->trace($limit));
223
  }
 
 
 
 
 
 
 
 
 
16
  use GeminiLabs\SiteReviews\Modules\Console;
17
  use GeminiLabs\SiteReviews\Modules\Html\Partial;
18
  use GeminiLabs\SiteReviews\Modules\Rating;
19
+ use GeminiLabs\SiteReviews\Modules\Sanitizer;
20
  use GeminiLabs\SiteReviews\Request;
21
 
22
+ defined('ABSPATH') || exit;
23
 
24
  /*
25
  * Alternate method of using the functions without having to use `function_exists()`
34
  'glsr_get' => 4,
35
  'glsr_get_option' => 4,
36
  'glsr_get_options' => 1,
 
37
  'glsr_get_ratings' => 2,
38
  'glsr_get_review' => 2,
39
  'glsr_get_reviews' => 2,
40
  'glsr_log' => 3,
41
  'glsr_star_rating' => 4,
42
  'glsr_trace' => 2,
43
+ 'glsr_update_review' => 3,
44
  ];
45
  foreach ($hooks as $function => $acceptedArgs) {
46
  add_filter($function, function () use ($function) {
71
  /**
72
  * @return \GeminiLabs\SiteReviews\Review|false
73
  */
74
+ function glsr_create_review($values = [])
75
  {
76
+ $values = Arr::removeEmptyValues(Arr::consolidate($values));
77
  $request = new Request($values);
78
  $command = new CreateReview($request);
79
  return $command->isValid()
90
  $screen = get_current_screen();
91
  }
92
  return empty($screen)
93
+ ? (object) array_fill_keys(['action', 'base', 'id', 'post_type'], null)
94
  : $screen;
95
  }
96
 
166
  */
167
  function glsr_get_review($postId)
168
  {
169
+ return glsr(ReviewManager::class)->get($postId);
170
  }
171
 
172
  /**
222
  {
223
  glsr_log(glsr(Backtrace::class)->trace($limit));
224
  }
225
+
226
+ /**
227
+ * @param int $postId
228
+ * @return \GeminiLabs\SiteReviews\Review|false
229
+ */
230
+ function glsr_update_review($postId, $values = [])
231
+ {
232
+ return glsr(ReviewManager::class)->update($postId, Arr::consolidate($values));
233
+ }
languages/site-reviews-en_US.mo CHANGED
Binary file
languages/site-reviews-en_US.po CHANGED
@@ -18,7 +18,7 @@ msgstr ""
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "Language: en_US\n"
20
 
21
- #: deprecated.php:101
22
  msgid ""
23
  "%s is <strong>deprecated</strong> since version %s with no alternative "
24
  "available."
@@ -26,7 +26,7 @@ msgstr ""
26
  "%s is <strong>deprecated</strong> since version %s with no alternative "
27
  "available."
28
 
29
- #: deprecated.php:114
30
  msgid "%s is <strong>deprecated</strong> since version %s! Use %s instead."
31
  msgstr "%s is <strong>deprecated</strong> since version %s! Use %s instead."
32
 
@@ -318,7 +318,7 @@ msgstr "Review of %s"
318
  msgid "Show less"
319
  msgstr "Show less"
320
 
321
- #: plugin/Modules/Html/Tags/ReviewResponseTag.php:15
322
  msgid "Response from %s"
323
  msgstr "Response from %s"
324
 
@@ -369,58 +369,68 @@ msgstr "This plugin requires %s or greater in order to work properly."
369
 
370
  #: compatibility.php:24
371
  msgctxt "admin-text"
 
 
 
 
 
372
  msgid "Delete Others' Reviews"
373
  msgstr "Delete Others' Reviews"
374
 
375
- #: compatibility.php:27
376
  msgctxt "admin-text"
377
  msgid "Delete Reviews"
378
  msgstr "Delete Reviews"
379
 
380
- #: compatibility.php:30
381
  msgctxt "admin-text"
382
  msgid "Delete Private Reviews"
383
  msgstr "Delete Private Reviews"
384
 
385
- #: compatibility.php:33
386
  msgctxt "admin-text"
387
  msgid "Delete Approved Reviews"
388
  msgstr "Delete Approved Reviews"
389
 
390
- #: compatibility.php:36
391
  msgctxt "admin-text"
392
  msgid "Edit Others' Reviews"
393
  msgstr "Edit Others' Reviews"
394
 
395
- #: compatibility.php:39
396
  msgctxt "admin-text"
397
  msgid "Edit Reviews"
398
  msgstr "Edit Reviews"
399
 
400
- #: compatibility.php:42
401
  msgctxt "admin-text"
402
  msgid "Edit Private Reviews"
403
  msgstr "Edit Private Reviews"
404
 
405
- #: compatibility.php:45
406
  msgctxt "admin-text"
407
  msgid "Edit Approved Reviews"
408
  msgstr "Edit Approved Reviews"
409
 
410
- #: compatibility.php:48
411
  msgctxt "admin-text"
412
  msgid "Approve Reviews"
413
  msgstr "Approve Reviews"
414
 
415
- #: compatibility.php:51
416
  msgctxt "admin-text"
417
  msgid "Read Private Reviews"
418
  msgstr "Read Private Reviews"
419
 
420
- #: compatibility.php:54
 
 
 
 
 
421
  msgctxt "admin-text"
422
- msgid "Create Review (inactive)"
423
- msgstr "Create Review (inactive)"
424
 
425
  #: config/settings.php:9
426
  msgctxt "admin-text"
@@ -948,7 +958,7 @@ msgstr ""
948
  "changed on the %s page. You may also override this by using the "
949
  "\"fallback\" option on the shortcode."
950
 
951
- #: config/settings.php:264, plugin/Controllers/MenuController.php:119
952
  msgctxt "admin-text"
953
  msgid "Translations"
954
  msgstr "Translations"
@@ -1488,7 +1498,7 @@ msgstr ""
1488
  "The [%s] method has been deprecated and will be soon be removed, please use "
1489
  "the [%s] method instead."
1490
 
1491
- #: plugin/Review.php:328, plugin/Controllers/ListTableColumns/ColumnValueAuthorName.php:20
1492
  msgctxt "admin-text"
1493
  msgid "Unknown"
1494
  msgstr "Unknown"
@@ -1563,12 +1573,17 @@ msgctxt "admin-text"
1563
  msgid "Terms Accepted"
1564
  msgstr "Terms Accepted"
1565
 
1566
- #: plugin/Addons/Controller.php:70, plugin/Controllers/AdminController.php:49, plugin/Controllers/MenuController.php:51, views/pages/tools/sync.php:23
 
 
 
 
 
1567
  msgctxt "admin-text"
1568
  msgid "Settings"
1569
  msgstr "Settings"
1570
 
1571
- #: plugin/Addons/Controller.php:76, plugin/Controllers/AdminController.php:55, plugin/Controllers/MenuController.php:54
1572
  msgctxt "admin-text"
1573
  msgid "Help"
1574
  msgstr "Help"
@@ -1623,7 +1638,7 @@ msgctxt "admin-text"
1623
  msgid "See the %s for more details."
1624
  msgstr "See the %s for more details."
1625
 
1626
- #: plugin/Commands/ImportReviews.php:146, plugin/Controllers/MenuController.php:145
1627
  msgctxt "admin-text"
1628
  msgid "Console"
1629
  msgstr "Console"
@@ -1668,29 +1683,29 @@ msgctxt "admin-text"
1668
  msgid "Edit"
1669
  msgstr "Edit"
1670
 
1671
- #: plugin/Controllers/AdminController.php:86
1672
  msgctxt "admin-text"
1673
  msgid "%s Review"
1674
  msgid_plural "%s Reviews"
1675
  msgstr[0] "%s Review"
1676
  msgstr[1] "%s Reviews"
1677
 
1678
- #: plugin/Controllers/AdminController.php:167, plugin/Widgets/SiteReviewsWidget.php:113
1679
  msgctxt "admin-text"
1680
  msgid "Recent Reviews"
1681
  msgstr "Recent Reviews"
1682
 
1683
- #: plugin/Controllers/AdminController.php:168, plugin/Widgets/SiteReviewsFormWidget.php:78
1684
  msgctxt "admin-text"
1685
  msgid "Submit a Review"
1686
  msgstr "Submit a Review"
1687
 
1688
- #: plugin/Controllers/AdminController.php:169, plugin/Widgets/SiteReviewsSummaryWidget.php:81
1689
  msgctxt "admin-text"
1690
  msgid "Summary of Reviews"
1691
  msgstr "Summary of Reviews"
1692
 
1693
- #: plugin/Controllers/AdminController.php:204, plugin/Controllers/AdminController.php:224, plugin/Controllers/AdminController.php:237
1694
  msgctxt "admin-text"
1695
  msgid "Nothing found."
1696
  msgstr "Nothing found."
@@ -1700,26 +1715,56 @@ msgctxt "admin-text"
1700
  msgid "Okay"
1701
  msgstr "Okay"
1702
 
1703
- #: plugin/Controllers/EditorController.php:188
1704
  msgctxt "admin-text"
1705
- msgid "%s reviews are read-only."
1706
- msgstr "%s reviews are read-only."
1707
 
1708
- #: plugin/Controllers/ListTableController.php:48
 
 
 
 
 
1709
  msgctxt "admin-text"
1710
  msgid "Submitted"
1711
  msgstr "Submitted"
1712
 
1713
- #: plugin/Controllers/ListTableController.php:102, plugin/Controllers/TranslationController.php:197, plugin/Defaults/PostStatusLabelsDefaults.php:18
1714
  msgctxt "admin-text"
1715
  msgid "Approve"
1716
  msgstr "Approve"
1717
 
1718
- #: plugin/Controllers/ListTableController.php:103
1719
  msgctxt "admin-text"
1720
  msgid "Unapprove"
1721
  msgstr "Unapprove"
1722
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1723
  #: plugin/Controllers/MainController.php:105
1724
  msgctxt "admin-text"
1725
  msgid "Local Review"
@@ -1735,67 +1780,72 @@ msgctxt "admin-text"
1735
  msgid "Add-ons"
1736
  msgstr "Add-ons"
1737
 
1738
- #: plugin/Controllers/MenuController.php:89, plugin/Controllers/WelcomeController.php:104
1739
  msgctxt "admin-text"
1740
  msgid "Support"
1741
  msgstr "Support"
1742
 
1743
- #: plugin/Controllers/MenuController.php:90, plugin/Controllers/ToolsController.php:89
1744
  msgctxt "admin-text"
1745
  msgid "FAQ"
1746
  msgstr "FAQ"
1747
 
1748
- #: plugin/Controllers/MenuController.php:91
1749
  msgctxt "admin-text"
1750
  msgid "Shortcodes"
1751
  msgstr "Shortcodes"
1752
 
1753
- #: plugin/Controllers/MenuController.php:92
1754
  msgctxt "admin-text"
1755
  msgid "Hooks"
1756
  msgstr "Hooks"
1757
 
1758
- #: plugin/Controllers/MenuController.php:93
1759
  msgctxt "admin-text"
1760
  msgid "Functions"
1761
  msgstr "Functions"
1762
 
1763
- #: plugin/Controllers/MenuController.php:94, plugin/Controllers/MenuController.php:120
 
 
 
 
 
1764
  msgctxt "admin-text"
1765
  msgid "Addons"
1766
  msgstr "Addons"
1767
 
1768
- #: plugin/Controllers/MenuController.php:115, plugin/Controllers/MenuController.php:143
1769
  msgctxt "admin-text"
1770
  msgid "General"
1771
  msgstr "General"
1772
 
1773
- #: plugin/Controllers/MenuController.php:116, plugin/Controllers/PrivacyController.php:141, plugin/Defaults/PostTypeLabelDefaults.php:14, views/pages/tools/sync.php:10, views/pages/tools/sync.php:31
1774
  msgctxt "admin-text"
1775
  msgid "Reviews"
1776
  msgstr "Reviews"
1777
 
1778
- #: plugin/Controllers/MenuController.php:117
1779
  msgctxt "admin-text"
1780
  msgid "Submissions"
1781
  msgstr "Submissions"
1782
 
1783
- #: plugin/Controllers/MenuController.php:118, plugin/Tinymce/SiteReviewsSummaryTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:66
1784
  msgctxt "admin-text"
1785
  msgid "Schema"
1786
  msgstr "Schema"
1787
 
1788
- #: plugin/Controllers/MenuController.php:121
1789
  msgctxt "admin-text"
1790
  msgid "Licenses"
1791
  msgstr "Licenses"
1792
 
1793
- #: plugin/Controllers/MenuController.php:144, views/pages/tools/sync.php:57
1794
  msgctxt "admin-text"
1795
  msgid "Sync Reviews"
1796
  msgstr "Sync Reviews"
1797
 
1798
- #: plugin/Controllers/MenuController.php:146
1799
  msgctxt "admin-text"
1800
  msgid "System Info"
1801
  msgstr "System Info"
@@ -1820,7 +1870,7 @@ msgctxt "admin-text"
1820
  msgid "(no title)"
1821
  msgstr "(no title)"
1822
 
1823
- #: plugin/Controllers/MetaboxController.php:158, plugin/Controllers/ListTableColumns/ColumnValueResponse.php:17
1824
  msgctxt "admin-text"
1825
  msgid "No"
1826
  msgstr "No"
@@ -2189,8 +2239,8 @@ msgstr "Console is empty"
2189
 
2190
  #: plugin/Modules/Console.php:290
2191
  msgctxt "admin-text"
2192
- msgid "Console was automatically cleared (256KB maximum size)"
2193
- msgstr "Console was automatically cleared (256KB maximum size)"
2194
 
2195
  #: plugin/Modules/Translation.php:121
2196
  msgctxt "admin-text"
@@ -2412,7 +2462,7 @@ msgctxt "admin-text"
2412
  msgid "How many reviews would you like to display (default: 10)?"
2413
  msgstr "How many reviews would you like to display (default: 10)?"
2414
 
2415
- #: plugin/Tinymce/SiteReviewsTinymce.php:33, plugin/Tinymce/SiteReviewsTinymce.php:34, plugin/Tinymce/SiteReviewsTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:36, plugin/Tinymce/SiteReviewsTinymce.php:37, plugin/Widgets/SiteReviewsWidget.php:33, plugin/Widgets/SiteReviewsWidget.php:34, plugin/Widgets/SiteReviewsWidget.php:35, plugin/Widgets/SiteReviewsWidget.php:36, plugin/Widgets/SiteReviewsWidget.php:37, plugin/Widgets/SiteReviewsWidget.php:38, plugin/Controllers/ListTableColumns/ColumnFilterRating.php:19
2416
  msgctxt "admin-text"
2417
  msgid "%s star"
2418
  msgid_plural "%s stars"
@@ -2488,7 +2538,7 @@ msgctxt "admin-text"
2488
  msgid "- Select -"
2489
  msgstr "- Select -"
2490
 
2491
- #: plugin/Tinymce/TinymceGenerator.php:320
2492
  msgctxt "admin-text"
2493
  msgid "Some of the shortcode options are required."
2494
  msgstr "Some of the shortcode options are required."
@@ -2533,7 +2583,7 @@ msgctxt "admin-text"
2533
  msgid "Site Reviews: Display a form to submit reviews."
2534
  msgstr "Site Reviews: Display a form to submit reviews."
2535
 
2536
- #: plugin/Widgets/SiteReviewsSummaryWidget.php:27
2537
  msgctxt "admin-text"
2538
  msgid "All review types"
2539
  msgstr "All review types"
@@ -2598,25 +2648,210 @@ msgctxt "admin-text"
2598
  msgid "Site Reviews: Unknown Widget"
2599
  msgstr "Site Reviews: Unknown Widget"
2600
 
2601
- #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:17
2602
  msgctxt "admin-text"
2603
- msgid "All ratings"
2604
- msgstr "All ratings"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2605
 
2606
- #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:25
 
 
 
 
 
 
 
 
 
 
2607
  msgctxt "admin-text"
2608
  msgid "Filter by rating"
2609
  msgstr "Filter by rating"
2610
 
2611
- #: plugin/Controllers/ListTableColumns/ColumnFilterType.php:22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2612
  msgctxt "admin-text"
2613
- msgid "Filter by type"
2614
- msgstr "Filter by type"
2615
 
2616
- #: plugin/Controllers/ListTableColumns/ColumnFilterType.php:26
2617
  msgctxt "admin-text"
2618
- msgid "All types"
2619
- msgstr "All types"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2620
 
2621
  #: views/pages/addons/index.php:13
2622
  msgctxt "admin-text"
@@ -2944,26 +3179,11 @@ msgctxt "admin-text"
2944
  msgid "OK"
2945
  msgstr "OK"
2946
 
2947
- #: views/partials/editor/pinned.php:17
2948
  msgctxt "admin-text"
2949
  msgid "Cancel"
2950
  msgstr "Cancel"
2951
 
2952
- #: views/partials/editor/review.php:4
2953
- msgctxt "admin-text"
2954
- msgid "no title"
2955
- msgstr "no title"
2956
-
2957
- #: views/partials/editor/review.php:17
2958
- msgctxt "admin-text"
2959
- msgid "Toggle panel: Public Response"
2960
- msgstr "Toggle panel: Public Response"
2961
-
2962
- #: views/partials/editor/review.php:21
2963
- msgctxt "admin-text"
2964
- msgid "Public Response"
2965
- msgstr "Public Response"
2966
-
2967
  #: views/partials/notices/migrate.php:6
2968
  msgctxt "admin-text"
2969
  msgid "Database Update Required"
@@ -3010,6 +3230,36 @@ msgctxt "admin-text"
3010
  msgid "Read the upgrade guide"
3011
  msgstr "Read the upgrade guide"
3012
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3013
  #: views/partials/translations/plural.php:4, views/partials/translations/single.php:4
3014
  msgctxt "admin-text"
3015
  msgid "Show custom translation"
@@ -3035,6 +3285,153 @@ msgctxt "admin-text"
3035
  msgid "plural"
3036
  msgstr "plural"
3037
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3038
  #: views/pages/tools/general/export-plugin-settings.php:6
3039
  msgctxt "admin-text"
3040
  msgid "Export Plugin Settings"
@@ -3430,6 +3827,265 @@ msgctxt "admin-text"
3430
  msgid "Test Detection"
3431
  msgstr "Test Detection"
3432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3433
  #: config/settings.php:218
3434
  msgctxt "avatar size (admin-text)"
3435
  msgid "pixels"
@@ -3440,12 +4096,12 @@ msgctxt "exceprt length (admin-text)"
3440
  msgid "words"
3441
  msgstr "words"
3442
 
3443
- #: plugin/Controllers/ListTableController.php:105
3444
  msgctxt "The Review Post ID (admin-text)"
3445
  msgid "<span>ID: %d</span>"
3446
  msgstr "<span>ID: %d</span>"
3447
 
3448
- #: plugin/Controllers/ListTableController.php:108
3449
  msgctxt "Approve the review (admin-text)"
3450
  msgid "%s this review"
3451
  msgstr "%s this review"
@@ -3524,7 +4180,7 @@ msgid_plural "New %s-star review of %s"
3524
  msgstr[0] "New %s-star review"
3525
  msgstr[1] "New %s-star review of %s"
3526
 
3527
- #: plugin/Tinymce/TinymceGenerator.php:325
3528
  msgctxt "the option label (admin-text)"
3529
  msgid "The \"%s\" option is required."
3530
  msgstr "The \"%s\" option is required."
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
  "Language: en_US\n"
20
 
21
+ #: deprecated.php:111
22
  msgid ""
23
  "%s is <strong>deprecated</strong> since version %s with no alternative "
24
  "available."
26
  "%s is <strong>deprecated</strong> since version %s with no alternative "
27
  "available."
28
 
29
+ #: deprecated.php:124
30
  msgid "%s is <strong>deprecated</strong> since version %s! Use %s instead."
31
  msgstr "%s is <strong>deprecated</strong> since version %s! Use %s instead."
32
 
318
  msgid "Show less"
319
  msgstr "Show less"
320
 
321
+ #: plugin/Modules/Html/Tags/ReviewResponseTag.php:16, views/pages/documentation/faq/change-response-name.php:9
322
  msgid "Response from %s"
323
  msgstr "Response from %s"
324
 
369
 
370
  #: compatibility.php:24
371
  msgctxt "admin-text"
372
+ msgid "Create Reviews"
373
+ msgstr "Create Reviews"
374
+
375
+ #: compatibility.php:27
376
+ msgctxt "admin-text"
377
  msgid "Delete Others' Reviews"
378
  msgstr "Delete Others' Reviews"
379
 
380
+ #: compatibility.php:30
381
  msgctxt "admin-text"
382
  msgid "Delete Reviews"
383
  msgstr "Delete Reviews"
384
 
385
+ #: compatibility.php:33
386
  msgctxt "admin-text"
387
  msgid "Delete Private Reviews"
388
  msgstr "Delete Private Reviews"
389
 
390
+ #: compatibility.php:36
391
  msgctxt "admin-text"
392
  msgid "Delete Approved Reviews"
393
  msgstr "Delete Approved Reviews"
394
 
395
+ #: compatibility.php:39
396
  msgctxt "admin-text"
397
  msgid "Edit Others' Reviews"
398
  msgstr "Edit Others' Reviews"
399
 
400
+ #: compatibility.php:42
401
  msgctxt "admin-text"
402
  msgid "Edit Reviews"
403
  msgstr "Edit Reviews"
404
 
405
+ #: compatibility.php:45
406
  msgctxt "admin-text"
407
  msgid "Edit Private Reviews"
408
  msgstr "Edit Private Reviews"
409
 
410
+ #: compatibility.php:48
411
  msgctxt "admin-text"
412
  msgid "Edit Approved Reviews"
413
  msgstr "Edit Approved Reviews"
414
 
415
+ #: compatibility.php:51
416
  msgctxt "admin-text"
417
  msgid "Approve Reviews"
418
  msgstr "Approve Reviews"
419
 
420
+ #: compatibility.php:54
421
  msgctxt "admin-text"
422
  msgid "Read Private Reviews"
423
  msgstr "Read Private Reviews"
424
 
425
+ #: compatibility.php:57
426
+ msgctxt "admin-text"
427
+ msgid "Respond To Reviews"
428
+ msgstr "Respond To Reviews"
429
+
430
+ #: compatibility.php:60
431
  msgctxt "admin-text"
432
+ msgid "Respond To Others' Reviews"
433
+ msgstr "Respond To Others' Reviews"
434
 
435
  #: config/settings.php:9
436
  msgctxt "admin-text"
958
  "changed on the %s page. You may also override this by using the "
959
  "\"fallback\" option on the shortcode."
960
 
961
+ #: config/settings.php:264, plugin/Controllers/MenuController.php:138
962
  msgctxt "admin-text"
963
  msgid "Translations"
964
  msgstr "Translations"
1498
  "The [%s] method has been deprecated and will be soon be removed, please use "
1499
  "the [%s] method instead."
1500
 
1501
+ #: plugin/Review.php:323, plugin/Controllers/ListTableColumns/ColumnValueAuthorName.php:20
1502
  msgctxt "admin-text"
1503
  msgid "Unknown"
1504
  msgstr "Unknown"
1573
  msgid "Terms Accepted"
1574
  msgstr "Terms Accepted"
1575
 
1576
+ #: plugin/Addons/Addon.php:74
1577
+ msgctxt "admin-text"
1578
+ msgid "Untitled"
1579
+ msgstr "Untitled"
1580
+
1581
+ #: plugin/Addons/Controller.php:70, plugin/Controllers/AdminController.php:50, plugin/Controllers/MenuController.php:51, plugin/Integrations/Elementor/ElementorWidget.php:99, views/pages/tools/sync.php:23
1582
  msgctxt "admin-text"
1583
  msgid "Settings"
1584
  msgstr "Settings"
1585
 
1586
+ #: plugin/Addons/Controller.php:76, plugin/Controllers/AdminController.php:56, plugin/Controllers/MenuController.php:54
1587
  msgctxt "admin-text"
1588
  msgid "Help"
1589
  msgstr "Help"
1638
  msgid "See the %s for more details."
1639
  msgstr "See the %s for more details."
1640
 
1641
+ #: plugin/Commands/ImportReviews.php:146, plugin/Controllers/MenuController.php:164
1642
  msgctxt "admin-text"
1643
  msgid "Console"
1644
  msgstr "Console"
1683
  msgid "Edit"
1684
  msgstr "Edit"
1685
 
1686
+ #: plugin/Controllers/AdminController.php:100
1687
  msgctxt "admin-text"
1688
  msgid "%s Review"
1689
  msgid_plural "%s Reviews"
1690
  msgstr[0] "%s Review"
1691
  msgstr[1] "%s Reviews"
1692
 
1693
+ #: plugin/Controllers/AdminController.php:181, plugin/Widgets/SiteReviewsWidget.php:113
1694
  msgctxt "admin-text"
1695
  msgid "Recent Reviews"
1696
  msgstr "Recent Reviews"
1697
 
1698
+ #: plugin/Controllers/AdminController.php:182, plugin/Widgets/SiteReviewsFormWidget.php:78, plugin/Integrations/Elementor/ElementorFormWidget.php:21
1699
  msgctxt "admin-text"
1700
  msgid "Submit a Review"
1701
  msgstr "Submit a Review"
1702
 
1703
+ #: plugin/Controllers/AdminController.php:183, plugin/Widgets/SiteReviewsSummaryWidget.php:81
1704
  msgctxt "admin-text"
1705
  msgid "Summary of Reviews"
1706
  msgstr "Summary of Reviews"
1707
 
1708
+ #: plugin/Controllers/AdminController.php:218, plugin/Controllers/AdminController.php:238, plugin/Controllers/AdminController.php:251
1709
  msgctxt "admin-text"
1710
  msgid "Nothing found."
1711
  msgstr "Nothing found."
1715
  msgid "Okay"
1716
  msgstr "Okay"
1717
 
1718
+ #: plugin/Controllers/EditorController.php:140
1719
  msgctxt "admin-text"
1720
+ msgid "Publicly responding to third-party %s reviews is disabled."
1721
+ msgstr "Publicly responding to third-party %s reviews is disabled."
1722
 
1723
+ #: plugin/Controllers/ListTableController.php:41, plugin/Overrides/ReviewsListTable.php:69
1724
+ msgctxt "admin-text"
1725
+ msgid "%s is currently editing"
1726
+ msgstr "%s is currently editing"
1727
+
1728
+ #: plugin/Controllers/ListTableController.php:81
1729
  msgctxt "admin-text"
1730
  msgid "Submitted"
1731
  msgstr "Submitted"
1732
 
1733
+ #: plugin/Controllers/ListTableController.php:135, plugin/Controllers/TranslationController.php:197, plugin/Defaults/PostStatusLabelsDefaults.php:18
1734
  msgctxt "admin-text"
1735
  msgid "Approve"
1736
  msgstr "Approve"
1737
 
1738
+ #: plugin/Controllers/ListTableController.php:136
1739
  msgctxt "admin-text"
1740
  msgid "Unapprove"
1741
  msgstr "Unapprove"
1742
 
1743
+ #: plugin/Controllers/ListTableController.php:152
1744
+ msgctxt "admin-text"
1745
+ msgid "Respond inline to &#8220;%s&#8221;"
1746
+ msgstr "Respond inline to &#8220;%s&#8221;"
1747
+
1748
+ #: plugin/Controllers/ListTableController.php:154
1749
+ msgctxt "admin-text"
1750
+ msgid "Respond"
1751
+ msgstr "Respond"
1752
+
1753
+ #: plugin/Controllers/ListTableController.php:227
1754
+ msgctxt "admin-text"
1755
+ msgid "Sorry, you are not allowed to respond to this review."
1756
+ msgstr "Sorry, you are not allowed to respond to this review."
1757
+
1758
+ #: plugin/Controllers/ListTableController.php:231
1759
+ msgctxt "admin-text"
1760
+ msgid "Someone"
1761
+ msgstr "Someone"
1762
+
1763
+ #: plugin/Controllers/ListTableController.php:232
1764
+ msgctxt "admin-text"
1765
+ msgid "Saving is disabled: %s is currently editing this review."
1766
+ msgstr "Saving is disabled: %s is currently editing this review."
1767
+
1768
  #: plugin/Controllers/MainController.php:105
1769
  msgctxt "admin-text"
1770
  msgid "Local Review"
1780
  msgid "Add-ons"
1781
  msgstr "Add-ons"
1782
 
1783
+ #: plugin/Controllers/MenuController.php:107, plugin/Controllers/WelcomeController.php:104
1784
  msgctxt "admin-text"
1785
  msgid "Support"
1786
  msgstr "Support"
1787
 
1788
+ #: plugin/Controllers/MenuController.php:108, plugin/Controllers/ToolsController.php:89
1789
  msgctxt "admin-text"
1790
  msgid "FAQ"
1791
  msgstr "FAQ"
1792
 
1793
+ #: plugin/Controllers/MenuController.php:109
1794
  msgctxt "admin-text"
1795
  msgid "Shortcodes"
1796
  msgstr "Shortcodes"
1797
 
1798
+ #: plugin/Controllers/MenuController.php:110
1799
  msgctxt "admin-text"
1800
  msgid "Hooks"
1801
  msgstr "Hooks"
1802
 
1803
+ #: plugin/Controllers/MenuController.php:111
1804
  msgctxt "admin-text"
1805
  msgid "Functions"
1806
  msgstr "Functions"
1807
 
1808
+ #: plugin/Controllers/MenuController.php:112
1809
+ msgctxt "admin-text"
1810
+ msgid "API"
1811
+ msgstr "API"
1812
+
1813
+ #: plugin/Controllers/MenuController.php:113, plugin/Controllers/MenuController.php:139
1814
  msgctxt "admin-text"
1815
  msgid "Addons"
1816
  msgstr "Addons"
1817
 
1818
+ #: plugin/Controllers/MenuController.php:134, plugin/Controllers/MenuController.php:162
1819
  msgctxt "admin-text"
1820
  msgid "General"
1821
  msgstr "General"
1822
 
1823
+ #: plugin/Controllers/MenuController.php:135, plugin/Controllers/PrivacyController.php:141, plugin/Defaults/PostTypeLabelDefaults.php:14, views/pages/tools/sync.php:10, views/pages/tools/sync.php:31
1824
  msgctxt "admin-text"
1825
  msgid "Reviews"
1826
  msgstr "Reviews"
1827
 
1828
+ #: plugin/Controllers/MenuController.php:136
1829
  msgctxt "admin-text"
1830
  msgid "Submissions"
1831
  msgstr "Submissions"
1832
 
1833
+ #: plugin/Controllers/MenuController.php:137, plugin/Tinymce/SiteReviewsSummaryTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:66
1834
  msgctxt "admin-text"
1835
  msgid "Schema"
1836
  msgstr "Schema"
1837
 
1838
+ #: plugin/Controllers/MenuController.php:140
1839
  msgctxt "admin-text"
1840
  msgid "Licenses"
1841
  msgstr "Licenses"
1842
 
1843
+ #: plugin/Controllers/MenuController.php:163, views/pages/tools/sync.php:57
1844
  msgctxt "admin-text"
1845
  msgid "Sync Reviews"
1846
  msgstr "Sync Reviews"
1847
 
1848
+ #: plugin/Controllers/MenuController.php:165
1849
  msgctxt "admin-text"
1850
  msgid "System Info"
1851
  msgstr "System Info"
1870
  msgid "(no title)"
1871
  msgstr "(no title)"
1872
 
1873
+ #: plugin/Controllers/MetaboxController.php:158, plugin/Controllers/ListTableColumns/ColumnValueResponse.php:17, plugin/Integrations/Elementor/ElementorReviewsWidget.php:84
1874
  msgctxt "admin-text"
1875
  msgid "No"
1876
  msgstr "No"
2239
 
2240
  #: plugin/Modules/Console.php:290
2241
  msgctxt "admin-text"
2242
+ msgid "Console was automatically cleared (512KB maximum size)"
2243
+ msgstr "Console was automatically cleared (512KB maximum size)"
2244
 
2245
  #: plugin/Modules/Translation.php:121
2246
  msgctxt "admin-text"
2462
  msgid "How many reviews would you like to display (default: 10)?"
2463
  msgstr "How many reviews would you like to display (default: 10)?"
2464
 
2465
+ #: plugin/Tinymce/SiteReviewsTinymce.php:33, plugin/Tinymce/SiteReviewsTinymce.php:34, plugin/Tinymce/SiteReviewsTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:36, plugin/Tinymce/SiteReviewsTinymce.php:37, plugin/Widgets/SiteReviewsWidget.php:33, plugin/Widgets/SiteReviewsWidget.php:34, plugin/Widgets/SiteReviewsWidget.php:35, plugin/Widgets/SiteReviewsWidget.php:36, plugin/Widgets/SiteReviewsWidget.php:37, plugin/Widgets/SiteReviewsWidget.php:38, plugin/Controllers/ListTableColumns/ColumnFilterRating.php:37
2466
  msgctxt "admin-text"
2467
  msgid "%s star"
2468
  msgid_plural "%s stars"
2538
  msgid "- Select -"
2539
  msgstr "- Select -"
2540
 
2541
+ #: plugin/Tinymce/TinymceGenerator.php:322
2542
  msgctxt "admin-text"
2543
  msgid "Some of the shortcode options are required."
2544
  msgstr "Some of the shortcode options are required."
2583
  msgid "Site Reviews: Display a form to submit reviews."
2584
  msgstr "Site Reviews: Display a form to submit reviews."
2585
 
2586
+ #: plugin/Widgets/SiteReviewsSummaryWidget.php:27, plugin/Controllers/ListTableColumns/ColumnFilterType.php:23
2587
  msgctxt "admin-text"
2588
  msgid "All review types"
2589
  msgstr "All review types"
2648
  msgid "Site Reviews: Unknown Widget"
2649
  msgstr "Site Reviews: Unknown Widget"
2650
 
2651
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedPost.php:19
2652
  msgctxt "admin-text"
2653
+ msgid "Filter by assigned post"
2654
+ msgstr "Filter by assigned post"
2655
+
2656
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedPost.php:22
2657
+ msgctxt "admin-text"
2658
+ msgid "All assigned posts"
2659
+ msgstr "All assigned posts"
2660
+
2661
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedUser.php:20
2662
+ msgctxt "admin-text"
2663
+ msgid "Filter by assigned user"
2664
+ msgstr "Filter by assigned user"
2665
+
2666
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedUser.php:23
2667
+ msgctxt "admin-text"
2668
+ msgid "All assigned users"
2669
+ msgstr "All assigned users"
2670
 
2671
+ #: plugin/Controllers/ListTableColumns/ColumnFilterCategory.php:17
2672
+ msgctxt "admin-text"
2673
+ msgid "Filter by category"
2674
+ msgstr "Filter by category"
2675
+
2676
+ #: plugin/Controllers/ListTableColumns/ColumnFilterCategory.php:20
2677
+ msgctxt "admin-text"
2678
+ msgid "All categories"
2679
+ msgstr "All categories"
2680
+
2681
+ #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:20
2682
  msgctxt "admin-text"
2683
  msgid "Filter by rating"
2684
  msgstr "Filter by rating"
2685
 
2686
+ #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:23
2687
+ msgctxt "admin-text"
2688
+ msgid "All ratings"
2689
+ msgstr "All ratings"
2690
+
2691
+ #: plugin/Controllers/ListTableColumns/ColumnFilterType.php:20
2692
+ msgctxt "admin-text"
2693
+ msgid "Filter by review type"
2694
+ msgstr "Filter by review type"
2695
+
2696
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:29
2697
+ msgctxt "admin-text"
2698
+ msgid "Assign Reviews to a Page"
2699
+ msgstr "Assign Reviews to a Page"
2700
+
2701
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:32
2702
+ msgctxt "admin-text"
2703
+ msgid "Assign to multiple Post IDs"
2704
+ msgstr "Assign to multiple Post IDs"
2705
+
2706
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:33
2707
+ msgctxt "admin-text"
2708
+ msgid "Assign to the Current Page"
2709
+ msgstr "Assign to the Current Page"
2710
+
2711
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:34
2712
+ msgctxt "admin-text"
2713
+ msgid "Assign to the Parent Page"
2714
+ msgstr "Assign to the Parent Page"
2715
+
2716
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:40, plugin/Integrations/Elementor/ElementorReviewsWidget.php:45, plugin/Integrations/Elementor/ElementorSummaryWidget.php:42
2717
+ msgctxt "admin-text"
2718
+ msgid "Separate with commas."
2719
+ msgstr "Separate with commas."
2720
+
2721
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:42, plugin/Integrations/Elementor/ElementorReviewsWidget.php:47, plugin/Integrations/Elementor/ElementorSummaryWidget.php:44
2722
+ msgctxt "admin-text"
2723
+ msgid "Enter the Post IDs"
2724
+ msgstr "Enter the Post IDs"
2725
+
2726
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:48
2727
+ msgctxt "admin-text"
2728
+ msgid "Assign Reviews to a Category"
2729
+ msgstr "Assign Reviews to a Category"
2730
+
2731
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:56
2732
+ msgctxt "admin-text"
2733
+ msgid "Assign Reviews to a User"
2734
+ msgstr "Assign Reviews to a User"
2735
+
2736
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:59, plugin/Integrations/Elementor/ElementorReviewsWidget.php:64, plugin/Integrations/Elementor/ElementorSummaryWidget.php:61
2737
+ msgctxt "admin-text"
2738
+ msgid "The Logged-in user"
2739
+ msgstr "The Logged-in user"
2740
+
2741
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:26
2742
+ msgctxt "admin-text"
2743
+ msgid "Latest Reviews"
2744
+ msgstr "Latest Reviews"
2745
+
2746
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:34, plugin/Integrations/Elementor/ElementorSummaryWidget.php:31
2747
+ msgctxt "admin-text"
2748
+ msgid "Limit Reviews to an Assigned Page"
2749
+ msgstr "Limit Reviews to an Assigned Page"
2750
+
2751
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:37, plugin/Integrations/Elementor/ElementorSummaryWidget.php:34
2752
+ msgctxt "admin-text"
2753
+ msgid "Assigned to multiple Post IDs"
2754
+ msgstr "Assigned to multiple Post IDs"
2755
+
2756
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:38, plugin/Integrations/Elementor/ElementorSummaryWidget.php:35
2757
+ msgctxt "admin-text"
2758
+ msgid "Assigned to the Current Page"
2759
+ msgstr "Assigned to the Current Page"
2760
+
2761
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:39, plugin/Integrations/Elementor/ElementorSummaryWidget.php:36
2762
+ msgctxt "admin-text"
2763
+ msgid "Assigned to the Parent Page"
2764
+ msgstr "Assigned to the Parent Page"
2765
+
2766
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:53, plugin/Integrations/Elementor/ElementorSummaryWidget.php:50
2767
+ msgctxt "admin-text"
2768
+ msgid "Limit Reviews to an Assigned Category"
2769
+ msgstr "Limit Reviews to an Assigned Category"
2770
+
2771
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:61, plugin/Integrations/Elementor/ElementorSummaryWidget.php:58
2772
+ msgctxt "admin-text"
2773
+ msgid "Limit Reviews to an Assigned User"
2774
+ msgstr "Limit Reviews to an Assigned User"
2775
+
2776
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:69, plugin/Integrations/Elementor/ElementorSummaryWidget.php:66
2777
+ msgctxt "admin-text"
2778
+ msgid "Limit Reviews to terms"
2779
+ msgstr "Limit Reviews to terms"
2780
+
2781
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:72, plugin/Integrations/Elementor/ElementorSummaryWidget.php:69
2782
+ msgctxt "admin-text"
2783
+ msgid "Terms were accepted"
2784
+ msgstr "Terms were accepted"
2785
+
2786
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:73, plugin/Integrations/Elementor/ElementorSummaryWidget.php:70
2787
  msgctxt "admin-text"
2788
+ msgid "Terms were not accepted"
2789
+ msgstr "Terms were not accepted"
2790
 
2791
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:80
2792
  msgctxt "admin-text"
2793
+ msgid "Enable Pagination"
2794
+ msgstr "Enable Pagination"
2795
+
2796
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:88
2797
+ msgctxt "admin-text"
2798
+ msgid "Yes (with a page reload)"
2799
+ msgstr "Yes (with a page reload)"
2800
+
2801
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:92
2802
+ msgctxt "admin-text"
2803
+ msgid "Yes (without a page reload)"
2804
+ msgstr "Yes (without a page reload)"
2805
+
2806
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:100
2807
+ msgctxt "admin-text"
2808
+ msgid "Reviews Per Page"
2809
+ msgstr "Reviews Per Page"
2810
+
2811
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:107, plugin/Integrations/Elementor/ElementorSummaryWidget.php:77
2812
+ msgctxt "admin-text"
2813
+ msgid "Minimum Rating"
2814
+ msgstr "Minimum Rating"
2815
+
2816
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:114, plugin/Integrations/Elementor/ElementorSummaryWidget.php:84
2817
+ msgctxt "admin-text"
2818
+ msgid "The schema should only be enabled once per page."
2819
+ msgstr "The schema should only be enabled once per page."
2820
+
2821
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:115, plugin/Integrations/Elementor/ElementorSummaryWidget.php:85
2822
+ msgctxt "admin-text"
2823
+ msgid "Enable the schema?"
2824
+ msgstr "Enable the schema?"
2825
+
2826
+ #: plugin/Integrations/Elementor/ElementorSummaryWidget.php:23
2827
+ msgctxt "admin-text"
2828
+ msgid "Rating Summary"
2829
+ msgstr "Rating Summary"
2830
+
2831
+ #: plugin/Integrations/Elementor/ElementorWidget.php:82
2832
+ msgctxt "admin-text"
2833
+ msgid "Limit the Type of Reviews"
2834
+ msgstr "Limit the Type of Reviews"
2835
+
2836
+ #: plugin/Integrations/Elementor/ElementorWidget.php:103
2837
+ msgctxt "admin-text"
2838
+ msgid "Advanced"
2839
+ msgstr "Advanced"
2840
+
2841
+ #: plugin/Integrations/Elementor/ElementorWidget.php:137
2842
+ msgctxt "admin-text"
2843
+ msgid "Custom ID"
2844
+ msgstr "Custom ID"
2845
+
2846
+ #: plugin/Integrations/Elementor/ElementorWidget.php:141
2847
+ msgctxt "admin-text"
2848
+ msgid "Separate multiple classes with spaces."
2849
+ msgstr "Separate multiple classes with spaces."
2850
+
2851
+ #: plugin/Integrations/Elementor/ElementorWidget.php:143
2852
+ msgctxt "admin-text"
2853
+ msgid "Additional CSS classes"
2854
+ msgstr "Additional CSS classes"
2855
 
2856
  #: views/pages/addons/index.php:13
2857
  msgctxt "admin-text"
3179
  msgid "OK"
3180
  msgstr "OK"
3181
 
3182
+ #: views/partials/editor/pinned.php:17, views/partials/screen/inline-edit.php:30
3183
  msgctxt "admin-text"
3184
  msgid "Cancel"
3185
  msgstr "Cancel"
3186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3187
  #: views/partials/notices/migrate.php:6
3188
  msgctxt "admin-text"
3189
  msgid "Database Update Required"
3230
  msgid "Read the upgrade guide"
3231
  msgstr "Read the upgrade guide"
3232
 
3233
+ #: views/partials/screen/filters.php:4
3234
+ msgctxt "admin-text"
3235
+ msgid "Filters"
3236
+ msgstr "Filters"
3237
+
3238
+ #: views/partials/screen/inline-edit.php:10
3239
+ msgctxt "admin-text"
3240
+ msgid "Respond to the review"
3241
+ msgstr "Respond to the review"
3242
+
3243
+ #: views/partials/screen/inline-edit.php:14
3244
+ msgctxt "admin-text"
3245
+ msgid "Their Review"
3246
+ msgstr "Their Review"
3247
+
3248
+ #: views/partials/screen/inline-edit.php:22
3249
+ msgctxt "admin-text"
3250
+ msgid "Your Response"
3251
+ msgstr "Your Response"
3252
+
3253
+ #: views/partials/screen/inline-edit.php:31
3254
+ msgctxt "admin-text"
3255
+ msgid "Update"
3256
+ msgstr "Update"
3257
+
3258
+ #: views/partials/screen/locked-indicator.php:6
3259
+ msgctxt "admin-text"
3260
+ msgid "&#8220;%s&#8221; is locked"
3261
+ msgstr "&#8220;%s&#8221; is locked"
3262
+
3263
  #: views/partials/translations/plural.php:4, views/partials/translations/single.php:4
3264
  msgctxt "admin-text"
3265
  msgid "Show custom translation"
3285
  msgid "plural"
3286
  msgstr "plural"
3287
 
3288
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:40
3289
+ msgctxt "admin-text"
3290
+ msgid ""
3291
+ "Review creation failed, please check the Site Reviews console log for more "
3292
+ "details."
3293
+ msgstr ""
3294
+ "Review creation failed, please check the Site Reviews console log for more "
3295
+ "details."
3296
+
3297
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:61
3298
+ msgctxt "admin-text"
3299
+ msgid "Cannot create existing review."
3300
+ msgstr "Cannot create existing review."
3301
+
3302
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:65, plugin/Controllers/Api/Version1/RestReviewController.php:69
3303
+ msgctxt "admin-text"
3304
+ msgid "Sorry, you are not allowed to create reviews as this user."
3305
+ msgstr "Sorry, you are not allowed to create reviews as this user."
3306
+
3307
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:73, plugin/Controllers/Api/Version1/RestReviewController.php:349
3308
+ msgctxt "admin-text"
3309
+ msgid "Sorry, you are not allowed to assign the provided terms."
3310
+ msgstr "Sorry, you are not allowed to assign the provided terms."
3311
+
3312
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:90
3313
+ msgctxt "admin-text"
3314
+ msgid "The review does not support trashing. Set \"%s\" to delete."
3315
+ msgstr "The review does not support trashing. Set \"%s\" to delete."
3316
+
3317
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:94
3318
+ msgctxt "admin-text"
3319
+ msgid "The review has already been deleted."
3320
+ msgstr "The review has already been deleted."
3321
+
3322
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:98, plugin/Controllers/Api/Version1/RestReviewController.php:382
3323
+ msgctxt "admin-text"
3324
+ msgid "The review cannot be deleted."
3325
+ msgstr "The review cannot be deleted."
3326
+
3327
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:113, plugin/Controllers/Api/Version1/RestReviewController.php:155, plugin/Controllers/Api/Version1/RestReviewController.php:337
3328
+ msgctxt "admin-text"
3329
+ msgid "Invalid review ID."
3330
+ msgstr "Invalid review ID."
3331
+
3332
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:117
3333
+ msgctxt "admin-text"
3334
+ msgid "Sorry, you are not allowed to delete this review."
3335
+ msgstr "Sorry, you are not allowed to delete this review."
3336
+
3337
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:159
3338
+ msgctxt "admin-text"
3339
+ msgid "Sorry, you are not allowed to view this review."
3340
+ msgstr "Sorry, you are not allowed to view this review."
3341
+
3342
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:194
3343
+ msgctxt "admin-text"
3344
+ msgid "The page number requested is larger than the number of pages available."
3345
+ msgstr "The page number requested is larger than the number of pages available."
3346
+
3347
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:211
3348
+ msgctxt "admin-text"
3349
+ msgid "Sorry, you do not have permission to access reviews."
3350
+ msgstr "Sorry, you do not have permission to access reviews."
3351
+
3352
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:214
3353
+ msgctxt "admin-text"
3354
+ msgid "Sorry, you are not allowed to edit reviews."
3355
+ msgstr "Sorry, you are not allowed to edit reviews."
3356
+
3357
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:291
3358
+ msgctxt "admin-text"
3359
+ msgid "Whether to bypass Trash and force deletion."
3360
+ msgstr "Whether to bypass Trash and force deletion."
3361
+
3362
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:301
3363
+ msgctxt "admin-text"
3364
+ msgid "Unique identifier for the object."
3365
+ msgstr "Unique identifier for the object."
3366
+
3367
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:317
3368
+ msgctxt "admin-text"
3369
+ msgid ""
3370
+ "Review update failed, please check the Site Reviews console log for more "
3371
+ "details."
3372
+ msgstr ""
3373
+ "Review update failed, please check the Site Reviews console log for more "
3374
+ "details."
3375
+
3376
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:341
3377
+ msgctxt "admin-text"
3378
+ msgid "Sorry, you are not allowed to edit this review."
3379
+ msgstr "Sorry, you are not allowed to edit this review."
3380
+
3381
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:345
3382
+ msgctxt "admin-text"
3383
+ msgid "Sorry, you are not allowed to update reviews as this user."
3384
+ msgstr "Sorry, you are not allowed to update reviews as this user."
3385
+
3386
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:37
3387
+ msgctxt "admin-text"
3388
+ msgid "The average rating."
3389
+ msgstr "The average rating."
3390
+
3391
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:42
3392
+ msgctxt "admin-text"
3393
+ msgid "The defined maximum rating."
3394
+ msgstr "The defined maximum rating."
3395
+
3396
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:47
3397
+ msgctxt "admin-text"
3398
+ msgid "The defined minimum rating."
3399
+ msgstr "The defined minimum rating."
3400
+
3401
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:52
3402
+ msgctxt "admin-text"
3403
+ msgid "The bayesian ranking number."
3404
+ msgstr "The bayesian ranking number."
3405
+
3406
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:57
3407
+ msgctxt "admin-text"
3408
+ msgid ""
3409
+ "The total number of reviews for each rating level from zero to maximum "
3410
+ "rating."
3411
+ msgstr ""
3412
+ "The total number of reviews for each rating level from zero to maximum "
3413
+ "rating."
3414
+
3415
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:63
3416
+ msgctxt "admin-text"
3417
+ msgid "The total number of reviews used to calculate the average."
3418
+ msgstr "The total number of reviews used to calculate the average."
3419
+
3420
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:96
3421
+ msgctxt "admin-text"
3422
+ msgid "Sorry, you are not allowed to view review summaries."
3423
+ msgstr "Sorry, you are not allowed to view review summaries."
3424
+
3425
+ #: plugin/Controllers/Api/Version1/RestTypeController.php:26
3426
+ msgctxt "admin-text"
3427
+ msgid "There are no review types."
3428
+ msgstr "There are no review types."
3429
+
3430
+ #: plugin/Controllers/Api/Version1/RestTypeController.php:39
3431
+ msgctxt "admin-text"
3432
+ msgid "Sorry, you are not allowed to view review types."
3433
+ msgstr "Sorry, you are not allowed to view review types."
3434
+
3435
  #: views/pages/tools/general/export-plugin-settings.php:6
3436
  msgctxt "admin-text"
3437
  msgid "Export Plugin Settings"
3827
  msgid "Test Detection"
3828
  msgstr "Test Detection"
3829
 
3830
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:11
3831
+ msgctxt "admin-text"
3832
+ msgid "Offset the result set by a specific number of items."
3833
+ msgstr "Offset the result set by a specific number of items."
3834
+
3835
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:16
3836
+ msgctxt "admin-text"
3837
+ msgid "Order sort attribute ascending or descending."
3838
+ msgstr "Order sort attribute ascending or descending."
3839
+
3840
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:22
3841
+ msgctxt "admin-text"
3842
+ msgid "Sort collection by object attribute."
3843
+ msgstr "Sort collection by object attribute."
3844
+
3845
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:28
3846
+ msgctxt "admin-text"
3847
+ msgid "Current page of the collection."
3848
+ msgstr "Current page of the collection."
3849
+
3850
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:35
3851
+ msgctxt "admin-text"
3852
+ msgid "Maximum number of items to be returned in result set."
3853
+ msgstr "Maximum number of items to be returned in result set."
3854
+
3855
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:34
3856
+ msgctxt "admin-text"
3857
+ msgid "Please use %s to add new schema properties."
3858
+ msgstr "Please use %s to add new schema properties."
3859
+
3860
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:49
3861
+ msgctxt "admin-text"
3862
+ msgid "The current user can publish this review."
3863
+ msgstr "The current user can publish this review."
3864
+
3865
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:63
3866
+ msgctxt "admin-text"
3867
+ msgid "The current user can post unfiltered HTML markup and JavaScript."
3868
+ msgstr "The current user can post unfiltered HTML markup and JavaScript."
3869
+
3870
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:76
3871
+ msgctxt "admin-text"
3872
+ msgid "The current user can change the author on this review."
3873
+ msgstr "The current user can change the author on this review."
3874
+
3875
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:89
3876
+ msgctxt "admin-text"
3877
+ msgid "The current user can assign terms in the %s taxonomy."
3878
+ msgstr "The current user can assign terms in the %s taxonomy."
3879
+
3880
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:103
3881
+ msgctxt "admin-text"
3882
+ msgid "The current user can create terms in the %s taxonomy."
3883
+ msgstr "The current user can create terms in the %s taxonomy."
3884
+
3885
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:125
3886
+ msgctxt "admin-text"
3887
+ msgid "The posts assigned to the review of any public post type."
3888
+ msgstr "The posts assigned to the review of any public post type."
3889
+
3890
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:131
3891
+ msgctxt "admin-text"
3892
+ msgid "The terms assigned to the review in the %s taxonomy."
3893
+ msgstr "The terms assigned to the review in the %s taxonomy."
3894
+
3895
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:137
3896
+ msgctxt "admin-text"
3897
+ msgid "The users assigned to the review."
3898
+ msgstr "The users assigned to the review."
3899
+
3900
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:143
3901
+ msgctxt "admin-text"
3902
+ msgid "The ID for the author of the review."
3903
+ msgstr "The ID for the author of the review."
3904
+
3905
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:148
3906
+ msgctxt "admin-text"
3907
+ msgid "The avatar of the person who submitted the review."
3908
+ msgstr "The avatar of the person who submitted the review."
3909
+
3910
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:153
3911
+ msgctxt "admin-text"
3912
+ msgid "The content of the review."
3913
+ msgstr "The content of the review."
3914
+
3915
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:162
3916
+ msgctxt "admin-text"
3917
+ msgid "Custom fields."
3918
+ msgstr "Custom fields."
3919
+
3920
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:167
3921
+ msgctxt "admin-text"
3922
+ msgid "The date the review was published, in the site's timezone."
3923
+ msgstr "The date the review was published, in the site's timezone."
3924
+
3925
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:173
3926
+ msgctxt "admin-text"
3927
+ msgid "The date the review was published, as GMT."
3928
+ msgstr "The date the review was published, as GMT."
3929
+
3930
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:179
3931
+ msgctxt "admin-text"
3932
+ msgid "The email of the person who submitted the review."
3933
+ msgstr "The email of the person who submitted the review."
3934
+
3935
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:184
3936
+ msgctxt "admin-text"
3937
+ msgid "Unique identifier for the review."
3938
+ msgstr "Unique identifier for the review."
3939
+
3940
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:190
3941
+ msgctxt "admin-text"
3942
+ msgid "The IP address of the person who submitted the review."
3943
+ msgstr "The IP address of the person who submitted the review."
3944
+
3945
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:196
3946
+ msgctxt "admin-text"
3947
+ msgid "If the review has an approved status."
3948
+ msgstr "If the review has an approved status."
3949
+
3950
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:202
3951
+ msgctxt "admin-text"
3952
+ msgid "If the review has been modified."
3953
+ msgstr "If the review has been modified."
3954
+
3955
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:208
3956
+ msgctxt "admin-text"
3957
+ msgid "If the review has been pinned."
3958
+ msgstr "If the review has been pinned."
3959
+
3960
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:213
3961
+ msgctxt "admin-text"
3962
+ msgid "The date the review was last modified, in the site's timezone."
3963
+ msgstr "The date the review was last modified, in the site's timezone."
3964
+
3965
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:220
3966
+ msgctxt "admin-text"
3967
+ msgid "The date the review was last modified, as GMT."
3968
+ msgstr "The date the review was last modified, as GMT."
3969
+
3970
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:227
3971
+ msgctxt "admin-text"
3972
+ msgid "The name of the person who submitted the review."
3973
+ msgstr "The name of the person who submitted the review."
3974
+
3975
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:232
3976
+ msgctxt "admin-text"
3977
+ msgid "The rating of the review."
3978
+ msgstr "The rating of the review."
3979
+
3980
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:237
3981
+ msgctxt "admin-text"
3982
+ msgid "The response given to the review."
3983
+ msgstr "The response given to the review."
3984
+
3985
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:242
3986
+ msgctxt "admin-text"
3987
+ msgid "A named status for the review."
3988
+ msgstr "A named status for the review."
3989
+
3990
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:248
3991
+ msgctxt "admin-text"
3992
+ msgid "If the terms were accepted when the review was submitted."
3993
+ msgstr "If the terms were accepted when the review was submitted."
3994
+
3995
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:253
3996
+ msgctxt "admin-text"
3997
+ msgid "The title of the review."
3998
+ msgstr "The title of the review."
3999
+
4000
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:258
4001
+ msgctxt "admin-text"
4002
+ msgid "Type of Review for the object."
4003
+ msgstr "Type of Review for the object."
4004
+
4005
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:14
4006
+ msgctxt "admin-text"
4007
+ msgid "Limit result set to reviews published after a given ISO8601 compliant date."
4008
+ msgstr "Limit result set to reviews published after a given ISO8601 compliant date."
4009
+
4010
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:20
4011
+ msgctxt "admin-text"
4012
+ msgid ""
4013
+ "Limit result set to reviews assigned to specific posts of any public post "
4014
+ "type."
4015
+ msgstr ""
4016
+ "Limit result set to reviews assigned to specific posts of any public post "
4017
+ "type."
4018
+
4019
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:26
4020
+ msgctxt "admin-text"
4021
+ msgid "Limit result set to reviews assigned to specific terms in the %s taxonomy."
4022
+ msgstr "Limit result set to reviews assigned to specific terms in the %s taxonomy."
4023
+
4024
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:32
4025
+ msgctxt "admin-text"
4026
+ msgid "Limit result set to reviews assigned to specific users."
4027
+ msgstr "Limit result set to reviews assigned to specific users."
4028
+
4029
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:37
4030
+ msgctxt "admin-text"
4031
+ msgid "Limit result set to reviews published before a given ISO8601 compliant date."
4032
+ msgstr "Limit result set to reviews published before a given ISO8601 compliant date."
4033
+
4034
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:42
4035
+ msgctxt "admin-text"
4036
+ msgid "Limit result set to reviews published on a given ISO8601 compliant date."
4037
+ msgstr "Limit result set to reviews published on a given ISO8601 compliant date."
4038
+
4039
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:47
4040
+ msgctxt "admin-text"
4041
+ msgid "Limit result set to reviews containing a given email address."
4042
+ msgstr "Limit result set to reviews containing a given email address."
4043
+
4044
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:53
4045
+ msgctxt "admin-text"
4046
+ msgid "Ensure result set excludes specific review IDs."
4047
+ msgstr "Ensure result set excludes specific review IDs."
4048
+
4049
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:59
4050
+ msgctxt "admin-text"
4051
+ msgid "Limit result set to specific review IDs."
4052
+ msgstr "Limit result set to specific review IDs."
4053
+
4054
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:64
4055
+ msgctxt "admin-text"
4056
+ msgid "Limit result set to reviews submitted from a given IP address."
4057
+ msgstr "Limit result set to reviews submitted from a given IP address."
4058
+
4059
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:69
4060
+ msgctxt "admin-text"
4061
+ msgid "Limit result set to reviews containing a given minimum rating."
4062
+ msgstr "Limit result set to reviews containing a given minimum rating."
4063
+
4064
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:76
4065
+ msgctxt "admin-text"
4066
+ msgid "Limit result set to reviews containing a given status."
4067
+ msgstr "Limit result set to reviews containing a given status."
4068
+
4069
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:81
4070
+ msgctxt "admin-text"
4071
+ msgid "Limit result set to reviews submitted with terms accepted."
4072
+ msgstr "Limit result set to reviews submitted with terms accepted."
4073
+
4074
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:85
4075
+ msgctxt "admin-text"
4076
+ msgid "Limit result set to reviews containing a given review type."
4077
+ msgstr "Limit result set to reviews containing a given review type."
4078
+
4079
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:91
4080
+ msgctxt "admin-text"
4081
+ msgid "Limit result set to reviews authored by specific users."
4082
+ msgstr "Limit result set to reviews authored by specific users."
4083
+
4084
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:97
4085
+ msgctxt "admin-text"
4086
+ msgid "Ensure result set excludes reviews authored by specific users."
4087
+ msgstr "Ensure result set excludes reviews authored by specific users."
4088
+
4089
  #: config/settings.php:218
4090
  msgctxt "avatar size (admin-text)"
4091
  msgid "pixels"
4096
  msgid "words"
4097
  msgstr "words"
4098
 
4099
+ #: plugin/Controllers/ListTableController.php:132
4100
  msgctxt "The Review Post ID (admin-text)"
4101
  msgid "<span>ID: %d</span>"
4102
  msgstr "<span>ID: %d</span>"
4103
 
4104
+ #: plugin/Controllers/ListTableController.php:140
4105
  msgctxt "Approve the review (admin-text)"
4106
  msgid "%s this review"
4107
  msgstr "%s this review"
4180
  msgstr[0] "New %s-star review"
4181
  msgstr[1] "New %s-star review of %s"
4182
 
4183
+ #: plugin/Tinymce/TinymceGenerator.php:327
4184
  msgctxt "the option label (admin-text)"
4185
  msgid "The \"%s\" option is required."
4186
  msgstr "The \"%s\" option is required."
languages/site-reviews.pot CHANGED
@@ -52,64 +52,74 @@ msgstr ""
52
 
53
  #: compatibility.php:24
54
  msgctxt "admin-text"
55
- msgid "Delete Others' Reviews"
56
  msgstr ""
57
 
58
  #: compatibility.php:27
59
  msgctxt "admin-text"
60
- msgid "Delete Reviews"
61
  msgstr ""
62
 
63
  #: compatibility.php:30
64
  msgctxt "admin-text"
65
- msgid "Delete Private Reviews"
66
  msgstr ""
67
 
68
  #: compatibility.php:33
69
  msgctxt "admin-text"
70
- msgid "Delete Approved Reviews"
71
  msgstr ""
72
 
73
  #: compatibility.php:36
74
  msgctxt "admin-text"
75
- msgid "Edit Others' Reviews"
76
  msgstr ""
77
 
78
  #: compatibility.php:39
79
  msgctxt "admin-text"
80
- msgid "Edit Reviews"
81
  msgstr ""
82
 
83
  #: compatibility.php:42
84
  msgctxt "admin-text"
85
- msgid "Edit Private Reviews"
86
  msgstr ""
87
 
88
  #: compatibility.php:45
89
  msgctxt "admin-text"
90
- msgid "Edit Approved Reviews"
91
  msgstr ""
92
 
93
  #: compatibility.php:48
94
  msgctxt "admin-text"
95
- msgid "Approve Reviews"
96
  msgstr ""
97
 
98
  #: compatibility.php:51
99
  msgctxt "admin-text"
100
- msgid "Read Private Reviews"
101
  msgstr ""
102
 
103
  #: compatibility.php:54
104
  msgctxt "admin-text"
105
- msgid "Create Review (inactive)"
106
  msgstr ""
107
 
108
- #: deprecated.php:101
 
 
 
 
 
 
 
 
 
 
109
  msgid "%s is <strong>deprecated</strong> since version %s with no alternative available."
110
  msgstr ""
111
 
112
- #: deprecated.php:114
113
  msgid "%s is <strong>deprecated</strong> since version %s! Use %s instead."
114
  msgstr ""
115
 
@@ -587,7 +597,7 @@ msgctxt "admin-text"
587
  msgid "Display the fallback text when there are no reviews to display. This can be changed on the %s page. You may also override this by using the \"fallback\" option on the shortcode."
588
  msgstr ""
589
 
590
- #: config/settings.php:264, plugin/Controllers/MenuController.php:119
591
  msgctxt "admin-text"
592
  msgid "Translations"
593
  msgstr ""
@@ -1067,7 +1077,7 @@ msgctxt "admin-text"
1067
  msgid "The [%s] method has been deprecated and will be soon be removed, please use the [%s] method instead."
1068
  msgstr ""
1069
 
1070
- #: plugin/Review.php:328, plugin/Controllers/ListTableColumns/ColumnValueAuthorName.php:20
1071
  msgctxt "admin-text"
1072
  msgid "Unknown"
1073
  msgstr ""
@@ -1186,12 +1196,17 @@ msgstr ""
1186
  msgid "This review is based on my own experience and is my genuine opinion."
1187
  msgstr ""
1188
 
1189
- #: plugin/Addons/Controller.php:70, plugin/Controllers/AdminController.php:49, plugin/Controllers/MenuController.php:51, views/pages/tools/sync.php:23
 
 
 
 
 
1190
  msgctxt "admin-text"
1191
  msgid "Settings"
1192
  msgstr ""
1193
 
1194
- #: plugin/Addons/Controller.php:76, plugin/Controllers/AdminController.php:55, plugin/Controllers/MenuController.php:54
1195
  msgctxt "admin-text"
1196
  msgid "Help"
1197
  msgstr ""
@@ -1252,7 +1267,7 @@ msgctxt "admin-text"
1252
  msgid "See the %s for more details."
1253
  msgstr ""
1254
 
1255
- #: plugin/Commands/ImportReviews.php:146, plugin/Controllers/MenuController.php:145
1256
  msgctxt "admin-text"
1257
  msgid "Console"
1258
  msgstr ""
@@ -1297,29 +1312,29 @@ msgctxt "admin-text"
1297
  msgid "Edit"
1298
  msgstr ""
1299
 
1300
- #: plugin/Controllers/AdminController.php:86
1301
  msgctxt "admin-text"
1302
  msgid "%s Review"
1303
  msgid_plural "%s Reviews"
1304
  msgstr[0] ""
1305
  msgstr[1] ""
1306
 
1307
- #: plugin/Controllers/AdminController.php:167, plugin/Widgets/SiteReviewsWidget.php:113
1308
  msgctxt "admin-text"
1309
  msgid "Recent Reviews"
1310
  msgstr ""
1311
 
1312
- #: plugin/Controllers/AdminController.php:168, plugin/Widgets/SiteReviewsFormWidget.php:78
1313
  msgctxt "admin-text"
1314
  msgid "Submit a Review"
1315
  msgstr ""
1316
 
1317
- #: plugin/Controllers/AdminController.php:169, plugin/Widgets/SiteReviewsSummaryWidget.php:81
1318
  msgctxt "admin-text"
1319
  msgid "Summary of Reviews"
1320
  msgstr ""
1321
 
1322
- #: plugin/Controllers/AdminController.php:204, plugin/Controllers/AdminController.php:224, plugin/Controllers/AdminController.php:237
1323
  msgctxt "admin-text"
1324
  msgid "Nothing found."
1325
  msgstr ""
@@ -1329,36 +1344,66 @@ msgctxt "admin-text"
1329
  msgid "Okay"
1330
  msgstr ""
1331
 
1332
- #: plugin/Controllers/EditorController.php:188
1333
  msgctxt "admin-text"
1334
- msgid "%s reviews are read-only."
1335
  msgstr ""
1336
 
1337
- #: plugin/Controllers/ListTableController.php:48
 
 
 
 
 
1338
  msgctxt "admin-text"
1339
  msgid "Submitted"
1340
  msgstr ""
1341
 
1342
- #: plugin/Controllers/ListTableController.php:102, plugin/Controllers/TranslationController.php:197, plugin/Defaults/PostStatusLabelsDefaults.php:18
 
 
 
 
 
1343
  msgctxt "admin-text"
1344
  msgid "Approve"
1345
  msgstr ""
1346
 
1347
- #: plugin/Controllers/ListTableController.php:103
1348
  msgctxt "admin-text"
1349
  msgid "Unapprove"
1350
  msgstr ""
1351
 
1352
- #: plugin/Controllers/ListTableController.php:105
1353
- msgctxt "The Review Post ID (admin-text)"
1354
- msgid "<span>ID: %d</span>"
1355
- msgstr ""
1356
-
1357
- #: plugin/Controllers/ListTableController.php:108
1358
  msgctxt "Approve the review (admin-text)"
1359
  msgid "%s this review"
1360
  msgstr ""
1361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1362
  #: plugin/Controllers/MainController.php:105
1363
  msgctxt "admin-text"
1364
  msgid "Local Review"
@@ -1374,67 +1419,72 @@ msgctxt "admin-text"
1374
  msgid "Add-ons"
1375
  msgstr ""
1376
 
1377
- #: plugin/Controllers/MenuController.php:89, plugin/Controllers/WelcomeController.php:104
1378
  msgctxt "admin-text"
1379
  msgid "Support"
1380
  msgstr ""
1381
 
1382
- #: plugin/Controllers/MenuController.php:90, plugin/Controllers/ToolsController.php:89
1383
  msgctxt "admin-text"
1384
  msgid "FAQ"
1385
  msgstr ""
1386
 
1387
- #: plugin/Controllers/MenuController.php:91
1388
  msgctxt "admin-text"
1389
  msgid "Shortcodes"
1390
  msgstr ""
1391
 
1392
- #: plugin/Controllers/MenuController.php:92
1393
  msgctxt "admin-text"
1394
  msgid "Hooks"
1395
  msgstr ""
1396
 
1397
- #: plugin/Controllers/MenuController.php:93
1398
  msgctxt "admin-text"
1399
  msgid "Functions"
1400
  msgstr ""
1401
 
1402
- #: plugin/Controllers/MenuController.php:94, plugin/Controllers/MenuController.php:120
 
 
 
 
 
1403
  msgctxt "admin-text"
1404
  msgid "Addons"
1405
  msgstr ""
1406
 
1407
- #: plugin/Controllers/MenuController.php:115, plugin/Controllers/MenuController.php:143
1408
  msgctxt "admin-text"
1409
  msgid "General"
1410
  msgstr ""
1411
 
1412
- #: plugin/Controllers/MenuController.php:116, plugin/Controllers/PrivacyController.php:141, plugin/Defaults/PostTypeLabelDefaults.php:14, views/pages/tools/sync.php:10, views/pages/tools/sync.php:31
1413
  msgctxt "admin-text"
1414
  msgid "Reviews"
1415
  msgstr ""
1416
 
1417
- #: plugin/Controllers/MenuController.php:117
1418
  msgctxt "admin-text"
1419
  msgid "Submissions"
1420
  msgstr ""
1421
 
1422
- #: plugin/Controllers/MenuController.php:118, plugin/Tinymce/SiteReviewsSummaryTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:66
1423
  msgctxt "admin-text"
1424
  msgid "Schema"
1425
  msgstr ""
1426
 
1427
- #: plugin/Controllers/MenuController.php:121
1428
  msgctxt "admin-text"
1429
  msgid "Licenses"
1430
  msgstr ""
1431
 
1432
- #: plugin/Controllers/MenuController.php:144, views/pages/tools/sync.php:57
1433
  msgctxt "admin-text"
1434
  msgid "Sync Reviews"
1435
  msgstr ""
1436
 
1437
- #: plugin/Controllers/MenuController.php:146
1438
  msgctxt "admin-text"
1439
  msgid "System Info"
1440
  msgstr ""
@@ -1459,7 +1509,7 @@ msgctxt "admin-text"
1459
  msgid "(no title)"
1460
  msgstr ""
1461
 
1462
- #: plugin/Controllers/MetaboxController.php:158, plugin/Controllers/ListTableColumns/ColumnValueResponse.php:17
1463
  msgctxt "admin-text"
1464
  msgid "No"
1465
  msgstr ""
@@ -1949,7 +1999,7 @@ msgstr ""
1949
 
1950
  #: plugin/Modules/Console.php:290
1951
  msgctxt "admin-text"
1952
- msgid "Console was automatically cleared (256KB maximum size)"
1953
  msgstr ""
1954
 
1955
  #: plugin/Modules/Date.php:89
@@ -2241,7 +2291,7 @@ msgctxt "admin-text"
2241
  msgid "How many reviews would you like to display (default: 10)?"
2242
  msgstr ""
2243
 
2244
- #: plugin/Tinymce/SiteReviewsTinymce.php:33, plugin/Tinymce/SiteReviewsTinymce.php:34, plugin/Tinymce/SiteReviewsTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:36, plugin/Tinymce/SiteReviewsTinymce.php:37, plugin/Widgets/SiteReviewsWidget.php:33, plugin/Widgets/SiteReviewsWidget.php:34, plugin/Widgets/SiteReviewsWidget.php:35, plugin/Widgets/SiteReviewsWidget.php:36, plugin/Widgets/SiteReviewsWidget.php:37, plugin/Widgets/SiteReviewsWidget.php:38, plugin/Controllers/ListTableColumns/ColumnFilterRating.php:19
2245
  msgctxt "admin-text"
2246
  msgid "%s star"
2247
  msgid_plural "%s stars"
@@ -2313,12 +2363,12 @@ msgctxt "admin-text"
2313
  msgid "- Select -"
2314
  msgstr ""
2315
 
2316
- #: plugin/Tinymce/TinymceGenerator.php:320
2317
  msgctxt "admin-text"
2318
  msgid "Some of the shortcode options are required."
2319
  msgstr ""
2320
 
2321
- #: plugin/Tinymce/TinymceGenerator.php:325
2322
  msgctxt "the option label (admin-text)"
2323
  msgid "The \"%s\" option is required."
2324
  msgstr ""
@@ -2363,7 +2413,7 @@ msgctxt "admin-text"
2363
  msgid "Site Reviews: Display a form to submit reviews."
2364
  msgstr ""
2365
 
2366
- #: plugin/Widgets/SiteReviewsSummaryWidget.php:27
2367
  msgctxt "admin-text"
2368
  msgid "All review types"
2369
  msgstr ""
@@ -2432,24 +2482,209 @@ msgstr ""
2432
  msgid "Close modal"
2433
  msgstr ""
2434
 
2435
- #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:17
2436
  msgctxt "admin-text"
2437
- msgid "All ratings"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2438
  msgstr ""
2439
 
2440
- #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:25
 
 
 
 
 
 
 
 
 
 
2441
  msgctxt "admin-text"
2442
  msgid "Filter by rating"
2443
  msgstr ""
2444
 
2445
- #: plugin/Controllers/ListTableColumns/ColumnFilterType.php:22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2446
  msgctxt "admin-text"
2447
- msgid "Filter by type"
2448
  msgstr ""
2449
 
2450
- #: plugin/Controllers/ListTableColumns/ColumnFilterType.php:26
2451
  msgctxt "admin-text"
2452
- msgid "All types"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2453
  msgstr ""
2454
 
2455
  #: plugin/Modules/Validator/AkismetValidator.php:49, plugin/Modules/Validator/HoneypotValidator.php:26, views/pages/documentation/support/common-problems-and-solutions.php:61
@@ -2760,26 +2995,11 @@ msgctxt "admin-text"
2760
  msgid "OK"
2761
  msgstr ""
2762
 
2763
- #: views/partials/editor/pinned.php:17
2764
  msgctxt "admin-text"
2765
  msgid "Cancel"
2766
  msgstr ""
2767
 
2768
- #: views/partials/editor/review.php:4
2769
- msgctxt "admin-text"
2770
- msgid "no title"
2771
- msgstr ""
2772
-
2773
- #: views/partials/editor/review.php:17
2774
- msgctxt "admin-text"
2775
- msgid "Toggle panel: Public Response"
2776
- msgstr ""
2777
-
2778
- #: views/partials/editor/review.php:21
2779
- msgctxt "admin-text"
2780
- msgid "Public Response"
2781
- msgstr ""
2782
-
2783
  #: views/partials/notices/migrate.php:6
2784
  msgctxt "admin-text"
2785
  msgid "Database Update Required"
@@ -2820,6 +3040,36 @@ msgctxt "admin-text"
2820
  msgid "Read the upgrade guide"
2821
  msgstr ""
2822
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2823
  #: views/partials/translations/plural.php:4, views/partials/translations/single.php:4
2824
  msgctxt "admin-text"
2825
  msgid "Show custom translation"
@@ -2845,6 +3095,141 @@ msgctxt "admin-text"
2845
  msgid "plural"
2846
  msgstr ""
2847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2848
  #: plugin/Modules/Html/Fields/Rating.php:17
2849
  msgid "%s Star"
2850
  msgid_plural "%s Stars"
@@ -2888,7 +3273,7 @@ msgstr ""
2888
  msgid "Show less"
2889
  msgstr ""
2890
 
2891
- #: plugin/Modules/Html/Tags/ReviewResponseTag.php:15
2892
  msgid "Response from %s"
2893
  msgstr ""
2894
 
@@ -3207,3 +3592,258 @@ msgstr ""
3207
  msgctxt "admin-text"
3208
  msgid "Test Detection"
3209
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  #: compatibility.php:24
54
  msgctxt "admin-text"
55
+ msgid "Create Reviews"
56
  msgstr ""
57
 
58
  #: compatibility.php:27
59
  msgctxt "admin-text"
60
+ msgid "Delete Others' Reviews"
61
  msgstr ""
62
 
63
  #: compatibility.php:30
64
  msgctxt "admin-text"
65
+ msgid "Delete Reviews"
66
  msgstr ""
67
 
68
  #: compatibility.php:33
69
  msgctxt "admin-text"
70
+ msgid "Delete Private Reviews"
71
  msgstr ""
72
 
73
  #: compatibility.php:36
74
  msgctxt "admin-text"
75
+ msgid "Delete Approved Reviews"
76
  msgstr ""
77
 
78
  #: compatibility.php:39
79
  msgctxt "admin-text"
80
+ msgid "Edit Others' Reviews"
81
  msgstr ""
82
 
83
  #: compatibility.php:42
84
  msgctxt "admin-text"
85
+ msgid "Edit Reviews"
86
  msgstr ""
87
 
88
  #: compatibility.php:45
89
  msgctxt "admin-text"
90
+ msgid "Edit Private Reviews"
91
  msgstr ""
92
 
93
  #: compatibility.php:48
94
  msgctxt "admin-text"
95
+ msgid "Edit Approved Reviews"
96
  msgstr ""
97
 
98
  #: compatibility.php:51
99
  msgctxt "admin-text"
100
+ msgid "Approve Reviews"
101
  msgstr ""
102
 
103
  #: compatibility.php:54
104
  msgctxt "admin-text"
105
+ msgid "Read Private Reviews"
106
  msgstr ""
107
 
108
+ #: compatibility.php:57
109
+ msgctxt "admin-text"
110
+ msgid "Respond To Reviews"
111
+ msgstr ""
112
+
113
+ #: compatibility.php:60
114
+ msgctxt "admin-text"
115
+ msgid "Respond To Others' Reviews"
116
+ msgstr ""
117
+
118
+ #: deprecated.php:111
119
  msgid "%s is <strong>deprecated</strong> since version %s with no alternative available."
120
  msgstr ""
121
 
122
+ #: deprecated.php:124
123
  msgid "%s is <strong>deprecated</strong> since version %s! Use %s instead."
124
  msgstr ""
125
 
597
  msgid "Display the fallback text when there are no reviews to display. This can be changed on the %s page. You may also override this by using the \"fallback\" option on the shortcode."
598
  msgstr ""
599
 
600
+ #: config/settings.php:264, plugin/Controllers/MenuController.php:138
601
  msgctxt "admin-text"
602
  msgid "Translations"
603
  msgstr ""
1077
  msgid "The [%s] method has been deprecated and will be soon be removed, please use the [%s] method instead."
1078
  msgstr ""
1079
 
1080
+ #: plugin/Review.php:323, plugin/Controllers/ListTableColumns/ColumnValueAuthorName.php:20
1081
  msgctxt "admin-text"
1082
  msgid "Unknown"
1083
  msgstr ""
1196
  msgid "This review is based on my own experience and is my genuine opinion."
1197
  msgstr ""
1198
 
1199
+ #: plugin/Addons/Addon.php:74
1200
+ msgctxt "admin-text"
1201
+ msgid "Untitled"
1202
+ msgstr ""
1203
+
1204
+ #: plugin/Addons/Controller.php:70, plugin/Controllers/AdminController.php:50, plugin/Controllers/MenuController.php:51, plugin/Integrations/Elementor/ElementorWidget.php:99, views/pages/tools/sync.php:23
1205
  msgctxt "admin-text"
1206
  msgid "Settings"
1207
  msgstr ""
1208
 
1209
+ #: plugin/Addons/Controller.php:76, plugin/Controllers/AdminController.php:56, plugin/Controllers/MenuController.php:54
1210
  msgctxt "admin-text"
1211
  msgid "Help"
1212
  msgstr ""
1267
  msgid "See the %s for more details."
1268
  msgstr ""
1269
 
1270
+ #: plugin/Commands/ImportReviews.php:146, plugin/Controllers/MenuController.php:164
1271
  msgctxt "admin-text"
1272
  msgid "Console"
1273
  msgstr ""
1312
  msgid "Edit"
1313
  msgstr ""
1314
 
1315
+ #: plugin/Controllers/AdminController.php:100
1316
  msgctxt "admin-text"
1317
  msgid "%s Review"
1318
  msgid_plural "%s Reviews"
1319
  msgstr[0] ""
1320
  msgstr[1] ""
1321
 
1322
+ #: plugin/Controllers/AdminController.php:181, plugin/Widgets/SiteReviewsWidget.php:113
1323
  msgctxt "admin-text"
1324
  msgid "Recent Reviews"
1325
  msgstr ""
1326
 
1327
+ #: plugin/Controllers/AdminController.php:182, plugin/Widgets/SiteReviewsFormWidget.php:78, plugin/Integrations/Elementor/ElementorFormWidget.php:21
1328
  msgctxt "admin-text"
1329
  msgid "Submit a Review"
1330
  msgstr ""
1331
 
1332
+ #: plugin/Controllers/AdminController.php:183, plugin/Widgets/SiteReviewsSummaryWidget.php:81
1333
  msgctxt "admin-text"
1334
  msgid "Summary of Reviews"
1335
  msgstr ""
1336
 
1337
+ #: plugin/Controllers/AdminController.php:218, plugin/Controllers/AdminController.php:238, plugin/Controllers/AdminController.php:251
1338
  msgctxt "admin-text"
1339
  msgid "Nothing found."
1340
  msgstr ""
1344
  msgid "Okay"
1345
  msgstr ""
1346
 
1347
+ #: plugin/Controllers/EditorController.php:140
1348
  msgctxt "admin-text"
1349
+ msgid "Publicly responding to third-party %s reviews is disabled."
1350
  msgstr ""
1351
 
1352
+ #: plugin/Controllers/ListTableController.php:41, plugin/Overrides/ReviewsListTable.php:69
1353
+ msgctxt "admin-text"
1354
+ msgid "%s is currently editing"
1355
+ msgstr ""
1356
+
1357
+ #: plugin/Controllers/ListTableController.php:81
1358
  msgctxt "admin-text"
1359
  msgid "Submitted"
1360
  msgstr ""
1361
 
1362
+ #: plugin/Controllers/ListTableController.php:132
1363
+ msgctxt "The Review Post ID (admin-text)"
1364
+ msgid "<span>ID: %d</span>"
1365
+ msgstr ""
1366
+
1367
+ #: plugin/Controllers/ListTableController.php:135, plugin/Controllers/TranslationController.php:197, plugin/Defaults/PostStatusLabelsDefaults.php:18
1368
  msgctxt "admin-text"
1369
  msgid "Approve"
1370
  msgstr ""
1371
 
1372
+ #: plugin/Controllers/ListTableController.php:136
1373
  msgctxt "admin-text"
1374
  msgid "Unapprove"
1375
  msgstr ""
1376
 
1377
+ #: plugin/Controllers/ListTableController.php:140
 
 
 
 
 
1378
  msgctxt "Approve the review (admin-text)"
1379
  msgid "%s this review"
1380
  msgstr ""
1381
 
1382
+ #: plugin/Controllers/ListTableController.php:152
1383
+ msgctxt "admin-text"
1384
+ msgid "Respond inline to &#8220;%s&#8221;"
1385
+ msgstr ""
1386
+
1387
+ #: plugin/Controllers/ListTableController.php:154
1388
+ msgctxt "admin-text"
1389
+ msgid "Respond"
1390
+ msgstr ""
1391
+
1392
+ #: plugin/Controllers/ListTableController.php:227
1393
+ msgctxt "admin-text"
1394
+ msgid "Sorry, you are not allowed to respond to this review."
1395
+ msgstr ""
1396
+
1397
+ #: plugin/Controllers/ListTableController.php:231
1398
+ msgctxt "admin-text"
1399
+ msgid "Someone"
1400
+ msgstr ""
1401
+
1402
+ #: plugin/Controllers/ListTableController.php:232
1403
+ msgctxt "admin-text"
1404
+ msgid "Saving is disabled: %s is currently editing this review."
1405
+ msgstr ""
1406
+
1407
  #: plugin/Controllers/MainController.php:105
1408
  msgctxt "admin-text"
1409
  msgid "Local Review"
1419
  msgid "Add-ons"
1420
  msgstr ""
1421
 
1422
+ #: plugin/Controllers/MenuController.php:107, plugin/Controllers/WelcomeController.php:104
1423
  msgctxt "admin-text"
1424
  msgid "Support"
1425
  msgstr ""
1426
 
1427
+ #: plugin/Controllers/MenuController.php:108, plugin/Controllers/ToolsController.php:89
1428
  msgctxt "admin-text"
1429
  msgid "FAQ"
1430
  msgstr ""
1431
 
1432
+ #: plugin/Controllers/MenuController.php:109
1433
  msgctxt "admin-text"
1434
  msgid "Shortcodes"
1435
  msgstr ""
1436
 
1437
+ #: plugin/Controllers/MenuController.php:110
1438
  msgctxt "admin-text"
1439
  msgid "Hooks"
1440
  msgstr ""
1441
 
1442
+ #: plugin/Controllers/MenuController.php:111
1443
  msgctxt "admin-text"
1444
  msgid "Functions"
1445
  msgstr ""
1446
 
1447
+ #: plugin/Controllers/MenuController.php:112
1448
+ msgctxt "admin-text"
1449
+ msgid "API"
1450
+ msgstr ""
1451
+
1452
+ #: plugin/Controllers/MenuController.php:113, plugin/Controllers/MenuController.php:139
1453
  msgctxt "admin-text"
1454
  msgid "Addons"
1455
  msgstr ""
1456
 
1457
+ #: plugin/Controllers/MenuController.php:134, plugin/Controllers/MenuController.php:162
1458
  msgctxt "admin-text"
1459
  msgid "General"
1460
  msgstr ""
1461
 
1462
+ #: plugin/Controllers/MenuController.php:135, plugin/Controllers/PrivacyController.php:141, plugin/Defaults/PostTypeLabelDefaults.php:14, views/pages/tools/sync.php:10, views/pages/tools/sync.php:31
1463
  msgctxt "admin-text"
1464
  msgid "Reviews"
1465
  msgstr ""
1466
 
1467
+ #: plugin/Controllers/MenuController.php:136
1468
  msgctxt "admin-text"
1469
  msgid "Submissions"
1470
  msgstr ""
1471
 
1472
+ #: plugin/Controllers/MenuController.php:137, plugin/Tinymce/SiteReviewsSummaryTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:66
1473
  msgctxt "admin-text"
1474
  msgid "Schema"
1475
  msgstr ""
1476
 
1477
+ #: plugin/Controllers/MenuController.php:140
1478
  msgctxt "admin-text"
1479
  msgid "Licenses"
1480
  msgstr ""
1481
 
1482
+ #: plugin/Controllers/MenuController.php:163, views/pages/tools/sync.php:57
1483
  msgctxt "admin-text"
1484
  msgid "Sync Reviews"
1485
  msgstr ""
1486
 
1487
+ #: plugin/Controllers/MenuController.php:165
1488
  msgctxt "admin-text"
1489
  msgid "System Info"
1490
  msgstr ""
1509
  msgid "(no title)"
1510
  msgstr ""
1511
 
1512
+ #: plugin/Controllers/MetaboxController.php:158, plugin/Controllers/ListTableColumns/ColumnValueResponse.php:17, plugin/Integrations/Elementor/ElementorReviewsWidget.php:84
1513
  msgctxt "admin-text"
1514
  msgid "No"
1515
  msgstr ""
1999
 
2000
  #: plugin/Modules/Console.php:290
2001
  msgctxt "admin-text"
2002
+ msgid "Console was automatically cleared (512KB maximum size)"
2003
  msgstr ""
2004
 
2005
  #: plugin/Modules/Date.php:89
2291
  msgid "How many reviews would you like to display (default: 10)?"
2292
  msgstr ""
2293
 
2294
+ #: plugin/Tinymce/SiteReviewsTinymce.php:33, plugin/Tinymce/SiteReviewsTinymce.php:34, plugin/Tinymce/SiteReviewsTinymce.php:35, plugin/Tinymce/SiteReviewsTinymce.php:36, plugin/Tinymce/SiteReviewsTinymce.php:37, plugin/Widgets/SiteReviewsWidget.php:33, plugin/Widgets/SiteReviewsWidget.php:34, plugin/Widgets/SiteReviewsWidget.php:35, plugin/Widgets/SiteReviewsWidget.php:36, plugin/Widgets/SiteReviewsWidget.php:37, plugin/Widgets/SiteReviewsWidget.php:38, plugin/Controllers/ListTableColumns/ColumnFilterRating.php:37
2295
  msgctxt "admin-text"
2296
  msgid "%s star"
2297
  msgid_plural "%s stars"
2363
  msgid "- Select -"
2364
  msgstr ""
2365
 
2366
+ #: plugin/Tinymce/TinymceGenerator.php:322
2367
  msgctxt "admin-text"
2368
  msgid "Some of the shortcode options are required."
2369
  msgstr ""
2370
 
2371
+ #: plugin/Tinymce/TinymceGenerator.php:327
2372
  msgctxt "the option label (admin-text)"
2373
  msgid "The \"%s\" option is required."
2374
  msgstr ""
2413
  msgid "Site Reviews: Display a form to submit reviews."
2414
  msgstr ""
2415
 
2416
+ #: plugin/Widgets/SiteReviewsSummaryWidget.php:27, plugin/Controllers/ListTableColumns/ColumnFilterType.php:23
2417
  msgctxt "admin-text"
2418
  msgid "All review types"
2419
  msgstr ""
2482
  msgid "Close modal"
2483
  msgstr ""
2484
 
2485
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedPost.php:19
2486
  msgctxt "admin-text"
2487
+ msgid "Filter by assigned post"
2488
+ msgstr ""
2489
+
2490
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedPost.php:22
2491
+ msgctxt "admin-text"
2492
+ msgid "All assigned posts"
2493
+ msgstr ""
2494
+
2495
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedUser.php:20
2496
+ msgctxt "admin-text"
2497
+ msgid "Filter by assigned user"
2498
+ msgstr ""
2499
+
2500
+ #: plugin/Controllers/ListTableColumns/ColumnFilterAssignedUser.php:23
2501
+ msgctxt "admin-text"
2502
+ msgid "All assigned users"
2503
  msgstr ""
2504
 
2505
+ #: plugin/Controllers/ListTableColumns/ColumnFilterCategory.php:17
2506
+ msgctxt "admin-text"
2507
+ msgid "Filter by category"
2508
+ msgstr ""
2509
+
2510
+ #: plugin/Controllers/ListTableColumns/ColumnFilterCategory.php:20
2511
+ msgctxt "admin-text"
2512
+ msgid "All categories"
2513
+ msgstr ""
2514
+
2515
+ #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:20
2516
  msgctxt "admin-text"
2517
  msgid "Filter by rating"
2518
  msgstr ""
2519
 
2520
+ #: plugin/Controllers/ListTableColumns/ColumnFilterRating.php:23
2521
+ msgctxt "admin-text"
2522
+ msgid "All ratings"
2523
+ msgstr ""
2524
+
2525
+ #: plugin/Controllers/ListTableColumns/ColumnFilterType.php:20
2526
+ msgctxt "admin-text"
2527
+ msgid "Filter by review type"
2528
+ msgstr ""
2529
+
2530
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:29
2531
+ msgctxt "admin-text"
2532
+ msgid "Assign Reviews to a Page"
2533
+ msgstr ""
2534
+
2535
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:32
2536
+ msgctxt "admin-text"
2537
+ msgid "Assign to multiple Post IDs"
2538
+ msgstr ""
2539
+
2540
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:33
2541
+ msgctxt "admin-text"
2542
+ msgid "Assign to the Current Page"
2543
+ msgstr ""
2544
+
2545
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:34
2546
+ msgctxt "admin-text"
2547
+ msgid "Assign to the Parent Page"
2548
+ msgstr ""
2549
+
2550
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:40, plugin/Integrations/Elementor/ElementorReviewsWidget.php:45, plugin/Integrations/Elementor/ElementorSummaryWidget.php:42
2551
+ msgctxt "admin-text"
2552
+ msgid "Separate with commas."
2553
+ msgstr ""
2554
+
2555
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:42, plugin/Integrations/Elementor/ElementorReviewsWidget.php:47, plugin/Integrations/Elementor/ElementorSummaryWidget.php:44
2556
+ msgctxt "admin-text"
2557
+ msgid "Enter the Post IDs"
2558
+ msgstr ""
2559
+
2560
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:48
2561
+ msgctxt "admin-text"
2562
+ msgid "Assign Reviews to a Category"
2563
+ msgstr ""
2564
+
2565
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:56
2566
+ msgctxt "admin-text"
2567
+ msgid "Assign Reviews to a User"
2568
+ msgstr ""
2569
+
2570
+ #: plugin/Integrations/Elementor/ElementorFormWidget.php:59, plugin/Integrations/Elementor/ElementorReviewsWidget.php:64, plugin/Integrations/Elementor/ElementorSummaryWidget.php:61
2571
+ msgctxt "admin-text"
2572
+ msgid "The Logged-in user"
2573
+ msgstr ""
2574
+
2575
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:26
2576
  msgctxt "admin-text"
2577
+ msgid "Latest Reviews"
2578
  msgstr ""
2579
 
2580
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:34, plugin/Integrations/Elementor/ElementorSummaryWidget.php:31
2581
  msgctxt "admin-text"
2582
+ msgid "Limit Reviews to an Assigned Page"
2583
+ msgstr ""
2584
+
2585
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:37, plugin/Integrations/Elementor/ElementorSummaryWidget.php:34
2586
+ msgctxt "admin-text"
2587
+ msgid "Assigned to multiple Post IDs"
2588
+ msgstr ""
2589
+
2590
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:38, plugin/Integrations/Elementor/ElementorSummaryWidget.php:35
2591
+ msgctxt "admin-text"
2592
+ msgid "Assigned to the Current Page"
2593
+ msgstr ""
2594
+
2595
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:39, plugin/Integrations/Elementor/ElementorSummaryWidget.php:36
2596
+ msgctxt "admin-text"
2597
+ msgid "Assigned to the Parent Page"
2598
+ msgstr ""
2599
+
2600
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:53, plugin/Integrations/Elementor/ElementorSummaryWidget.php:50
2601
+ msgctxt "admin-text"
2602
+ msgid "Limit Reviews to an Assigned Category"
2603
+ msgstr ""
2604
+
2605
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:61, plugin/Integrations/Elementor/ElementorSummaryWidget.php:58
2606
+ msgctxt "admin-text"
2607
+ msgid "Limit Reviews to an Assigned User"
2608
+ msgstr ""
2609
+
2610
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:69, plugin/Integrations/Elementor/ElementorSummaryWidget.php:66
2611
+ msgctxt "admin-text"
2612
+ msgid "Limit Reviews to terms"
2613
+ msgstr ""
2614
+
2615
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:72, plugin/Integrations/Elementor/ElementorSummaryWidget.php:69
2616
+ msgctxt "admin-text"
2617
+ msgid "Terms were accepted"
2618
+ msgstr ""
2619
+
2620
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:73, plugin/Integrations/Elementor/ElementorSummaryWidget.php:70
2621
+ msgctxt "admin-text"
2622
+ msgid "Terms were not accepted"
2623
+ msgstr ""
2624
+
2625
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:80
2626
+ msgctxt "admin-text"
2627
+ msgid "Enable Pagination"
2628
+ msgstr ""
2629
+
2630
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:88
2631
+ msgctxt "admin-text"
2632
+ msgid "Yes (with a page reload)"
2633
+ msgstr ""
2634
+
2635
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:92
2636
+ msgctxt "admin-text"
2637
+ msgid "Yes (without a page reload)"
2638
+ msgstr ""
2639
+
2640
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:100
2641
+ msgctxt "admin-text"
2642
+ msgid "Reviews Per Page"
2643
+ msgstr ""
2644
+
2645
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:107, plugin/Integrations/Elementor/ElementorSummaryWidget.php:77
2646
+ msgctxt "admin-text"
2647
+ msgid "Minimum Rating"
2648
+ msgstr ""
2649
+
2650
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:114, plugin/Integrations/Elementor/ElementorSummaryWidget.php:84
2651
+ msgctxt "admin-text"
2652
+ msgid "The schema should only be enabled once per page."
2653
+ msgstr ""
2654
+
2655
+ #: plugin/Integrations/Elementor/ElementorReviewsWidget.php:115, plugin/Integrations/Elementor/ElementorSummaryWidget.php:85
2656
+ msgctxt "admin-text"
2657
+ msgid "Enable the schema?"
2658
+ msgstr ""
2659
+
2660
+ #: plugin/Integrations/Elementor/ElementorSummaryWidget.php:23
2661
+ msgctxt "admin-text"
2662
+ msgid "Rating Summary"
2663
+ msgstr ""
2664
+
2665
+ #: plugin/Integrations/Elementor/ElementorWidget.php:82
2666
+ msgctxt "admin-text"
2667
+ msgid "Limit the Type of Reviews"
2668
+ msgstr ""
2669
+
2670
+ #: plugin/Integrations/Elementor/ElementorWidget.php:103
2671
+ msgctxt "admin-text"
2672
+ msgid "Advanced"
2673
+ msgstr ""
2674
+
2675
+ #: plugin/Integrations/Elementor/ElementorWidget.php:137
2676
+ msgctxt "admin-text"
2677
+ msgid "Custom ID"
2678
+ msgstr ""
2679
+
2680
+ #: plugin/Integrations/Elementor/ElementorWidget.php:141
2681
+ msgctxt "admin-text"
2682
+ msgid "Separate multiple classes with spaces."
2683
+ msgstr ""
2684
+
2685
+ #: plugin/Integrations/Elementor/ElementorWidget.php:143
2686
+ msgctxt "admin-text"
2687
+ msgid "Additional CSS classes"
2688
  msgstr ""
2689
 
2690
  #: plugin/Modules/Validator/AkismetValidator.php:49, plugin/Modules/Validator/HoneypotValidator.php:26, views/pages/documentation/support/common-problems-and-solutions.php:61
2995
  msgid "OK"
2996
  msgstr ""
2997
 
2998
+ #: views/partials/editor/pinned.php:17, views/partials/screen/inline-edit.php:30
2999
  msgctxt "admin-text"
3000
  msgid "Cancel"
3001
  msgstr ""
3002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3003
  #: views/partials/notices/migrate.php:6
3004
  msgctxt "admin-text"
3005
  msgid "Database Update Required"
3040
  msgid "Read the upgrade guide"
3041
  msgstr ""
3042
 
3043
+ #: views/partials/screen/filters.php:4
3044
+ msgctxt "admin-text"
3045
+ msgid "Filters"
3046
+ msgstr ""
3047
+
3048
+ #: views/partials/screen/inline-edit.php:10
3049
+ msgctxt "admin-text"
3050
+ msgid "Respond to the review"
3051
+ msgstr ""
3052
+
3053
+ #: views/partials/screen/inline-edit.php:14
3054
+ msgctxt "admin-text"
3055
+ msgid "Their Review"
3056
+ msgstr ""
3057
+
3058
+ #: views/partials/screen/inline-edit.php:22
3059
+ msgctxt "admin-text"
3060
+ msgid "Your Response"
3061
+ msgstr ""
3062
+
3063
+ #: views/partials/screen/inline-edit.php:31
3064
+ msgctxt "admin-text"
3065
+ msgid "Update"
3066
+ msgstr ""
3067
+
3068
+ #: views/partials/screen/locked-indicator.php:6
3069
+ msgctxt "admin-text"
3070
+ msgid "&#8220;%s&#8221; is locked"
3071
+ msgstr ""
3072
+
3073
  #: views/partials/translations/plural.php:4, views/partials/translations/single.php:4
3074
  msgctxt "admin-text"
3075
  msgid "Show custom translation"
3095
  msgid "plural"
3096
  msgstr ""
3097
 
3098
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:40
3099
+ msgctxt "admin-text"
3100
+ msgid "Review creation failed, please check the Site Reviews console log for more details."
3101
+ msgstr ""
3102
+
3103
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:61
3104
+ msgctxt "admin-text"
3105
+ msgid "Cannot create existing review."
3106
+ msgstr ""
3107
+
3108
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:65, plugin/Controllers/Api/Version1/RestReviewController.php:69
3109
+ msgctxt "admin-text"
3110
+ msgid "Sorry, you are not allowed to create reviews as this user."
3111
+ msgstr ""
3112
+
3113
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:73, plugin/Controllers/Api/Version1/RestReviewController.php:349
3114
+ msgctxt "admin-text"
3115
+ msgid "Sorry, you are not allowed to assign the provided terms."
3116
+ msgstr ""
3117
+
3118
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:90
3119
+ msgctxt "admin-text"
3120
+ msgid "The review does not support trashing. Set \"%s\" to delete."
3121
+ msgstr ""
3122
+
3123
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:94
3124
+ msgctxt "admin-text"
3125
+ msgid "The review has already been deleted."
3126
+ msgstr ""
3127
+
3128
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:98, plugin/Controllers/Api/Version1/RestReviewController.php:382
3129
+ msgctxt "admin-text"
3130
+ msgid "The review cannot be deleted."
3131
+ msgstr ""
3132
+
3133
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:113, plugin/Controllers/Api/Version1/RestReviewController.php:155, plugin/Controllers/Api/Version1/RestReviewController.php:337
3134
+ msgctxt "admin-text"
3135
+ msgid "Invalid review ID."
3136
+ msgstr ""
3137
+
3138
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:117
3139
+ msgctxt "admin-text"
3140
+ msgid "Sorry, you are not allowed to delete this review."
3141
+ msgstr ""
3142
+
3143
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:159
3144
+ msgctxt "admin-text"
3145
+ msgid "Sorry, you are not allowed to view this review."
3146
+ msgstr ""
3147
+
3148
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:194
3149
+ msgctxt "admin-text"
3150
+ msgid "The page number requested is larger than the number of pages available."
3151
+ msgstr ""
3152
+
3153
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:211
3154
+ msgctxt "admin-text"
3155
+ msgid "Sorry, you do not have permission to access reviews."
3156
+ msgstr ""
3157
+
3158
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:214
3159
+ msgctxt "admin-text"
3160
+ msgid "Sorry, you are not allowed to edit reviews."
3161
+ msgstr ""
3162
+
3163
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:291
3164
+ msgctxt "admin-text"
3165
+ msgid "Whether to bypass Trash and force deletion."
3166
+ msgstr ""
3167
+
3168
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:301
3169
+ msgctxt "admin-text"
3170
+ msgid "Unique identifier for the object."
3171
+ msgstr ""
3172
+
3173
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:317
3174
+ msgctxt "admin-text"
3175
+ msgid "Review update failed, please check the Site Reviews console log for more details."
3176
+ msgstr ""
3177
+
3178
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:341
3179
+ msgctxt "admin-text"
3180
+ msgid "Sorry, you are not allowed to edit this review."
3181
+ msgstr ""
3182
+
3183
+ #: plugin/Controllers/Api/Version1/RestReviewController.php:345
3184
+ msgctxt "admin-text"
3185
+ msgid "Sorry, you are not allowed to update reviews as this user."
3186
+ msgstr ""
3187
+
3188
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:37
3189
+ msgctxt "admin-text"
3190
+ msgid "The average rating."
3191
+ msgstr ""
3192
+
3193
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:42
3194
+ msgctxt "admin-text"
3195
+ msgid "The defined maximum rating."
3196
+ msgstr ""
3197
+
3198
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:47
3199
+ msgctxt "admin-text"
3200
+ msgid "The defined minimum rating."
3201
+ msgstr ""
3202
+
3203
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:52
3204
+ msgctxt "admin-text"
3205
+ msgid "The bayesian ranking number."
3206
+ msgstr ""
3207
+
3208
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:57
3209
+ msgctxt "admin-text"
3210
+ msgid "The total number of reviews for each rating level from zero to maximum rating."
3211
+ msgstr ""
3212
+
3213
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:63
3214
+ msgctxt "admin-text"
3215
+ msgid "The total number of reviews used to calculate the average."
3216
+ msgstr ""
3217
+
3218
+ #: plugin/Controllers/Api/Version1/RestSummaryController.php:96
3219
+ msgctxt "admin-text"
3220
+ msgid "Sorry, you are not allowed to view review summaries."
3221
+ msgstr ""
3222
+
3223
+ #: plugin/Controllers/Api/Version1/RestTypeController.php:26
3224
+ msgctxt "admin-text"
3225
+ msgid "There are no review types."
3226
+ msgstr ""
3227
+
3228
+ #: plugin/Controllers/Api/Version1/RestTypeController.php:39
3229
+ msgctxt "admin-text"
3230
+ msgid "Sorry, you are not allowed to view review types."
3231
+ msgstr ""
3232
+
3233
  #: plugin/Modules/Html/Fields/Rating.php:17
3234
  msgid "%s Star"
3235
  msgid_plural "%s Stars"
3273
  msgid "Show less"
3274
  msgstr ""
3275
 
3276
+ #: plugin/Modules/Html/Tags/ReviewResponseTag.php:16, views/pages/documentation/faq/change-response-name.php:9
3277
  msgid "Response from %s"
3278
  msgstr ""
3279
 
3592
  msgctxt "admin-text"
3593
  msgid "Test Detection"
3594
  msgstr ""
3595
+
3596
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:11
3597
+ msgctxt "admin-text"
3598
+ msgid "Offset the result set by a specific number of items."
3599
+ msgstr ""
3600
+
3601
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:16
3602
+ msgctxt "admin-text"
3603
+ msgid "Order sort attribute ascending or descending."
3604
+ msgstr ""
3605
+
3606
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:22
3607
+ msgctxt "admin-text"
3608
+ msgid "Sort collection by object attribute."
3609
+ msgstr ""
3610
+
3611
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:28
3612
+ msgctxt "admin-text"
3613
+ msgid "Current page of the collection."
3614
+ msgstr ""
3615
+
3616
+ #: plugin/Controllers/Api/Version1/Schema/ReviewParameters.php:35
3617
+ msgctxt "admin-text"
3618
+ msgid "Maximum number of items to be returned in result set."
3619
+ msgstr ""
3620
+
3621
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:34
3622
+ msgctxt "admin-text"
3623
+ msgid "Please use %s to add new schema properties."
3624
+ msgstr ""
3625
+
3626
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:49
3627
+ msgctxt "admin-text"
3628
+ msgid "The current user can publish this review."
3629
+ msgstr ""
3630
+
3631
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:63
3632
+ msgctxt "admin-text"
3633
+ msgid "The current user can post unfiltered HTML markup and JavaScript."
3634
+ msgstr ""
3635
+
3636
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:76
3637
+ msgctxt "admin-text"
3638
+ msgid "The current user can change the author on this review."
3639
+ msgstr ""
3640
+
3641
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:89
3642
+ msgctxt "admin-text"
3643
+ msgid "The current user can assign terms in the %s taxonomy."
3644
+ msgstr ""
3645
+
3646
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:103
3647
+ msgctxt "admin-text"
3648
+ msgid "The current user can create terms in the %s taxonomy."
3649
+ msgstr ""
3650
+
3651
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:125
3652
+ msgctxt "admin-text"
3653
+ msgid "The posts assigned to the review of any public post type."
3654
+ msgstr ""
3655
+
3656
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:131
3657
+ msgctxt "admin-text"
3658
+ msgid "The terms assigned to the review in the %s taxonomy."
3659
+ msgstr ""
3660
+
3661
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:137
3662
+ msgctxt "admin-text"
3663
+ msgid "The users assigned to the review."
3664
+ msgstr ""
3665
+
3666
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:143
3667
+ msgctxt "admin-text"
3668
+ msgid "The ID for the author of the review."
3669
+ msgstr ""
3670
+
3671
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:148
3672
+ msgctxt "admin-text"
3673
+ msgid "The avatar of the person who submitted the review."
3674
+ msgstr ""
3675
+
3676
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:153
3677
+ msgctxt "admin-text"
3678
+ msgid "The content of the review."
3679
+ msgstr ""
3680
+
3681
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:162
3682
+ msgctxt "admin-text"
3683
+ msgid "Custom fields."
3684
+ msgstr ""
3685
+
3686
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:167
3687
+ msgctxt "admin-text"
3688
+ msgid "The date the review was published, in the site's timezone."
3689
+ msgstr ""
3690
+
3691
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:173
3692
+ msgctxt "admin-text"
3693
+ msgid "The date the review was published, as GMT."
3694
+ msgstr ""
3695
+
3696
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:179
3697
+ msgctxt "admin-text"
3698
+ msgid "The email of the person who submitted the review."
3699
+ msgstr ""
3700
+
3701
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:184
3702
+ msgctxt "admin-text"
3703
+ msgid "Unique identifier for the review."
3704
+ msgstr ""
3705
+
3706
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:190
3707
+ msgctxt "admin-text"
3708
+ msgid "The IP address of the person who submitted the review."
3709
+ msgstr ""
3710
+
3711
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:196
3712
+ msgctxt "admin-text"
3713
+ msgid "If the review has an approved status."
3714
+ msgstr ""
3715
+
3716
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:202
3717
+ msgctxt "admin-text"
3718
+ msgid "If the review has been modified."
3719
+ msgstr ""
3720
+
3721
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:208
3722
+ msgctxt "admin-text"
3723
+ msgid "If the review has been pinned."
3724
+ msgstr ""
3725
+
3726
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:213
3727
+ msgctxt "admin-text"
3728
+ msgid "The date the review was last modified, in the site's timezone."
3729
+ msgstr ""
3730
+
3731
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:220
3732
+ msgctxt "admin-text"
3733
+ msgid "The date the review was last modified, as GMT."
3734
+ msgstr ""
3735
+
3736
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:227
3737
+ msgctxt "admin-text"
3738
+ msgid "The name of the person who submitted the review."
3739
+ msgstr ""
3740
+
3741
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:232
3742
+ msgctxt "admin-text"
3743
+ msgid "The rating of the review."
3744
+ msgstr ""
3745
+
3746
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:237
3747
+ msgctxt "admin-text"
3748
+ msgid "The response given to the review."
3749
+ msgstr ""
3750
+
3751
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:242
3752
+ msgctxt "admin-text"
3753
+ msgid "A named status for the review."
3754
+ msgstr ""
3755
+
3756
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:248
3757
+ msgctxt "admin-text"
3758
+ msgid "If the terms were accepted when the review was submitted."
3759
+ msgstr ""
3760
+
3761
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:253
3762
+ msgctxt "admin-text"
3763
+ msgid "The title of the review."
3764
+ msgstr ""
3765
+
3766
+ #: plugin/Controllers/Api/Version1/Schema/ReviewSchema.php:258
3767
+ msgctxt "admin-text"
3768
+ msgid "Type of Review for the object."
3769
+ msgstr ""
3770
+
3771
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:14
3772
+ msgctxt "admin-text"
3773
+ msgid "Limit result set to reviews published after a given ISO8601 compliant date."
3774
+ msgstr ""
3775
+
3776
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:20
3777
+ msgctxt "admin-text"
3778
+ msgid "Limit result set to reviews assigned to specific posts of any public post type."
3779
+ msgstr ""
3780
+
3781
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:26
3782
+ msgctxt "admin-text"
3783
+ msgid "Limit result set to reviews assigned to specific terms in the %s taxonomy."
3784
+ msgstr ""
3785
+
3786
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:32
3787
+ msgctxt "admin-text"
3788
+ msgid "Limit result set to reviews assigned to specific users."
3789
+ msgstr ""
3790
+
3791
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:37
3792
+ msgctxt "admin-text"
3793
+ msgid "Limit result set to reviews published before a given ISO8601 compliant date."
3794
+ msgstr ""
3795
+
3796
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:42
3797
+ msgctxt "admin-text"
3798
+ msgid "Limit result set to reviews published on a given ISO8601 compliant date."
3799
+ msgstr ""
3800
+
3801
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:47
3802
+ msgctxt "admin-text"
3803
+ msgid "Limit result set to reviews containing a given email address."
3804
+ msgstr ""
3805
+
3806
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:53
3807
+ msgctxt "admin-text"
3808
+ msgid "Ensure result set excludes specific review IDs."
3809
+ msgstr ""
3810
+
3811
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:59
3812
+ msgctxt "admin-text"
3813
+ msgid "Limit result set to specific review IDs."
3814
+ msgstr ""
3815
+
3816
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:64
3817
+ msgctxt "admin-text"
3818
+ msgid "Limit result set to reviews submitted from a given IP address."
3819
+ msgstr ""
3820
+
3821
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:69
3822
+ msgctxt "admin-text"
3823
+ msgid "Limit result set to reviews containing a given minimum rating."
3824
+ msgstr ""
3825
+
3826
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:76
3827
+ msgctxt "admin-text"
3828
+ msgid "Limit result set to reviews containing a given status."
3829
+ msgstr ""
3830
+
3831
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:81
3832
+ msgctxt "admin-text"
3833
+ msgid "Limit result set to reviews submitted with terms accepted."
3834
+ msgstr ""
3835
+
3836
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:85
3837
+ msgctxt "admin-text"
3838
+ msgid "Limit result set to reviews containing a given review type."
3839
+ msgstr ""
3840
+
3841
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:91
3842
+ msgctxt "admin-text"
3843
+ msgid "Limit result set to reviews authored by specific users."
3844
+ msgstr ""
3845
+
3846
+ #: plugin/Controllers/Api/Version1/Schema/SummaryParameters.php:97
3847
+ msgctxt "admin-text"
3848
+ msgid "Ensure result set excludes reviews authored by specific users."
3849
+ msgstr ""
plugin/Addons/Addon.php CHANGED
@@ -52,6 +52,33 @@ abstract class Addon
52
  return glsr($class, $parameters);
53
  }
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  /**
56
  * @return void
57
  */
52
  return glsr($class, $parameters);
53
  }
54
 
55
+ /**
56
+ * @param int $perPage
57
+ * @return array
58
+ */
59
+ public function posts($perPage = 50)
60
+ {
61
+ if (!defined('static::POST_TYPE')) {
62
+ return [];
63
+ }
64
+ $posts = get_posts([
65
+ 'order' => 'ASC',
66
+ 'orderby' => 'post_title',
67
+ 'post_type' => static::POST_TYPE,
68
+ 'post_status' => 'publish',
69
+ 'posts_per_page' => $perPage,
70
+ ]);
71
+ $results = wp_list_pluck($posts, 'post_title', 'ID');
72
+ foreach ($results as $id => &$title) {
73
+ if (empty(trim($title))) {
74
+ $title = _x('Untitled', 'admin-text', 'site-reviews');
75
+ }
76
+ $title = sprintf('%s (ID: %s)', $title, $id);
77
+ }
78
+ natsort($results);
79
+ return $results;
80
+ }
81
+
82
  /**
83
  * @return void
84
  */
plugin/Application.php CHANGED
@@ -74,11 +74,12 @@ final class Application extends Container
74
 
75
  /**
76
  * @param string $capability
 
77
  * @return bool
78
  */
79
- public function can($capability)
80
  {
81
- return $this->make(Role::class)->can($capability);
82
  }
83
 
84
  /**
74
 
75
  /**
76
  * @param string $capability
77
+ * @param mixed ...$args
78
  * @return bool
79
  */
80
+ public function can($capability, ...$args)
81
  {
82
+ return $this->make(Role::class)->can($capability, ...$args);
83
  }
84
 
85
  /**
plugin/Commands/EnqueueAdminAssets.php CHANGED
@@ -86,6 +86,7 @@ class EnqueueAdminAssets implements Contract
86
  'fetch-console' => wp_create_nonce('fetch-console'),
87
  'mce-shortcode' => wp_create_nonce('mce-shortcode'),
88
  'sync-reviews' => wp_create_nonce('sync-reviews'),
 
89
  'toggle-pinned' => wp_create_nonce('toggle-pinned'),
90
  'toggle-status' => wp_create_nonce('toggle-status'),
91
  ],
86
  'fetch-console' => wp_create_nonce('fetch-console'),
87
  'mce-shortcode' => wp_create_nonce('mce-shortcode'),
88
  'sync-reviews' => wp_create_nonce('sync-reviews'),
89
+ 'toggle-filters' => wp_create_nonce('toggle-filters'),
90
  'toggle-pinned' => wp_create_nonce('toggle-pinned'),
91
  'toggle-status' => wp_create_nonce('toggle-status'),
92
  ],
plugin/Commands/EnqueuePublicAssets.php CHANGED
@@ -4,8 +4,6 @@ namespace GeminiLabs\SiteReviews\Commands;
4
 
5
  use GeminiLabs\SiteReviews\Contracts\CommandContract as Contract;
6
  use GeminiLabs\SiteReviews\Database\OptionManager;
7
- use GeminiLabs\SiteReviews\Defaults\StyleClassesDefaults;
8
- use GeminiLabs\SiteReviews\Defaults\StyleValidationDefaults;
9
  use GeminiLabs\SiteReviews\Defaults\ValidationStringsDefaults;
10
  use GeminiLabs\SiteReviews\Modules\Style;
11
 
@@ -19,8 +17,6 @@ class EnqueuePublicAssets implements Contract
19
  $this->enqueueAssets();
20
  $this->enqueuePolyfillService();
21
  $this->enqueueRecaptchaScript();
22
- $this->inlineScript();
23
- $this->inlineStyles();
24
  }
25
 
26
  /**
@@ -29,25 +25,17 @@ class EnqueuePublicAssets implements Contract
29
  public function enqueueAssets()
30
  {
31
  if (glsr()->filterBool('assets/css', true)) {
32
- wp_enqueue_style(
33
- glsr()->id,
34
- $this->getStylesheet(),
35
- [],
36
- glsr()->version
37
- );
38
  }
39
  if (glsr()->filterBool('assets/js', true)) {
40
  $dependencies = glsr()->filterBool('assets/polyfill', true)
41
  ? [glsr()->id.'/polyfill']
42
  : [];
43
  $dependencies = glsr()->filterArray('enqueue/public/dependencies', $dependencies);
44
- wp_enqueue_script(
45
- glsr()->id,
46
- glsr()->url('assets/scripts/'.glsr()->id.'.js'),
47
- $dependencies,
48
- glsr()->version,
49
- true
50
- );
51
  }
52
  }
53
 
@@ -84,7 +72,7 @@ class EnqueuePublicAssets implements Contract
84
  }
85
 
86
  /**
87
- * @return void
88
  */
89
  public function inlineScript()
90
  {
@@ -108,19 +96,15 @@ class EnqueuePublicAssets implements Contract
108
  'validationstrings' => glsr(ValidationStringsDefaults::class)->defaults(),
109
  ];
110
  $variables = glsr()->filterArray('enqueue/public/localize', $variables);
111
- wp_add_inline_script(glsr()->id, $this->buildInlineScript($variables), 'before');
112
- wp_add_inline_script(glsr()->id, glsr()->filterString('enqueue/public/inline-script/after', ''));
113
  }
114
 
115
  /**
116
- * @return void
117
  */
118
  public function inlineStyles()
119
  {
120
  $inlineStylesheetPath = glsr()->path('assets/styles/inline-styles.css');
121
- if (!glsr()->filterBool('assets/css', true)) {
122
- return;
123
- }
124
  if (!file_exists($inlineStylesheetPath)) {
125
  glsr_log()->error('Inline stylesheet is missing: '.$inlineStylesheetPath);
126
  return;
@@ -131,8 +115,7 @@ class EnqueuePublicAssets implements Contract
131
  array_values($inlineStylesheetValues),
132
  file_get_contents($inlineStylesheetPath)
133
  );
134
- $stylesheet = glsr()->filterString('enqueue/public/inline-styles', $stylesheet);
135
- wp_add_inline_style(glsr()->id, $stylesheet);
136
  }
137
 
138
  /**
@@ -158,6 +141,14 @@ class EnqueuePublicAssets implements Contract
158
  return glsr()->filterArray('enqueue/public/localize/ajax-pagination', $selectors);
159
  }
160
 
 
 
 
 
 
 
 
 
161
  /**
162
  * @return string
163
  */
4
 
5
  use GeminiLabs\SiteReviews\Contracts\CommandContract as Contract;
6
  use GeminiLabs\SiteReviews\Database\OptionManager;
 
 
7
  use GeminiLabs\SiteReviews\Defaults\ValidationStringsDefaults;
8
  use GeminiLabs\SiteReviews\Modules\Style;
9
 
17
  $this->enqueueAssets();
18
  $this->enqueuePolyfillService();
19
  $this->enqueueRecaptchaScript();
 
 
20
  }
21
 
22
  /**
25
  public function enqueueAssets()
26
  {
27
  if (glsr()->filterBool('assets/css', true)) {
28
+ wp_enqueue_style(glsr()->id, $this->getStylesheet(), [], glsr()->version);
29
+ wp_add_inline_style(glsr()->id, $this->inlineStyles());
 
 
 
 
30
  }
31
  if (glsr()->filterBool('assets/js', true)) {
32
  $dependencies = glsr()->filterBool('assets/polyfill', true)
33
  ? [glsr()->id.'/polyfill']
34
  : [];
35
  $dependencies = glsr()->filterArray('enqueue/public/dependencies', $dependencies);
36
+ wp_enqueue_script(glsr()->id, $this->getScript(), $dependencies, glsr()->version, true);
37
+ wp_add_inline_script(glsr()->id, $this->inlineScript(), 'before');
38
+ wp_add_inline_script(glsr()->id, glsr()->filterString('enqueue/public/inline-script/after', ''));
 
 
 
 
39
  }
40
  }
41
 
72
  }
73
 
74
  /**
75
+ * @return string
76
  */
77
  public function inlineScript()
78
  {
96
  'validationstrings' => glsr(ValidationStringsDefaults::class)->defaults(),
97
  ];
98
  $variables = glsr()->filterArray('enqueue/public/localize', $variables);
99
+ return $this->buildInlineScript($variables);
 
100
  }
101
 
102
  /**
103
+ * @return string|void
104
  */
105
  public function inlineStyles()
106
  {
107
  $inlineStylesheetPath = glsr()->path('assets/styles/inline-styles.css');
 
 
 
108
  if (!file_exists($inlineStylesheetPath)) {
109
  glsr_log()->error('Inline stylesheet is missing: '.$inlineStylesheetPath);
110
  return;
115
  array_values($inlineStylesheetValues),
116
  file_get_contents($inlineStylesheetPath)
117
  );
118
+ return glsr()->filterString('enqueue/public/inline-styles', $stylesheet);
 
119
  }
120
 
121
  /**
141
  return glsr()->filterArray('enqueue/public/localize/ajax-pagination', $selectors);
142
  }
143
 
144
+ /**
145
+ * @return string
146
+ */
147
+ protected function getScript()
148
+ {
149
+ return glsr()->url('assets/scripts/'.glsr()->id.'.js');
150
+ }
151
+
152
  /**
153
  * @return string
154
  */
plugin/Commands/RegisterPostType.php CHANGED
@@ -13,12 +13,13 @@ class RegisterPostType implements Contract
13
  public $args;
14
  public $columns;
15
 
16
- public function __construct()
17
  {
18
- $this->args = glsr(PostTypeDefaults::class)->merge([
19
  'labels' => glsr(PostTypeLabelDefaults::class)->defaults(),
20
  ]);
21
- $this->columns = glsr(PostTypeColumnDefaults::class)->merge([]);
 
22
  }
23
 
24
  /**
13
  public $args;
14
  public $columns;
15
 
16
+ public function __construct(array $input = [])
17
  {
18
+ $input = wp_parse_args($input, [
19
  'labels' => glsr(PostTypeLabelDefaults::class)->defaults(),
20
  ]);
21
+ $this->args = glsr(PostTypeDefaults::class)->merge($input);
22
+ $this->columns = glsr(PostTypeColumnDefaults::class)->defaults();
23
  }
24
 
25
  /**
plugin/Commands/RegisterTaxonomy.php CHANGED
@@ -3,14 +3,15 @@
3
  namespace GeminiLabs\SiteReviews\Commands;
4
 
5
  use GeminiLabs\SiteReviews\Contracts\CommandContract as Contract;
 
6
 
7
  class RegisterTaxonomy implements Contract
8
  {
9
  public $args;
10
 
11
- public function __construct($input)
12
  {
13
- $this->args = $input;
14
  }
15
 
16
  /**
3
  namespace GeminiLabs\SiteReviews\Commands;
4
 
5
  use GeminiLabs\SiteReviews\Contracts\CommandContract as Contract;
6
+ use GeminiLabs\SiteReviews\Defaults\TaxonomyDefaults;
7
 
8
  class RegisterTaxonomy implements Contract
9
  {
10
  public $args;
11
 
12
+ public function __construct(array $input = [])
13
  {
14
+ $this->args = glsr(TaxonomyDefaults::class)->merge($input);
15
  }
16
 
17
  /**
plugin/Commands/TogglePinned.php CHANGED
@@ -29,7 +29,7 @@ class TogglePinned implements Contract
29
  return wp_validate_boolean($this->review->is_pinned);
30
  }
31
  if ($this->isPinned !== $this->review->is_pinned) {
32
- glsr(ReviewManager::class)->update($this->review->ID, [
33
  'is_pinned' => $this->isPinned,
34
  ]);
35
  $notice = $this->isPinned
29
  return wp_validate_boolean($this->review->is_pinned);
30
  }
31
  if ($this->isPinned !== $this->review->is_pinned) {
32
+ glsr(ReviewManager::class)->updateRating($this->review->ID, [
33
  'is_pinned' => $this->isPinned,
34
  ]);
35
  $notice = $this->isPinned
plugin/Contracts/ColumnFilterContract.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace GeminiLabs\SiteReviews\Contracts;
4
-
5
- interface ColumnFilterContract
6
- {
7
- /**
8
- * @return string|void
9
- */
10
- public function handle();
11
- }
 
 
 
 
 
 
 
 
 
 
 
plugin/Controllers/AdminController.php CHANGED
@@ -16,6 +16,7 @@ use GeminiLabs\SiteReviews\Modules\Migrate;
16
  use GeminiLabs\SiteReviews\Modules\Notice;
17
  use GeminiLabs\SiteReviews\Modules\Translation;
18
  use GeminiLabs\SiteReviews\Request;
 
19
 
20
  class AdminController extends Controller
21
  {
@@ -61,13 +62,26 @@ class AdminController extends Controller
61
  /**
62
  * @param array $capabilities
63
  * @param string $capability
 
 
64
  * @return array
65
  * @filter map_meta_cap
66
  */
67
- public function filterCreateCapability($capabilities, $capability)
68
  {
69
- if ($capability == 'create_'.glsr()->post_type) {
70
- $capabilities[] = 'do_not_allow';
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
  return $capabilities;
73
  }
@@ -239,6 +253,19 @@ class AdminController extends Controller
239
  ]);
240
  }
241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  /**
243
  * @return void
244
  * @action site-reviews/route/ajax/toggle-pinned
16
  use GeminiLabs\SiteReviews\Modules\Notice;
17
  use GeminiLabs\SiteReviews\Modules\Translation;
18
  use GeminiLabs\SiteReviews\Request;
19
+ use GeminiLabs\SiteReviews\Role;
20
 
21
  class AdminController extends Controller
22
  {
62
  /**
63
  * @param array $capabilities
64
  * @param string $capability
65
+ * @param int $userId
66
+ * @param array $args
67
  * @return array
68
  * @filter map_meta_cap
69
  */
70
+ public function filterCapabilities($capabilities, $capability, $userId, $args)
71
  {
72
+ if (is_multisite() && is_super_admin()) {
73
+ return $capabilities;
74
+ }
75
+ if ('respond_to_post' === $capability) {
76
+ $capabilities = [];
77
+ $post = get_post((int) Arr::get($args, 0));
78
+ if (is_null($post)) {
79
+ $capabilities[] = 'do_not_allow';
80
+ } elseif ($userId == $post->post_author) {
81
+ $capabilities[] = glsr(Role::class)->capability('respond_to_posts');
82
+ } else {
83
+ $capabilities[] = glsr(Role::class)->capability('respond_to_others_posts');
84
+ }
85
  }
86
  return $capabilities;
87
  }
253
  ]);
254
  }
255
 
256
+ /**
257
+ * @return void
258
+ * @action site-reviews/route/ajax/toggle-filters
259
+ */
260
+ public function toggleFiltersAjax(Request $request)
261
+ {
262
+ if ($userId = get_current_user_id()) {
263
+ $enabled = Arr::consolidate($request->enabled);
264
+ update_user_meta($userId, 'edit_'.glsr()->post_type.'_filters', $enabled);
265
+ }
266
+ wp_send_json_success();
267
+ }
268
+
269
  /**
270
  * @return void
271
  * @action site-reviews/route/ajax/toggle-pinned
plugin/Controllers/Api/Version1/Response/Prepare.php ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1\Response;
4
+
5
+ use GeminiLabs\SiteReviews\Helper;
6
+ use GeminiLabs\SiteReviews\Modules\Avatar;
7
+ use GeminiLabs\SiteReviews\Review;
8
+
9
+ class Prepare
10
+ {
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $data;
15
+
16
+ /**
17
+ * @var array
18
+ */
19
+ protected $fields;
20
+
21
+ /**
22
+ * @var \GeminiLabs\SiteReviews\Modules\Html\ReviewHtml
23
+ */
24
+ protected $html;
25
+
26
+ /**
27
+ * @var \WP_REST_Request
28
+ */
29
+ protected $request;
30
+
31
+ /**
32
+ * @var \GeminiLabs\SiteReviews\Review
33
+ */
34
+ protected $review;
35
+
36
+ /**
37
+ * @param string[] $fields
38
+ */
39
+ public function __construct($fields, Review $review, \WP_REST_Request $request)
40
+ {
41
+ $this->data = [];
42
+ $this->html = $review->build();
43
+ $this->fields = $fields;
44
+ $this->request = $request;
45
+ $this->review = $review;
46
+ }
47
+
48
+ /**
49
+ * @return array
50
+ */
51
+ public function item()
52
+ {
53
+ return $this->data;
54
+ }
55
+
56
+ /**
57
+ * @param string $method
58
+ * @return void
59
+ */
60
+ public function __call($method, array $args = [])
61
+ {
62
+ list($parent) = explode('.', $method);
63
+ $method = Helper::buildMethodName($parent, 'prepare');
64
+ if (method_exists($this, $method)) {
65
+ call_user_func_array([$this, $method], $args);
66
+ }
67
+ }
68
+
69
+ protected function prepareAssignedPosts()
70
+ {
71
+ $this->data['assigned_posts'] = $this->review->assigned_posts;
72
+ }
73
+
74
+ protected function prepareAssignedTerms()
75
+ {
76
+ $this->data['assigned_terms'] = $this->review->assigned_terms;
77
+ }
78
+
79
+ protected function prepareAssignedUsers()
80
+ {
81
+ $this->data['assigned_users'] = $this->review->assigned_users;
82
+ }
83
+
84
+ protected function prepareAuthor()
85
+ {
86
+ $this->data['author'] = $this->review->user_id;
87
+ }
88
+
89
+ protected function prepareAvatar()
90
+ {
91
+ $this->data['avatar'] = $this->review->avatar;
92
+ }
93
+
94
+ protected function prepareContent()
95
+ {
96
+ $this->data['content'] = $this->review->content;
97
+ }
98
+
99
+ protected function prepareCustom()
100
+ {
101
+ $this->data['custom'] = $this->review->custom()->toArray();
102
+ }
103
+
104
+ protected function prepareDate()
105
+ {
106
+ $this->data['date'] = mysql_to_rfc3339($this->review->date);
107
+ }
108
+
109
+ protected function prepareDateGmt()
110
+ {
111
+ $this->data['date_gmt'] = mysql_to_rfc3339($this->review->date_gmt);
112
+ }
113
+
114
+ protected function prepareEmail()
115
+ {
116
+ $this->data['email'] = $this->review->email;
117
+ }
118
+
119
+ protected function prepareId()
120
+ {
121
+ $this->data['id'] = $this->review->ID;
122
+ }
123
+
124
+ protected function prepareIpAddress()
125
+ {
126
+ $this->data['ip_address'] = $this->review->ip_address;
127
+ }
128
+
129
+ protected function prepareIsApproved()
130
+ {
131
+ $this->data['is_approved'] = $this->review->is_approved;
132
+ }
133
+
134
+ protected function prepareIsModified()
135
+ {
136
+ $this->data['is_modified'] = $this->review->is_modified;
137
+ }
138
+
139
+ protected function prepareIsPinned()
140
+ {
141
+ $this->data['is_pinned'] = $this->review->is_pinned;
142
+ }
143
+
144
+ protected function prepareModified()
145
+ {
146
+ $this->data['modified'] = mysql_to_rfc3339($this->review->post()->post_modified);
147
+ }
148
+
149
+ protected function prepareModifiedGmt()
150
+ {
151
+ $this->data['modified_gmt'] = mysql_to_rfc3339($this->review->post()->post_modified_gmt);
152
+ }
153
+
154
+ protected function prepareName()
155
+ {
156
+ $this->data['name'] = $this->review->author;
157
+ }
158
+
159
+ protected function prepareRating()
160
+ {
161
+ $this->data['rating'] = $this->review->rating;
162
+ }
163
+
164
+ protected function prepareResponse()
165
+ {
166
+ $this->data['response'] = $this->review->response;
167
+ }
168
+
169
+ protected function prepareStatus()
170
+ {
171
+ $this->data['status'] = $this->review->status;
172
+ }
173
+
174
+ protected function prepareTerms()
175
+ {
176
+ $this->data['terms'] = $this->review->terms;
177
+ }
178
+
179
+ protected function prepareTitle()
180
+ {
181
+ $this->data['title'] = $this->review->title;
182
+ }
183
+
184
+ protected function prepareType()
185
+ {
186
+ $this->data['type'] = $this->review->type;
187
+ }
188
+ }
plugin/Controllers/Api/Version1/RestCategoryController.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1;
4
+
5
+ class RestCategoryController extends \WP_REST_Terms_Controller
6
+ {
7
+ public function __construct()
8
+ {
9
+ $this->meta = new \WP_REST_Term_Meta_Fields(glsr()->taxonomy);
10
+ $this->namespace = glsr()->id.'/v1';
11
+ $this->rest_base = 'categories';
12
+ $this->taxonomy = glsr()->taxonomy;
13
+ }
14
+
15
+ /**
16
+ * @param string $taxonomy
17
+ * @return bool
18
+ */
19
+ protected function check_is_taxonomy_allowed($taxonomy)
20
+ {
21
+ // if (!is_user_logged_in()) {
22
+ // return false;
23
+ // }
24
+ return parent::check_is_taxonomy_allowed($taxonomy);
25
+ }
26
+ }
plugin/Controllers/Api/Version1/RestController.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1;
4
+
5
+ class RestController
6
+ {
7
+ /**
8
+ * @return void
9
+ */
10
+ public function registerRoutes()
11
+ {
12
+ (new RestSummaryController())->register_routes();
13
+ (new RestTypeController())->register_routes();
14
+ }
15
+ }
plugin/Controllers/Api/Version1/RestReviewController.php ADDED
@@ -0,0 +1,539 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1;
4
+
5
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\Response\Prepare;
6
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\Schema\ReviewParameters;
7
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\Schema\ReviewSchema;
8
+ use GeminiLabs\SiteReviews\Helpers\Arr;
9
+ use GeminiLabs\SiteReviews\Review;
10
+ use GeminiLabs\SiteReviews\Reviews;
11
+ use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsShortcode;
12
+ use WP_Error;
13
+ use WP_REST_Request;
14
+ use WP_REST_Response;
15
+
16
+ class RestReviewController extends \WP_REST_Controller
17
+ {
18
+ public function __construct()
19
+ {
20
+ $this->namespace = glsr()->id.'/v1';
21
+ $this->rest_base = 'reviews';
22
+ }
23
+
24
+ /**
25
+ * @return bool
26
+ */
27
+ public function check_read_permission(Review $review)
28
+ {
29
+ return $review->is_approved || glsr()->can('read_post', $review->ID);
30
+ }
31
+
32
+ /**
33
+ * @param WP_REST_Request $request
34
+ * @return \WP_REST_Response|WP_Error
35
+ */
36
+ public function create_item($request)
37
+ {
38
+ $review = glsr_create_review($request->get_params());
39
+ if (false === $review || !$review->isValid()) {
40
+ $error = _x('Review creation failed, please check the Site Reviews console log for more details.', 'admin-text', 'site-reviews');
41
+ return new WP_Error('rest_review_create_item', $error, ['status' => 500]);
42
+ }
43
+ if ($request['_rendered']) {
44
+ $response = $this->renderedItems($request);
45
+ } else {
46
+ $data = $this->prepare_item_for_response($review, $request);
47
+ $response = rest_ensure_response($data);
48
+ }
49
+ $response->set_status(201);
50
+ $response->header('Location', rest_url(sprintf('%s/%s/%d', $this->namespace, $this->rest_base, $review->ID)));
51
+ return $response;
52
+ }
53
+
54
+ /**
55
+ * @param WP_REST_Request $request
56
+ * @return true|WP_Error
57
+ */
58
+ public function create_item_permissions_check($request)
59
+ {
60
+ if (!empty($request['id'])) {
61
+ $error = _x('Cannot create existing review.', 'admin-text', 'site-reviews');
62
+ return new WP_Error('rest_review_exists', $error, ['status' => 400]);
63
+ }
64
+ if (!empty($request['author']) && get_current_user_id() !== $request['author'] && !glsr()->can('edit_others_posts')) {
65
+ $error = _x('Sorry, you are not allowed to create reviews as this user.', 'admin-text', 'site-reviews');
66
+ return new WP_Error('rest_cannot_edit_others', $error, ['status' => rest_authorization_required_code()]);
67
+ }
68
+ if (!glsr()->can('create_posts')) {
69
+ $error = _x('Sorry, you are not allowed to create reviews as this user.', 'admin-text', 'site-reviews');
70
+ return new WP_Error('rest_cannot_create', $error, ['status' => rest_authorization_required_code()]);
71
+ }
72
+ if (!$this->check_assign_terms_permission($request)) {
73
+ $error = _x('Sorry, you are not allowed to assign the provided terms.', 'admin-text', 'site-reviews');
74
+ return new WP_Error('rest_cannot_assign_term', $error, ['status' => rest_authorization_required_code()]);
75
+ }
76
+ return true;
77
+ }
78
+
79
+ /**
80
+ * @param WP_REST_Request $request
81
+ * @return \WP_REST_Response|WP_Error
82
+ */
83
+ public function delete_item($request)
84
+ {
85
+ $request->set_param('context', 'edit');
86
+ if ((bool) $request['force']) {
87
+ return $this->forceDeleteItem($request);
88
+ }
89
+ if (EMPTY_TRASH_DAYS < 1) {
90
+ $error = sprintf(_x('The review does not support trashing. Set "%s" to delete.', 'admin-text', 'site-reviews'), 'force=true');
91
+ return new WP_Error('rest_trash_not_supported', $error, ['status' => 501]);
92
+ }
93
+ if ('trash' === get_post_status($request['id'])) {
94
+ $error = _x('The review has already been deleted.', 'admin-text', 'site-reviews');
95
+ return new WP_Error('rest_already_trashed', $error, ['status' => 410]);
96
+ }
97
+ if (!wp_trash_post($request['id'])) {
98
+ $error = _x('The review cannot be deleted.', 'admin-text', 'site-reviews');
99
+ return new WP_Error('rest_cannot_delete', $error, ['status' => 500]);
100
+ }
101
+ $review = glsr_get_review($request['id']);
102
+ return $this->prepare_item_for_response($review, $request);
103
+ }
104
+
105
+ /**
106
+ * @param WP_REST_Request $request
107
+ * @return true|WP_Error
108
+ */
109
+ public function delete_item_permissions_check($request)
110
+ {
111
+ $review = glsr_get_review($request['id']);
112
+ if (!$review->isValid()) {
113
+ $error = _x('Invalid review ID.', 'admin-text', 'site-reviews');
114
+ return new WP_Error('rest_review_invalid_id', $error, ['status' => 404]);
115
+ }
116
+ if (!glsr()->can('delete_post', $review->ID)) {
117
+ $error = _x('Sorry, you are not allowed to delete this review.', 'admin-text', 'site-reviews');
118
+ return new WP_Error('rest_cannot_delete', $error, ['status' => rest_authorization_required_code()]);
119
+ }
120
+ return true;
121
+ }
122
+
123
+ /**
124
+ * @return array
125
+ */
126
+ public function get_collection_params()
127
+ {
128
+ $params = glsr(ReviewParameters::class)->parameters();
129
+ $params['context'] = $this->get_context_param(['default' => 'view']);
130
+ return apply_filters('rest_review_collection_params', $params, glsr()->post_type);
131
+ }
132
+
133
+ /**
134
+ * @param WP_REST_Request $request
135
+ * @return \WP_REST_Response|WP_Error
136
+ */
137
+ public function get_item($request)
138
+ {
139
+ if ($request['_rendered']) {
140
+ return $this->renderedItem($request);
141
+ }
142
+ $review = glsr_get_review($request['id']);
143
+ $data = $this->prepare_item_for_response($review, $request);
144
+ return rest_ensure_response($data);
145
+ }
146
+
147
+ /**
148
+ * @param WP_REST_Request $request
149
+ * @return true|WP_Error
150
+ */
151
+ public function get_item_permissions_check($request)
152
+ {
153
+ $review = glsr_get_review($request['id']);
154
+ if (!$review->isValid()) {
155
+ $error = _x('Invalid review ID.', 'admin-text', 'site-reviews');
156
+ return new WP_Error('rest_review_invalid_id', $error, ['status' => 404]);
157
+ }
158
+ if (!is_user_logged_in() || !$this->check_read_permission($review)) {
159
+ $error = _x('Sorry, you are not allowed to view this review.', 'admin-text', 'site-reviews');
160
+ return new WP_Error('rest_cannot_view', $error, ['status' => rest_authorization_required_code()]);
161
+ }
162
+ return true;
163
+ }
164
+
165
+ /**
166
+ * @return array
167
+ */
168
+ public function get_item_schema()
169
+ {
170
+ if (empty($this->schema)) {
171
+ $this->schema = glsr(ReviewSchema::class, ['api' => $this])->schema();
172
+ }
173
+ return $this->add_additional_fields_schema($this->schema);
174
+ }
175
+
176
+ /**
177
+ * @param WP_REST_Request $request
178
+ * @return \WP_REST_Response|WP_Error
179
+ */
180
+ public function get_items($request)
181
+ {
182
+ if ($request['_rendered']) {
183
+ return $this->renderedItems($request);
184
+ }
185
+ $results = glsr_get_reviews($this->normalizedArgs($request));
186
+ $reviews = [];
187
+ foreach ($results->reviews as $review) {
188
+ if ($this->check_read_permission($review)) {
189
+ $data = $this->prepare_item_for_response($review, $request);
190
+ $reviews[] = $this->prepare_response_for_collection($data);
191
+ }
192
+ }
193
+ if ($results->args['page'] > $results->max_num_pages && $results->total > 0) {
194
+ $error = _x('The page number requested is larger than the number of pages available.', 'admin-text', 'site-reviews');
195
+ return new WP_Error('rest_invalid_page_number', $error, ['status' => 400]);
196
+ }
197
+ $response = rest_ensure_response($reviews);
198
+ if (is_wp_error($response)) {
199
+ return $response;
200
+ }
201
+ return $this->prepareResponse($response, $request, $results);
202
+ }
203
+
204
+ /**
205
+ * @param WP_REST_Request $request
206
+ * @return true|WP_Error
207
+ */
208
+ public function get_items_permissions_check($request)
209
+ {
210
+ if (!is_user_logged_in()) {
211
+ $error = _x('Sorry, you do not have permission to access reviews.', 'admin-text', 'site-reviews');
212
+ }
213
+ if ('edit' === $request['context'] && !glsr()->can('edit_posts')) {
214
+ $error = _x('Sorry, you are not allowed to edit reviews.', 'admin-text', 'site-reviews');
215
+ }
216
+ if (isset($error)) {
217
+ return new WP_Error('rest_forbidden_context', $error, [
218
+ 'status' => rest_authorization_required_code(),
219
+ ]);
220
+ }
221
+ return true;
222
+ }
223
+
224
+ /**
225
+ * @param Review $review
226
+ * @param WP_REST_Request $request
227
+ * @return \WP_REST_Response
228
+ */
229
+ public function prepare_item_for_response($review, $request)
230
+ {
231
+ $fields = $this->get_fields_for_response($request);
232
+ $prepare = new Prepare($fields, $review, $request);
233
+ glsr()->store('api', true); // load all review fields!
234
+ foreach ($fields as $field) {
235
+ call_user_func([$prepare, $field]);
236
+ }
237
+ glsr()->discard('api');
238
+ $data = $prepare->item();
239
+ $data = $this->add_additional_fields_to_object($data, $request);
240
+ $data = $this->filter_response_by_context($data, Arr::get($request, 'context', 'view'));
241
+ $response = rest_ensure_response($data);
242
+ $links = $this->prepareLinks($review);
243
+ $response->add_links($links);
244
+ if ($self = Arr::get($links, 'self.href')) {
245
+ $actions = $this->getAvailableActions($review, $request);
246
+ foreach ($actions as $rel) {
247
+ $response->add_link($rel, $self);
248
+ }
249
+ }
250
+ return $response; // @todo filter this, i.e. "rest_prepare_{glsr()->post_type}"
251
+ }
252
+
253
+ /**
254
+ * @return void
255
+ */
256
+ public function register_routes()
257
+ {
258
+ register_rest_route($this->namespace, '/'.$this->rest_base, [
259
+ [
260
+ 'args' => $this->get_collection_params(),
261
+ 'callback' => [$this, 'get_items'],
262
+ 'methods' => \WP_REST_Server::READABLE,
263
+ 'permission_callback' => [$this, 'get_items_permissions_check'],
264
+ ], [
265
+ 'args' => $this->get_endpoint_args_for_item_schema(\WP_REST_Server::CREATABLE),
266
+ 'callback' => [$this, 'create_item'],
267
+ 'methods' => \WP_REST_Server::CREATABLE,
268
+ 'permission_callback' => [$this, 'create_item_permissions_check'],
269
+ ],
270
+ 'schema' => [$this, 'get_public_item_schema'],
271
+ ]);
272
+ register_rest_route($this->namespace, '/'.$this->rest_base.'/(?P<id>[\d]+)', [
273
+ [
274
+ 'args' => [
275
+ 'context' => $this->get_context_param(['default' => 'view']),
276
+ ],
277
+ 'callback' => [$this, 'get_item'],
278
+ 'methods' => \WP_REST_Server::READABLE,
279
+ 'permission_callback' => [$this, 'get_item_permissions_check'],
280
+ ],
281
+ [
282
+ 'args' => $this->get_endpoint_args_for_item_schema(\WP_REST_Server::EDITABLE),
283
+ 'callback' => [$this, 'update_item'],
284
+ 'methods' => \WP_REST_Server::EDITABLE,
285
+ 'permission_callback' => [$this, 'update_item_permissions_check'],
286
+ ],
287
+ [
288
+ 'args' => [
289
+ 'force' => [
290
+ 'default' => false,
291
+ 'description' => _x('Whether to bypass Trash and force deletion.', 'admin-text', 'site-reviews'),
292
+ 'type' => 'boolean',
293
+ ],
294
+ ],
295
+ 'callback' => [$this, 'delete_item'],
296
+ 'methods' => \WP_REST_Server::DELETABLE,
297
+ 'permission_callback' => [$this, 'delete_item_permissions_check'],
298
+ ],
299
+ 'args' => [
300
+ 'id' => [
301
+ 'description' => _x('Unique identifier for the object.', 'admin-text', 'site-reviews'),
302
+ 'type' => 'integer',
303
+ ],
304
+ ],
305
+ 'schema' => [$this, 'get_public_item_schema'],
306
+ ]);
307
+ }
308
+
309
+ /**
310
+ * @param WP_REST_Request $request
311
+ * @return WP_REST_Response|WP_Error
312
+ */
313
+ public function update_item($request)
314
+ {
315
+ $review = glsr_update_review($request['id'], $request->get_params());
316
+ if (!$review) {
317
+ $error = _x('Review update failed, please check the Site Reviews console log for more details.', 'admin-text', 'site-reviews');
318
+ return new WP_Error('rest_update_review', $error, ['status' => 500]);
319
+ }
320
+ $request->set_param('context', 'edit');
321
+ if ($request['_rendered']) {
322
+ return $this->renderedItem($request);
323
+ }
324
+ $data = $this->prepare_item_for_response($review, $request);
325
+ $response = rest_ensure_response($data);
326
+ return $response;
327
+ }
328
+
329
+ /**
330
+ * @param WP_REST_Request $request
331
+ * @return true|WP_Error
332
+ */
333
+ public function update_item_permissions_check($request)
334
+ {
335
+ $review = glsr_get_review($request['id']);
336
+ if (!$review->isValid()) {
337
+ $error = _x('Invalid review ID.', 'admin-text', 'site-reviews');
338
+ return new WP_Error('rest_review_invalid_id', $error, ['status' => 404]);
339
+ }
340
+ if (!glsr()->can('edit_post', $review->ID)) {
341
+ $error = _x('Sorry, you are not allowed to edit this review.', 'admin-text', 'site-reviews');
342
+ return new WP_Error('rest_cannot_edit', $error, ['status' => rest_authorization_required_code()]);
343
+ }
344
+ if (!empty($request['author']) && get_current_user_id() !== $request['author'] && !glsr()->can('edit_others_posts')) {
345
+ $error = _x('Sorry, you are not allowed to update reviews as this user.', 'admin-text', 'site-reviews');
346
+ return new WP_Error('rest_cannot_edit_others', $error, ['status' => rest_authorization_required_code()]);
347
+ }
348
+ if (!$this->check_assign_terms_permission($request)) {
349
+ $error = _x('Sorry, you are not allowed to assign the provided terms.', 'admin-text', 'site-reviews');
350
+ return new WP_Error('rest_cannot_assign_term', $error, ['status' => rest_authorization_required_code()]);
351
+ }
352
+ return true;
353
+ }
354
+
355
+ /**
356
+ * @param WP_REST_Request $request
357
+ * @return bool
358
+ */
359
+ protected function check_assign_terms_permission($request)
360
+ {
361
+ foreach ($request['assigned_terms'] as $termId) {
362
+ if (!get_term($termId, glsr()->taxonomy)) {
363
+ continue; // Invalid terms will be rejected later
364
+ }
365
+ if (!current_user_can('assign_term', (int) $termId)) {
366
+ return false;
367
+ }
368
+ }
369
+ return true;
370
+ }
371
+
372
+ /**
373
+ * @param WP_REST_Request $request
374
+ * @return \WP_REST_Response|WP_Error
375
+ */
376
+ public function forceDeleteItem($request)
377
+ {
378
+ $review = glsr_get_review($request['id']);
379
+ $previous = $this->prepare_item_for_response($review, $request);
380
+ $result = wp_delete_post($review->ID, true);
381
+ if (false === $result) {
382
+ $error = _x('The review cannot be deleted.', 'admin-text', 'site-reviews');
383
+ return new WP_Error('rest_cannot_delete', $error, ['status' => 500]);
384
+ }
385
+ return rest_ensure_response([
386
+ 'deleted' => true,
387
+ 'previous' => $previous->get_data(),
388
+ ]);
389
+ }
390
+
391
+ /**
392
+ * @return array
393
+ */
394
+ protected function getAvailableActions(Review $review, WP_REST_Request $request)
395
+ {
396
+ if ('edit' !== $request['context']) {
397
+ return [];
398
+ }
399
+ $rels = [];
400
+ $taxonomy = get_taxonomy(glsr()->taxonomy);
401
+ if (glsr()->can('publish_posts')) {
402
+ $rels[] = 'https://api.w.org/action-publish';
403
+ }
404
+ if (glsr()->can('edit_others_posts')) {
405
+ $rels[] = 'https://api.w.org/action-assign-author';
406
+ }
407
+ if (current_user_can($taxonomy->cap->edit_terms)) {
408
+ $rels[] = 'https://api.w.org/action-create-'.glsr()->taxonomy;
409
+ }
410
+ if (current_user_can($taxonomy->cap->assign_terms)) {
411
+ $rels[] = 'https://api.w.org/action-assign-'.glsr()->taxonomy;
412
+ }
413
+ return $rels;
414
+ }
415
+
416
+ /**
417
+ * @return array
418
+ */
419
+ protected function normalizedArgs(WP_REST_Request $request)
420
+ {
421
+ $args = [];
422
+ $registered = $this->get_collection_params();
423
+ foreach ($registered as $key => $params) {
424
+ if (isset($request[$key])) {
425
+ $args[$key] = $request[$key];
426
+ }
427
+ }
428
+ if (empty($args['date'])) {
429
+ $args['date'] = [];
430
+ if (isset($args['after'])) {
431
+ $args['date']['after'] = $args['after'];
432
+ }
433
+ if (isset($args['before'])) {
434
+ $args['date']['before'] = $args['before'];
435
+ }
436
+ }
437
+ return $args;
438
+ }
439
+
440
+ /**
441
+ * @return array
442
+ */
443
+ protected function prepareLinks(Review $review)
444
+ {
445
+ $base = $this->namespace.'/'.$this->rest_base;
446
+ $revisions = wp_get_post_revisions($review->ID, ['fields' => 'ids']);
447
+ $revisionCount = count($revisions);
448
+ $links = [
449
+ 'self' => [
450
+ 'href' => rest_url(trailingslashit($base).$review->ID),
451
+ ],
452
+ 'collection' => [
453
+ 'href' => rest_url($base),
454
+ ],
455
+ 'about' => [
456
+ 'href' => rest_url('wp/v2/types/'.glsr()->post_type),
457
+ ],
458
+ 'https://api.w.org/attachment' => [
459
+ 'href' => add_query_arg('parent', $review->ID, rest_url('wp/v2/media')),
460
+ ],
461
+ 'https://api.w.org/term' => [
462
+ 'embeddable' => true,
463
+ 'href' => add_query_arg('post', $review->ID, rest_url('wp/v2/'.glsr()->taxonomy)),
464
+ 'taxonomy' => glsr()->taxonomy,
465
+ ],
466
+ 'version-history' => [
467
+ 'count' => $revisionCount,
468
+ 'href' => rest_url(trailingslashit($base).$review->ID.'/revisions'),
469
+ ],
470
+ ];
471
+ if ($revisionCount > 0) {
472
+ $lastRevision = array_shift($revisions);
473
+ $links['predecessor-version'] = [
474
+ 'href' => rest_url(trailingslashit($base).$review->ID.'/revisions/'.$lastRevision),
475
+ 'id' => $lastRevision,
476
+ ];
477
+ }
478
+ if (!empty($review->user_id)) {
479
+ $links['author'] = [
480
+ 'embeddable' => true,
481
+ 'href' => rest_url('wp/v2/users/'.$review->user_id),
482
+ ];
483
+ }
484
+ if (post_type_supports(glsr()->post_type, 'comments')) {
485
+ $links['replies'] = [
486
+ 'embeddable' => true,
487
+ 'href' => add_query_arg('post', $review->ID, rest_url('wp/v2/comments')),
488
+ ];
489
+ }
490
+ return $links;
491
+ }
492
+
493
+ /**
494
+ * @return \WP_REST_Response
495
+ */
496
+ protected function prepareResponse(WP_REST_Response $response, WP_REST_Request $request, Reviews $reviews)
497
+ {
498
+ $page = $reviews->args['page'];
499
+ $ratings = glsr_get_ratings($this->normalizedArgs($request));
500
+ $response->header('X-GLSR-Average', (string) $ratings->average);
501
+ $response->header('X-GLSR-Ranking', (string) $ratings->ranking);
502
+ $response->header('X-WP-Total', (string) $reviews->total);
503
+ $response->header('X-WP-TotalPages', (string) $reviews->max_num_pages);
504
+ $parameters = $request->get_query_params();
505
+ $base = add_query_arg(urlencode_deep($parameters), rest_url(sprintf('%s/%s', $this->namespace, $this->rest_base)));
506
+ if ($page > 1) {
507
+ $prevPage = $page - 1;
508
+ if ($prevPage > $reviews->max_num_pages) {
509
+ $prevPage = $reviews->max_num_pages;
510
+ }
511
+ $prevLink = add_query_arg('page', $prevPage, $base);
512
+ $response->link_header('prev', $prevLink);
513
+ }
514
+ if ($reviews->max_num_pages > $page) {
515
+ $nextPage = $page + 1;
516
+ $nextLink = add_query_arg('page', $nextPage, $base);
517
+ $response->link_header('next', $nextLink);
518
+ }
519
+ return $response;
520
+ }
521
+
522
+ protected function renderedItem(WP_REST_Request $request)
523
+ {
524
+ $review = glsr_get_review($request['id']);
525
+ return rest_ensure_response([
526
+ 'rendered' => (string) $review->build(),
527
+ ]);
528
+ }
529
+
530
+ protected function renderedItems(WP_REST_Request $request)
531
+ {
532
+ $html = glsr(SiteReviewsShortcode::class)->buildReviewsHtml($this->normalizedArgs($request));
533
+ $response = rest_ensure_response([
534
+ 'pagination' => $html->getPagination($wrap = false),
535
+ 'rendered' => $html->getReviews(),
536
+ ]);
537
+ return $this->prepareResponse($response, $request, $html->reviews);
538
+ }
539
+ }
plugin/Controllers/Api/Version1/RestSummaryController.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1;
4
+
5
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\Schema\SummaryParameters;
6
+ use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsSummaryShortcode;
7
+ use WP_Error;
8
+
9
+ class RestSummaryController extends RestReviewController
10
+ {
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+ $this->rest_base = 'summary';
15
+ }
16
+
17
+ /**
18
+ * @return array
19
+ */
20
+ public function get_collection_params()
21
+ {
22
+ $params = glsr(SummaryParameters::class)->parameters();
23
+ return apply_filters('rest_rating_summary_collection_params', $params);
24
+ }
25
+
26
+ /**
27
+ * @return array
28
+ */
29
+ public function get_item_schema()
30
+ {
31
+ if (empty($this->schema)) {
32
+ $this->schema = [
33
+ '$schema' => 'http://json-schema.org/draft-04/schema#',
34
+ 'properties' => [
35
+ 'average' => [
36
+ 'context' => ['view'],
37
+ 'description' => _x('The average rating.', 'admin-text', 'site-reviews'),
38
+ 'type' => 'number',
39
+ ],
40
+ 'maximum' => [
41
+ 'context' => ['view'],
42
+ 'description' => _x('The defined maximum rating.', 'admin-text', 'site-reviews'),
43
+ 'type' => 'integer',
44
+ ],
45
+ 'minimum' => [
46
+ 'context' => ['view'],
47
+ 'description' => _x('The defined minimum rating.', 'admin-text', 'site-reviews'),
48
+ 'type' => 'integer',
49
+ ],
50
+ 'ranking' => [
51
+ 'context' => ['view'],
52
+ 'description' => _x('The bayesian ranking number.', 'admin-text', 'site-reviews'),
53
+ 'type' => 'number',
54
+ ],
55
+ 'ratings' => [
56
+ 'context' => ['view'],
57
+ 'description' => _x('The total number of reviews for each rating level from zero to maximum rating.', 'admin-text', 'site-reviews'),
58
+ 'items' => ['type' => 'integer'],
59
+ 'type' => 'array',
60
+ ],
61
+ 'reviews' => [
62
+ 'context' => ['view'],
63
+ 'description' => _x('The total number of reviews used to calculate the average.', 'admin-text', 'site-reviews'),
64
+ 'type' => 'integer',
65
+ ],
66
+ ],
67
+ 'title' => 'rating-summary',
68
+ 'type' => 'object',
69
+ ];
70
+ }
71
+ return $this->add_additional_fields_schema($this->schema);
72
+ }
73
+
74
+ /**
75
+ * @param \WP_REST_Request $request
76
+ * @return \WP_REST_Response
77
+ */
78
+ public function get_items($request)
79
+ {
80
+ $args = $this->normalizedArgs($request);
81
+ if ($request['_rendered']) {
82
+ return rest_ensure_response([
83
+ 'rendered' => glsr(SiteReviewsSummaryShortcode::class)->build($args),
84
+ ]);
85
+ }
86
+ return rest_ensure_response(glsr_get_ratings($args)->toArray());
87
+ }
88
+
89
+ /**
90
+ * @param \WP_REST_Request $request
91
+ * @return true|\WP_Error
92
+ */
93
+ public function get_items_permissions_check($request)
94
+ {
95
+ if (!is_user_logged_in()) {
96
+ $error = _x('Sorry, you are not allowed to view review summaries.', 'admin-text', 'site-reviews');
97
+ return new WP_Error('rest_forbidden_context', $error, [
98
+ 'status' => rest_authorization_required_code(),
99
+ ]);
100
+ }
101
+ return true;
102
+ }
103
+
104
+ /**
105
+ * @return void
106
+ */
107
+ public function register_routes()
108
+ {
109
+ register_rest_route($this->namespace, '/'.$this->rest_base, [
110
+ [
111
+ 'args' => $this->get_collection_params(),
112
+ 'callback' => [$this, 'get_items'],
113
+ 'methods' => \WP_REST_Server::READABLE,
114
+ 'permission_callback' => [$this, 'get_items_permissions_check'],
115
+ ],
116
+ 'schema' => [$this, 'get_public_item_schema'],
117
+ ]);
118
+ }
119
+ }
plugin/Controllers/Api/Version1/RestTypeController.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1;
4
+
5
+ use WP_Error;
6
+
7
+ class RestTypeController extends \WP_REST_Controller
8
+ {
9
+ public function __construct()
10
+ {
11
+ $this->namespace = glsr()->id.'/v1';
12
+ $this->rest_base = 'types';
13
+ }
14
+
15
+ /**
16
+ * @param \WP_REST_Request $request
17
+ * @return \WP_REST_Response|WP_Error
18
+ */
19
+ public function get_items($request)
20
+ {
21
+ $data = [];
22
+ foreach (glsr()->retrieveAs('array', 'review_types') as $slug => $name) {
23
+ $data[] = compact('name', 'slug');
24
+ }
25
+ if (empty($data)) {
26
+ $error = _x('There are no review types.', 'admin-text', 'site-reviews');
27
+ return new WP_Error('rest_review_invalid_types', $error, ['status' => 400]);
28
+ }
29
+ return rest_ensure_response($data);
30
+ }
31
+
32
+ /**
33
+ * @param \WP_REST_Request $request
34
+ * @return true|\WP_Error
35
+ */
36
+ public function get_items_permissions_check($request)
37
+ {
38
+ if (!is_user_logged_in()) {
39
+ $error = _x('Sorry, you are not allowed to view review types.', 'admin-text', 'site-reviews');
40
+ return new WP_Error('rest_forbidden_context', $error, [
41
+ 'status' => rest_authorization_required_code(),
42
+ ]);
43
+ }
44
+ return true;
45
+ }
46
+
47
+ /**
48
+ * @return void
49
+ */
50
+ public function register_routes()
51
+ {
52
+ register_rest_route($this->namespace, '/'.$this->rest_base, [
53
+ [
54
+ 'callback' => [$this, 'get_items'],
55
+ 'methods' => \WP_REST_Server::READABLE,
56
+ 'permission_callback' => [$this, 'get_items_permissions_check'],
57
+ ],
58
+ ]);
59
+ }
60
+ }
plugin/Controllers/Api/Version1/Schema/ReviewParameters.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1\Schema;
4
+
5
+ class ReviewParameters
6
+ {
7
+ public function parameters()
8
+ {
9
+ $parameters = glsr(SummaryParameters::class)->parameters();
10
+ $parameters['offset'] = [
11
+ 'description' => _x('Offset the result set by a specific number of items.', 'admin-text', 'site-reviews'),
12
+ 'type' => 'integer',
13
+ ];
14
+ $parameters['order'] = [
15
+ 'default' => 'desc',
16
+ 'description' => _x('Order sort attribute ascending or descending.', 'admin-text', 'site-reviews'),
17
+ 'enum' => ['asc', 'desc'],
18
+ 'type' => 'string',
19
+ ];
20
+ $parameters['orderby'] = [
21
+ 'default' => 'date',
22
+ 'description' => _x('Sort collection by object attribute.', 'admin-text', 'site-reviews'),
23
+ 'enum' => ['author', 'comment_count', 'date', 'date_gmt', 'id', 'menu_order', 'none', 'random', 'rating'],
24
+ 'type' => 'string',
25
+ ];
26
+ $parameters['page'] = [
27
+ 'default' => 1,
28
+ 'description' => _x('Current page of the collection.', 'admin-text', 'site-reviews'),
29
+ 'minimum' => 1,
30
+ 'sanitize_callback' => 'absint',
31
+ 'type' => 'integer',
32
+ ];
33
+ $parameters['per_page'] = [
34
+ 'default' => 10,
35
+ 'description' => _x('Maximum number of items to be returned in result set.', 'admin-text', 'site-reviews'),
36
+ 'maximum' => 100,
37
+ 'minimum' => 1,
38
+ 'sanitize_callback' => 'absint',
39
+ 'type' => 'integer',
40
+ ];
41
+ return $parameters;
42
+ }
43
+ }
plugin/Controllers/Api/Version1/Schema/ReviewSchema.php ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1\Schema;
4
+
5
+ class ReviewSchema
6
+ {
7
+ /**
8
+ * @var \WP_REST_Post_Meta_Fields
9
+ */
10
+ protected $meta;
11
+
12
+ public function __construct()
13
+ {
14
+ $this->meta = new \WP_REST_Post_Meta_Fields(glsr()->post_type);
15
+ }
16
+
17
+ /**
18
+ * @return array
19
+ */
20
+ public function schema()
21
+ {
22
+ $schema = [
23
+ '$schema' => 'http://json-schema.org/draft-04/schema#',
24
+ 'properties' => $this->properties(),
25
+ 'title' => glsr()->post_type,
26
+ 'type' => 'object',
27
+ ];
28
+ $schema['properties']['links'] = $this->links();
29
+ $schema['properties']['meta'] = $this->meta->get_field_schema();
30
+ $propertyKeys = array_keys($schema['properties']);
31
+ $schema = apply_filters('rest_'.glsr()->post_type.'_item_schema', $schema);
32
+ $newPropertyKeys = array_diff(array_keys($schema['properties']), $propertyKeys);
33
+ if (count($newPropertyKeys) > 0) {
34
+ _doing_it_wrong(__METHOD__, sprintf(_x('Please use %s to add new schema properties.', 'admin-text', 'site-reviews'), 'register_rest_field'), '5.4.0');
35
+ }
36
+ return $schema;
37
+ }
38
+
39
+ /**
40
+ * @return array
41
+ */
42
+ protected function links()
43
+ {
44
+ $href = rest_url(glsr()->id.'/v1/reviews/{id}');
45
+ return [
46
+ [
47
+ 'href' => $href,
48
+ 'rel' => 'https://api.w.org/action-publish',
49
+ 'title' => _x('The current user can publish this review.', 'admin-text', 'site-reviews'),
50
+ 'targetSchema' => [
51
+ 'type' => 'object',
52
+ 'properties' => [
53
+ 'status' => [
54
+ 'enum' => ['future', 'publish'],
55
+ 'type' => 'string',
56
+ ],
57
+ ],
58
+ ],
59
+ ],
60
+ [
61
+ 'href' => $href,
62
+ 'rel' => 'https://api.w.org/action-unfiltered-html',
63
+ 'title' => _x('The current user can post unfiltered HTML markup and JavaScript.', 'admin-text', 'site-reviews'),
64
+ 'targetSchema' => [
65
+ 'type' => 'object',
66
+ 'properties' => [
67
+ 'content' => [
68
+ 'raw' => ['type' => 'string'],
69
+ ],
70
+ ],
71
+ ],
72
+ ],
73
+ [
74
+ 'href' => $href,
75
+ 'rel' => 'https://api.w.org/action-assign-author',
76
+ 'title' => _x('The current user can change the author on this review.', 'admin-text', 'site-reviews'),
77
+ 'targetSchema' => [
78
+ 'type' => 'object',
79
+ 'properties' => [
80
+ 'author' => [
81
+ 'raw' => ['type' => 'integer'],
82
+ ],
83
+ ],
84
+ ],
85
+ ],
86
+ [
87
+ 'href' => $href,
88
+ 'rel' => 'https://api.w.org/action-assign-'.glsr()->taxonomy,
89
+ 'title' => sprintf(_x('The current user can assign terms in the %s taxonomy.', 'admin-text', 'site-reviews'), glsr()->taxonomy),
90
+ 'targetSchema' => [
91
+ 'type' => 'object',
92
+ 'properties' => [
93
+ glsr()->taxonomy => [
94
+ 'items' => ['type' => 'integer'],
95
+ 'type' => 'array',
96
+ ],
97
+ ],
98
+ ],
99
+ ],
100
+ [
101
+ 'href' => $href,
102
+ 'rel' => 'https://api.w.org/action-create-'.glsr()->taxonomy,
103
+ 'title' => sprintf(_x('The current user can create terms in the %s taxonomy.', 'admin-text', 'site-reviews'), glsr()->taxonomy),
104
+ 'targetSchema' => [
105
+ 'type' => 'object',
106
+ 'properties' => [
107
+ glsr()->taxonomy => [
108
+ 'items' => ['type' => 'integer'],
109
+ 'type' => 'array',
110
+ ],
111
+ ],
112
+ ],
113
+ ],
114
+ ];
115
+ }
116
+
117
+ /**
118
+ * @return array
119
+ */
120
+ protected function properties()
121
+ {
122
+ return [
123
+ 'assigned_posts' => [
124
+ 'context' => ['edit', 'view'],
125
+ 'description' => _x('The posts assigned to the review of any public post type.', 'admin-text', 'site-reviews'),
126
+ 'items' => ['type' => 'integer'],
127
+ 'type' => 'array',
128
+ ],
129
+ 'assigned_terms' => [
130
+ 'context' => ['edit', 'view'],
131
+ 'description' => sprintf(_x('The terms assigned to the review in the %s taxonomy.', 'admin-text', 'site-reviews'), glsr()->taxonomy),
132
+ 'items' => ['type' => 'integer'],
133
+ 'type' => 'array',
134
+ ],
135
+ 'assigned_users' => [
136
+ 'context' => ['edit', 'view'],
137
+ 'description' => _x('The users assigned to the review.', 'admin-text', 'site-reviews'),
138
+ 'items' => ['type' => 'integer'],
139
+ 'type' => 'array',
140
+ ],
141
+ 'author' => [
142
+ 'context' => ['edit', 'view'],
143
+ 'description' => _x('The ID for the author of the review.', 'admin-text', 'site-reviews'),
144
+ 'type' => 'integer',
145
+ ],
146
+ 'avatar' => [
147
+ 'context' => ['edit', 'view'],
148
+ 'description' => _x('The avatar of the person who submitted the review.', 'admin-text', 'site-reviews'),
149
+ 'type' => 'string',
150
+ ],
151
+ 'content' => [
152
+ 'context' => ['edit', 'view'],
153
+ 'description' => _x('The content of the review.', 'admin-text', 'site-reviews'),
154
+ 'type' => 'string',
155
+ ],
156
+ 'custom' => [
157
+ 'arg_options' => [
158
+ 'sanitize_callback' => null,
159
+ 'validate_callback' => null,
160
+ ],
161
+ 'context' => ['edit', 'view'],
162
+ 'description' => _x('Custom fields.', 'admin-text', 'site-reviews'),
163
+ 'type' => 'object',
164
+ ],
165
+ 'date' => [
166
+ 'context' => ['edit', 'view'],
167
+ 'description' => _x('The date the review was published, in the site\'s timezone.', 'admin-text', 'site-reviews'),
168
+ 'format' => 'date-time',
169
+ 'type' => ['null', 'string'],
170
+ ],
171
+ 'date_gmt' => [
172
+ 'context' => ['edit', 'view'],
173
+ 'description' => _x('The date the review was published, as GMT.', 'admin-text', 'site-reviews'),
174
+ 'format' => 'date-time',
175
+ 'type' => ['null', 'string'],
176
+ ],
177
+ 'email' => [
178
+ 'context' => ['edit'],
179
+ 'description' => _x('The email of the person who submitted the review.', 'admin-text', 'site-reviews'),
180
+ 'type' => 'string',
181
+ ],
182
+ 'id' => [
183
+ 'context' => ['edit', 'view'],
184
+ 'description' => _x('Unique identifier for the review.', 'admin-text', 'site-reviews'),
185
+ 'readonly' => true,
186
+ 'type' => 'integer',
187
+ ],
188
+ 'ip_address' => [
189
+ 'context' => ['edit'],
190
+ 'description' => _x('The IP address of the person who submitted the review.', 'admin-text', 'site-reviews'),
191
+ 'format' => 'ip',
192
+ 'type' => 'string',
193
+ ],
194
+ 'is_approved' => [
195
+ 'context' => ['view'],
196
+ 'description' => _x('If the review has an approved status.', 'admin-text', 'site-reviews'),
197
+ 'readonly' => true,
198
+ 'type' => 'boolean',
199
+ ],
200
+ 'is_modified' => [
201
+ 'context' => ['view'],
202
+ 'description' => _x('If the review has been modified.', 'admin-text', 'site-reviews'),
203
+ 'readonly' => true,
204
+ 'type' => 'boolean',
205
+ ],
206
+ 'is_pinned' => [
207
+ 'context' => ['edit', 'view'],
208
+ 'description' => _x('If the review has been pinned.', 'admin-text', 'site-reviews'),
209
+ 'type' => 'boolean',
210
+ ],
211
+ 'modified' => [
212
+ 'context' => ['edit', 'view'],
213
+ 'description' => _x('The date the review was last modified, in the site\'s timezone.', 'admin-text', 'site-reviews'),
214
+ 'format' => 'date-time',
215
+ 'readonly' => true,
216
+ 'type' => 'string',
217
+ ],
218
+ 'modified_gmt' => [
219
+ 'context' => ['edit', 'view'],
220
+ 'description' => _x('The date the review was last modified, as GMT.', 'admin-text', 'site-reviews'),
221
+ 'format' => 'date-time',
222
+ 'readonly' => true,
223
+ 'type' => 'string',
224
+ ],
225
+ 'name' => [
226
+ 'context' => ['edit', 'view'],
227
+ 'description' => _x('The name of the person who submitted the review.', 'admin-text', 'site-reviews'),
228
+ 'type' => 'string',
229
+ ],
230
+ 'rating' => [
231
+ 'context' => ['edit', 'view'],
232
+ 'description' => _x('The rating of the review.', 'admin-text', 'site-reviews'),
233
+ 'type' => 'integer',
234
+ ],
235
+ 'response' => [
236
+ 'context' => ['edit', 'view'],
237
+ 'description' => _x('The response given to the review.', 'admin-text', 'site-reviews'),
238
+ 'type' => 'string',
239
+ ],
240
+ 'status' => [
241
+ 'context' => ['edit', 'view'],
242
+ 'description' => _x('A named status for the review.', 'admin-text', 'site-reviews'),
243
+ 'enum' => ['all', 'approved', 'pending', 'publish', 'unapproved'],
244
+ 'type' => 'string',
245
+ ],
246
+ 'terms' => [
247
+ 'context' => ['edit', 'view'],
248
+ 'description' => _x('If the terms were accepted when the review was submitted.', 'admin-text', 'site-reviews'),
249
+ 'type' => 'boolean',
250
+ ],
251
+ 'title' => [
252
+ 'context' => ['edit', 'view'],
253
+ 'description' => _x('The title of the review.', 'admin-text', 'site-reviews'),
254
+ 'type' => 'string',
255
+ ],
256
+ 'type' => [
257
+ 'context' => ['edit', 'view'],
258
+ 'description' => _x('Type of Review for the object.', 'admin-text', 'site-reviews'),
259
+ 'enum' => glsr()->retrieveAs('array', 'review_types', []),
260
+ 'type' => 'string',
261
+ ],
262
+ ];
263
+ }
264
+ }
plugin/Controllers/Api/Version1/Schema/SummaryParameters.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\Api\Version1\Schema;
4
+
5
+ use GeminiLabs\SiteReviews\Helpers\Cast;
6
+ use GeminiLabs\SiteReviews\Modules\Rating;
7
+
8
+ class SummaryParameters
9
+ {
10
+ public function parameters()
11
+ {
12
+ return [
13
+ 'after' => [
14
+ 'description' => _x('Limit result set to reviews published after a given ISO8601 compliant date.', 'admin-text', 'site-reviews'),
15
+ 'format' => 'date-time',
16
+ 'type' => 'string',
17
+ ],
18
+ 'assigned_posts' => [
19
+ 'default' => [],
20
+ 'description' => _x('Limit result set to reviews assigned to specific posts of any public post type.', 'admin-text', 'site-reviews'),
21
+ 'items' => ['type' => 'integer'],
22
+ 'type' => 'array',
23
+ ],
24
+ 'assigned_terms' => [
25
+ 'default' => [],
26
+ 'description' => sprintf(_x('Limit result set to reviews assigned to specific terms in the %s taxonomy.', 'admin-text', 'site-reviews'), glsr()->taxonomy),
27
+ 'items' => ['type' => 'integer'],
28
+ 'type' => 'array',
29
+ ],
30
+ 'assigned_users' => [
31
+ 'default' => [],
32
+ 'description' => _x('Limit result set to reviews assigned to specific users.', 'admin-text', 'site-reviews'),
33
+ 'items' => ['type' => 'integer'],
34
+ 'type' => 'array',
35
+ ],
36
+ 'before' => [
37
+ 'description' => _x('Limit result set to reviews published before a given ISO8601 compliant date.', 'admin-text', 'site-reviews'),
38
+ 'format' => 'date-time',
39
+ 'type' => 'string',
40
+ ],
41
+ 'date' => [
42
+ 'description' => _x('Limit result set to reviews published on a given ISO8601 compliant date.', 'admin-text', 'site-reviews'),
43
+ 'format' => 'date-time',
44
+ 'type' => 'string',
45
+ ],
46
+ 'email' => [
47
+ 'description' => _x('Limit result set to reviews containing a given email address.', 'admin-text', 'site-reviews'),
48
+ 'format' => 'email',
49
+ 'type' => 'string',
50
+ ],
51
+ 'exclude' => [
52
+ 'default' => [],
53
+ 'description' => _x('Ensure result set excludes specific review IDs.', 'admin-text', 'site-reviews'),
54
+ 'items' => ['type' => 'integer'],
55
+ 'type' => 'array',
56
+ ],
57
+ 'include' => [
58
+ 'default' => [],
59
+ 'description' => _x('Limit result set to specific review IDs.', 'admin-text', 'site-reviews'),
60
+ 'items' => ['type' => 'integer'],
61
+ 'type' => 'array',
62
+ ],
63
+ 'ip_address' => [
64
+ 'description' => _x('Limit result set to reviews submitted from a given IP address.', 'admin-text', 'site-reviews'),
65
+ 'format' => 'ip',
66
+ 'type' => 'string',
67
+ ],
68
+ 'rating' => [
69
+ 'description' => _x('Limit result set to reviews containing a given minimum rating.', 'admin-text', 'site-reviews'),
70
+ 'maximum' => Cast::toInt(glsr()->constant('MAX_RATING', Rating::class)),
71
+ 'minimum' => 0,
72
+ 'sanitize_callback' => 'absint',
73
+ 'type' => 'integer',
74
+ ],
75
+ 'status' => [
76
+ 'description' => _x('Limit result set to reviews containing a given status.', 'admin-text', 'site-reviews'),
77
+ 'enum' => ['all', 'approved', 'pending', 'publish', 'unapproved'],
78
+ 'type' => 'string',
79
+ ],
80
+ 'terms' => [
81
+ 'description' => _x('Limit result set to reviews submitted with terms accepted.', 'admin-text', 'site-reviews'),
82
+ 'type' => 'boolean',
83
+ ],
84
+ 'type' => [
85
+ 'description' => _x('Limit result set to reviews containing a given review type.', 'admin-text', 'site-reviews'),
86
+ 'enum' => glsr()->retrieveAs('array', 'review_types', []),
87
+ 'type' => 'string',
88
+ ],
89
+ 'user__in' => [
90
+ 'default' => [],
91
+ 'description' => _x('Limit result set to reviews authored by specific users.', 'admin-text', 'site-reviews'),
92
+ 'items' => ['type' => 'integer'],
93
+ 'type' => 'array',
94
+ ],
95
+ 'user__not_in' => [
96
+ 'default' => [],
97
+ 'description' => _x('Ensure result set excludes reviews authored by specific users.', 'admin-text', 'site-reviews'),
98
+ 'items' => ['type' => 'integer'],
99
+ 'type' => 'array',
100
+ ],
101
+ ];
102
+ }
103
+ }
plugin/Controllers/BlocksController.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers;
4
 
 
5
  use GeminiLabs\SiteReviews\Helper;
6
  use GeminiLabs\SiteReviews\Helpers\Arr;
7
  use GeminiLabs\SiteReviews\Modules\Style;
@@ -62,6 +63,7 @@ class BlocksController extends Controller
62
  ['wp-edit-blocks'],
63
  glsr()->version
64
  );
 
65
  wp_register_script(
66
  glsr()->id.'/blocks',
67
  glsr()->url('assets/scripts/'.glsr()->id.'-blocks.js'),
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers;
4
 
5
+ use GeminiLabs\SiteReviews\Commands\EnqueuePublicAssets;
6
  use GeminiLabs\SiteReviews\Helper;
7
  use GeminiLabs\SiteReviews\Helpers\Arr;
8
  use GeminiLabs\SiteReviews\Modules\Style;
63
  ['wp-edit-blocks'],
64
  glsr()->version
65
  );
66
+ wp_add_inline_style(glsr()->id.'/blocks', (new EnqueuePublicAssets())->inlineStyles());
67
  wp_register_script(
68
  glsr()->id.'/blocks',
69
  glsr()->url('assets/scripts/'.glsr()->id.'-blocks.js'),
plugin/Controllers/EditorController.php CHANGED
@@ -23,7 +23,7 @@ class EditorController extends Controller
23
  */
24
  public function filterEditorSettings($settings)
25
  {
26
- if ($this->isReviewEditable()) {
27
  $settings = [
28
  'media_buttons' => false,
29
  'quicktags' => false,
@@ -42,7 +42,7 @@ class EditorController extends Controller
42
  */
43
  public function filterEditorTextarea($html)
44
  {
45
- if ($this->isReviewEditable()) {
46
  $html = str_replace('<textarea', '<div id="ed_toolbar"></div><textarea', $html);
47
  }
48
  return $html;
@@ -125,57 +125,6 @@ class EditorController extends Controller
125
  wp_send_json_success($response);
126
  }
127
 
128
- /**
129
- * @return void
130
- * @action admin_print_scripts
131
- */
132
- public function removeAutosave()
133
- {
134
- if ($this->isReviewEditor() && !$this->isReviewEditable()) {
135
- wp_deregister_script('autosave');
136
- }
137
- }
138
-
139
- /**
140
- * @return void
141
- * @action current_screen
142
- */
143
- public function removePostTypeSupport()
144
- {
145
- if ($this->isReviewEditor() && !$this->isReviewEditable()) {
146
- remove_post_type_support(glsr()->post_type, 'title');
147
- remove_post_type_support(glsr()->post_type, 'editor');
148
- }
149
- }
150
-
151
- /**
152
- * @param WP_Post $post
153
- * @return void
154
- * @action edit_form_after_title
155
- */
156
- public function renderReviewEditor($post)
157
- {
158
- if (Review::isReview($post) && !Review::isEditable($post)) {
159
- glsr()->render('partials/editor/review', [
160
- 'post' => $post,
161
- 'response' => glsr(Database::class)->meta($post->ID, 'response'),
162
- ]);
163
- }
164
- }
165
-
166
- /**
167
- * @return void
168
- * @action admin_head
169
- */
170
- public function renderReviewFields()
171
- {
172
- $screen = glsr_current_screen();
173
- if ('post' === $screen->base && glsr()->post_type === $screen->post_type) {
174
- add_action('edit_form_after_title', [$this, 'renderReviewEditor']);
175
- add_action('edit_form_top', [$this, 'renderReviewNotice']);
176
- }
177
- }
178
-
179
  /**
180
  * @param WP_Post $post
181
  * @return void
@@ -183,9 +132,12 @@ class EditorController extends Controller
183
  */
184
  public function renderReviewNotice($post)
185
  {
 
 
 
186
  if (Review::isReview($post) && !Review::isEditable($post)) {
187
  glsr(Notice::class)->addWarning(sprintf(
188
- _x('%s reviews are read-only.', 'admin-text', 'site-reviews'),
189
  glsr(ColumnValueType::class)->handle(glsr(Query::class)->review($post->ID))
190
  ));
191
  glsr(Template::class)->render('partials/editor/notice', [
@@ -196,26 +148,13 @@ class EditorController extends Controller
196
  }
197
  }
198
 
199
- /**
200
- * @return bool
201
- */
202
- protected function isReviewEditable()
203
- {
204
- if ($this->isReviewEditor()) {
205
- $postId = intval(filter_input(INPUT_GET, 'post'));
206
- $review = glsr(Query::class)->review($postId);
207
- return 'local' == $review->type;
208
- }
209
- return false;
210
- }
211
-
212
  /**
213
  * @return bool
214
  */
215
  protected function isReviewEditor()
216
  {
217
  $screen = glsr_current_screen();
218
- return 'post' == $screen->base
219
  && glsr()->post_type == $screen->id
220
  && glsr()->post_type == $screen->post_type;
221
  }
23
  */
24
  public function filterEditorSettings($settings)
25
  {
26
+ if ($this->isReviewEditor()) {
27
  $settings = [
28
  'media_buttons' => false,
29
  'quicktags' => false,
42
  */
43
  public function filterEditorTextarea($html)
44
  {
45
+ if ($this->isReviewEditor()) {
46
  $html = str_replace('<textarea', '<div id="ed_toolbar"></div><textarea', $html);
47
  }
48
  return $html;
125
  wp_send_json_success($response);
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  /**
129
  * @param WP_Post $post
130
  * @return void
132
  */
133
  public function renderReviewNotice($post)
134
  {
135
+ if (!$this->isReviewEditor()) {
136
+ return;
137
+ }
138
  if (Review::isReview($post) && !Review::isEditable($post)) {
139
  glsr(Notice::class)->addWarning(sprintf(
140
+ _x('Publicly responding to third-party %s reviews is disabled.', 'admin-text', 'site-reviews'),
141
  glsr(ColumnValueType::class)->handle(glsr(Query::class)->review($post->ID))
142
  ));
143
  glsr(Template::class)->render('partials/editor/notice', [
148
  }
149
  }
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  /**
152
  * @return bool
153
  */
154
  protected function isReviewEditor()
155
  {
156
  $screen = glsr_current_screen();
157
+ return ('post' == $screen->base)
158
  && glsr()->post_type == $screen->id
159
  && glsr()->post_type == $screen->post_type;
160
  }
plugin/Controllers/IntegrationController.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers;
4
+
5
+ use GeminiLabs\SiteReviews\Integrations\Elementor\ElementorFormWidget;
6
+ use GeminiLabs\SiteReviews\Integrations\Elementor\ElementorReviewsWidget;
7
+ use GeminiLabs\SiteReviews\Integrations\Elementor\ElementorSummaryWidget;
8
+
9
+ class IntegrationController extends Controller
10
+ {
11
+ /**
12
+ * Fix Star Rating control when review form is used inside an Elementor Pro Popup.
13
+ * @param string $script
14
+ * @return string
15
+ * @filter site-reviews/enqueue/public/inline-script/after
16
+ */
17
+ public function filterElementorInlineScript($js)
18
+ {
19
+ if (defined('ELEMENTOR_PRO_VERSION') && 0 > version_compare('2.7.0', ELEMENTOR_PRO_VERSION)) {
20
+ $js .= 'function glsr_init_elementor(){GLSR.Event.trigger("site-reviews/init")}"undefined"!==typeof jQuery&&(jQuery(document).on("elementor/popup/show",glsr_init_elementor),jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/site_reviews.default",glsr_init_elementor);elementorFrontend.hooks.addAction("frontend/element_ready/site_reviews_form.default",glsr_init_elementor)}));';
21
+ }
22
+ return $js;
23
+ }
24
+
25
+ /**
26
+ * @return void
27
+ * @action elementor/init
28
+ */
29
+ public function registerElementorCategory()
30
+ {
31
+ \Elementor\Plugin::instance()->elements_manager->add_category(glsr()->id, [
32
+ 'title' => glsr()->name,
33
+ 'icon' => 'eicon-star-o', // default icon
34
+ ]);
35
+ }
36
+
37
+ /**
38
+ * @return void
39
+ * @action elementor/widgets/widgets_registered
40
+ */
41
+ public function registerElementorWidgets()
42
+ {
43
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type(
44
+ new ElementorFormWidget()
45
+ );
46
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type(
47
+ new ElementorReviewsWidget()
48
+ );
49
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type(
50
+ new ElementorSummaryWidget()
51
+ );
52
+ }
53
+ }
plugin/Controllers/ListTableColumns/ColumnFilter.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
+
5
+ use GeminiLabs\SiteReviews\Modules\Html\Builder;
6
+
7
+ abstract class ColumnFilter
8
+ {
9
+ protected $enabled = false;
10
+ protected $maxWidth = 150;
11
+
12
+ /**
13
+ * @return string|void
14
+ */
15
+ abstract public function handle(array $enabledFilters = []);
16
+
17
+ /**
18
+ * @param string $id
19
+ * @param string $placeholder
20
+ * @return string
21
+ */
22
+ protected function filter($id, array $options, $placeholder)
23
+ {
24
+ return glsr(Builder::class)->select([
25
+ 'class' => ($this->enabled ? '' : 'hidden'),
26
+ 'name' => $id,
27
+ 'id' => $this->id($id),
28
+ 'options' => $options,
29
+ 'placeholder' => $placeholder,
30
+ 'style' => sprintf('max-width:%spx;', $this->maxWidth),
31
+ 'value' => $this->value($id),
32
+ ]);
33
+ }
34
+
35
+ /**
36
+ * @param string $id
37
+ * @return string
38
+ */
39
+ protected function id($id)
40
+ {
41
+ return 'glsr-filter-by-'.$id;
42
+ }
43
+
44
+ /**
45
+ * @param string $id
46
+ * @param string $text
47
+ * @return string
48
+ */
49
+ protected function label($id, $text)
50
+ {
51
+ return glsr(Builder::class)->label([
52
+ 'class' => 'screen-reader-text',
53
+ 'for' => $this->id($id),
54
+ 'text' => $text,
55
+ ]);
56
+ }
57
+
58
+ /**
59
+ * @param string $id
60
+ * @return int|string
61
+ */
62
+ protected function value($id)
63
+ {
64
+ return filter_input(INPUT_GET, $id);
65
+ }
66
+ }
plugin/Controllers/ListTableColumns/ColumnFilterAssignedPost.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
+
5
+ use GeminiLabs\SiteReviews\Database\Query;
6
+
7
+ class ColumnFilterAssignedPost extends ColumnFilter
8
+ {
9
+ /**
10
+ * {@inheritdoc}
11
+ */
12
+ public function handle(array $enabledFilters = [])
13
+ {
14
+ if (in_array('assigned_post', $enabledFilters)) {
15
+ $this->enabled = true;
16
+ }
17
+ if ($options = $this->options()) {
18
+ $label = $this->label('assigned_post',
19
+ _x('Filter by assigned post', 'admin-text', 'site-reviews')
20
+ );
21
+ $filter = $this->filter('assigned_post', $options,
22
+ _x('All assigned posts', 'admin-text', 'site-reviews')
23
+ );
24
+ return $label.$filter;
25
+ }
26
+ }
27
+
28
+ /**
29
+ * @return array
30
+ */
31
+ protected function options()
32
+ {
33
+ global $wpdb;
34
+ $table = glsr(Query::class)->table('assigned_posts');
35
+ $postIds = $wpdb->get_col("SELECT DISTINCT post_id FROM {$table}");
36
+ if (empty($postIds)) {
37
+ return [];
38
+ }
39
+ $posts = get_posts([
40
+ 'order' => 'ASC',
41
+ 'orderby' => 'post_title',
42
+ 'post_type' => 'any',
43
+ 'posts_per_page' => -1,
44
+ 'post__in' => $postIds,
45
+ ]);
46
+ return wp_list_pluck($posts, 'post_title', 'ID');
47
+ }
48
+
49
+ /**
50
+ * @param string $id
51
+ * @return int|string
52
+ */
53
+ protected function value($id)
54
+ {
55
+ return filter_input(INPUT_GET, $id, FILTER_SANITIZE_NUMBER_INT);
56
+ }
57
+ }
plugin/Controllers/ListTableColumns/ColumnFilterAssignedUser.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
+
5
+ use GeminiLabs\SiteReviews\Database;
6
+ use GeminiLabs\SiteReviews\Database\Query;
7
+
8
+ class ColumnFilterAssignedUser extends ColumnFilter
9
+ {
10
+ /**
11
+ * {@inheritdoc}
12
+ */
13
+ public function handle(array $enabledFilters = [])
14
+ {
15
+ if (in_array('assigned_user', $enabledFilters)) {
16
+ $this->enabled = true;
17
+ }
18
+ if ($options = $this->options()) {
19
+ $label = $this->label('assigned_user',
20
+ _x('Filter by assigned user', 'admin-text', 'site-reviews')
21
+ );
22
+ $filter = $this->filter('assigned_user', $options,
23
+ _x('All assigned users', 'admin-text', 'site-reviews')
24
+ );
25
+ return $label.$filter;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * @return array
31
+ */
32
+ protected function options()
33
+ {
34
+ global $wpdb;
35
+ $table = glsr(Query::class)->table('assigned_users');
36
+ $userIds = $wpdb->get_col("SELECT DISTINCT user_id FROM {$table}");
37
+ if (empty($userIds)) {
38
+ return [];
39
+ }
40
+ return glsr(Database::class)->users(['include' => $userIds]);
41
+ }
42
+
43
+ /**
44
+ * @param string $id
45
+ * @return int|string
46
+ */
47
+ protected function value($id)
48
+ {
49
+ return filter_input(INPUT_GET, $id, FILTER_SANITIZE_NUMBER_INT);
50
+ }
51
+ }
plugin/Controllers/ListTableColumns/ColumnFilterCategory.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
+
5
+ class ColumnFilterCategory extends ColumnFilter
6
+ {
7
+ /**
8
+ * {@inheritdoc}
9
+ */
10
+ public function handle(array $enabledFilters = [])
11
+ {
12
+ if (in_array('category', $enabledFilters)) {
13
+ $this->enabled = true;
14
+ }
15
+ if ($options = $this->options()) {
16
+ $label = $this->label('assigned_term',
17
+ _x('Filter by category', 'admin-text', 'site-reviews')
18
+ );
19
+ $filter = $this->filter('assigned_term', $options,
20
+ _x('All categories', 'admin-text', 'site-reviews')
21
+ );
22
+ return $label.$filter;
23
+ }
24
+ }
25
+
26
+ /**
27
+ * @param string $id
28
+ * @return string
29
+ */
30
+ protected function id($id)
31
+ {
32
+ return 'glsr-filter-by-category';
33
+ }
34
+
35
+ /**
36
+ * @return array
37
+ */
38
+ protected function options()
39
+ {
40
+ return get_terms([
41
+ 'count' => false,
42
+ 'fields' => 'id=>name',
43
+ 'hide_empty' => true,
44
+ 'taxonomy' => glsr()->taxonomy,
45
+ ]);
46
+ }
47
+
48
+ /**
49
+ * @param string $id
50
+ * @return int|string
51
+ */
52
+ protected function value($id)
53
+ {
54
+ return filter_input(INPUT_GET, $id, FILTER_SANITIZE_NUMBER_INT);
55
+ }
56
+ }
plugin/Controllers/ListTableColumns/ColumnFilterRating.php CHANGED
@@ -2,33 +2,50 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
 
5
- use GeminiLabs\SiteReviews\Contracts\ColumnFilterContract;
6
- use GeminiLabs\SiteReviews\Modules\Html\Builder;
7
  use GeminiLabs\SiteReviews\Modules\Rating;
8
 
9
- class ColumnFilterRating implements ColumnFilterContract
10
  {
11
  /**
12
  * {@inheritdoc}
13
  */
14
- public function handle()
15
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  $ratings = range(glsr()->constant('MAX_RATING', Rating::class), 0);
17
- $options = ['' => _x('All ratings', 'admin-text', 'site-reviews')];
18
  foreach ($ratings as $rating) {
19
  $label = _nx('%s star', '%s stars', $rating, 'admin-text', 'site-reviews');
20
  $options[$rating] = sprintf($label, $rating);
21
  }
22
- $label = glsr(Builder::class)->label([
23
- 'class' => 'screen-reader-text',
24
- 'for' => 'rating',
25
- 'text' => _x('Filter by rating', 'admin-text', 'site-reviews'),
26
- ]);
27
- $filter = glsr(Builder::class)->select([
28
- 'name' => 'rating',
29
- 'options' => $options,
30
- 'value' => filter_input(INPUT_GET, 'rating'),
31
- ]);
32
- return $label.$filter;
33
  }
34
  }
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
 
 
 
5
  use GeminiLabs\SiteReviews\Modules\Rating;
6
 
7
+ class ColumnFilterRating extends ColumnFilter
8
  {
9
  /**
10
  * {@inheritdoc}
11
  */
12
+ public function handle(array $enabledFilters = [])
13
  {
14
+ if (in_array('rating', $enabledFilters)) {
15
+ $this->enabled = true;
16
+ }
17
+ $options = $this->options();
18
+ if (count($options) > 1) {
19
+ $label = $this->label('rating',
20
+ _x('Filter by rating', 'admin-text', 'site-reviews')
21
+ );
22
+ $filter = $this->filter('rating', $options,
23
+ _x('All ratings', 'admin-text', 'site-reviews')
24
+ );
25
+ return $label.$filter;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * @return array
31
+ */
32
+ protected function options()
33
+ {
34
+ $options = [];
35
  $ratings = range(glsr()->constant('MAX_RATING', Rating::class), 0);
 
36
  foreach ($ratings as $rating) {
37
  $label = _nx('%s star', '%s stars', $rating, 'admin-text', 'site-reviews');
38
  $options[$rating] = sprintf($label, $rating);
39
  }
40
+ return $options;
41
+ }
42
+
43
+ /**
44
+ * @param string $id
45
+ * @return int|string
46
+ */
47
+ protected function value($id)
48
+ {
49
+ return filter_input(INPUT_GET, $id, FILTER_SANITIZE_NUMBER_INT);
 
50
  }
51
  }
plugin/Controllers/ListTableColumns/ColumnFilterType.php CHANGED
@@ -2,30 +2,35 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
 
5
- use GeminiLabs\SiteReviews\Contracts\ColumnFilterContract;
6
- use GeminiLabs\SiteReviews\Helpers\Arr;
7
  use GeminiLabs\SiteReviews\Modules\Html\Builder;
8
 
9
- class ColumnFilterType implements ColumnFilterContract
10
  {
11
  /**
12
  * {@inheritdoc}
13
  */
14
- public function handle()
15
  {
16
- if (count($reviewTypes = glsr()->retrieveAs('array', 'review_types')) < 2) {
17
- return;
18
  }
19
- $label = glsr(Builder::class)->label([
20
- 'class' => 'screen-reader-text',
21
- 'for' => 'type',
22
- 'text' => _x('Filter by type', 'admin-text', 'site-reviews'),
23
- ]);
24
- $filter = glsr(Builder::class)->select([
25
- 'name' => 'type',
26
- 'options' => Arr::prepend($reviewTypes, _x('All types', 'admin-text', 'site-reviews'), ''),
27
- 'value' => filter_input(INPUT_GET, 'type'),
28
- ]);
29
- return $label.$filter;
 
 
 
 
 
 
 
30
  }
31
  }
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
 
 
 
5
  use GeminiLabs\SiteReviews\Modules\Html\Builder;
6
 
7
+ class ColumnFilterType extends ColumnFilter
8
  {
9
  /**
10
  * {@inheritdoc}
11
  */
12
+ public function handle(array $enabledFilters = [])
13
  {
14
+ if (in_array('type', $enabledFilters)) {
15
+ $this->enabled = true;
16
  }
17
+ $options = $this->options();
18
+ if (count($options) > 1) {
19
+ $label = $this->label('type',
20
+ _x('Filter by review type', 'admin-text', 'site-reviews')
21
+ );
22
+ $filter = $this->filter('type', $options,
23
+ _x('All review types', 'admin-text', 'site-reviews')
24
+ );
25
+ return $label.$filter;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * @return array
31
+ */
32
+ protected function options()
33
+ {
34
+ return glsr()->retrieveAs('array', 'review_types');
35
  }
36
  }
plugin/Controllers/ListTableColumns/ColumnValueRating.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
 
5
  use GeminiLabs\SiteReviews\Contracts\ColumnValueContract;
 
6
  use GeminiLabs\SiteReviews\Review;
7
 
8
  class ColumnValueRating implements ColumnValueContract
@@ -12,6 +13,9 @@ class ColumnValueRating implements ColumnValueContract
12
  */
13
  public function handle(Review $review)
14
  {
15
- return glsr_star_rating($review->rating);
 
 
 
16
  }
17
  }
3
  namespace GeminiLabs\SiteReviews\Controllers\ListTableColumns;
4
 
5
  use GeminiLabs\SiteReviews\Contracts\ColumnValueContract;
6
+ use GeminiLabs\SiteReviews\Modules\Html\Partial;
7
  use GeminiLabs\SiteReviews\Review;
8
 
9
  class ColumnValueRating implements ColumnValueContract
13
  */
14
  public function handle(Review $review)
15
  {
16
+ return glsr(Partial::class)->build('star-rating', [
17
+ 'prefix' => '',
18
+ 'rating' => $review->rating,
19
+ ]);
20
  }
21
  }
plugin/Controllers/ListTableController.php CHANGED
@@ -2,23 +2,56 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers;
4
 
5
- use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterRating;
6
- use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterType;
7
  use GeminiLabs\SiteReviews\Database\Query;
 
8
  use GeminiLabs\SiteReviews\Defaults\ColumnFilterbyDefaults;
9
  use GeminiLabs\SiteReviews\Defaults\ColumnOrderbyDefaults;
 
10
  use GeminiLabs\SiteReviews\Helper;
11
  use GeminiLabs\SiteReviews\Helpers\Arr;
12
  use GeminiLabs\SiteReviews\Helpers\Cast;
13
  use GeminiLabs\SiteReviews\Helpers\Str;
14
  use GeminiLabs\SiteReviews\Modules\Html\Builder;
15
  use GeminiLabs\SiteReviews\Modules\Migrate;
 
16
  use WP_Post;
17
  use WP_Query;
18
  use WP_Screen;
19
 
20
  class ListTableController extends Controller
21
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * @param array $columns
24
  * @return array
@@ -92,30 +125,71 @@ class ListTableController extends Controller
92
  */
93
  public function filterRowActions($actions, $post)
94
  {
95
- if (glsr()->post_type !== Arr::get($post, 'post_type')
96
- || 'trash' == $post->post_status
97
- || !user_can(get_current_user_id(), 'edit_post', $post->ID)) {
98
  return $actions;
99
  }
100
- unset($actions['inline hide-if-no-js']); //Remove Quick-edit
101
- $rowActions = [
102
- 'approve' => _x('Approve', 'admin-text', 'site-reviews'),
103
- 'unapprove' => _x('Unapprove', 'admin-text', 'site-reviews'),
104
- ];
105
  $newActions = ['id' => sprintf(_x('<span>ID: %d</span>', 'The Review Post ID (admin-text)', 'site-reviews'), $post->ID)];
106
- foreach ($rowActions as $key => $text) {
107
- $newActions[$key] = glsr(Builder::class)->a($text, [
108
- 'aria-label' => esc_attr(sprintf(_x('%s this review', 'Approve the review (admin-text)', 'site-reviews'), $text)),
109
- 'class' => 'glsr-toggle-status',
110
- 'href' => wp_nonce_url(
111
- admin_url('post.php?post='.$post->ID.'&action='.$key.'&plugin='.glsr()->id),
112
- $key.'-review_'.$post->ID
113
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  ]);
115
  }
116
  return $newActions + Arr::consolidate($actions);
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  /**
120
  * @param array $columns
121
  * @return array
@@ -134,6 +208,56 @@ class ListTableController extends Controller
134
  return $columns;
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  /**
138
  * @param string $postType
139
  * @return void
@@ -142,9 +266,13 @@ class ListTableController extends Controller
142
  public function renderColumnFilters($postType)
143
  {
144
  if (glsr()->post_type === $postType) {
145
- echo Cast::toString(glsr()->runIf(ColumnFilterRating::class));
146
- echo Cast::toString(glsr()->runIf(ColumnFilterType::class));
147
- echo Cast::toString(glsr()->runIf(glsr()->filterString('review-table/filter', '')));
 
 
 
 
148
  }
149
  }
150
 
@@ -182,6 +310,12 @@ class ListTableController extends Controller
182
  $query->set('meta_key', Str::prefix($orderby, '_'));
183
  $query->set('orderby', 'meta_value');
184
  }
 
 
 
 
 
 
185
  }
186
 
187
  /**
@@ -257,8 +391,24 @@ class ListTableController extends Controller
257
  */
258
  protected function modifyClauseWhere($where, $table, WP_Query $query)
259
  {
 
 
 
 
260
  foreach ($this->filterByValues() as $key => $value) {
261
- $where .= " AND {$table}.{$key} = '{$value}' ";
 
 
 
 
 
 
 
 
 
 
 
 
262
  }
263
  return $where;
264
  }
2
 
3
  namespace GeminiLabs\SiteReviews\Controllers;
4
 
 
 
5
  use GeminiLabs\SiteReviews\Database\Query;
6
+ use GeminiLabs\SiteReviews\Database\ReviewManager;
7
  use GeminiLabs\SiteReviews\Defaults\ColumnFilterbyDefaults;
8
  use GeminiLabs\SiteReviews\Defaults\ColumnOrderbyDefaults;
9
+ use GeminiLabs\SiteReviews\Defaults\ReviewTableFiltersDefaults;
10
  use GeminiLabs\SiteReviews\Helper;
11
  use GeminiLabs\SiteReviews\Helpers\Arr;
12
  use GeminiLabs\SiteReviews\Helpers\Cast;
13
  use GeminiLabs\SiteReviews\Helpers\Str;
14
  use GeminiLabs\SiteReviews\Modules\Html\Builder;
15
  use GeminiLabs\SiteReviews\Modules\Migrate;
16
+ use GeminiLabs\SiteReviews\Overrides\ReviewsListTable;
17
  use WP_Post;
18
  use WP_Query;
19
  use WP_Screen;
20
 
21
  class ListTableController extends Controller
22
  {
23
+ /**
24
+ * @param array $response
25
+ * @param array $data
26
+ * @param string $screenId
27
+ * @return array
28
+ * @filter heartbeat_received
29
+ */
30
+ public function filterCheckLockedReviews($response, $data, $screenId)
31
+ {
32
+ $checked = [];
33
+ if (!is_array(Arr::get($data, 'wp-check-locked-posts'))) {
34
+ return $response;
35
+ }
36
+ foreach ($data['wp-check-locked-posts'] as $key) {
37
+ $postId = absint(substr($key, 5));
38
+ $userId = (int) wp_check_post_lock($postId);
39
+ $user = get_userdata($userId);
40
+ if ($user && !glsr()->can('edit_post', $postId) && glsr()->can('respond_to_post', $postId)) {
41
+ $send = ['text' => sprintf(_x('%s is currently editing', 'admin-text', 'site-reviews'), $user->display_name)];
42
+ if (get_option('show_avatars')) {
43
+ $send['avatar_src'] = get_avatar_url($user->ID, ['size' => 18]);
44
+ $send['avatar_src_2x'] = get_avatar_url($user->ID, ['size' => 36]);
45
+ }
46
+ $checked[$key] = $send;
47
+ }
48
+ }
49
+ if (!empty($checked)) {
50
+ $response['wp-check-locked-posts'] = $checked;
51
+ }
52
+ return $response;
53
+ }
54
+
55
  /**
56
  * @param array $columns
57
  * @return array
125
  */
126
  public function filterRowActions($actions, $post)
127
  {
128
+ if (glsr()->post_type !== Arr::get($post, 'post_type') || 'trash' == $post->post_status) {
 
 
129
  return $actions;
130
  }
131
+ unset($actions['inline hide-if-no-js']);
 
 
 
 
132
  $newActions = ['id' => sprintf(_x('<span>ID: %d</span>', 'The Review Post ID (admin-text)', 'site-reviews'), $post->ID)];
133
+ if (glsr()->can('edit_post', $post->ID)) {
134
+ $rowActions = [
135
+ 'approve' => _x('Approve', 'admin-text', 'site-reviews'),
136
+ 'unapprove' => _x('Unapprove', 'admin-text', 'site-reviews'),
137
+ ];
138
+ foreach ($rowActions as $key => $text) {
139
+ $newActions[$key] = glsr(Builder::class)->a($text, [
140
+ 'aria-label' => esc_attr(sprintf(_x('%s this review', 'Approve the review (admin-text)', 'site-reviews'), $text)),
141
+ 'class' => 'glsr-toggle-status',
142
+ 'href' => wp_nonce_url(
143
+ admin_url('post.php?post='.$post->ID.'&action='.$key.'&plugin='.glsr()->id),
144
+ $key.'-review_'.$post->ID
145
+ ),
146
+ ]);
147
+ }
148
+ }
149
+ if (glsr()->can('respond_to_post', $post->ID)) {
150
+ $newActions['hide-if-no-js'] = glsr(Builder::class)->button([
151
+ 'aria-expanded' => false,
152
+ 'aria-label' => esc_attr(sprintf(_x('Respond inline to &#8220;%s&#8221;', 'admin-text', 'site-reviews'), _draft_or_post_title())),
153
+ 'class' => 'button-link editinline',
154
+ 'text' => _x('Respond', 'admin-text', 'site-reviews'),
155
+ 'type' => 'button',
156
  ]);
157
  }
158
  return $newActions + Arr::consolidate($actions);
159
  }
160
 
161
+ /**
162
+ * @param \WP_Screen $screen
163
+ * @return string
164
+ * @filter screen_settings
165
+ */
166
+ public function filterScreenFilters($settings, $screen)
167
+ {
168
+ if ('edit-'.glsr()->post_type === $screen->id) {
169
+ $userId = get_current_user_id();
170
+ $filters = glsr(ReviewTableFiltersDefaults::class)->defaults();
171
+ if (count(glsr()->retrieveAs('array', 'review_types')) < 2) {
172
+ unset($filters['type']);
173
+ }
174
+ foreach ($filters as $key => &$value) {
175
+ $value = Str::titleCase($key);
176
+ }
177
+ ksort($filters);
178
+ $setting = 'edit_'.glsr()->post_type.'_filters';
179
+ $enabled = get_user_meta($userId, $setting, true);
180
+ if (!is_array($enabled)) {
181
+ $enabled = ['rating']; // the default enabled filters
182
+ update_user_meta($userId, $setting, $enabled);
183
+ }
184
+ $settings .= glsr()->build('partials/screen/filters', [
185
+ 'enabled' => $enabled,
186
+ 'filters' => $filters,
187
+ 'setting' => $setting,
188
+ ]);
189
+ }
190
+ return $settings;
191
+ }
192
+
193
  /**
194
  * @param array $columns
195
  * @return array
208
  return $columns;
209
  }
210
 
211
+ /**
212
+ * @return void
213
+ * @action wp_ajax_inline_save
214
+ */
215
+ public function overrideInlineSaveAjax()
216
+ {
217
+ $screen = filter_input(INPUT_POST, 'screen');
218
+ if ('edit-'.glsr()->post_type !== $screen) {
219
+ return; // don't override
220
+ }
221
+ global $mode;
222
+ check_ajax_referer('inlineeditnonce', '_inline_edit');
223
+ if (empty($postId = filter_input(INPUT_POST, 'post_ID', FILTER_VALIDATE_INT))) {
224
+ wp_die();
225
+ }
226
+ if (!glsr()->can('respond_to_post', $postId)) {
227
+ wp_die(_x('Sorry, you are not allowed to respond to this review.', 'admin-text', 'site-reviews'));
228
+ }
229
+ if ($last = wp_check_post_lock($postId)) {
230
+ $user = get_userdata($last);
231
+ $username = Arr::get($user, 'display_name', _x('Someone', 'admin-text', 'site-reviews'));
232
+ $message = _x('Saving is disabled: %s is currently editing this review.', 'admin-text', 'site-reviews');
233
+ printf($message, esc_html($username));
234
+ wp_die();
235
+ }
236
+ glsr(ReviewManager::class)->updateResponse($postId, filter_input(INPUT_POST, '_response'));
237
+ $mode = Str::restrictTo(['excerpt', 'list'], filter_input(INPUT_POST, 'post_view'), 'list');
238
+ $table = new ReviewsListTable(['screen' => convert_to_screen($screen)]);
239
+ $table->display_rows([get_post($postId)], 0);
240
+ wp_die();
241
+ }
242
+
243
+ /**
244
+ * @return void
245
+ * @action load-edit.php
246
+ */
247
+ public function overridePostsListTable()
248
+ {
249
+ if ('edit-'.glsr()->post_type === glsr_current_screen()->id
250
+ && glsr()->can('respond_to_posts')) {
251
+ $table = new ReviewsListTable();
252
+ $table->prepare_items();
253
+ add_filter('views_edit-'.glsr()->post_type, function ($views) use ($table) {
254
+ global $wp_list_table;
255
+ $wp_list_table = clone $table;
256
+ return $views;
257
+ });
258
+ }
259
+ }
260
+
261
  /**
262
  * @param string $postType
263
  * @return void
266
  public function renderColumnFilters($postType)
267
  {
268
  if (glsr()->post_type === $postType) {
269
+ $filters = glsr(ReviewTableFiltersDefaults::class)->defaults();
270
+ $enabledFilters = Arr::consolidate(
271
+ get_user_meta(get_current_user_id(), 'edit_'.glsr()->post_type.'_filters', true)
272
+ );
273
+ foreach ($filters as $filter) {
274
+ echo Cast::toString(glsr()->runIf($filter, $enabledFilters));
275
+ }
276
  }
277
  }
278
 
310
  $query->set('meta_key', Str::prefix($orderby, '_'));
311
  $query->set('orderby', 'meta_value');
312
  }
313
+ if ($termId = filter_input(INPUT_GET, 'assigned_term_id', FILTER_SANITIZE_NUMBER_INT)) {
314
+ $query->set('tax_query', [[
315
+ 'taxonomy' => glsr()->taxonomy,
316
+ 'terms' => $termId,
317
+ ]]);
318
+ }
319
  }
320
 
321
  /**
391
  */
392
  protected function modifyClauseWhere($where, $table, WP_Query $query)
393
  {
394
+ $mapped = [
395
+ 'assigned_post' => 'post',
396
+ 'assigned_user' => 'user',
397
+ ];
398
  foreach ($this->filterByValues() as $key => $value) {
399
+ if (in_array($key, ['assigned_post', 'assigned_user'])) {
400
+ global $wpdb;
401
+ $assignedTable = glsr(Query::class)->table($key.'s');
402
+ $ids = $wpdb->get_col("
403
+ SELECT DISTINCT r.review_id
404
+ FROM {$table} r
405
+ INNER JOIN {$assignedTable} at ON at.rating_id = r.ID
406
+ WHERE at.{$mapped[$key]}_id = '{$value}'
407
+ ");
408
+ $where .= sprintf(" AND {$wpdb->posts}.ID IN (%s) ", implode(',', $ids));
409
+ } else {
410
+ $where .= " AND {$table}.{$key} = '{$value}' ";
411
+ }
412
  }
413
  return $where;
414
  }
plugin/Controllers/MainController.php CHANGED
@@ -126,15 +126,7 @@ class MainController extends Controller
126
  */
127
  public function registerTaxonomy()
128
  {
129
- $this->execute(new RegisterTaxonomy([
130
- 'hierarchical' => true,
131
- 'meta_box_cb' => [glsr(MetaboxController::class), 'renderTaxonomyMetabox'],
132
- 'public' => false,
133
- 'rest_controller_class' => RestCategoryController::class,
134
- 'show_admin_column' => true,
135
- 'show_in_rest' => true,
136
- 'show_ui' => true,
137
- ]));
138
  }
139
 
140
  /**
126
  */
127
  public function registerTaxonomy()
128
  {
129
+ $this->execute(new RegisterTaxonomy());
 
 
 
 
 
 
 
 
130
  }
131
 
132
  /**
plugin/Controllers/MenuController.php CHANGED
@@ -66,6 +66,24 @@ class MenuController extends Controller
66
  }
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /**
70
  * @return void
71
  * @see $this->registerSubMenus()
@@ -91,6 +109,7 @@ class MenuController extends Controller
91
  'shortcodes' => _x('Shortcodes', 'admin-text', 'site-reviews'),
92
  'hooks' => _x('Hooks', 'admin-text', 'site-reviews'),
93
  'functions' => _x('Functions', 'admin-text', 'site-reviews'),
 
94
  'addons' => _x('Addons', 'admin-text', 'site-reviews'),
95
  ]);
96
  $addons = glsr()->filterArray('addon/documentation', []);
66
  }
67
  }
68
 
69
+ /**
70
+ * @return void
71
+ * @action admin_menu
72
+ */
73
+ public function removeSubMenus()
74
+ {
75
+ global $submenu;
76
+ $menuKey = 'edit.php?post_type='.glsr()->post_type;
77
+ if (!isset($submenu[$menuKey])) {
78
+ return;
79
+ }
80
+ $submenuKey = 'post-new.php?post_type='.glsr()->post_type;
81
+ $index = array_search($submenuKey, wp_list_pluck($submenu[$menuKey], 2));
82
+ if (false !== $index) {
83
+ unset($submenu[$menuKey][$index]);
84
+ }
85
+ }
86
+
87
  /**
88
  * @return void
89
  * @see $this->registerSubMenus()
109
  'shortcodes' => _x('Shortcodes', 'admin-text', 'site-reviews'),
110
  'hooks' => _x('Hooks', 'admin-text', 'site-reviews'),
111
  'functions' => _x('Functions', 'admin-text', 'site-reviews'),
112
+ 'api' => _x('API', 'admin-text', 'site-reviews'),
113
  'addons' => _x('Addons', 'admin-text', 'site-reviews'),
114
  ]);
115
  $addons = glsr()->filterArray('addon/documentation', []);
plugin/Controllers/MetaboxController.php CHANGED
@@ -4,11 +4,11 @@ namespace GeminiLabs\SiteReviews\Controllers;
4
 
5
  use GeminiLabs\SiteReviews\Database;
6
  use GeminiLabs\SiteReviews\Database\Query;
 
7
  use GeminiLabs\SiteReviews\Helper;
8
  use GeminiLabs\SiteReviews\Modules\Html\MetaboxBuilder;
9
  use GeminiLabs\SiteReviews\Modules\Html\MetaboxField;
10
  use GeminiLabs\SiteReviews\Modules\Html\Template;
11
- use GeminiLabs\SiteReviews\Modules\Sanitizer;
12
  use GeminiLabs\SiteReviews\Review;
13
 
14
  class MetaboxController
@@ -31,13 +31,13 @@ class MetaboxController
31
  */
32
  public function registerMetaBoxes($post)
33
  {
34
- if ('local' === glsr(Query::class)->review($post->ID)->type) {
35
  add_meta_box(glsr()->post_type.'-responsediv', _x('Respond Publicly', 'admin-text', 'site-reviews'), [$this, 'renderResponseMetaBox'], null, 'normal', 'high');
36
  }
37
  add_meta_box(glsr()->post_type.'-detailsdiv', _x('Review Details', 'admin-text', 'site-reviews'), [$this, 'renderDetailsMetaBox'], null, 'normal', 'high');
38
  add_meta_box(glsr()->post_type.'-postsdiv', _x('Assigned Posts', 'admin-text', 'site-reviews'), [$this, 'renderAssignedPostsMetabox'], null, 'side');
39
  add_meta_box(glsr()->post_type.'-usersdiv', _x('Assigned Users', 'admin-text', 'site-reviews'), [$this, 'renderAssignedUsersMetabox'], null, 'side');
40
- if (post_type_supports(glsr()->post_type, 'author') && glsr()->can('edit_others_posts')) {
41
  add_meta_box(glsr()->post_type.'-authordiv', _x('Author', 'admin-text', 'site-reviews'), [$this, 'renderAuthorMetabox'], null, 'side');
42
  }
43
  }
@@ -196,18 +196,15 @@ class MetaboxController
196
  }
197
 
198
  /**
199
- * Save the review response from $_POST
200
  * @return mixed
201
  */
202
  public function saveResponseMetabox(Review $review)
203
  {
204
- if (!wp_verify_nonce(Helper::filterInput('_nonce-response'), 'response')) {
205
- return;
 
206
  }
207
- $response = strval(Helper::filterInput('response'));
208
- $response = glsr(Sanitizer::class)->sanitizeTextHtml($response);
209
- glsr()->action('review/respond', $response, $review);
210
- glsr(Database::class)->metaSet($review->ID, 'response', $response);
211
  }
212
 
213
  /**
@@ -233,7 +230,8 @@ class MetaboxController
233
  foreach ($fields as $key => &$field) {
234
  $field['class'] = 'glsr-input-value';
235
  $field['name'] = $key;
236
- $field['disabled'] = true;
 
237
  $field['review_object'] = $review;
238
  $field['value'] = $review->$key;
239
  }
4
 
5
  use GeminiLabs\SiteReviews\Database;
6
  use GeminiLabs\SiteReviews\Database\Query;
7
+ use GeminiLabs\SiteReviews\Database\ReviewManager;
8
  use GeminiLabs\SiteReviews\Helper;
9
  use GeminiLabs\SiteReviews\Modules\Html\MetaboxBuilder;
10
  use GeminiLabs\SiteReviews\Modules\Html\MetaboxField;
11
  use GeminiLabs\SiteReviews\Modules\Html\Template;
 
12
  use GeminiLabs\SiteReviews\Review;
13
 
14
  class MetaboxController
31
  */
32
  public function registerMetaBoxes($post)
33
  {
34
+ if (Review::isEditable($post) && glsr()->can('respond_to_post', $post->ID)) {
35
  add_meta_box(glsr()->post_type.'-responsediv', _x('Respond Publicly', 'admin-text', 'site-reviews'), [$this, 'renderResponseMetaBox'], null, 'normal', 'high');
36
  }
37
  add_meta_box(glsr()->post_type.'-detailsdiv', _x('Review Details', 'admin-text', 'site-reviews'), [$this, 'renderDetailsMetaBox'], null, 'normal', 'high');
38
  add_meta_box(glsr()->post_type.'-postsdiv', _x('Assigned Posts', 'admin-text', 'site-reviews'), [$this, 'renderAssignedPostsMetabox'], null, 'side');
39
  add_meta_box(glsr()->post_type.'-usersdiv', _x('Assigned Users', 'admin-text', 'site-reviews'), [$this, 'renderAssignedUsersMetabox'], null, 'side');
40
+ if (glsr()->can('edit_others_posts')) {
41
  add_meta_box(glsr()->post_type.'-authordiv', _x('Author', 'admin-text', 'site-reviews'), [$this, 'renderAuthorMetabox'], null, 'side');
42
  }
43
  }
196
  }
197
 
198
  /**
199
+ * Save the review response from $_POST.
200
  * @return mixed
201
  */
202
  public function saveResponseMetabox(Review $review)
203
  {
204
+ if (wp_verify_nonce(Helper::filterInput('_nonce-response'), 'response')) {
205
+ $response = strval(Helper::filterInput('response'));
206
+ return glsr(ReviewManager::class)->updateResponse($review->ID, $response);
207
  }
 
 
 
 
208
  }
209
 
210
  /**
230
  foreach ($fields as $key => &$field) {
231
  $field['class'] = 'glsr-input-value';
232
  $field['name'] = $key;
233
+ $field['data-value'] = $review->$key;
234
+ $field['disabled'] = 'add' !== glsr_current_screen()->action;
235
  $field['review_object'] = $review;
236
  $field['value'] = $review->$key;
237
  }
plugin/Controllers/PrivacyController.php CHANGED
@@ -107,7 +107,7 @@ class PrivacyController extends Controller
107
  wp_delete_post($review->ID, true);
108
  } else {
109
  glsr(ReviewManager::class)->deleteRevisions($review->ID);
110
- glsr(ReviewManager::class)->update($review->ID, [
111
  'email' => '',
112
  'ip_address' => '',
113
  'name' => '',
107
  wp_delete_post($review->ID, true);
108
  } else {
109
  glsr(ReviewManager::class)->deleteRevisions($review->ID);
110
+ glsr(ReviewManager::class)->updateRating($review->ID, [
111
  'email' => '',
112
  'ip_address' => '',
113
  'name' => '',
plugin/Controllers/RestCategoryController.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- namespace GeminiLabs\SiteReviews\Controllers;
4
-
5
- use WP_REST_Server as Server;
6
- use WP_REST_Term_Meta_Fields;
7
- use WP_REST_Terms_Controller as RestController;
8
-
9
- class RestCategoryController extends RestController
10
- {
11
- public function __construct()
12
- {
13
- $this->meta = new WP_REST_Term_Meta_Fields(glsr()->taxonomy);
14
- $this->namespace = glsr()->id.'/v1';
15
- $this->rest_base = 'categories';
16
- $this->taxonomy = glsr()->taxonomy;
17
- }
18
-
19
- /**
20
- * @return void
21
- */
22
- public function register_routes()
23
- {
24
- register_rest_route($this->namespace, '/'.$this->rest_base, [
25
- [
26
- 'args' => $this->get_collection_params(),
27
- 'callback' => [$this, 'get_items'],
28
- 'methods' => Server::READABLE,
29
- 'permission_callback' => [$this, 'get_items_permissions_check'],
30
- ],
31
- 'schema' => [$this, 'get_public_item_schema'],
32
- ]);
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin/Controllers/RestReviewController.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
-
3
- namespace GeminiLabs\SiteReviews\Controllers;
4
-
5
- use WP_Error;
6
- use WP_REST_Post_Meta_Fields;
7
- use WP_REST_Posts_Controller as RestController;
8
- use WP_REST_Response as Response;
9
- use WP_REST_Server as Server;
10
-
11
- class RestReviewController extends RestController
12
- {
13
- public function __construct()
14
- {
15
- $this->meta = new WP_REST_Post_Meta_Fields(glsr()->post_type);
16
- $this->namespace = glsr()->id.'/v1';
17
- $this->post_type = glsr()->post_type;
18
- $this->rest_base = 'reviews';
19
- }
20
-
21
- /**
22
- * @return void
23
- */
24
- public function register_routes()
25
- {
26
- // register_rest_route($this->namespace, '/'.$this->rest_base, [
27
- // ['callback' => [$this, 'createReview'], 'methods' => Server::CREATABLE],
28
- // ['callback' => [$this, 'getReviews'], 'methods' => Server::READABLE],
29
- // ]);
30
- register_rest_route($this->namespace, '/types', [
31
- [
32
- 'callback' => [$this, 'getReviewTypes'],
33
- 'methods' => Server::READABLE,
34
- 'permission_callback' => [$this, 'get_items_permissions_check'],
35
- ],
36
- ]);
37
- }
38
-
39
- /**
40
- * @return WP_Error|Response|mixed
41
- */
42
- public function createReview()
43
- {
44
- $response = [];
45
- return rest_ensure_response($response);
46
- }
47
-
48
- /**
49
- * @return WP_Error|Response|mixed
50
- */
51
- public function getReviews()
52
- {
53
- $response = [];
54
- return rest_ensure_response($response);
55
- }
56
-
57
- /**
58
- * @return WP_Error|Response|mixed
59
- */
60
- public function getReviewTypes()
61
- {
62
- $response = [];
63
- foreach (glsr()->retrieveAs('array', 'review_types') as $slug => $name) {
64
- $response[] = [
65
- 'name' => $name,
66
- 'slug' => $slug,
67
- ];
68
- }
69
- return rest_ensure_response($response);
70
- }
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin/Controllers/ReviewController.php CHANGED
@@ -21,6 +21,7 @@ use GeminiLabs\SiteReviews\Helper;
21
  use GeminiLabs\SiteReviews\Helpers\Arr;
22
  use GeminiLabs\SiteReviews\Helpers\Cast;
23
  use GeminiLabs\SiteReviews\Modules\Html\ReviewHtml;
 
24
  use GeminiLabs\SiteReviews\Review;
25
 
26
  class ReviewController extends Controller
@@ -145,9 +146,12 @@ class ReviewController extends Controller
145
  if (in_array($oldStatus, ['new', $newStatus])) {
146
  return;
147
  }
 
 
 
148
  $isPublished = 'publish' === $newStatus;
149
  if (Review::isReview($post)) {
150
- glsr(ReviewManager::class)->update($post->ID, ['is_approved' => $isPublished]);
151
  glsr(Cache::class)->delete($post->ID, 'reviews');
152
  glsr(CountManager::class)->recalculate();
153
  } else {
@@ -254,9 +258,7 @@ class ReviewController extends Controller
254
  */
255
  public function onDeleteReview($reviewId)
256
  {
257
- if (glsr(Database::class)->delete('ratings', ['review_id' => $reviewId])) {
258
- glsr(Cache::class)->delete($reviewId, 'reviews');
259
- }
260
  }
261
 
262
  /**
@@ -383,7 +385,7 @@ class ReviewController extends Controller
383
  if (Arr::get($submittedValues, 'is_editing_review')) {
384
  $submittedValues['rating'] = Arr::get($submittedValues, 'rating');
385
  $submittedValues['terms'] = Arr::get($submittedValues, 'terms', 0);
386
- glsr(ReviewManager::class)->update($review->ID, $submittedValues);
387
  glsr(ReviewManager::class)->updateCustom($review->ID, $submittedValues);
388
  }
389
  $review = glsr(Query::class)->review($review->ID); // get a fresh copy of the review
21
  use GeminiLabs\SiteReviews\Helpers\Arr;
22
  use GeminiLabs\SiteReviews\Helpers\Cast;
23
  use GeminiLabs\SiteReviews\Modules\Html\ReviewHtml;
24
+ use GeminiLabs\SiteReviews\Request;
25
  use GeminiLabs\SiteReviews\Review;
26
 
27
  class ReviewController extends Controller
146
  if (in_array($oldStatus, ['new', $newStatus])) {
147
  return;
148
  }
149
+ if ('auto-draft' === $oldStatus && 'auto-draft' !== $newStatus) { // create review
150
+ glsr(ReviewManager::class)->createFromPost($post->ID);
151
+ }
152
  $isPublished = 'publish' === $newStatus;
153
  if (Review::isReview($post)) {
154
+ glsr(ReviewManager::class)->updateRating($post->ID, ['is_approved' => $isPublished]);
155
  glsr(Cache::class)->delete($post->ID, 'reviews');
156
  glsr(CountManager::class)->recalculate();
157
  } else {
258
  */
259
  public function onDeleteReview($reviewId)
260
  {
261
+ glsr(ReviewManager::class)->delete($reviewId);
 
 
262
  }
263
 
264
  /**
385
  if (Arr::get($submittedValues, 'is_editing_review')) {
386
  $submittedValues['rating'] = Arr::get($submittedValues, 'rating');
387
  $submittedValues['terms'] = Arr::get($submittedValues, 'terms', 0);
388
+ glsr(ReviewManager::class)->updateRating($review->ID, $submittedValues);
389
  glsr(ReviewManager::class)->updateCustom($review->ID, $submittedValues);
390
  }
391
  $review = glsr(Query::class)->review($review->ID); // get a fresh copy of the review
plugin/Controllers/RevisionController.php CHANGED
@@ -82,7 +82,7 @@ class RevisionController extends Controller
82
  return;
83
  }
84
  if (is_array($revision = glsr(Database::class)->meta($revisionId, 'review'))) {
85
- glsr(ReviewManager::class)->update($reviewId, $revision);
86
  }
87
  }
88
 
82
  return;
83
  }
84
  if (is_array($revision = glsr(Database::class)->meta($revisionId, 'review'))) {
85
+ glsr(ReviewManager::class)->updateRating($reviewId, $revision);
86
  }
87
  }
88
 
plugin/Database.php CHANGED
@@ -330,6 +330,7 @@ class Database
330
  'title' => esc_attr(get_the_title()),
331
  ]);
332
  }
 
333
  wp_reset_postdata();
334
  return $results;
335
  }
@@ -394,6 +395,19 @@ class Database
394
  return $this->logErrors($result);
395
  }
396
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  /**
398
  * @param string $compareToVersion
399
  * @return bool|string
330
  'title' => esc_attr(get_the_title()),
331
  ]);
332
  }
333
+ // @phpstan-ignore-next-line
334
  wp_reset_postdata();
335
  return $results;
336
  }
395
  return $this->logErrors($result);
396
  }
397
 
398
+ /**
399
+ * @return array
400
+ */
401
+ public function users(array $args = [])
402
+ {
403
+ $args = wp_parse_args($args, [
404
+ 'fields' => ['ID', 'display_name'],
405
+ 'orderby' => 'display_name',
406
+ ]);
407
+ $users = get_users($args);
408
+ return wp_list_pluck($users, 'display_name', 'ID');
409
+ }
410
+
411
  /**
412
  * @param string $compareToVersion
413
  * @return bool|string
plugin/Database/NormalizePaginationArgs.php CHANGED
@@ -16,7 +16,9 @@ class NormalizePaginationArgs extends Arguments
16
  public function __construct(array $args = [])
17
  {
18
  parent::__construct($args);
19
- $this->normalizePage();
 
 
20
  $this->normalizePageUrl();
21
  $this->normalizePageUrlParameters();
22
  }
16
  public function __construct(array $args = [])
17
  {
18
  parent::__construct($args);
19
+ if (empty($this->page)) {
20
+ $this->normalizePage();
21
+ }
22
  $this->normalizePageUrl();
23
  $this->normalizePageUrlParameters();
24
  }
plugin/Database/NormalizeQueryArgs.php CHANGED
@@ -7,6 +7,7 @@ use GeminiLabs\SiteReviews\Defaults\ReviewsDefaults;
7
  use GeminiLabs\SiteReviews\Helpers\Arr;
8
  use GeminiLabs\SiteReviews\Helpers\Cast;
9
  use GeminiLabs\SiteReviews\Helpers\Str;
 
10
 
11
  /**
12
  * @property int[] $assigned_posts;
@@ -59,12 +60,8 @@ class NormalizeQueryArgs extends Arguments
59
  $date['day'] = date('j', $timestamp);
60
  return $date;
61
  }
62
- if (false !== strtotime(Arr::get($value, 'after'))) {
63
- $date['after'] = $value['after'];
64
- }
65
- if (false !== strtotime(Arr::get($value, 'before'))) {
66
- $date['before'] = $value['before'];
67
- }
68
  if (!empty(array_filter($date))) {
69
  $date['inclusive'] = Cast::toBool(Arr::get($value, 'inclusive')) ? '=' : '';
70
  }
@@ -77,8 +74,12 @@ class NormalizeQueryArgs extends Arguments
77
  */
78
  protected function normalizeOrderBy($value)
79
  {
80
- $orderBy = Str::restrictTo('author,comment_count,date,date_gmt,ID,menu_order,none,random,rating,relevance', $value, 'date');
81
- if (in_array($orderBy, ['comment_count', 'ID', 'menu_order'])) {
 
 
 
 
82
  return Str::prefix($orderBy, 'p.');
83
  }
84
  if (in_array($orderBy, ['author', 'date', 'date_gmt'])) {
7
  use GeminiLabs\SiteReviews\Helpers\Arr;
8
  use GeminiLabs\SiteReviews\Helpers\Cast;
9
  use GeminiLabs\SiteReviews\Helpers\Str;
10
+ use GeminiLabs\SiteReviews\Modules\Sanitizer;
11
 
12
  /**
13
  * @property int[] $assigned_posts;
60
  $date['day'] = date('j', $timestamp);
61
  return $date;
62
  }
63
+ $date['after'] = glsr(Sanitizer::class)->sanitizeDate(Arr::get($value, 'after'));
64
+ $date['before'] = glsr(Sanitizer::class)->sanitizeDate(Arr::get($value, 'before'));
 
 
 
 
65
  if (!empty(array_filter($date))) {
66
  $date['inclusive'] = Cast::toBool(Arr::get($value, 'inclusive')) ? '=' : '';
67
  }
74
  */
75
  protected function normalizeOrderBy($value)
76
  {
77
+ $value = strtolower($value);
78
+ $orderBy = Str::restrictTo('author,comment_count,date,date_gmt,id,menu_order,none,random,rating', $value, 'date');
79
+ if ('id' === $orderBy) {
80
+ return 'p.ID';
81
+ }
82
+ if (in_array($orderBy, ['comment_count', 'menu_order'])) {
83
  return Str::prefix($orderBy, 'p.');
84
  }
85
  if (in_array($orderBy, ['author', 'date', 'date_gmt'])) {
plugin/Database/ReviewManager.php CHANGED
@@ -4,9 +4,14 @@ namespace GeminiLabs\SiteReviews\Database;
4
 
5
  use GeminiLabs\SiteReviews\Commands\CreateReview;
6
  use GeminiLabs\SiteReviews\Database;
 
7
  use GeminiLabs\SiteReviews\Defaults\RatingDefaults;
 
 
8
  use GeminiLabs\SiteReviews\Helpers\Arr;
9
  use GeminiLabs\SiteReviews\Helpers\Cast;
 
 
10
  use GeminiLabs\SiteReviews\Review;
11
  use GeminiLabs\SiteReviews\Reviews;
12
 
@@ -67,18 +72,30 @@ class ReviewManager
67
  /**
68
  * @return false|Review
69
  */
70
- public function create(CreateReview $command)
71
  {
72
- if ($postId = $this->createRaw($command)) {
73
- $review = $this->get($postId);
74
- if ($review->isValid()) {
75
- glsr()->action('review/created', $review, $command);
76
- return $this->get($review->ID); // return a fresh copy of the review
77
- }
 
78
  }
79
  return false;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
82
  /**
83
  * @return false|int
84
  */
@@ -107,15 +124,17 @@ class ReviewManager
107
  }
108
 
109
  /**
 
110
  * @param int $reviewId
111
  * @return int|false
112
  */
113
  public function delete($reviewId)
114
  {
115
- glsr(Cache::class)->delete($reviewId, 'reviews');
116
- return glsr(Database::class)->delete('ratings', [
117
- 'review_id' => $reviewId,
118
- ]);
 
119
  }
120
 
121
  /**
@@ -136,6 +155,7 @@ class ReviewManager
136
  */
137
  public function get($reviewId)
138
  {
 
139
  $review = glsr(Query::class)->review($reviewId);
140
  glsr()->action('get/review', $review, $reviewId);
141
  return $review;
@@ -215,9 +235,64 @@ class ReviewManager
215
 
216
  /**
217
  * @param int $reviewId
218
- * @return int|bool
219
  */
220
  public function update($reviewId, array $data = [])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  {
222
  glsr(Cache::class)->delete($reviewId, 'reviews');
223
  $defaults = glsr(RatingDefaults::class)->restrict($data);
@@ -231,34 +306,46 @@ class ReviewManager
231
 
232
  /**
233
  * @param int $reviewId
234
- * @return void
 
235
  */
236
- public function updateCustom($reviewId, array $data = [])
237
  {
238
- $fields = glsr()->config('forms/metabox-fields');
239
- $defaults = glsr(RatingDefaults::class)->defaults();
240
- $customKeys = array_keys(array_diff_key($fields, $defaults));
241
- if ($data = shortcode_atts(array_fill_keys($customKeys, ''), $data)) {
242
- $data = Arr::prefixKeys($data, 'custom_');
243
- foreach ($data as $metaKey => $metaValue) {
244
- glsr(Database::class)->metaSet($reviewId, $metaKey, $metaValue);
245
- }
246
- }
247
  }
248
 
249
  /**
250
- * @param int $postId
251
- * @param bool $isPublished
252
- * @return int|bool
253
  */
254
- public function updateAssignedPost($postId, $isPublished)
255
  {
256
- $isPublished = wp_validate_boolean($isPublished);
257
- $postId = Cast::toInt($postId);
258
- return glsr(Database::class)->update('assigned_posts',
259
- ['is_published' => $isPublished],
260
- ['post_id' => $postId]
261
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  }
263
 
264
  /**
4
 
5
  use GeminiLabs\SiteReviews\Commands\CreateReview;
6
  use GeminiLabs\SiteReviews\Database;
7
+ use GeminiLabs\SiteReviews\Defaults\CustomFieldsDefaults;
8
  use GeminiLabs\SiteReviews\Defaults\RatingDefaults;
9
+ use GeminiLabs\SiteReviews\Defaults\UpdateReviewDefaults;
10
+ use GeminiLabs\SiteReviews\Helper;
11
  use GeminiLabs\SiteReviews\Helpers\Arr;
12
  use GeminiLabs\SiteReviews\Helpers\Cast;
13
+ use GeminiLabs\SiteReviews\Modules\Sanitizer;
14
+ use GeminiLabs\SiteReviews\Request;
15
  use GeminiLabs\SiteReviews\Review;
16
  use GeminiLabs\SiteReviews\Reviews;
17
 
72
  /**
73
  * @return false|Review
74
  */
75
+ public function create(CreateReview $command, $postId = null)
76
  {
77
+ if (empty($postId)) {
78
+ $postId = $this->createRaw($command);
79
+ }
80
+ $review = $this->get($postId);
81
+ if ($review->isValid()) {
82
+ glsr()->action('review/created', $review, $command);
83
+ return $this->get($review->ID); // return a fresh copy of the review
84
  }
85
  return false;
86
  }
87
 
88
+ /**
89
+ * @param int $postId
90
+ * @return false|Review
91
+ */
92
+ public function createFromPost($postId)
93
+ {
94
+ $command = new CreateReview(new Request([]));
95
+ glsr()->action('review/create', $postId, $command);
96
+ return $this->create($command, $postId);
97
+ }
98
+
99
  /**
100
  * @return false|int
101
  */
124
  }
125
 
126
  /**
127
+ * This only deletes the entry in the ratings table!
128
  * @param int $reviewId
129
  * @return int|false
130
  */
131
  public function delete($reviewId)
132
  {
133
+ $result = glsr(Database::class)->delete('ratings', ['review_id' => $reviewId]);
134
+ if ($result) {
135
+ glsr(Cache::class)->delete($reviewId, 'reviews');
136
+ }
137
+ return $result;
138
  }
139
 
140
  /**
155
  */
156
  public function get($reviewId)
157
  {
158
+ $reviewId = Helper::getPostId($reviewId);
159
  $review = glsr(Query::class)->review($reviewId);
160
  glsr()->action('get/review', $review, $reviewId);
161
  return $review;
235
 
236
  /**
237
  * @param int $reviewId
238
+ * @return Review|false Return false on failure
239
  */
240
  public function update($reviewId, array $data = [])
241
+ {
242
+ if (false === $this->updateRating($reviewId, $data)) {
243
+ return false;
244
+ }
245
+ if (false === $this->updateReview($reviewId, $data)) {
246
+ return false;
247
+ }
248
+ $this->updateCustom($reviewId, $data);
249
+ $this->updateResponse($reviewId, Arr::get($data, 'response'));
250
+ $review = glsr(Query::class)->review($reviewId);
251
+ if ($assignedPosts = Arr::uniqueInt(Arr::get($data, 'assigned_posts'))) {
252
+ glsr()->action('review/updated/post_ids', $review, $assignedPosts); // trigger a recount of assigned posts
253
+ }
254
+ if ($assignedUsers = Arr::uniqueInt(Arr::get($data, 'assigned_users'))) {
255
+ glsr()->action('review/updated/user_ids', $review, $assignedUsers); // trigger a recount of assigned posts
256
+ }
257
+ $review = glsr(Query::class)->review($reviewId); // get a fresh copy of the review
258
+ glsr()->action('review/saved', $review, $data);
259
+ return $review;
260
+ }
261
+
262
+ /**
263
+ * @param int $postId
264
+ * @param bool $isPublished
265
+ * @return int|bool
266
+ */
267
+ public function updateAssignedPost($postId, $isPublished)
268
+ {
269
+ $isPublished = wp_validate_boolean($isPublished);
270
+ $postId = Cast::toInt($postId);
271
+ return glsr(Database::class)->update('assigned_posts',
272
+ ['is_published' => $isPublished],
273
+ ['post_id' => $postId]
274
+ );
275
+ }
276
+
277
+ /**
278
+ * @param int $reviewId
279
+ * @return array
280
+ */
281
+ public function updateCustom($reviewId, array $data = [])
282
+ {
283
+ $data = glsr(CustomFieldsDefaults::class)->merge($data);
284
+ $data = Arr::prefixKeys($data, 'custom_');
285
+ foreach ($data as $metaKey => $metaValue) {
286
+ glsr(Database::class)->metaSet($reviewId, $metaKey, $metaValue);
287
+ }
288
+ return $data;
289
+ }
290
+
291
+ /**
292
+ * @param int $reviewId
293
+ * @return int|false Returns false on error
294
+ */
295
+ public function updateRating($reviewId, array $data = [])
296
  {
297
  glsr(Cache::class)->delete($reviewId, 'reviews');
298
  $defaults = glsr(RatingDefaults::class)->restrict($data);
306
 
307
  /**
308
  * @param int $reviewId
309
+ * @param string $response
310
+ * @return int|bool
311
  */
312
+ public function updateResponse($reviewId, $response = '')
313
  {
314
+ $response = Cast::toString($response);
315
+ $response = glsr(Sanitizer::class)->sanitizeTextHtml($response);
316
+ $userId = Helper::ifTrue(empty($response), 0, get_current_user_id());
317
+ glsr(Database::class)->metaSet($reviewId, 'response_by', $userId);
318
+ return glsr(Database::class)->metaSet($reviewId, 'response', $response);
 
 
 
 
319
  }
320
 
321
  /**
322
+ * @param int $reviewId
323
+ * @return int|false Returns false on failure
 
324
  */
325
+ public function updateReview($reviewId, array $data = [])
326
  {
327
+ if (glsr()->post_type !== get_post_type($reviewId)) {
328
+ return 0;
329
+ }
330
+ glsr(Cache::class)->delete($reviewId, 'reviews');
331
+ $defaults = glsr(UpdateReviewDefaults::class)->restrict($data);
332
+ if ($data = array_intersect_key($data, $defaults)) {
333
+ $data = array_filter([
334
+ 'post_content' => Arr::get($data, 'content'),
335
+ 'post_date' => Arr::get($data, 'date'),
336
+ 'post_date_gmt' => Arr::get($data, 'date_gmt'),
337
+ 'post_status' => Arr::get($data, 'status'),
338
+ 'post_title' => Arr::get($data, 'title'),
339
+ ]);
340
+ }
341
+ if (!empty($data)) {
342
+ $result = wp_update_post(wp_parse_args(['ID' => $reviewId], $data), true);
343
+ if (is_wp_error($result)) {
344
+ glsr_log()->error($result->get_error_message());
345
+ return false;
346
+ }
347
+ }
348
+ return 0;
349
  }
350
 
351
  /**
plugin/Defaults/ColumnFilterbyDefaults.php CHANGED
@@ -12,6 +12,8 @@ class ColumnFilterbyDefaults extends Defaults
12
  protected function defaults()
13
  {
14
  return [
 
 
15
  'rating' => FILTER_SANITIZE_NUMBER_INT,
16
  'type' => FILTER_SANITIZE_STRING,
17
  ];
12
  protected function defaults()
13
  {
14
  return [
15
+ 'assigned_post_id' => FILTER_SANITIZE_NUMBER_INT,
16
+ 'assigned_user_id' => FILTER_SANITIZE_NUMBER_INT,
17
  'rating' => FILTER_SANITIZE_NUMBER_INT,
18
  'type' => FILTER_SANITIZE_STRING,
19
  ];
plugin/Defaults/CreateReviewDefaults.php CHANGED
@@ -71,7 +71,7 @@ class CreateReviewDefaults extends Defaults
71
  'terms' => true,
72
  'terms_exist' => false,
73
  'title' => '',
74
- 'type' => '',
75
  'url' => '',
76
  ];
77
  }
71
  'terms' => true,
72
  'terms_exist' => false,
73
  'title' => '',
74
+ 'type' => 'local',
75
  'url' => '',
76
  ];
77
  }
plugin/Defaults/CustomFieldsDefaults.php CHANGED
@@ -23,20 +23,30 @@ class CustomFieldsDefaults extends Defaults
23
  'assigned_posts',
24
  'assigned_terms',
25
  'assigned_users',
 
 
26
  'avatar',
27
  'content',
28
- 'date', // special
 
 
29
  'email',
30
  'excluded',
31
  'form_id',
 
32
  'ip_address',
 
 
33
  'is_pinned',
34
  'name',
35
  'rating',
 
36
  'response',
 
37
  'terms',
38
  'title',
39
- 'url', // special
 
40
  ];
41
 
42
  /**
23
  'assigned_posts',
24
  'assigned_terms',
25
  'assigned_users',
26
+ 'author',
27
+ 'author_id',
28
  'avatar',
29
  'content',
30
+ 'custom',
31
+ 'date',
32
+ 'date_gmt',
33
  'email',
34
  'excluded',
35
  'form_id',
36
+ 'ID',
37
  'ip_address',
38
+ 'is_approved',
39
+ 'is_modified',
40
  'is_pinned',
41
  'name',
42
  'rating',
43
+ 'rating_id',
44
  'response',
45
+ 'review_id',
46
  'terms',
47
  'title',
48
+ 'type',
49
+ 'url',
50
  ];
51
 
52
  /**
plugin/Defaults/PostTypeDefaults.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  namespace GeminiLabs\SiteReviews\Defaults;
4
 
5
- use GeminiLabs\SiteReviews\Controllers\RestReviewController;
6
  use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
7
 
8
  class PostTypeDefaults extends Defaults
@@ -14,7 +14,9 @@ class PostTypeDefaults extends Defaults
14
  {
15
  return [
16
  'capabilities' => [
17
- 'create_posts' => 'create_'.glsr()->post_type,
 
 
18
  ],
19
  'capability_type' => glsr()->post_type,
20
  'exclude_from_search' => true,
2
 
3
  namespace GeminiLabs\SiteReviews\Defaults;
4
 
5
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\RestReviewController;
6
  use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
7
 
8
  class PostTypeDefaults extends Defaults
14
  {
15
  return [
16
  'capabilities' => [
17
+ 'create_posts' => sprintf('create_%ss', glsr()->post_type),
18
+ 'respond_to_posts' => sprintf('respond_to_%ss', glsr()->post_type),
19
+ 'respond_to_others_posts' => sprintf('respond_to_others_%ss', glsr()->post_type),
20
  ],
21
  'capability_type' => glsr()->post_type,
22
  'exclude_from_search' => true,
plugin/Defaults/ReviewDefaults.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace GeminiLabs\SiteReviews\Defaults;
4
 
5
  use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
 
6
 
7
  class ReviewDefaults extends Defaults
8
  {
@@ -71,4 +72,17 @@ class ReviewDefaults extends Defaults
71
  'url' => '',
72
  ];
73
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
3
  namespace GeminiLabs\SiteReviews\Defaults;
4
 
5
  use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
6
+ use GeminiLabs\SiteReviews\Helpers\Arr;
7
 
8
  class ReviewDefaults extends Defaults
9
  {
72
  'url' => '',
73
  ];
74
  }
75
+
76
+ /**
77
+ * Normalize provided values, this always runs first.
78
+ * @return array
79
+ */
80
+ protected function normalize(array $values = [])
81
+ {
82
+ $date = Arr::get($values, 'date');
83
+ if ($date && '0000-00-00 00:00:00' === Arr::get($values, 'date_gmt')) {
84
+ $values['date_gmt'] = get_gmt_from_date($date);
85
+ }
86
+ return $values;
87
+ }
88
  }
plugin/Defaults/ReviewTableFiltersDefaults.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Defaults;
4
+
5
+ use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterAssignedPost;
6
+ use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterAssignedUser;
7
+ use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterCategory;
8
+ use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterRating;
9
+ use GeminiLabs\SiteReviews\Controllers\ListTableColumns\ColumnFilterType;
10
+ use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
11
+
12
+ class ReviewTableFiltersDefaults extends Defaults
13
+ {
14
+ /**
15
+ * @return array
16
+ */
17
+ protected function defaults()
18
+ {
19
+ return [ // order is intentional
20
+ 'rating' => ColumnFilterRating::class,
21
+ 'type' => ColumnFilterType::class,
22
+ 'category' => ColumnFilterCategory::class,
23
+ 'assigned_post' => ColumnFilterAssignedPost::class,
24
+ 'assigned_user' => ColumnFilterAssignedUser::class,
25
+ ];
26
+ }
27
+ }
plugin/Defaults/ReviewsDefaults.php CHANGED
@@ -30,6 +30,8 @@ class ReviewsDefaults extends Defaults
30
  'category' => 'assigned_terms',
31
  'count' => 'per_page', // @deprecated in v4.1.0
32
  'display' => 'per_page',
 
 
33
  'user' => 'assigned_users',
34
  ];
35
 
30
  'category' => 'assigned_terms',
31
  'count' => 'per_page', // @deprecated in v4.1.0
32
  'display' => 'per_page',
33
+ 'exclude' => 'post__not_in',
34
+ 'include' => 'post__in',
35
  'user' => 'assigned_users',
36
  ];
37
 
plugin/Defaults/TaxonomyDefaults.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Defaults;
4
+
5
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\RestCategoryController;
6
+ use GeminiLabs\SiteReviews\Controllers\MetaboxController;
7
+ use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
8
+
9
+ class TaxonomyDefaults extends Defaults
10
+ {
11
+ /**
12
+ * @return array
13
+ */
14
+ protected function defaults()
15
+ {
16
+ return [
17
+ 'hierarchical' => true,
18
+ 'meta_box_cb' => [glsr(MetaboxController::class), 'renderTaxonomyMetabox'],
19
+ 'public' => false,
20
+ 'rest_controller_class' => RestCategoryController::class,
21
+ 'show_admin_column' => true,
22
+ 'show_in_rest' => true,
23
+ 'show_ui' => true,
24
+ ];
25
+ }
26
+ }
plugin/Defaults/UpdateReviewDefaults.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Defaults;
4
+
5
+ use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract as Defaults;
6
+ use GeminiLabs\SiteReviews\Helpers\Arr;
7
+ use GeminiLabs\SiteReviews\Helpers\Str;
8
+
9
+ class UpdateReviewDefaults extends Defaults
10
+ {
11
+ /**
12
+ * @var array
13
+ */
14
+ public $mapped = [
15
+ 'author' => 'name',
16
+ 'post_ids' => 'assigned_posts',
17
+ 'term_ids' => 'assigned_terms',
18
+ 'user_ids' => 'assigned_users',
19
+ ];
20
+
21
+ /**
22
+ * @var array
23
+ */
24
+ public $sanitize = [
25
+ 'assigned_posts' => 'array-int',
26
+ 'assigned_terms' => 'array-int',
27
+ 'assigned_users' => 'array-int',
28
+ 'author_id' => 'int',
29
+ 'date' => 'date',
30
+ 'date_gmt' => 'date',
31
+ 'is_pinned' => 'bool',
32
+ 'rating' => 'int',
33
+ 'terms' => 'bool',
34
+ ];
35
+
36
+ /**
37
+ * @return array
38
+ */
39
+ protected function defaults()
40
+ {
41
+ return [
42
+ 'assigned_posts' => '',
43
+ 'assigned_terms' => '',
44
+ 'assigned_users' => '',
45
+ 'name' => '',
46
+ 'author_id' => '',
47
+ 'avatar' => '',
48
+ 'content' => '',
49
+ 'custom' => '',
50
+ 'date' => '',
51
+ 'date_gmt' => '',
52
+ 'email' => '',
53
+ 'ip_address' => '',
54
+ 'is_pinned' => '',
55
+ 'rating' => '',
56
+ 'response' => '',
57
+ 'status' => '',
58
+ 'terms' => '',
59
+ 'title' => '',
60
+ 'type' => '',
61
+ 'url' => '',
62
+ ];
63
+ }
64
+
65
+ /**
66
+ * Normalize provided values, this always runs first.
67
+ * @return array
68
+ */
69
+ protected function normalize(array $values = [])
70
+ {
71
+ $values = $this->normalizeStatus($values);
72
+ return $values;
73
+ }
74
+
75
+ /**
76
+ * @return array
77
+ */
78
+ protected function normalizeStatus(array $values)
79
+ {
80
+ $mapped = [
81
+ 'approved' => 'publish',
82
+ 'pending' => 'pending',
83
+ 'publish' => 'publish',
84
+ 'unapproved' => 'pending',
85
+ ];
86
+ $status = Str::restrictTo(array_keys($mapped), Arr::get($values, 'status'));
87
+ if (isset($mapped[$status])) {
88
+ $status = $mapped[$status];
89
+ }
90
+ $values['status'] = $status;
91
+ return $values;
92
+ }
93
+ }
plugin/Helpers/Arr.php CHANGED
@@ -19,11 +19,11 @@ class Arr
19
  }
20
 
21
  /**
22
- * Returns an empty array if value is scalar
23
  * @param mixed $value
24
  * @return array
25
  */
26
- public static function consolidate($value)
27
  {
28
  if ($value instanceof Arguments) {
29
  return $value->toArray();
@@ -32,7 +32,7 @@ class Arr
32
  $values = get_object_vars($value);
33
  $value = Helper::ifEmpty($values, (array) $value, $strict = true);
34
  }
35
- return is_array($value) ? $value : [];
36
  }
37
 
38
  /**
19
  }
20
 
21
  /**
22
+ * Returns an empty array by default if value is scalar
23
  * @param mixed $value
24
  * @return array
25
  */
26
+ public static function consolidate($value, array $fallback = [])
27
  {
28
  if ($value instanceof Arguments) {
29
  return $value->toArray();
32
  $values = get_object_vars($value);
33
  $value = Helper::ifEmpty($values, (array) $value, $strict = true);
34
  }
35
+ return is_array($value) ? $value : $fallback;
36
  }
37
 
38
  /**
plugin/Helpers/Str.php CHANGED
@@ -283,6 +283,16 @@ class Str
283
  return $string;
284
  }
285
 
 
 
 
 
 
 
 
 
 
 
286
  /**
287
  * @param string $value
288
  * @param int $length
283
  return $string;
284
  }
285
 
286
+ /**
287
+ * @param string $string
288
+ * @return string
289
+ */
290
+ public static function titleCase($string)
291
+ {
292
+ $value = str_replace(['-', '_'], ' ', $string);
293
+ return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8');
294
+ }
295
+
296
  /**
297
  * @param string $value
298
  * @param int $length
plugin/Hooks.php CHANGED
@@ -4,9 +4,11 @@ namespace GeminiLabs\SiteReviews;
4
 
5
  use GeminiLabs\SiteReviews\Contracts\HooksContract;
6
  use GeminiLabs\SiteReviews\Controllers\AdminController;
 
7
  use GeminiLabs\SiteReviews\Controllers\BlocksController;
8
  use GeminiLabs\SiteReviews\Controllers\BulkEditorController;
9
  use GeminiLabs\SiteReviews\Controllers\EditorController;
 
10
  use GeminiLabs\SiteReviews\Controllers\ListTableController;
11
  use GeminiLabs\SiteReviews\Controllers\MainController;
12
  use GeminiLabs\SiteReviews\Controllers\MenuController;
@@ -31,6 +33,7 @@ class Hooks implements HooksContract
31
  protected $blocks;
32
  protected $bulkeditor;
33
  protected $editor;
 
34
  protected $listtable;
35
  protected $main;
36
  protected $menu;
@@ -38,6 +41,7 @@ class Hooks implements HooksContract
38
  protected $notices;
39
  protected $privacy;
40
  protected $public;
 
41
  protected $review;
42
  protected $revisions;
43
  protected $router;
@@ -54,6 +58,7 @@ class Hooks implements HooksContract
54
  $this->blocks = glsr(BlocksController::class);
55
  $this->bulkeditor = glsr(BulkEditorController::class);
56
  $this->editor = glsr(EditorController::class);
 
57
  $this->listtable = glsr(ListTableController::class);
58
  $this->main = glsr(MainController::class);
59
  $this->menu = glsr(MenuController::class);
@@ -61,6 +66,7 @@ class Hooks implements HooksContract
61
  $this->notices = glsr(NoticeController::class);
62
  $this->privacy = glsr(PrivacyController::class);
63
  $this->public = glsr(PublicController::class);
 
64
  $this->review = glsr(ReviewController::class);
65
  $this->revisions = glsr(RevisionController::class);
66
  $this->router = glsr(Router::class);
@@ -90,15 +96,18 @@ class Hooks implements HooksContract
90
  add_action('site-reviews/route/ajax/search-posts', [$this->admin, 'searchPostsAjax']);
91
  add_action('site-reviews/route/ajax/search-translations', [$this->admin, 'searchTranslationsAjax']);
92
  add_action('site-reviews/route/ajax/search-users', [$this->admin, 'searchUsersAjax']);
 
93
  add_action('site-reviews/route/ajax/toggle-pinned', [$this->admin, 'togglePinnedAjax']);
94
  add_action('site-reviews/route/ajax/toggle-status', [$this->admin, 'toggleStatusAjax']);
95
  add_action('init', [$this->blocks, 'registerAssets'], 9);
96
  add_action('init', [$this->blocks, 'registerBlocks']);
97
  add_action('bulk_edit_custom_box', [$this->bulkeditor, 'renderBulkEditFields'], 10, 2);
98
  add_action('site-reviews/route/ajax/mce-shortcode', [$this->editor, 'mceShortcodeAjax']);
99
- add_action('admin_print_scripts', [$this->editor, 'removeAutosave'], 999);
100
- add_action('current_screen', [$this->editor, 'removePostTypeSupport']);
101
- add_action('admin_head', [$this->editor, 'renderReviewFields']);
 
 
102
  add_action('pre_get_posts', [$this->listtable, 'setQueryForColumn']);
103
  add_action('restrict_manage_posts', [$this->listtable, 'renderColumnFilters']);
104
  add_action('manage_'.glsr()->post_type.'_posts_custom_column', [$this->listtable, 'renderColumnValues'], 10, 2);
@@ -115,6 +124,7 @@ class Hooks implements HooksContract
115
  add_action('widgets_init', [$this->main, 'registerWidgets']);
116
  add_action('admin_menu', [$this->menu, 'registerMenuCount']);
117
  add_action('admin_menu', [$this->menu, 'registerSubMenus']);
 
118
  add_action('admin_init', [$this->menu, 'setCustomPermissions'], 999);
119
  add_action('add_meta_boxes_'.glsr()->post_type, [$this->metabox, 'registerMetaBoxes']);
120
  add_action('do_meta_boxes', [$this->metabox, 'removeMetaBoxes']);
@@ -130,6 +140,7 @@ class Hooks implements HooksContract
130
  add_action('site-reviews/route/public/submit-review', [$this->public, 'submitReview']);
131
  add_action('site-reviews/route/ajax/submit-review', [$this->public, 'submitReviewAjax']);
132
  add_action('admin_init', [$this->privacy, 'privacyPolicyContent']);
 
133
  add_action('admin_action_approve', [$this->review, 'approve']);
134
  add_action('the_posts', [$this->review, 'filterPostsToCacheReviews']);
135
  add_action('set_object_terms', [$this->review, 'onAfterChangeAssignedTerms'], 10, 6);
@@ -176,7 +187,7 @@ class Hooks implements HooksContract
176
  public function addFilters()
177
  {
178
  add_filter('plugin_action_links_'.$this->basename, [$this->admin, 'filterActionLinks']);
179
- add_filter('map_meta_cap', [$this->admin, 'filterCreateCapability'], 10, 2);
180
  add_filter('dashboard_glance_items', [$this->admin, 'filterDashboardGlanceItems']);
181
  add_filter('export_args', [$this->admin, 'filterExportArgs'], 11);
182
  add_filter('mce_external_plugins', [$this->admin, 'filterTinymcePlugins'], 15);
@@ -187,11 +198,14 @@ class Hooks implements HooksContract
187
  add_filter('the_editor', [$this->editor, 'filterEditorTextarea']);
188
  add_filter('is_protected_meta', [$this->editor, 'filterIsProtectedMeta'], 10, 3);
189
  add_filter('post_updated_messages', [$this->editor, 'filterUpdateMessages']);
 
 
190
  add_filter('manage_'.glsr()->post_type.'_posts_columns', [$this->listtable, 'filterColumnsForPostType']);
191
  add_filter('post_date_column_status', [$this->listtable, 'filterDateColumnStatus'], 10, 2);
192
  add_filter('default_hidden_columns', [$this->listtable, 'filterDefaultHiddenColumns'], 10, 2);
193
  add_filter('posts_clauses', [$this->listtable, 'filterPostClauses'], 10, 2);
194
  add_filter('post_row_actions', [$this->listtable, 'filterRowActions'], 10, 2);
 
195
  add_filter('manage_edit-'.glsr()->post_type.'_sortable_columns', [$this->listtable, 'filterSortableColumns']);
196
  add_filter('wpmu_drop_tables', [$this->main, 'filterDropTables'], 999); // run last
197
  add_filter('site-reviews/config/forms/metabox-fields', [$this->metabox, 'filterFieldOrder'], 11);
4
 
5
  use GeminiLabs\SiteReviews\Contracts\HooksContract;
6
  use GeminiLabs\SiteReviews\Controllers\AdminController;
7
+ use GeminiLabs\SiteReviews\Controllers\Api\Version1\RestController;
8
  use GeminiLabs\SiteReviews\Controllers\BlocksController;
9
  use GeminiLabs\SiteReviews\Controllers\BulkEditorController;
10
  use GeminiLabs\SiteReviews\Controllers\EditorController;
11
+ use GeminiLabs\SiteReviews\Controllers\IntegrationController;
12
  use GeminiLabs\SiteReviews\Controllers\ListTableController;
13
  use GeminiLabs\SiteReviews\Controllers\MainController;
14
  use GeminiLabs\SiteReviews\Controllers\MenuController;
33
  protected $blocks;
34
  protected $bulkeditor;
35
  protected $editor;
36
+ protected $integrations;
37
  protected $listtable;
38
  protected $main;
39
  protected $menu;
41
  protected $notices;
42
  protected $privacy;
43
  protected $public;
44
+ protected $rest;
45
  protected $review;
46
  protected $revisions;
47
  protected $router;
58
  $this->blocks = glsr(BlocksController::class);
59
  $this->bulkeditor = glsr(BulkEditorController::class);
60
  $this->editor = glsr(EditorController::class);
61
+ $this->integrations = glsr(IntegrationController::class);
62
  $this->listtable = glsr(ListTableController::class);
63
  $this->main = glsr(MainController::class);
64
  $this->menu = glsr(MenuController::class);
66
  $this->notices = glsr(NoticeController::class);
67
  $this->privacy = glsr(PrivacyController::class);
68
  $this->public = glsr(PublicController::class);
69
+ $this->rest = glsr(RestController::class);
70
  $this->review = glsr(ReviewController::class);
71
  $this->revisions = glsr(RevisionController::class);
72
  $this->router = glsr(Router::class);
96
  add_action('site-reviews/route/ajax/search-posts', [$this->admin, 'searchPostsAjax']);
97
  add_action('site-reviews/route/ajax/search-translations', [$this->admin, 'searchTranslationsAjax']);
98
  add_action('site-reviews/route/ajax/search-users', [$this->admin, 'searchUsersAjax']);
99
+ add_action('site-reviews/route/ajax/toggle-filters', [$this->admin, 'toggleFiltersAjax']);
100
  add_action('site-reviews/route/ajax/toggle-pinned', [$this->admin, 'togglePinnedAjax']);
101
  add_action('site-reviews/route/ajax/toggle-status', [$this->admin, 'toggleStatusAjax']);
102
  add_action('init', [$this->blocks, 'registerAssets'], 9);
103
  add_action('init', [$this->blocks, 'registerBlocks']);
104
  add_action('bulk_edit_custom_box', [$this->bulkeditor, 'renderBulkEditFields'], 10, 2);
105
  add_action('site-reviews/route/ajax/mce-shortcode', [$this->editor, 'mceShortcodeAjax']);
106
+ add_action('edit_form_top', [$this->editor, 'renderReviewNotice']);
107
+ add_action('elementor/init', [$this->integrations, 'registerElementorCategory']);
108
+ add_action('elementor/widgets/widgets_registered', [$this->integrations, 'registerElementorWidgets']);
109
+ add_action('wp_ajax_inline-save', [$this->listtable, 'overrideInlineSaveAjax'], 0);
110
+ add_action('load-edit.php', [$this->listtable, 'overridePostsListTable']);
111
  add_action('pre_get_posts', [$this->listtable, 'setQueryForColumn']);
112
  add_action('restrict_manage_posts', [$this->listtable, 'renderColumnFilters']);
113
  add_action('manage_'.glsr()->post_type.'_posts_custom_column', [$this->listtable, 'renderColumnValues'], 10, 2);
124
  add_action('widgets_init', [$this->main, 'registerWidgets']);
125
  add_action('admin_menu', [$this->menu, 'registerMenuCount']);
126
  add_action('admin_menu', [$this->menu, 'registerSubMenus']);
127
+ add_action('admin_menu', [$this->menu, 'removeSubMenus'], 20);
128
  add_action('admin_init', [$this->menu, 'setCustomPermissions'], 999);
129
  add_action('add_meta_boxes_'.glsr()->post_type, [$this->metabox, 'registerMetaBoxes']);
130
  add_action('do_meta_boxes', [$this->metabox, 'removeMetaBoxes']);
140
  add_action('site-reviews/route/public/submit-review', [$this->public, 'submitReview']);
141
  add_action('site-reviews/route/ajax/submit-review', [$this->public, 'submitReviewAjax']);
142
  add_action('admin_init', [$this->privacy, 'privacyPolicyContent']);
143
+ add_action('rest_api_init', [$this->rest, 'registerRoutes']);
144
  add_action('admin_action_approve', [$this->review, 'approve']);
145
  add_action('the_posts', [$this->review, 'filterPostsToCacheReviews']);
146
  add_action('set_object_terms', [$this->review, 'onAfterChangeAssignedTerms'], 10, 6);
187
  public function addFilters()
188
  {
189
  add_filter('plugin_action_links_'.$this->basename, [$this->admin, 'filterActionLinks']);
190
+ add_filter('map_meta_cap', [$this->admin, 'filterCapabilities'], 10, 4);
191
  add_filter('dashboard_glance_items', [$this->admin, 'filterDashboardGlanceItems']);
192
  add_filter('export_args', [$this->admin, 'filterExportArgs'], 11);
193
  add_filter('mce_external_plugins', [$this->admin, 'filterTinymcePlugins'], 15);
198
  add_filter('the_editor', [$this->editor, 'filterEditorTextarea']);
199
  add_filter('is_protected_meta', [$this->editor, 'filterIsProtectedMeta'], 10, 3);
200
  add_filter('post_updated_messages', [$this->editor, 'filterUpdateMessages']);
201
+ add_filter('site-reviews/enqueue/public/inline-script/after', [$this->integrations, 'filterElementorInlineScript'], 1);
202
+ add_filter('heartbeat_received', [$this->listtable, 'filterCheckLockedReviews'], 20, 3);
203
  add_filter('manage_'.glsr()->post_type.'_posts_columns', [$this->listtable, 'filterColumnsForPostType']);
204
  add_filter('post_date_column_status', [$this->listtable, 'filterDateColumnStatus'], 10, 2);
205
  add_filter('default_hidden_columns', [$this->listtable, 'filterDefaultHiddenColumns'], 10, 2);
206
  add_filter('posts_clauses', [$this->listtable, 'filterPostClauses'], 10, 2);
207
  add_filter('post_row_actions', [$this->listtable, 'filterRowActions'], 10, 2);
208
+ add_filter('screen_settings', [$this->listtable, 'filterScreenFilters'], 10, 2);
209
  add_filter('manage_edit-'.glsr()->post_type.'_sortable_columns', [$this->listtable, 'filterSortableColumns']);
210
  add_filter('wpmu_drop_tables', [$this->main, 'filterDropTables'], 999); // run last
211
  add_filter('site-reviews/config/forms/metabox-fields', [$this->metabox, 'filterFieldOrder'], 11);
plugin/Integrations/Elementor/ElementorFormWidget.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Integrations\Elementor;
4
+
5
+ use GeminiLabs\SiteReviews\Database;
6
+ use GeminiLabs\SiteReviews\Helpers\Arr;
7
+ use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsFormShortcode;
8
+
9
+ class ElementorFormWidget extends ElementorWidget
10
+ {
11
+ /**
12
+ * @return string
13
+ */
14
+ public function get_shortcode()
15
+ {
16
+ return SiteReviewsFormShortcode::class;
17
+ }
18
+
19
+ public function get_title()
20
+ {
21
+ return _x('Submit a Review', 'admin-text', 'site-reviews');
22
+ }
23
+
24
+ protected function settings_basic()
25
+ {
26
+ $options = [
27
+ 'assigned_posts' => [
28
+ 'default' => '',
29
+ 'label' => _x('Assign Reviews to a Page', 'admin-text', 'site-reviews'),
30
+ 'label_block' => true,
31
+ 'options' => [
32
+ 'custom' => _x('Assign to multiple Post IDs', 'admin-text', 'site-reviews'),
33
+ 'post_id' => _x('Assign to the Current Page', 'admin-text', 'site-reviews'),
34
+ 'parent_id' => _x('Assign to the Parent Page', 'admin-text', 'site-reviews'),
35
+ ],
36
+ 'type' => \Elementor\Controls_Manager::SELECT2,
37
+ ],
38
+ 'assigned_posts_custom' => [
39
+ 'condition' => ['assigned_posts' => 'custom'],
40
+ 'description' => _x('Separate with commas.', 'admin-text', 'site-reviews'),
41
+ 'label_block' => true,
42
+ 'placeholder' => _x('Enter the Post IDs', 'admin-text', 'site-reviews'),
43
+ 'show_label' => false,
44
+ 'type' => \Elementor\Controls_Manager::TEXT,
45
+ ],
46
+ 'assigned_terms' => [
47
+ 'default' => '',
48
+ 'label' => _x('Assign Reviews to a Category', 'admin-text', 'site-reviews'),
49
+ 'label_block' => true,
50
+ 'multiple' => true,
51
+ 'options' => glsr(Database::class)->terms(),
52
+ 'type' => \Elementor\Controls_Manager::SELECT2,
53
+ ],
54
+ 'assigned_users' => [
55
+ 'default' => '',
56
+ 'label' => _x('Assign Reviews to a User', 'admin-text', 'site-reviews'),
57
+ 'label_block' => true,
58
+ 'multiple' => true,
59
+ 'options' => Arr::prepend(glsr(Database::class)->users(), sprintf('- %s -', _x('The Logged-in user', 'admin-text', 'site-reviews')), 'user_id'),
60
+ 'type' => \Elementor\Controls_Manager::SELECT2,
61
+ ],
62
+ ];
63
+ $hideOptions = $this->get_shortcode_instance()->getHideOptions();
64
+ foreach ($hideOptions as $key => $label) {
65
+ $separator = $key === key(array_slice($hideOptions, 0, 1)) ? 'before' : 'default';
66
+ $options['hide-'.$key] = [
67
+ 'label' => $label,
68
+ 'separator' => $separator,
69
+ 'return_value' => 1,
70
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
71
+ ];
72
+ }
73
+ return $options;
74
+ }
75
+ }
plugin/Integrations/Elementor/ElementorReviewsWidget.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Integrations\Elementor;
4
+
5
+ use GeminiLabs\SiteReviews\Database;
6
+ use GeminiLabs\SiteReviews\Helpers\Arr;
7
+ use GeminiLabs\SiteReviews\Helpers\Cast;
8
+ use GeminiLabs\SiteReviews\Modules\Rating;
9
+ use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsShortcode;
10
+
11
+ class ElementorReviewsWidget extends ElementorWidget
12
+ {
13
+ /**
14
+ * @return string
15
+ */
16
+ public function get_shortcode()
17
+ {
18
+ return SiteReviewsShortcode::class;
19
+ }
20
+
21
+ /**
22
+ * @return string
23
+ */
24
+ public function get_title()
25
+ {
26
+ return _x('Latest Reviews', 'admin-text', 'site-reviews');
27
+ }
28
+
29
+ protected function settings_basic()
30
+ {
31
+ $options = [
32
+ 'assigned_posts' => [
33
+ 'default' => '',
34
+ 'label' => _x('Limit Reviews to an Assigned Page', 'admin-text', 'site-reviews'),
35
+ 'label_block' => true,
36
+ 'options' => [
37
+ 'custom' => _x('Assigned to multiple Post IDs', 'admin-text', 'site-reviews'),
38
+ 'post_id' => _x('Assigned to the Current Page', 'admin-text', 'site-reviews'),
39
+ 'parent_id' => _x('Assigned to the Parent Page', 'admin-text', 'site-reviews'),
40
+ ],
41
+ 'type' => \Elementor\Controls_Manager::SELECT2,
42
+ ],
43
+ 'assigned_posts_custom' => [
44
+ 'condition' => ['assigned_posts' => 'custom'],
45
+ 'description' => _x('Separate with commas.', 'admin-text', 'site-reviews'),
46
+ 'label_block' => true,
47
+ 'placeholder' => _x('Enter the Post IDs', 'admin-text', 'site-reviews'),
48
+ 'show_label' => false,
49
+ 'type' => \Elementor\Controls_Manager::TEXT,
50
+ ],
51
+ 'assigned_terms' => [
52
+ 'default' => '',
53
+ 'label' => _x('Limit Reviews to an Assigned Category', 'admin-text', 'site-reviews'),
54
+ 'label_block' => true,
55
+ 'multiple' => true,
56
+ 'options' => glsr(Database::class)->terms(),
57
+ 'type' => \Elementor\Controls_Manager::SELECT2,
58
+ ],
59
+ 'assigned_users' => [
60
+ 'default' => '',
61
+ 'label' => _x('Limit Reviews to an Assigned User', 'admin-text', 'site-reviews'),
62
+ 'label_block' => true,
63
+ 'multiple' => true,
64
+ 'options' => Arr::prepend(glsr(Database::class)->users(), sprintf('- %s -', _x('The Logged-in user', 'admin-text', 'site-reviews')), 'user_id'),
65
+ 'type' => \Elementor\Controls_Manager::SELECT2,
66
+ ],
67
+ 'terms' => [
68
+ 'default' => '',
69
+ 'label' => _x('Limit Reviews to terms', 'admin-text', 'site-reviews'),
70
+ 'label_block' => true,
71
+ 'options' => [
72
+ 'true' => _x('Terms were accepted', 'admin-text', 'site-reviews'),
73
+ 'false' => _x('Terms were not accepted', 'admin-text', 'site-reviews'),
74
+ ],
75
+ 'type' => \Elementor\Controls_Manager::SELECT2,
76
+ ],
77
+ 'type' => $this->get_review_types(),
78
+ 'pagination' => [
79
+ 'default' => '',
80
+ 'label' => _x('Enable Pagination', 'admin-text', 'site-reviews'),
81
+ 'options' => [
82
+ '' => [
83
+ 'icon' => 'fa fa-times',
84
+ 'title' => _x('No', 'admin-text', 'site-reviews'),
85
+ ],
86
+ 'true' => [
87
+ 'icon' => 'fa fa-check',
88
+ 'title' => _x('Yes (with a page reload)', 'admin-text', 'site-reviews'),
89
+ ],
90
+ 'ajax' => [
91
+ 'icon' => 'fa fa-check-double',
92
+ 'title' => _x('Yes (without a page reload)', 'admin-text', 'site-reviews'),
93
+ ],
94
+ ],
95
+ 'separator' => 'before',
96
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
97
+ ],
98
+ 'display' => [
99
+ 'default' => 10,
100
+ 'label' => _x('Reviews Per Page', 'admin-text', 'site-reviews'),
101
+ 'max' => 50,
102
+ 'min' => 1,
103
+ 'type' => \Elementor\Controls_Manager::NUMBER,
104
+ ],
105
+ 'rating' => [
106
+ 'default' => 0,
107
+ 'label' => _x('Minimum Rating', 'admin-text', 'site-reviews'),
108
+ 'max' => Cast::toInt(glsr()->constant('MAX_RATING', Rating::class)),
109
+ 'min' => Cast::toInt(glsr()->constant('MIN_RATING', Rating::class)),
110
+ 'separator' => 'before',
111
+ 'type' => \Elementor\Controls_Manager::NUMBER,
112
+ ],
113
+ 'schema' => [
114
+ 'description' => _x('The schema should only be enabled once per page.', 'admin-text', 'site-reviews'),
115
+ 'label' => _x('Enable the schema?', 'admin-text', 'site-reviews'),
116
+ 'return_value' => 'true',
117
+ 'separator' => 'before',
118
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
119
+ ],
120
+ ];
121
+ $hideOptions = $this->get_shortcode_instance()->getHideOptions();
122
+ foreach ($hideOptions as $key => $label) {
123
+ $separator = $key === key(array_slice($hideOptions, 0, 1)) ? 'before' : 'default';
124
+ $options['hide-'.$key] = [
125
+ 'label' => $label,
126
+ 'separator' => $separator,
127
+ 'return_value' => 1,
128
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
129
+ ];
130
+ }
131
+ return $options;
132
+ }
133
+ }
plugin/Integrations/Elementor/ElementorSummaryWidget.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Integrations\Elementor;
4
+
5
+ use GeminiLabs\SiteReviews\Database;
6
+ use GeminiLabs\SiteReviews\Helpers\Arr;
7
+ use GeminiLabs\SiteReviews\Helpers\Cast;
8
+ use GeminiLabs\SiteReviews\Modules\Rating;
9
+ use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsSummaryShortcode;
10
+
11
+ class ElementorSummaryWidget extends ElementorWidget
12
+ {
13
+ /**
14
+ * @return string
15
+ */
16
+ public function get_shortcode()
17
+ {
18
+ return SiteReviewsSummaryShortcode::class;
19
+ }
20
+
21
+ public function get_title()
22
+ {
23
+ return _x('Rating Summary', 'admin-text', 'site-reviews');
24
+ }
25
+
26
+ protected function settings_basic()
27
+ {
28
+ $options = [
29
+ 'assigned_posts' => [
30
+ 'default' => '',
31
+ 'label' => _x('Limit Reviews to an Assigned Page', 'admin-text', 'site-reviews'),
32
+ 'label_block' => true,
33
+ 'options' => [
34
+ 'custom' => _x('Assigned to multiple Post IDs', 'admin-text', 'site-reviews'),
35
+ 'post_id' => _x('Assigned to the Current Page', 'admin-text', 'site-reviews'),
36
+ 'parent_id' => _x('Assigned to the Parent Page', 'admin-text', 'site-reviews'),
37
+ ],
38
+ 'type' => \Elementor\Controls_Manager::SELECT2,
39
+ ],
40
+ 'assigned_posts_custom' => [
41
+ 'condition' => ['assigned_posts' => 'custom'],
42
+ 'description' => _x('Separate with commas.', 'admin-text', 'site-reviews'),
43
+ 'label_block' => true,
44
+ 'placeholder' => _x('Enter the Post IDs', 'admin-text', 'site-reviews'),
45
+ 'show_label' => false,
46
+ 'type' => \Elementor\Controls_Manager::TEXT,
47
+ ],
48
+ 'assigned_terms' => [
49
+ 'default' => '',
50
+ 'label' => _x('Limit Reviews to an Assigned Category', 'admin-text', 'site-reviews'),
51
+ 'label_block' => true,
52
+ 'multiple' => true,
53
+ 'options' => glsr(Database::class)->terms(),
54
+ 'type' => \Elementor\Controls_Manager::SELECT2,
55
+ ],
56
+ 'assigned_users' => [
57
+ 'default' => '',
58
+ 'label' => _x('Limit Reviews to an Assigned User', 'admin-text', 'site-reviews'),
59
+ 'label_block' => true,
60
+ 'multiple' => true,
61
+ 'options' => Arr::prepend(glsr(Database::class)->users(), sprintf('- %s -', _x('The Logged-in user', 'admin-text', 'site-reviews')), 'user_id'),
62
+ 'type' => \Elementor\Controls_Manager::SELECT2,
63
+ ],
64
+ 'terms' => [
65
+ 'default' => '',
66
+ 'label' => _x('Limit Reviews to terms', 'admin-text', 'site-reviews'),
67
+ 'label_block' => true,
68
+ 'options' => [
69
+ 'true' => _x('Terms were accepted', 'admin-text', 'site-reviews'),
70
+ 'false' => _x('Terms were not accepted', 'admin-text', 'site-reviews'),
71
+ ],
72
+ 'type' => \Elementor\Controls_Manager::SELECT2,
73
+ ],
74
+ 'type' => $this->get_review_types(),
75
+ 'rating' => [
76
+ 'default' => 0,
77
+ 'label' => _x('Minimum Rating', 'admin-text', 'site-reviews'),
78
+ 'max' => Cast::toInt(glsr()->constant('MAX_RATING', Rating::class)),
79
+ 'min' => Cast::toInt(glsr()->constant('MIN_RATING', Rating::class)),
80
+ 'separator' => 'before',
81
+ 'type' => \Elementor\Controls_Manager::NUMBER,
82
+ ],
83
+ 'schema' => [
84
+ 'description' => _x('The schema should only be enabled once per page.', 'admin-text', 'site-reviews'),
85
+ 'label' => _x('Enable the schema?', 'admin-text', 'site-reviews'),
86
+ 'return_value' => 'true',
87
+ 'separator' => 'before',
88
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
89
+ ],
90
+ ];
91
+ $hideOptions = $this->get_shortcode_instance()->getHideOptions();
92
+ foreach ($hideOptions as $key => $label) {
93
+ $separator = $key === key(array_slice($hideOptions, 0, 1)) ? 'before' : 'default';
94
+ $options['hide-'.$key] = [
95
+ 'label' => $label,
96
+ 'separator' => $separator,
97
+ 'return_value' => 1,
98
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
99
+ ];
100
+ }
101
+ return $options;
102
+ }
103
+ }
plugin/Integrations/Elementor/ElementorWidget.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Integrations\Elementor;
4
+
5
+ use Elementor\Widget_Base;
6
+ use GeminiLabs\SiteReviews\Helpers\Str;
7
+
8
+ abstract class ElementorWidget extends Widget_Base
9
+ {
10
+ /**
11
+ * @var \GeminiLabs\SiteReviews\Shortcodes\Shortcode|callable
12
+ */
13
+ private $_shortcode_instance = null;
14
+
15
+ /**
16
+ * @return array
17
+ */
18
+ public function get_categories()
19
+ {
20
+ return [glsr()->id];
21
+ }
22
+
23
+ /**
24
+ * @return string
25
+ */
26
+ public function get_icon()
27
+ {
28
+ return 'eicon-star-o';
29
+ }
30
+
31
+ /**
32
+ * @return string
33
+ */
34
+ public function get_name()
35
+ {
36
+ return $this->get_shortcode_instance()->shortcode;
37
+ }
38
+
39
+ /**
40
+ * @param string $setting_key
41
+ * @return mixed
42
+ */
43
+ public function get_settings_for_display($setting_key = null)
44
+ {
45
+ $settings = parent::get_settings_for_display();
46
+ if (!empty($settings['assigned_posts_custom'])) {
47
+ $settings['assigned_posts'] = $settings['assigned_posts_custom'];
48
+ }
49
+ $hide = [];
50
+ foreach ($settings as $key => $value) {
51
+ if (Str::startsWith('hide-', $key) && !empty($value)) {
52
+ $hide[] = Str::removePrefix($key, 'hide-');
53
+ }
54
+ }
55
+ $settings['class'] = $settings['shortcode_class']; // @compat
56
+ $settings['hide'] = array_filter($hide);
57
+ $settings['id'] = $settings['shortcode_id']; // @compat
58
+ return $settings;
59
+ }
60
+
61
+ /**
62
+ * @return string
63
+ */
64
+ abstract public function get_shortcode();
65
+
66
+ /**
67
+ * @return \GeminiLabs\SiteReviews\Shortcodes\Shortcode
68
+ */
69
+ public function get_shortcode_instance()
70
+ {
71
+ if (is_null($this->_shortcode_instance)) {
72
+ $this->_shortcode_instance = glsr($this->get_shortcode());
73
+ }
74
+ return $this->_shortcode_instance;
75
+ }
76
+
77
+ protected function get_review_types()
78
+ {
79
+ if (count(glsr()->retrieve('review_types')) > 2) {
80
+ return [
81
+ 'default' => 'local',
82
+ 'label' => _x('Limit the Type of Reviews', 'admin-text', 'site-reviews'),
83
+ 'label_block' => true,
84
+ 'options' => glsr()->retrieve('review_types'),
85
+ 'type' => \Elementor\Controls_Manager::SELECT,
86
+ ];
87
+ }
88
+ return [];
89
+ }
90
+
91
+ /**
92
+ * @return void
93
+ */
94
+ protected function register_controls()
95
+ {
96
+ $shortcode = $this->get_shortcode_instance()->shortcode;
97
+ $settings = array_filter(glsr()->filterArray('integration/elementor/settings', $this->settings_basic(), $shortcode));
98
+ if (!empty($settings)) {
99
+ $this->register_shortcode_options($settings, 'settings', _x('Settings', 'admin-text', 'site-reviews'));
100
+ }
101
+ $advanced = array_filter(glsr()->filterArray('integration/elementor/advanced', $this->settings_advanced(), $shortcode));
102
+ if (!empty($advanced)) {
103
+ $this->register_shortcode_options($advanced, 'advanced', _x('Advanced', 'admin-text', 'site-reviews'));
104
+ }
105
+ }
106
+
107
+ /**
108
+ * @return void
109
+ */
110
+ protected function register_shortcode_options($options, $tabKey, $tabLabel)
111
+ {
112
+ $this->start_controls_section($tabKey, [
113
+ 'label' => $tabLabel,
114
+ 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
115
+ ]);
116
+ foreach ($options as $key => $settings) {
117
+ $this->add_control($key, $settings);
118
+ }
119
+ $this->end_controls_section();
120
+ }
121
+
122
+ protected function render()
123
+ {
124
+ $shortcode = $this->get_shortcode_instance()->build($this->get_settings_for_display());
125
+ $shortcode = str_replace('class="glsr-fallback">', 'class="glsr-fallback" style="display:none;">', $shortcode);
126
+ echo $shortcode;
127
+ }
128
+
129
+ /**
130
+ * @return array
131
+ */
132
+ protected function settings_advanced()
133
+ {
134
+ return [
135
+ 'shortcode_id' => [
136
+ 'label_block' => true,
137
+ 'label' => _x('Custom ID', 'admin-text', 'site-reviews'),
138
+ 'type' => \Elementor\Controls_Manager::TEXT,
139
+ ],
140
+ 'shortcode_class' => [
141
+ 'description' => _x('Separate multiple classes with spaces.', 'admin-text', 'site-reviews'),
142
+ 'label_block' => true,
143
+ 'label' => _x('Additional CSS classes', 'admin-text', 'site-reviews'),
144
+ 'type' => \Elementor\Controls_Manager::TEXT,
145
+ ],
146
+ ];
147
+ }
148
+
149
+ /**
150
+ * @return array
151
+ */
152
+ protected function settings_basic()
153
+ {
154
+ return [];
155
+ }
156
+ }
plugin/Modules/Console.php CHANGED
@@ -281,13 +281,13 @@ class Console
281
  */
282
  protected function reset()
283
  {
284
- if ($this->size() <= wp_convert_hr_to_bytes('256kb')) {
285
  return;
286
  }
287
  $this->clear();
288
  file_put_contents($this->file,
289
  $this->buildLogEntry(static::NOTICE,
290
- _x('Console was automatically cleared (256KB maximum size)', 'admin-text', 'site-reviews')
291
  )
292
  );
293
  }
281
  */
282
  protected function reset()
283
  {
284
+ if ($this->size() <= wp_convert_hr_to_bytes('512kb')) {
285
  return;
286
  }
287
  $this->clear();
288
  file_put_contents($this->file,
289
  $this->buildLogEntry(static::NOTICE,
290
+ _x('Console was automatically cleared (512KB maximum size)', 'admin-text', 'site-reviews')
291
  )
292
  );
293
  }
plugin/Modules/Html/Attributes.php CHANGED
@@ -39,6 +39,10 @@ class Attributes
39
  'for',
40
  ];
41
 
 
 
 
 
42
  const ATTRIBUTES_OPTION = [
43
  'disabled', 'label', 'selected', 'value',
44
  ];
39
  'for',
40
  ];
41
 
42
+ const ATTRIBUTES_OPTGROUP = [
43
+ 'disabled', 'label',
44
+ ];
45
+
46
  const ATTRIBUTES_OPTION = [
47
  'disabled', 'label', 'selected', 'value',
48
  ];
plugin/Modules/Html/Builder.php CHANGED
@@ -46,8 +46,8 @@ class Builder
46
  ];
47
 
48
  const TAGS_TEXT = [
49
- 'a', 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'label', 'li', 'option', 'p', 'pre',
50
- 'small', 'span',
51
  ];
52
 
53
  /**
@@ -301,10 +301,14 @@ class Builder
301
  protected function buildFormSelectOptions()
302
  {
303
  $options = $this->args->cast('options', 'array');
 
304
  if ($this->args->placeholder) {
305
  $options = Arr::prepend($options, $this->args->placeholder, '');
306
  }
307
- return array_reduce(array_keys($options), function ($carry, $key) use ($options) {
 
 
 
308
  return $carry.$this->option([
309
  'selected' => $this->args->cast('value', 'string') === Cast::toString($key),
310
  'text' => $options[$key],
@@ -313,6 +317,24 @@ class Builder
313
  });
314
  }
315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  /**
317
  * @return string|void
318
  */
46
  ];
47
 
48
  const TAGS_TEXT = [
49
+ 'a', 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'label', 'li', 'option', 'optgroup',
50
+ 'p', 'pre', 'small', 'span',
51
  ];
52
 
53
  /**
301
  protected function buildFormSelectOptions()
302
  {
303
  $options = $this->args->cast('options', 'array');
304
+ $optgroupEnabled = glsr()->filterBool('builder/enable/optgroup', false);
305
  if ($this->args->placeholder) {
306
  $options = Arr::prepend($options, $this->args->placeholder, '');
307
  }
308
+ return array_reduce(array_keys($options), function ($carry, $key) use ($options, $optgroupEnabled) {
309
+ if ($optgroupEnabled && is_array($options[$key])) {
310
+ return $carry.$this->buildFormSelectOptGroup($options[$key], $key);
311
+ }
312
  return $carry.$this->option([
313
  'selected' => $this->args->cast('value', 'string') === Cast::toString($key),
314
  'text' => $options[$key],
317
  });
318
  }
319
 
320
+ /**
321
+ * @return string
322
+ */
323
+ protected function buildFormSelectOptGroup($options, $label)
324
+ {
325
+ $children = array_reduce(array_keys($options), function ($carry, $key) use ($options) {
326
+ return $carry.glsr(Builder::class)->option([
327
+ 'selected' => $this->args->cast('value', 'string') === Cast::toString($key),
328
+ 'text' => $options[$key],
329
+ 'value' => $key,
330
+ ]);
331
+ });
332
+ return glsr(Builder::class)->optgroup([
333
+ 'label' => $label,
334
+ 'text' => $children,
335
+ ]);
336
+ }
337
+
338
  /**
339
  * @return string|void
340
  */
plugin/Modules/Html/Fields/Button.php CHANGED
@@ -4,13 +4,4 @@ namespace GeminiLabs\SiteReviews\Modules\Html\Fields;
4
 
5
  class Button extends Field
6
  {
7
- /**
8
- * {@inheritdoc}
9
- */
10
- public static function defaults($fieldLocation = null)
11
- {
12
- return [
13
- 'class' => 'button',
14
- ];
15
- }
16
  }
4
 
5
  class Button extends Field
6
  {
 
 
 
 
 
 
 
 
 
7
  }
plugin/Modules/Html/ReviewHtml.php CHANGED
@@ -8,6 +8,16 @@ use GeminiLabs\SiteReviews\Helpers\Arr;
8
  use GeminiLabs\SiteReviews\Helpers\Cast;
9
  use GeminiLabs\SiteReviews\Review;
10
 
 
 
 
 
 
 
 
 
 
 
11
  class ReviewHtml extends \ArrayObject
12
  {
13
  /**
@@ -55,6 +65,12 @@ class ReviewHtml extends \ArrayObject
55
  {
56
  glsr()->action('review/build/before', $review, $this);
57
  $templateTags = [];
 
 
 
 
 
 
58
  foreach ($review as $key => $value) {
59
  $tag = $this->normalizeTemplateTag($key);
60
  $templateTags[$tag] = $this->buildTemplateTag($review, $tag, $value);
8
  use GeminiLabs\SiteReviews\Helpers\Cast;
9
  use GeminiLabs\SiteReviews\Review;
10
 
11
+ /**
12
+ * @property string $avatar
13
+ * @property string $content
14
+ * @property string $date
15
+ * @property string $author
16
+ * @property int $rating
17
+ * @property string $response
18
+ * @property string $title
19
+ * etc.
20
+ */
21
  class ReviewHtml extends \ArrayObject
22
  {
23
  /**
65
  {
66
  glsr()->action('review/build/before', $review, $this);
67
  $templateTags = [];
68
+ $assignedTag = array_filter([
69
+ 'assigned_posts' => $review->assigned_posts,
70
+ 'assigned_terms' => $review->assigned_terms,
71
+ 'assigned_users' => $review->assigned_users,
72
+ ]);
73
+ $templateTags['assigned'] = json_encode($assignedTag);
74
  foreach ($review as $key => $value) {
75
  $tag = $this->normalizeTemplateTag($key);
76
  $templateTags[$tag] = $this->buildTemplateTag($review, $tag, $value);
plugin/Modules/Html/Tags/ReviewResponseTag.php CHANGED
@@ -12,7 +12,8 @@ class ReviewResponseTag extends ReviewContentTag
12
  protected function handle($value = null)
13
  {
14
  if (!$this->isHidden() && !empty(trim($value))) {
15
- $title = sprintf(__('Response from %s', 'site-reviews'), get_bloginfo('name'));
 
16
  $text = $this->normalizeText($value);
17
  $response = glsr(Builder::class)->div([
18
  'class' => 'glsr-review-response-inner',
12
  protected function handle($value = null)
13
  {
14
  if (!$this->isHidden() && !empty(trim($value))) {
15
+ $responseBy = glsr()->filterString('review/build/tag/response/by', get_bloginfo('name'), $this->review);
16
+ $title = sprintf(__('Response from %s', 'site-reviews'), $responseBy);
17
  $text = $this->normalizeText($value);
18
  $response = glsr(Builder::class)->div([
19
  'class' => 'glsr-review-response-inner',
plugin/Modules/Html/Tags/Tag.php CHANGED
@@ -55,6 +55,9 @@ abstract class Tag implements TagContract
55
  */
56
  public function isEnabled($path)
57
  {
 
 
 
58
  return Cast::toBool(glsr_get_option($path, true));
59
  }
60
 
55
  */
56
  public function isEnabled($path)
57
  {
58
+ if (glsr()->retrieveAs('bool', 'api', false)) {
59
+ return true;
60
+ }
61
  return Cast::toBool(glsr_get_option($path, true));
62
  }
63
 
plugin/Modules/Migrations/Migrate_5_11_0.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Modules\Migrations;
4
+
5
+ use GeminiLabs\SiteReviews\Role;
6
+
7
+ class Migrate_5_11_0
8
+ {
9
+ /**
10
+ * @return bool
11
+ */
12
+ public function run()
13
+ {
14
+ return $this->migrateRoles();
15
+ }
16
+
17
+ /**
18
+ * @return bool
19
+ */
20
+ protected function migrateRoles()
21
+ {
22
+ $roles = glsr(Role::class)->roles();
23
+ $newCapabilities = ['create_posts', 'respond_to_posts', 'respond_to_others_posts'];
24
+ foreach ($roles as $role => $capabilities) {
25
+ foreach ($newCapabilities as $capability) {
26
+ if (in_array($capability, $capabilities)) {
27
+ get_role($role)->add_cap(glsr(Role::class)->capability($capability));
28
+ }
29
+ }
30
+ }
31
+ return true;
32
+ }
33
+ }
plugin/Modules/Migrations/Migrate_5_9_0.php CHANGED
@@ -24,8 +24,8 @@ class Migrate_5_9_0
24
  ADD terms tinyint(1) NOT NULL DEFAULT '1'
25
  AFTER url
26
  "));
27
- if ($this->isDatabaseVersionUpdated()) {
28
- return true;
29
  }
30
  glsr_log()->error(sprintf('Database table [%s] could not be altered, column [terms] not added.', $table));
31
  return false;
24
  ADD terms tinyint(1) NOT NULL DEFAULT '1'
25
  AFTER url
26
  "));
27
+ if ($this->isDatabaseVersionUpdated()) { // @phpstan-ignore-line
28
+ return true; // check again after updating the database
29
  }
30
  glsr_log()->error(sprintf('Database table [%s] could not be altered, column [terms] not added.', $table));
31
  return false;
plugin/Modules/Notice.php CHANGED
@@ -113,6 +113,7 @@ class Notice
113
  if (!in_array($args['type'], ['error', 'warning', 'success'])) {
114
  $args['type'] = 'success';
115
  }
 
116
  $args['messages'] = is_wp_error($args['message'])
117
  ? (array) $args['message']->get_error_message()
118
  : (array) $args['message'];
113
  if (!in_array($args['type'], ['error', 'warning', 'success'])) {
114
  $args['type'] = 'success';
115
  }
116
+ // @phpstan-ignore-next-line
117
  $args['messages'] = is_wp_error($args['message'])
118
  ? (array) $args['message']->get_error_message()
119
  : (array) $args['message'];
plugin/Modules/Rating.php CHANGED
@@ -39,7 +39,7 @@ class Rating
39
  /**
40
  * @var int
41
  */
42
- const MIN_RATING = 1;
43
 
44
  /**
45
  * @param int $roundBy
39
  /**
40
  * @var int
41
  */
42
+ const MIN_RATING = 0;
43
 
44
  /**
45
  * @param int $roundBy
plugin/Modules/Sanitizer.php CHANGED
@@ -78,15 +78,16 @@ class Sanitizer
78
  /**
79
  * If date is invalid then return an empty string.
80
  * @param mixed $value
 
81
  * @return string
82
  */
83
- public function sanitizeDate($value)
84
  {
85
  $date = strtotime(Cast::toString($value));
86
  if (false !== $date) {
87
  return wp_date('Y-m-d H:i:s', $date);
88
  }
89
- return '';
90
  }
91
 
92
  /**
78
  /**
79
  * If date is invalid then return an empty string.
80
  * @param mixed $value
81
+ * @param string $fallback
82
  * @return string
83
  */
84
+ public function sanitizeDate($value, $fallback = '')
85
  {
86
  $date = strtotime(Cast::toString($value));
87
  if (false !== $date) {
88
  return wp_date('Y-m-d H:i:s', $date);
89
  }
90
+ return $fallback;
91
  }
92
 
93
  /**
plugin/Overrides/ReviewsListTable.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GeminiLabs\SiteReviews\Overrides;
4
+
5
+ use GeminiLabs\SiteReviews\Database;
6
+ use GeminiLabs\SiteReviews\Helpers\Cast;
7
+
8
+ class ReviewsListTable extends \WP_Posts_List_Table
9
+ {
10
+ /**
11
+ * @param \WP_Post $post
12
+ * @return void
13
+ */
14
+ public function column_cb($post)
15
+ {
16
+ parent::column_cb($post);
17
+ if (!glsr()->can('edit_post', $post->ID) && glsr()->can('respond_to_post', $post->ID)) {
18
+ glsr()->render('partials/screen/locked-indicator');
19
+ }
20
+ }
21
+
22
+ /**
23
+ * @param \WP_Post $post
24
+ * @return void
25
+ */
26
+ public function column_title($post)
27
+ {
28
+ if (glsr()->can('respond_to_post', $post->ID)) {
29
+ $this->renderInlineData($post);
30
+ $this->renderLockedInfo($post);
31
+ }
32
+ parent::column_title($post);
33
+ }
34
+
35
+ /**
36
+ * @return void
37
+ */
38
+ public function inline_edit()
39
+ {
40
+ glsr()->render('partials/screen/inline-edit', [
41
+ 'columns' => $this->get_column_count(),
42
+ 'screenId' => esc_attr($this->screen->id),
43
+ ]);
44
+ }
45
+
46
+ /**
47
+ * @return void
48
+ */
49
+ protected function renderInlineData(\WP_Post $post)
50
+ {
51
+ $response = Cast::toString(glsr(Database::class)->meta($post->ID, 'response'));
52
+ glsr()->render('partials/screen/inline-data', [
53
+ 'content' => esc_textarea(trim($post->post_content)),
54
+ 'postId' => $post->ID,
55
+ 'response' => esc_textarea(trim($response)),
56
+ ]);
57
+ }
58
+
59
+ /**
60
+ * @return void
61
+ */
62
+ protected function renderLockedInfo(\WP_Post $post)
63
+ {
64
+ if ('trash' !== $post->post_status) {
65
+ $lockHolder = wp_check_post_lock($post->ID);
66
+ if (false !== $lockHolder) {
67
+ $lockHolder = get_userdata($lockHolder);
68
+ $lockedAvatar = get_avatar($lockHolder->ID, 18);
69
+ $lockedText = esc_html(sprintf(_x('%s is currently editing', 'admin-text', 'site-reviews'), $lockHolder->display_name));
70
+ } else {
71
+ $lockedAvatar = '';
72
+ $lockedText = '';
73
+ }
74
+ glsr()->render('partials/screen/locked-info', [
75
+ 'lockedAvatar' => $lockedAvatar,
76
+ 'lockedText' => $lockedText,
77
+ ]);
78
+ }
79
+ }
80
+ }
plugin/Review.php CHANGED
@@ -17,7 +17,7 @@ use GeminiLabs\SiteReviews\Modules\Html\ReviewHtml;
17
  * @property array $assigned_users
18
  * @property string $author
19
  * @property int $author_id
20
- * @property string $avatar;
21
  * @property string $content
22
  * @property Arguments $custom
23
  * @property string $date
@@ -54,11 +54,6 @@ class Review extends Arguments
54
  */
55
  protected $_post;
56
 
57
- /**
58
- * @var object
59
- */
60
- protected $_review;
61
-
62
  /**
63
  * @var bool
64
  */
@@ -77,6 +72,7 @@ class Review extends Arguments
77
  $values = glsr()->args($values);
78
  $this->id = Cast::toInt($values->review_id);
79
  $args = glsr(ReviewDefaults::class)->restrict($values->toArray());
 
80
  $args['custom'] = $this->custom();
81
  $args['ID'] = $this->id;
82
  $args['response'] = $this->meta()->_response;
@@ -193,8 +189,7 @@ class Review extends Arguments
193
  {
194
  $postId = Helper::getPostId($post);
195
  return static::isReview($postId)
196
- && post_type_supports(glsr()->post_type, 'title')
197
- && 'local' === glsr(Query::class)->review($postId)->type;
198
  }
199
 
200
  /**
17
  * @property array $assigned_users
18
  * @property string $author
19
  * @property int $author_id
20
+ * @property string $avatar
21
  * @property string $content
22
  * @property Arguments $custom
23
  * @property string $date
54
  */
55
  protected $_post;
56
 
 
 
 
 
 
57
  /**
58
  * @var bool
59
  */
72
  $values = glsr()->args($values);
73
  $this->id = Cast::toInt($values->review_id);
74
  $args = glsr(ReviewDefaults::class)->restrict($values->toArray());
75
+ $args['avatar'] = glsr(Avatar::class)->url($values->avatar);
76
  $args['custom'] = $this->custom();
77
  $args['ID'] = $this->id;
78
  $args['response'] = $this->meta()->_response;
189
  {
190
  $postId = Helper::getPostId($post);
191
  return static::isReview($postId)
192
+ && in_array(glsr(Query::class)->review($postId)->type, ['', 'local']);
 
193
  }
194
 
195
  /**
plugin/Role.php CHANGED
@@ -10,25 +10,60 @@ class Role
10
  */
11
  public function addCapabilities($role)
12
  {
13
- $roleCapabilities = $this->roleCapabilities();
14
  $wpRole = get_role($role);
15
- if (empty($wpRole) || !array_key_exists($role, $roleCapabilities)) {
16
  return;
17
  }
18
- foreach ($roleCapabilities[$role] as $capability) {
19
- $wpRole->add_cap($this->normalizeCapability($capability));
20
  }
21
  }
22
 
23
  /**
24
  * @param string $capability
 
25
  * @return bool
26
  */
27
- public function can($capability)
28
  {
29
  return in_array($capability, $this->capabilities())
30
- ? current_user_can($this->normalizeCapability($capability))
31
- : current_user_can($capability);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /**
@@ -36,7 +71,7 @@ class Role
36
  */
37
  public function hardResetAll()
38
  {
39
- $roles = array_keys($this->roleCapabilities());
40
  array_walk($roles, [$this, 'removeCapabilities']);
41
  array_walk($roles, [$this, 'addCapabilities']);
42
  }
@@ -52,7 +87,7 @@ class Role
52
  return;
53
  }
54
  foreach ($this->capabilities() as $capability) {
55
- $wpRole->remove_cap($this->normalizeCapability($capability));
56
  }
57
  }
58
 
@@ -61,48 +96,18 @@ class Role
61
  */
62
  public function resetAll()
63
  {
64
- $roles = array_keys($this->roleCapabilities());
65
  array_walk($roles, [$this, 'addCapabilities']);
66
  }
67
 
68
  /**
69
  * @return array
70
  */
71
- protected function capabilities()
72
- {
73
- return [
74
- 'delete_others_posts',
75
- 'delete_post',
76
- 'delete_posts',
77
- 'delete_private_posts',
78
- 'delete_published_posts',
79
- 'edit_others_posts',
80
- 'edit_post',
81
- 'edit_posts',
82
- 'edit_private_posts',
83
- 'edit_published_posts',
84
- 'publish_posts',
85
- 'read_post',
86
- 'read_private_posts',
87
- ];
88
- }
89
-
90
- /**
91
- * @param string $capability
92
- * @return string
93
- */
94
- protected function normalizeCapability($capability)
95
- {
96
- return str_replace('post', glsr()->post_type, $capability);
97
- }
98
-
99
- /**
100
- * @return array
101
- */
102
- protected function roleCapabilities()
103
  {
104
  return [
105
  'administrator' => [
 
106
  'delete_others_posts',
107
  'delete_posts',
108
  'delete_private_posts',
@@ -113,8 +118,11 @@ class Role
113
  'edit_published_posts',
114
  'publish_posts',
115
  'read_private_posts',
 
 
116
  ],
117
  'editor' => [
 
118
  'delete_others_posts',
119
  'delete_posts',
120
  'delete_private_posts',
@@ -125,17 +133,22 @@ class Role
125
  'edit_published_posts',
126
  'publish_posts',
127
  'read_private_posts',
 
 
128
  ],
129
  'author' => [
 
130
  'delete_posts',
131
  'delete_published_posts',
132
  'edit_posts',
133
  'edit_published_posts',
134
  'publish_posts',
 
135
  ],
136
  'contributor' => [
137
  'delete_posts',
138
  'edit_posts',
 
139
  ],
140
  ];
141
  }
10
  */
11
  public function addCapabilities($role)
12
  {
13
+ $roles = $this->roles();
14
  $wpRole = get_role($role);
15
+ if (empty($wpRole) || !array_key_exists($role, $roles)) {
16
  return;
17
  }
18
+ foreach ($roles[$role] as $capability) {
19
+ $wpRole->add_cap($this->capability($capability));
20
  }
21
  }
22
 
23
  /**
24
  * @param string $capability
25
+ * @param mixed ...$args
26
  * @return bool
27
  */
28
+ public function can($capability, ...$args)
29
  {
30
  return in_array($capability, $this->capabilities())
31
+ ? current_user_can($this->capability($capability), ...$args)
32
+ : current_user_can($capability, ...$args);
33
+ }
34
+
35
+ /**
36
+ * @return array
37
+ */
38
+ public function capabilities()
39
+ {
40
+ return [
41
+ 'create_posts',
42
+ 'delete_others_posts',
43
+ 'delete_post',
44
+ 'delete_posts',
45
+ 'delete_private_posts',
46
+ 'delete_published_posts',
47
+ 'edit_others_posts',
48
+ 'edit_post',
49
+ 'edit_posts',
50
+ 'edit_private_posts',
51
+ 'edit_published_posts',
52
+ 'publish_posts',
53
+ 'read_post',
54
+ 'read_private_posts',
55
+ 'respond_to_others_posts',
56
+ 'respond_to_posts',
57
+ ];
58
+ }
59
+
60
+ /**
61
+ * @param string $capability
62
+ * @return string
63
+ */
64
+ public function capability($capability)
65
+ {
66
+ return str_replace('post', glsr()->post_type, $capability);
67
  }
68
 
69
  /**
71
  */
72
  public function hardResetAll()
73
  {
74
+ $roles = array_keys($this->roles());
75
  array_walk($roles, [$this, 'removeCapabilities']);
76
  array_walk($roles, [$this, 'addCapabilities']);
77
  }
87
  return;
88
  }
89
  foreach ($this->capabilities() as $capability) {
90
+ $wpRole->remove_cap($this->capability($capability));
91
  }
92
  }
93
 
96
  */
97
  public function resetAll()
98
  {
99
+ $roles = array_keys($this->roles());
100
  array_walk($roles, [$this, 'addCapabilities']);
101
  }
102
 
103
  /**
104
  * @return array
105
  */
106
+ public function roles()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  {
108
  return [
109
  'administrator' => [
110
+ 'create_posts',
111
  'delete_others_posts',
112
  'delete_posts',
113
  'delete_private_posts',
118
  'edit_published_posts',
119
  'publish_posts',
120
  'read_private_posts',
121
+ 'respond_to_others_posts',
122
+ 'respond_to_posts',
123
  ],
124
  'editor' => [
125
+ 'create_posts',
126
  'delete_others_posts',
127
  'delete_posts',
128
  'delete_private_posts',
133
  'edit_published_posts',
134
  'publish_posts',
135
  'read_private_posts',
136
+ 'respond_to_others_posts',
137
+ 'respond_to_posts',
138
  ],
139
  'author' => [
140
+ 'create_posts',
141
  'delete_posts',
142
  'delete_published_posts',
143
  'edit_posts',
144
  'edit_published_posts',
145
  'publish_posts',
146
+ 'respond_to_posts',
147
  ],
148
  'contributor' => [
149
  'delete_posts',
150
  'edit_posts',
151
+ 'respond_to_posts',
152
  ],
153
  ];
154
  }
plugin/Tinymce/TinymceGenerator.php CHANGED
@@ -288,9 +288,11 @@ abstract class TinymceGenerator
288
  'name' => false,
289
  'required' => false,
290
  ], $field);
 
291
  if (!$args['name']) {
292
  return false;
293
  }
 
294
  return $this->validateErrors($args) && $this->validateRequired($args);
295
  }
296
 
288
  'name' => false,
289
  'required' => false,
290
  ], $field);
291
+ // @phpstan-ignore-next-line
292
  if (!$args['name']) {
293
  return false;
294
  }
295
+ // @phpstan-ignore-next-line
296
  return $this->validateErrors($args) && $this->validateRequired($args);
297
  }
298
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, woocommerce, product reviews
5
  Tested up to: 5.7
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 5.10.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -35,6 +35,7 @@ __Site Reviews provides full Woocommerce integration__ with the free [Woocommerc
35
  - __Developer Friendly__: Designed for WordPress developers with over 100 hooks and convenient functions
36
  - __Documentation__: FAQ and documenation for hooks and all shortcodes and functions
37
  - __Editor Blocks__: Use the custom editor blocks in the Gutenberg editor
 
38
  - __Form Styles__: Match the review form with popular themes and form plugins
39
  - __Import Third-Party Reviews__: Includes a built-in CSV importer
40
  - __JSON-LD Schema__: Display your reviews and ratings in search results
@@ -48,6 +49,7 @@ __Site Reviews provides full Woocommerce integration__ with the free [Woocommerc
48
  - __Rating Summaries__: Display a summary of your review ratings from high to low.
49
  - __Relative Dates__: You decide the date format that is displayed in your reviews
50
  - __Responses__: Write responses to your reviews
 
51
  - __Restrictions__: Require approval before publishing reviews and limit review submissions by email address, IP address, or username
52
  - __Shortcodes__: Configurable shortcodes complete with full documentation
53
  - __Slack Integration__: Receive notifications in Slack when a review is submitted
@@ -135,6 +137,21 @@ All documentation can be found in the "Help" page of the plugin. If your questio
135
 
136
  ## Changelog
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  = 5.10.4 (2021-05-03) =
139
 
140
  - Fixed date validation in the "Import Third Party Reviews" tool
5
  Tested up to: 5.7
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 5.11.0
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
35
  - __Developer Friendly__: Designed for WordPress developers with over 100 hooks and convenient functions
36
  - __Documentation__: FAQ and documenation for hooks and all shortcodes and functions
37
  - __Editor Blocks__: Use the custom editor blocks in the Gutenberg editor
38
+ - __Elementor Support__: Use the native Elementor Widgets in the Elementor editor
39
  - __Form Styles__: Match the review form with popular themes and form plugins
40
  - __Import Third-Party Reviews__: Includes a built-in CSV importer
41
  - __JSON-LD Schema__: Display your reviews and ratings in search results
49
  - __Rating Summaries__: Display a summary of your review ratings from high to low.
50
  - __Relative Dates__: You decide the date format that is displayed in your reviews
51
  - __Responses__: Write responses to your reviews
52
+ - __REST API__: Access your reviews from remote websites and applications using the API.
53
  - __Restrictions__: Require approval before publishing reviews and limit review submissions by email address, IP address, or username
54
  - __Shortcodes__: Configurable shortcodes complete with full documentation
55
  - __Slack Integration__: Receive notifications in Slack when a review is submitted
137
 
138
  ## Changelog
139
 
140
+ = 5.11.0 (2021-06-01) =
141
+
142
+ - Added a REST API (see the provided documentation to learn how to use it)
143
+ - Added custom capabilities for responding to reviews (`respond_to_site-review` and `respond_to_others_site-review`)
144
+ - Added filters for categories, assigned posts, and assigned users on the "All Reviews" admin page (enable them in the "Screen Options" on the top-right of the page)
145
+ - Added native Elementor widgets
146
+ - Added support for <optgroup> in dropdown fields (this may be useful when using the Review Forms add-on to display a category dropdown with parent/child categories). To learn how to enable this, please see the FAQ Help page.
147
+ - Added the `glsr_update_review` helper function (see the provided documentation to learn how to use it)
148
+ - Added the ability to create reviews from the admin
149
+ - Added the ability to respond to reviews from the "All Reviews" page
150
+ - Added the `site-reviews/review/build/tag/response/by` hook (see the FAQ to learn how to use it to change the name in the response)
151
+ - Fixed inline styles (overriding the star images should now display correctly in the block editor)
152
+ - Fixed summary review counts for 0-star ratings
153
+ - Fixed the star rating when resetting the submission form where a default rating is set
154
+
155
  = 5.10.4 (2021-05-03) =
156
 
157
  - Fixed date validation in the "Import Third Party Reviews" tool
site-reviews.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
- * Version: 5.10.4
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
+ * Version: 5.11.0
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
templates/review.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php defined('ABSPATH') || die; ?>
2
 
3
- <div class="glsr-review" id="review-{{ review_id }}">
4
  {{ title }}
5
  {{ rating }}
6
  {{ date }}
1
  <?php defined('ABSPATH') || die; ?>
2
 
3
+ <div class="glsr-review" id="review-{{ review_id }}" data-assigned='{{ assigned }}'>
4
  {{ title }}
5
  {{ rating }}
6
  {{ date }}
views/pages/documentation/api.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php defined('ABSPATH') || die;
2
+
3
+ $sections = [
4
+ trailingslashit(__DIR__).'api/authentication.php',
5
+ trailingslashit(__DIR__).'api/categories.php',
6
+ trailingslashit(__DIR__).'api/reviews.php',
7
+ trailingslashit(__DIR__).'api/summary.php',
8
+ ];
9
+ $filename = pathinfo(__FILE__, PATHINFO_FILENAME);
10
+ $sections = glsr()->filterArrayUnique('documentation/'.$filename, $sections);
11
+ foreach ($sections as $section) {
12
+ include $section;
13
+ }
14
+
views/pages/documentation/api/authentication.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="api-authentication">
4
+ <span class="title">Authentication</span>
5
+ <span class="badge important code">Important</span>
6
+ <span class="icon"></span>
7
+ </button>
8
+ </h3>
9
+ <div id="api-authentication" class="inside">
10
+ <p>The Site Reviews API requires authentication in order to access the endpoints. You may use the built-in Application Password feature of WordPress together with a <a href="https://ec.haxx.se/http/http-auth">Basic Auth</a> authentication flow. Application Passwords are specific the the user; they cannot be used for traditional logins to your website and they can be revoked at any time.</p>
11
+ <p>To learn more about Application Passwords, please see the <a href="https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/">Application Passwords: Integration Guide</a>.</p>
12
+
13
+ <h3>Getting Credentials</h3>
14
+ <p>From the Edit User page, you can generate new, and view or revoke existing Application Passwords.</p>
15
+ <p>Application passwords can be used with or without the spaces — if included, spaces will just be stripped out before the password is hashed and verified.
16
+
17
+ <h3>Using Credentials</h3>
18
+ <p>The credentials can be passed along to REST API requests served over <code>https://</code> using <a href="https://ec.haxx.se/http/http-auth">Basic Auth</a> / <a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>, which is nearly ubiquitous in its availability — <a href="https://ec.haxx.se/http/http-auth">here’s the documentation for how to use it with cURL</a>.</p>
19
+ <p>For a simple command-line script example, swap out USERNAME, PASSWORD, and HOSTNAME with their respective values (where PASSWORD is the user's generated Application Password):</p>
20
+ <pre><code class="language-bash">curl --user "USERNAME:PASSWORD" https://HOSTNAME/wp-json/site-reviews/v1/reviews</code></pre>
21
+
22
+ <h3>Other Authentication Methods</h3>
23
+ <p>Since the Site Reviews API is built on top of the WordPress REST API, you should be able to use any plugin which provides alternative modes of authentication that work from remote applications. Some example plugins are <a href="https://wordpress.org/plugins/rest-api-oauth1/">OAuth 1.0a Server</a> and <a href="https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/">JSON Web Tokens</a>.</p>
24
+ </div>
25
+ </div>
views/pages/documentation/api/categories.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="api-categories">
4
+ <span class="title">Categories</span>
5
+ <span class="badge code">/site-reviews/v1/categories</span>
6
+ <span class="icon"></span>
7
+ </button>
8
+ </h3>
9
+ <div id="api-categories" class="inside">
10
+ <h3>Schema</h3>
11
+ <p>The schema defines all the fields that exist within a category record. Any response from these endpoints can be expected to contain the fields below unless the <code>_fields</code> query parameter is used or the schema field only appears in a specific context.</p>
12
+ <div class="glsr-responsive-table">
13
+ <table class="wp-list-table widefat striped">
14
+ <thead>
15
+ <tr>
16
+ <th scope="col"><strong>Field</strong></th>
17
+ <th scope="col"><strong>Type</strong></th>
18
+ <th scope="col"><strong>Context</strong></th>
19
+ <th scope="col"><strong>Description</strong></th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <tr>
24
+ <td><strong>count</strong></td>
25
+ <td>integer</td>
26
+ <td>view, edit</td>
27
+ <td>Number of published reviews for the term. (read only)</td>
28
+ </tr>
29
+ <tr>
30
+ <td><strong>description</strong></td>
31
+ <td>string</td>
32
+ <td>view, edit</td>
33
+ <td>HTML description of the term.</td>
34
+ </tr>
35
+ <tr>
36
+ <td><strong>id</strong></td>
37
+ <td>integer</td>
38
+ <td>view, edit</td>
39
+ <td>Unique identifier for the term. (read only)</td>
40
+ </tr>
41
+ <tr>
42
+ <td><strong>meta</strong></td>
43
+ <td>object</td>
44
+ <td>view, edit</td>
45
+ <td>Meta fields.</td>
46
+ </tr>
47
+ <tr>
48
+ <td><strong>name</strong></td>
49
+ <td>string</td>
50
+ <td>view, edit</td>
51
+ <td>HTML title for the term.</td>
52
+ </tr>
53
+ <tr>
54
+ <td><strong>slug</strong></td>
55
+ <td>string</td>
56
+ <td>view, edit</td>
57
+ <td>An alphanumeric identifier for the term unique to its type.</td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+ </div>
62
+
63
+ <h3>Global Parameters</h3>
64
+ <p>To instruct Site Reviews to return only a subset of the fields in a response, you may use the <code>_fields</code> query parameter. If for example you only need the ID and name for a collection of categories, you can restrict the response to only those properties with this fields query:</p>
65
+ <pre><code class="language-bash">/site-reviews/v1/categories?_fields=id,name</code></pre>
66
+
67
+ <h3>List Categories</h3>
68
+ <p>Query this endpoint to retrieve a collection of review categories. The response you receive can be controlled and filtered using the URL query parameters below.</p>
69
+ <h4>Arguments</h4>
70
+ <div class="glsr-responsive-table">
71
+ <table class="wp-list-table widefat striped">
72
+ <thead>
73
+ <tr>
74
+ <th scope="col"><strong>Parameter</strong></th>
75
+ <th scope="col"><strong>Default</strong></th>
76
+ <th scope="col"><strong>Description</strong></th>
77
+ </tr>
78
+ </thead>
79
+ <tbody>
80
+ <tr>
81
+ <td><strong>context</strong></td>
82
+ <td>view</td>
83
+ <td>Scope under which the request is made; determines fields present in response. One of: <code>view</code>, <code>edit</code></td>
84
+ </tr>
85
+ <tr>
86
+ <td><strong>exclude</strong></td>
87
+ <td></td>
88
+ <td>Ensure result set excludes specific IDs.</td>
89
+ </tr>
90
+ <tr>
91
+ <td><strong>hide_empty</strong></td>
92
+ <td></td>
93
+ <td>Whether to hide terms not assigned to any reviews.</td>
94
+ </tr>
95
+ <tr>
96
+ <td><strong>include</strong></td>
97
+ <td></td>
98
+ <td>Limit result set to specific IDs.</td>
99
+ </tr>
100
+ <tr>
101
+ <td><strong>order</strong></td>
102
+ <td>asc</td>
103
+ <td>Order sort attribute ascending or descending. One of: <code>asc</code>, <code>desc</code></td>
104
+ </tr>
105
+ <tr>
106
+ <td><strong>orderby</strong></td>
107
+ <td>name</td>
108
+ <td>Sort collection by term attribute. One of: <code>id</code>, <code>include</code>, <code>name</code>, <code>slug</code>, <code>include_slugs</code>, <code>term_group</code>, <code>description</code>, <code>count</code></td>
109
+ </tr>
110
+ <tr>
111
+ <td><strong>page</strong></td>
112
+ <td>1</td>
113
+ <td>Current page of the collection.</td>
114
+ </tr>
115
+ <tr>
116
+ <td><strong>per_page</strong></td>
117
+ <td>10</td>
118
+ <td>Maximum number of items to be returned in result set.</td>
119
+ </tr>
120
+ <tr>
121
+ <td><strong>post</strong></td>
122
+ <td></td>
123
+ <td>Limit result set to terms assigned to a specific review Post ID.</td>
124
+ </tr>
125
+ <tr>
126
+ <td><strong>search</strong></td>
127
+ <td></td>
128
+ <td>Limit results to those matching a string.</td>
129
+ </tr>
130
+ <tr>
131
+ <td><strong>slug</strong></td>
132
+ <td></td>
133
+ <td>Limit result set to terms with one or more specific slugs.</td>
134
+ </tr>
135
+ </tbody>
136
+ </table>
137
+ </div>
138
+ <h4>Definition</h4>
139
+ <pre><code class="language-bash">GET /site-reviews/v1/categories</code></pre>
140
+ <h4>Example Request</h4>
141
+ <pre><code class="language-bash">curl https://example.com/wp-json/site-reviews/v1/categories</code></pre>
142
+
143
+ <h3>Retrieve a Category</h3>
144
+ <p>Query this endpoint to retrieve a review category.</p>
145
+ <h4>Definition</h4>
146
+ <pre><code class="language-bash">GET /site-reviews/v1/categories/&lt;id&gt;</code></pre>
147
+ <h4>Example Request</h4>
148
+ <pre><code class="language-bash">curl https://example.com/wp-json/site-reviews/v1/categories/&lt;id&gt;</code></pre>
149
+
150
+ <h3>Create a Category</h3>
151
+ <p>Query this endpoint to create a review category.</p>
152
+ <h4>Arguments</h4>
153
+ <div class="glsr-responsive-table">
154
+ <table class="wp-list-table widefat striped">
155
+ <thead>
156
+ <tr>
157
+ <th scope="col"><strong>Parameter</strong></th>
158
+ <th scope="col"><strong>Description</strong></th>
159
+ </tr>
160
+ </thead>
161
+ <tbody>
162
+ <tr>
163
+ <td><strong>description</strong></td>
164
+ <td>HTML description of the term.</td>
165
+ </tr>
166
+ <tr>
167
+ <td><strong>meta</strong></td>
168
+ <td>Meta fields.</td>
169
+ </tr>
170
+ <tr>
171
+ <td><strong>name</strong></td>
172
+ <td>HTML title for the term. (required)</td>
173
+ </tr>
174
+ <tr>
175
+ <td><strong>slug</strong></td>
176
+ <td>An alphanumeric identifier for the term unique to its type.</td>
177
+ </tr>
178
+ </tbody>
179
+ </table>
180
+ </div>
181
+ <h4>Definition</h4>
182
+ <pre><code class="language-bash">POST /site-reviews/v1/categories</code></pre>
183
+ <h4>Example Request</h4>
184
+ <pre><code class="language-bash">curl -X POST https://example.com/wp-json/site-reviews/v1/categories -d '{"name":"My Name"}'</code></pre>
185
+
186
+ <h3>Update a Category</h3>
187
+ <p>Query this endpoint to update a review category.</p>
188
+ <h4>Arguments</h4>
189
+ <div class="glsr-responsive-table">
190
+ <table class="wp-list-table widefat striped">
191
+ <thead>
192
+ <tr>
193
+ <th scope="col"><strong>Parameter</strong></th>
194
+ <th scope="col"><strong>Description</strong></th>
195
+ </tr>
196
+ </thead>
197
+ <tbody>
198
+ <tr>
199
+ <td><strong>description</strong></td>
200
+ <td>HTML description of the term.</td>
201
+ </tr>
202
+ <tr>
203
+ <td><strong>meta</strong></td>
204
+ <td>Meta fields.</td>
205
+ </tr>
206
+ <tr>
207
+ <td><strong>name</strong></td>
208
+ <td>HTML title for the term.</td>
209
+ </tr>
210
+ <tr>
211
+ <td><strong>slug</strong></td>
212
+ <td>An alphanumeric identifier for the term unique to its type.</td>
213
+ </tr>
214
+ </tbody>
215
+ </table>
216
+ </div>
217
+ <h4>Definition</h4>
218
+ <pre><code class="language-bash">POST /site-reviews/v1/categories/&lt;id&gt;</code></pre>
219
+ <h4>Example Request</h4>
220
+ <pre><code class="language-bash">curl -X POST https://example.com/wp-json/site-reviews/v1/categories/&lt;id&gt; -d '{"name":"My New Name"}'</code></pre>
221
+
222
+ <h3>Delete a Category</h3>
223
+ <p>Query this endpoint to delete a review category.</p>
224
+ <h4>Definition</h4>
225
+ <pre><code class="language-bash">DELETE /site-reviews/v1/categories/&lt;id&gt;</code></pre>
226
+ <h4>Example Request</h4>
227
+ <pre><code class="language-bash">curl -X DELETE https://example.com/wp-json/site-reviews/v1/categories/&lt;id&gt;</code></pre>
228
+ </div>
229
+ </div>
views/pages/documentation/api/reviews.php ADDED
@@ -0,0 +1,575 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="api-reviews">
4
+ <span class="title">Reviews</span>
5
+ <span class="badge code">/site-reviews/v1/reviews</span>
6
+ <span class="icon"></span>
7
+ </button>
8
+ </h3>
9
+ <div id="api-reviews" class="inside">
10
+ <h3>Schema</h3>
11
+ <p>The schema defines all the fields that exist within a review record. Any response from these endpoints can be expected to contain the fields below unless one of the following conditions is true:</p>
12
+ <ol>
13
+ <li>The <code>_fields</code> query parameter is used.</li>
14
+ <li>The <code>_rendered</code> query parameter is used.</li>
15
+ <li>The schema field only appears in a specific context.</li>
16
+ </ol>
17
+ <div class="glsr-responsive-table">
18
+ <table class="wp-list-table widefat striped">
19
+ <thead>
20
+ <tr>
21
+ <th scope="col"><strong>Field</strong></th>
22
+ <th scope="col"><strong>Type</strong></th>
23
+ <th scope="col"><strong>Context</strong></th>
24
+ <th scope="col"><strong>Description</strong></th>
25
+ </tr>
26
+ </thead>
27
+ <tbody>
28
+ <tr>
29
+ <td><strong>assigned_posts</strong></td>
30
+ <td>array</td>
31
+ <td>view, edit</td>
32
+ <td>The posts (of any public post type) assigned to the review.</td>
33
+ </tr>
34
+ <tr>
35
+ <td><strong>assigned_terms</strong></td>
36
+ <td>array</td>
37
+ <td>view, edit</td>
38
+ <td>The terms assigned to the review in the <code>site-reviews-category</code> taxonomy.</td>
39
+ </tr>
40
+ <tr>
41
+ <td><strong>assigned_users</strong></td>
42
+ <td>array</td>
43
+ <td>view, edit</td>
44
+ <td>The users assigned to the review.</td>
45
+ </tr>
46
+ <tr>
47
+ <td><strong>author</strong></td>
48
+ <td>integer</td>
49
+ <td>view, edit</td>
50
+ <td>The ID for the author of the review Post Type.</td>
51
+ </tr>
52
+ <tr>
53
+ <td><strong>avatar</strong></td>
54
+ <td>string</td>
55
+ <td>view, edit</td>
56
+ <td>The avatar URL of the review.</td>
57
+ </tr>
58
+ <tr>
59
+ <td><strong>content</strong></td>
60
+ <td>string</td>
61
+ <td>view, edit</td>
62
+ <td>The content field of the review.</td>
63
+ </tr>
64
+ <tr>
65
+ <td><strong>custom</strong></td>
66
+ <td>object</td>
67
+ <td>view, edit</td>
68
+ <td>Custom field values.</td>
69
+ </tr>
70
+ <tr>
71
+ <td><strong>date</strong></td>
72
+ <td>string or null, datetime</td>
73
+ <td>view, edit</td>
74
+ <td>The date the review was published, in the site's timezone.</td>
75
+ </tr>
76
+ <tr>
77
+ <td><strong>date_gmt</strong></td>
78
+ <td>string or null, datetime</td>
79
+ <td>view, edit</td>
80
+ <td>The date the review was published, as GMT.</td>
81
+ </tr>
82
+ <tr>
83
+ <td><strong>email</strong></td>
84
+ <td>string or null</td>
85
+ <td>view, edit</td>
86
+ <td>The email field of the review.</td>
87
+ </tr>
88
+ <tr>
89
+ <td><strong>id</strong></td>
90
+ <td>integer</td>
91
+ <td>view</td>
92
+ <td>Unique identifier for the review. (read only)</td>
93
+ </tr>
94
+ <tr>
95
+ <td><strong>ip_address</strong></td>
96
+ <td>string or null</td>
97
+ <td>view, edit</td>
98
+ <td>The IP address submitted with the review.</td>
99
+ </tr>
100
+ <tr>
101
+ <td><strong>is_approved</strong></td>
102
+ <td>boolean</td>
103
+ <td>view, edit</td>
104
+ <td>The approval status of the review.</td>
105
+ </tr>
106
+ <tr>
107
+ <td><strong>is_modified</strong></td>
108
+ <td>boolean</td>
109
+ <td>view, edit</td>
110
+ <td>The modified status of the review.</td>
111
+ </tr>
112
+ <tr>
113
+ <td><strong>is_pinned</strong></td>
114
+ <td>boolean</td>
115
+ <td>view, edit</td>
116
+ <td>The pinned status of the review.</td>
117
+ </tr>
118
+ <tr>
119
+ <td><strong>meta</strong></td>
120
+ <td>object</td>
121
+ <td>view, edit</td>
122
+ <td>Meta fields of the review.</td>
123
+ </tr>
124
+ <tr>
125
+ <td><strong>modified</strong></td>
126
+ <td>string or null, datetime</td>
127
+ <td>view, edit</td>
128
+ <td>The date the review was last modified, in the site's timezone.</td>
129
+ </tr>
130
+ <tr>
131
+ <td><strong>modified_gmt</strong></td>
132
+ <td>string or null, datetime</td>
133
+ <td>view, edit</td>
134
+ <td>The date the review was last modified, as GMT.</td>
135
+ </tr>
136
+ <tr>
137
+ <td><strong>name</strong></td>
138
+ <td>string</td>
139
+ <td>view, edit</td>
140
+ <td>The name field of the review.</td>
141
+ </tr>
142
+ <tr>
143
+ <td><strong>rating</strong></td>
144
+ <td>integer</td>
145
+ <td>view, edit</td>
146
+ <td>The rating field of the review.</td>
147
+ </tr>
148
+ <tr>
149
+ <td><strong>response</strong></td>
150
+ <td>string</td>
151
+ <td>view, edit</td>
152
+ <td>The response given for a review.</td>
153
+ </tr>
154
+ <tr>
155
+ <td><strong>status</strong></td>
156
+ <td>string</td>
157
+ <td>view, edit</td>
158
+ <td>A named Post Status for the review. One of: <code>publish</code>, <code>future</code>, <code>draft</code>, <code>pending</code>, <code>private</code></td>
159
+ </tr>
160
+ <tr>
161
+ <td><strong>terms</strong></td>
162
+ <td>boolean</td>
163
+ <td>view, edit</td>
164
+ <td>The accepted terms field of the review.</td>
165
+ </tr>
166
+ <tr>
167
+ <td><strong>title</strong></td>
168
+ <td>string</td>
169
+ <td>view, edit</td>
170
+ <td>The title of the review.</td>
171
+ </tr>
172
+ <tr>
173
+ <td><strong>type</strong></td>
174
+ <td>string or null</td>
175
+ <td>view, edit</td>
176
+ <td>The review type, default value is <code>local</code>.</td>
177
+ </tr>
178
+ <tr>
179
+ <td><strong>url</strong></td>
180
+ <td>string or null</td>
181
+ <td>view, edit</td>
182
+ <td>The external URL of the review when the review source is from a third-party.</td>
183
+ </tr>
184
+ </tbody>
185
+ </table>
186
+ </div>
187
+
188
+ <h3>Global Parameters</h3>
189
+ <p>To instruct Site Reviews to return only a subset of the fields in a response, you may use the <code>_fields</code> query parameter. If for example you only need the ID, title, content and rating for a collection of reviews, you can restrict the response to only those properties with this fields query:</p>
190
+ <pre><code class="language-bash">/site-reviews/v1/reviews?_fields=id,title,content,rating</code></pre>
191
+ <p>To instruct Site Reviews to return the rendered HTML of the reviews in the response instead of an array of review values, you may use the <code>_rendered</code> query parameter. For example:</p>
192
+ <pre><code class="language-bash">/site-reviews/v1/reviews?_rendered=1</code></pre>
193
+
194
+ <h3>List Reviews</h3>
195
+ <p>Query this endpoint to retrieve a collection of reviews. The response you receive can be controlled and filtered using the URL query parameters below.</p>
196
+ <h4>Arguments</h4>
197
+ <div class="glsr-responsive-table">
198
+ <table class="wp-list-table widefat striped">
199
+ <thead>
200
+ <tr>
201
+ <th scope="col"><strong>Parameter</strong></th>
202
+ <th scope="col"><strong>Default</strong></th>
203
+ <th scope="col"><strong>Description</strong></th>
204
+ </tr>
205
+ </thead>
206
+ <tbody>
207
+ <tr>
208
+ <td><strong>after</strong></td>
209
+ <td></td>
210
+ <td>Limit result set to reviews published after a given ISO8601 compliant date.</td>
211
+ </tr>
212
+ <tr>
213
+ <td><strong>assigned_posts</strong></td>
214
+ <td></td>
215
+ <td>Limit result set to reviews assigned to specific posts of any public post type.</td>
216
+ </tr>
217
+ <tr>
218
+ <td><strong>assigned_terms</strong></td>
219
+ <td></td>
220
+ <td>Limit result set to reviews assigned to specific terms in the <code>site-review-category</code> taxonomy.</td>
221
+ </tr>
222
+ <tr>
223
+ <td><strong>assigned_users</strong></td>
224
+ <td></td>
225
+ <td>Limit result set to reviews assigned to specific users.</td>
226
+ </tr>
227
+ <tr>
228
+ <td><strong>before</strong></td>
229
+ <td></td>
230
+ <td>Limit result set to reviews published before a given ISO8601 compliant date.</td>
231
+ </tr>
232
+ <tr>
233
+ <td><strong>date</strong></td>
234
+ <td></td>
235
+ <td>Limit result set to reviews published on a given ISO8601 compliant date.</td>
236
+ </tr>
237
+ <tr>
238
+ <td><strong>email</strong></td>
239
+ <td></td>
240
+ <td>Limit result set to reviews containing a given email address.</td>
241
+ </tr>
242
+ <tr>
243
+ <td><strong>exclude</strong></td>
244
+ <td></td>
245
+ <td>Ensure result set excludes specific review IDs.</td>
246
+ </tr>
247
+ <tr>
248
+ <td><strong>include</strong></td>
249
+ <td></td>
250
+ <td>Limit result set to specific review IDs.</td>
251
+ </tr>
252
+ <tr>
253
+ <td><strong>ip_address</strong></td>
254
+ <td></td>
255
+ <td>Limit result set to reviews submitted from a given IP address.</td>
256
+ </tr>
257
+ <tr>
258
+ <td><strong>offset</strong></td>
259
+ <td>0</td>
260
+ <td>Offset the result set by a specific number of items.</td>
261
+ </tr>
262
+ <tr>
263
+ <td><strong>order</strong></td>
264
+ <td>desc</td>
265
+ <td>Order sort attribute ascending or descending. One of: <code>asc</code>, <code>desc</code></td>
266
+ </tr>
267
+ <tr>
268
+ <td><strong>orderby</strong></td>
269
+ <td>date</td>
270
+ <td>Sort collection by object attribute. One of: <code>author</code>, <code>date</code>, <code>date_gmt</code>, <code>ID</code>, <code>random</code>, <code>rating</code></td>
271
+ </tr>
272
+ <tr>
273
+ <td><strong>page</strong></td>
274
+ <td>1</td>
275
+ <td>Current page of the collection.</td>
276
+ </tr>
277
+ <tr>
278
+ <td><strong>per_page</strong></td>
279
+ <td>10</td>
280
+ <td>Maximum number of items to be returned in result set.</td>
281
+ </tr>
282
+ <tr>
283
+ <td><strong>rating</strong></td>
284
+ <td></td>
285
+ <td>Limit result set to reviews containing a given <em>minimum</em> rating.</td>
286
+ </tr>
287
+ <tr>
288
+ <td><strong>rendered</strong></td>
289
+ <td>0</td>
290
+ <td>Return a rendered result of the reviews and the corresponding pagination. One of: <code>0</code>, <code>1</code></td>
291
+ </tr>
292
+ <tr>
293
+ <td><strong>status</strong></td>
294
+ <td>approved</td>
295
+ <td>Limit result set to reviews containing a given status. One of: <code>all</code>, <code>approved</code>, <code>unapproved</code></td>
296
+ </tr>
297
+ <tr>
298
+ <td><strong>terms</strong></td>
299
+ <td></td>
300
+ <td>Limit result set to reviews submitted with terms accepted. One of: <code>0</code>, <code>1</code></td>
301
+ </tr>
302
+ <tr>
303
+ <td><strong>type</strong></td>
304
+ <td></td>
305
+ <td>Limit result set to reviews containing a given review type.</td>
306
+ </tr>
307
+ <tr>
308
+ <td><strong>user__in</strong></td>
309
+ <td></td>
310
+ <td>Limit result set to reviews authored by specific users.</td>
311
+ </tr>
312
+ <tr>
313
+ <td><strong>user__not_in</strong></td>
314
+ <td></td>
315
+ <td>Ensure result set excludes reviews authored by specific users.</td>
316
+ </tr>
317
+ </tbody>
318
+ </table>
319
+ </div>
320
+ <h4>Response Headers</h4>
321
+ <p>This endpoint includes additional headers in the response which provide the following information:</p>
322
+ <div class="glsr-responsive-table">
323
+ <table class="wp-list-table widefat striped">
324
+ <thead>
325
+ <tr>
326
+ <th scope="col"><strong>Header</strong></th>
327
+ <th scope="col"><strong>Description</strong></th>
328
+ </tr>
329
+ </thead>
330
+ <tbody>
331
+ <tr>
332
+ <td><strong>X-GLSR-Average</strong></td>
333
+ <td>The average rating of the total reviews.</td>
334
+ </tr>
335
+ <tr>
336
+ <td><strong>X-GLSR-Ranking</strong></td>
337
+ <td>The bayesian ranking of the total reviews.</td>
338
+ </tr>
339
+ <tr>
340
+ <td><strong>X-WP-Total</strong></td>
341
+ <td>The total number of reviews.</td>
342
+ </tr>
343
+ <tr>
344
+ <td><strong>X-WP-TotalPages</strong></td>
345
+ <td>The total number of review pages.</td>
346
+ </tr>
347
+ </tbody>
348
+ </table>
349
+ </div>
350
+ <h4>Definition</h4>
351
+ <pre><code class="language-bash">GET /site-reviews/v1/reviews</code></pre>
352
+ <h4>Example Request</h4>
353
+ <pre><code class="language-bash">curl https://example.com/wp-json/site-reviews/v1/reviews</code></pre>
354
+
355
+ <h3>Retrieve a Review</h3>
356
+ <p>Query this endpoint to retrieve a review.</p>
357
+ <h4>Arguments</h4>
358
+ <div class="glsr-responsive-table">
359
+ <table class="wp-list-table widefat striped">
360
+ <thead>
361
+ <tr>
362
+ <th scope="col"><strong>Parameter</strong></th>
363
+ <th scope="col"><strong>Default</strong></th>
364
+ <th scope="col"><strong>Description</strong></th>
365
+ </tr>
366
+ </thead>
367
+ <tbody>
368
+ <tr>
369
+ <td><strong>context</strong></td>
370
+ <td>view</td>
371
+ <td>Scope under which the request is made; determines fields present in response. One of: <code>view</code>, <code>edit</code></td>
372
+ </tr>
373
+ </tbody>
374
+ </table>
375
+ </div>
376
+ <h4>Definition</h4>
377
+ <pre><code class="language-bash">GET /site-reviews/v1/reviews/&lt;id&gt;</code></pre>
378
+ <h4>Example Request</h4>
379
+ <pre><code class="language-bash">curl https://example.com/wp-json/site-reviews/v1/reviews/&lt;id&gt;</code></pre>
380
+
381
+ <h3>Create a Review</h3>
382
+ <p>Query this endpoint to create a review.</p>
383
+ <h4>Arguments</h4>
384
+ <div class="glsr-responsive-table">
385
+ <table class="wp-list-table widefat striped">
386
+ <thead>
387
+ <tr>
388
+ <th scope="col"><strong>Parameter</strong></th>
389
+ <th scope="col"><strong>Description</strong></th>
390
+ </tr>
391
+ </thead>
392
+ <tbody>
393
+ <tr>
394
+ <td><strong>assigned_posts</strong></td>
395
+ <td>The posts (of any public post type) assigned to the review. One or more IDs separated with commas.</td>
396
+ </tr>
397
+ <tr>
398
+ <td><strong>assigned_terms</strong></td>
399
+ <td>The terms assigned to the review in the <code>site-reviews-category</code> taxonomy. One or more IDs or slugs separated with commas.</td>
400
+ </tr>
401
+ <tr>
402
+ <td><strong>assigned_users</strong></td>
403
+ <td>The users assigned to the review. One or more IDs separated with commas.</td>
404
+ </tr>
405
+ <tr>
406
+ <td><strong>avatar</strong></td>
407
+ <td>The avatar URL of the review.</td>
408
+ </tr>
409
+ <tr>
410
+ <td><strong>content</strong></td>
411
+ <td>The content of the review.</td>
412
+ </tr>
413
+ <tr>
414
+ <td><strong>date</strong></td>
415
+ <td>The date the review was published, in the site's timezone.</td>
416
+ </tr>
417
+ <tr>
418
+ <td><strong>email</strong></td>
419
+ <td>The email of the reviewer.</td>
420
+ </tr>
421
+ <tr>
422
+ <td><strong>ip_address</strong></td>
423
+ <td>The IP addess of the reviewer.</td>
424
+ </tr>
425
+ <tr>
426
+ <td><strong>is_pinned</strong></td>
427
+ <td>The pinned status of the review. One of: <code>0</code>, <code>1</code></td>
428
+ </tr>
429
+ <tr>
430
+ <td><strong>name</strong></td>
431
+ <td>The name of the reviewer.</td>
432
+ </tr>
433
+ <tr>
434
+ <td><strong>rating</strong></td>
435
+ <td>The rating of the review. Value must be between 0-5 (unless the maximum rating has been changed).</td>
436
+ </tr>
437
+ <tr>
438
+ <td><strong>response</strong></td>
439
+ <td>The response given to the review.</td>
440
+ </tr>
441
+ <tr>
442
+ <td><strong>status</strong></td>
443
+ <td>A status of the review. One of: <code>approved</code>, <code>upapproved</code></td>
444
+ </tr>
445
+ <tr>
446
+ <td><strong>terms</strong></td>
447
+ <td>The accepted terms field of the review. One of: <code>0</code>, <code>1</code></td>
448
+ </tr>
449
+ <tr>
450
+ <td><strong>title</strong></td>
451
+ <td>The title of the review.</td>
452
+ </tr>
453
+ <tr>
454
+ <td><strong>type</strong></td>
455
+ <td>The review type. Default is: <code>local</code></td>
456
+ </tr>
457
+ </tbody>
458
+ </table>
459
+ </div>
460
+ <h4>Definition</h4>
461
+ <pre><code class="language-bash">POST /site-reviews/v1/reviews</code></pre>
462
+ <h4>Example Request</h4>
463
+ <pre><code class="language-bash">curl -X POST https://example.com/wp-json/site-reviews/v1/reviews -d '{"rating":"5"}'</code></pre>
464
+
465
+ <h3>Update a Review</h3>
466
+ <p>Query this endpoint to update a review.</p>
467
+ <h4>Arguments</h4>
468
+ <div class="glsr-responsive-table">
469
+ <table class="wp-list-table widefat striped">
470
+ <thead>
471
+ <tr>
472
+ <th scope="col"><strong>Parameter</strong></th>
473
+ <th scope="col"><strong>Description</strong></th>
474
+ </tr>
475
+ </thead>
476
+ <tbody>
477
+ <tr>
478
+ <td><strong>assigned_posts</strong></td>
479
+ <td>The posts (of any public post type) assigned to the review. One or more IDs separated with commas.</td>
480
+ </tr>
481
+ <tr>
482
+ <td><strong>assigned_terms</strong></td>
483
+ <td>The terms assigned to the review in the <code>site-reviews-category</code> taxonomy. One or more IDs or slugs separated with commas.</td>
484
+ </tr>
485
+ <tr>
486
+ <td><strong>assigned_users</strong></td>
487
+ <td>The users assigned to the review. One or more IDs separated with commas.</td>
488
+ </tr>
489
+ <tr>
490
+ <td><strong>avatar</strong></td>
491
+ <td>The avatar URL of the review.</td>
492
+ </tr>
493
+ <tr>
494
+ <td><strong>content</strong></td>
495
+ <td>The content of the review.</td>
496
+ </tr>
497
+ <tr>
498
+ <td><strong>date</strong></td>
499
+ <td>The date the review was published, in the site's timezone.</td>
500
+ </tr>
501
+ <tr>
502
+ <td><strong>email</strong></td>
503
+ <td>The email of the reviewer.</td>
504
+ </tr>
505
+ <tr>
506
+ <td><strong>ip_address</strong></td>
507
+ <td>The IP addess of the reviewer.</td>
508
+ </tr>
509
+ <tr>
510
+ <td><strong>is_pinned</strong></td>
511
+ <td>The pinned status of the review. One of: <code>0</code>, <code>1</code></td>
512
+ </tr>
513
+ <tr>
514
+ <td><strong>name</strong></td>
515
+ <td>The name of the reviewer.</td>
516
+ </tr>
517
+ <tr>
518
+ <td><strong>rating</strong></td>
519
+ <td>The rating of the review. Value must be between 0-5 (unless the maximum rating has been changed).</td>
520
+ </tr>
521
+ <tr>
522
+ <td><strong>response</strong></td>
523
+ <td>The response given to the review.</td>
524
+ </tr>
525
+ <tr>
526
+ <td><strong>status</strong></td>
527
+ <td>A status of the review. One of: <code>approved</code>, <code>upapproved</code></td>
528
+ </tr>
529
+ <tr>
530
+ <td><strong>terms</strong></td>
531
+ <td>The accepted terms field of the review. One of: <code>0</code>, <code>1</code></td>
532
+ </tr>
533
+ <tr>
534
+ <td><strong>title</strong></td>
535
+ <td>The title of the review.</td>
536
+ </tr>
537
+ <tr>
538
+ <td><strong>type</strong></td>
539
+ <td>The review type. Default is: <code>local</code></td>
540
+ </tr>
541
+ </tbody>
542
+ </table>
543
+ </div>
544
+ <h4>Definition</h4>
545
+ <pre><code class="language-bash">POST /site-reviews/v1/reviews/&lt;id&gt;</code></pre>
546
+ <h4>Example Request</h4>
547
+ <pre><code class="language-bash">curl -X POST https://example.com/wp-json/site-reviews/v1/reviews/&lt;id&gt; -d '{"rating":"5"}'</code></pre>
548
+
549
+ <h3>Delete a Review</h3>
550
+ <p>Query this endpoint to delete a review.</p>
551
+ <h4>Arguments</h4>
552
+ <div class="glsr-responsive-table">
553
+ <table class="wp-list-table widefat striped">
554
+ <thead>
555
+ <tr>
556
+ <th scope="col"><strong>Parameter</strong></th>
557
+ <th scope="col"><strong>Default</strong></th>
558
+ <th scope="col"><strong>Description</strong></th>
559
+ </tr>
560
+ </thead>
561
+ <tbody>
562
+ <tr>
563
+ <td><strong>force</strong></td>
564
+ <td>0</td>
565
+ <td>Whether to bypass Trash and force deletion. One of: <code>0</code>, <code>1</code></td>
566
+ </tr>
567
+ </tbody>
568
+ </table>
569
+ </div>
570
+ <h4>Definition</h4>
571
+ <pre><code class="language-bash">DELETE /site-reviews/v1/reviews/&lt;id&gt;</code></pre>
572
+ <h4>Example Request</h4>
573
+ <pre><code class="language-bash">curl -X DELETE https://example.com/wp-json/site-reviews/v1/reviews/&lt;id&gt;</code></pre>
574
+ </div>
575
+ </div>
views/pages/documentation/api/summary.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="api-summary">
4
+ <span class="title">Rating Summary</span>
5
+ <span class="badge code">/site-reviews/v1/summary</span>
6
+ <span class="icon"></span>
7
+ </button>
8
+ </h3>
9
+ <div id="api-summary" class="inside">
10
+ <h3>Schema</h3>
11
+ <p>The schema defines all the fields that exist within the response. The response can be expected to contain the fields below unless one of the following conditions is true:</p>
12
+ <ol>
13
+ <li>The <code>_fields</code> query parameter is used.</li>
14
+ <li>The <code>_rendered</code> query parameter is used.</li>
15
+ </ol>
16
+ <div class="glsr-responsive-table">
17
+ <table class="wp-list-table widefat striped">
18
+ <thead>
19
+ <tr>
20
+ <th scope="col"><strong>Field</strong></th>
21
+ <th scope="col"><strong>Type</strong></th>
22
+ <th scope="col"><strong>Context</strong></th>
23
+ <th scope="col"><strong>Description</strong></th>
24
+ </tr>
25
+ </thead>
26
+ <tbody>
27
+ <tr>
28
+ <td><strong>average</strong></td>
29
+ <td>number</td>
30
+ <td>view</td>
31
+ <td>The average rating.</td>
32
+ </tr>
33
+ <tr>
34
+ <td><strong>maximum</strong></td>
35
+ <td>integer</td>
36
+ <td>view</td>
37
+ <td>The defined maximum rating.</td>
38
+ </tr>
39
+ <tr>
40
+ <td><strong>minimum</strong></td>
41
+ <td>integer</td>
42
+ <td>view</td>
43
+ <td>The defined minumum rating.</td>
44
+ </tr>
45
+ <tr>
46
+ <td><strong>ranking</strong></td>
47
+ <td>number</td>
48
+ <td>view</td>
49
+ <td>The bayesian ranking number.</td>
50
+ </tr>
51
+ <tr>
52
+ <td><strong>ratings</strong></td>
53
+ <td>array</td>
54
+ <td>view</td>
55
+ <td>The total number of reviews for each rating level from zero to maximum rating.</td>
56
+ </tr>
57
+ <tr>
58
+ <td><strong>reviews</strong></td>
59
+ <td>integer</td>
60
+ <td>view</td>
61
+ <td>The total number of reviews used to calculate the average.</td>
62
+ </tr>
63
+ </tbody>
64
+ </table>
65
+ </div>
66
+
67
+ <h3>Global Parameters</h3>
68
+ <p>To instruct Site Reviews to return only a subset of the fields in a response, you may use the <code>_fields</code> query parameter. If for example you only need the average and ranking of the summary, you can restrict the response to only those properties with this fields query:</p>
69
+ <pre><code class="language-bash">/site-reviews/v1/summary?_fields=average,ranking</code></pre>
70
+ <p>To instruct Site Reviews to return the rendered HTML of the summary in the response instead of the summary values, you may use the <code>_rendered</code> query parameter. For example:</p>
71
+ <pre><code class="language-bash">/site-reviews/v1/summary?_rendered=1</code></pre>
72
+
73
+ <h3>List The Summary</h3>
74
+ <p>Query this endpoint to retrieve the rating summary. The response you receive can be controlled and filtered using the URL query parameters below.</p>
75
+ <h4>Arguments</h4>
76
+ <div class="glsr-responsive-table">
77
+ <table class="wp-list-table widefat striped">
78
+ <thead>
79
+ <tr>
80
+ <th scope="col"><strong>Parameter</strong></th>
81
+ <th scope="col"><strong>Default</strong></th>
82
+ <th scope="col"><strong>Description</strong></th>
83
+ </tr>
84
+ </thead>
85
+ <tbody>
86
+ <tr>
87
+ <td>after</td>
88
+ <td></td>
89
+ <td>Limit summary to reviews published after a given ISO8601 compliant date.</td>
90
+ </tr>
91
+ <tr>
92
+ <td>assigned_posts</td>
93
+ <td></td>
94
+ <td>Limit summary to reviews assigned to specific posts of any public post type.</td>
95
+ </tr>
96
+ <tr>
97
+ <td>assigned_terms</td>
98
+ <td></td>
99
+ <td>Limit summary to reviews assigned to specific terms in the <code>site-review-category</code> taxonomy.</td>
100
+ </tr>
101
+ <tr>
102
+ <td>assigned_users</td>
103
+ <td></td>
104
+ <td>Limit summary to reviews assigned to specific users.</td>
105
+ </tr>
106
+ <tr>
107
+ <td>before</td>
108
+ <td></td>
109
+ <td>Limit summary to reviews published before a given ISO8601 compliant date.</td>
110
+ </tr>
111
+ <tr>
112
+ <td>date</td>
113
+ <td></td>
114
+ <td>Limit summary to reviews published on a given ISO8601 compliant date.</td>
115
+ </tr>
116
+ <tr>
117
+ <td>email</td>
118
+ <td></td>
119
+ <td>Limit summary to reviews containing a given email address.</td>
120
+ </tr>
121
+ <tr>
122
+ <td>exclude</td>
123
+ <td></td>
124
+ <td>Ensure summary excludes specific review IDs.</td>
125
+ </tr>
126
+ <tr>
127
+ <td>include</td>
128
+ <td></td>
129
+ <td>Limit summary to specific review IDs.</td>
130
+ </tr>
131
+ <tr>
132
+ <td>ip_address</td>
133
+ <td></td>
134
+ <td>Limit summary to reviews submitted from a given IP address.</td>
135
+ </tr>
136
+ <tr>
137
+ <td>rating</td>
138
+ <td></td>
139
+ <td>Limit summary to reviews containing a given <em>minimum</em> rating.</td>
140
+ </tr>
141
+ <tr>
142
+ <td>status</td>
143
+ <td>approved</td>
144
+ <td>Limit summary to reviews containing a given status. One of: <code>all</code>, <code>approved</code>, <code>unapproved</code></td>
145
+ </tr>
146
+ <tr>
147
+ <td>terms</td>
148
+ <td></td>
149
+ <td>Limit summary to reviews submitted with terms accepted. One of: <code>0</code>, <code>1</code></td>
150
+ </tr>
151
+ <tr>
152
+ <td>type</td>
153
+ <td></td>
154
+ <td>Limit summary to reviews containing a given review type.</td>
155
+ </tr>
156
+ <tr>
157
+ <td>user__in</td>
158
+ <td></td>
159
+ <td>Limit summary to reviews authored by specific users.</td>
160
+ </tr>
161
+ <tr>
162
+ <td>user__not_in</td>
163
+ <td></td>
164
+ <td>Ensure summary excludes reviews authored by specific users.</td>
165
+ </tr>
166
+ </tbody>
167
+ </table>
168
+ </div>
169
+ <h4>Definition</h4>
170
+ <pre><code class="language-bash">GET /site-reviews/v1/summary</code></pre>
171
+ <h4>Example Request</h4>
172
+ <pre><code class="language-bash">curl https://example.com/wp-json/site-reviews/v1/summary</code></pre>
173
+ </div>
174
+ </div>
views/pages/documentation/faq.php CHANGED
@@ -5,6 +5,7 @@ $sections = [
5
  trailingslashit(__DIR__).'faq/add-review-pagination.php',
6
  trailingslashit(__DIR__).'faq/change-review-title-tag.php',
7
  trailingslashit(__DIR__).'faq/change-font.php',
 
8
  trailingslashit(__DIR__).'faq/change-review-field-order.php',
9
  trailingslashit(__DIR__).'faq/change-summary-field-order.php',
10
  trailingslashit(__DIR__).'faq/change-form-field-order.php',
5
  trailingslashit(__DIR__).'faq/add-review-pagination.php',
6
  trailingslashit(__DIR__).'faq/change-review-title-tag.php',
7
  trailingslashit(__DIR__).'faq/change-font.php',
8
+ trailingslashit(__DIR__).'faq/change-response-name.php',
9
  trailingslashit(__DIR__).'faq/change-review-field-order.php',
10
  trailingslashit(__DIR__).'faq/change-summary-field-order.php',
11
  trailingslashit(__DIR__).'faq/change-form-field-order.php',
views/pages/documentation/faq/change-response-name.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="faq-change-response-name">
4
+ <span class="title">How do I change the name in the response?</span>
5
+ <span class="icon"></span>
6
+ </button>
7
+ </h3>
8
+ <div id="faq-change-response-name" class="inside">
9
+ <p>The easiest way to do this is to use the Translations setting to change the <code><?= __('Response from %s', 'site-reviews'); ?></code> text.</p>
10
+ <p>However, if you need further customisation then you can use a hook to change the name like this:</p>
11
+ <pre><code class="language-php">/**
12
+ * @param string $responseBy
13
+ * @param \GeminiLabs\SiteReviews\Review $review
14
+ * @return string
15
+ */
16
+ add_filter('site-reviews/review/build/tag/response/by', function ($responseBy, $review) {
17
+ // Option 1:
18
+ // The user ID of the person who wote the response is stored to the review,
19
+ // so you can get their name like this:
20
+ if ($user = get_userdata($review->meta()->_response_by)) {
21
+ $responseBy = $user->display_name;
22
+ }
23
+ // Option 2:
24
+ // Get the title of the first assigned page like this:
25
+ if ($post = get_post(glsr_get($review->assigned_posts, 0))) {
26
+ $responseBy = $post->post_title;
27
+ }
28
+ // Option 3:
29
+ // Get the author's name of the first assigned page like this:
30
+ if ($post = get_post(glsr_get($review->assigned_posts, 0))) {
31
+ $responseBy = get_the_author($post->ID);
32
+ }
33
+ return $responseBy;
34
+ }, 10, 2);</code></pre>
35
+ </div>
36
+ </div>
views/pages/documentation/functions.php CHANGED
@@ -12,6 +12,7 @@ $sections = [
12
  trailingslashit(__DIR__).'functions/glsr_get_ratings.php',
13
  trailingslashit(__DIR__).'functions/glsr_trace.php',
14
  trailingslashit(__DIR__).'functions/glsr_log.php',
 
15
  ];
16
  $filename = pathinfo(__FILE__, PATHINFO_FILENAME);
17
  $sections = glsr()->filterArrayUnique('documentation/'.$filename, $sections);
12
  trailingslashit(__DIR__).'functions/glsr_get_ratings.php',
13
  trailingslashit(__DIR__).'functions/glsr_trace.php',
14
  trailingslashit(__DIR__).'functions/glsr_log.php',
15
+ trailingslashit(__DIR__).'functions/glsr_update_review.php',
16
  ];
17
  $filename = pathinfo(__FILE__, PATHINFO_FILENAME);
18
  $sections = glsr()->filterArrayUnique('documentation/'.$filename, $sections);
views/pages/documentation/functions/glsr_create_review.php CHANGED
@@ -9,7 +9,6 @@
9
  <div id="fn-glsr_create_review" class="inside">
10
  <div class="components-notice is-warning">
11
  <p class="components-notice__content">This function uses basic validation on the provided values. If validation fails, the function will return false and the validation errors will be logged to the <a href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=tools#tab-console'); ?>">Plugin Console</a>.</p>
12
-
13
  </div>
14
  <br>
15
  <pre><code class="language-php">/**
9
  <div id="fn-glsr_create_review" class="inside">
10
  <div class="components-notice is-warning">
11
  <p class="components-notice__content">This function uses basic validation on the provided values. If validation fails, the function will return false and the validation errors will be logged to the <a href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=tools#tab-console'); ?>">Plugin Console</a>.</p>
 
12
  </div>
13
  <br>
14
  <pre><code class="language-php">/**
views/pages/documentation/functions/glsr_update_review.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="fn-glsr_update_review">
4
+ <span class="title">Update a review</span>
5
+ <span class="badge code">glsr_update_review()</span>
6
+ <span class="icon"></span>
7
+ </button>
8
+ </h3>
9
+ <div id="fn-glsr_update_review" class="inside">
10
+ <div class="components-notice is-warning">
11
+ <p class="components-notice__content">This function uses basic validation on the provided values. If validation fails, the function will return false and the validation errors will be logged to the <a href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=tools#tab-console'); ?>">Plugin Console</a>.</p>
12
+ </div>
13
+ <br>
14
+ <pre><code class="language-php">/**
15
+ * Default values in the $reviewValues array:
16
+ * - 'assigned_posts' => '',
17
+ * - 'assigned_terms' => '',
18
+ * - 'assigned_users' => '',
19
+ * - 'avatar' => '',
20
+ * - 'content' => '',
21
+ * - 'date' => '',
22
+ * - 'email' => '',
23
+ * - 'ip_address' => '',
24
+ * - 'is_pinned' => '',
25
+ * - 'name' => '',
26
+ * - 'rating' => '',
27
+ * - 'terms' => '',
28
+ * - 'title' => '',
29
+ * - 'url' => '',
30
+ * @param int $reviewId The Post ID of the review
31
+ * @return \GeminiLabs\SiteReviews\Review|false The updated review or false if the update failed
32
+ */
33
+ glsr_update_review($reviewId, array $reviewValues = []);</code></pre>
34
+ <p><strong>Example Usage:</strong></p>
35
+ <p>Any custom keys that are added to the $reviewValues array will be saved into the <code>$review->custom</code> array of the created review.</p>
36
+ <pre><code class="language-php">$review = glsr_update_review(13, [
37
+ 'date' => '2021-06-13',
38
+ 'title' => 'This is the updated review title!',
39
+ 'xyz' => 'This is a custom field!'
40
+ ]);
41
+
42
+ // OR:
43
+
44
+ $review = apply_filters('glsr_update_review', false, 13, [
45
+ 'date' => '2021-06-13',
46
+ 'title' => 'This is the updated review title!',
47
+ 'xyz' => 'This is a custom field!'
48
+ ]);</code></pre>
49
+ <p><strong>Helpful Tip:</strong></p>
50
+ <p>You can use the <code><a href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=documentation#tab-functions'); ?>" data-expand="#fn-glsr_debug">glsr_debug</a></code> helper function to view the review object that is returned.</p>
51
+ <pre><code class="language-php">glsr_debug($review);</code></pre>
52
+ </div>
53
+ </div>
views/pages/welcome/whatsnew.php CHANGED
@@ -4,6 +4,7 @@
4
  <div class="is-fullwidth">
5
  <div class="glsr-flex-row">
6
  <div class="glsr-column">
 
7
  <?php include trailingslashit(__DIR__).'whatsnew/v510.php'; ?>
8
  <?php include trailingslashit(__DIR__).'whatsnew/v59.php'; ?>
9
  <?php include trailingslashit(__DIR__).'whatsnew/v58.php'; ?>
4
  <div class="is-fullwidth">
5
  <div class="glsr-flex-row">
6
  <div class="glsr-column">
7
+ <?php include trailingslashit(__DIR__).'whatsnew/v511.php'; ?>
8
  <?php include trailingslashit(__DIR__).'whatsnew/v510.php'; ?>
9
  <?php include trailingslashit(__DIR__).'whatsnew/v59.php'; ?>
10
  <?php include trailingslashit(__DIR__).'whatsnew/v58.php'; ?>
views/pages/welcome/whatsnew/v510.php CHANGED
@@ -1,6 +1,6 @@
1
- <div class="glsr-card postbox is-fullwidth open">
2
  <h3 class="glsr-card-heading">
3
- <button type="button" class="glsr-accordion-trigger" aria-expanded="true" aria-controls="welcome-v5_10_0">
4
  <span class="title">Version 5.10</span>
5
  <span class="icon"></span>
6
  </button>
1
+ <div class="glsr-card postbox is-fullwidth">
2
  <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="welcome-v5_10_0">
4
  <span class="title">Version 5.10</span>
5
  <span class="icon"></span>
6
  </button>
views/pages/welcome/whatsnew/v511.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="glsr-card postbox is-fullwidth open">
2
+ <h3 class="glsr-card-heading">
3
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="true" aria-controls="welcome-v5_11_0">
4
+ <span class="title">Version 5.11</span>
5
+ <span class="icon"></span>
6
+ </button>
7
+ </h3>
8
+ <div id="welcome-v5_11_0" class="inside">
9
+ <p><em>Initial Release Date &mdash; June 1st, 2021</em></p>
10
+ <h4>✨ New Features</h4>
11
+ <ul>
12
+ <li>Added a REST API (see the <a data-expand="#fn-glsr_update_review" href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=documentation#tab-api'); ?>">provided documentation</a> to learn how to use it)</li>
13
+ <li>Added custom capabilities for responding to reviews (<code>respond_to_site-review</code> and <code>respond_to_others_site-review</code>)</li>
14
+ <li>Added filters for categories, assigned posts, and assigned users on the "All Reviews" admin page (enable them in the "Screen Options" on the top-right of the page)</li>
15
+ <li>Added native Elementor widgets</li>
16
+ <li>Added support for &lt;optgroup&gt; in dropdown fields (this may be useful when using the Review Forms add-on to display a category dropdown with parent/child categories). To learn how to enable this, please see the <a data-expand="#faq-enable-optgroup" href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=documentation#tab-faq'); ?>">FAQ</a> Help page.</li>
17
+ <li>Added the ability to create reviews from the admin</li>
18
+ <li>Added the ability to respond to reviews from the "All Reviews" page</li>
19
+ <li>Added the <code>site-reviews/review/build/tag/response/by</code> hook (see the <a data-expand="#faq-change-response-name" href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=documentation#tab-faq'); ?>">FAQ</a> to learn how to use it to change the name in the response)</li>
20
+ <li>Added the <code>glsr_update_review</code> helper function (see the <a href="<?= admin_url('edit.php?post_type='.glsr()->post_type.'&page=documentation#tab-functions'); ?>">provided documentation</a> to learn how to use it)</li>
21
+ </ul>
22
+ <h4>🐞 Bugs Fixed</h4>
23
+ <ul>
24
+ <li>Fixed inline styles (overriding the star images should now display correctly in the block editor)</li>
25
+ <li>Fixed summary review counts for 0-star ratings</li>
26
+ <li>Fixed the star rating when resetting the submission form where a default rating is set</li>
27
+ </ul>
28
+ </div>
29
+ </div>
views/partials/editor/metabox-details.php CHANGED
@@ -5,7 +5,7 @@
5
  <div class="glsr-input wp-clearfix">
6
  <div class="glsr-toggle-field">
7
  <span class="glsr-toggle">
8
- <input name="<?= glsr()->id; ?>[is_editing_review]" class="glsr-toggle__input" type="checkbox" data-edit-review>
9
  <span class="glsr-toggle__track"></span>
10
  <span class="glsr-toggle__thumb"></span>
11
  </span>
5
  <div class="glsr-input wp-clearfix">
6
  <div class="glsr-toggle-field">
7
  <span class="glsr-toggle">
8
+ <input name="<?= glsr()->id; ?>[is_editing_review]" class="glsr-toggle__input" type="checkbox" <?php checked(glsr_current_screen()->action, 'add'); ?> data-edit-review>
9
  <span class="glsr-toggle__track"></span>
10
  <span class="glsr-toggle__thumb"></span>
11
  </span>
views/partials/editor/review.php DELETED
@@ -1,26 +0,0 @@
1
- <?php defined('ABSPATH') || die; ?>
2
-
3
- <div id="titlediv">
4
- <input type="text" id="title" value="<?= $post->post_title ? esc_attr($post->post_title) : sprintf('(%s)', esc_attr_x('no title', 'admin-text', 'site-reviews')); ?>" readonly>
5
- </div>
6
-
7
- <div id="contentdiv" class="wp-editor-container">
8
- <textarea readonly><?= esc_attr($post->post_content); ?></textarea>
9
- </div>
10
-
11
- <?php if (empty($response)) {
12
- return;
13
- } ?>
14
-
15
- <div class="postbox glsr-response-postbox">
16
- <button type="button" class="handlediv" aria-expanded="true">
17
- <span class="screen-reader-text"><?= _x('Toggle panel: Public Response', 'admin-text', 'site-reviews'); ?></span>
18
- <span class="toggle-indicator" aria-hidden="true"></span>
19
- </button>
20
- <h2 class="hndle">
21
- <span><?= _x('Public Response', 'admin-text', 'site-reviews'); ?></span>
22
- </h2>
23
- <div class="inside">
24
- <?= wpautop(esc_attr($response)); ?>
25
- </div>
26
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/partials/screen/filters.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php defined('ABSPATH') || die; ?>
2
+
3
+ <fieldset class="metabox-prefs">
4
+ <legend><?= _x('Filters', 'admin-text', 'site-reviews'); ?></legend>
5
+ <?php foreach ($filters as $name => $filter) : ?>
6
+ <label>
7
+ <input class="enable-filter-tog" name="<?= $setting; ?>[]" type="checkbox" value="<?= $name; ?>" <?php checked(in_array($name, $enabled), true); ?> />
8
+ <?= $filter; ?>
9
+ </label>
10
+ <?php endforeach; ?>
11
+ </fieldset>
views/partials/screen/inline-data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php defined('ABSPATH') || die; ?>
2
+
3
+ <div class="hidden" id="inline_edit_<?= $postId; ?>">
4
+ <div class="_post_content"><?= $content; ?></div>
5
+ <div class="_response"><?= $response; ?></div>
6
+ </div>
views/partials/screen/inline-edit.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php defined('ABSPATH') || die; ?>
2
+
3
+ <form method="get">
4
+ <table style="display:none">
5
+ <tbody id="inlineedit">
6
+ <tr id="inline-edit" style="display:none" class="inline-edit-row inline-edit-row-post quick-edit-row quick-edit-row-post inline-edit-<?= glsr()->post_type; ?>">
7
+ <td colspan="<?= $columns; ?>" class="colspanchange">
8
+ <fieldset class="glsr-inline-edit-col-left">
9
+ <legend class="inline-edit-legend">
10
+ <?= _x('Respond to the review', 'admin-text', 'site-reviews'); ?>
11
+ </legend>
12
+ <div class="inline-edit-col">
13
+ <label>
14
+ <span class=""><?= _x('Their Review', 'admin-text', 'site-reviews'); ?></span>
15
+ <textarea cols="22" rows="1" data-name="post_content" readonly></textarea>
16
+ </label>
17
+ </div>
18
+ </fieldset>
19
+ <fieldset class="glsr-inline-edit-col-right">
20
+ <div class="inline-edit-col">
21
+ <label>
22
+ <span class=""><?= _x('Your Response', 'admin-text', 'site-reviews'); ?></span>
23
+ <textarea cols="22" rows="1" name="_response" class="ptitle"></textarea>
24
+ </label>
25
+ </div>
26
+ </fieldset>
27
+ <div class="submit inline-edit-save">
28
+ <?php wp_nonce_field('inlineeditnonce', '_inline_edit', false); ?>
29
+ <input type="hidden" name="screen" value="<?= $screenId; ?>" />
30
+ <button type="button" class="button cancel alignleft"><?= _x('Cancel', 'admin-text', 'site-reviews'); ?></button>
31
+ <button type="button" class="button button-primary save alignright"><?= _x('Update', 'admin-text', 'site-reviews'); ?></button>
32
+ <span class="spinner"></span>
33
+ <br class="clear" />
34
+ <div class="notice notice-error notice-alt inline hidden">
35
+ <p class="error"></p>
36
+ </div>
37
+ </div>
38
+ </td>
39
+ </tr>
40
+ </tbody>
41
+ </table>
42
+ </form>
views/partials/screen/locked-indicator.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php defined('ABSPATH') || die; ?>
2
+
3
+ <div class="locked-indicator">
4
+ <span class="locked-indicator-icon" aria-hidden="true"></span>
5
+ <span class="screen-reader-text">
6
+ <?= sprintf(_x('&#8220;%s&#8221; is locked', 'admin-text', 'site-reviews'), _draft_or_post_title()); ?>
7
+ </span>
8
+ </div>
views/partials/screen/locked-info.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php defined('ABSPATH') || die; ?>
2
+
3
+ <div class="locked-info">
4
+ <span class="locked-avatar"><?= $lockedAvatar; ?></span> <span class="locked-text"><?= $lockedText; ?></span>
5
+ </div>