Post Expirator - Version 2.6.3

Version Description

Download this release

Release Info

Developer andergmartins
Plugin Icon 128x128 Post Expirator
Version 2.6.3
Comparing to
See all releases

Code changes from version 2.6.2 to 2.6.3

.distignore DELETED
@@ -1,18 +0,0 @@
1
- .distignore
2
- .git
3
- .github
4
- .gitignore
5
- Gruntfile.js
6
- node_modules
7
- composer.lock
8
- package-lock.json
9
- package.json
10
- composer.json
11
- phpcs.xml
12
- logs
13
- .babelrc
14
- assets/jsx
15
- bin
16
- codeceptjs
17
- tests
18
- webpack.config.js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/admin-edit.js CHANGED
@@ -100,6 +100,7 @@
100
  }
101
 
102
  // categories
 
103
  var $categories = $('#expirationdate_categories-' + $post_id).text();
104
  if ($categories !== '') {
105
  $.each($categories.split(','), function (index, value) {
100
  }
101
 
102
  // categories
103
+ $edit_row.find('input[name="expirationdate_category[]"]').prop('checked', false);
104
  var $categories = $('#expirationdate_categories-' + $post_id).text();
105
  if ($categories !== '') {
106
  $.each($categories.split(','), function (index, value) {
assets/js/gutenberg-panel.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){e.exports=a(1)},function(e,t,a){"use strict";var n,r,o,i,s,c,u,l,p,d,f,g,y,m,b,v,x,h,E,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n=window.wp,r=window.postExpiratorPanelConfig,o=n.plugins.registerPlugin,i=n.editPost.PluginDocumentSettingPanel,s=n.components,c=s.PanelRow,u=s.DateTimePicker,l=s.CheckboxControl,p=s.SelectControl,d=s.FormTokenField,f=s.Spinner,g=n.element,y=g.Fragment,m=g.Component,b=n.htmlEntities.decodeEntities,v=lodash,x=v.isEmpty,h=v.keys,E=v.compact,o("postexpirator-sidebar",{render:function(e){function t(){P(this,t);var e=S(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={categoriesList:[],catIdVsName:[]},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),w(t,[{key:"componentWillMount",value:function(){var e=this,t=(this.state.attributes,n.data.select("core/editor").getEditedPostAttribute("meta")),a=n.data.select("core/editor").getCurrentPostType(),o=function(e){return n.data.dispatch("core/editor").editPost({meta:e})},i=1==r.defaults.autoEnable,s=new Date,c=this.getExpireType(t),u=[];c.includes("category")&&(u=this.getCategories(t)),t["_expiration-date-status"]&&"saved"===t["_expiration-date-status"]&&(i=!0),t["_expiration-date"]?s.setTime(1e3*(t["_expiration-date"]+60*s.getTimezoneOffset())):(u=r.default_categories,r.default_date&&s.setTime(1e3*(parseInt(r.default_date)+60*s.getTimezoneOffset())));var l=r.defaults.taxonomy||"category";this.setState({enabled:i,date:s,expireAction:c,categories:u,taxonomy:l}),o({"_expiration-date-status":i?"saved":""}),o({"_expiration-date":s.getTime()/1e3}),o({"_expiration-date-type":c}),o({"_expiration-date-categories":u});var p=[],d=[];!l&&"post"===a||"category"===l?n.apiFetch({path:n.url.addQueryArgs("wp/v2/categories",{per_page:-1})}).then((function(t){t.forEach((function(e){p[e.name]=e,d[e.id]=e.name})),e.setState({categoriesList:p,catIdVsName:d,taxonomy:r.strings.category})})):"page"!==a&&n.apiFetch({path:n.url.addQueryArgs("wp/v2/taxonomies/"+l,{context:"edit"})}).then((function(t){n.apiFetch({path:n.url.addQueryArgs("wp/v2/"+t.rest_base,{context:"edit"})}).then((function(a){a.forEach((function(e){p[b(e.name)]=e,d[e.id]=b(e.name)})),e.setState({categoriesList:p,catIdVsName:d,taxonomy:b(t.name)})}))}))}},{key:"componentDidUpdate",value:function(){var e=this.state,t=e.enabled,a=e.date,r=e.expireAction,o=e.categories,i=e.attribute,s=function(e){return n.data.dispatch("core/editor").editPost({meta:e})},c=n.data.select("core/editor").getEditedPostAttribute("meta");switch(i){case"enabled":s({"_expiration-date-status":t?"saved":""}),c["_expiration-date"]||s({"_expiration-date":this.getDate(a)});break;case"date":"string"==typeof a&&s({"_expiration-date":this.getDate(a)});break;case"action":s({"_expiration-date-type":r}),r.includes("category")||s({"_expiration-date-categories":[]});break;case"category":s({"_expiration-date-categories":o})}}},{key:"render",value:function(){var e=this,t=this.state,a=t.categoriesList,o=t.catIdVsName,s=this.state,g=s.enabled,m=s.date,b=s.expireAction,v=s.categories,T=s.taxonomy,w=n.data.select("core/editor").getCurrentPostType(),P=[{label:r.strings.draft,value:"draft"},{label:r.strings.delete,value:"delete"},{label:r.strings.trash,value:"trash"},{label:r.strings.private,value:"private"},{label:r.strings.stick,value:"stick"},{label:r.strings.unstick,value:"unstick"}];"page"!==w&&(P=_.union(P,[{label:r.strings.categoryReplace,value:"category"},{label:r.strings.categoryAdd,value:"category-add"},{label:r.strings.categoryRemove,value:"category-remove"}]));var S=v&&E(v.map((function(e){return o[e]||!1})));return"string"==typeof S&&(S=[]),React.createElement(i,{title:r.strings.postExpirator,icon:"calendar",initialOpen:g,className:"post-expirator-panel"},React.createElement(c,null,React.createElement(l,{label:r.strings.enablePostExpiration,checked:g,onChange:function(t){e.setState({enabled:!g,attribute:"enabled"})}})),g&&React.createElement(y,null,React.createElement(c,null,React.createElement(u,{currentDate:m,onChange:function(t){return e.setState({date:t,attribute:"date"})},is12Hour:r.is12Hour})),React.createElement(p,{label:r.strings.howToExpire,value:b,options:P,onChange:function(t){e.setState({expireAction:t,attribute:"action"})}}),b.includes("category")&&(x(h(a))&&React.createElement(y,null,r.strings.loading+" ("+T+")",React.createElement(f,null))||React.createElement(d,{label:r.strings.expirationCategories+" ("+T+")",value:S,suggestions:Object.keys(a),onChange:function(t){e.setState({categories:e.selectCategories(t),attribute:"category"})},maxSuggestions:10}))))}},{key:"getExpireType",value:function(e){var t=e["_expiration-date-type"],a=e["_expiration-date-options"]&&e["_expiration-date-options"].expireType;return t||a||(r&&r.defaults&&r.defaults.expireType?r.defaults.expireType:"draft")}},{key:"getCategories",value:function(e){var t=e["_expiration-date-categories"]&&e["_expiration-date-categories"],a=e["_expiration-date-options"]&&e["_expiration-date-options"].category;return"object"===(void 0===t?"undefined":T(t))&&t.length>0?t:(a&&void 0!==a&&"object"!==(void 0===a?"undefined":T(a))&&(categories=[a]),a)}},{key:"selectCategories",value:function(e){var t=this.state,a=t.categoriesList;if(t.catIdVsName,!e.some((function(e){return"string"==typeof e&&!a[e]})))return e.map((function(e){return"string"==typeof e?a[e]:e})).map((function(e){return e.id}))}},{key:"getDate",value:function(e){var t=new Date;return t.setTime(Date.parse(e)),t.setTime(t.getTime()-60*(new Date).getTimezoneOffset()*1e3),t.getTime()/1e3}}]),t}(m)})}]);
2
  //# sourceMappingURL=gutenberg-panel.js.map
1
+ !function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){e.exports=a(1)},function(e,t,a){"use strict";var n,r,o,i,s,c,u,l,p,d,f,g,y,m,b,v,x,h,E,w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n=window.wp,r=window.postExpiratorPanelConfig,o=n.plugins.registerPlugin,i=n.editPost.PluginDocumentSettingPanel,s=n.components,c=s.PanelRow,u=s.DateTimePicker,l=s.CheckboxControl,p=s.SelectControl,d=s.FormTokenField,f=s.Spinner,g=n.element,y=g.Fragment,m=g.Component,b=n.htmlEntities.decodeEntities,v=lodash,x=v.isEmpty,h=v.keys,E=v.compact,o("postexpirator-sidebar",{render:function(e){function t(){T(this,t);var e=S(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.state={categoriesList:[],catIdVsName:[]},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),P(t,[{key:"componentWillMount",value:function(){var e=this,t=(this.state.attributes,n.data.select("core/editor").getEditedPostAttribute("meta")),a=n.data.select("core/editor").getCurrentPostType(),o=function(e){return n.data.dispatch("core/editor").editPost({meta:e})},i=1==r.defaults.autoEnable,s=new Date,c=this.getExpireType(t),u=[];c.includes("category")&&(u=this.getCategories(t)),t["_expiration-date-status"]&&"saved"===t["_expiration-date-status"]&&(i=!0);var l=60*s.getTimezoneOffset(),p=60*r.timezone_offset;t["_expiration-date"]?s.setTime(1e3*(t["_expiration-date"]+l+p)):(u=r.default_categories,r.default_date&&s.setTime(1e3*(parseInt(r.default_date)+l+p)));var d=r.defaults.taxonomy||"category";this.setState({enabled:i,date:s,expireAction:c,categories:u,taxonomy:d}),o({"_expiration-date-status":i?"saved":""}),o({"_expiration-date":s.getTime()/1e3}),o({"_expiration-date-type":c}),o({"_expiration-date-categories":u});var f=[],g=[];!d&&"post"===a||"category"===d?n.apiFetch({path:n.url.addQueryArgs("wp/v2/categories",{per_page:-1})}).then((function(t){t.forEach((function(e){f[e.name]=e,g[e.id]=e.name})),e.setState({categoriesList:f,catIdVsName:g,taxonomy:r.strings.category})})):"page"!==a&&n.apiFetch({path:n.url.addQueryArgs("wp/v2/taxonomies/"+d,{context:"edit"})}).then((function(t){n.apiFetch({path:n.url.addQueryArgs("wp/v2/"+t.rest_base,{context:"edit"})}).then((function(a){a.forEach((function(e){f[b(e.name)]=e,g[e.id]=b(e.name)})),e.setState({categoriesList:f,catIdVsName:g,taxonomy:b(t.name)})}))}))}},{key:"componentDidUpdate",value:function(){var e=this.state,t=e.enabled,a=e.date,r=e.expireAction,o=e.categories,i=e.attribute,s=function(e){return n.data.dispatch("core/editor").editPost({meta:e})},c=n.data.select("core/editor").getEditedPostAttribute("meta");switch(i){case"enabled":s({"_expiration-date-status":t?"saved":""}),c["_expiration-date"]||s({"_expiration-date":this.getDate(a)});break;case"date":"string"==typeof a&&s({"_expiration-date":this.getDate(a)});break;case"action":s({"_expiration-date-type":r}),r.includes("category")||s({"_expiration-date-categories":[]});break;case"category":s({"_expiration-date-categories":o})}}},{key:"render",value:function(){var e=this,t=this.state,a=t.categoriesList,o=t.catIdVsName,s=this.state,g=s.enabled,m=s.date,b=s.expireAction,v=s.categories,w=s.taxonomy,P=n.data.select("core/editor").getCurrentPostType(),T=[{label:r.strings.draft,value:"draft"},{label:r.strings.delete,value:"delete"},{label:r.strings.trash,value:"trash"},{label:r.strings.private,value:"private"},{label:r.strings.stick,value:"stick"},{label:r.strings.unstick,value:"unstick"}];"page"!==P&&(T=_.union(T,[{label:r.strings.categoryReplace,value:"category"},{label:r.strings.categoryAdd,value:"category-add"},{label:r.strings.categoryRemove,value:"category-remove"}]));var S=v&&E(v.map((function(e){return o[e]||!1})));return"string"==typeof S&&(S=[]),React.createElement(i,{title:r.strings.postExpirator,icon:"calendar",initialOpen:g,className:"post-expirator-panel"},React.createElement(c,null,React.createElement(l,{label:r.strings.enablePostExpiration,checked:g,onChange:function(t){e.setState({enabled:!g,attribute:"enabled"})}})),g&&React.createElement(y,null,React.createElement(c,null,React.createElement(u,{currentDate:m,onChange:function(t){return e.setState({date:t,attribute:"date"})},is_12_hours:r.is_12_hours})),React.createElement(p,{label:r.strings.howToExpire,value:b,options:T,onChange:function(t){e.setState({expireAction:t,attribute:"action"})}}),b.includes("category")&&(x(h(a))&&React.createElement(y,null,r.strings.loading+" ("+w+")",React.createElement(f,null))||React.createElement(d,{label:r.strings.expirationCategories+" ("+w+")",value:S,suggestions:Object.keys(a),onChange:function(t){e.setState({categories:e.selectCategories(t),attribute:"category"})},maxSuggestions:10}))))}},{key:"getExpireType",value:function(e){var t=e["_expiration-date-type"],a=e["_expiration-date-options"]&&e["_expiration-date-options"].expireType;return t||a||(r&&r.defaults&&r.defaults.expireType?r.defaults.expireType:"draft")}},{key:"getCategories",value:function(e){var t=e["_expiration-date-categories"]&&e["_expiration-date-categories"],a=e["_expiration-date-options"]&&e["_expiration-date-options"].category;return"object"===(void 0===t?"undefined":w(t))&&t.length>0?t:(a&&void 0!==a&&"object"!==(void 0===a?"undefined":w(a))&&(categories=[a]),a)}},{key:"selectCategories",value:function(e){var t=this.state,a=t.categoriesList;if(t.catIdVsName,!e.some((function(e){return"string"==typeof e&&!a[e]})))return e.map((function(e){return"string"==typeof e?a[e]:e})).map((function(e){return e.id}))}},{key:"getDate",value:function(e){var t=new Date,a=60*(new Date).getTimezoneOffset(),n=60*r.timezone_offset;return t.setTime(Date.parse(e)),t.setTime(t.getTime()-1e3*(a+n)),t.getTime()/1e3}}]),t}(m)})}]);
2
  //# sourceMappingURL=gutenberg-panel.js.map
assets/js/gutenberg-panel.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/jsx/gutenberg-panel.jsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","wp","config","registerPlugin","PluginDocumentSettingPanel","PanelRow","DateTimePicker","CheckboxControl","SelectControl","FormTokenField","Spinner","Fragment","Component","decodeEntities","isEmpty","keys","compact","window","postExpiratorPanelConfig","plugins","editPost","components","element","htmlEntities","lodash","render","arguments","state","categoriesList","catIdVsName","postMeta","this","attributes","data","select","getEditedPostAttribute","postType","getCurrentPostType","setPostMeta","newMeta","dispatch","meta","enabled","defaults","autoEnable","date","Date","expireAction","getExpireType","categories","includes","getCategories","setTime","getTimezoneOffset","default_categories","default_date","parseInt","taxonomy","setState","getTime","apiFetch","path","url","addQueryArgs","per_page","then","list","forEach","cat","id","strings","category","context","taxAttributes","rest_base","terms","term","attribute","getDate","actionsList","label","draft","delete","trash","private","stick","unstick","_","union","categoryReplace","categoryAdd","categoryRemove","selectedCats","map","title","postExpirator","icon","initialOpen","className","enablePostExpiration","checked","onChange","currentDate","is12Hour","howToExpire","options","loading","expirationCategories","suggestions","selectCategories","maxSuggestions","typeNew","typeOld","expireType","categoriesNew","categoriesOld","length","tokens","some","token","newDate","parse"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC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A,GAA0D,iBAAzB,IAAOA,EAAP,cAAOA,MAChElE,WAAa,CAACkE,IAGXA,KA/PI,uCAoQEE,GAAQ,MACiBtF,KAAKJ,MAApCC,EADc,EACdA,eAMP,GAPqB,EACEC,aAEDwF,EAAOC,MAAK,SAAUC,GACxC,MAAwB,iBAAVA,IAAuB3F,EAAe2F,MAWxD,OAJiBF,EAAOxB,KAAI,SAAU0B,GAClC,MAAwB,iBAAVA,EAAqB3F,EAAe2F,GAASA,KAG7C1B,KAAI,SAACzB,GAAD,OAASA,EAAIC,QAnRxB,8BAsRPxB,GACJ,IAAI2E,EAAU,IAAI1E,KAGlB,OAFA0E,EAAQpE,QAAQN,KAAK2E,MAAM5E,IAC3B2E,EAAQpE,QAAQoE,EAAQ7D,UAA6C,IAAjC,IAAIb,MAAOO,oBAA2B,KACjEmE,EAAQ7D,UAAa,QA1RnB,GASgB/C","file":"gutenberg-panel.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","(function (wp, config) {\n\n const {registerPlugin} = wp.plugins;\n const {PluginDocumentSettingPanel} = wp.editPost;\n const {PanelRow, DateTimePicker, CheckboxControl, SelectControl, FormTokenField, Spinner} = wp.components;\n const {Fragment, Component} = wp.element;\n const {decodeEntities} = wp.htmlEntities;\n const {isEmpty, keys, compact} = lodash;\n\n class PostExpiratorSidebar extends Component {\n constructor() {\n super(...arguments);\n\n this.state = {\n categoriesList: [],\n catIdVsName: [],\n }\n }\n\n componentWillMount() {\n const {attributes} = this.state;\n\n const postMeta = wp.data.select('core/editor').getEditedPostAttribute('meta');\n const postType = wp.data.select('core/editor').getCurrentPostType();\n const setPostMeta = (newMeta) => wp.data.dispatch('core/editor').editPost({meta: newMeta});\n\n let enabled = config.defaults.autoEnable == 1;\n let date = new Date();\n\n let expireAction = this.getExpireType(postMeta);\n\n let categories = [];\n if (expireAction.includes('category')) {\n categories = this.getCategories(postMeta);\n }\n\n if (postMeta['_expiration-date-status'] && postMeta['_expiration-date-status'] === 'saved') {\n enabled = true;\n }\n\n if (postMeta['_expiration-date']) {\n date.setTime((postMeta['_expiration-date'] + date.getTimezoneOffset() * 60) * 1000);\n } else {\n categories = config.default_categories;\n if (config.default_date) {\n date.setTime((parseInt(config.default_date) + date.getTimezoneOffset() * 60) * 1000);\n }\n }\n\n let taxonomy = config.defaults.taxonomy || 'category';\n\n this.setState({\n enabled: enabled,\n date: date,\n expireAction: expireAction,\n categories: categories,\n taxonomy: taxonomy,\n });\n\n // Force all the metadata to be saved. Required for making sure the default settings are stored correctly.\n setPostMeta({'_expiration-date-status': (enabled ? 'saved' : '')});\n setPostMeta({'_expiration-date': (date.getTime()) / 1000});\n setPostMeta({'_expiration-date-type': expireAction});\n setPostMeta({'_expiration-date-categories': categories});\n\n let categoriesList = [];\n let catIdVsName = [];\n\n if ((!taxonomy && postType === 'post') || taxonomy === 'category') {\n wp.apiFetch({\n path: wp.url.addQueryArgs('wp/v2/categories', {per_page: -1}),\n }).then((list) => {\n list.forEach(cat => {\n categoriesList[cat.name] = cat;\n catIdVsName[cat.id] = cat.name;\n });\n this.setState({categoriesList: categoriesList, catIdVsName: catIdVsName, taxonomy: config.strings.category});\n });\n } else if (postType !== 'page') {\n wp.apiFetch({\n path: wp.url.addQueryArgs(`wp/v2/taxonomies/${taxonomy}`, {context: 'edit'}),\n }).then((taxAttributes) => {\n // fetch all terms\n wp.apiFetch({\n path: wp.url.addQueryArgs(`wp/v2/${taxAttributes.rest_base}`, {context: 'edit'}),\n }).then((terms) => {\n terms.forEach(term => {\n categoriesList[decodeEntities(term.name)] = term;\n catIdVsName[term.id] = decodeEntities(term.name);\n });\n this.setState({\n categoriesList: categoriesList,\n catIdVsName: catIdVsName,\n taxonomy: decodeEntities(taxAttributes.name)\n });\n });\n });\n }\n\n }\n\n componentDidUpdate() {\n const {enabled, date, expireAction, categories, attribute} = this.state;\n const setPostMeta = (newMeta) => wp.data.dispatch('core/editor').editPost({meta: newMeta});\n const postMeta = wp.data.select('core/editor').getEditedPostAttribute('meta');\n\n switch (attribute) {\n case 'enabled':\n setPostMeta({'_expiration-date-status': (enabled ? 'saved' : '')});\n // if date is not set when the checkbox is enabled, set it to the default date\n // this is to prevent the user from having to click the date to set it\n if (!postMeta['_expiration-date']) {\n setPostMeta({'_expiration-date': this.getDate(date)});\n }\n break;\n case 'date':\n if (typeof date === 'string') {\n setPostMeta({'_expiration-date': this.getDate(date)});\n }\n break;\n case 'action':\n setPostMeta({'_expiration-date-type': expireAction});\n if (!expireAction.includes('category')) {\n setPostMeta({'_expiration-date-categories': []});\n }\n break;\n case 'category':\n setPostMeta({'_expiration-date-categories': categories});\n break;\n }\n\n }\n\n render() {\n const {categoriesList, catIdVsName} = this.state;\n const {enabled, date, expireAction, categories, taxonomy} = this.state;\n\n const postType = wp.data.select('core/editor').getCurrentPostType();\n\n let actionsList = [\n {label: config.strings.draft, value: 'draft'},\n {label: config.strings.delete, value: 'delete'},\n {label: config.strings.trash, value: 'trash'},\n {label: config.strings.private, value: 'private'},\n {label: config.strings.stick, value: 'stick'},\n {label: config.strings.unstick, value: 'unstick'},\n ];\n\n if (postType !== 'page') {\n actionsList = _.union(actionsList, [\n {label: config.strings.categoryReplace, value: 'category'},\n {label: config.strings.categoryAdd, value: 'category-add'},\n {label: config.strings.categoryRemove, value: 'category-remove'},\n ]);\n }\n\n let selectedCats = categories && compact(categories.map((id) => catIdVsName[id] || false));\n if (typeof selectedCats === 'string') {\n selectedCats = [];\n }\n\n return (\n <PluginDocumentSettingPanel title={config.strings.postExpirator} icon=\"calendar\"\n initialOpen={enabled} className={'post-expirator-panel'}>\n <PanelRow>\n <CheckboxControl\n label={config.strings.enablePostExpiration}\n checked={enabled}\n onChange={(value) => {\n this.setState({enabled: !enabled, attribute: 'enabled'})\n }}\n />\n </PanelRow>\n {enabled && (\n <Fragment>\n <PanelRow>\n <DateTimePicker\n currentDate={date}\n onChange={(value) => this.setState({date: value, attribute: 'date'})}\n is12Hour={config.is12Hour}\n />\n </PanelRow>\n <SelectControl\n label={config.strings.howToExpire}\n value={expireAction}\n options={actionsList}\n onChange={(value) => {\n this.setState({expireAction: value, attribute: 'action'})\n }}\n />\n {expireAction.includes('category') &&\n (\n (isEmpty(keys(categoriesList)) && (\n <Fragment>\n {config.strings.loading + ` (${taxonomy})`}\n <Spinner/>\n </Fragment>\n ))\n ||\n (\n <FormTokenField\n label={config.strings.expirationCategories + ` (${taxonomy})`}\n value={selectedCats}\n suggestions={Object.keys(categoriesList)}\n onChange={(value) => {\n this.setState({\n categories: this.selectCategories(value),\n attribute: 'category'\n })\n }}\n maxSuggestions={10}\n />\n )\n )}\n </Fragment>\n )}\n </PluginDocumentSettingPanel>\n );\n }\n\n // what action to take on expiration\n getExpireType(postMeta) {\n let typeNew = postMeta['_expiration-date-type'];\n let typeOld = postMeta['_expiration-date-options'] && postMeta['_expiration-date-options']['expireType'];\n\n\n\n if (typeNew) {\n return typeNew;\n }\n\n if (typeOld) {\n return typeOld;\n }\n\n if (config && config.defaults && config.defaults.expireType) {\n return config.defaults.expireType;\n }\n\n return 'draft';\n }\n\n // what categories to add/remove/replace\n getCategories(postMeta) {\n let categoriesNew = postMeta['_expiration-date-categories'] && postMeta['_expiration-date-categories'];\n let categoriesOld = postMeta['_expiration-date-options'] && postMeta['_expiration-date-options']['category'];\n\n if (typeof categoriesNew === 'object' && categoriesNew.length > 0) {\n return categoriesNew;\n }\n\n if (categoriesOld && typeof categoriesOld !== 'undefined' && typeof categoriesOld !== 'object') {\n categories = [categoriesOld];\n }\n\n return categoriesOld;\n\n }\n\n // fired for the autocomplete\n selectCategories(tokens) {\n const {categoriesList, catIdVsName} = this.state;\n\n var hasNoSuggestion = tokens.some(function (token) {\n return typeof token === 'string' && !categoriesList[token];\n });\n\n if (hasNoSuggestion) {\n return;\n }\n\n var categories = tokens.map(function (token) {\n return typeof token === 'string' ? categoriesList[token] : token;\n })\n\n return categories.map((cat) => cat.id);\n }\n\n getDate(date) {\n let newDate = new Date();\n newDate.setTime(Date.parse(date));\n newDate.setTime(newDate.getTime() - new Date().getTimezoneOffset() * 60 * 1000);\n return ((newDate.getTime()) / 1000);\n }\n\n }\n\n registerPlugin('postexpirator-sidebar', {\n render: PostExpiratorSidebar\n });\n\n\n})(window.wp, window.postExpiratorPanelConfig);\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/jsx/gutenberg-panel.jsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","wp","config","registerPlugin","PluginDocumentSettingPanel","PanelRow","DateTimePicker","CheckboxControl","SelectControl","FormTokenField","Spinner","Fragment","Component","decodeEntities","isEmpty","keys","compact","window","postExpiratorPanelConfig","plugins","editPost","components","element","htmlEntities","lodash","render","arguments","state","categoriesList","catIdVsName","postMeta","this","attributes","data","select","getEditedPostAttribute","postType","getCurrentPostType","setPostMeta","newMeta","dispatch","meta","enabled","defaults","autoEnable","date","Date","expireAction","getExpireType","categories","includes","getCategories","browserTimezoneOffset","getTimezoneOffset","wpTimezoneOffset","timezone_offset","setTime","default_categories","default_date","parseInt","taxonomy","setState","getTime","apiFetch","path","url","addQueryArgs","per_page","then","list","forEach","cat","id","strings","category","context","taxAttributes","rest_base","terms","term","attribute","getDate","actionsList","label","draft","delete","trash","private","stick","unstick","_","union","categoryReplace","categoryAdd","categoryRemove","selectedCats","map","title","postExpirator","icon","initialOpen","className","enablePostExpiration","checked","onChange","currentDate","is_12_hours","howToExpire","options","loading","expirationCategories","suggestions","selectCategories","maxSuggestions","typeNew","typeOld","expireType","categoriesNew","categoriesOld","length","tokens","some","token","newDate","parse"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAM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BpD,EAAOqD,gBAG9B,OAFAoE,EAAQnE,QAAQV,KAAK8E,MAAM/E,IAC3B8E,EAAQnE,QAAQmE,EAAQ7D,UAAyD,KAA5CV,EAAwBE,IACpDqE,EAAQ7D,UAAa,QA/RnB,GASgBlD","file":"gutenberg-panel.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","(function (wp, config) {\n\n const {registerPlugin} = wp.plugins;\n const {PluginDocumentSettingPanel} = wp.editPost;\n const {PanelRow, DateTimePicker, CheckboxControl, SelectControl, FormTokenField, Spinner} = wp.components;\n const {Fragment, Component} = wp.element;\n const {decodeEntities} = wp.htmlEntities;\n const {isEmpty, keys, compact} = lodash;\n\n class PostExpiratorSidebar extends Component {\n constructor() {\n super(...arguments);\n\n this.state = {\n categoriesList: [],\n catIdVsName: [],\n }\n }\n\n componentWillMount() {\n const {attributes} = this.state;\n\n const postMeta = wp.data.select('core/editor').getEditedPostAttribute('meta');\n const postType = wp.data.select('core/editor').getCurrentPostType();\n const setPostMeta = (newMeta) => wp.data.dispatch('core/editor').editPost({meta: newMeta});\n\n let enabled = config.defaults.autoEnable == 1;\n let date = new Date();\n\n let expireAction = this.getExpireType(postMeta);\n\n let categories = [];\n if (expireAction.includes('category')) {\n categories = this.getCategories(postMeta);\n }\n\n if (postMeta['_expiration-date-status'] && postMeta['_expiration-date-status'] === 'saved') {\n enabled = true;\n }\n\n let browserTimezoneOffset = date.getTimezoneOffset() * 60;\n let wpTimezoneOffset = config.timezone_offset * 60;\n\n if (postMeta['_expiration-date']) {\n date.setTime((postMeta['_expiration-date'] + browserTimezoneOffset + wpTimezoneOffset) * 1000);\n } else {\n categories = config.default_categories;\n if (config.default_date) {\n date.setTime((parseInt(config.default_date) + browserTimezoneOffset + wpTimezoneOffset) * 1000);\n }\n }\n\n let taxonomy = config.defaults.taxonomy || 'category';\n\n this.setState({\n enabled: enabled,\n date: date,\n expireAction: expireAction,\n categories: categories,\n taxonomy: taxonomy,\n });\n\n // Force all the metadata to be saved. Required for making sure the default settings are stored correctly.\n setPostMeta({'_expiration-date-status': (enabled ? 'saved' : '')});\n setPostMeta({'_expiration-date': (date.getTime()) / 1000});\n setPostMeta({'_expiration-date-type': expireAction});\n setPostMeta({'_expiration-date-categories': categories});\n\n let categoriesList = [];\n let catIdVsName = [];\n\n if ((!taxonomy && postType === 'post') || taxonomy === 'category') {\n wp.apiFetch({\n path: wp.url.addQueryArgs('wp/v2/categories', {per_page: -1}),\n }).then((list) => {\n list.forEach(cat => {\n categoriesList[cat.name] = cat;\n catIdVsName[cat.id] = cat.name;\n });\n this.setState({categoriesList: categoriesList, catIdVsName: catIdVsName, taxonomy: config.strings.category});\n });\n } else if (postType !== 'page') {\n wp.apiFetch({\n path: wp.url.addQueryArgs(`wp/v2/taxonomies/${taxonomy}`, {context: 'edit'}),\n }).then((taxAttributes) => {\n // fetch all terms\n wp.apiFetch({\n path: wp.url.addQueryArgs(`wp/v2/${taxAttributes.rest_base}`, {context: 'edit'}),\n }).then((terms) => {\n terms.forEach(term => {\n categoriesList[decodeEntities(term.name)] = term;\n catIdVsName[term.id] = decodeEntities(term.name);\n });\n this.setState({\n categoriesList: categoriesList,\n catIdVsName: catIdVsName,\n taxonomy: decodeEntities(taxAttributes.name)\n });\n });\n });\n }\n\n }\n\n componentDidUpdate() {\n const {enabled, date, expireAction, categories, attribute} = this.state;\n const setPostMeta = (newMeta) => wp.data.dispatch('core/editor').editPost({meta: newMeta});\n const postMeta = wp.data.select('core/editor').getEditedPostAttribute('meta');\n\n switch (attribute) {\n case 'enabled':\n setPostMeta({'_expiration-date-status': (enabled ? 'saved' : '')});\n // if date is not set when the checkbox is enabled, set it to the default date\n // this is to prevent the user from having to click the date to set it\n if (!postMeta['_expiration-date']) {\n setPostMeta({'_expiration-date': this.getDate(date)});\n }\n break;\n case 'date':\n if (typeof date === 'string') {\n setPostMeta({'_expiration-date': this.getDate(date)});\n }\n break;\n case 'action':\n setPostMeta({'_expiration-date-type': expireAction});\n if (!expireAction.includes('category')) {\n setPostMeta({'_expiration-date-categories': []});\n }\n break;\n case 'category':\n setPostMeta({'_expiration-date-categories': categories});\n break;\n }\n\n }\n\n render() {\n const {categoriesList, catIdVsName} = this.state;\n const {enabled, date, expireAction, categories, taxonomy} = this.state;\n\n const postType = wp.data.select('core/editor').getCurrentPostType();\n\n let actionsList = [\n {label: config.strings.draft, value: 'draft'},\n {label: config.strings.delete, value: 'delete'},\n {label: config.strings.trash, value: 'trash'},\n {label: config.strings.private, value: 'private'},\n {label: config.strings.stick, value: 'stick'},\n {label: config.strings.unstick, value: 'unstick'},\n ];\n\n if (postType !== 'page') {\n actionsList = _.union(actionsList, [\n {label: config.strings.categoryReplace, value: 'category'},\n {label: config.strings.categoryAdd, value: 'category-add'},\n {label: config.strings.categoryRemove, value: 'category-remove'},\n ]);\n }\n\n let selectedCats = categories && compact(categories.map((id) => catIdVsName[id] || false));\n if (typeof selectedCats === 'string') {\n selectedCats = [];\n }\n\n return (\n <PluginDocumentSettingPanel title={config.strings.postExpirator} icon=\"calendar\"\n initialOpen={enabled} className={'post-expirator-panel'}>\n <PanelRow>\n <CheckboxControl\n label={config.strings.enablePostExpiration}\n checked={enabled}\n onChange={(value) => {\n this.setState({enabled: !enabled, attribute: 'enabled'})\n }}\n />\n </PanelRow>\n {enabled && (\n <Fragment>\n <PanelRow>\n <DateTimePicker\n currentDate={date}\n onChange={(value) => this.setState({date: value, attribute: 'date'})}\n is_12_hours={config.is_12_hours}\n />\n </PanelRow>\n <SelectControl\n label={config.strings.howToExpire}\n value={expireAction}\n options={actionsList}\n onChange={(value) => {\n this.setState({expireAction: value, attribute: 'action'})\n }}\n />\n {expireAction.includes('category') &&\n (\n (isEmpty(keys(categoriesList)) && (\n <Fragment>\n {config.strings.loading + ` (${taxonomy})`}\n <Spinner/>\n </Fragment>\n ))\n ||\n (\n <FormTokenField\n label={config.strings.expirationCategories + ` (${taxonomy})`}\n value={selectedCats}\n suggestions={Object.keys(categoriesList)}\n onChange={(value) => {\n this.setState({\n categories: this.selectCategories(value),\n attribute: 'category'\n })\n }}\n maxSuggestions={10}\n />\n )\n )}\n </Fragment>\n )}\n </PluginDocumentSettingPanel>\n );\n }\n\n // what action to take on expiration\n getExpireType(postMeta) {\n let typeNew = postMeta['_expiration-date-type'];\n let typeOld = postMeta['_expiration-date-options'] && postMeta['_expiration-date-options']['expireType'];\n\n\n\n if (typeNew) {\n return typeNew;\n }\n\n if (typeOld) {\n return typeOld;\n }\n\n if (config && config.defaults && config.defaults.expireType) {\n return config.defaults.expireType;\n }\n\n return 'draft';\n }\n\n // what categories to add/remove/replace\n getCategories(postMeta) {\n let categoriesNew = postMeta['_expiration-date-categories'] && postMeta['_expiration-date-categories'];\n let categoriesOld = postMeta['_expiration-date-options'] && postMeta['_expiration-date-options']['category'];\n\n if (typeof categoriesNew === 'object' && categoriesNew.length > 0) {\n return categoriesNew;\n }\n\n if (categoriesOld && typeof categoriesOld !== 'undefined' && typeof categoriesOld !== 'object') {\n categories = [categoriesOld];\n }\n\n return categoriesOld;\n\n }\n\n // fired for the autocomplete\n selectCategories(tokens) {\n const {categoriesList, catIdVsName} = this.state;\n\n var hasNoSuggestion = tokens.some(function (token) {\n return typeof token === 'string' && !categoriesList[token];\n });\n\n if (hasNoSuggestion) {\n return;\n }\n\n var categories = tokens.map(function (token) {\n return typeof token === 'string' ? categoriesList[token] : token;\n })\n\n return categories.map((cat) => cat.id);\n }\n\n getDate(date) {\n let newDate = new Date();\n let browserTimezoneOffset = new Date().getTimezoneOffset() * 60;\n let wpTimezoneOffset = config.timezone_offset * 60;\n newDate.setTime(Date.parse(date));\n newDate.setTime(newDate.getTime() - (browserTimezoneOffset + wpTimezoneOffset) * 1000);\n return ((newDate.getTime()) / 1000);\n }\n\n }\n\n registerPlugin('postexpirator-sidebar', {\n render: PostExpiratorSidebar\n });\n\n\n})(window.wp, window.postExpiratorPanelConfig);\n"],"sourceRoot":""}
assets/jsx/gutenberg-panel.jsx CHANGED
@@ -38,12 +38,15 @@
38
  enabled = true;
39
  }
40
 
 
 
 
41
  if (postMeta['_expiration-date']) {
42
- date.setTime((postMeta['_expiration-date'] + date.getTimezoneOffset() * 60) * 1000);
43
  } else {
44
  categories = config.default_categories;
45
  if (config.default_date) {
46
- date.setTime((parseInt(config.default_date) + date.getTimezoneOffset() * 60) * 1000);
47
  }
48
  }
49
 
@@ -177,7 +180,7 @@
177
  <DateTimePicker
178
  currentDate={date}
179
  onChange={(value) => this.setState({date: value, attribute: 'date'})}
180
- is12Hour={config.is12Hour}
181
  />
182
  </PanelRow>
183
  <SelectControl
@@ -278,8 +281,10 @@
278
 
279
  getDate(date) {
280
  let newDate = new Date();
 
 
281
  newDate.setTime(Date.parse(date));
282
- newDate.setTime(newDate.getTime() - new Date().getTimezoneOffset() * 60 * 1000);
283
  return ((newDate.getTime()) / 1000);
284
  }
285
 
38
  enabled = true;
39
  }
40
 
41
+ let browserTimezoneOffset = date.getTimezoneOffset() * 60;
42
+ let wpTimezoneOffset = config.timezone_offset * 60;
43
+
44
  if (postMeta['_expiration-date']) {
45
+ date.setTime((postMeta['_expiration-date'] + browserTimezoneOffset + wpTimezoneOffset) * 1000);
46
  } else {
47
  categories = config.default_categories;
48
  if (config.default_date) {
49
+ date.setTime((parseInt(config.default_date) + browserTimezoneOffset + wpTimezoneOffset) * 1000);
50
  }
51
  }
52
 
180
  <DateTimePicker
181
  currentDate={date}
182
  onChange={(value) => this.setState({date: value, attribute: 'date'})}
183
+ is_12_hours={config.is_12_hours}
184
  />
185
  </PanelRow>
186
  <SelectControl
281
 
282
  getDate(date) {
283
  let newDate = new Date();
284
+ let browserTimezoneOffset = new Date().getTimezoneOffset() * 60;
285
+ let wpTimezoneOffset = config.timezone_offset * 60;
286
  newDate.setTime(Date.parse(date));
287
+ newDate.setTime(newDate.getTime() - (browserTimezoneOffset + wpTimezoneOffset) * 1000);
288
  return ((newDate.getTime()) / 1000);
289
  }
290
 
classes/Display.class.php CHANGED
@@ -157,6 +157,7 @@ class PostExpirator_Display
157
  update_option('expirationdateFooterContents', $_POST['expired-footer-contents']);
158
  update_option('expirationdateFooterStyle', $_POST['expired-footer-style']);
159
  update_option('expirationdateGutenbergSupport', $_POST['gutenberg-support']);
 
160
  update_option(
161
  'expirationdateCategoryDefaults',
162
  isset($_POST['expirationdate_category']) ? $_POST['expirationdate_category'] : array()
@@ -294,7 +295,7 @@ class PostExpirator_Display
294
  _e('Debugging Enabled', 'post-expirator');
295
  echo '</p></div>';
296
  } elseif (isset($_POST['purge-debug'])) {
297
- require_once(plugin_dir_path(__FILE__) . 'post-expirator-debug.php');
298
  $debug = new PostExpiratorDebug();
299
  $debug->purge();
300
  echo "<div id='message' class='updated fade'><p>";
157
  update_option('expirationdateFooterContents', $_POST['expired-footer-contents']);
158
  update_option('expirationdateFooterStyle', $_POST['expired-footer-style']);
159
  update_option('expirationdateGutenbergSupport', $_POST['gutenberg-support']);
160
+ update_option('expirationdatePreserveData', (bool)$_POST['expired-preserve-data-deactivating']);
161
  update_option(
162
  'expirationdateCategoryDefaults',
163
  isset($_POST['expirationdate_category']) ? $_POST['expirationdate_category'] : array()
295
  _e('Debugging Enabled', 'post-expirator');
296
  echo '</p></div>';
297
  } elseif (isset($_POST['purge-debug'])) {
298
+ require_once(POSTEXPIRATOR_BASEDIR . '/post-expirator-debug.php');
299
  $debug = new PostExpiratorDebug();
300
  $debug->purge();
301
  echo "<div id='message' class='updated fade'><p>";
classes/Facade.class.php CHANGED
@@ -358,7 +358,8 @@ class PostExpirator_Facade
358
  'defaults' => $defaults,
359
  'default_date' => $default_expiry['ts'],
360
  'default_categories' => get_option('expirationdateCategoryDefaults'),
361
- 'is12Hour' => get_option('time_format') !== 'H:i',
 
362
  'strings' => [
363
  'category' => __('Category'),
364
  'draft' => __('Draft', 'post-expirator'),
358
  'defaults' => $defaults,
359
  'default_date' => $default_expiry['ts'],
360
  'default_categories' => get_option('expirationdateCategoryDefaults'),
361
+ 'is_12_hours' => get_option('time_format') !== 'H:i',
362
+ 'timezone_offset' => PostExpirator_Util::get_timezone_offset() / 60,
363
  'strings' => [
364
  'category' => __('Category'),
365
  'draft' => __('Draft', 'post-expirator'),
classes/Util.class.php CHANGED
@@ -51,4 +51,31 @@ class PostExpirator_Util
51
 
52
  return false;
53
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
51
 
52
  return false;
53
  }
54
+
55
+ public static function wp_timezone_string()
56
+ {
57
+ $tzString = wp_timezone_string();
58
+
59
+ if (substr_count($tzString, ':')) {
60
+ $tzString = 'UTC ' . $tzString;
61
+ }
62
+
63
+ return $tzString;
64
+ }
65
+
66
+ public static function get_timezone_offset()
67
+ {
68
+ $timezone = wp_timezone();
69
+
70
+ return $timezone->getOffset(new DateTime());
71
+ }
72
+
73
+ public static function get_wp_date($format, $timestamp)
74
+ {
75
+ $gmtTime = gmdate('Y-m-d H:i:s', $timestamp);
76
+ $timezone = wp_timezone();
77
+ $datetime = date_create($gmtTime, new DateTimeZone('+0:00'));
78
+
79
+ return wp_date($format, $datetime->getTimestamp(), $timezone);
80
+ }
81
  }
composer.json CHANGED
@@ -46,7 +46,8 @@
46
  "phpmd/phpmd": "^2.8",
47
  "squizlabs/php_codesniffer": "^3.5",
48
  "sebastian/phpcpd": "^5.0",
49
- "overtrue/phplint": "^2.1"
 
50
  },
51
  "require": {
52
  "publishpress/wordpress-reviews": "^1.1"
46
  "phpmd/phpmd": "^2.8",
47
  "squizlabs/php_codesniffer": "^3.5",
48
  "sebastian/phpcpd": "^5.0",
49
+ "overtrue/phplint": "^2.1",
50
+ "wp-cli/i18n-command": "^2.2"
51
  },
52
  "require": {
53
  "publishpress/wordpress-reviews": "^1.1"
composer.lock CHANGED
@@ -4,20 +4,20 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "abf095edcee978db708c437a7ebb65b1",
8
  "packages": [
9
  {
10
  "name": "publishpress/wordpress-reviews",
11
- "version": "v1.1.11",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/publishpress/wordpress-reviews.git",
15
- "reference": "eb913d04f5cc18769b9b415324305a2f9695d30e"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/publishpress/wordpress-reviews/zipball/eb913d04f5cc18769b9b415324305a2f9695d30e",
20
- "reference": "eb913d04f5cc18769b9b415324305a2f9695d30e",
21
  "shasum": ""
22
  },
23
  "require": {
@@ -55,9 +55,9 @@
55
  ],
56
  "support": {
57
  "issues": "https://github.com/publishpress/wordpress-reviews/issues",
58
- "source": "https://github.com/publishpress/wordpress-reviews/tree/v1.1.11"
59
  },
60
- "time": "2021-10-26T15:47:36+00:00"
61
  }
62
  ],
63
  "packages-dev": [
@@ -707,16 +707,16 @@
707
  },
708
  {
709
  "name": "codeception/module-rest",
710
- "version": "1.3.2",
711
  "source": {
712
  "type": "git",
713
  "url": "https://github.com/Codeception/module-rest.git",
714
- "reference": "2f35e75d4a5a7fd1fe77d7f5bd56a9123c453e3b"
715
  },
716
  "dist": {
717
  "type": "zip",
718
- "url": "https://api.github.com/repos/Codeception/module-rest/zipball/2f35e75d4a5a7fd1fe77d7f5bd56a9123c453e3b",
719
- "reference": "2f35e75d4a5a7fd1fe77d7f5bd56a9123c453e3b",
720
  "shasum": ""
721
  },
722
  "require": {
@@ -755,9 +755,9 @@
755
  ],
756
  "support": {
757
  "issues": "https://github.com/Codeception/module-rest/issues",
758
- "source": "https://github.com/Codeception/module-rest/tree/1.3.2"
759
  },
760
- "time": "2021-10-08T09:33:46+00:00"
761
  },
762
  {
763
  "name": "codeception/module-webdriver",
@@ -1796,6 +1796,161 @@
1796
  ],
1797
  "time": "2020-11-10T18:47:58+00:00"
1798
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1799
  {
1800
  "name": "grasmash/expander",
1801
  "version": "1.0.0",
@@ -2172,16 +2327,16 @@
2172
  },
2173
  {
2174
  "name": "illuminate/collections",
2175
- "version": "v8.69.0",
2176
  "source": {
2177
  "type": "git",
2178
  "url": "https://github.com/illuminate/collections.git",
2179
- "reference": "05f286ec5fd2dd286e8384577047efc375c8954c"
2180
  },
2181
  "dist": {
2182
  "type": "zip",
2183
- "url": "https://api.github.com/repos/illuminate/collections/zipball/05f286ec5fd2dd286e8384577047efc375c8954c",
2184
- "reference": "05f286ec5fd2dd286e8384577047efc375c8954c",
2185
  "shasum": ""
2186
  },
2187
  "require": {
@@ -2222,20 +2377,20 @@
2222
  "issues": "https://github.com/laravel/framework/issues",
2223
  "source": "https://github.com/laravel/framework"
2224
  },
2225
- "time": "2021-10-22T18:01:46+00:00"
2226
  },
2227
  {
2228
  "name": "illuminate/contracts",
2229
- "version": "v8.69.0",
2230
  "source": {
2231
  "type": "git",
2232
  "url": "https://github.com/illuminate/contracts.git",
2233
- "reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0"
2234
  },
2235
  "dist": {
2236
  "type": "zip",
2237
- "url": "https://api.github.com/repos/illuminate/contracts/zipball/e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
2238
- "reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
2239
  "shasum": ""
2240
  },
2241
  "require": {
@@ -2270,20 +2425,20 @@
2270
  "issues": "https://github.com/laravel/framework/issues",
2271
  "source": "https://github.com/laravel/framework"
2272
  },
2273
- "time": "2021-10-22T18:01:46+00:00"
2274
  },
2275
  {
2276
  "name": "illuminate/macroable",
2277
- "version": "v8.69.0",
2278
  "source": {
2279
  "type": "git",
2280
  "url": "https://github.com/illuminate/macroable.git",
2281
- "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05"
2282
  },
2283
  "dist": {
2284
  "type": "zip",
2285
- "url": "https://api.github.com/repos/illuminate/macroable/zipball/300aa13c086f25116b5f3cde3ca54ff5c822fb05",
2286
- "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05",
2287
  "shasum": ""
2288
  },
2289
  "require": {
@@ -2316,20 +2471,20 @@
2316
  "issues": "https://github.com/laravel/framework/issues",
2317
  "source": "https://github.com/laravel/framework"
2318
  },
2319
- "time": "2020-10-27T15:20:30+00:00"
2320
  },
2321
  {
2322
  "name": "illuminate/support",
2323
- "version": "v8.69.0",
2324
  "source": {
2325
  "type": "git",
2326
  "url": "https://github.com/illuminate/support.git",
2327
- "reference": "a8851b7001530d3c11626a81449ed9b63dd10db7"
2328
  },
2329
  "dist": {
2330
  "type": "zip",
2331
- "url": "https://api.github.com/repos/illuminate/support/zipball/a8851b7001530d3c11626a81449ed9b63dd10db7",
2332
- "reference": "a8851b7001530d3c11626a81449ed9b63dd10db7",
2333
  "shasum": ""
2334
  },
2335
  "require": {
@@ -2384,7 +2539,7 @@
2384
  "issues": "https://github.com/laravel/framework/issues",
2385
  "source": "https://github.com/laravel/framework"
2386
  },
2387
- "time": "2021-10-29T13:34:03+00:00"
2388
  },
2389
  {
2390
  "name": "justinrainbow/json-schema",
@@ -2537,16 +2692,16 @@
2537
  },
2538
  {
2539
  "name": "lucatume/wp-browser",
2540
- "version": "3.0.12",
2541
  "source": {
2542
  "type": "git",
2543
  "url": "https://github.com/lucatume/wp-browser.git",
2544
- "reference": "f6e8d3b38e2b457057262d414a1a69270521dcbd"
2545
  },
2546
  "dist": {
2547
  "type": "zip",
2548
- "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/f6e8d3b38e2b457057262d414a1a69270521dcbd",
2549
- "reference": "f6e8d3b38e2b457057262d414a1a69270521dcbd",
2550
  "shasum": ""
2551
  },
2552
  "require": {
@@ -2555,7 +2710,6 @@
2555
  "codeception/codeception": "^2.5 || ^3.0 || ^4.0",
2556
  "dg/mysql-dump": "^1.3",
2557
  "ext-fileinfo": "*",
2558
- "ext-iconv": "*",
2559
  "ext-json": "*",
2560
  "ext-pdo": "*",
2561
  "mikehaertl/php-shellcommand": "^1.6",
@@ -2619,7 +2773,7 @@
2619
  ],
2620
  "support": {
2621
  "issues": "https://github.com/lucatume/wp-browser/issues",
2622
- "source": "https://github.com/lucatume/wp-browser/tree/3.0.12"
2623
  },
2624
  "funding": [
2625
  {
@@ -2627,7 +2781,56 @@
2627
  "type": "github"
2628
  }
2629
  ],
2630
- "time": "2021-10-30T16:28:12+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2631
  },
2632
  {
2633
  "name": "mikehaertl/php-shellcommand",
@@ -2963,16 +3166,16 @@
2963
  },
2964
  {
2965
  "name": "nesbot/carbon",
2966
- "version": "2.53.1",
2967
  "source": {
2968
  "type": "git",
2969
  "url": "https://github.com/briannesbitt/Carbon.git",
2970
- "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045"
2971
  },
2972
  "dist": {
2973
  "type": "zip",
2974
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045",
2975
- "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045",
2976
  "shasum": ""
2977
  },
2978
  "require": {
@@ -2983,6 +3186,7 @@
2983
  "symfony/translation": "^3.4 || ^4.0 || ^5.0"
2984
  },
2985
  "require-dev": {
 
2986
  "doctrine/orm": "^2.7",
2987
  "friendsofphp/php-cs-fixer": "^3.0",
2988
  "kylekatarnls/multi-tester": "^2.0",
@@ -3053,7 +3257,7 @@
3053
  "type": "tidelift"
3054
  }
3055
  ],
3056
- "time": "2021-09-06T09:29:23+00:00"
3057
  },
3058
  {
3059
  "name": "overtrue/phplint",
@@ -3177,16 +3381,16 @@
3177
  },
3178
  {
3179
  "name": "pdepend/pdepend",
3180
- "version": "2.10.1",
3181
  "source": {
3182
  "type": "git",
3183
  "url": "https://github.com/pdepend/pdepend.git",
3184
- "reference": "30452fdabb3dfca89f4bf977abc44adc5391e062"
3185
  },
3186
  "dist": {
3187
  "type": "zip",
3188
- "url": "https://api.github.com/repos/pdepend/pdepend/zipball/30452fdabb3dfca89f4bf977abc44adc5391e062",
3189
- "reference": "30452fdabb3dfca89f4bf977abc44adc5391e062",
3190
  "shasum": ""
3191
  },
3192
  "require": {
@@ -3222,7 +3426,7 @@
3222
  "description": "Official version of pdepend to be handled with Composer",
3223
  "support": {
3224
  "issues": "https://github.com/pdepend/pdepend/issues",
3225
- "source": "https://github.com/pdepend/pdepend/tree/2.10.1"
3226
  },
3227
  "funding": [
3228
  {
@@ -3230,7 +3434,7 @@
3230
  "type": "tidelift"
3231
  }
3232
  ],
3233
- "time": "2021-10-11T12:15:18+00:00"
3234
  },
3235
  {
3236
  "name": "phar-io/manifest",
@@ -4258,20 +4462,20 @@
4258
  },
4259
  {
4260
  "name": "psr/container",
4261
- "version": "1.1.1",
4262
  "source": {
4263
  "type": "git",
4264
  "url": "https://github.com/php-fig/container.git",
4265
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
4266
  },
4267
  "dist": {
4268
  "type": "zip",
4269
- "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
4270
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
4271
  "shasum": ""
4272
  },
4273
  "require": {
4274
- "php": ">=7.2.0"
4275
  },
4276
  "type": "library",
4277
  "autoload": {
@@ -4300,9 +4504,9 @@
4300
  ],
4301
  "support": {
4302
  "issues": "https://github.com/php-fig/container/issues",
4303
- "source": "https://github.com/php-fig/container/tree/1.1.1"
4304
  },
4305
- "time": "2021-03-05T17:36:06+00:00"
4306
  },
4307
  {
4308
  "name": "psr/event-dispatcher",
@@ -5074,16 +5278,16 @@
5074
  },
5075
  {
5076
  "name": "sebastian/exporter",
5077
- "version": "4.0.3",
5078
  "source": {
5079
  "type": "git",
5080
  "url": "https://github.com/sebastianbergmann/exporter.git",
5081
- "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
5082
  },
5083
  "dist": {
5084
  "type": "zip",
5085
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
5086
- "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
5087
  "shasum": ""
5088
  },
5089
  "require": {
@@ -5132,14 +5336,14 @@
5132
  }
5133
  ],
5134
  "description": "Provides the functionality to export PHP variables for visualization",
5135
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
5136
  "keywords": [
5137
  "export",
5138
  "exporter"
5139
  ],
5140
  "support": {
5141
  "issues": "https://github.com/sebastianbergmann/exporter/issues",
5142
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
5143
  },
5144
  "funding": [
5145
  {
@@ -5147,7 +5351,7 @@
5147
  "type": "github"
5148
  }
5149
  ],
5150
- "time": "2020-09-28T05:24:23+00:00"
5151
  },
5152
  {
5153
  "name": "sebastian/finder-facade",
@@ -7916,6 +8120,70 @@
7916
  },
7917
  "time": "2021-03-09T10:59:23+00:00"
7918
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7919
  {
7920
  "name": "wp-cli/mustangostang-spyc",
7921
  "version": "0.6.3",
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "fd7abb5de39ada33785fa64b968221d0",
8
  "packages": [
9
  {
10
  "name": "publishpress/wordpress-reviews",
11
+ "version": "v1.1.13",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/publishpress/wordpress-reviews.git",
15
+ "reference": "6eb69db653b5df376a81571153eacd2da0f5524b"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/publishpress/wordpress-reviews/zipball/6eb69db653b5df376a81571153eacd2da0f5524b",
20
+ "reference": "6eb69db653b5df376a81571153eacd2da0f5524b",
21
  "shasum": ""
22
  },
23
  "require": {
55
  ],
56
  "support": {
57
  "issues": "https://github.com/publishpress/wordpress-reviews/issues",
58
+ "source": "https://github.com/publishpress/wordpress-reviews/tree/v1.1.13"
59
  },
60
+ "time": "2021-11-16T19:29:19+00:00"
61
  }
62
  ],
63
  "packages-dev": [
707
  },
708
  {
709
  "name": "codeception/module-rest",
710
+ "version": "1.4.1",
711
  "source": {
712
  "type": "git",
713
  "url": "https://github.com/Codeception/module-rest.git",
714
+ "reference": "14e638e6a66f6910ce0b8fb4cc83bb8ada680933"
715
  },
716
  "dist": {
717
  "type": "zip",
718
+ "url": "https://api.github.com/repos/Codeception/module-rest/zipball/14e638e6a66f6910ce0b8fb4cc83bb8ada680933",
719
+ "reference": "14e638e6a66f6910ce0b8fb4cc83bb8ada680933",
720
  "shasum": ""
721
  },
722
  "require": {
755
  ],
756
  "support": {
757
  "issues": "https://github.com/Codeception/module-rest/issues",
758
+ "source": "https://github.com/Codeception/module-rest/tree/1.4.1"
759
  },
760
+ "time": "2021-11-17T12:05:51+00:00"
761
  },
762
  {
763
  "name": "codeception/module-webdriver",
1796
  ],
1797
  "time": "2020-11-10T18:47:58+00:00"
1798
  },
1799
+ {
1800
+ "name": "gettext/gettext",
1801
+ "version": "v4.8.6",
1802
+ "source": {
1803
+ "type": "git",
1804
+ "url": "https://github.com/php-gettext/Gettext.git",
1805
+ "reference": "bbeb8f4d3077663739aecb4551b22e720c0e9efe"
1806
+ },
1807
+ "dist": {
1808
+ "type": "zip",
1809
+ "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/bbeb8f4d3077663739aecb4551b22e720c0e9efe",
1810
+ "reference": "bbeb8f4d3077663739aecb4551b22e720c0e9efe",
1811
+ "shasum": ""
1812
+ },
1813
+ "require": {
1814
+ "gettext/languages": "^2.3",
1815
+ "php": ">=5.4.0"
1816
+ },
1817
+ "require-dev": {
1818
+ "illuminate/view": "^5.0.x-dev",
1819
+ "phpunit/phpunit": "^4.8|^5.7|^6.5",
1820
+ "squizlabs/php_codesniffer": "^3.0",
1821
+ "symfony/yaml": "~2",
1822
+ "twig/extensions": "*",
1823
+ "twig/twig": "^1.31|^2.0"
1824
+ },
1825
+ "suggest": {
1826
+ "illuminate/view": "Is necessary if you want to use the Blade extractor",
1827
+ "symfony/yaml": "Is necessary if you want to use the Yaml extractor/generator",
1828
+ "twig/extensions": "Is necessary if you want to use the Twig extractor",
1829
+ "twig/twig": "Is necessary if you want to use the Twig extractor"
1830
+ },
1831
+ "type": "library",
1832
+ "autoload": {
1833
+ "psr-4": {
1834
+ "Gettext\\": "src"
1835
+ }
1836
+ },
1837
+ "notification-url": "https://packagist.org/downloads/",
1838
+ "license": [
1839
+ "MIT"
1840
+ ],
1841
+ "authors": [
1842
+ {
1843
+ "name": "Oscar Otero",
1844
+ "email": "oom@oscarotero.com",
1845
+ "homepage": "http://oscarotero.com",
1846
+ "role": "Developer"
1847
+ }
1848
+ ],
1849
+ "description": "PHP gettext manager",
1850
+ "homepage": "https://github.com/oscarotero/Gettext",
1851
+ "keywords": [
1852
+ "JS",
1853
+ "gettext",
1854
+ "i18n",
1855
+ "mo",
1856
+ "po",
1857
+ "translation"
1858
+ ],
1859
+ "support": {
1860
+ "email": "oom@oscarotero.com",
1861
+ "issues": "https://github.com/oscarotero/Gettext/issues",
1862
+ "source": "https://github.com/php-gettext/Gettext/tree/v4.8.6"
1863
+ },
1864
+ "funding": [
1865
+ {
1866
+ "url": "https://paypal.me/oscarotero",
1867
+ "type": "custom"
1868
+ },
1869
+ {
1870
+ "url": "https://github.com/oscarotero",
1871
+ "type": "github"
1872
+ },
1873
+ {
1874
+ "url": "https://www.patreon.com/misteroom",
1875
+ "type": "patreon"
1876
+ }
1877
+ ],
1878
+ "time": "2021-10-19T10:44:53+00:00"
1879
+ },
1880
+ {
1881
+ "name": "gettext/languages",
1882
+ "version": "2.9.0",
1883
+ "source": {
1884
+ "type": "git",
1885
+ "url": "https://github.com/php-gettext/Languages.git",
1886
+ "reference": "ed56dd2c7f4024cc953ed180d25f02f2640e3ffa"
1887
+ },
1888
+ "dist": {
1889
+ "type": "zip",
1890
+ "url": "https://api.github.com/repos/php-gettext/Languages/zipball/ed56dd2c7f4024cc953ed180d25f02f2640e3ffa",
1891
+ "reference": "ed56dd2c7f4024cc953ed180d25f02f2640e3ffa",
1892
+ "shasum": ""
1893
+ },
1894
+ "require": {
1895
+ "php": ">=5.3"
1896
+ },
1897
+ "require-dev": {
1898
+ "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5 || ^8.4"
1899
+ },
1900
+ "bin": [
1901
+ "bin/export-plural-rules"
1902
+ ],
1903
+ "type": "library",
1904
+ "autoload": {
1905
+ "psr-4": {
1906
+ "Gettext\\Languages\\": "src/"
1907
+ }
1908
+ },
1909
+ "notification-url": "https://packagist.org/downloads/",
1910
+ "license": [
1911
+ "MIT"
1912
+ ],
1913
+ "authors": [
1914
+ {
1915
+ "name": "Michele Locati",
1916
+ "email": "mlocati@gmail.com",
1917
+ "role": "Developer"
1918
+ }
1919
+ ],
1920
+ "description": "gettext languages with plural rules",
1921
+ "homepage": "https://github.com/php-gettext/Languages",
1922
+ "keywords": [
1923
+ "cldr",
1924
+ "i18n",
1925
+ "internationalization",
1926
+ "l10n",
1927
+ "language",
1928
+ "languages",
1929
+ "localization",
1930
+ "php",
1931
+ "plural",
1932
+ "plural rules",
1933
+ "plurals",
1934
+ "translate",
1935
+ "translations",
1936
+ "unicode"
1937
+ ],
1938
+ "support": {
1939
+ "issues": "https://github.com/php-gettext/Languages/issues",
1940
+ "source": "https://github.com/php-gettext/Languages/tree/2.9.0"
1941
+ },
1942
+ "funding": [
1943
+ {
1944
+ "url": "https://paypal.me/mlocati",
1945
+ "type": "custom"
1946
+ },
1947
+ {
1948
+ "url": "https://github.com/mlocati",
1949
+ "type": "github"
1950
+ }
1951
+ ],
1952
+ "time": "2021-11-11T17:30:39+00:00"
1953
+ },
1954
  {
1955
  "name": "grasmash/expander",
1956
  "version": "1.0.0",
2327
  },
2328
  {
2329
  "name": "illuminate/collections",
2330
+ "version": "v8.72.0",
2331
  "source": {
2332
  "type": "git",
2333
  "url": "https://github.com/illuminate/collections.git",
2334
+ "reference": "bfb57bc1863689058706eb41287b7ad523d74403"
2335
  },
2336
  "dist": {
2337
  "type": "zip",
2338
+ "url": "https://api.github.com/repos/illuminate/collections/zipball/bfb57bc1863689058706eb41287b7ad523d74403",
2339
+ "reference": "bfb57bc1863689058706eb41287b7ad523d74403",
2340
  "shasum": ""
2341
  },
2342
  "require": {
2377
  "issues": "https://github.com/laravel/framework/issues",
2378
  "source": "https://github.com/laravel/framework"
2379
  },
2380
+ "time": "2021-11-15T14:44:56+00:00"
2381
  },
2382
  {
2383
  "name": "illuminate/contracts",
2384
+ "version": "v8.72.0",
2385
  "source": {
2386
  "type": "git",
2387
  "url": "https://github.com/illuminate/contracts.git",
2388
+ "reference": "b0886ec05a63b204634d64d0b39d5b78a7c06f81"
2389
  },
2390
  "dist": {
2391
  "type": "zip",
2392
+ "url": "https://api.github.com/repos/illuminate/contracts/zipball/b0886ec05a63b204634d64d0b39d5b78a7c06f81",
2393
+ "reference": "b0886ec05a63b204634d64d0b39d5b78a7c06f81",
2394
  "shasum": ""
2395
  },
2396
  "require": {
2425
  "issues": "https://github.com/laravel/framework/issues",
2426
  "source": "https://github.com/laravel/framework"
2427
  },
2428
+ "time": "2021-11-17T15:04:30+00:00"
2429
  },
2430
  {
2431
  "name": "illuminate/macroable",
2432
+ "version": "v8.72.0",
2433
  "source": {
2434
  "type": "git",
2435
  "url": "https://github.com/illuminate/macroable.git",
2436
+ "reference": "aed81891a6e046fdee72edd497f822190f61c162"
2437
  },
2438
  "dist": {
2439
  "type": "zip",
2440
+ "url": "https://api.github.com/repos/illuminate/macroable/zipball/aed81891a6e046fdee72edd497f822190f61c162",
2441
+ "reference": "aed81891a6e046fdee72edd497f822190f61c162",
2442
  "shasum": ""
2443
  },
2444
  "require": {
2471
  "issues": "https://github.com/laravel/framework/issues",
2472
  "source": "https://github.com/laravel/framework"
2473
  },
2474
+ "time": "2021-11-16T13:57:03+00:00"
2475
  },
2476
  {
2477
  "name": "illuminate/support",
2478
+ "version": "v8.72.0",
2479
  "source": {
2480
  "type": "git",
2481
  "url": "https://github.com/illuminate/support.git",
2482
+ "reference": "bad652d0dfec26e9597ffb292fc728201310c113"
2483
  },
2484
  "dist": {
2485
  "type": "zip",
2486
+ "url": "https://api.github.com/repos/illuminate/support/zipball/bad652d0dfec26e9597ffb292fc728201310c113",
2487
+ "reference": "bad652d0dfec26e9597ffb292fc728201310c113",
2488
  "shasum": ""
2489
  },
2490
  "require": {
2539
  "issues": "https://github.com/laravel/framework/issues",
2540
  "source": "https://github.com/laravel/framework"
2541
  },
2542
+ "time": "2021-11-17T15:04:30+00:00"
2543
  },
2544
  {
2545
  "name": "justinrainbow/json-schema",
2692
  },
2693
  {
2694
  "name": "lucatume/wp-browser",
2695
+ "version": "3.0.13",
2696
  "source": {
2697
  "type": "git",
2698
  "url": "https://github.com/lucatume/wp-browser.git",
2699
+ "reference": "098ba7b6efc880624a504423ad9ce4fdec69f923"
2700
  },
2701
  "dist": {
2702
  "type": "zip",
2703
+ "url": "https://api.github.com/repos/lucatume/wp-browser/zipball/098ba7b6efc880624a504423ad9ce4fdec69f923",
2704
+ "reference": "098ba7b6efc880624a504423ad9ce4fdec69f923",
2705
  "shasum": ""
2706
  },
2707
  "require": {
2710
  "codeception/codeception": "^2.5 || ^3.0 || ^4.0",
2711
  "dg/mysql-dump": "^1.3",
2712
  "ext-fileinfo": "*",
 
2713
  "ext-json": "*",
2714
  "ext-pdo": "*",
2715
  "mikehaertl/php-shellcommand": "^1.6",
2773
  ],
2774
  "support": {
2775
  "issues": "https://github.com/lucatume/wp-browser/issues",
2776
+ "source": "https://github.com/lucatume/wp-browser/tree/3.0.13"
2777
  },
2778
  "funding": [
2779
  {
2781
  "type": "github"
2782
  }
2783
  ],
2784
+ "time": "2021-11-08T09:01:44+00:00"
2785
+ },
2786
+ {
2787
+ "name": "mck89/peast",
2788
+ "version": "v1.13.9",
2789
+ "source": {
2790
+ "type": "git",
2791
+ "url": "https://github.com/mck89/peast.git",
2792
+ "reference": "5329e997fb50e0b82ca8f6e4164f92941f689b47"
2793
+ },
2794
+ "dist": {
2795
+ "type": "zip",
2796
+ "url": "https://api.github.com/repos/mck89/peast/zipball/5329e997fb50e0b82ca8f6e4164f92941f689b47",
2797
+ "reference": "5329e997fb50e0b82ca8f6e4164f92941f689b47",
2798
+ "shasum": ""
2799
+ },
2800
+ "require": {
2801
+ "php": ">=5.4.0"
2802
+ },
2803
+ "require-dev": {
2804
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
2805
+ },
2806
+ "type": "library",
2807
+ "extra": {
2808
+ "branch-alias": {
2809
+ "dev-master": "1.13.9-dev"
2810
+ }
2811
+ },
2812
+ "autoload": {
2813
+ "psr-4": {
2814
+ "Peast\\": "lib/Peast/",
2815
+ "Peast\\test\\": "test/Peast/"
2816
+ }
2817
+ },
2818
+ "notification-url": "https://packagist.org/downloads/",
2819
+ "license": [
2820
+ "BSD-3-Clause"
2821
+ ],
2822
+ "authors": [
2823
+ {
2824
+ "name": "Marco Marchiò",
2825
+ "email": "marco.mm89@gmail.com"
2826
+ }
2827
+ ],
2828
+ "description": "Peast is PHP library that generates AST for JavaScript code",
2829
+ "support": {
2830
+ "issues": "https://github.com/mck89/peast/issues",
2831
+ "source": "https://github.com/mck89/peast/tree/v1.13.9"
2832
+ },
2833
+ "time": "2021-11-12T13:44:49+00:00"
2834
  },
2835
  {
2836
  "name": "mikehaertl/php-shellcommand",
3166
  },
3167
  {
3168
  "name": "nesbot/carbon",
3169
+ "version": "2.54.0",
3170
  "source": {
3171
  "type": "git",
3172
  "url": "https://github.com/briannesbitt/Carbon.git",
3173
+ "reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5"
3174
  },
3175
  "dist": {
3176
  "type": "zip",
3177
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/eed83939f1aed3eee517d03a33f5ec587ac529b5",
3178
+ "reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5",
3179
  "shasum": ""
3180
  },
3181
  "require": {
3186
  "symfony/translation": "^3.4 || ^4.0 || ^5.0"
3187
  },
3188
  "require-dev": {
3189
+ "doctrine/dbal": "^2.0 || ^3.0",
3190
  "doctrine/orm": "^2.7",
3191
  "friendsofphp/php-cs-fixer": "^3.0",
3192
  "kylekatarnls/multi-tester": "^2.0",
3257
  "type": "tidelift"
3258
  }
3259
  ],
3260
+ "time": "2021-11-01T21:22:20+00:00"
3261
  },
3262
  {
3263
  "name": "overtrue/phplint",
3381
  },
3382
  {
3383
  "name": "pdepend/pdepend",
3384
+ "version": "2.10.2",
3385
  "source": {
3386
  "type": "git",
3387
  "url": "https://github.com/pdepend/pdepend.git",
3388
+ "reference": "c8c1d2af43fb8c2b5387d50e9c42a9c56de13686"
3389
  },
3390
  "dist": {
3391
  "type": "zip",
3392
+ "url": "https://api.github.com/repos/pdepend/pdepend/zipball/c8c1d2af43fb8c2b5387d50e9c42a9c56de13686",
3393
+ "reference": "c8c1d2af43fb8c2b5387d50e9c42a9c56de13686",
3394
  "shasum": ""
3395
  },
3396
  "require": {
3426
  "description": "Official version of pdepend to be handled with Composer",
3427
  "support": {
3428
  "issues": "https://github.com/pdepend/pdepend/issues",
3429
+ "source": "https://github.com/pdepend/pdepend/tree/2.10.2"
3430
  },
3431
  "funding": [
3432
  {
3434
  "type": "tidelift"
3435
  }
3436
  ],
3437
+ "time": "2021-11-16T20:05:32+00:00"
3438
  },
3439
  {
3440
  "name": "phar-io/manifest",
4462
  },
4463
  {
4464
  "name": "psr/container",
4465
+ "version": "1.1.2",
4466
  "source": {
4467
  "type": "git",
4468
  "url": "https://github.com/php-fig/container.git",
4469
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
4470
  },
4471
  "dist": {
4472
  "type": "zip",
4473
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
4474
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
4475
  "shasum": ""
4476
  },
4477
  "require": {
4478
+ "php": ">=7.4.0"
4479
  },
4480
  "type": "library",
4481
  "autoload": {
4504
  ],
4505
  "support": {
4506
  "issues": "https://github.com/php-fig/container/issues",
4507
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
4508
  },
4509
+ "time": "2021-11-05T16:50:12+00:00"
4510
  },
4511
  {
4512
  "name": "psr/event-dispatcher",
5278
  },
5279
  {
5280
  "name": "sebastian/exporter",
5281
+ "version": "4.0.4",
5282
  "source": {
5283
  "type": "git",
5284
  "url": "https://github.com/sebastianbergmann/exporter.git",
5285
+ "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
5286
  },
5287
  "dist": {
5288
  "type": "zip",
5289
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
5290
+ "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
5291
  "shasum": ""
5292
  },
5293
  "require": {
5336
  }
5337
  ],
5338
  "description": "Provides the functionality to export PHP variables for visualization",
5339
+ "homepage": "https://www.github.com/sebastianbergmann/exporter",
5340
  "keywords": [
5341
  "export",
5342
  "exporter"
5343
  ],
5344
  "support": {
5345
  "issues": "https://github.com/sebastianbergmann/exporter/issues",
5346
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
5347
  },
5348
  "funding": [
5349
  {
5351
  "type": "github"
5352
  }
5353
  ],
5354
+ "time": "2021-11-11T14:18:36+00:00"
5355
  },
5356
  {
5357
  "name": "sebastian/finder-facade",
8120
  },
8121
  "time": "2021-03-09T10:59:23+00:00"
8122
  },
8123
+ {
8124
+ "name": "wp-cli/i18n-command",
8125
+ "version": "v2.2.9",
8126
+ "source": {
8127
+ "type": "git",
8128
+ "url": "https://github.com/wp-cli/i18n-command.git",
8129
+ "reference": "26e171c5708060b6d7cede9af934b946f5ec3a59"
8130
+ },
8131
+ "dist": {
8132
+ "type": "zip",
8133
+ "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/26e171c5708060b6d7cede9af934b946f5ec3a59",
8134
+ "reference": "26e171c5708060b6d7cede9af934b946f5ec3a59",
8135
+ "shasum": ""
8136
+ },
8137
+ "require": {
8138
+ "gettext/gettext": "^4.8",
8139
+ "mck89/peast": "^1.13",
8140
+ "wp-cli/wp-cli": "^2.5"
8141
+ },
8142
+ "require-dev": {
8143
+ "wp-cli/scaffold-command": "^1.2 || ^2",
8144
+ "wp-cli/wp-cli-tests": "^3.0.11"
8145
+ },
8146
+ "suggest": {
8147
+ "ext-mbstring": "Used for calculating include/exclude matches in code extraction"
8148
+ },
8149
+ "type": "wp-cli-package",
8150
+ "extra": {
8151
+ "branch-alias": {
8152
+ "dev-master": "2.x-dev"
8153
+ },
8154
+ "bundled": true,
8155
+ "commands": [
8156
+ "i18n",
8157
+ "i18n make-pot",
8158
+ "i18n make-json"
8159
+ ]
8160
+ },
8161
+ "autoload": {
8162
+ "psr-4": {
8163
+ "WP_CLI\\I18n\\": "src/"
8164
+ },
8165
+ "files": [
8166
+ "i18n-command.php"
8167
+ ]
8168
+ },
8169
+ "notification-url": "https://packagist.org/downloads/",
8170
+ "license": [
8171
+ "MIT"
8172
+ ],
8173
+ "authors": [
8174
+ {
8175
+ "name": "Pascal Birchler",
8176
+ "homepage": "https://pascalbirchler.com/"
8177
+ }
8178
+ ],
8179
+ "description": "Provides internationalization tools for WordPress projects.",
8180
+ "homepage": "https://github.com/wp-cli/i18n-command",
8181
+ "support": {
8182
+ "issues": "https://github.com/wp-cli/i18n-command/issues",
8183
+ "source": "https://github.com/wp-cli/i18n-command/tree/v2.2.9"
8184
+ },
8185
+ "time": "2021-07-20T21:25:54+00:00"
8186
+ },
8187
  {
8188
  "name": "wp-cli/mustangostang-spyc",
8189
  "version": "0.6.3",
languages/post-expirator-pt_BR.mo ADDED
Binary file
languages/post-expirator-pt_BR.po ADDED
@@ -0,0 +1,667 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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PO-Revision-Date: \n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: PostExpirator Translate Team\n"
10
+ "Language: pt_BR\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Generator: Poedit 3.0\n"
15
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
16
+
17
+ #. Plugin Name of the plugin
18
+ #: classes/Display.class.php:50 post-expirator.php:350 views/bulk-edit.php:16
19
+ #: assets/jsx/block.jsx:164
20
+ msgid "Post Expirator"
21
+ msgstr "Post Expirator"
22
+
23
+ #. Plugin URI of the plugin
24
+ msgid "http://wordpress.org/extend/plugins/post-expirator/"
25
+ msgstr "http://wordpress.org/extend/plugins/post-expirator/"
26
+
27
+ #. Description of the plugin
28
+ msgid ""
29
+ "Allows you to add an expiration date (minute) to posts which you can "
30
+ "configure to either delete the post, change it to a draft, or update the "
31
+ "post categories at expiration time."
32
+ msgstr ""
33
+
34
+ #. Author of the plugin
35
+ msgid "PublishPress"
36
+ msgstr "PublishPress"
37
+
38
+ #. Author URI of the plugin
39
+ msgid "http://publishpress.com"
40
+ msgstr "http://publishpress.com"
41
+
42
+ #: classes/Display.class.php:49 views/tabs.php:8
43
+ msgid "Post Expirator Options"
44
+ msgstr "Opções do Post Expirator"
45
+
46
+ #: classes/Display.class.php:190 classes/Display.class.php:263
47
+ msgid "Saved Options!"
48
+ msgstr "Configurações salvas!"
49
+
50
+ #: classes/Display.class.php:289
51
+ msgid "Debugging Disabled"
52
+ msgstr "Depuração Desativada"
53
+
54
+ #: classes/Display.class.php:294
55
+ msgid "Debugging Enabled"
56
+ msgstr "Depuração Ativada"
57
+
58
+ #: classes/Display.class.php:301
59
+ msgid "Debugging Table Emptied"
60
+ msgstr "Tabela de Depuração Esvaziada"
61
+
62
+ #: classes/Display.class.php:317
63
+ msgid ""
64
+ "Below is a dump of the debugging table, this should be useful for "
65
+ "troubleshooting."
66
+ msgstr ""
67
+ "Abaixo está um despejo da tabela de depuração, isso deve ser útil para a "
68
+ "solução de problemas."
69
+
70
+ #: post-expirator-debug.php:77
71
+ msgid "Debugging table is currently empty."
72
+ msgstr "A tabela de depuração está atualmente vazia."
73
+
74
+ #: post-expirator-debug.php:82
75
+ msgid "Timestamp"
76
+ msgstr "Data/Hora"
77
+
78
+ #: post-expirator-debug.php:83
79
+ msgid "Message"
80
+ msgstr "Mensagem"
81
+
82
+ #: post-expirator.php:15
83
+ msgid "l F jS, Y"
84
+ msgstr "l F jS, Y"
85
+
86
+ #: post-expirator.php:16
87
+ msgid "g:ia"
88
+ msgstr "g:ia"
89
+
90
+ #: post-expirator.php:17
91
+ msgid "Post expires at EXPIRATIONTIME on EXPIRATIONDATE"
92
+ msgstr "O post expira às EXPIRATIONTIME do dia EXPIRATIONDATE"
93
+
94
+ #: post-expirator.php:44
95
+ msgid "Settings"
96
+ msgstr "Configurações"
97
+
98
+ #: post-expirator.php:86 post-expirator.php:172
99
+ msgid "Expires"
100
+ msgstr "Expira"
101
+
102
+ #: post-expirator.php:808 post-expirator.php:830 post-expirator.php:852
103
+ #: post-expirator.php:874
104
+ msgid ""
105
+ "%1$s (%2$s) has expired at %3$s. Post status has been successfully changed "
106
+ "to \"%4$s\"."
107
+ msgstr ""
108
+ "%1$s (%2$s) expirou em %3$s. O status do post foi atualizado com sucesso "
109
+ "para \"%4$s\"."
110
+
111
+ #: post-expirator.php:896
112
+ msgid ""
113
+ "%1$s (%2$s) has expired at %3$s. Post \"%4$s\" status has been successfully "
114
+ "set."
115
+ msgstr ""
116
+ "%1$s (%2$s) expirou em %3$s. O status de \"%4$s\" foi definido com sucesso."
117
+
118
+ #: post-expirator.php:915
119
+ msgid ""
120
+ "%1$s (%2$s) has expired at %3$s. Post \"%4$s\" status has been successfully "
121
+ "removed."
122
+ msgstr ""
123
+ "%1$s (%2$s) expirou em %3$s. O status de \"%4$s\" foi removido com sucesso."
124
+
125
+ #: post-expirator.php:941 post-expirator.php:983
126
+ msgid ""
127
+ "%1$s (%2$s) has expired at %3$s. Post \"%4$s\" have now been set to \"%5$s\"."
128
+ msgstr ""
129
+ "%1$s (%2$s) expirou em %3$s. O post \"%4$s\" já foi definido para \"%5$s\"."
130
+
131
+ #: post-expirator.php:1041 post-expirator.php:1084
132
+ msgid ""
133
+ "%1$s (%2$s) has expired at %3$s. The following post \"%4$s\" have now been "
134
+ "added: \"%5$s\". The full list of categories on the post are: \"%6$s\"."
135
+ msgstr ""
136
+ "%1$s (%2$s) expirou em %3$s. O seguinte post \"%4$s\" já foi adicionado: "
137
+ "\"%5$s\". A lista completa das categorias do post é: \"%6$s\"."
138
+
139
+ #: post-expirator.php:1149 post-expirator.php:1199
140
+ msgid ""
141
+ "%1$s (%2$s) has expired at %3$s. The following post \"%4$s\" have now been "
142
+ "removed: \"%5$s\". The full list of categories on the post are: \"%6$s\"."
143
+ msgstr ""
144
+ "%1$s (%2$s) expirou em %3$s. O seguinte post \"%4$s\" já foi removido: \"%5$s"
145
+ "\". A lista completa das categorias no post é: \"%6$s\"."
146
+
147
+ #: post-expirator.php:1251
148
+ msgid "Post Expiration Complete \"%s\""
149
+ msgstr "Expiração do post completo \"%s\""
150
+
151
+ #: post-expirator.php:1927
152
+ msgid ""
153
+ "Select the hierarchical taxonomy to be used for \"category\" based "
154
+ "expiration."
155
+ msgstr ""
156
+ "Selecione a taxonomia hierárquica a ser usada para expiração baseada em "
157
+ "\"categoria\"."
158
+
159
+ #: post-expirator.php:1932
160
+ msgid "No taxonomies found"
161
+ msgstr "Não foram encontradas taxonomias"
162
+
163
+ #: post-expirator.php:1979
164
+ msgid "You're not allowed to set posts to expire"
165
+ msgstr "Você não tem permissão para colocar este post para expirar"
166
+
167
+ #: post-expirator.php:1980
168
+ msgid "Forbidden"
169
+ msgstr "Acesso negado"
170
+
171
+ #: views/bulk-edit.php:21 views/menu-diagnostics.php:64 views/quick-edit.php:14
172
+ msgid "Date"
173
+ msgstr "Data"
174
+
175
+ #: views/bulk-edit.php:24 views/classic-metabox.php:6 views/quick-edit.php:8
176
+ #: assets/jsx/block.jsx:168
177
+ msgid "Enable Post Expiration"
178
+ msgstr "Habilitar Expiração do Post"
179
+
180
+ #: views/bulk-edit.php:28
181
+ msgid "No Change"
182
+ msgstr "Nenhuma alteração"
183
+
184
+ #: views/bulk-edit.php:32
185
+ msgid "Change expiry date if enabled on posts"
186
+ msgstr "Alterar a data de validade se habilitada em postagens"
187
+
188
+ #: views/bulk-edit.php:33
189
+ msgid "Change on posts"
190
+ msgstr "Alteração nos posts"
191
+
192
+ #: views/bulk-edit.php:36
193
+ msgid "Add expiry date if not enabled on posts"
194
+ msgstr "Adicionar data de validade se não estiver habilitado em postagens"
195
+
196
+ #: views/bulk-edit.php:37
197
+ msgid "Add to posts"
198
+ msgstr "Adicionar às postagens"
199
+
200
+ #: views/bulk-edit.php:40
201
+ msgid "Change & Add"
202
+ msgstr "Alterar e Adicionar"
203
+
204
+ #: views/bulk-edit.php:43
205
+ msgid "Remove from posts"
206
+ msgstr "Remover de postagens"
207
+
208
+ #: views/bulk-edit.php:49 views/classic-metabox.php:50 views/quick-edit.php:17
209
+ msgid "Month"
210
+ msgstr "Mês"
211
+
212
+ #: views/bulk-edit.php:73 views/classic-metabox.php:71 views/quick-edit.php:39
213
+ msgid "Day"
214
+ msgstr "Dia"
215
+
216
+ #: views/bulk-edit.php:80 views/classic-metabox.php:22 views/quick-edit.php:46
217
+ msgid "Year"
218
+ msgstr "Ano"
219
+
220
+ #: views/bulk-edit.php:87 views/classic-metabox.php:78 views/quick-edit.php:53
221
+ msgid "Hour"
222
+ msgstr "Hora"
223
+
224
+ #: views/bulk-edit.php:94 views/classic-metabox.php:102 views/quick-edit.php:59
225
+ msgid "Minute"
226
+ msgstr "Minuto"
227
+
228
+ #: views/bulk-edit.php:104 views/quick-edit.php:67
229
+ msgid "Type"
230
+ msgstr "Tipo"
231
+
232
+ #: views/bulk-edit.php:106 views/classic-metabox.php:109
233
+ #: views/menu-defaults.php:93 views/quick-edit.php:69 assets/jsx/block.jsx:185
234
+ msgid "How to expire"
235
+ msgstr "Como expirar"
236
+
237
+ #: views/bulk-edit.php:124 views/classic-metabox.php:127
238
+ #: views/quick-edit.php:85 assets/jsx/block.jsx:203
239
+ msgid "Expiration Categories"
240
+ msgstr "Categorias para expiração"
241
+
242
+ #: views/classic-metabox.php:13
243
+ msgid "The published date/time will be used as the expiration value"
244
+ msgstr "A data/hora publicada será usada como valor de expiração"
245
+
246
+ #: views/classic-metabox.php:135
247
+ msgid ""
248
+ "You must assign a heirarchical taxonomy to this post type to use this "
249
+ "feature."
250
+ msgstr ""
251
+ "Você deve atribuir uma taxonomia herdeira a este tipo de post para usar este "
252
+ "recurso."
253
+
254
+ #: views/classic-metabox.php:140
255
+ msgid ""
256
+ "More than 1 heirachical taxonomy detected. You must assign a default "
257
+ "taxonomy on the settings screen."
258
+ msgstr ""
259
+ "Mais de 1 taxonomia herdônica detectada. Você deve atribuir uma taxonomia "
260
+ "padrão na tela de configurações."
261
+
262
+ #: views/classic-metabox.php:158
263
+ msgid "Taxonomy Name"
264
+ msgstr "Nome da Taxonomia"
265
+
266
+ #: views/expire-column.php:6
267
+ msgid "Never"
268
+ msgstr "Nunca"
269
+
270
+ #: views/how-to-expire.php:27 assets/jsx/block.jsx:142
271
+ msgid "Draft"
272
+ msgstr "Rascunho"
273
+
274
+ #: views/how-to-expire.php:30 assets/jsx/block.jsx:143
275
+ msgid "Delete"
276
+ msgstr "Excluir"
277
+
278
+ #: views/how-to-expire.php:33 assets/jsx/block.jsx:144
279
+ msgid "Trash"
280
+ msgstr "Lixeira"
281
+
282
+ #: views/how-to-expire.php:36 assets/jsx/block.jsx:145
283
+ msgid "Private"
284
+ msgstr "Privado"
285
+
286
+ #: views/how-to-expire.php:39 assets/jsx/block.jsx:146
287
+ msgid "Stick"
288
+ msgstr "Fixar"
289
+
290
+ #: views/how-to-expire.php:42 assets/jsx/block.jsx:147
291
+ msgid "Unstick"
292
+ msgstr "Desafixar"
293
+
294
+ #: views/how-to-expire.php:47 assets/jsx/block.jsx:152
295
+ msgid "Category: Replace"
296
+ msgstr "Categoria: Substituir"
297
+
298
+ #: views/how-to-expire.php:50 assets/jsx/block.jsx:153
299
+ msgid "Category: Add"
300
+ msgstr "Categoria: Adicionar"
301
+
302
+ #: views/how-to-expire.php:53 assets/jsx/block.jsx:154
303
+ msgid "Category: Remove"
304
+ msgstr "Categoria: Remover"
305
+
306
+ #: views/menu-defaults.php:5
307
+ msgid "Default Expiration Values"
308
+ msgstr "Valores de expiração padrão"
309
+
310
+ #: views/menu-defaults.php:8
311
+ msgid ""
312
+ "Use the values below to set the default actions/values to be used for each "
313
+ "for the corresponding post types. These values can all be overwritten when "
314
+ "creating/editing the post/page."
315
+ msgstr ""
316
+ "Use os valores abaixo para definir as ações/valores padrão a serem usados "
317
+ "para cada um para os tipos de postagem correspondentes. Todos esses valores "
318
+ "podem ser substituídos ao criar/editar o post/página."
319
+
320
+ #: views/menu-defaults.php:60 views/menu-defaults.php:71
321
+ msgid "Active"
322
+ msgstr "Ativar"
323
+
324
+ #: views/menu-defaults.php:81
325
+ msgid "Inactive"
326
+ msgstr "Desativar"
327
+
328
+ #: views/menu-defaults.php:83
329
+ msgid ""
330
+ "Select whether the post expirator meta box is active for this post type."
331
+ msgstr ""
332
+ "Selecione se a espiração de post está habilitada para este tipo de post."
333
+
334
+ #: views/menu-defaults.php:102
335
+ msgid "Select the default expire action for the post type."
336
+ msgstr "Selecione a ação padrão para espirar para o tipo de post."
337
+
338
+ #: views/menu-defaults.php:109
339
+ msgid "Auto-Enable?"
340
+ msgstr "Habilitar automaticamente?"
341
+
342
+ #: views/menu-defaults.php:120 views/menu-diagnostics.php:12
343
+ #: views/menu-diagnostics.php:35 views/menu-general.php:226
344
+ #: views/menu-general.php:249 views/menu-general.php:298
345
+ msgid "Enabled"
346
+ msgstr "Habilitar"
347
+
348
+ #: views/menu-defaults.php:130 views/menu-diagnostics.php:16
349
+ #: views/menu-diagnostics.php:37 views/menu-general.php:232
350
+ #: views/menu-general.php:256 views/menu-general.php:304
351
+ msgid "Disabled"
352
+ msgstr "Desabilitar"
353
+
354
+ #: views/menu-defaults.php:132
355
+ msgid "Select whether the post expirator is enabled for all new posts."
356
+ msgstr ""
357
+ "Selecione se o a expiração de posts está ativa para todos os novos posts."
358
+
359
+ #: views/menu-defaults.php:139
360
+ msgid "Taxonomy (hierarchical)"
361
+ msgstr "Taxonomia (hierárquica)"
362
+
363
+ #: views/menu-defaults.php:154 views/menu-general.php:267
364
+ msgid "Who to notify"
365
+ msgstr "A quem notificar"
366
+
367
+ #: views/menu-defaults.php:164
368
+ msgid ""
369
+ "Enter a comma separate list of emails that you would like to be notified "
370
+ "when the post expires."
371
+ msgstr ""
372
+ "Entre com uma lista de emails separada por vírgula que você gostaria que "
373
+ "fossem notificados quanto o post expira."
374
+
375
+ #: views/menu-defaults.php:172 views/menu-general.php:146
376
+ msgid "None"
377
+ msgstr "Nenhum"
378
+
379
+ #: views/menu-defaults.php:173
380
+ msgid "Inherit from General Settings"
381
+ msgstr "Herdado de Configuraçes Gerais"
382
+
383
+ #: views/menu-defaults.php:174 views/menu-defaults.php:216
384
+ #: views/menu-general.php:149 views/menu-general.php:166
385
+ msgid "Custom"
386
+ msgstr "Customizado"
387
+
388
+ #: views/menu-defaults.php:175
389
+ msgid "Publish Time"
390
+ msgstr "Hora de Publicação"
391
+
392
+ #: views/menu-defaults.php:191 views/menu-general.php:139
393
+ msgid "Default Date/Time Duration"
394
+ msgstr ""
395
+
396
+ #: views/menu-defaults.php:226 views/menu-general.php:172
397
+ msgid ""
398
+ "Set the custom value to use for the default expiration date. For "
399
+ "information on formatting, see %1$s. For example, you could enter %2$s+1 "
400
+ "month%3$s or %4$s+1 week 2 days 4 hours 2 seconds%5$s or %6$snext Thursday"
401
+ "%7$s."
402
+ msgstr ""
403
+
404
+ #: views/menu-defaults.php:250 views/menu-general.php:429
405
+ msgid "Save Changes"
406
+ msgstr ""
407
+
408
+ #: views/menu-diagnostics.php:4
409
+ msgid "Advanced Diagnostics"
410
+ msgstr ""
411
+
412
+ #: views/menu-diagnostics.php:8
413
+ msgid "Debug Logging"
414
+ msgstr ""
415
+
416
+ #: views/menu-diagnostics.php:13
417
+ msgid "Disable Debugging"
418
+ msgstr ""
419
+
420
+ #: views/menu-diagnostics.php:14 views/tabs.php:32
421
+ msgid "View Debug Logs"
422
+ msgstr ""
423
+
424
+ #: views/menu-diagnostics.php:17
425
+ msgid "Enable Debugging"
426
+ msgstr ""
427
+
428
+ #: views/menu-diagnostics.php:22 views/menu-diagnostics.php:28
429
+ msgid "Purge Debug Log"
430
+ msgstr ""
431
+
432
+ #: views/menu-diagnostics.php:32
433
+ msgid "WP-Cron Status"
434
+ msgstr ""
435
+
436
+ #: views/menu-diagnostics.php:43
437
+ msgid "Current Cron Schedule"
438
+ msgstr ""
439
+
440
+ #: views/menu-diagnostics.php:51
441
+ msgid "No cron events found for the plugin."
442
+ msgstr ""
443
+
444
+ #: views/menu-diagnostics.php:56
445
+ msgid ""
446
+ "The below table will show all currently scheduled cron events for the plugin "
447
+ "with the next run time."
448
+ msgstr ""
449
+
450
+ #: views/menu-diagnostics.php:65
451
+ msgid "Event"
452
+ msgstr ""
453
+
454
+ #: views/menu-diagnostics.php:66
455
+ msgid "Arguments / Schedule"
456
+ msgstr ""
457
+
458
+ #: views/menu-diagnostics.php:67
459
+ msgid "Post"
460
+ msgstr ""
461
+
462
+ #: views/menu-diagnostics.php:84
463
+ msgid "No Arguments"
464
+ msgstr ""
465
+
466
+ #: views/menu-diagnostics.php:98
467
+ msgid "Single Event"
468
+ msgstr ""
469
+
470
+ #: views/menu-general.php:48
471
+ msgid ""
472
+ "The post expirator plugin sets a custom meta value, and then optionally "
473
+ "allows you to select if you want the post changed to a draft status or "
474
+ "deleted when it expires."
475
+ msgstr ""
476
+
477
+ #: views/menu-general.php:54
478
+ msgid "Shortcode"
479
+ msgstr ""
480
+
481
+ #: views/menu-general.php:56
482
+ msgid "Valid %s attributes:"
483
+ msgstr ""
484
+
485
+ #: views/menu-general.php:61
486
+ msgid ""
487
+ "%1$s - valid options are %2$sfull%3$s (default), %4$sdate%5$s, %6$stime%7$s"
488
+ msgstr ""
489
+
490
+ #: views/menu-general.php:74 views/menu-general.php:81
491
+ msgid "%s - format set here will override the value set on the settings page"
492
+ msgstr ""
493
+
494
+ #: views/menu-general.php:92
495
+ msgid "Defaults"
496
+ msgstr ""
497
+
498
+ #: views/menu-general.php:97
499
+ msgid "Date Format"
500
+ msgstr ""
501
+
502
+ #: views/menu-general.php:107
503
+ msgid ""
504
+ "The default format to use when displaying the expiration date within a post "
505
+ "using the shortcode or within the footer. For information on valid "
506
+ "formatting options, see: %s."
507
+ msgstr ""
508
+
509
+ #: views/menu-general.php:118
510
+ msgid "Time Format"
511
+ msgstr ""
512
+
513
+ #: views/menu-general.php:128
514
+ msgid ""
515
+ "The default format to use when displaying the expiration time within a post "
516
+ "using the shortcode or within the footer. For information on valid "
517
+ "formatting options, see: %s."
518
+ msgstr ""
519
+
520
+ #: views/menu-general.php:152
521
+ msgid "Post/Page Publish Time"
522
+ msgstr ""
523
+
524
+ #: views/menu-general.php:155
525
+ msgid ""
526
+ "Set the default expiration date to be used when creating new posts and "
527
+ "pages. Defaults to none."
528
+ msgstr ""
529
+
530
+ #: views/menu-general.php:189
531
+ msgid "Default Expiration Category"
532
+ msgstr ""
533
+
534
+ #: views/menu-general.php:205
535
+ msgid "Sets the default expiration category for the post."
536
+ msgstr ""
537
+
538
+ #: views/menu-general.php:211
539
+ msgid "Expiration Email Notification"
540
+ msgstr ""
541
+
542
+ #: views/menu-general.php:213
543
+ msgid ""
544
+ "Whenever a post expires, an email can be sent to alert users of the "
545
+ "expiration."
546
+ msgstr ""
547
+
548
+ #: views/menu-general.php:220
549
+ msgid "Enable Email Notification?"
550
+ msgstr ""
551
+
552
+ #: views/menu-general.php:234
553
+ msgid ""
554
+ "This will enable or disable the send of email notification on post "
555
+ "expiration."
556
+ msgstr ""
557
+
558
+ #: views/menu-general.php:242
559
+ msgid "Include Blog Administrators?"
560
+ msgstr ""
561
+
562
+ #: views/menu-general.php:258
563
+ msgid ""
564
+ "This will include all users with the role of \"Administrator\" in the post "
565
+ "expiration email."
566
+ msgstr ""
567
+
568
+ #: views/menu-general.php:274
569
+ msgid ""
570
+ "Enter a comma separate list of emails that you would like to be notified "
571
+ "when the post expires. This will be applied to ALL post types. You can set "
572
+ "post type specific emails on the Defaults tab."
573
+ msgstr ""
574
+
575
+ #: views/menu-general.php:283
576
+ msgid "Post Footer Display"
577
+ msgstr ""
578
+
579
+ #: views/menu-general.php:285
580
+ msgid ""
581
+ "Enabling this below will display the expiration date automatically at the "
582
+ "end of any post which is set to expire."
583
+ msgstr ""
584
+
585
+ #: views/menu-general.php:292
586
+ msgid "Show in post footer?"
587
+ msgstr ""
588
+
589
+ #: views/menu-general.php:306
590
+ msgid ""
591
+ "This will enable or disable displaying the post expiration date in the post "
592
+ "footer."
593
+ msgstr ""
594
+
595
+ #: views/menu-general.php:315
596
+ msgid "Footer Contents"
597
+ msgstr ""
598
+
599
+ #: views/menu-general.php:322
600
+ msgid ""
601
+ "Enter the text you would like to appear at the bottom of every post that "
602
+ "will expire. The following placeholders will be replaced with the post "
603
+ "expiration date in the following format:"
604
+ msgstr ""
605
+
606
+ #: views/menu-general.php:345
607
+ msgid "Footer Style"
608
+ msgstr ""
609
+
610
+ #: views/menu-general.php:352
611
+ msgid "This post will expire on"
612
+ msgstr ""
613
+
614
+ #: views/menu-general.php:355
615
+ msgid "The inline css which will be used to style the footer text."
616
+ msgstr ""
617
+
618
+ #: views/menu-general.php:361
619
+ msgid "Advanced Options"
620
+ msgstr ""
621
+
622
+ #: views/menu-general.php:363
623
+ msgid ""
624
+ "Please do not update anything here unless you know what it entails. For "
625
+ "advanced users only."
626
+ msgstr ""
627
+
628
+ #: views/menu-general.php:373
629
+ msgid "Block Editor Support"
630
+ msgstr ""
631
+
632
+ #: views/menu-general.php:379
633
+ msgid "Show Gutenberg style box"
634
+ msgstr ""
635
+
636
+ #: views/menu-general.php:385
637
+ msgid "Show Classic Editor style box"
638
+ msgstr ""
639
+
640
+ #: views/menu-general.php:387
641
+ msgid ""
642
+ "Toggle between native support for the Block Editor or the backward "
643
+ "compatible Classic Editor style metabox."
644
+ msgstr ""
645
+
646
+ #: views/menu-general.php:396
647
+ msgid "Choose which user roles can use Post Expirator"
648
+ msgstr ""
649
+
650
+ #: views/tabs.php:15
651
+ msgid "General Settings"
652
+ msgstr ""
653
+
654
+ #: views/tabs.php:20
655
+ msgid "Post Types"
656
+ msgstr ""
657
+
658
+ #: views/tabs.php:25
659
+ msgid "Diagnostics"
660
+ msgstr ""
661
+
662
+ #: assets/jsx/block.jsx:196
663
+ msgid "Loading"
664
+ msgstr ""
665
+
666
+ #~ msgid "[%1$s] %2$s"
667
+ #~ msgstr "[%1$s] %2$s"
languages/post-expirator.pot CHANGED
@@ -2,23 +2,23 @@
2
  # This file is distributed under the same license as the Post Expirator plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Post Expirator 2.6.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/publishpress-future\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-11-02T20:47:14-03:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: post-expirator\n"
16
 
17
  #. Plugin Name of the plugin
18
  #: classes/Display.class.php:50
 
19
  #: post-expirator.php:350
20
  #: views/bulk-edit.php:16
21
- #: assets/jsx/block.jsx:164
22
  msgid "Post Expirator"
23
  msgstr ""
24
 
@@ -43,27 +43,98 @@ msgstr ""
43
  msgid "Post Expirator Options"
44
  msgstr ""
45
 
46
- #: classes/Display.class.php:190
47
- #: classes/Display.class.php:263
48
  msgid "Saved Options!"
49
  msgstr ""
50
 
51
- #: classes/Display.class.php:289
52
  msgid "Debugging Disabled"
53
  msgstr ""
54
 
55
- #: classes/Display.class.php:294
56
  msgid "Debugging Enabled"
57
  msgstr ""
58
 
59
- #: classes/Display.class.php:301
60
  msgid "Debugging Table Emptied"
61
  msgstr ""
62
 
63
- #: classes/Display.class.php:317
64
  msgid "Below is a dump of the debugging table, this should be useful for troubleshooting."
65
  msgstr ""
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  #: post-expirator-debug.php:77
68
  msgid "Debugging table is currently empty."
69
  msgstr ""
@@ -131,19 +202,19 @@ msgstr ""
131
  msgid "Post Expiration Complete \"%s\""
132
  msgstr ""
133
 
134
- #: post-expirator.php:1927
135
  msgid "Select the hierarchical taxonomy to be used for \"category\" based expiration."
136
  msgstr ""
137
 
138
- #: post-expirator.php:1932
139
  msgid "No taxonomies found"
140
  msgstr ""
141
 
142
- #: post-expirator.php:1979
143
  msgid "You're not allowed to set posts to expire"
144
  msgstr ""
145
 
146
- #: post-expirator.php:1980
147
  msgid "Forbidden"
148
  msgstr ""
149
 
@@ -153,13 +224,6 @@ msgstr ""
153
  msgid "Date"
154
  msgstr ""
155
 
156
- #: views/bulk-edit.php:24
157
- #: views/classic-metabox.php:6
158
- #: views/quick-edit.php:8
159
- #: assets/jsx/block.jsx:168
160
- msgid "Enable Post Expiration"
161
- msgstr ""
162
-
163
  #: views/bulk-edit.php:28
164
  msgid "No Change"
165
  msgstr ""
@@ -218,24 +282,9 @@ msgstr ""
218
  msgid "Minute"
219
  msgstr ""
220
 
221
- #: views/bulk-edit.php:104
222
- #: views/quick-edit.php:67
223
- msgid "Type"
224
- msgstr ""
225
-
226
  #: views/bulk-edit.php:106
227
- #: views/classic-metabox.php:109
228
- #: views/menu-defaults.php:93
229
  #: views/quick-edit.php:69
230
- #: assets/jsx/block.jsx:185
231
- msgid "How to expire"
232
- msgstr ""
233
-
234
- #: views/bulk-edit.php:124
235
- #: views/classic-metabox.php:127
236
- #: views/quick-edit.php:85
237
- #: assets/jsx/block.jsx:203
238
- msgid "Expiration Categories"
239
  msgstr ""
240
 
241
  #: views/classic-metabox.php:13
@@ -254,55 +303,10 @@ msgstr ""
254
  msgid "Taxonomy Name"
255
  msgstr ""
256
 
257
- #: views/expire-column.php:6
258
  msgid "Never"
259
  msgstr ""
260
 
261
- #: views/how-to-expire.php:27
262
- #: assets/jsx/block.jsx:142
263
- msgid "Draft"
264
- msgstr ""
265
-
266
- #: views/how-to-expire.php:30
267
- #: assets/jsx/block.jsx:143
268
- msgid "Delete"
269
- msgstr ""
270
-
271
- #: views/how-to-expire.php:33
272
- #: assets/jsx/block.jsx:144
273
- msgid "Trash"
274
- msgstr ""
275
-
276
- #: views/how-to-expire.php:36
277
- #: assets/jsx/block.jsx:145
278
- msgid "Private"
279
- msgstr ""
280
-
281
- #: views/how-to-expire.php:39
282
- #: assets/jsx/block.jsx:146
283
- msgid "Stick"
284
- msgstr ""
285
-
286
- #: views/how-to-expire.php:42
287
- #: assets/jsx/block.jsx:147
288
- msgid "Unstick"
289
- msgstr ""
290
-
291
- #: views/how-to-expire.php:47
292
- #: assets/jsx/block.jsx:152
293
- msgid "Category: Replace"
294
- msgstr ""
295
-
296
- #: views/how-to-expire.php:50
297
- #: assets/jsx/block.jsx:153
298
- msgid "Category: Add"
299
- msgstr ""
300
-
301
- #: views/how-to-expire.php:53
302
- #: assets/jsx/block.jsx:154
303
- msgid "Category: Remove"
304
- msgstr ""
305
-
306
  #: views/menu-defaults.php:5
307
  msgid "Default Expiration Values"
308
  msgstr ""
@@ -335,18 +339,18 @@ msgstr ""
335
  #: views/menu-defaults.php:120
336
  #: views/menu-diagnostics.php:12
337
  #: views/menu-diagnostics.php:35
338
- #: views/menu-general.php:226
339
- #: views/menu-general.php:249
340
- #: views/menu-general.php:298
341
  msgid "Enabled"
342
  msgstr ""
343
 
344
  #: views/menu-defaults.php:130
345
  #: views/menu-diagnostics.php:16
346
  #: views/menu-diagnostics.php:37
347
- #: views/menu-general.php:232
348
- #: views/menu-general.php:256
349
- #: views/menu-general.php:304
350
  msgid "Disabled"
351
  msgstr ""
352
 
@@ -359,7 +363,7 @@ msgid "Taxonomy (hierarchical)"
359
  msgstr ""
360
 
361
  #: views/menu-defaults.php:154
362
- #: views/menu-general.php:267
363
  msgid "Who to notify"
364
  msgstr ""
365
 
@@ -368,7 +372,7 @@ msgid "Enter a comma separate list of emails that you would like to be notified
368
  msgstr ""
369
 
370
  #: views/menu-defaults.php:172
371
- #: views/menu-general.php:146
372
  msgid "None"
373
  msgstr ""
374
 
@@ -378,8 +382,8 @@ msgstr ""
378
 
379
  #: views/menu-defaults.php:174
380
  #: views/menu-defaults.php:216
381
- #: views/menu-general.php:149
382
- #: views/menu-general.php:166
383
  msgid "Custom"
384
  msgstr ""
385
 
@@ -388,17 +392,21 @@ msgid "Publish Time"
388
  msgstr ""
389
 
390
  #: views/menu-defaults.php:191
391
- #: views/menu-general.php:139
392
  msgid "Default Date/Time Duration"
393
  msgstr ""
394
 
 
 
 
 
395
  #: views/menu-defaults.php:226
396
- #: views/menu-general.php:172
397
  msgid "Set the custom value to use for the default expiration date. For information on formatting, see %1$s. For example, you could enter %2$s+1 month%3$s or %4$s+1 week 2 days 4 hours 2 seconds%5$s or %6$snext Thursday%7$s."
398
  msgstr ""
399
 
400
  #: views/menu-defaults.php:250
401
- #: views/menu-general.php:429
402
  msgid "Save Changes"
403
  msgstr ""
404
 
@@ -464,155 +472,171 @@ msgstr ""
464
  msgid "Single Event"
465
  msgstr ""
466
 
467
- #: views/menu-general.php:48
468
  msgid "The post expirator plugin sets a custom meta value, and then optionally allows you to select if you want the post changed to a draft status or deleted when it expires."
469
  msgstr ""
470
 
471
- #: views/menu-general.php:54
472
  msgid "Shortcode"
473
  msgstr ""
474
 
475
- #: views/menu-general.php:56
476
  msgid "Valid %s attributes:"
477
  msgstr ""
478
 
479
- #: views/menu-general.php:61
480
  msgid "%1$s - valid options are %2$sfull%3$s (default), %4$sdate%5$s, %6$stime%7$s"
481
  msgstr ""
482
 
483
- #: views/menu-general.php:74
484
- #: views/menu-general.php:81
485
  msgid "%s - format set here will override the value set on the settings page"
486
  msgstr ""
487
 
488
- #: views/menu-general.php:92
489
  msgid "Defaults"
490
  msgstr ""
491
 
492
- #: views/menu-general.php:97
493
  msgid "Date Format"
494
  msgstr ""
495
 
496
- #: views/menu-general.php:107
497
  msgid "The default format to use when displaying the expiration date within a post using the shortcode or within the footer. For information on valid formatting options, see: %s."
498
  msgstr ""
499
 
500
- #: views/menu-general.php:118
501
  msgid "Time Format"
502
  msgstr ""
503
 
504
- #: views/menu-general.php:128
505
  msgid "The default format to use when displaying the expiration time within a post using the shortcode or within the footer. For information on valid formatting options, see: %s."
506
  msgstr ""
507
 
508
- #: views/menu-general.php:152
509
  msgid "Post/Page Publish Time"
510
  msgstr ""
511
 
512
- #: views/menu-general.php:155
513
  msgid "Set the default expiration date to be used when creating new posts and pages. Defaults to none."
514
  msgstr ""
515
 
516
- #: views/menu-general.php:189
517
  msgid "Default Expiration Category"
518
  msgstr ""
519
 
520
- #: views/menu-general.php:205
521
  msgid "Sets the default expiration category for the post."
522
  msgstr ""
523
 
524
- #: views/menu-general.php:211
525
  msgid "Expiration Email Notification"
526
  msgstr ""
527
 
528
- #: views/menu-general.php:213
529
  msgid "Whenever a post expires, an email can be sent to alert users of the expiration."
530
  msgstr ""
531
 
532
- #: views/menu-general.php:220
533
  msgid "Enable Email Notification?"
534
  msgstr ""
535
 
536
- #: views/menu-general.php:234
537
  msgid "This will enable or disable the send of email notification on post expiration."
538
  msgstr ""
539
 
540
- #: views/menu-general.php:242
541
  msgid "Include Blog Administrators?"
542
  msgstr ""
543
 
544
- #: views/menu-general.php:258
545
  msgid "This will include all users with the role of \"Administrator\" in the post expiration email."
546
  msgstr ""
547
 
548
- #: views/menu-general.php:274
549
  msgid "Enter a comma separate list of emails that you would like to be notified when the post expires. This will be applied to ALL post types. You can set post type specific emails on the Defaults tab."
550
  msgstr ""
551
 
552
- #: views/menu-general.php:283
553
  msgid "Post Footer Display"
554
  msgstr ""
555
 
556
- #: views/menu-general.php:285
557
  msgid "Enabling this below will display the expiration date automatically at the end of any post which is set to expire."
558
  msgstr ""
559
 
560
- #: views/menu-general.php:292
561
  msgid "Show in post footer?"
562
  msgstr ""
563
 
564
- #: views/menu-general.php:306
565
  msgid "This will enable or disable displaying the post expiration date in the post footer."
566
  msgstr ""
567
 
568
- #: views/menu-general.php:315
569
  msgid "Footer Contents"
570
  msgstr ""
571
 
572
- #: views/menu-general.php:322
573
  msgid "Enter the text you would like to appear at the bottom of every post that will expire. The following placeholders will be replaced with the post expiration date in the following format:"
574
  msgstr ""
575
 
576
- #: views/menu-general.php:345
577
  msgid "Footer Style"
578
  msgstr ""
579
 
580
- #: views/menu-general.php:352
581
  msgid "This post will expire on"
582
  msgstr ""
583
 
584
- #: views/menu-general.php:355
585
  msgid "The inline css which will be used to style the footer text."
586
  msgstr ""
587
 
588
- #: views/menu-general.php:361
589
  msgid "Advanced Options"
590
  msgstr ""
591
 
592
- #: views/menu-general.php:363
593
  msgid "Please do not update anything here unless you know what it entails. For advanced users only."
594
  msgstr ""
595
 
596
- #: views/menu-general.php:373
597
  msgid "Block Editor Support"
598
  msgstr ""
599
 
600
- #: views/menu-general.php:379
601
  msgid "Show Gutenberg style box"
602
  msgstr ""
603
 
604
- #: views/menu-general.php:385
605
  msgid "Show Classic Editor style box"
606
  msgstr ""
607
 
608
- #: views/menu-general.php:387
609
  msgid "Toggle between native support for the Block Editor or the backward compatible Classic Editor style metabox."
610
  msgstr ""
611
 
612
- #: views/menu-general.php:396
613
  msgid "Choose which user roles can use Post Expirator"
614
  msgstr ""
615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  #: views/tabs.php:15
617
  msgid "General Settings"
618
  msgstr ""
@@ -624,7 +648,3 @@ msgstr ""
624
  #: views/tabs.php:25
625
  msgid "Diagnostics"
626
  msgstr ""
627
-
628
- #: assets/jsx/block.jsx:196
629
- msgid "Loading"
630
- msgstr ""
2
  # This file is distributed under the same license as the Post Expirator plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Post Expirator 2.6.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/publishpress-future\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-11-17T18:19:05-03:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: post-expirator\n"
16
 
17
  #. Plugin Name of the plugin
18
  #: classes/Display.class.php:50
19
+ #: classes/Facade.class.php:374
20
  #: post-expirator.php:350
21
  #: views/bulk-edit.php:16
 
22
  msgid "Post Expirator"
23
  msgstr ""
24
 
43
  msgid "Post Expirator Options"
44
  msgstr ""
45
 
46
+ #: classes/Display.class.php:191
47
+ #: classes/Display.class.php:264
48
  msgid "Saved Options!"
49
  msgstr ""
50
 
51
+ #: classes/Display.class.php:290
52
  msgid "Debugging Disabled"
53
  msgstr ""
54
 
55
+ #: classes/Display.class.php:295
56
  msgid "Debugging Enabled"
57
  msgstr ""
58
 
59
+ #: classes/Display.class.php:302
60
  msgid "Debugging Table Emptied"
61
  msgstr ""
62
 
63
+ #: classes/Display.class.php:318
64
  msgid "Below is a dump of the debugging table, this should be useful for troubleshooting."
65
  msgstr ""
66
 
67
+ #: classes/Facade.class.php:365
68
+ #: views/how-to-expire.php:27
69
+ msgid "Draft"
70
+ msgstr ""
71
+
72
+ #: classes/Facade.class.php:366
73
+ #: views/how-to-expire.php:30
74
+ msgid "Delete"
75
+ msgstr ""
76
+
77
+ #: classes/Facade.class.php:367
78
+ #: views/how-to-expire.php:33
79
+ msgid "Trash"
80
+ msgstr ""
81
+
82
+ #: classes/Facade.class.php:368
83
+ #: views/how-to-expire.php:36
84
+ msgid "Private"
85
+ msgstr ""
86
+
87
+ #: classes/Facade.class.php:369
88
+ #: views/how-to-expire.php:39
89
+ msgid "Stick"
90
+ msgstr ""
91
+
92
+ #: classes/Facade.class.php:370
93
+ #: views/how-to-expire.php:42
94
+ msgid "Unstick"
95
+ msgstr ""
96
+
97
+ #: classes/Facade.class.php:371
98
+ #: views/how-to-expire.php:47
99
+ msgid "Category: Replace"
100
+ msgstr ""
101
+
102
+ #: classes/Facade.class.php:372
103
+ #: views/how-to-expire.php:50
104
+ msgid "Category: Add"
105
+ msgstr ""
106
+
107
+ #: classes/Facade.class.php:373
108
+ #: views/how-to-expire.php:53
109
+ msgid "Category: Remove"
110
+ msgstr ""
111
+
112
+ #: classes/Facade.class.php:375
113
+ #: views/bulk-edit.php:24
114
+ #: views/classic-metabox.php:6
115
+ #: views/quick-edit.php:8
116
+ msgid "Enable Post Expiration"
117
+ msgstr ""
118
+
119
+ #: classes/Facade.class.php:376
120
+ #: views/bulk-edit.php:108
121
+ #: views/classic-metabox.php:109
122
+ #: views/menu-defaults.php:93
123
+ #: views/quick-edit.php:71
124
+ msgid "How to expire"
125
+ msgstr ""
126
+
127
+ #: classes/Facade.class.php:377
128
+ msgid "Loading"
129
+ msgstr ""
130
+
131
+ #: classes/Facade.class.php:378
132
+ #: views/bulk-edit.php:126
133
+ #: views/classic-metabox.php:127
134
+ #: views/quick-edit.php:87
135
+ msgid "Expiration Categories"
136
+ msgstr ""
137
+
138
  #: post-expirator-debug.php:77
139
  msgid "Debugging table is currently empty."
140
  msgstr ""
202
  msgid "Post Expiration Complete \"%s\""
203
  msgstr ""
204
 
205
+ #: post-expirator.php:1935
206
  msgid "Select the hierarchical taxonomy to be used for \"category\" based expiration."
207
  msgstr ""
208
 
209
+ #: post-expirator.php:1940
210
  msgid "No taxonomies found"
211
  msgstr ""
212
 
213
+ #: post-expirator.php:1987
214
  msgid "You're not allowed to set posts to expire"
215
  msgstr ""
216
 
217
+ #: post-expirator.php:1988
218
  msgid "Forbidden"
219
  msgstr ""
220
 
224
  msgid "Date"
225
  msgstr ""
226
 
 
 
 
 
 
 
 
227
  #: views/bulk-edit.php:28
228
  msgid "No Change"
229
  msgstr ""
282
  msgid "Minute"
283
  msgstr ""
284
 
 
 
 
 
 
285
  #: views/bulk-edit.php:106
 
 
286
  #: views/quick-edit.php:69
287
+ msgid "Type"
 
 
 
 
 
 
 
 
288
  msgstr ""
289
 
290
  #: views/classic-metabox.php:13
303
  msgid "Taxonomy Name"
304
  msgstr ""
305
 
306
+ #: views/expire-column.php:12
307
  msgid "Never"
308
  msgstr ""
309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  #: views/menu-defaults.php:5
311
  msgid "Default Expiration Values"
312
  msgstr ""
339
  #: views/menu-defaults.php:120
340
  #: views/menu-diagnostics.php:12
341
  #: views/menu-diagnostics.php:35
342
+ #: views/menu-general.php:228
343
+ #: views/menu-general.php:251
344
+ #: views/menu-general.php:300
345
  msgid "Enabled"
346
  msgstr ""
347
 
348
  #: views/menu-defaults.php:130
349
  #: views/menu-diagnostics.php:16
350
  #: views/menu-diagnostics.php:37
351
+ #: views/menu-general.php:234
352
+ #: views/menu-general.php:258
353
+ #: views/menu-general.php:306
354
  msgid "Disabled"
355
  msgstr ""
356
 
363
  msgstr ""
364
 
365
  #: views/menu-defaults.php:154
366
+ #: views/menu-general.php:269
367
  msgid "Who to notify"
368
  msgstr ""
369
 
372
  msgstr ""
373
 
374
  #: views/menu-defaults.php:172
375
+ #: views/menu-general.php:148
376
  msgid "None"
377
  msgstr ""
378
 
382
 
383
  #: views/menu-defaults.php:174
384
  #: views/menu-defaults.php:216
385
+ #: views/menu-general.php:151
386
+ #: views/menu-general.php:168
387
  msgid "Custom"
388
  msgstr ""
389
 
392
  msgstr ""
393
 
394
  #: views/menu-defaults.php:191
395
+ #: views/menu-general.php:141
396
  msgid "Default Date/Time Duration"
397
  msgstr ""
398
 
399
+ #: views/menu-defaults.php:208
400
+ msgid "Set the default expiration date to be used when creating a new post of this type."
401
+ msgstr ""
402
+
403
  #: views/menu-defaults.php:226
404
+ #: views/menu-general.php:174
405
  msgid "Set the custom value to use for the default expiration date. For information on formatting, see %1$s. For example, you could enter %2$s+1 month%3$s or %4$s+1 week 2 days 4 hours 2 seconds%5$s or %6$snext Thursday%7$s."
406
  msgstr ""
407
 
408
  #: views/menu-defaults.php:250
409
+ #: views/menu-general.php:462
410
  msgid "Save Changes"
411
  msgstr ""
412
 
472
  msgid "Single Event"
473
  msgstr ""
474
 
475
+ #: views/menu-general.php:50
476
  msgid "The post expirator plugin sets a custom meta value, and then optionally allows you to select if you want the post changed to a draft status or deleted when it expires."
477
  msgstr ""
478
 
479
+ #: views/menu-general.php:56
480
  msgid "Shortcode"
481
  msgstr ""
482
 
483
+ #: views/menu-general.php:58
484
  msgid "Valid %s attributes:"
485
  msgstr ""
486
 
487
+ #: views/menu-general.php:63
488
  msgid "%1$s - valid options are %2$sfull%3$s (default), %4$sdate%5$s, %6$stime%7$s"
489
  msgstr ""
490
 
491
+ #: views/menu-general.php:76
492
+ #: views/menu-general.php:83
493
  msgid "%s - format set here will override the value set on the settings page"
494
  msgstr ""
495
 
496
+ #: views/menu-general.php:94
497
  msgid "Defaults"
498
  msgstr ""
499
 
500
+ #: views/menu-general.php:99
501
  msgid "Date Format"
502
  msgstr ""
503
 
504
+ #: views/menu-general.php:109
505
  msgid "The default format to use when displaying the expiration date within a post using the shortcode or within the footer. For information on valid formatting options, see: %s."
506
  msgstr ""
507
 
508
+ #: views/menu-general.php:120
509
  msgid "Time Format"
510
  msgstr ""
511
 
512
+ #: views/menu-general.php:130
513
  msgid "The default format to use when displaying the expiration time within a post using the shortcode or within the footer. For information on valid formatting options, see: %s."
514
  msgstr ""
515
 
516
+ #: views/menu-general.php:154
517
  msgid "Post/Page Publish Time"
518
  msgstr ""
519
 
520
+ #: views/menu-general.php:157
521
  msgid "Set the default expiration date to be used when creating new posts and pages. Defaults to none."
522
  msgstr ""
523
 
524
+ #: views/menu-general.php:191
525
  msgid "Default Expiration Category"
526
  msgstr ""
527
 
528
+ #: views/menu-general.php:207
529
  msgid "Sets the default expiration category for the post."
530
  msgstr ""
531
 
532
+ #: views/menu-general.php:213
533
  msgid "Expiration Email Notification"
534
  msgstr ""
535
 
536
+ #: views/menu-general.php:215
537
  msgid "Whenever a post expires, an email can be sent to alert users of the expiration."
538
  msgstr ""
539
 
540
+ #: views/menu-general.php:222
541
  msgid "Enable Email Notification?"
542
  msgstr ""
543
 
544
+ #: views/menu-general.php:236
545
  msgid "This will enable or disable the send of email notification on post expiration."
546
  msgstr ""
547
 
548
+ #: views/menu-general.php:244
549
  msgid "Include Blog Administrators?"
550
  msgstr ""
551
 
552
+ #: views/menu-general.php:260
553
  msgid "This will include all users with the role of \"Administrator\" in the post expiration email."
554
  msgstr ""
555
 
556
+ #: views/menu-general.php:276
557
  msgid "Enter a comma separate list of emails that you would like to be notified when the post expires. This will be applied to ALL post types. You can set post type specific emails on the Defaults tab."
558
  msgstr ""
559
 
560
+ #: views/menu-general.php:285
561
  msgid "Post Footer Display"
562
  msgstr ""
563
 
564
+ #: views/menu-general.php:287
565
  msgid "Enabling this below will display the expiration date automatically at the end of any post which is set to expire."
566
  msgstr ""
567
 
568
+ #: views/menu-general.php:294
569
  msgid "Show in post footer?"
570
  msgstr ""
571
 
572
+ #: views/menu-general.php:308
573
  msgid "This will enable or disable displaying the post expiration date in the post footer."
574
  msgstr ""
575
 
576
+ #: views/menu-general.php:317
577
  msgid "Footer Contents"
578
  msgstr ""
579
 
580
+ #: views/menu-general.php:324
581
  msgid "Enter the text you would like to appear at the bottom of every post that will expire. The following placeholders will be replaced with the post expiration date in the following format:"
582
  msgstr ""
583
 
584
+ #: views/menu-general.php:353
585
  msgid "Footer Style"
586
  msgstr ""
587
 
588
+ #: views/menu-general.php:360
589
  msgid "This post will expire on"
590
  msgstr ""
591
 
592
+ #: views/menu-general.php:363
593
  msgid "The inline css which will be used to style the footer text."
594
  msgstr ""
595
 
596
+ #: views/menu-general.php:369
597
  msgid "Advanced Options"
598
  msgstr ""
599
 
600
+ #: views/menu-general.php:371
601
  msgid "Please do not update anything here unless you know what it entails. For advanced users only."
602
  msgstr ""
603
 
604
+ #: views/menu-general.php:381
605
  msgid "Block Editor Support"
606
  msgstr ""
607
 
608
+ #: views/menu-general.php:387
609
  msgid "Show Gutenberg style box"
610
  msgstr ""
611
 
612
+ #: views/menu-general.php:393
613
  msgid "Show Classic Editor style box"
614
  msgstr ""
615
 
616
+ #: views/menu-general.php:395
617
  msgid "Toggle between native support for the Block Editor or the backward compatible Classic Editor style metabox."
618
  msgstr ""
619
 
620
+ #: views/menu-general.php:404
621
  msgid "Choose which user roles can use Post Expirator"
622
  msgstr ""
623
 
624
+ #: views/menu-general.php:435
625
+ msgid "Preserve data after deactivating the plugin"
626
+ msgstr ""
627
+
628
+ #: views/menu-general.php:441
629
+ msgid "Preserve data"
630
+ msgstr ""
631
+
632
+ #: views/menu-general.php:447
633
+ msgid "Delete data"
634
+ msgstr ""
635
+
636
+ #: views/menu-general.php:450
637
+ msgid "Toggle between preserving or deleting data after the plugin is deactivated."
638
+ msgstr ""
639
+
640
  #: views/tabs.php:15
641
  msgid "General Settings"
642
  msgstr ""
648
  #: views/tabs.php:25
649
  msgid "Diagnostics"
650
  msgstr ""
 
 
 
 
post-expirator.php CHANGED
@@ -4,14 +4,14 @@ Plugin Name: Post Expirator
4
  Plugin URI: http://wordpress.org/extend/plugins/post-expirator/
5
  Description: Allows you to add an expiration date (minute) to posts which you can configure to either delete the post, change it to a draft, or update the post categories at expiration time.
6
  Author: PublishPress
7
- Version: 2.6.2
8
  Author URI: http://publishpress.com
9
  Text Domain: post-expirator
10
  Domain Path: /languages
11
  */
12
 
13
  // Default Values
14
- define('POSTEXPIRATOR_VERSION', '2.6.2');
15
  define('POSTEXPIRATOR_DATEFORMAT', __('l F jS, Y', 'post-expirator'));
16
  define('POSTEXPIRATOR_TIMEFORMAT', __('g:ia', 'post-expirator'));
17
  define('POSTEXPIRATOR_FOOTERCONTENTS', __('Post expires at EXPIRATIONTIME on EXPIRATIONDATE', 'post-expirator'));
@@ -677,12 +677,12 @@ function postexpirator_schedule_event($id, $ts, $opts)
677
 
678
  $error = wp_schedule_single_event($ts, 'postExpiratorExpire', array($id), true);
679
  if (POSTEXPIRATOR_DEBUG) {
 
680
  $debug->save(
681
  array(
682
- 'message' => $id . ' -> SCHEDULED at ' . date_i18n(
683
- 'r',
684
- $ts
685
- ) . ' ' . '(' . $ts . ') with options ' . print_r($opts, true) . ' ' . (is_wp_error(
686
  $error
687
  ) ? $error->get_error_message() : 'no error')
688
  )
@@ -1448,7 +1448,7 @@ function postexpirator_shortcode($atts)
1448
  $format = $timeformat;
1449
  }
1450
 
1451
- return date_i18n($format, $expirationdatets + (get_option('gmt_offset') * HOUR_IN_SECONDS));
1452
  }
1453
 
1454
  add_shortcode('postexpirator', 'postexpirator_shortcode');
@@ -1487,10 +1487,11 @@ function postexpirator_add_footer($text)
1487
  'EXPIRATIONDATE',
1488
  'EXPIRATIONTIME',
1489
  );
 
1490
  $replace = array(
1491
- get_date_from_gmt(gmdate('Y-m-d H:i:s', $expirationdatets), "$dateformat $timeformat"),
1492
- get_date_from_gmt(gmdate('Y-m-d H:i:s', $expirationdatets), $dateformat),
1493
- get_date_from_gmt(gmdate('Y-m-d H:i:s', $expirationdatets), $timeformat),
1494
  );
1495
 
1496
  $add_to_footer = '<p style="' . $expirationdateFooterStyle . '">' . str_replace(
@@ -1519,7 +1520,7 @@ function postexpirator_debug()
1519
  if (! defined('POSTEXPIRATOR_DEBUG')) {
1520
  define('POSTEXPIRATOR_DEBUG', 1);
1521
  }
1522
- require_once(plugin_dir_path(__FILE__) . 'post-expirator-debug.php'); // Load Class
1523
 
1524
  return new PostExpiratorDebug();
1525
  } else {
@@ -1708,6 +1709,12 @@ function postexpirator_activate()
1708
  */
1709
  function expirationdate_deactivate()
1710
  {
 
 
 
 
 
 
1711
  global $current_blog;
1712
  delete_option('expirationdateExpiredPostStatus');
1713
  delete_option('expirationdateExpiredPageStatus');
@@ -1727,13 +1734,14 @@ function expirationdate_deactivate()
1727
  delete_option('expirationdateDefaultsPage');
1728
  delete_option('expirationdateDefaultsPost');
1729
  delete_option('expirationdateGutenbergSupport');
 
1730
  // what about custom post types? - how to cleanup?
1731
  if (is_multisite()) {
1732
  wp_clear_scheduled_hook('expirationdate_delete_' . $current_blog->blog_id);
1733
  } else {
1734
  wp_clear_scheduled_hook('expirationdate_delete');
1735
  }
1736
- require_once(plugin_dir_path(__FILE__) . 'post-expirator-debug.php');
1737
  $debug = new PostExpiratorDebug();
1738
  $debug->removeDbTable();
1739
  }
@@ -2058,7 +2066,7 @@ function postexpirator_autoload($class)
2058
  foreach ($namespaces as $namespace) {
2059
  if (substr($class, 0, strlen($namespace)) === $namespace) {
2060
  $class = str_replace('_', '', strstr($class, '_'));
2061
- $filename = plugin_dir_path(__FILE__) . 'classes/' . sprintf('%s.class.php', $class);
2062
  if (is_readable($filename)) {
2063
  require_once $filename;
2064
 
4
  Plugin URI: http://wordpress.org/extend/plugins/post-expirator/
5
  Description: Allows you to add an expiration date (minute) to posts which you can configure to either delete the post, change it to a draft, or update the post categories at expiration time.
6
  Author: PublishPress
7
+ Version: 2.6.3
8
  Author URI: http://publishpress.com
9
  Text Domain: post-expirator
10
  Domain Path: /languages
11
  */
12
 
13
  // Default Values
14
+ define('POSTEXPIRATOR_VERSION', '2.6.3');
15
  define('POSTEXPIRATOR_DATEFORMAT', __('l F jS, Y', 'post-expirator'));
16
  define('POSTEXPIRATOR_TIMEFORMAT', __('g:ia', 'post-expirator'));
17
  define('POSTEXPIRATOR_FOOTERCONTENTS', __('Post expires at EXPIRATIONTIME on EXPIRATIONDATE', 'post-expirator'));
677
 
678
  $error = wp_schedule_single_event($ts, 'postExpiratorExpire', array($id), true);
679
  if (POSTEXPIRATOR_DEBUG) {
680
+
681
  $debug->save(
682
  array(
683
+ 'message' => $id . ' -> SCHEDULED at ' .
684
+ PostExpirator_Util::get_wp_date('r', $ts)
685
+ . ' ' . '(' . $ts . ') with options ' . print_r($opts, true) . ' ' . (is_wp_error(
 
686
  $error
687
  ) ? $error->get_error_message() : 'no error')
688
  )
1448
  $format = $timeformat;
1449
  }
1450
 
1451
+ return PostExpirator_Util::get_wp_date($format, $expirationdatets);
1452
  }
1453
 
1454
  add_shortcode('postexpirator', 'postexpirator_shortcode');
1487
  'EXPIRATIONDATE',
1488
  'EXPIRATIONTIME',
1489
  );
1490
+
1491
  $replace = array(
1492
+ PostExpirator_Util::get_wp_date("$dateformat $timeformat", $expirationdatets),
1493
+ PostExpirator_Util::get_wp_date($dateformat, $expirationdatets),
1494
+ PostExpirator_Util::get_wp_date($timeformat, $expirationdatets)
1495
  );
1496
 
1497
  $add_to_footer = '<p style="' . $expirationdateFooterStyle . '">' . str_replace(
1520
  if (! defined('POSTEXPIRATOR_DEBUG')) {
1521
  define('POSTEXPIRATOR_DEBUG', 1);
1522
  }
1523
+ require_once(POSTEXPIRATOR_BASEDIR . '/post-expirator-debug.php'); // Load Class
1524
 
1525
  return new PostExpiratorDebug();
1526
  } else {
1709
  */
1710
  function expirationdate_deactivate()
1711
  {
1712
+ $preserveData = (bool)get_option('expirationdatePreserveData', true);
1713
+
1714
+ if ($preserveData) {
1715
+ return;
1716
+ }
1717
+
1718
  global $current_blog;
1719
  delete_option('expirationdateExpiredPostStatus');
1720
  delete_option('expirationdateExpiredPageStatus');
1734
  delete_option('expirationdateDefaultsPage');
1735
  delete_option('expirationdateDefaultsPost');
1736
  delete_option('expirationdateGutenbergSupport');
1737
+ delete_option('expirationdatePreserveData');
1738
  // what about custom post types? - how to cleanup?
1739
  if (is_multisite()) {
1740
  wp_clear_scheduled_hook('expirationdate_delete_' . $current_blog->blog_id);
1741
  } else {
1742
  wp_clear_scheduled_hook('expirationdate_delete');
1743
  }
1744
+ require_once(POSTEXPIRATOR_BASEDIR . '/post-expirator-debug.php');
1745
  $debug = new PostExpiratorDebug();
1746
  $debug->removeDbTable();
1747
  }
2066
  foreach ($namespaces as $namespace) {
2067
  if (substr($class, 0, strlen($namespace)) === $namespace) {
2068
  $class = str_replace('_', '', strstr($class, '_'));
2069
+ $filename = POSTEXPIRATOR_BASEDIR . '/classes/' . sprintf('%s.class.php', $class);
2070
  if (is_readable($filename)) {
2071
  require_once $filename;
2072
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Author URI: https://publishpress.com
5
  Tags: expire, posts, pages, schedule
6
  Requires at least: 5.0
7
  Tested up to: 5.8
8
- Stable tag: 2.6.2
9
 
10
  Add an expiration date to posts. When your post is automatically unpublished, you can delete the post, change the status, or update the post categories.
11
 
@@ -81,6 +81,15 @@ This section describes how to install the plugin and get it working.
81
 
82
  == Changelog ==
83
 
 
 
 
 
 
 
 
 
 
84
  = [2.6.2] - 04 Nov 2021 =
85
 
86
  * Fixed: Fix fatal error: Call to a member function add_cap() on null, #167;
5
  Tags: expire, posts, pages, schedule
6
  Requires at least: 5.0
7
  Tested up to: 5.8
8
+ Stable tag: 2.6.3
9
 
10
  Add an expiration date to posts. When your post is automatically unpublished, you can delete the post, change the status, or update the post categories.
11
 
81
 
82
  == Changelog ==
83
 
84
+ = [2.6.3] - 18 Nov 2021 =
85
+
86
+ * Fixed: Fix the timezone applied to time fields, #134;
87
+ * Fixed: Add the timezone string to the time fields, #134;
88
+ * Fixed: Fix the selected expiring categories on the quick edit panel, #160;
89
+ * Added: Add setting field for choosing between preserve or delete data when the plugin is deactivated, #137;
90
+ * Fixed: Fix E_COMPILER_ERROR when cleaning up the debug table, #183;
91
+ * Fixed: Fix translation and localization of date and time, #150;
92
+
93
  = [2.6.2] - 04 Nov 2021 =
94
 
95
  * Fixed: Fix fatal error: Call to a member function add_cap() on null, #167;
vendor/composer/installed.json CHANGED
@@ -2,17 +2,17 @@
2
  "packages": [
3
  {
4
  "name": "publishpress/wordpress-reviews",
5
- "version": "v1.1.11",
6
- "version_normalized": "1.1.11.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/publishpress/wordpress-reviews.git",
10
- "reference": "eb913d04f5cc18769b9b415324305a2f9695d30e"
11
  },
12
  "dist": {
13
  "type": "zip",
14
- "url": "https://api.github.com/repos/publishpress/wordpress-reviews/zipball/eb913d04f5cc18769b9b415324305a2f9695d30e",
15
- "reference": "eb913d04f5cc18769b9b415324305a2f9695d30e",
16
  "shasum": ""
17
  },
18
  "require": {
@@ -21,7 +21,7 @@
21
  "require-dev": {
22
  "overtrue/phplint": "^2.1"
23
  },
24
- "time": "2021-10-26T15:47:36+00:00",
25
  "type": "library",
26
  "installation-source": "dist",
27
  "autoload": {
@@ -52,7 +52,7 @@
52
  ],
53
  "support": {
54
  "issues": "https://github.com/publishpress/wordpress-reviews/issues",
55
- "source": "https://github.com/publishpress/wordpress-reviews/tree/v1.1.11"
56
  },
57
  "install-path": "../publishpress/wordpress-reviews"
58
  }
2
  "packages": [
3
  {
4
  "name": "publishpress/wordpress-reviews",
5
+ "version": "v1.1.13",
6
+ "version_normalized": "1.1.13.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/publishpress/wordpress-reviews.git",
10
+ "reference": "6eb69db653b5df376a81571153eacd2da0f5524b"
11
  },
12
  "dist": {
13
  "type": "zip",
14
+ "url": "https://api.github.com/repos/publishpress/wordpress-reviews/zipball/6eb69db653b5df376a81571153eacd2da0f5524b",
15
+ "reference": "6eb69db653b5df376a81571153eacd2da0f5524b",
16
  "shasum": ""
17
  },
18
  "require": {
21
  "require-dev": {
22
  "overtrue/phplint": "^2.1"
23
  },
24
+ "time": "2021-11-16T19:29:19+00:00",
25
  "type": "library",
26
  "installation-source": "dist",
27
  "autoload": {
52
  ],
53
  "support": {
54
  "issues": "https://github.com/publishpress/wordpress-reviews/issues",
55
+ "source": "https://github.com/publishpress/wordpress-reviews/tree/v1.1.13"
56
  },
57
  "install-path": "../publishpress/wordpress-reviews"
58
  }
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '6dc1ae2a3b8bebb24a1f7d7bd3ef20d95bb5b695',
9
  'name' => 'publishpress/post-expirator',
10
  'dev' => false,
11
  ),
@@ -16,16 +16,16 @@
16
  'type' => 'wordpress-plugin',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '6dc1ae2a3b8bebb24a1f7d7bd3ef20d95bb5b695',
20
  'dev_requirement' => false,
21
  ),
22
  'publishpress/wordpress-reviews' => array(
23
- 'pretty_version' => 'v1.1.11',
24
- 'version' => '1.1.11.0',
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../publishpress/wordpress-reviews',
27
  'aliases' => array(),
28
- 'reference' => 'eb913d04f5cc18769b9b415324305a2f9695d30e',
29
  'dev_requirement' => false,
30
  ),
31
  ),
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '2070923cee2ef7e7c5c87ac0dc8f45fdb0cb73e0',
9
  'name' => 'publishpress/post-expirator',
10
  'dev' => false,
11
  ),
16
  'type' => 'wordpress-plugin',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => '2070923cee2ef7e7c5c87ac0dc8f45fdb0cb73e0',
20
  'dev_requirement' => false,
21
  ),
22
  'publishpress/wordpress-reviews' => array(
23
+ 'pretty_version' => 'v1.1.13',
24
+ 'version' => '1.1.13.0',
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../publishpress/wordpress-reviews',
27
  'aliases' => array(),
28
+ 'reference' => '6eb69db653b5df376a81571153eacd2da0f5524b',
29
  'dev_requirement' => false,
30
  ),
31
  ),
vendor/publishpress/wordpress-reviews/README.md CHANGED
@@ -1,5 +1,6 @@
1
  # PublishPress WordPress Reviews Library
2
- Library for displaying a banner asking for a 5-star review on WordPress plugins.
 
3
 
4
  ## Installation
5
 
@@ -19,12 +20,19 @@ If your plugin does not load the composer's autoloader yet, you need to add the
19
  require_once 'vendor/autoload.php';
20
  ```
21
 
22
- The library should be initialized in the method of your plugin that loads the main WordPress hooks.
23
- You can add it to the main class of the plugin. When instantiating it you have to pass 3 params: the plugin slug (the same one used in the URL of the WordPress repository), the plugin's name, and the logo URL (optional).
 
 
 
 
 
 
 
24
 
25
- Pro plugins don't require this library, if they use they embed the free plugin. If you instantiate this library on both free and pro plugins, users will probably see duplicated banners.
26
 
27
- It by default displays the banner when the following condition is true:
28
 
29
  ```php
30
  is_admin() && current_user_can('edit_posts')
@@ -92,7 +100,42 @@ class MyPlugin
92
  }
93
  ```
94
 
95
- By default, the library will use the plugin's slug as a prefix for the actions, metadata and options:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  ```php
98
  [
@@ -131,10 +174,23 @@ function my_plugin_wp_reviews_meta_map($metaMap)
131
  }
132
  ```
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  ## Testing
135
 
136
- You can easily test the banner in the WordPress admin.
137
- After initializing the library, change the option `<plugin-slug>_wp_reviews_installed_on` in the options table. Set it for older data to make sure the time difference is bigger than the trigger we are using.
138
 
139
  ## Copyright
140
 
1
  # PublishPress WordPress Reviews Library
2
+
3
+ The PublishPress WordPress Reviews is a library for displaying a banner to users asking for a five-star review.
4
 
5
  ## Installation
6
 
20
  require_once 'vendor/autoload.php';
21
  ```
22
 
23
+ **Only free plugins should initialize this library**.
24
+
25
+ It can be instantiated and initialized in the method that loads the main WordPress hooks.
26
+
27
+ When instantiating this library, you have to pass three params:
28
+
29
+ * the plugin slug (the same one used in the URL of the WordPress repository)
30
+ * the plugin's name
31
+ * the URL for the logo (optional)
32
 
33
+ ### Configuring the criteria to display the banner in the Free plugin
34
 
35
+ It by default displays the banner when the following conditional is true:
36
 
37
  ```php
38
  is_admin() && current_user_can('edit_posts')
100
  }
101
  ```
102
 
103
+ ### Configuring the criteria to display the banner in the Pro plugin
104
+
105
+ In case the Pro plugin has additional pages where you want to display the banner, feel free to use the same filter as
106
+ in the free plugin but with a higher priority. You can choose to override the conditions used in the Free plugin
107
+ or to append more conditions, for different pages.
108
+
109
+ ```php
110
+ add_filter('my-plugin_wp_reviews_allow_display_notice', [$this, 'shouldDisplayBanner'], 20);
111
+ ```
112
+
113
+ ```php
114
+ /**
115
+ * @param $shouldDisplay
116
+ * @return bool|null
117
+ */
118
+ public function shouldDisplayBanner($shouldDisplay)
119
+ {
120
+ global $pagenow;
121
+
122
+ if ($shouldDisplay) {
123
+ return true;
124
+ }
125
+
126
+ if ($pagenow === 'edit.php' && isset($_GET['post_type'])) {
127
+ if ($_GET['post_type'] === 'custom-posttype') {
128
+ return true;
129
+ }
130
+ }
131
+
132
+ return $shouldDisplay;
133
+ }
134
+ ```
135
+
136
+ ### Backward compatibility with older versions
137
+
138
+ By default, the library will use the plugin's slug as a prefix for the actions, metadata, and options:
139
 
140
  ```php
141
  [
174
  }
175
  ```
176
 
177
+ ## Common questions
178
+
179
+ ### Should I use this library on Pro plugins?
180
+
181
+ Pro plugins that embed the free plugin code **should not instantiate or initialize this library** otherwise, users will
182
+ probably see duplicated admin notices or will be asked for a review twice.
183
+
184
+ Keeping the library activated only by the free plugin allows both versions, free and pro,
185
+ to share the same options and metadata stored in the database, avoiding duplicated banners or review requests.
186
+
187
+ Please, **only initialize this library in the Free plugin** and do not disable or block it in the Pro version. We want to keep it enabled
188
+ for both free and pro users.
189
+
190
+
191
  ## Testing
192
 
193
+ You can test the banner in the WordPress admin by changing the option `<plugin-slug>_wp_reviews_installed_on` in the options table. Set it for older data to make sure the time difference is bigger than the selected trigger
 
194
 
195
  ## Copyright
196
 
vendor/publishpress/wordpress-reviews/ReviewsController.php CHANGED
@@ -244,6 +244,10 @@ class ReviewsController
244
  static $selected;
245
 
246
  if (! isset($selected)) {
 
 
 
 
247
  $dismissedTriggers = $this->getDismissedTriggerGroups();
248
 
249
  $triggers = $this->getTriggers();
@@ -254,18 +258,18 @@ class ReviewsController
254
  false,
255
  $trigger['conditions']
256
  ) && (empty($dismissedTriggers[$g]) || $dismissedTriggers[$g] < $trigger['priority'])) {
257
- $selected = $g;
258
  break;
259
  }
260
  }
261
 
262
- if (isset($selected)) {
263
  break;
264
  }
265
  }
266
  }
267
 
268
- return $selected;
269
  }
270
 
271
  /**
@@ -305,12 +309,16 @@ class ReviewsController
305
  static $triggers;
306
 
307
  if (! isset($triggers)) {
 
 
 
 
308
  $timeMessage = __(
309
  'Hey, you\'ve been using %1$s for %2$s on your site. We hope the plugin has been useful. Please could you quickly leave a 5-star rating on WordPress.org? It really does help to keep %1$s growing.',
310
  $this->pluginSlug
311
  );
312
 
313
- $triggers = apply_filters(
314
  $this->metaMap['filter_triggers'],
315
  [
316
  'time_installed' => [
@@ -350,23 +358,23 @@ class ReviewsController
350
  );
351
 
352
  // Sort Groups
353
- uasort($triggers, [$this, 'rsortByPriority']);
354
 
355
  // Sort each groups triggers.
356
- foreach ($triggers as $v) {
357
  uasort($v['triggers'], [$this, 'rsortByPriority']);
358
  }
359
  }
360
 
361
  if (isset($group)) {
362
- if (! isset($triggers[$group])) {
363
  return false;
364
  }
365
 
366
  if (! isset($code)) {
367
- $return = $triggers[$group];
368
- } elseif (isset($triggers[$group]['triggers'][$code])) {
369
- $return = $triggers[$group]['triggers'][$code];
370
  } else {
371
  $return = false;
372
  }
@@ -374,7 +382,7 @@ class ReviewsController
374
  return $return;
375
  }
376
 
377
- return $triggers;
378
  }
379
 
380
  /**
@@ -385,6 +393,10 @@ class ReviewsController
385
  static $selected;
386
 
387
  if (! isset($selected)) {
 
 
 
 
388
  $dismissedTriggers = $this->getDismissedTriggerGroups();
389
 
390
  foreach ($this->getTriggers() as $g => $group) {
@@ -393,18 +405,22 @@ class ReviewsController
393
  false,
394
  $trigger['conditions']
395
  ) && (empty($dismissedTriggers[$g]) || $dismissedTriggers[$g] < $trigger['priority'])) {
396
- $selected = $t;
397
  break;
398
  }
399
  }
400
 
401
- if (isset($selected)) {
402
  break;
403
  }
404
  }
405
  }
406
 
407
- return $selected;
 
 
 
 
408
  }
409
 
410
  /**
@@ -685,4 +701,4 @@ class ReviewsController
685
 
686
  return ($a['priority'] < $b['priority']) ? 1 : -1;
687
  }
688
- }
244
  static $selected;
245
 
246
  if (! isset($selected)) {
247
+ $selected = [];
248
+ }
249
+
250
+ if (! isset($selected[$this->pluginSlug])) {
251
  $dismissedTriggers = $this->getDismissedTriggerGroups();
252
 
253
  $triggers = $this->getTriggers();
258
  false,
259
  $trigger['conditions']
260
  ) && (empty($dismissedTriggers[$g]) || $dismissedTriggers[$g] < $trigger['priority'])) {
261
+ $selected[$this->pluginSlug] = $g;
262
  break;
263
  }
264
  }
265
 
266
+ if (isset($selected[$this->pluginSlug])) {
267
  break;
268
  }
269
  }
270
  }
271
 
272
+ return $selected[$this->pluginSlug];
273
  }
274
 
275
  /**
309
  static $triggers;
310
 
311
  if (! isset($triggers)) {
312
+ $triggers = [];
313
+ }
314
+
315
+ if (! isset($triggers[$this->pluginSlug])) {
316
  $timeMessage = __(
317
  'Hey, you\'ve been using %1$s for %2$s on your site. We hope the plugin has been useful. Please could you quickly leave a 5-star rating on WordPress.org? It really does help to keep %1$s growing.',
318
  $this->pluginSlug
319
  );
320
 
321
+ $triggers[$this->pluginSlug] = apply_filters(
322
  $this->metaMap['filter_triggers'],
323
  [
324
  'time_installed' => [
358
  );
359
 
360
  // Sort Groups
361
+ uasort($triggers[$this->pluginSlug], [$this, 'rsortByPriority']);
362
 
363
  // Sort each groups triggers.
364
+ foreach ($triggers[$this->pluginSlug] as $v) {
365
  uasort($v['triggers'], [$this, 'rsortByPriority']);
366
  }
367
  }
368
 
369
  if (isset($group)) {
370
+ if (! isset($triggers[$this->pluginSlug][$group])) {
371
  return false;
372
  }
373
 
374
  if (! isset($code)) {
375
+ $return = $triggers[$this->pluginSlug][$group];
376
+ } elseif (isset($triggers[$this->pluginSlug][$group]['triggers'][$code])) {
377
+ $return = $triggers[$this->pluginSlug][$group]['triggers'][$code];
378
  } else {
379
  $return = false;
380
  }
382
  return $return;
383
  }
384
 
385
+ return $triggers[$this->pluginSlug];
386
  }
387
 
388
  /**
393
  static $selected;
394
 
395
  if (! isset($selected)) {
396
+ $selected = [];
397
+ }
398
+
399
+ if (! isset($selected[$this->pluginSlug])) {
400
  $dismissedTriggers = $this->getDismissedTriggerGroups();
401
 
402
  foreach ($this->getTriggers() as $g => $group) {
405
  false,
406
  $trigger['conditions']
407
  ) && (empty($dismissedTriggers[$g]) || $dismissedTriggers[$g] < $trigger['priority'])) {
408
+ $selected[$this->pluginSlug] = $t;
409
  break;
410
  }
411
  }
412
 
413
+ if (isset($selected[$this->pluginSlug])) {
414
  break;
415
  }
416
  }
417
  }
418
 
419
+ if (!isset($selected[$this->pluginSlug])) {
420
+ return false;
421
+ }
422
+
423
+ return $selected[$this->pluginSlug];
424
  }
425
 
426
  /**
701
 
702
  return ($a['priority'] < $b['priority']) ? 1 : -1;
703
  }
704
+ }
views/bulk-edit.php CHANGED
@@ -51,8 +51,8 @@ $minute = $defaults['minute'];
51
  <?php
52
  for ($x = 1; $x <= 12; $x++) {
53
  $now = mktime(0, 0, 0, $x, 1, date_i18n('Y'));
54
- $monthNumeric = date_i18n('m', $now);
55
- $monthStr = date_i18n('M', $now);
56
  // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
57
  $selected = $monthNumeric == $defaults['month'] ? 'selected' : '';
58
  ?>
@@ -96,6 +96,8 @@ $minute = $defaults['minute'];
96
  echo $minute; ?>" value=""
97
  size="2" maxlength="2" autocomplete="off" type="text">
98
  </label>
 
 
99
  </span>
100
  </div>
101
  <div class="post-expirator-date-fields">
51
  <?php
52
  for ($x = 1; $x <= 12; $x++) {
53
  $now = mktime(0, 0, 0, $x, 1, date_i18n('Y'));
54
+ $monthNumeric = PostExpirator_Util::get_wp_date('m', $now);
55
+ $monthStr = PostExpirator_Util::get_wp_date('M', $now);
56
  // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
57
  $selected = $monthNumeric == $defaults['month'] ? 'selected' : '';
58
  ?>
96
  echo $minute; ?>" value=""
97
  size="2" maxlength="2" autocomplete="off" type="text">
98
  </label>
99
+
100
+ <?php echo PostExpirator_Util::wp_timezone_string(); ?>
101
  </span>
102
  </div>
103
  <div class="post-expirator-date-fields">
views/expire-column.php CHANGED
@@ -6,10 +6,8 @@ echo esc_attr($id); ?>"
6
  $expirationEnabled = get_post_meta($id, '_expiration-date-status', true) === 'saved';
7
  $expirationDate = get_post_meta($id, '_expiration-date', true);
8
  if ($expirationDate && $expirationEnabled) {
9
- $display = date_i18n(
10
- get_option('date_format') . ' ' . get_option('time_format'),
11
- $expirationDate + (get_option('gmt_offset') * HOUR_IN_SECONDS)
12
- );
13
  } else {
14
  $display = __('Never', 'post-expirator');
15
  }
6
  $expirationEnabled = get_post_meta($id, '_expiration-date-status', true) === 'saved';
7
  $expirationDate = get_post_meta($id, '_expiration-date', true);
8
  if ($expirationDate && $expirationEnabled) {
9
+ $format = get_option('date_format') . ' ' . get_option('time_format');
10
+ $display = PostExpirator_Util::get_wp_date($format, $expirationDate);
 
 
11
  } else {
12
  $display = __('Never', 'post-expirator');
13
  }
views/menu-defaults.php CHANGED
@@ -205,7 +205,7 @@
205
  } ?>
206
  </select>
207
  <p class="description"><?php
208
- _e('Set the default expiration date to be used when creating a new post of this type.'); ?></p>
209
  <div id="expired-custom-container-<?php
210
  echo $type; ?>" class="pe-custom-date-container"
211
  style="display: <?php
205
  } ?>
206
  </select>
207
  <p class="description"><?php
208
+ _e('Set the default expiration date to be used when creating a new post of this type.', 'post-expirator'); ?></p>
209
  <div id="expired-custom-container-<?php
210
  echo $type; ?>" class="pe-custom-date-container"
211
  style="display: <?php
views/menu-diagnostics.php CHANGED
@@ -70,7 +70,7 @@
70
  foreach ($cron as $time => $value) {
71
  foreach ($value as $eventkey => $eventvalue) {
72
  echo '<tr class="pe-event">';
73
- echo '<td>' . date_i18n('r', $time) . '</td>';
74
  echo '<td>' . $eventkey . '</td>';
75
  $arrkey = array_keys($eventvalue);
76
  $firstArgsUid = null;
70
  foreach ($cron as $time => $value) {
71
  foreach ($value as $eventkey => $eventvalue) {
72
  echo '<tr class="pe-event">';
73
+ echo '<td>' . PostExpirator_Util::get_wp_date('r', $time) . '</td>';
74
  echo '<td>' . $eventkey . '</td>';
75
  $arrkey = array_keys($eventvalue);
76
  $firstArgsUid = null;
views/menu-general.php CHANGED
@@ -17,6 +17,8 @@ $expirationdateDefaultDateCustom = get_option('expirationdateDefaultDateCustom')
17
 
18
  $categories = get_option('expirationdateCategoryDefaults');
19
 
 
 
20
  $expireddisplayfooterenabled = '';
21
  $expireddisplayfooterdisabled = '';
22
  if ($expireddisplayfooter == 0) {
@@ -101,7 +103,7 @@ $plugin_facade = PostExpirator_Facade::getInstance();
101
  value="<?php
102
  echo $expirationdateDefaultDateFormat; ?>" size="25"/> <span
103
  class="description">(<?php
104
- echo date_i18n("$expirationdateDefaultDateFormat"); ?>)</span>
105
  <p class="description"><?php
106
  echo sprintf(
107
  __(
@@ -122,7 +124,7 @@ $plugin_facade = PostExpirator_Facade::getInstance();
122
  value="<?php
123
  echo $expirationdateDefaultTimeFormat; ?>" size="25"/> <span
124
  class="description">(<?php
125
- echo date_i18n("$expirationdateDefaultTimeFormat"); ?>)</span>
126
  <p class="description"><?php
127
  echo sprintf(
128
  __(
@@ -324,18 +326,24 @@ $plugin_facade = PostExpirator_Facade::getInstance();
324
  'post-expirator'
325
  ); ?></p>
326
  <ul class="pe-list">
327
- <li><p class="description">EXPIRATIONFULL
 
328
  -> <?php
329
- echo date_i18n(
330
- "$expirationdateDefaultDateFormat $expirationdateDefaultTimeFormat"
331
- ); ?></p>
332
  </li>
333
- <li><p class="description">EXPIRATIONDATE
 
334
  -> <?php
335
- echo date_i18n("$expirationdateDefaultDateFormat"); ?></p></li>
336
- <li><p class="description">EXPIRATIONTIME
 
 
 
337
  -> <?php
338
- echo date_i18n("$expirationdateDefaultTimeFormat"); ?></p></li>
 
 
339
  </ul>
340
  </td>
341
  </tr>
@@ -350,7 +358,7 @@ $plugin_facade = PostExpirator_Facade::getInstance();
350
  (<span style="<?php
351
  echo $expirationdateFooterStyle; ?>"><?php
352
  _e('This post will expire on', 'post-expirator'); ?><?php
353
- echo date_i18n("$expirationdateDefaultDateFormat $expirationdateDefaultTimeFormat"); ?></span>)
354
  <p class="description"><?php
355
  _e('The inline css which will be used to style the footer text.', 'post-expirator'); ?></p>
356
  </td>
@@ -421,6 +429,31 @@ $plugin_facade = PostExpirator_Facade::getInstance();
421
  endforeach; ?>
422
  </td>
423
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  </table>
425
 
426
  <p class="submit">
17
 
18
  $categories = get_option('expirationdateCategoryDefaults');
19
 
20
+ $preserveData = (bool)get_option('expirationdatePreserveData', true);
21
+
22
  $expireddisplayfooterenabled = '';
23
  $expireddisplayfooterdisabled = '';
24
  if ($expireddisplayfooter == 0) {
103
  value="<?php
104
  echo $expirationdateDefaultDateFormat; ?>" size="25"/> <span
105
  class="description">(<?php
106
+ echo PostExpirator_Util::get_wp_date($expirationdateDefaultDateFormat, time()); ?>)</span>
107
  <p class="description"><?php
108
  echo sprintf(
109
  __(
124
  value="<?php
125
  echo $expirationdateDefaultTimeFormat; ?>" size="25"/> <span
126
  class="description">(<?php
127
+ echo PostExpirator_Util::get_wp_date($expirationdateDefaultTimeFormat, time()); ?>)</span>
128
  <p class="description"><?php
129
  echo sprintf(
130
  __(
326
  'post-expirator'
327
  ); ?></p>
328
  <ul class="pe-list">
329
+ <li>
330
+ <p class="description">EXPIRATIONFULL
331
  -> <?php
332
+ echo PostExpirator_Util::get_wp_date("$expirationdateDefaultDateFormat $expirationdateDefaultTimeFormat", time()); ?>
333
+ </p>
 
334
  </li>
335
+ <li>
336
+ <p class="description">EXPIRATIONDATE
337
  -> <?php
338
+ echo PostExpirator_Util::get_wp_date($expirationdateDefaultDateFormat, time()); ?>
339
+ </p>
340
+ </li>
341
+ <li>
342
+ <p class="description">EXPIRATIONTIME
343
  -> <?php
344
+ echo PostExpirator_Util::get_wp_date($expirationdateDefaultTimeFormat, time()); ?>
345
+ </p>
346
+ </li>
347
  </ul>
348
  </td>
349
  </tr>
358
  (<span style="<?php
359
  echo $expirationdateFooterStyle; ?>"><?php
360
  _e('This post will expire on', 'post-expirator'); ?><?php
361
+ echo PostExpirator_Util::get_wp_date("$expirationdateDefaultDateFormat $expirationdateDefaultTimeFormat", time()); ?></span>)
362
  <p class="description"><?php
363
  _e('The inline css which will be used to style the footer text.', 'post-expirator'); ?></p>
364
  </td>
429
  endforeach; ?>
430
  </td>
431
  </tr>
432
+ <tr valign="top">
433
+ <th scope="row">
434
+ <?php
435
+ _e('Preserve data after deactivating the plugin', 'post-expirator'); ?>
436
+ </th>
437
+ <td>
438
+ <input type="radio" name="expired-preserve-data-deactivating" id="expired-preserve-data-deactivating-true"
439
+ value="1" <?php echo $preserveData ? ' checked="checked"' : ''; ?>/>
440
+ <label for="expired-preserve-data-deactivating-true">
441
+ <?php _e('Preserve data', 'post-expirator'); ?>
442
+ </label>
443
+ &nbsp;&nbsp;
444
+ <input type="radio" name="expired-preserve-data-deactivating" id="expired-preserve-data-deactivating-false"
445
+ value="0" <?php echo ! $preserveData ? ' checked="checked"' : ''; ?>/>
446
+ <label for="expired-preserve-data-deactivating-false">
447
+ <?php _e('Delete data', 'post-expirator'); ?>
448
+ </label>
449
+ <p class="description">
450
+ <?php _e(
451
+ 'Toggle between preserving or deleting data after the plugin is deactivated.',
452
+ 'post-expirator'
453
+ ); ?>
454
+ </p>
455
+ </td>
456
+ </tr>
457
  </table>
458
 
459
  <p class="submit">
views/quick-edit.php CHANGED
@@ -60,6 +60,8 @@
60
  <input name="expirationdate_minute" value="" size="2" maxlength="2" autocomplete="off"
61
  type="text" placeholder="00">
62
  </label>
 
 
63
  </div>
64
  <div>
65
  <legend>
60
  <input name="expirationdate_minute" value="" size="2" maxlength="2" autocomplete="off"
61
  type="text" placeholder="00">
62
  </label>
63
+
64
+ <?php echo PostExpirator_Util::wp_timezone_string(); ?>
65
  </div>
66
  <div>
67
  <legend>